-
Notifications
You must be signed in to change notification settings - Fork 14
/
tox.ini
199 lines (177 loc) · 3.68 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
[tox]
envlist = py38,py39,py310,py311,py312,pypy3.10
[testenv]
deps =
pytest-docker~=3.1
allowlist_externals =
find
sed
bash
extras =
test
commands =
{posargs:py.test} tests/unit/ tests/integration/ -o log_cli=true
passenv =
GITHUB_*
MBTEST_*
usedevelop=True
[testenv:coverage]
envlist = py312
extras =
test
coverage
commands =
pytest --cov {envsitepackagesdir}/mbtest --durations=10 --cov-report term-missing --cov-fail-under 100 --basetemp={envtmpdir} {posargs}
usedevelop=False
[testenv:publish-coverage]
envlist = py312
passenv = CODACY_*
extras =
test
coverage
commands =
pytest --cov {envsitepackagesdir}/mbtest --cov-report xml --cov-fail-under 100 --basetemp={envtmpdir} {posargs}
sed -i 's/\/home\/travis\/build\/brunns\/mbtest\/.tox\/publish-coverage\/lib\/python3..\/site-packages/src/g' coverage.xml
bash -c "python-codacy-coverage -r coverage.xml || true"
usedevelop=False
[coverage:run]
branch = True
omit = */matcher.py
[testenv:flake8]
basepython = python3
skip_install = true
deps =
flake8~=7.0
flake8-comprehensions~=3.0
flake8-mutable~=1.0
mccabe~=0.7
flake8-blind-except~=0.2
flake8-builtins~=2.0
flake8-pep3101~=1.0
flake8-print~=5.0
flake8-string-format~=0.3
flake8-colors~=0.1
commands =
flake8 src/ tests/
[flake8]
max-complexity = 5
max-line-length = 120
show-source = True
enable-extensions = M,C
ignore = A005,C812,W503,P103,E1,E2,E3,E5,E731
statistics = True
[testenv:bandit]
basepython = python3
skip_install = true
deps =
bandit~=1.5
commands =
bandit -r src/
[testenv:pylint]
basepython = python3
extras =
test
install
deps =
pylint~=2.2
commands =
pylint --disable=C src/
[testenv:refurb]
basepython = python3
deps =
refurb>=1.0
commands =
refurb src/ {posargs}
usedevelop=False
[testenv:mypy]
basepython = python3
skip_install = false
extras =
test
install
deps =
mypy~=0.942
types-requests
commands =
mypy src/ {posargs}
[testenv:pyright]
basepython = python3
skip_install = false
extras =
test
install
deps =
pyright==1.1.274
types-requests
commands =
pyright src/ {posargs}
[testenv:pipdeptree]
basepython = python3
deps =
pipdeptree
commands =
pipdeptree
usedevelop=False
[testenv:pydeps]
basepython = python3
deps =
pydeps
commands =
pydeps src/mbtest --cluster --rmprefix mbtest.
usedevelop=False
[testenv:mutmut]
basepython = python3
extras =
test
deps =
mutmut
commands =
mutmut {posargs}
[testenv:mutmut-single]
allowlist_externals =
rm
killall
commands_post =
- rm -r .mbdb
- killall node
[testenv:piprot]
basepython = python3
deps =
piprot
commands =
piprot
usedevelop=False
[testenv:format]
basepython = python3
skip_install = true
deps =
black>=22.1
isort>=5.0
commands =
isort {toxinidir}/setup.py
isort {toxinidir}/src/
isort {toxinidir}/tests/
black -l100 -tpy38 src/ tests/ setup.py
[testenv:check-format]
basepython = python3
skip_install = true
deps = {[testenv:format]deps}
commands =
isort --check-only {toxinidir}/setup.py
isort --check-only {toxinidir}/src/
isort --check-only {toxinidir}/tests/
black --check -l100 -tpy38 src/ tests/ setup.py
[tool:isort]
multi_line_output=3
include_trailing_comma=True
force_grid_wrap=0
use_parentheses=True
line_length=100
[testenv:docs]
description = Invoke sphinx-build to build the HTML docs
basepython = python3
extras =
install
docs
commands = sphinx-build docs "{toxinidir}/build_docs" --color -W -bhtml {posargs}
python -c 'import pathlib; print("documentation available under file://\{0\}".format(pathlib.Path(r"{toxinidir}") / "build_docs" / "index.html"))'