-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
84 lines (73 loc) · 1.76 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
[tox]
envlist = py36,black,flake8,bandit,docs,build
[testenv]
deps =
pytest
matplotlib
commands = pytest -s tests
[testenv:black]
deps =
black
commands =
black --check --diff src
[testenv:flake8]
basepython = python3
skip_install = true
deps =
flake8
flake8-bugbear
flake8-colors
flake8-docstrings
flake8-import-order>=0.9
flake8-typing-imports>=1.1
pep8-naming
commands =
flake8 src/flake8/ tests/ setup.py
[testenv:bandit]
basepython = python3
skip_install = true
deps =
bandit
commands =
bandit -r src
[testenv:docs]
description = invoke sphinx-build to build the HTML docs
deps = sphinx >= 1.7.5, < 2
commands = sphinx-build -d "{toxworkdir}/docs_doctree" doc "doc/html" --color -W -bhtml {posargs}
[testenv:build]
basepython = python3
skip_install = true
deps =
wheel
setuptools
commands =
python setup.py -q sdist bdist_wheel
[testenv:serve-docs]
skip_install = true
changedir = "{toxworkdir}/docs_out"
deps =
commands =
python -m http.server {posargs}
[testenv:release]
basepython = python3
skip_install = true
deps =
{[testenv:build]deps}
twine >= 1.5.0
commands =
{[testenv:build]commands}
twine upload --skip-existing dist/*
[testenv:pre-commit]
skip_install = true
deps = pre-commit
commands =
pre-commit run --all-files --show-diff-on-failure
[flake8]
ignore = E305,E402,E501,I101,I100,I201,E722,E999
max-line-length = 160
exclude = .git, __pycache__ ,build,dist,.serverless,node_modules,migrations,.venv,.bento
enable-extensions = pep8-naming,flake8-debugger,flake8-docstrings
max-complexity = 10
import-order-style = google
application-import-names = flake8
format = ${cyan}%(path)s${reset}:${yellow_bold}%(row)d${reset}:${green_bold}%(col)d${reset}: ${red_bold}%(code)s${reset} %(text)s