forked from pyload/pyload
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
297 lines (253 loc) · 6.3 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
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
[tox]
minversion = 2.3.1
envlist = py{2,26,27,3,33,34,35,36,37},pypy
[travis]
python = 3.5: py35,check,flake8
unignore_outcomes = True
[testenv]
alwayscopy = True
setenv =
BASEPYTHON = python3.5
TESTENVARGS = setup.py pyload
deps = {[testenv:compileall]deps}
commands = {[testenv:compileall]commands}
# Tests
[testenv:venv]
commands = {posargs}
[testenv:compileall]
skip_install = True
deps =
commands = python -m compileall -f -q {env:TESTENVARGS}
[testenv:complexity]
basepython = {env:BASEPYTHON}
skip_install = True
deps = {[testenv:xenon]deps}
commands = {[testenv:xenon]commands} -bD -mB -aA
; [testenv:coverage]
; basepython = {env:BASEPYTHON}
; skip_install = True
; deps =
; {[testenv:test]deps}
; coverage>=4.0
; commands =
; coverage run --rcfile=tox.ini {[testenv:test]commands}
; coverage combine
; coverage report --rcfile=tox.ini
[testenv:debug]
basepython = {env:BASEPYTHON}
skip_install = True
deps =
{[testenv:errors]deps}
{[testenv:issues]deps}
commands =
{[testenv:errors]commands}
{[testenv:issues]commands}
[testenv:dups]
basepython = {env:BASEPYTHON}
skip_install = True
deps = pylint
commands = pylint --disable=all --enable=duplicate-code {env:TESTENVARGS}
[testenv:errors]
basepython = {env:BASEPYTHON}
skip_install = True
deps =
{[testenv:compileall]deps}
{[testenv:pylint]deps}
{[testenv:mypy]deps}
commands =
{[testenv:compileall]commands}
{[testenv:pylint]commands} -E --disable=function-redefined,method-hidden,no-member,undefined-variable
{[testenv:mypy]commands}
[testenv:issues]
basepython = {env:BASEPYTHON}
skip_install = True
deps =
.
{[testenv:prospector]deps}
{[testenv:bandit]deps}
commands =
{[testenv:prospector]commands} -T -8 -s low
{[testenv:bandit]commands}
[testenv:maintainability]
basepython = {env:BASEPYTHON}
skip_install = True
deps = {[testenv:radon]deps}
commands = radon mi -s --max C {env:TESTENVARGS}
[testenv:style]
basepython = {env:BASEPYTHON}
skip_install = True
deps =
{[testenv:flake8]deps}
; ebb-lint
; flake8-bugbear
; flake8-commas
flake8-docstrings
flake8-future-import
flake8-import-order
flake8-mock
flake8-pep3101
flake8-print
flake8-quotes
flake8-string-format
flake8-tidy-imports
flake8-tuple
pep8-naming
radon
commands = {[testenv:flake8]commands}
; [testenv:test]
; basepython = {env:BASEPYTHON}
; skip_install = True
; deps =
; commands =
# Tools
[testenv:bandit]
basepython = {env:BASEPYTHON}
skip_install = True
deps = bandit
commands = bandit --ini tox.ini {posargs} {env:TESTENVARGS}
[testenv:check-manifest]
basepython = {env:BASEPYTHON}
skip_install = True
deps = check-manifest
commands = check-manifest -v {posargs}
[testenv:doc8]
basepython = {env:BASEPYTHON}
skip_install = True
deps = doc8
commands = doc8 {posargs} docs/source
[testenv:flake8]
basepython = {env:BASEPYTHON}
skip_install = True
deps = flake8
commands = flake8 {posargs} {env:TESTENVARGS}
[testenv:mypy]
basepython = {env:BASEPYTHON}
skip_install = True
deps = mypy
commands = mypy --config-file tox.ini {posargs} {env:TESTENVARGS}
[testenv:prospector]
basepython = {env:BASEPYTHON}
skip_install = True
deps = prospector
commands = prospector {posargs} {env:TESTENVARGS}
[testenv:pylint]
basepython = {env:BASEPYTHON}
skip_install = True
deps =
.
pylint
commands = pylint {posargs} {env:TESTENVARGS}
[testenv:pyroma]
basepython = {env:BASEPYTHON}
skip_install = True
deps = pyroma
commands = pyroma {posargs} .
[testenv:radon]
basepython = {env:BASEPYTHON}
skip_install = True
deps = radon
commands = radon {posargs} {env:TESTENVARGS}
[testenv:safety]
basepython = {env:BASEPYTHON}
skip_install = True
deps = safety
commands = safety check {posargs}
[testenv:xenon]
basepython = {env:BASEPYTHON}
skip_install = True
deps = xenon
commands =
xenon {posargs} setup.py
xenon {posargs} pyLoad.py
xenon {posargs} pyload
xenon {posargs} tests
# Packaging
[testenv:build]
basepython = {env:BASEPYTHON}
skip_install = True
deps =
commands =
python setup.py configure
python setup.py build
; [testenv:build_sphinx]
; basepython = {env:BASEPYTHON}
; skip_install = True
; deps =
; recommonmark
; sphinx<=1.4;python_version=="2.6" or python_version=="3.3"
; sphinx>1.4;python_version=="2.7" or python_version>"3.3"
; commands = python setup.py build_sphinx -E -W
[testenv:check]
basepython = {env:BASEPYTHON}
skip_install = True
deps = readme_renderer
commands = python setup.py check -r -s
[testenv:dist]
basepython = {env:BASEPYTHON}
skip_install = True
deps =
{[testenv:build]deps}
wheel
commands = python setup.py -q sdist bdist_wheel
[testenv:upload_dist]
basepython = {env:BASEPYTHON}
skip_install = True
deps =
{[testenv:dist]deps}
twine>=1.5.0
commands =
{[testenv:dist]commands}
twine upload --skip-existing dist/*
; [testenv:upload_messages]
; basepython = {env:BASEPYTHON}
; skip_install = True
; deps =
; commands =
# Settings
[coverage:report]
; ignore_errors = True
show_missing = True
[coverage:run]
concurrency = multiprocessing
parallel = True
source = pyload
[bandit]
confidence = 3
level = 3
recursive = True
skips = B404,B603,B607
[doc8]
allow-long-titles = True
; verbose = True
[flake8]
application-import-names = pyload
; doctests = True
# D203: 1 blank line required before class docstring
# E116: unexpected indentation (comment)
# E302: expected 2 blank lines, found 1
# E501: line too long
# E731: do not assign a lambda expression, use a def
# F401: module imported but unused
# F403: ‘from module import *’ used; unable to detect undefined names
# F405: name may be undefined, or defined from star imports: module
# F812: list comprehension redefines ...
# H101: Use TODO(NAME)
# H202: assertRaises Exception too broad
# H301: one import per line
# H306: imports not in alphabetical order (time, os)
# H401: docstring should not start with a space
# H404: multi line docstring should start without a leading new line
# H405: multi line docstring summary not separated with an empty line
# H501: Do not use self.__dict__ for string formatting
ignore = D203,E116,E302,E501,E731,F401,F403,F405,F812,H101,H202,H301,H306,H401,H404,H405,H501
import-order-style = google
exclude = *.py[codi],.*,__pycache__,build,dist,docs/source/conf.py,env,old
; max-complexity = 10
radon-max-cc = 10
; show-source = True
statistics = True
[mypy]
disallow_untyped_defs = True
follow_imports = silent
ignore_missing_imports = True
incremental = True