-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtox.ini
181 lines (164 loc) · 5.2 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
# 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
# * travis
# * gh-actions
# * testenv
# * testenv:docs
# * testenv:build
# * testenv:lint
# * testenv:yapf
# * testenv:mypy
# * testenv:pyup
# * testenv:coverage
# * flake8
# * coverage:run
# * coverage:report
# * check-wheel-contents
# * pytest
[tox]
envlist = py36, py37, py38, py39, mypy, build
skip_missing_interpreters = True
requires = pip>=20.2.1
isolated_build = True
[envlists]
test = py36, py37, py38, py39
qa = mypy, lint
cov = py36, coverage
[travis]
python =
3.6: py36, build, mypy
3.7: py37, build
3.8: py38, build
3.9: py39, build
[gh-actions]
python =
3.6: py36, build
3.7: py37, build
3.8: py38, build
3.9: py39, build
[testenv]
setenv =
PIP_USE_FEATURE = 2020-resolver
PYTHONDEVMODE = 1
deps = -r{toxinidir}/tests/requirements.txt
extras = all
commands =
python --version
python -m pytest --cov=configconfig -r aR tests/ {posargs}
[testenv:docs]
setenv = SHOW_TODOS = 1
basepython = python3.8
changedir = {toxinidir}/doc-source
extras = all
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/doc-source/requirements.txt
commands = sphinx-build -M html . ./build {posargs}
[testenv:build]
skip_install = True
changedir = {toxinidir}
deps =
twine
pep517
check-wheel-contents
commands =
python -m pep517.build --source --binary "{toxinidir}"
twine check dist/*
check-wheel-contents dist/
[testenv:lint]
basepython = python3.6
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.0.4
flake8-pyi>=20.10.0
flake8-pytest-style>=1.3.0
flake8-sphinx-links>=0.0.4
flake8-strftime>=0.1.1
flake8-typing-imports>=1.10.0
git+https://github.com/PyCQA/pydocstyle@5118faa7173b0e5bbc230c4adf628758e13605bf
git+https://github.com/domdfcoding/flake8-quotes.git
git+https://github.com/domdfcoding/flake8-rst-docstrings.git
git+https://github.com/domdfcoding/flake8-rst-docstrings-sphinx.git
pygments>=2.7.1
commands = python3 -m flake8_rst_docstrings_sphinx configconfig tests --allow-toolbox
[testenv:yapf]
basepython = python3.7
changedir = {toxinidir}
skip_install = True
ignore_errors = True
deps = yapf
commands = yapf -i --recursive configconfig tests
[testenv:mypy]
basepython = python3.6
ignore_errors = True
changedir = {toxinidir}
extras = all
deps =
mypy==0.790
lxml
-r{toxinidir}/tests/requirements.txt
-r{toxinidir}/stubs.txt
commands = mypy configconfig tests {posargs}
[testenv:pyup]
basepython = python3.6
skip_install = True
ignore_errors = True
changedir = {toxinidir}
deps = pyupgrade-directories
extras = all
commands = pyup_dirs configconfig tests --py36-plus --recursive
[testenv:coverage]
basepython = python3.6
skip_install = True
ignore_errors = True
whitelist_externals = /bin/bash
changedir = {toxinidir}
deps =
coverage
coverage_pyver_pragma
commands =
/bin/bash -c "rm -rf htmlcov"
coverage html
/bin/bash -c "DISPLAY=:0 firefox 'htmlcov/index.html'"
[flake8]
max-line-length = 120
select = E301 E303 E304 E305 E306 E502 W291 W293 W391 E226 E225 E241 E231 W292 E265 E111 E112 E113 E121 E122 E125 E127 E128 E129 E131 E133 E201 E202 E203 E211 E222 E223 E224 E225 E227 E228 E242 E251 E261 E262 E271 E272 E402 E703 E711 E712 E713 E714 E721 W504 E302 YTT101 YTT102 YTT103 YTT201 YTT202 YTT203 YTT204 YTT301 YTT302 YTT303 STRFTIME001 STRFTIME002 SXL001 PT001 PT002 PT003 PT004 PT005 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 Q000 Q001 Q002 Q003 A001 A002 A003 TYP001 TYP002 TYP003 TYP004 TYP005 TYP006 Y001,Y002 Y003 Y004 Y005 Y006 Y007 Y008 Y009 Y010 Y011 Y012 Y013 Y014 Y015 Y090 Y091 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
exclude = .git,__pycache__,doc-source,old,build,dist,make_conda_recipe.py,__pkginfo__.py,setup.py
rst-directives =
TODO
envvar
extras-require
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
*/*.pyi: 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
pytest-parametrize-names-type = csv
inline-quotes = "
multiline-quotes = """
docstring-quotes = """
count = True
[coverage:run]
plugins = coverage_pyver_pragma
[coverage:report]
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 = configconfig
package = configconfig
[pytest]
addopts = --color yes --durations 25
timeout = 300