Skip to content

Commit bcf4016

Browse files
committed
Merge remote-tracking branch 'private/version2_development' into version2_more_complex_variable_definition
2 parents 9ae516e + b7fb324 commit bcf4016

File tree

91 files changed

+4261
-623
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+4261
-623
lines changed

.circleci/config.yml

Lines changed: 59 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ jobs:
55
# Run Python 3 tests
66
working_directory: /python3_test
77
docker:
8-
- image: continuumio/miniconda
8+
- image: continuumio/miniconda3
99
steps:
1010
- checkout
1111
- run:
1212
command: |
13-
apt-get update -y && apt-get install -y build-essential
13+
apt update && apt -y install build-essential gfortran
1414
# Create a file to checksum as cache key
1515
date --rfc-3339 date > cache_key.txt
1616
cat environment.yml >> cache_key.txt
@@ -20,12 +20,10 @@ jobs:
2020
- run:
2121
# Update/Create Conda Environment
2222
command: |
23+
. /opt/conda/etc/profile.d/conda.sh
2324
conda update -y conda
24-
if ! test -d "/opt/conda/envs/esmvaltool"; then
25-
conda create -y --name esmvaltool python=3
26-
fi
27-
conda env update --name esmvaltool
28-
source activate esmvaltool
25+
conda env update
26+
conda activate esmvaltool
2927
Rscript esmvaltool/install/R/setup.R
3028
- save_cache:
3129
key: deps3-{{ .Branch }}-{{ checksum "cache_key.txt" }}
@@ -34,7 +32,8 @@ jobs:
3432
- run:
3533
# Activate Conda environment and run tests
3634
command: |
37-
source activate esmvaltool
35+
. /opt/conda/etc/profile.d/conda.sh
36+
conda activate esmvaltool
3837
python setup.py test
3938
- store_test_results:
4039
path: test-reports/
@@ -45,12 +44,12 @@ jobs:
4544
# Run Python 2 tests
4645
working_directory: /python2_test
4746
docker:
48-
- image: continuumio/miniconda
47+
- image: continuumio/miniconda3
4948
steps:
5049
- checkout
5150
- run:
5251
command: |
53-
apt-get update -y && apt-get install -y build-essential
52+
apt update && apt -y install build-essential gfortran
5453
# Create a file to checksum as cache key
5554
date --rfc-3339 date > cache_key.txt
5655
cat environment.yml >> cache_key.txt
@@ -60,12 +59,13 @@ jobs:
6059
- run:
6160
# Update/Create Conda Environment
6261
command: |
62+
. /opt/conda/etc/profile.d/conda.sh
6363
conda update -y conda
6464
if ! test -d "/opt/conda/envs/esmvaltool"; then
6565
conda create -y --name esmvaltool python=2
6666
fi
67-
conda env update --name esmvaltool
68-
source activate esmvaltool
67+
conda env update
68+
conda activate esmvaltool
6969
Rscript esmvaltool/install/R/setup.R
7070
- save_cache:
7171
key: deps2-{{ .Branch }}-{{ checksum "cache_key.txt" }}
@@ -74,7 +74,8 @@ jobs:
7474
- run:
7575
# Activate Conda environment and run tests
7676
command: |
77-
source activate esmvaltool
77+
. /opt/conda/etc/profile.d/conda.sh
78+
conda activate esmvaltool
7879
python setup.py test
7980
- store_test_results:
8081
path: test-reports/
@@ -85,22 +86,20 @@ jobs:
8586
# Test Python 3 installation
8687
working_directory: /python3_install
8788
docker:
88-
- image: continuumio/miniconda
89+
- image: continuumio/miniconda3
8990
steps:
9091
- checkout
9192
- run:
9293
command: |
94+
. /opt/conda/etc/profile.d/conda.sh
9395
set -x
9496
mkdir /logs
9597
# Install
96-
apt-get update > /logs/apt.txt 2>&1
97-
apt-get install -y build-essential >> /logs/apt.txt 2>&1
98+
apt update > /logs/apt.txt 2>&1
99+
apt -y install build-essential gfortran >> /logs/apt.txt 2>&1
98100
conda update -y conda > /logs/conda.txt 2>&1
99-
conda create -y --name esmvaltool python=3 > /logs/conda.txt 2>&1
100-
conda env update --name esmvaltool >> /logs/conda.txt 2>&1
101-
set +x
102-
source activate esmvaltool
103-
set -x
101+
conda env update >> /logs/conda.txt 2>&1
102+
set +x; conda activate esmvaltool; set -x
104103
pip install . > /logs/install.txt 2>&1
105104
Rscript ./esmvaltool/install/R/setup.R > /logs/R_install.txt 2>&1
106105
# Log versions
@@ -127,22 +126,21 @@ jobs:
127126
# Test Python 2 installation
128127
working_directory: /python2_install
129128
docker:
130-
- image: continuumio/miniconda
129+
- image: continuumio/miniconda3
131130
steps:
132131
- checkout
133132
- run:
134133
command: |
134+
. /opt/conda/etc/profile.d/conda.sh
135135
set -x
136136
mkdir /logs
137137
# Install
138-
apt-get update > /logs/apt.txt 2>&1
139-
apt-get install -y build-essential >> /logs/apt.txt 2>&1
138+
apt update > /logs/apt.txt 2>&1
139+
apt -y install build-essential gfortran >> /logs/apt.txt 2>&1
140140
conda update -y conda > /logs/conda.txt 2>&1
141141
conda create -y --name esmvaltool python=2 > /logs/conda.txt 2>&1
142-
conda env update --name esmvaltool >> /logs/conda.txt 2>&1
143-
set +x
144-
source activate esmvaltool
145-
set -x
142+
conda env update >> /logs/conda.txt 2>&1
143+
set +x; conda activate esmvaltool; set -x
146144
pip install . > /logs/install.txt 2>&1
147145
Rscript ./esmvaltool/install/R/setup.R > /logs/R_install.txt 2>&1
148146
# Log versions
@@ -160,22 +158,20 @@ jobs:
160158
# Test development installation
161159
working_directory: /develop
162160
docker:
163-
- image: continuumio/miniconda
161+
- image: continuumio/miniconda3
164162
steps:
165163
- checkout
166164
- run:
167165
command: |
166+
. /opt/conda/etc/profile.d/conda.sh
168167
set -x
169168
mkdir /logs
170169
# Install
171-
apt-get update > /logs/apt.txt 2>&1
172-
apt-get install -y build-essential >> /logs/apt.txt 2>&1
170+
apt update > /logs/apt.txt 2>&1
171+
apt -y install build-essential gfortran >> /logs/apt.txt 2>&1
173172
conda update -y conda > /logs/conda.txt 2>&1
174-
conda create -y --name esmvaltool python=3 > /logs/conda.txt 2>&1
175-
conda env update --name esmvaltool >> /logs/conda.txt 2>&1
176-
set +x
177-
source activate esmvaltool
178-
set -x
173+
conda env update >> /logs/conda.txt 2>&1
174+
set +x; conda activate esmvaltool; set -x
179175
pip install -e .[develop] > /logs/install.txt 2>&1
180176
Rscript ./esmvaltool/install/R/setup.R > /logs/R_install.txt 2>&1
181177
# Log versions
@@ -193,23 +189,20 @@ jobs:
193189
# Test building documentation
194190
working_directory: /doc
195191
docker:
196-
- image: continuumio/miniconda
192+
- image: continuumio/miniconda3
197193
steps:
198194
- checkout
199195
- run:
200196
command: |
197+
. /opt/conda/etc/profile.d/conda.sh
201198
set -x
202199
mkdir /logs
203200
# Install
204-
apt-get update > /logs/apt.txt 2>&1
205-
apt-get install -y build-essential >> /logs/apt.txt 2>&1
206-
# TODO: change to Python 3 once issue #218 is fixed.
201+
apt update > /logs/apt.txt 2>&1
202+
apt -y install build-essential gfortran >> /logs/apt.txt 2>&1
207203
conda update -y conda > /logs/conda.txt 2>&1
208-
conda create -y --name esmvaltool python=2 > /logs/conda.txt 2>&1
209-
conda env update --name esmvaltool >> /logs/conda.txt 2>&1
210-
set +x
211-
source activate esmvaltool
212-
set -x
204+
conda env update >> /logs/conda.txt 2>&1
205+
set +x; conda activate esmvaltool; set -x
213206
pip install -e .[develop] > /logs/install.txt 2>&1
214207
# Log versions
215208
dpkg -l > /logs/versions.txt
@@ -224,57 +217,59 @@ jobs:
224217
# Test conda build
225218
working_directory: /esmvaltool
226219
docker:
227-
- image: continuumio/miniconda
220+
- image: continuumio/miniconda3
228221
steps:
229222
- checkout
230223
- run:
231224
command: |
225+
. /opt/conda/etc/profile.d/conda.sh
232226
set -x
233227
# Install prerequisites
234228
mkdir /logs
235-
apt-get update > /logs/apt.txt 2>&1
236-
apt-get install -y build-essential >> /logs/apt.txt 2>&1
229+
apt update > /logs/apt.txt 2>&1
230+
apt -y install build-essential gfortran >> /logs/apt.txt 2>&1
237231
conda update -y conda > /logs/conda_base.txt 2>&1
238-
conda install -y conda-build >> /logs/conda_base.txt 2>&1
232+
conda install -y conda-build conda-verify >> /logs/conda_base.txt 2>&1
239233
# Log versions
240234
dpkg -l > /logs/versions.txt
241235
conda env export -n base > /logs/build_environment.yml
242236
# Build conda package
243237
conda build . -c conda-forge -c birdhouse > /logs/build_log.txt
244238
# Install Python 3 conda package
245-
conda create -y --name esmvaltool3 python=3 > /logs/conda_esmvaltool3.txt 2>&1
246-
set +x; source activate esmvaltool3; set -x
239+
conda create -y --name esmvaltool3 > /logs/conda_esmvaltool3.txt 2>&1
240+
set +x; conda activate esmvaltool3; set -x
247241
conda install -y esmvaltool --use-local -c conda-forge -c birdhouse
248242
conda env export > /logs/test_environment3.yml
249243
esmvaltool -h
250-
set +x; source deactivate; set -x
244+
set +x; conda deactivate; set -x
251245
# Install Python 2 conda package
252246
conda create -y --name esmvaltool2 python=2 > /logs/conda_esmvaltool2.txt 2>&1
253-
set +x; source activate esmvaltool2; set -x
247+
set +x; conda activate esmvaltool2; set -x
254248
conda install -y esmvaltool --use-local -c conda-forge -c birdhouse
255249
conda env export > /logs/environment2.yml
256250
esmvaltool -h
257-
set +x; source deactivate; set -x
251+
set +x; conda deactivate; set -x
258252
- store_artifacts:
259253
path: /logs
260254

