Skip to content

Commit

Permalink
Merge pull request #147 from tsjackson-noaa/develop
Browse files Browse the repository at this point in the history
v3.0 beta 3 release: merge feature/v3alpha3 into NOAA-GFDL:main.
  • Loading branch information
tsjackson-noaa authored Feb 25, 2021
2 parents 31321e6 + f4ad525 commit 70622b2
Show file tree
Hide file tree
Showing 388 changed files with 75,066 additions and 23,927 deletions.
File renamed without changes.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,13 @@ wheels/
*.tmp
MANIFEST

# Sphinx intermediate files
# Sphinx intermediate files - all autogenerated
doc/_build
doc/sphinx/pod_toc.rst
doc/sphinx/src.*
doc/sphinx_pods
doc/sphinx/site_toc.rst
doc/sphinx_sites

# Byte-compiled / optimized / DLL files
__pycache__/
Expand Down
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

46 changes: 21 additions & 25 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,23 @@

# Config validator: https://config.travis-ci.com/explore

os: linux
dist: xenial # default
language: shell # synonym for "minimal". Use instead of "python" to save disk space; all software installed through conda
# sudo: false # deprecated in Travis
python: '3.7' # doesn't matter, conda python used instead of system

branches:
only:
- main
- develop
- /^feature/
jobs:
include:
- os: linux
dist: xenial # default
language: shell # synonym for "minimal". Use instead of "python" to save disk space; all software installed through conda
python: '3.7' # doesn't matter, conda python used instead of system
env:
- MINICONDA_INSTALLER="https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh"
- os: osx
osx_image: xcode12.2
env:
- MINICONDA_INSTALLER="https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh"

before_install:
# TRAVIS_BUILD_DIR = abs path to checked-out repo
- BUILD_PARENT="$( cd "$( dirname "$TRAVIS_BUILD_DIR" )" >/dev/null 2>&1 && pwd )"
- POD_OUTPUT="${BUILD_PARENT}/wkdir/MDTF_NCAR-CAM5.timeslice_2000_2004"
- POD_OUTPUT="${BUILD_PARENT}/wkdir/MDTF_NCAR-CAM5.timeslice_2000_2003"
- echo "$TRAVIS_BUILD_DIR" # debug
- echo "$BUILD_PARENT"
- echo "$POD_OUTPUT"
Expand All @@ -29,13 +30,7 @@ install:
# miniconda setup taken from official guide at
# https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/use-conda-with-travis-ci.html
# - sudo apt update
# We do this conditionally because it saves us some downloading if the
# version is the same.
- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O miniconda.sh;
else
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
fi
- wget $MINICONDA_INSTALLER -O miniconda.sh;
- bash miniconda.sh -b -p $HOME/miniconda
- source "$HOME/miniconda/etc/profile.d/conda.sh"
- hash -r
Expand All @@ -54,22 +49,27 @@ install:
- curl --verbose --ipv4 --connect-timeout 8 --max-time 1200 --retry 128 --ftp-ssl --disable-epsv --ftp-pasv -u "anonymous:anonymous" ftp://ftp.gfdl.noaa.gov/pub/thomas.jackson/travis_test.tar --output travis_test.tar
- tar -xvf travis_test.tar
- mkdir wkdir
- pwd # debug
- ls # debug
- ls -R travis_test

- df -h # Log space remaining

before_script:
- cd "$TRAVIS_BUILD_DIR"
- pwd # debug
- ls #debug
- cat ./mdtf

script:
# trivial check that install script worked
- ./mdtf --version

# run unit tests
- conda activate _MDTF_base
- python -m unittest discover

# try running EOF_500hPa and example PODs
- ./mdtf -f "${TRAVIS_BUILD_DIR}/tests/travis_test.jsonc"
- ./mdtf -v -f "${TRAVIS_BUILD_DIR}/tests/travis_test.jsonc"
# EOF_500hPa
- ls "${POD_OUTPUT}/EOF_500hPa/obs"
- ls "${POD_OUTPUT}/EOF_500hPa/model"
Expand All @@ -78,7 +78,3 @@ script:
- ls "${POD_OUTPUT}/example/obs"
- ls "${POD_OUTPUT}/example/model"
- cat "${POD_OUTPUT}/example/example.log"

