forked from ICB-DCM/pyPESTO
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
164 lines (145 loc) · 4.08 KB
/
tox.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
# tox (https://tox.readthedocs.io/) is a tool for running tests
# in multiple virtualenvs. This configuration file will run the
# test suite on all supported python versions. To use it, "pip install tox"
# and then run "tox" from this directory.
# See https://tox.readthedocs.io/en/latest/config.html for reference.
[tox]
# Environments run by default and in this order
# unless specified via CLI -eENVLIST
# or environment variable TOXENV
envlist =
clean
# tests
base
petab
optimize
hierarchical
select
# quality
project
flake8
doc
size
# notebooks
notebooks1
notebooks2
# Base-environment
[testenv]
passenv = AMICI_PARALLEL_COMPILE,CC,CXX,MPLBACKEND
# Sub-environments
# inherit settings defined in the base
[testenv:clean]
skip_install = true
allowlist_externals =
rm
deps = coverage
commands =
coverage erase
rm -rf .coverage*
rm -rf coverage.xml
description =
Clean up before tests
# Unit tests
[testenv:base]
extras = test,test_petab,amici,petab,emcee,dynesty,mltools,aesara,pymc,jax,fides,roadrunner
deps =
git+https://github.com/Benchmarking-Initiative/Benchmark-Models-PEtab.git@master\#subdirectory=src/python
git+https://github.com/PEtab-dev/petab_test_suite@main
commands =
pytest --cov=pypesto --cov-report=xml --cov-append \
test/base --durations=0 \
test/profile --durations=0 \
test/sample --durations=0 \
test/visualize --durations=0
description =
Test basic functionality
[testenv:windows]
extras = test
deps =
numpy < 2.0
commands =
pytest \
test/base/test_prior.py \
test/base/test_problem.py \
test/base/test_workflow.py
description =
Test basic functionality on Windows
[testenv:petab]
extras = test,amici,petab,pyswarm,roadrunner
deps =
git+https://github.com/Benchmarking-Initiative/Benchmark-Models-PEtab.git@master\#subdirectory=src/python
git+https://github.com/AMICI-dev/amici.git@develop\#egg=amici&subdirectory=python/sdist
commands =
python3 -m pip install git+https://github.com/PEtab-dev/petab_test_suite@main
python3 -m pip install git+https://github.com/pysb/pysb@master
python3 -m pip install -U copasi-basico[petab]
python3 -m pip install -U sympy
pytest --cov=pypesto --cov-report=xml --cov-append \
test/petab
description =
Test PEtab functionality
[testenv:julia]
extras = test,julia
commands =
python -c "import julia; julia.install()"
python-jl -m pytest --cov=pypesto --cov-report=xml --cov-append \
test/julia
description =
Test Julia interface
[testenv:optimize]
extras = test,dlib,ipopt,pyswarm,cma,nlopt,fides,mpi,pyswarms,petab
deps =
numpy < 2.0
commands =
pytest --cov=pypesto --cov-report=xml --cov-append \
test/optimize
description =
Test optimization module
[testenv:hierarchical]
extras = test,petab,amici,fides
deps =
git+https://github.com/Benchmarking-Initiative/Benchmark-Models-PEtab.git@master\#subdirectory=src/python
commands =
# workaround as ipopt has incomplete build
pytest --cov=pypesto --cov-report=xml --cov-append \
test/hierarchical
description =
Test hierarchical optimization module
[testenv:select]
extras = test,amici,petab,select
commands =
pytest --cov=pypesto --cov-report=xml --cov-append \
test/select
description =
Test model selection functionality
[testenv:notebooks1]
allowlist_externals = bash
extras = example,amici,petab,pyswarms,pymc3,cma,nlopt,fides,roadrunner
commands =
bash test/run_notebook.sh 1
description =
Run notebooks 1
[testenv:notebooks2]
allowlist_externals = bash
extras = example,amici,petab,pymc,emcee,dynesty,select
commands =
bash test/run_notebook.sh 2
description =
Run notebooks 2
# Management, docs
[testenv:doc]
extras =
doc,amici,petab,aesara,jax,select,roadrunner
deps =
numpy < 2.0
commands =
sphinx-build -W -b html doc/ doc/_build/html
description =
Test whether docs build passes
[testenv:size]
skip_install = true
allowlist_externals = bash
commands =
bash test/check_git_size.sh
description =
Check repository size