forked from sphinx-toolbox/sphinx-toolbox
-
Notifications
You must be signed in to change notification settings - Fork 1
/
tox.ini
224 lines (208 loc) Β· 7.82 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
# 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:docs
# * testenv:build
# * testenv:lint
# * testenv:mypy
# * testenv:pyup
# * testenv:coverage
# * flake8
# * coverage:run
# * coverage:report
# * check-wheel-contents
[tox]
envlist =
py37-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0.0b1}
py38-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0.0b1}
py39-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0.0b1}
py310-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0.0b1}
py311-dev-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0.0b1}
pypy37-sphinx{4.3,4.4,4.5,5.0.0b1}
mypy
build
skip_missing_interpreters = True
isolated_build = True
requires =
pip>=21
tox-envlist>=0.2.1
[envlists]
test =
py37-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0.0b1}
py38-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0.0b1}
py39-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0.0b1}
py310-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0.0b1}
py311-dev-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0.0b1}
pypy37-sphinx{4.3,4.4,4.5,5.0.0b1}
qa = mypy, lint
cov = py37-sphinx3.2, coverage
raspi = py3{7,8,9,10}-sphinx4.5
[testenv]
setenv =
PYTHONDEVMODE=1
PIP_DISABLE_PIP_VERSION_CHECK=1
deps =
-r{toxinidir}/tests/requirements.txt
sphinx3.2: sphinx~=3.2.0
sphinx3.3: sphinx~=3.3.0
sphinx3.4: sphinx~=3.4.0
sphinx3.5: sphinx~=3.5.0
sphinx4.0: sphinx~=4.0.0
sphinx4.1: sphinx~=4.1.0
sphinx4.2: sphinx~=4.2.0
sphinx4.3: sphinx~=4.3.0
sphinx4.4: sphinx~=4.4.0
sphinx4.5: sphinx~=4.5.0
sphinx5.0.0b1: sphinx==5.0.0b1
extras = all
commands =
python --version
python -m pytest --cov=sphinx_toolbox -r aR tests/ {posargs}
[testenv:docs]
setenv = SHOW_TODOS = 1
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]
skip_install = True
changedir = {toxinidir}
deps =
build[virtualenv]>=0.3.1
check-wheel-contents>=0.1.0
twine>=3.2.0
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
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
flake8-pyi>=20.10.0
flake8-pytest-style>=1.3.0
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
pydocstyle>=6.0.0
pygments>=2.7.1
importlib_metadata<4.5.0; python_version<'3.8'
commands = python3 -m flake8_rst_docstrings_sphinx sphinx_toolbox tests --allow-toolbox {posargs}
[testenv:mypy]
basepython = python3.7
ignore_errors = True
changedir = {toxinidir}
extras = all
deps =
mypy==0.942
-r{toxinidir}/tests/requirements.txt
-r{toxinidir}/stubs.txt
commands = mypy sphinx_toolbox tests {posargs}
[testenv:pyup]
basepython = python3.7
skip_install = True
ignore_errors = True
changedir = {toxinidir}
deps = pyupgrade-directories
extras = all
commands = pyup_dirs sphinx_toolbox 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 A003 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
autoclasssumm
envvar
extras-require
license
license-info
versionremoved
rst-roles =
bold-title
choosealicense
event
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.7
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 = 90
exclude_lines =
raise AssertionError
raise NotImplementedError
if 0:
if False:
if TYPE_CHECKING:
if typing.TYPE_CHECKING:
if __name__ == .__main__.:
[check-wheel-contents]
ignore = W002
toplevel = sphinx_toolbox
package = sphinx_toolbox
[pytest]
addopts = --color yes --durations 25
timeout = 600
markers = sphinx
filterwarnings =
error
ignore:'contextfunction' is renamed to 'pass_context', the old name will be removed in Jinja 3.1.:DeprecationWarning
ignore:'environmentfilter' is renamed to 'pass_environment', the old name will be removed in Jinja 3.1.:DeprecationWarning
ignore:'soft_unicode' has been renamed to 'soft_str'.:DeprecationWarning
ignore:distutils Version classes are deprecated. Use packaging.version instead.:DeprecationWarning
ignore:The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives:DeprecationWarning
ignore:can't resolve package from __spec__ or __package__, falling back on __name__ and __path__:ImportWarning
ignore::DeprecationWarning:certifi
always:module 'sre_(constants|parse)' is deprecated:DeprecationWarning
always:'cgi' is deprecated and slated for removal in Python 3.13:DeprecationWarning:babel[.*]
always:'imghdr' is deprecated and slated for removal in Python 3.13:DeprecationWarning:sphinx.util.images
[testenv:py{311-dev,py37}-sphinx{3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0.0b1}]
commands =
python --version
python -m pytest -p no:cov -r aR tests/ {posargs}