261255
conda_install:
262256
# Test conda package installation
263257
working_directory: /esmvaltool
264258
docker:
265-
- image: continuumio/miniconda
259+
- image: continuumio/miniconda3
266260
steps:
267261
- run:
268262
command: |
263+
. /opt/conda/etc/profile.d/conda.sh
269264
set -x
270265
# Install prerequisites
271266
mkdir /logs
272-
apt-get update > /logs/apt.txt 2>&1
273-
apt-get install -y build-essential >> /logs/apt.txt 2>&1
267+
apt update > /logs/apt.txt 2>&1
268+
apt -y install build-essential gfortran >> /logs/apt.txt 2>&1
274269
conda update -y conda > /logs/conda.txt 2>&1
275270
# Create and activate conda environment
276-
conda create -y --name esmvaltool python=3
277-
set +x; source activate esmvaltool; set -x
271+
conda create -y --name esmvaltool
272+
set +x; conda activate esmvaltool; set -x
278273
# Install
279274
conda install -y esmvaltool -c esmvalgroup -c conda-forge -c birdhouse
280275
# Log versions
@@ -287,21 +282,20 @@ jobs:
287282
# Test ncl conda package
288283
working_directory: /ncl
289284
docker:
290-
- image: continuumio/miniconda
285+
- image: continuumio/miniconda3
291286
steps:
292287
- checkout
293288
- run:
294289
command: |
290+
. /opt/conda/etc/profile.d/conda.sh
295291
set -x
296292
mkdir /logs
297293
# Install
298-
apt-get update > /logs/apt.txt 2>&1
299-
apt-get install -y build-essential >> /logs/apt.txt 2>&1
294+
apt update > /logs/apt.txt 2>&1
295+
apt -y install build-essential gfortran >> /logs/apt.txt 2>&1
300296
conda update -y conda > /logs/conda.txt 2>&1
301297
conda create -y --name ncl > /logs/conda.txt 2>&1
302-
set +x
303-
source activate ncl
304-
set -x
298+
set +x; conda activate ncl; set -x
305299
conda install -y --channel conda-forge ncl >> /logs/conda.txt 2>&1
306300
# Log versions
307301
dpkg -l > /logs/versions.txt

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ This is the development branch for version 2 of ESMValTool. To get started devel
1515

