Skip to content

Commit a649bb5

Browse files
authored
Merge pull request #240 from rigoudyg/V3.0
V3.0
2 parents ff9b153 + 2f154b1 commit a649bb5

File tree

246 files changed

+4795
-2424
lines changed

Some content is hidden

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

246 files changed

+4795
-2424
lines changed

.github/workflows/build_doc.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Doc Build
2+
run-name: ${{ github.actor }} is building doc
3+
on:
4+
- push
5+
- workflow_dispatch
6+
7+
jobs:
8+
Sole_job_yet:
9+
name: Build doc
10+
runs-on: ubuntu-20.04
11+
defaults:
12+
run:
13+
shell: bash -el {0}
14+
steps:
15+
- name: Check out code
16+
uses: actions/checkout@v3
17+
18+
- name: Setup Mambaforge
19+
uses: conda-incubator/setup-miniconda@v2
20+
with:
21+
miniforge-variant: Mambaforge
22+
miniforge-version: latest
23+
activate-environment: climaf_test
24+
use-mamba: true
25+
26+
- name: Cache Conda env
27+
uses: actions/cache@v3
28+
with:
29+
path: ${{ env.CONDA }}/envs
30+
key:
31+
conda-${{ runner.os }}--${{ runner.arch }}--${{
32+
hashFiles('tests/conda_test_environment.yml') }}-${{ env.CACHE_NUMBER }}
33+
env:
34+
# Increase this value to reset cache if etc/example-environment.yml has not changed
35+
CACHE_NUMBER: 0
36+
id: cache
37+
38+
- name: Update environment
39+
run:
40+
mamba env update -n climaf_test -f tests/conda_test_environment.yml
41+
if: steps.cache.outputs.cache-hit != 'true'
42+
43+
- run: (cd doc && make -k html)
44+
45+
- name: Archive doc
46+
uses: actions/upload-artifact@v3
47+
with:
48+
name: doc
49+
retention-days: 5
50+
path: |
51+
doc/_build/html
52+