# run unit tests
- conda activate _MDTF_base
- python -m unittest discover
2 changes: 0 additions & 2 deletions LICENSE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ This file is part of the MDTF code package, version 2.0, which includes the foll

The MDTF code package and individual PODs are made available under the version 3 of the GNU Lesser General Public License, which is provided below.

The 'six' compatbility library (src/six.py) is copyright (c) 2010-2020 Benjamin Peterson and provided in accordance with the terms of its MIT license. See the header of src/six.py for license information.

The intent of this license is to ensure free and unrestricted access to the MDTF code package and individual PODs, and to pass on those rights to modified versions this code package.

GNU LESSER GENERAL PUBLIC LICENSE
Expand Down
141 changes: 91 additions & 50 deletions README.md

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ and climate model analysis code from the community, we adopt the following secur

| Version | Supported |
| ---------- | ------------------ |
| 3.0 beta 3 | :white_check_mark: |
| 3.0 beta 2 | :white_check_mark: |
| 3.0 beta 1 | :x: |
| 2.0 | :x: |
Expand Down
93 changes: 93 additions & 0 deletions data/cmip6-cmor-tables/.circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
version: 2

checkout:
post:
- ./ci-support/checkout_merge_commit.sh

aliases:

- &setup_miniconda
name: setup_miniconda
command: |
mkdir -p $WORKDIR
if [[ $OS == 'osx-64' ]]; then
curl -L https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -o miniconda.sh
else
curl -L https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -o miniconda.sh
fi
bash miniconda.sh -b -p $WORKDIR/miniconda
- &create_conda_env
name: create_conda_env
command: |
export PATH=$WORKDIR/miniconda/bin:$PATH
conda config --set always_yes yes --set changeps1 no
conda update -y -q conda
conda config --set anaconda_upload no
conda create -q -n py3 -c cdat/label/nightly -c pcmdi/label/nightly -c conda-forge -c cdat lazy-object-proxy cmor=3.6.0 python=3.8 testsrunner
- &setup_cmor
name: setup_cmor
command: |
export PATH=$WORKDIR/miniconda/bin:$PATH
set +e
source activate py3
echo "ACTIVATE RETURN CODE $?"
set -e
git clone https://github.com/PCMDI/cmor
cd cmor
# update cmip6-cmor-tables submodule with the current branch
git submodule init
git submodule update
cd cmip6-cmor-tables
git checkout $CIRCLE_BRANCH
exit 0
- &run_prepare_tests
name: run_prepare_tests
command: |
export PATH=$WORKDIR/miniconda/bin:$PATH
export UVCDAT_ANONYMOUS_LOG=False
set +e
source activate py3
set -e
cp Tables/* cmor/Tables
cd cmor
export PYTHONPATH=Test
python run_tests.py -v2 -H -n1 Test/test_python_CMIP6_CV*.py
jobs:
macos_cmip6:
macos:
xcode: "11.1.0"
environment:
WORKDIR: "workspace/test_macos_cmor"
UVCDAT_ANONYMOUS_LOG: "False"
OS: "osx-64"
steps:
- checkout
- run: *setup_miniconda
- run: *create_conda_env
- run: *setup_cmor
- run: *run_prepare_tests

linux_cmip6:
machine:
image: circleci/classic:latest
environment:
WORKDIR: "workspace/test_linux_cmor"
UVCDAT_ANONYMOUS_LOG: "False"
OS: "linux-64"
steps:
- checkout
- run: *setup_miniconda
- run: *create_conda_env
- run: *setup_cmor
- run: *run_prepare_tests

workflows:
version: 2
nightly:
jobs:
- macos_cmip6
- linux_cmip6
9 changes: 9 additions & 0 deletions data/cmip6-cmor-tables/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# cmip6-cmor-tables

Note:
----
Only `CMOR` and `PrePARE` should use the `JSON` file of concatenated `CMIP6` Control Vocabulary [CMIP6_CV.json](https://github.com/PCMDI/cmip6-cmor-tables/blob/master/Tables/CMIP6_CV.json) found in this repository.

All other software should get the CV's directly from the [WCRP](https://github.com/WCRP-CMIP/CMIP6_CVs) repository.

CMIP6 Data Request can be found in the following [mip tables](http://clipc-services.ceda.ac.uk/dreq/index/miptable.html).
Loading

0 comments on commit 70622b2

Please sign in to comment.