1616
### Getting started
1717
To install in development mode, follow these instructions.
18+
- Install gcc, g++ and gfortran if these are not available on your system. On Debian based systems, this can be done by
19+
running `apt install build-essential gfortran`.
1820
- [Download and install conda](https://conda.io/docs/user-guide/install/linux.html) (this should be done even if the system in use already has a preinstalled version of conda, as problems have been reported with NCL when using such a version)
1921
- If using (t)csh shell, do not prepend the installation path (`<prefix>`) to the environment variable PATH (as recommended by the installation procedure), but add `source <prefix>/etc/profile.d/conda.csh` to the `.cshrc`/`.tcshrc` file instead
2022
- Update conda: `conda update -y conda`
@@ -31,6 +33,10 @@ To install in development mode, follow these instructions.
3133

3234
### Anaconda Package
3335
The Anaconda packages can be found on [ESMValGroup Anaconda Channel.](https://anaconda.org/ESMValGroup)
36+
37+
First install gcc, g++ and gfortran if these are not available on your system. On Debian based systems, this can be done by
38+
running `apt install build-essential gfortran`.
39+
3440
If you already installed Anaconda, you can install ESMValTool by running:
3541
```
3642
conda install -c esmvalgroup esmvaltool -c conda-forge -c birdhouse

doc/sphinx/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@
157157
# Add any paths that contain custom static files (such as style sheets) here,
158158
# relative to this directory. They are copied after the builtin static files,
159159
# so a file named "default.css" will overwrite the builtin "default.css".
160-
html_static_path = ['_static']
160+
html_static_path = []
161161

162162
# Add any extra paths that contain custom files (such as robots.txt or
163163
# .htaccess) here, relative to this directory. These files are copied

doc/sphinx/source/developer_guide2/git_repository.inc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
.. _git_repository:
22

3+
**************
34
Git repository
45
**************
56

@@ -161,7 +162,7 @@ Do-s
161162
* Comment your code as much as possible and in English.
162163
* Use short but self-explanatory variable names (e.g., model_input and reference_input instead of xm and xr).
163164
* Consider a modular/functional programming style. This often makes code easier to read and deletes intermediate variables immediately. If possible, separate diagnostic calculations from plotting routines.
164-
* Consider reusing or extending existing code. General-purpose code can be found in diag_scripts/lib/ and in plot_scripts/.
165+
* Consider reusing or extending existing code. General-purpose code can be found in esmvaltool/diag_scripts/shared/.
165166
* Comment all switches and parameters including a list of all possible settings/options in the header section of your code (see also Section :ref:`std_diag`).
166167
* Use templates for recipes (Section :ref:`std_recipe`) and diagnostics (Section :ref:`std_diag`) to help with proper documentation.
167168
* Keep your *FEATURE BRANCH* regularly synchronized with the *DEVELOPMENT BRANCH* (git merge).
@@ -174,5 +175,5 @@ Don't-s
174175
* Do not develop without proper version control (see do-s above).
175176
* Avoid large (memory, disk space) intermediate results. Delete intermediate files/variables or see modular/functional programming style.
176177
* Do not use hard-coded pathnames or filenames.
177-
* Do not mix developments / modifications of the ESMValTool framework and developments / modifications of diagnotics in the same *FEATURE BRANCH*.
178+
* Do not mix developments / modifications of the ESMValTool framework and developments / modifications of diagnostics in the same *FEATURE BRANCH*.
178179

doc/sphinx/source/developer_guide2/index.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
Developer's Guide
33
#################
44

5+
.. include:: new_diagnostic.inc
56
.. include:: porting.inc
6-
.. include:: core_team.inc
77
.. include:: git_repository.inc
8+
.. include:: core_team.inc

0 commit comments

Comments
 (0)