forked from ICB-DCM/pyPESTO
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
175 lines (155 loc) · 4.16 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
165
166
167
168
169
170
171
172
173
174
175
# 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]
# 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
deps =
git+https://github.com/Benchmarking-Initiative/Benchmark-Models-PEtab.git@master\#subdirectory=src/python
commands =
pytest --cov=pypesto --cov-report=xml --cov-append \
test/base \
test/profile \
test/sample \
test/visualize \
-s
description =
Test basic functionality
[testenv:petab]
extras = test,test_petab,amici,petab,pyswarm
deps =
git+https://github.com/Benchmarking-Initiative/Benchmark-Models-PEtab.git@master\#subdirectory=src/python
commands =
# install pysb
pip install \
git+https://github.com/pysb/pysb.git@5cbb147527814770ffc42e8e7d96e91dcb2b9857#egg=pysb
pytest --cov=pypesto --cov-report=xml --cov-append \
test/petab -s
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 -s
description =
Test Julia interface
[testenv:optimize]
extras = test,dlib,pyswarm,cmaes,nlopt,fides,mpi,pyswarms,petab
commands =
# workaround as ipopt has incomplete build
pip install git+https://github.com/mechmotum/cyipopt.git@master
pytest --cov=pypesto --cov-report=xml --cov-append \
test/optimize -s
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 -s
description =
Test hierarchical optimization module
[testenv:select]
extras = test,amici,petab,select
commands =
pytest --cov=pypesto --cov-report=xml --cov-append \
test/select -s
description =
Test model selection functionality
[testenv:notebooks1]
allowlist_externals = bash
extras = example,amici,petab,pyswarm,pymc3,cmaes,nlopt,fides
commands =
# workaround as ipopt has incomplete build
pip install git+https://github.com/mechmotum/cyipopt.git@master
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
# Style, management, docs
[testenv:project]
skip_install = true
deps =
pyroma
commands =
pyroma --min=10 .
description =
Check the package friendliness
[testenv:flake8]
skip_install = true
deps =
flake8 >= 5.0.4
flake8-bandit >= 4.1.1
flake8-bugbear >= 22.8.23
flake8-colors >= 0.1.9
flake8-comprehensions >= 3.10.0
flake8-print >= 5.0.0
flake8-black >= 0.3.3
flake8-isort >= 4.0.2
flake8-docstrings >= 1.6.0
commands =
flake8 pypesto test
description =
Run flake8 with various plugins.
[testenv:doc]
extras =
doc,amici,petab
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