.github/workflows/test_suite.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Test suite
2+
run-name: Test suite launched by ${{ github.actor }}
3+
on:
4+
- push
5+
- workflow_dispatch
6+
7+
jobs:
8+
Sole_job_yet:
9+
name: Testing with ubuntu 20.04, conda and python 3.11
10+
runs-on: ubuntu-20.04
11+
strategy:
12+
matrix:
13+
#python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
14+
python-version: [ "3.11"]
15+
defaults:
16+
run:
17+
shell: bash -el {0}
18+
steps:
19+
- name: Check out code
20+
uses: actions/checkout@v3
21+
22+
- name: Setup Mambaforge
23+
uses: conda-incubator/setup-miniconda@v2
24+
with:
25+
miniforge-variant: Mambaforge
26+
miniforge-version: latest
27+
activate-environment: climaf_test
28+
use-mamba: true
29+
30+
- name: Cache Conda env
31+
uses: actions/cache@v3
32+
with:
33+
path: ${{ env.CONDA }}/envs
34+
key:
35+
conda-${{ runner.os }}--${{ runner.arch }}--${{
36+
hashFiles('tests/conda_test_environment.yml') }}-${{ env.CACHE_NUMBER }}
37+
env:
38+
# Increase this value to reset cache if environment.yml has not changed
39+
CACHE_NUMBER: 0
40+
id: cache
41+
42+
- name: Update environment if needed
43+
run:
44+
mamba env update -n climaf_test -f tests/conda_test_environment.yml
45+
if: steps.cache.outputs.cache-hit != 'true'
46+
47+
- run: (cd tests && ./launch_tests_with_coverage.sh 1 3 "netcdfbasics" 0)
48+
- run: (cd tests && ./launch_tests_with_coverage.sh 1 3 "period" 0)
49+
- run: (cd tests && ./launch_tests_with_coverage.sh 1 3 "cache" 0)
50+
- run: (cd tests && ./launch_tests_with_coverage.sh 1 3 "classes" 0)
51+
- run: (cd tests && ./launch_tests_with_coverage.sh 1 3 "functions" 0)
52+
- run: (cd tests && ./launch_tests_with_coverage.sh 1 3 "operators" 0)
53+
- run: (cd tests && ./launch_tests_with_coverage.sh 1 3 "standard_operators" 0)
54+
- run: (cd tests && ./launch_tests_with_coverage.sh 1 3 "operators_derive" 0)
55+
- run: (cd tests && ./launch_tests_with_coverage.sh 1 3 "operators_scripts" 0)
56+
- run: (cd tests && ./launch_tests_with_coverage.sh 1 3 "cmacro" 0)
57+
- run: (cd tests && ./launch_tests_with_coverage.sh 1 3 "driver" 0)
58+
- run: (cd tests && ./launch_tests_with_coverage.sh 1 3 "dataloc" 0)
59+
- run: (cd tests && ./launch_tests_with_coverage.sh 1 3 "find_files" 0)
60+
- run: (cd tests && ./launch_tests_with_coverage.sh 1 3 "html" 0)
61+
- run: (cd tests && ./launch_tests_with_coverage.sh 1 3 "example_data_retrieval" 0)
62+
- run: (cd tests && ./launch_tests_with_coverage.sh 1 3 "example_index_html" 0)
63+
- run: (cd tests && ./launch_tests_with_coverage.sh 1 3 "mcdo" 0)
64+
#- run: (cd tests && ./launch_tests_with_coverage.sh 1 3 "example_data_plot" 0 "github_conda_GR")

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
## CliMAF : a Climate Model Assessment Framework
2+
3+
CliMAF doc is available at [Readthedocs]
4+
(http://climaf.readthedocs.org/) , which includes [installation instructions](http://climaf.readthedocs.org/en/latest/installing.html)
5+
6+
The aim of CliMAF is to allow for an actual, **easy, collaborative development of climate model outputs assessment suites by climate scientists with varied IT background**, and to ultimately share such suites for the benefit of the Climate Science.
7+
8+
It is basically a python-scriptable way to process NetCDF [CF compliant](http://cfconventions.org/) climate model outputs by piping arbitrary executables, with easy access to datasets and automated results caching.
9+
10+
CliMAF was designed by Stéphane Sénési, who also developped most of the code before version 2.
11+
12+
![Test suite](https://github.com/senesis/climaf/actions/workflows/test_suite.yml/badge.svg?event=push)
13+
![Doc build](https://github.com/senesis/climaf/actions/workflows/build_doc.yml/badge.svg?event=push)
14+

README.rst

Lines changed: 0 additions & 12 deletions
This file was deleted.

bin/climaf

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,11 @@ cdir=$(cd $(dirname $0)/..; pwd)
1010

1111
export PYTHONPATH=$cdir:$PYTHONPATH
1212

13-
if [ ! "cesmep_env"="$CONDA_DEFAULT_ENV" ]
14-
then
15-
source activate cesmep_env
16-
fi
17-
1813
if [ "$*" ] ; then
1914
if [ -f "$1" ] ; then
20-
(echo 'from climaf.api import *'; cat $*) | python
15+
(echo 'from climaf.api import *'; cat $*) | python3
2116
else
22-
echo -e 'from climaf.api import *\n'$* | python 2> climaf.stderr
17+
echo -e 'from climaf.api import *\n'$* | python3 2> climaf.stderr
2318
rep=$?
2419
[ $rep -ne 0 ] && cat climaf.stderr >&2
2520
rm climaf.stderr
@@ -32,7 +27,7 @@ else
3227
ipython -i -c 'from climaf.api import *'
3328
else
3429
# ipython at CNRM for now implies Python3, which is notcompatible with CliMAF
35-
python -i -c 'from climaf.api import *'
30+
python3 -i -c 'from climaf.api import *'
3631
fi
3732
fi
3833

bin/climaf-notebook

Lines changed: 0 additions & 53 deletions
This file was deleted.

0 commit comments

Comments
 (0)