-
Notifications
You must be signed in to change notification settings - Fork 34
/
tox.ini
245 lines (222 loc) · 5.24 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
[tox]
envlist =
black
py37
doctest
regression
fuzz
pylint
pydocstyle
flake8
mypy
doc8
docs
sloccount
badges
build
# trick to enable pre-installation of Cython
indexserver =
preinstall = https://pypi.python.org/simple
[testenv]
depends = black
deps =
:preinstall: cython
nose
coverage <5.0
-rrequirements-test.txt
commands = nosetests []
[testenv:doctest]
basepython = python3.7
setenv =
NOSE_WITH_COVERAGE=0
NOSE_WITH_DOCTEST=1
passenv =
NOSE_WITH_COVERAGE
NOSE_WITH_DOCTEST
commands = nosetests --where={toxinidir}/abydos []
[testenv:py36-doctest]
basepython = python3.6
setenv = {[testenv:doctest]setenv}
passenv = {[testenv:doctest]passenv}
commands = {[testenv:doctest]commands}
[testenv:regression]
basepython = python3.7
commands = nosetests {toxinidir}/tests/regression --processes=-1 \
--process-timeout=1200 --process-restartworker -c=0 -v []
[testenv:py36-regression]
basepython = python3.6
deps =
:preinstall: cython
commands = {[testenv:regression]commands}
[testenv:fuzz]
basepython = python3.7
commands = nosetests {toxinidir}/tests/fuzz --processes=-1 \
--process-timeout=1200 --process-restartworker -c=0 -v []
[testenv:py36-fuzz]
basepython = python3.6
deps =
:preinstall: cython
commands = {[testenv:fuzz]commands}
[testenv:black]
depends =
changedir = {toxinidir}
basepython = python3.7
skip_install = true
deps = black
commands = black .
[testenv:pylint]
basepython = python3.7
skip_install = true
deps = pylint
commands = {toxinidir}/helpers/call_and_write_log.py \
"pylint --rcfile=setup.cfg abydos" 0
[testenv:pydocstyle]
basepython = python3.7
skip_install = true
deps = pydocstyle
commands = {toxinidir}/helpers/call_and_write_log.py "pydocstyle --count ." 0
[testenv:pycodestyle]
basepython = python3.7
skip_install = true
deps = pycodestyle
commands = {toxinidir}/helpers/call_and_write_log.py "pycodestyle ." 0
[testenv:flake8]
basepython = python3.7
skip_install = true
deps =
flake8
flake8-mutable
flake8-bandit
flake8-blind-except
flake8-bugbear
flake8-comprehensions
flake8-docstrings
pydocstyle
flake8-print
flake8-fixme
flake8_builtins
flake8_coding
flake8_copyright
flake8_deprecated
flake8_pep3101
flake8_quotes
flake8_self
flake8-import-order
flake8-mypy
mccabe
pep8-naming
pyflakes
flake8-html
radon
flake8-2020
flake8-breakpoint
flake8-return
flake8-rst
flake8-logging-format
flake8-pep3101
flake8-pyi
flake8-strict
setenv =
MYPYPATH = {toxinidir}
commands = {toxinidir}/helpers/call_and_write_log.py \
"flake8 {toxinidir} --htmldir={toxinidir}/flake8" 0
[testenv:mypy]
basepython = python3.7
deps =
mypy
lxml
setenv =
MYPYPATH = {toxinidir}
mypy_paths =
abydos
commands = mypy {posargs:{[testenv:mypy]mypy_paths}} --txt-report mypy --html-report mypy
[testenv:doc8]
basepython = python3.7
skip_install = true
deps = doc8
commands = {toxinidir}/helpers/call_and_write_log.py "doc8 {toxinidir}" 0
[testenv:docs]
changedir = docs
basepython = python3.7
whitelist_externals=make
deps =
sphinx
sphinxcontrib-bibtex
sphinx_rtd_theme
commands =
sphinx-apidoc -e -M -o . ../abydos
sphinx-build -j 8 -b html -d {envtmpdir}/doctrees . _build/html
sphinx-build -j 8 -b epub -d {envtmpdir}/doctrees . _build/epub
sphinx-build -j 8 -b latex -d {envtmpdir}/doctrees \
-D latex_elements.papersize=letter . _build/latex
make PDFLATEX=xelatex -C _build/latex all-pdf
make PDFLATEX=xelatex -C _build/latex all-pdf
sphinx-build -j 8 -b coverage -d {envtmpdir}/doctrees . _build/coverage
[testenv:sloccount]
changedir = {toxinidir}
skip_install = true
deps =
commands = {toxinidir}/helpers/call_and_write_log.py \
"sloccount --datadir .tox/sloccount/tmp ./abydos" 0
[testenv:badges]
basepython = python3.7
depends =
pylint
pydocstyle
flake8
doc8
sloccount
skip_install = true
deps =
commands = python {toxinidir}/badge_update.py
[testenv:build]
basepython = python3.7
skip_install = true
deps =
wheel
setuptools
twine
commands =
python setup.py sdist bdist_wheel
twine check dist/*
[testenv:release]
basepython = python3.7
skip_install = true
deps =
{[testenv:build]deps}
commands =
{[testenv:build]commands}
twine upload --skip-existing --repository pypi dist/*
[testenv:release-test]
basepython = python3.7
skip_install = true
deps =
{[testenv:build]deps}
commands =
{[testenv:build]commands}
twine upload --skip-existing --repository testpypi dist/*
[testenv:clean]
changedir = {toxinidir}
skip_install = true
deps =
whitelist_externals =
rm
find
commands =
rm -rf ./cover
rm -rf ./flake8
rm -rf ./abydos.egg-info
rm -rf ./dist
rm -rf ./build
rm -rf ./.tox
rm -rf ./.mypy_cache
rm -rf ./.coverage
rm -rf ./docs/_build/*
rm -rf ./docs/abydos.bib.bak
find . -type f -name '*~' -delete
find . -type f -name '.*~' -delete
find . -type f -name '*.pyc' -delete
find . -type f -name '*.log' -delete
find . -type f -name '*.sav' -delete
find . -type f -name '*.bak' -delete
find . -type d -name '__pycache__' -delete