forked from ICB-DCM/pyPESTO
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
145 lines (127 loc) · 3.23 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
# 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
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,amici,petab,emcee,mltools,aesara
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
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: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: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,pymc3,emcee,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 >= 3.8.3
flake8-bandit >= 2.1.2
flake8-bugbear >= 20.1.4
flake8-colors >= 0.1.6
# flake8-commas >= 2.0.0
flake8-comprehensions >= 3.2.3
flake8-print >= 5.0.0
flake8-docstrings >= 1.6.0
commands =
flake8 pypesto test setup.py
description =
Run flake8 with various plugins.
[testenv:doc]
extras =
doc
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