-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
183 lines (163 loc) · 3.7 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
[tox]
envlist = py36,py37,py38,py39,py310,pypy3.6
[testenv]
whitelist_externals =
find
sed
deps =
pytest>=6.0
contexttimer>=0.3
brunns-builder>=0.5
commands =
{posargs:py.test}
[testenv:coverage]
envlist = py39
deps =
{[testenv]deps}
pytest-cov
commands =
pytest --cov {envsitepackagesdir}/brunns/matchers --durations=10 --cov-report term-missing --cov-fail-under 100 --basetemp={envtmpdir} {posargs}
[testenv:publish-coverage]
envlist = py39
passenv = TRAVIS TRAVIS_* CODACY_*
deps =
{[testenv:coverage]deps}
codacy-coverage>=1.0
commands =
pytest --cov {envsitepackagesdir}/brunns/matchers --cov-report xml --basetemp={envtmpdir} {posargs}
sed -i 's/\/home\/travis\/build\/brunns\/brunns-matchers\/.tox\/publish-coverage\/lib\/python3..\/site-packages/src/g' coverage.xml
python-codacy-coverage -r coverage.xml
[coverage:run]
branch = True
omit = */matcher.py, src/brunns/matchers/__init__.py
[testenv:flake8]
basepython = python3
skip_install = true
deps =
flake8>=3.0
flake8-bugbear>=18.0
flake8-comprehensions>=1.0
flake8-mutable>=1.0
mccabe>=0.6
flake8-blind-except>=0.1
flake8-builtins>=1.0
flake8-pep3101>=1.0
flake8-print>=3.0
flake8-string-format>=0.2
flake8-logging-format>=0.5
flake8-colors>=0.1
# flake8-tidy-imports>=1.0
commands =
flake8 --version
flake8 src/ tests/ setup.py
[flake8]
max-complexity = 5
max-line-length = 120
show-source = True
enable-extensions = M,B,C,T,P
ignore = C812,W503,P103,E1,E2,E3,E5,E731
statistics = True
[testenv:bandit]
basepython = python3
skip_install = true
deps =
bandit>=1.4
commands =
bandit -r src/
[base]
; Needs to match as setup.py's install_requires. TODO - DRY.
deps =
furl>=2.0
pyhamcrest>=2.0
pytest>=6.0
beautifulsoup4>=4.0
brunns-row>=2.0
[testenv:pylint]
basepython = python3
skip_install = true
deps =
pylint>=2.2
{[testenv]deps}
{[base]deps}
commands =
pylint --disable=C src/
[testenv:pipdeptree]
basepython = python3
deps =
pipdeptree
commands =
pipdeptree
usedevelop=False
[testenv:pydeps]
basepython = python3
deps =
pydeps
commands =
pydeps src/brunns --cluster --rmprefix brunns.
usedevelop=False
[testenv:mutmut]
basepython = python3
extras =
test
deps =
mutmut
commands =
mutmut {posargs}
[testenv:mypy]
basepython = python3
skip_install = true
deps =
mypy==0.910
types-requests
{[testenv]deps}
{[base]deps}
commands =
mypy src/ {posargs}
[testenv:safety]
basepython = python3
deps =
safety>=1.8
commands =
safety check
usedevelop=False
[testenv:piprot]
basepython = python3
skip_install = true
deps =
piprot>=0.9
commands =
pip freeze | piprot
[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 -tpy36 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 -tpy36 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
deps =
sphinx>=3.0
sphinx-autodoc-typehints>=1.10
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"))'