forked from matthiaskoenig/sbmlutils
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
161 lines (135 loc) · 3.15 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
[tox]
envlist = isort, black, flake8, mypy, docs, safety, py3{7,8,9}
[gh-actions]
python =
3.7: py37
3.8: isort, black, flake8, mypy, safety, py38
3.9: py39
[testenv]
deps=
pytest
pytest-cov
pytest-raises
commands =
pytest --cov=sbmlutils --cov-report=term --cov-report=xml
[testenv:isort]
skip_install = True
deps=
isort >=5.5,<6
commands=
isort --check-only --diff {toxinidir}/src/sbmlutils {toxinidir}/setup.py
[testenv:black]
skip_install = True
deps=
black
commands=
black --check --diff {toxinidir}/src/sbmlutils {toxinidir}/setup.py
[testenv:flake8]
skip_install = True
deps=
flake8
flake8-docstrings
flake8-bugbear
commands=
flake8 {toxinidir}/src/sbmlutils {toxinidir}/setup.py --exclude=test --extend-ignore=E501,F401,F403,F405,D107
# D107 Missing docstring in __init__
# 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 (handled by black)
[testenv:docs]
description = invoke sphinx-build to build the HTML docs
basepython = python3.8
extras = docs
deps=
sphinx>=3.4.3
ipykernel>=5.4.3
nbsphinx>=0.8.1
sphinx_rtd_theme>=0.5.1
pypandoc>=1.5
sphinx-autoapi>=1.7.0
commands=sphinx-build {toxinidir}/docs_builder {toxinidir}/docs_builder/_build -bhtml
[testenv:mypy]
skip_install = True
deps=
mypy
commands=
mypy {toxinidir}/src/sbmlutils {toxinidir}/setup.py --config-file tox.ini
[testenv:safety]
deps=
safety
commands=
safety check --full-report
################################################################################
# Testing tools configuration #
################################################################################
[pytest]
testpaths =
src/sbmlutils/test
markers =
raises
[coverage:paths]
source =
src/sbmlutils
*/site-packages/sbmlutils
[coverage:run]
branch = true
parallel = true
omit =
*/sbmlutils/test/*
[coverage:report]
exclude_lines =
# Have to re-enable the standard pragma
pragma: no cover
precision = 2
omit =
*/sbmlutils/test/*
[isort]
skip = __init__.py
line_length = 88
indent = 4
multi_line_output = 3
include_trailing_comma = true
force_grid_wrap = 0
use_parentheses = true
lines_after_imports = 2
known_first_party = sbmlutils
known_third_party =
libsbml
numpy
pandas
pytest
pytest-cov
roadrunner
antimony
[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/sbmlutils --config-file tox.ini
warn_return_any = True
follow_imports = silent
disallow_untyped_defs = True
disallow_incomplete_defs = True
[mypy-libsbml.*]
ignore_missing_imports = True
[mypy-pandas.*]
ignore_missing_imports = True
[mypy-pytest.*]
ignore_missing_imports = True
[mypy-numpy.*]
ignore_missing_imports = True
[mypy-roadrunner.*]
ignore_missing_imports = True
[mypy-cobra.*]
ignore_missing_imports = True
[mypy-sympy.*]
ignore_missing_imports = True
[mypy-matplotlib.*]
ignore_missing_imports = True