-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathtox.ini
82 lines (73 loc) · 1.5 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
[tox]
minversion = 4.11.3
envlist = py{312}, pylint, flake8, linters
isolated_build = True
[testenv]
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/requirements.testing.txt
commands =
coverage run -m pytest {posargs}
coverage report --include src/* --show-missing --fail-under 70
# Linters
[testenv:linters]
skip_install = true
deps =
{[testenv:flake8]deps}
{[testenv:pylint]deps}
{[testenv:bandit]deps}
{[testenv:readme]deps}
commands =
{[testenv:flake8]commands}
{[testenv:pylint]commands}
{[testenv:bandit]commands}
{[testenv:readme]commands}
[testenv:flake8]
deps =
{[testenv]deps}
skip_install = true
commands =
flake8 src/ tests/ setup.py
[testenv:pylint]
skip_install = true
deps =
{[testenv]deps}
commands =
# pylint src/
[testenv:bandit]
skip_install = true
deps =
bandit
commands =
bandit -r src/ -c .bandit.yml
[testenv:readme]
deps =
readme_renderer
commands =
python setup.py check -r -s
[flake8]
extend-ignore =
# Missing docstrings
D100, D101, D102, D104, D105, D107
# function and variable names should be lowercase
N802, N806
per-file-ignores =
tests/*: D
max-line-length = 180
max-complexity = 20
# Release tooling
[testenv:build]
skip_install = true
deps =
wheel
setuptools
commands =
python setup.py sdist bdist_wheel
[testenv:release]
skip_install = true
deps =
{[testenv:build]deps}
twine >= 1.5.0
commands =
{[testenv:build]commands}
twine upload --skip-existing dist/*