-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtox.ini
More file actions
116 lines (106 loc) · 2.81 KB
/
Copy pathtox.ini
File metadata and controls
116 lines (106 loc) · 2.81 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
[tox]
envlist = py{312,313}
toxworkdir=.tox
download=true
[pycodestyle]
max-line-length = 88
exclude =
.coverage,
.eggs,
.git,
.tox,
.pytest_cache,
build,
coverage,
dist,
venv,
migrations,
__pycache__,
[flake8]
max-line-length = 88
exclude =
.coverage,
.eggs,
.git,
.tox,
.pytest_cache,
build,
coverage,
dist,
venv,
migrations,
__pycache__,
[testenv:py{312,313}-pycodestyle]
description = Runs pycodestyle style checker. See: https://pycodestyle.pycqa.org/en/stable/
envdir =
py312: {toxworkdir}/.py312-pycodestyle
py313: {toxworkdir}/.py313-pycodestyle
skip_install = true
deps = pycodestyle
commands = pycodestyle {toxinidir}
[testenv:py{312,313}-flake8]
description = Runs flake8 style checker. See: https://flake8.pycqa.org/en/stable/
envdir =
py312: {toxworkdir}/.py312-flake8
py313: {toxworkdir}/.py313-flake8
skip_install = true
deps = flake8
commands = flake8 {toxinidir}
[testenv:py{312,313}-black-check]
description = Runs black to check the code style. See: https://black.readthedocs.io/en/stable/
envdir =
py312: {toxworkdir}/.py312-black
py313: {toxworkdir}/.py313-black
skip_install = true
deps =
black
isort
commands = black {toxinidir} --check --diff
[testenv:py{312,313}-black-format]
description = Runs black to reformat code to style guide. See: https://black.readthedocs.io/en/stable/
envdir =
py312: {toxworkdir}/.py312-black
py313: {toxworkdir}/.py313-black
skip_install = true
deps =
black
isort
commands =
isort --profile black {toxinidir}/src
black {toxinidir}
[testenv:py{312,313}-bandit]
description = Runs bandit security linter. See: https://bandit.readthedocs.io/en/latest/
envdir =
py312: {toxworkdir}/.py312-bandit
py313: {toxworkdir}/.py313-bandit
skip_install = true
deps = bandit[toml]
commands = bandit -c pyproject.toml -r {toxinidir}/src
[testenv:py{312,313}-mypy]
description = Runs mypy type checker. See: https://github.com/python/mypy
envdir =
py312: {toxworkdir}/.py312-mypy
py313: {toxworkdir}/.py313-mypy
skip_install = true
deps = mypy
commands = mypy {toxinidir}/src --install-types --non-interactive
[testenv:py{312,313}-build]
description = Build .whl files. See: https://python-build.readthedocs.io/en/stable/
envdir =
py312: {toxworkdir}/.py312-build
py313: {toxworkdir}/.py313-build
skip_install = true
deps = build
commands =
py312: python -m build -w -C="--build-option=--python-tag" -C="--build-option=py312"
py313: python -m build -w -C="--build-option=--python-tag" -C="--build-option=py313"
[testenv:py{312,313}-tests]
description = Runs the API tests.
envdir =
py312: {toxworkdir}/.py312-tests
py313: {toxworkdir}/.py313-tests
skip_install = true
deps = -e.[test]
commands =
coverage run -m pytest
coverage html