Commit 47cd1c4b authored by Antoine Berchet's avatar Antoine Berchet
Browse files

Generate artifacts in CI

parent 1af4d381
......@@ -61,40 +61,7 @@ install:
pages:
stage: deploy
image: pycif/pycif-ci:0.2
# before_script:
# - apt-get update
# - apt-get --yes install libeccodes0
# - pip freeze
# script:
# - tox -e py36 -e docs
script:
# - apk --no-cache add py2-pip python-dev
# - apk --no-cache add fontconfig fontconfig-dev
# - apk --no-cache add font-noto
# - apk --no-cache add graphviz graphviz-dev
# - apk --no-cache add py-pygraphviz py2-gv graphviz-graphs graphviz-gtk
# - pip install sphinx
# - pip install sphinxcontrib-plantuml
# - pip install sphinx-rtd-theme
# - apk --no-cache add make
##
# - echo deb http://archive.ubuntu.com/ubuntu/ xenial main restricted >> /etc/apt/sources.list.d/repo.list
# - echo deb http://security.ubuntu.com/ubuntu xenial-security main restricted >> /etc/apt/sources.list.d/repo.list
# - echo deb http://archive.ubuntu.com/ubuntu/ xenial-updates main restricted >> /etc/apt/sources.list.d/repo.list
# - apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 40976EAF437D05B5
# - apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3B4FE6ACC0B21F32
# - apt-get update
# - apt-cache policy
# - apt-get --yes install graphviz
# - apt-get --yes install libeccodes0
# - pip freeze
# - pip install sphinx
# - pip install sphinxcontrib-plantuml
# - pip install graphviz
# - pip install 'pyproj<3'
# - pip install cython
# - pip install numpy
# - pip install pandas
- python setup.py install
- cd docs
- make html
......@@ -108,6 +75,20 @@ pages:
only:
- LSCE
# Generate figures and artifacts for the website
article:
stage: test
image: pycif/pycif-debug:0.1
before_script:
- apt-get update
- pip freeze
script:
- python setup.py install
- pytest -s -m "(dummy and article and inversion and not adjtltest) or (fwd and ref_config)" --html reports/pytest.html --self-contained-html ./
only:
- general_transforms
# Check the code quality using the Code-Quality template
# code_quality:
# except:
......@@ -129,6 +110,7 @@ tests:
- mkdir -p coverage
- xmlstarlet sel -t -v "//coverage/@line-rate" reports/coverage.xml > coverage/.current_coverage
- echo 'TOTAL COVERAGE:'" $(cat coverage/.current_coverage)%"
- cp -r examples configs_artifacts
coverage: '/^TOTAL COVERAGE: ([0-9\.]+\%)$/'
artifacts:
when: always
......@@ -136,8 +118,9 @@ tests:
- reports/pytest*.html
- reports/coverage/
- coverage/.current_coverage
except:
- LSCE
- config_artifacts
# Check the code format using flake8
# code_format:
......
verbose: 2
logfile: pycif.logtest
workdir: /home/satellites13/aberchet/cif_paper/simulations_20210323/test_integration_inversion_dum8
workdir: /homel/aberchet/test_article/simulations_20210325/test_integration_inversion_dum2
datei: 2010-01-01
datef: 2010-01-05 00:00:00
mode:
minimizer:
df1: 0.01
epsg: 0.02
maxiter: 5
nsim: 5
maxiter: 10
nsim: 10
plugin:
name: M1QN3
version: std
......@@ -30,12 +30,12 @@ model:
chemistry:
acspecies:
CH4: null
file_pg: /home/users/aberchet/CIF/model_sources/dummy_gauss/Pasquill-Gifford.txt
file_pg: /homel/aberchet/Projects/cif/model_sources/dummy_gauss/Pasquill-Gifford.txt
plugin:
name: dummy
version: std
obsvect:
dir_obsvect: /home/satellites13/aberchet/cif_paper/simulations_20210323/test_integration_inversion_dum8/../ref_obsvect/
dir_obsvect: /homel/aberchet/test_article/simulations_20210325/test_integration_inversion_dum2/../ref_obsvect/
dump_type: nc
plugin:
name: standard
......@@ -45,9 +45,9 @@ datavect:
concs:
parameters:
CH4:
duration: 2H
frequency: 1H22min
nstations: 50
duration: 4H13min
frequency: 3H22min
nstations: 5
plugin:
name: random
type: measurements
......@@ -64,7 +64,6 @@ datavect:
- 6
- 9
- 12
- 15
bands_j:
- 0
- 3
......@@ -73,10 +72,6 @@ datavect:
- 12
- 15
- 18
- 21
- 24
- 27
- 30
err: 1
errtype: max
flx_formula:
......@@ -96,7 +91,7 @@ datavect:
square: null
variable: zlon
hcorrelations:
dircorrel: /home/satellites13/aberchet/cif_paper/simulations_20210323/test_integration_inversion_dum8/datavect/
dircorrel: /homel/aberchet/test_article/simulations_20210325/test_integration_inversion_dum2/datavect/
dump_hcorr: true
evalmin: 0
landsea: false
......@@ -122,8 +117,8 @@ datavect:
name: standard
version: std
domain:
nlat: 15
nlon: 30
nlat: 12
nlon: 18
plugin:
name: dummy
version: std
......@@ -133,5 +128,5 @@ domain:
ymin: 0
platform:
plugin:
name: LSCE
version: obelix
name: docker
version: cif
verbose: 2
logfile: pycif.logtest
workdir: /homel/aberchet/test_article/simulations_20210324/test_integration_inversion_dum0
workdir: /homel/aberchet/test_article/simulations_20210325/test_integration_inversion_dum0
datei: 2010-01-01
datef: 2010-01-05 00:00:00
mode:
minimizer:
df1: 0.01
epsg: 0.02
maxiter: 10
nsim: 10
maxiter: 25
nsim: 25
plugin:
name: M1QN3
version: std
......@@ -35,7 +35,7 @@ model:
name: dummy
version: std
obsvect:
dir_obsvect: /homel/aberchet/test_article/simulations_20210324/test_integration_inversion_dum0/../ref_obsvect/
dir_obsvect: /homel/aberchet/test_article/simulations_20210325/test_integration_inversion_dum0/../ref_obsvect/
dump_type: nc
plugin:
name: standard
......@@ -45,8 +45,8 @@ datavect:
concs:
parameters:
CH4:
duration: 2H
frequency: 1H22min
duration: 4H13min
frequency: 3H22min
nstations: 5
plugin:
name: random
......@@ -77,7 +77,7 @@ datavect:
square: null
variable: zlon
hcorrelations:
dircorrel: /homel/aberchet/test_article/simulations_20210324/test_integration_inversion_dum0/datavect/
dircorrel: /homel/aberchet/test_article/simulations_20210325/test_integration_inversion_dum0/datavect/
dump_hcorr: true
evalmin: 0
landsea: false
......@@ -103,8 +103,8 @@ datavect:
name: standard
version: std
domain:
nlat: 15
nlon: 30
nlat: 12
nlon: 18
plugin:
name: dummy
version: std
......
verbose: 2
logfile: pycif.logtest
workdir: /home/satellites13/aberchet/cif_paper/simulations_20210324/test_integration_inversion_dum1
workdir: /homel/aberchet/test_article/simulations_20210325/test_integration_inversion_dum1
datei: 2010-01-01
datef: 2010-01-05 00:00:00
mode:
minimizer:
df1: 0.01
epsg: 0.02
maxiter: 10
nsim: 10
maxiter: 25
nsim: 25
plugin:
name: congrad
version: std
......@@ -30,12 +30,12 @@ model:
chemistry:
acspecies:
CH4: null
file_pg: /home/users/aberchet/CIF/model_sources/dummy_gauss/Pasquill-Gifford.txt
file_pg: /homel/aberchet/Projects/cif/model_sources/dummy_gauss/Pasquill-Gifford.txt
plugin:
name: dummy
version: std
obsvect:
dir_obsvect: /home/satellites13/aberchet/cif_paper/simulations_20210324/test_integration_inversion_dum1/../ref_obsvect/
dir_obsvect: /homel/aberchet/test_article/simulations_20210325/test_integration_inversion_dum1/../ref_obsvect/
dump_type: nc
plugin:
name: standard
......@@ -45,8 +45,8 @@ datavect:
concs:
parameters:
CH4:
duration: 2H
frequency: 1H22min
duration: 4H13min
frequency: 3H22min
nstations: 5
plugin:
name: random
......@@ -77,7 +77,7 @@ datavect:
square: null
variable: zlon
hcorrelations:
dircorrel: /home/satellites13/aberchet/cif_paper/simulations_20210324/test_integration_inversion_dum1/datavect/
dircorrel: /homel/aberchet/test_article/simulations_20210325/test_integration_inversion_dum1/datavect/
dump_hcorr: true
evalmin: 0
landsea: false
......@@ -103,8 +103,8 @@ datavect:
name: standard
version: std
domain:
nlat: 15
nlon: 30
nlat: 12
nlon: 18
plugin:
name: dummy
version: std
......@@ -114,5 +114,5 @@ domain:
ymin: 0
platform:
plugin:
name: LSCE
version: obelix
name: docker
version: cif
verbose: 2
logfile: pycif.logtest
workdir: /homel/aberchet/pytest/test_integration_adjtltest_dum25
datei: 2010-01-01
datef: 2010-01-05 00:00:00
mode:
increments: 0.2
incrmode: cst
plugin:
name: adj-tl_test
version: std
testspace: chi
controlvect:
plugin:
name: standard
version: std
save_out_netcdf: true
transform_pipe:
trans1:
component: fluxes
parameter_out: CH4
parameters_in:
- CH4_ref
- CH4_perturb
plugin:
name: families
type: transform
version: std
model:
chemistry:
acspecies:
CH4: null
MCF: null
file_pg: /homel/aberchet/Projects/cif/model_sources/dummy_gauss/Pasquill-Gifford.txt
plugin:
name: dummy
version: std
obsvect:
dir_obsvect: /homel/aberchet/pytest/test_integration_adjtltest_dum25/../ref_obsvect/
dump_type: nc
plugin:
name: standard
version: std
datavect:
components:
concs:
parameters:
CH4:
duration: 4H13min
frequency: 3H22min
nstations: 5
plugin:
name: random
type: measurements
version: param
random_subperiod_shift: true
seed: true
zmax: 100
MCF:
duration: 5H
frequency: 4H33min
nstations: 10
plugin:
name: random
type: measurements
version: param
random_subperiod_shift: true
seed: true
seed_id: 100
zmax: 100
fluxes:
parameters:
CH4_perturb:
err: 1
errtype: max
flx_formula:
- sum:
- cos: null
period: 200
variable: zlat
- period: 300
sin: null
variable: zlon
hcorrelations: &id001
dircorrel: /homel/aberchet/pytest/test_integration_adjtltest_dum25/datavect/
dump_hcorr: true
evalmin: 0
landsea: false
sigma: 500
hresol: hpixels
nlev: 1
period: 5D
plugin: &id002
name: dummy
type: fluxes
version: txt
tcorrelations: &id003
sigma_t: 12
vresol: vpixels
xb_scale: 0.2
CH4_ref:
err: 1
errtype: max
flx_formula:
- product:
- sum:
- cos: null
period: 500
variable: zlat
- period: 1000
sin: null
variable: zlon
- sum:
- period: 1000
square: null
variable: zlat
- period: 1000
square: null
variable: zlon
hcorrelations: *id001
hresol: hpixels
nlev: 1
period: 5D
plugin: *id002
tcorrelations: *id003
vresol: vpixels
MCF:
err: 1
errtype: max
flx_formula:
- product:
- sum:
- cos: null
period: 100
variable: zlat
- period: 200
sin: null
variable: zlon
- sum:
- period: 500
square: null
variable: zlat
- period: 600
square: null
variable: zlon
hcorrelations:
dircorrel: /homel/aberchet/pytest/test_integration_adjtltest_dum25/datavect/
dump_hcorr: true
evalmin: 0
landsea: false
sigma: 500
hresol: hpixels
nlev: 1
period: 5D
plugin:
name: dummy
type: fluxes
version: txt
vresol: vpixels
meteo:
plugin:
name: dummy
type: meteo
version: csv
resolution: 1H
seed: true
plugin:
name: standard
version: std
domain:
nlat: 15
nlon: 30
plugin:
name: dummy
version: std
xmax: 2500
xmin: 0
ymax: 2000
ymin: 0
verbose: 2
logfile: pycif.logtest
workdir: /homel/aberchet/pytest/test_integration_adjtltest_dum24
datei: 2010-01-01
datef: 2010-01-05 00:00:00
mode:
increments: 0.2
incrmode: cst
plugin:
name: adj-tl_test
version: std
testspace: control
controlvect:
plugin:
name: standard
version: std
save_out_netcdf: true
transform_pipe:
trans1:
component: fluxes
parameter_out: CH4
parameters_in:
- CH4_ref
- CH4_perturb
plugin:
name: families
type: transform
version: std
model:
chemistry:
acspecies:
CH4: null
MCF: null
file_pg: /homel/aberchet/Projects/cif/model_sources/dummy_gauss/Pasquill-Gifford.txt
plugin:
name: dummy
version: std
obsvect:
dir_obsvect: /homel/aberchet/pytest/test_integration_adjtltest_dum24/../ref_obsvect/
dump_type: nc
plugin:
name: standard
version: std
datavect:
components:
concs:
parameters:
CH4:
duration: 4H13min
frequency: 3H22min
nstations: 5
plugin:
name: random
type: measurements
version: param
random_subperiod_shift: true
seed: true
zmax: 100
MCF:
duration: 5H
frequency: 4H33min
nstations: 10
plugin:
name: random
type: measurements
version: param
random_subperiod_shift: true
seed: true
seed_id: 100
zmax: 100
fluxes:
parameters:
CH4_perturb:
err: 1
errtype: max
flx_formula:
- sum:
- cos: null
period: 200
variable: zlat
- period: 300
sin: null
variable: zlon
hcorrelations: &id001
dircorrel: /homel/aberchet/pytest/test_integration_adjtltest_dum24/datavect/
dump_hcorr: true
evalmin: 0
landsea: false
sigma: 500
hresol: hpixels
nlev: 1
period: 5D
plugin: &id002
name: dummy
type: fluxes
version: txt
tcorrelations: &id003
sigma_t: 12
vresol: vpixels
xb_scale: 0.2
CH4_ref:
err: 1
errtype: max
flx_formula:
- product:
- sum:
- cos: null
period: 500
variable: zlat
- period: 1000
sin: null
variable: zlon
- sum:
- period: 1000
square: null
variable: zlat
- period: 1000
square: null
variable: zlon
hcorrelations: *id001
hresol: hpixels
nlev: 1
period: 5D
plugin: *id002