Skip to content

Commit

Permalink
Merge pull request #1104 from ESMValGroup/version2_development
Browse files Browse the repository at this point in the history
v2.0a2 release
  • Loading branch information
bouweandela authored May 29, 2019
2 parents 7a60b30 + e92fd47 commit 773ee61
Show file tree
Hide file tree
Showing 758 changed files with 116,274 additions and 13,924 deletions.
220 changes: 77 additions & 143 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,78 +5,30 @@ jobs:
# Run Python 3 tests
working_directory: /python3_test
docker:
- image: continuumio/miniconda
- image: continuumio/miniconda3
steps:
- checkout
- run:
command: |
apt-get update -y && apt-get install -y build-essential
# Create a file to checksum as cache key
date --rfc-3339 date > cache_key.txt
cat environment.yml >> cache_key.txt
- restore_cache:
key: deps3-{{ .Branch }}-{{ checksum "cache_key.txt" }}
- run:
# Update/Create Conda Environment
# Update/Create Conda environment and run tests
command: |
. /opt/conda/etc/profile.d/conda.sh
conda update -y conda
if ! test -d "/opt/conda/envs/esmvaltool"; then
conda create -y --name esmvaltool python=3
fi
conda env update --name esmvaltool
- save_cache:
key: deps3-{{ .Branch }}-{{ checksum "cache_key.txt" }}
paths:
- "/opt/conda/envs/esmvaltool"
- run:
# Activate Conda environment and run tests
command: |
source activate esmvaltool
conda env update
conda activate esmvaltool
conda install -yS r-lintr
python setup.py test
- store_test_results:
path: test-reports/
- store_artifacts:
path: test-reports/
- run:
# Upload Python 3 test coverage to codacy, even when the actual
# running of the tests fails.
when: always
command: |
pip install codacy-coverage
python-codacy-coverage -r test-reports/python3/coverage.xml
python2_test:
# Run Python 2 tests
working_directory: /python2_test
docker:
- image: continuumio/miniconda
steps:
- checkout
- run:
command: |
apt-get update -y && apt-get install -y build-essential
# Create a file to checksum as cache key
date --rfc-3339 date > cache_key.txt
cat environment.yml >> cache_key.txt
- restore_cache:
key: deps2-{{ .Branch }}-{{ checksum "cache_key.txt" }}
- run:
# Update/Create Conda Environment
command: |
conda update -y conda
if ! test -d "/opt/conda/envs/esmvaltool"; then
conda create -y --name esmvaltool python=2
fi
conda env update --name esmvaltool
- save_cache:
key: deps2-{{ .Branch }}-{{ checksum "cache_key.txt" }}
key: deps3-{{ .Branch }}-{{ checksum "cache_key.txt" }}
paths:
- "/opt/conda/envs/esmvaltool"
- run:
# Activate Conda environment and run tests
command: |
source activate esmvaltool
python setup.py test
- ".eggs"
- store_test_results:
path: test-reports/
- store_artifacts:
Expand All @@ -86,117 +38,106 @@ jobs:
# Test Python 3 installation
working_directory: /python3_install
docker:
- image: continuumio/miniconda
- image: continuumio/miniconda3
steps:
- checkout
- restore_cache:
key: python3-install-{{ .Branch }}
- run:
command: |
. /opt/conda/etc/profile.d/conda.sh
set -x
mkdir /logs
# Install
apt-get update > /logs/apt.txt 2>&1
apt-get install -y build-essential >> /logs/apt.txt 2>&1
wget https://julialang-s3.julialang.org/bin/linux/x64/1.0/julia-1.0.3-linux-x86_64.tar.gz
tar xfz julia-*-linux-x86_64.tar.gz
ln -s $(pwd)/julia-*/bin/julia /usr/bin/julia
conda update -y conda > /logs/conda.txt 2>&1
conda create -y --name esmvaltool python=3 > /logs/conda.txt 2>&1
conda env update --name esmvaltool >> /logs/conda.txt 2>&1
set +x
source activate esmvaltool
set -x
conda env update >> /logs/conda.txt 2>&1
set +x; conda activate esmvaltool; set -x
pip install . > /logs/install.txt 2>&1
Rscript esmvaltool/install/R/setup.R > /logs/R_install.txt 2>&1
julia esmvaltool/install/Julia/setup.jl > /logs/julia_install.txt 2>&1
# Log versions
dpkg -l > /logs/versions.txt
conda env export > /logs/environment.yml
pip freeze > /logs/requirements.txt
# Test installation
python setup.py test --installation
esmvaltool -h
ncl -V
# cdo test, check that it supports hdf5
cdo --version
echo 0 | cdo -f nc input,r1x1 tmp.nc
ncdump tmp.nc | ncgen -k hdf5 -o tmp.nc
cdo -f nc copy tmp.nc tmp2.nc
- save_cache:
key: python3-install-{{ .Branch }}
paths:
- "/opt/conda/pkgs"
- ".eggs"
- store_artifacts:
path: /logs

