forked from dgilland/pushjack
-
Notifications
You must be signed in to change notification settings - Fork 5
/
tox.ini
100 lines (83 loc) · 2.05 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
[tox]
envlist = py27, py34, py35, py36, py37, lint, docs, build
[testenv]
whitelist_externals = *
passenv = *
extras = dev
commands = {[testenv:unit]commands}
[travis]
python =
2.7: py27
3.4: py34
3.5: py35
3.6: py36
3.7: py37, lint, docs, build
[testenv:unit]
commands = pytest {posargs:--cov={envsitepackagesdir}/pushjack_http2 {envsitepackagesdir}/pushjack_http2 tests}
[testenv:flake8]
deps =
flake8
commands = flake8 src/pushjack_http2 tests
[testenv:pylint]
deps =
pylint
commands = pylint -E -j 4 -d not-callable,no-self-argument,no-member,no-value-for-parameter,method-hidden src/pushjack_http2
[testenv:lint]
deps =
{[testenv:flake8]deps}
{[testenv:pylint]deps}
commands =
{[testenv:flake8]commands}
{[testenv:pylint]commands}
[testenv:test]
deps =
{[testenv:build]deps}
commands =
{[testenv:lint]commands}
{[testenv:unit]commands}
{[testenv:docs]commands}
{[testenv:build]commands}
[testenv:docs]
commands = sphinx-build -q -W -b html -d {envtmpdir}/doctrees {toxinidir}/docs {envtmpdir}/html
[testenv:servedocs]
changedir = {envtmpdir}/html
commands =
{[testenv:docs]commands}
python -m http.server {posargs}
[testenv:build]
deps =
wheel
commands =
rm -rf dist build
python setup.py -q sdist bdist_wheel
[testenv:release]
deps =
{[testenv:build]deps}
twine
commands =
{[testenv:build]commands}
twine upload dist/*
[testenv:clean]
skip_install = true
deps =
commands =
bash -c "find . | grep -E '(__pycache__|\.pyc|\.pyo|\.pyd$)' | xargs rm -rf"
rm -rf .tox .coverage .cache .egg* *.egg* dist build
# Various CLI tool configurations.
[pytest]
addopts =
--doctest-modules -v -s --color=yes
--cov-report=xml --cov-report=term-missing
--junitxml=junit.xml
[coverage:run]
omit =
*/tests/*
*/test_*
*/_compat.py
[flake8]
exclude = .tox,env
# F401 - `module` imported but unused
# F811 - redefinition of unused `name` from line `N`
# W503 - line break before binary operator
# W504 - line break after binary operator
ignore = F401,F811,W503,W504