-
Notifications
You must be signed in to change notification settings - Fork 36
Expand file tree
/
Copy pathtox.ini
More file actions
125 lines (105 loc) · 2.52 KB
/
tox.ini
File metadata and controls
125 lines (105 loc) · 2.52 KB
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
[tox]
envlist = py27, py34, py35, py36, py37, py38, 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
3.8: py38, lint, docs, build
[testenv:unit]
commands = pytest {posargs:--cov={envsitepackagesdir}/pushjack {envsitepackagesdir}/pushjack tests}
[testenv:flake8]
deps =
flake8
commands = flake8 src/pushjack 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
[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:black]
skip_install = true
deps =
black
commands =
black src/pushjack tests
[testenv:docformatter]
skip_install = true
deps =
docformatter
commands =
docformatter src/pushjack tests --in-place --recursive --pre-summary-newline --wrap-summaries 88 --wrap-descriptions 88
[testenv:auto]
deps =
{[testenv:black]deps}
{[testenv:docformatter]deps}
commands =
{[testenv:black]commands}
{[testenv:docformatter]commands}
[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]
junit_family = xunit2
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
max-line-length = 88
# F401 - `module` imported but unused
# F811 - redefinition of unused `name` from line `N`
# E203 - whitespace before ':'
# W503 - line break before binary operator
ignore = F401,F811,E203,W503