-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
tox.ini
272 lines (253 loc) · 7.81 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
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
# This file is managed by 'repo_helper'.
# You may add new sections, but any changes made to the following sections will be lost:
# * tox
# * envlists
# * testenv
# * testenv:.package
# * testenv:py313-dev
# * testenv:py313
# * testenv:py312-dev
# * testenv:py312
# * testenv:docs
# * testenv:build
# * testenv:lint
# * testenv:perflint
# * testenv:mypy
# * testenv:pyup
# * testenv:coverage
# * flake8
# * coverage:run
# * coverage:report
# * check-wheel-contents
[tox]
envlist =
py36
py37
py38
py39
py310
py311
py312
py313
pypy36
pypy37
pypy38
mypy
build
skip_missing_interpreters = True
isolated_build = True
requires =
pip>=21,!=22.2
tox-envlist>=0.2.1
tox~=3.0
virtualenv!=20.16.0
[envlists]
test =
py36
py37
py38
py39
py310
py311
py312
py313
pypy36
pypy37
pypy38
qa = mypy, lint
cov = py37, coverage
raspi = py38, py39, mypy
[testenv]
setenv =
PYTHONDEVMODE=1
PIP_DISABLE_PIP_VERSION_CHECK=1
SETUPTOOLS_USE_DISTUTILS=stdlib
deps = -r{toxinidir}/tests/requirements.txt
extras = all
commands =
python --version
python -m pytest --cov=repo_helper -r aR tests/ {posargs}
[testenv:.package]
setenv =
PYTHONDEVMODE=1
PIP_DISABLE_PIP_VERSION_CHECK=1
[testenv:py313]
download = True
setenv =
PYTHONDEVMODE=1
PIP_DISABLE_PIP_VERSION_CHECK=1
UNSAFE_PYO3_SKIP_VERSION_CHECK=1
[testenv:py312]
download = True
setenv =
PYTHONDEVMODE=1
PIP_DISABLE_PIP_VERSION_CHECK=1
[testenv:docs]
setenv = SHOW_TODOS = 1
passenv = SPHINX_BUILDER
basepython = python3.8
changedir = {toxinidir}/doc-source
extras = all
deps = -r{toxinidir}/doc-source/requirements.txt
commands = sphinx-build -M {env:SPHINX_BUILDER:html} . ./build {posargs}
[testenv:build]
setenv =
PYTHONDEVMODE=1
PIP_DISABLE_PIP_VERSION_CHECK=1
PIP_PREFER_BINARY=1
UNSAFE_PYO3_SKIP_VERSION_CHECK=1
skip_install = True
changedir = {toxinidir}
deps =
build[virtualenv]>=0.3.1
check-wheel-contents>=0.1.0
twine>=3.2.0
cryptography<40; implementation_name == "pypy" and python_version <= "3.7"
commands =
python -m build --sdist --wheel "{toxinidir}"
twine check dist/*.tar.gz dist/*.whl
check-wheel-contents dist/
[testenv:lint]
basepython = python3.7
changedir = {toxinidir}
ignore_errors = True
skip_install = True
deps =
flake8>=3.8.2,<5
flake8-2020>=1.6.0
flake8-builtins>=1.5.3
flake8-docstrings>=1.5.0
flake8-dunder-all>=0.1.1
flake8-encodings>=0.1.0
flake8-github-actions>=0.1.0
flake8-noqa>=1.1.0,<=1.2.2
flake8-pyi>=20.10.0,<=22.8.0
flake8-pytest-style>=1.3.0,<2
flake8-quotes>=3.3.0
flake8-slots>=0.1.0
flake8-sphinx-links>=0.0.4
flake8-strftime>=0.1.1
flake8-typing-imports>=1.10.0
git+https://github.com/domdfcoding/flake8-rst-docstrings-sphinx.git
git+https://github.com/domdfcoding/flake8-rst-docstrings.git
git+https://github.com/python-formate/flake8-unused-arguments.git@magic-methods
git+https://github.com/python-formate/flake8-missing-annotations.git
pydocstyle>=6.0.0
pygments>=2.7.1
importlib_metadata<4.5.0; python_version<'3.8'
commands = python3 -m flake8_rst_docstrings_sphinx repo_helper tests --allow-toolbox {posargs}
[testenv:perflint]
basepython = python3.7
changedir = {toxinidir}
ignore_errors = True
skip_install = True
deps = perflint
commands = python3 -m perflint repo_helper {posargs}
[testenv:mypy]
basepython = python3.7
ignore_errors = True
changedir = {toxinidir}
extras = all
deps =
mypy==0.971
-r{toxinidir}/tests/requirements.txt
-r{toxinidir}/stubs.txt
commands = mypy repo_helper tests {posargs}
[testenv:pyup]
basepython = python3.7
skip_install = True
ignore_errors = True
changedir = {toxinidir}
deps = pyupgrade-directories
extras = all
commands = pyup_dirs repo_helper tests --py36-plus --recursive
[testenv:coverage]
basepython = python3.7
skip_install = True
ignore_errors = True
whitelist_externals = /bin/bash
passenv =
COV_PYTHON_VERSION
COV_PLATFORM
COV_PYTHON_IMPLEMENTATION
*
changedir = {toxinidir}
deps =
coverage>=5
coverage_pyver_pragma>=0.2.1
commands =
/bin/bash -c "rm -rf htmlcov"
coverage html
/bin/bash -c "DISPLAY=:0 firefox 'htmlcov/index.html'"
[flake8]
max-line-length = 120
select = E111 E112 E113 E121 E122 E125 E127 E128 E129 E131 E133 E201 E202 E203 E211 E222 E223 E224 E225 E225 E226 E227 E228 E231 E241 E242 E251 E261 E262 E265 E271 E272 E303 E304 E306 E402 E502 E703 E711 E712 E713 E714 E721 W291 W292 W293 W391 W504 YTT101 YTT102 YTT103 YTT201 YTT202 YTT203 YTT204 YTT301 YTT302 YTT303 STRFTIME001 STRFTIME002 SXL001 PT001 PT002 PT003 PT006 PT007 PT008 PT009 PT010 PT011 PT012 PT013 PT014 PT015 PT016 PT017 PT018 PT019 PT020 PT021 RST201 RST202 RST203 RST204 RST205 RST206 RST207 RST208 RST210 RST211 RST212 RST213 RST214 RST215 RST216 RST217 RST218 RST219 RST299 RST301 RST302 RST303 RST304 RST305 RST306 RST399 RST401 RST499 RST900 RST901 RST902 RST903 Q001 Q002 Q003 A001 A002 TYP001 TYP002 TYP003 TYP004 TYP005 TYP006 ENC001 ENC002 ENC003 ENC004 ENC011 ENC012 ENC021 ENC022 ENC023 ENC024 ENC025 ENC026 Y001,Y002 Y003 Y004 Y005 Y006 Y007 Y008 Y009 Y010 Y011 Y012 Y013 Y014 Y015 Y090 Y091 NQA001 NQA002 NQA003 NQA004 NQA005 NQA102 NQA103 E301 E302 E305 D100 D101 D102 D103 D104 D106 D201 D204 D207 D208 D209 D210 D211 D212 D213 D214 D215 D300 D301 D400 D402 D403 D404 D415 D417 DALL000 SLOT000 SLOT001 SLOT002
extend-exclude = doc-source,old,build,dist,__pkginfo__.py,setup.py,venv
rst-directives =
TODO
conf
envvar
extras-require
license
license-info
versionremoved
rst-roles =
choosealicense
conf
per-file-ignores =
tests/*: D100 D101 D102 D103 D104 D106 D201 D204 D207 D208 D209 D210 D211 D212 D213 D214 D215 D300 D301 D400 D402 D403 D404 D415 D417 DALL000 SLOT000 SLOT001 SLOT002
*/*.pyi: E301 E302 E305 D100 D101 D102 D103 D104 D106 D201 D204 D207 D208 D209 D210 D211 D212 D213 D214 D215 D300 D301 D400 D402 D403 D404 D415 D417 DALL000 SLOT000 SLOT001 SLOT002
pytest-parametrize-names-type = csv
inline-quotes = "
multiline-quotes = """
docstring-quotes = """
count = True
min_python_version = 3.6.1
unused-arguments-ignore-abstract-functions = True
unused-arguments-ignore-overload-functions = True
unused-arguments-ignore-magic-methods = True
unused-arguments-ignore-variadic-names = True
[coverage:run]
plugins = coverage_pyver_pragma
[coverage:report]
fail_under = 85
show_missing = True
exclude_lines =
raise AssertionError
raise NotImplementedError
if 0:
if False:
if TYPE_CHECKING
if typing.TYPE_CHECKING
if __name__ == .__main__.:
omit = **/*._py
[check-wheel-contents]
ignore = W002
toplevel = repo_helper
package = repo_helper
[pytest]
addopts = --color yes --durations 25
timeout = 600
filterwarnings =
error
ignore:can't resolve package from __spec__ or __package__, falling back on __name__ and __path__:ImportWarning
ignore:lib2to3 package is deprecated and may not be able to parse Python 3.10+:PendingDeprecationWarning
ignore:lib2to3 package is deprecated and may not be able to parse Python 3.10+:DeprecationWarning
ignore:'repo-helper make-recipe' is deprecated. Please use 'mkrecipe' instead:DeprecationWarning
always::ResourceWarning
ignore::DeprecationWarning:pre_commit[.*]
ignore:open_text is deprecated. Use files\(\) instead.:DeprecationWarning
always:'cgi' is deprecated and slated for removal in Python 3.13:DeprecationWarning
always:datetime.datetime.utcnow\(\) is deprecated and scheduled for removal in a future version.:DeprecationWarning
[testenv:smoke]
setenv =
PYTHONDEVMODE = 1
PYTHONIOENCODING=utf-8:surrogateescape
passenv =
GITHUB_ACTIONS
deps =
twine>=3.2.0
check-wheel-contents>=0.1.0
commands =
python --version
python {posargs} smoke_test.py