python2_install:
# Test Python 2 installation
working_directory: /python2_install
docker:
- image: continuumio/miniconda
steps:
- checkout
- store_artifacts:
path: test-reports/
- store_test_results:
path: test-reports/
- run:
when: always
command: |
set -x
mkdir /logs
# Install
apt-get update > /logs/apt.txt 2>&1
apt-get install -y build-essential >> /logs/apt.txt 2>&1
conda update -y conda > /logs/conda.txt 2>&1
conda create -y --name esmvaltool python=2 > /logs/conda.txt 2>&1
conda env update --name esmvaltool >> /logs/conda.txt 2>&1
set +x
source activate esmvaltool
set -x
pip install . > /logs/install.txt 2>&1
# Log versions
dpkg -l > /logs/versions.txt
conda env export > /logs/environment.yml
pip freeze > /logs/requirements.txt
# Test installation
esmvaltool -h
ncl -V
- store_artifacts:
path: /logs
pip install codacy-coverage
python-codacy-coverage -r test-reports/python3/coverage.xml
develop:
# Test development installation
working_directory: /develop
docker:
- image: continuumio/miniconda
- image: continuumio/miniconda3
steps:
- checkout
- run:
command: |
. /opt/conda/etc/profile.d/conda.sh
set -x
mkdir /logs
# Install
apt-get update > /logs/apt.txt 2>&1
apt-get install -y build-essential >> /logs/apt.txt 2>&1
wget https://julialang-s3.julialang.org/bin/linux/x64/1.0/julia-1.0.3-linux-x86_64.tar.gz
tar xfz julia-*-linux-x86_64.tar.gz
ln -s $(pwd)/julia-*/bin/julia /usr/bin/julia
conda update -y conda > /logs/conda.txt 2>&1
conda create -y --name esmvaltool python=3 > /logs/conda.txt 2>&1
conda env update --name esmvaltool >> /logs/conda.txt 2>&1
set +x
source activate esmvaltool
set -x
conda env update >> /logs/conda.txt 2>&1
set +x; conda activate esmvaltool; set -x
pip install -e .[develop] > /logs/install.txt 2>&1
Rscript esmvaltool/install/R/setup.R > /logs/R_install.txt 2>&1
julia esmvaltool/install/Julia/setup.jl > /logs/julia_install.txt 2>&1
# Log versions
dpkg -l > /logs/versions.txt
conda env export > /logs/environment.yml
pip freeze > /logs/requirements.txt
# Test installation
esmvaltool -h
python setup.py test
python setup.py test --installation
ncl -V
cdo --version
- store_artifacts:
path: /logs

