forked from haiwen/seafdav
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
197 lines (170 loc) · 4.19 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
[tox]
basepython = python3.7
envlist =
py27,
# py34, # EOL 2019-03-18
py35,
py36,
py37,
py38,
black-check,
lint-py27,
lint-py3,
coverage,
skip_missing_interpreters = true
[testenv]
usedevelop = True
extras =
test
passenv = LC_ALL LANG TRAVIS TRAVIS_BRANCH TRAVIS_OS_NAME TRAVIS_BUILD_ID
setenv =
COVERAGE_FILE=.coverage.{envname}
# Note: also honors .coveragerc:
commands =
# Run everything from /tests folder:
python -V
pip list
pytest -ra -v -x --cov=wsgidav --cov-report=xml --html=_build/pytest/report-{envname}.html --self-contained-html {posargs}
deps =
cheroot
defusedxml
Jinja2
json5
PyYAML
pytest
pytest-cov
#pytest-remove-stale-bytecode
pytest-html
redis
requests
webtest
[testenv:coverage]
skip_install = true
deps =
coverage
setenv =
COVERAGE_FILE=.coverage
commands =
coverage erase
coverage combine
coverage html
coverage xml
coverage report --fail-under=30.0
[testenv:isort-apply]
skip_install = true
deps =
isort
commands =
isort --apply --recursive {toxinidir}/wsgidav {toxinidir}/tests setup.py {posargs}
[testenv:autopep8]
skip_install = true
deps =
autopep8
docformatter
commands =
autopep8 --verbose --in-place --recursive --aggressive --aggressive {toxinidir}/wsgidav {toxinidir}/tests setup.py
docformatter --in-place --recursive {toxinidir}/wsgidav {toxinidir}/tests setup.py
[lint]
skip_install = true
deps =
isort<5 # TODO: remove this, when flake8-isort is updated
flake8
# helper to generate HTML reports:
flake8-html
# Useful flake8 plugins that are Python and Plone specific:
flake8-coding
flake8-debugger
flake8-deprecated
flake8-pytest
flake8-quotes
flake8-todo
flake8-isort
mccabe
# Potential flake8 plugins that should be used: # TBD
#flake8-blind-except
#flake8-commas
#flake8-docstrings
#flake8-mypy
#flake8-pep3101
#flake8-plone-hasattr
#flake8-string-format
#flake8_strict
#flake8-quotes
commands =
# --htmldir needs mkdir to create the _build directory, but does not work on Windows:
# mkdir -p {toxinidir}/_build/flake8
isort --check-only --recursive {toxinidir}/wsgidav {toxinidir}/tests setup.py
- flake8 --doctests wsgidav tests setup.py
# - flake8 --format=html --htmldir={toxinidir}/_build/flake8 --doctests wsgidav tests setup.py
flake8 wsgidav tests setup.py --doctests
whitelist_externals =
mkdir
[testenv:lint-py27]
basepython = python2.7
skip_install = true
# TODO: cannot re-use [lint], because isort has problems to iterate the
# testsfolder (UnicodeDecodeError on Lotos..stengel (???).docx)
deps =
flake8
# helper to generate HTML reports:
flake8-html
flake8-coding
flake8-pytest
commands =
flake8 wsgidav setup.py --doctests
[testenv:lint-py3]
basepython = python3.7
skip_install = true
deps =
{[lint]deps}
flake8-bugbear
commands = {[lint]commands}
whitelist_externals = {[lint]whitelist_externals}
[testenv:black]
description = Reformat python code using Black
basepython = python3.7
changedir = {toxinidir}
skip_install = true
deps =
black
commands =
black wsgidav tests setup.py
[testenv:black-check]
description = Check Black formatting compliance and add flake8-bugbear checks
basepython = python3.7
changedir = {toxinidir}
skip_install = true
deps =
black
commands =
black --check --diff wsgidav tests setup.py
[testenv:format]
description = Reformat python code using Black and isort
basepython = python3.7
changedir = {toxinidir}
skip_install = true
deps =
black
isort
commands =
isort --apply --recursive {toxinidir}/wsgidav {toxinidir}/tests setup.py {posargs}
black wsgidav tests setup.py
[testenv:docs]
description = Build Sphinx documentation (output directory: docs/sphinx-build)
basepython = python3.7
changedir = doc
deps =
sphinx
recommonmark
sphinx_rtd_theme
commands =
# http://www.sphinx-doc.org/en/master/man/sphinx-build.html
sphinx-build -b html sphinx sphinx-build
# [testenv:clean]
# commands =
# coverage erase
# [testenv:stats]
# commands =
# coverage combine
# coverage report
# coverage html