-
Notifications
You must be signed in to change notification settings - Fork 4
/
tox.ini
250 lines (193 loc) · 5.29 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
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
[tox]
envlist = isort, black, flake8, mypy, safety, notebooks, py3{8,9,10}
[gh-actions]
python =
3.8: py38
3.9: py39
3.10: isort, black, flake8, safety, examples, py310
[testenv]
deps=
pytest
pytest-cov
pytest-raises
commands =
pytest --cov=combine_notebooks --cov-report=xml
[testenv:notebooks]
deps=
nbmake
commands =
pytest --nbmake {toxinidir}/notebooks/example_biopax.ipynb
pytest --nbmake {toxinidir}/notebooks/example_cellml.ipynb
pytest --nbmake {toxinidir}/notebooks/example_sbml_antimony.ipynb
pytest --nbmake {toxinidir}/notebooks/example_sbml_libsbml.ipynb
pytest --nbmake {toxinidir}/notebooks/example_sbml_sbmlutils.ipynb
pytest --nbmake {toxinidir}/notebooks/example_sedml.ipynb
# Skipping; see https://github.com/combine-org/combine-notebooks/issues/26
#pytest --nbmake {toxinidir}/notebooks/example_sbgn.ipynb
#pytest --nbmake {toxinidir}/notebooks/example_omex.ipynb
#pytest --nbmake {toxinidir}/notebooks/sbgn.ipynb
#pytest --nbmake {toxinidir}/notebooks/omex.ipynb
pytest --nbmake {toxinidir}/notebooks/cellml.ipynb
pytest --nbmake {toxinidir}/notebooks/neuroml.ipynb
pytest --nbmake {toxinidir}/notebooks/sbml.ipynb
pytest --nbmake {toxinidir}/notebooks/sedml.ipynb
[testenv:isort]
skip_install = True
deps=
isort
commands=
isort --check-only --diff {toxinidir}/src/combine_notebooks {toxinidir}/setup.py {toxinidir}/tests
[testenv:black]
skip_install = True
deps=
black
commands=
black --check --diff {toxinidir}/src/combine_notebooks {toxinidir}/setup.py {toxinidir}/tests
[testenv:flake8]
skip_install = True
deps=
flake8
flake8-docstrings
flake8-bugbear
commands=
flake8 {toxinidir}/src/combine_notebooks {toxinidir}/setup.py {toxinidir}/tests --extend-ignore=F401,F403,F405,E501,D100 --exclude={toxinidir}/src/combine_notebooks/examples/example_sbol.py
# F401 : module imported but unused
# F403 : 'from .x import *' used; unable to detect undefined names
# F405 : name may be undefined, or defined from star imports: module
# E501 : line too long
# D100 : not working in notebook conversion
[testenv:mypy]
skip_install = True
deps=
mypy
commands=
mypy {toxinidir}/src/combine_notebooks {toxinidir}/setup.py {toxinidir}/tests --config-file tox.ini
[testenv:safety]
deps=
safety
commands=
safety check --full-report -i 59234
[testenv:install]
skip_install = True
deps=
build
twine
commands=
pip check {toxinidir}
python -m build {toxinidir}
twine check {toxinidir}/dist/*
################################################################################
# Testing tools configuration #
################################################################################
[pytest]
testpaths =
tests
markers =
raises
commands=
[coverage:paths]
source =
src/combine_notebooks
*/site-packages/combine_notebooks
[coverage:run]
branch = true
parallel = true
[coverage:report]
exclude_lines =
# Have to re-enable the standard pragma
pragma: no cover
precision = 2
[isort]
skip = __init__.py
profile = black
lines_after_imports = 2
known_first_party = combine_notebooks
known_third_party =
pyomexmeta
requests
[flake8]
exclude =
__init__.py
max-line-length = 88
# The following conflict with `black` which is the more pedantic.
ignore =
E203
W503
D202
[mypy]
# mypy src/combine_notebooks --config-file tox.ini
warn_return_any = True
follow_imports = silent
disallow_untyped_defs = True
disallow_incomplete_defs = True
exclude = example_sbol.py
[mypy-pytest.*]
ignore_missing_imports = True
[mypy-pydantic.*]
ignore_missing_imports = True
[mypy-requests.*]
ignore_missing_imports = True
[mypy-libcombine.*]
ignore_missing_imports = True
[mypy-pronto.*]
ignore_missing_imports = True
[mypy-rich.*]
ignore_missing_imports = True
[mypy-sbmlutils.*]
ignore_missing_imports = True
[mypy-libsbml.*]
ignore_missing_imports = True
[mypy-antimony.*]
ignore_missing_imports = True
[mypy-numpy.*]
ignore_missing_imports = True
[mypy-jinja2.*]
ignore_missing_imports = True
[mypy-zeep.*]
ignore_missing_imports = True
[mypy-xmltodict.*]
ignore_missing_imports = True
[mypy-nbformat.*]
ignore_missing_imports = True
[mypy-pyneuroml.*]
ignore_missing_imports = True
[mypy-neuroml.*]
ignore_missing_imports = True
[mypy-libcellml.*]
ignore_missing_imports = True
[mypy-nbmake.*]
ignore_missing_imports = True
[mypy-utilities.*]
ignore_missing_imports = True
[mypy-libsedml.*]
ignore_missing_imports = True
[mypy-libsbgnpy.validation.validator.*]
ignore_missing_imports = True
[mypy-pymetadata.console.*]
ignore_missing_imports = True
[mypy-pymetadata.omex.*]
ignore_missing_imports = True
[mypy-libsbgnpy.libsbgn.*]
ignore_missing_imports = True
[mypy-libsbgnpy.*]
ignore_missing_imports = True
[mypy-libsbgnpy.libsbgnTypes.*]
ignore_missing_imports = True
[mypy-IPython.*]
ignore_missing_imports = True
[mypy-tellurium.*]
ignore_missing_imports = True
[mypy-basico.*]
ignore_missing_imports = True
[mypy-sbol3.*]
ignore_missing_imports = True
[mypy-sbol-utilities.*]
ignore_missing_imports = True
[mypy-IPython.croe.display.*]
ignore_missing_imports = True
[mypy-IPython.display.*]
ignore_missing_imports = True
[mypy-pygments.*]
ignore_missing_imports = True
[mypy-pybiopax.*]
ignore_missing_imports = True