doc:
# Test building documentation
working_directory: /doc
docker:
- image: continuumio/miniconda
- image: continuumio/miniconda3
steps:
- checkout
- run:
command: |
. /opt/conda/etc/profile.d/conda.sh
set -x
mkdir /logs
# Install
apt-get update > /logs/apt.txt 2>&1
apt-get install -y build-essential >> /logs/apt.txt 2>&1
# TODO: change to Python 3 once issue #218 is fixed.
conda update -y conda > /logs/conda.txt 2>&1
conda create -y --name esmvaltool python=2 > /logs/conda.txt 2>&1
conda env update --name esmvaltool >> /logs/conda.txt 2>&1
set +x
source activate esmvaltool
set -x
conda env update >> /logs/conda.txt 2>&1
set +x; conda activate esmvaltool; set -x
pip install -e .[develop] > /logs/install.txt 2>&1
# Log versions
dpkg -l > /logs/versions.txt
Expand All @@ -211,90 +152,85 @@ jobs:
# Test conda build
working_directory: /esmvaltool
docker:
- image: continuumio/miniconda
- image: continuumio/miniconda3
steps:
- checkout
- run:
command: |
. /opt/conda/etc/profile.d/conda.sh
set -x
# Install prerequisites
mkdir /logs
apt-get update > /logs/apt.txt 2>&1
apt-get install -y build-essential >> /logs/apt.txt 2>&1
wget https://julialang-s3.julialang.org/bin/linux/x64/1.0/julia-1.0.3-linux-x86_64.tar.gz
tar xfz julia-*-linux-x86_64.tar.gz
ln -s $(pwd)/julia-*/bin/julia /usr/bin/julia
conda update -y conda > /logs/conda_base.txt 2>&1
conda install -y conda-build >> /logs/conda_base.txt 2>&1
conda install -y conda-build conda-verify >> /logs/conda_base.txt 2>&1
# Log versions
dpkg -l > /logs/versions.txt
conda env export -n base > /logs/build_environment.yml
# Build conda package
conda build . -c conda-forge -c birdhouse > /logs/build_log.txt
# Install Python 3 conda package
conda create -y --name esmvaltool3 python=3 > /logs/conda_esmvaltool3.txt 2>&1
set +x; source activate esmvaltool3; set -x
conda create -y --name esmvaltool3 > /logs/conda_esmvaltool3.txt 2>&1
set +x; conda activate esmvaltool3; set -x
conda install -y esmvaltool --use-local -c conda-forge -c birdhouse
conda env export > /logs/test_environment3.yml
esmvaltool -h
set +x; source deactivate; set -x
# Install Python 2 conda package
conda create -y --name esmvaltool2 python=2 > /logs/conda_esmvaltool2.txt 2>&1
set +x; source activate esmvaltool2; set -x
conda install -y esmvaltool --use-local -c conda-forge -c birdhouse
conda env export > /logs/environment2.yml
esmvaltool -h
set +x; source deactivate; set -x
- store_artifacts:
path: /logs

conda_install:
# Test conda package installation
working_directory: /esmvaltool
docker:
- image: continuumio/miniconda
- image: continuumio/miniconda3
steps:
- run:
command: |
. /opt/conda/etc/profile.d/conda.sh
set -x
# Install prerequisites
mkdir /logs
apt-get update > /logs/apt.txt 2>&1
apt-get install -y build-essential >> /logs/apt.txt 2>&1
wget https://julialang-s3.julialang.org/bin/linux/x64/1.0/julia-1.0.3-linux-x86_64.tar.gz
tar xfz julia-*-linux-x86_64.tar.gz
ln -s $(pwd)/julia-*/bin/julia /usr/bin/julia
conda update -y conda > /logs/conda.txt 2>&1
# Create and activate conda environment
conda create -y --name esmvaltool python=3
set +x; source activate esmvaltool; set -x
conda create -y --name esmvaltool
set +x; conda activate esmvaltool; set -x
# Install
conda install -y esmvaltool -c esmvalgroup -c conda-forge -c birdhouse
# Log versions
conda env export > /logs/environment.yml
# Test installation
esmvaltool -h
ncl -V
cdo --version
ncl:
# Test ncl conda package
ncl_cdo_test:
# Test ncl and cdo conda packages
working_directory: /ncl
docker:
- image: continuumio/miniconda
- image: continuumio/miniconda3
steps:
- checkout
- run:
command: |
. /opt/conda/etc/profile.d/conda.sh
set -x
mkdir /logs
# Install
apt-get update > /logs/apt.txt 2>&1
apt-get install -y build-essential >> /logs/apt.txt 2>&1
conda update -y conda > /logs/conda.txt 2>&1
conda create -y --name ncl > /logs/conda.txt 2>&1
set +x
source activate ncl
set -x
conda install -y --channel conda-forge ncl >> /logs/conda.txt 2>&1
set +x; conda activate ncl; set -x
conda install -y --channel conda-forge ncl cdo >> /logs/conda.txt 2>&1
# Log versions
dpkg -l > /logs/versions.txt
conda env export > /logs/environment.yml
# Test if NCL installed successfully
ncl -V
cdo --version
- store_artifacts:
path: /logs

Expand All @@ -303,7 +239,7 @@ workflows:
commit:
jobs:
- python3_test
- python2_test
- python3_install
nightly:
triggers:
- schedule:
Expand All @@ -315,11 +251,9 @@ workflows:
- version2_master
jobs:
- python3_test
- python2_test
- python3_install
- python2_install
- develop
- doc
- conda_build
- conda_install
- ncl
- ncl_cdo_test
Loading

0 comments on commit 773ee61

Please sign in to comment.