-
-
Notifications
You must be signed in to change notification settings - Fork 170
/
Copy pathtox.ini
79 lines (69 loc) · 1.64 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
[tox]
envlist =
isort
flake8
bandit
# Python/Django combinations that are officially supported
py{36,37,38,39}-django{22}
py{36,37,38,39,310}-django{32}
py{38,39,310}-django{40}
readme
docs
[gh-actions]
python =
3.6: py36
3.7: py37
3.8: py38
3.9: py39
3.10: py310
[gh-actions:env]
DJANGO =
2.2: django22
3.2: django32
4.0: django40
[testenv]
description = Unit tests
deps =
coverage[toml]
pytest-django
django22: Django>=2.2,<3.0
django32: Django>=3.2,<4.0
django40: Django>=4.0,<4.1
commands =
coverage run -m pytest {posargs}
coverage xml
[testenv:bandit]
description = PyCQA security linter
deps = bandit
commands = -bandit {posargs:-r analytical} -v
[testenv:docs]
description = Build the HTML documentation
deps = sphinx
commands = sphinx-build -b html -d docs/_build/doctrees docs docs/_build/html
[testenv:flake8]
description = Static code analysis and code style
deps = flake8
commands = flake8 {posargs}
[testenv:isort]
description = Ensure imports are ordered consistently
deps = isort[colors]
commands = isort --check-only --diff {posargs:analytical setup.py tests}
[testenv:readme]
description = Ensure README renders on PyPI
deps =
build
twine
commands =
python -m build
twine check dist/*
[testenv:clean]
description = Clean up bytecode and build artifacts
deps = pyclean
commands =
pyclean {posargs:.}
rm -rf .tox/ build/ dist/ django_analytical.egg-info/ .coverage coverage.xml tests/coverage-report.xml tests/unittests-report.xml
allowlist_externals =
rm
[flake8]
exclude = .cache,.git,.tox,build,dist
max-line-length = 100