Repository navigation
Expand file tree
/
Copy pathtox.ini
More file actions
136 lines (122 loc) · 2.86 KB
/
Copy pathtox.ini
File metadata and controls
136 lines (122 loc) · 2.86 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
126
127
128
129
130
131
132
133
134
135
136
[tox]
min_version = 4.3.3
isolated_build = true
envlist =
py3{10, 11, 12, 13}
flake8
black
bandit
mypy
pip-missing-reqs
pypi
[gh-actions]
python =
3.10: py310
3.11: py311
3.12: py312, flake8, black, bandit, pip-missing-reqs, pypi
3.13: py313
[base]
python = python3.12
package = trasgodp
[pytest]
addopts = -p no:warnings
[testenv]
usedevelop = True
basepython = python3
pip_version = 26.0.1
deps =
pytest>=7.1.2
pytest-cov>=4.0.0
allowlist_externals =
poetry
find
rm
mkdir
twine
setenv =
VIRTUAL_ENV={envdir}
LC_ALL=en_US.utf-8
commands_pre =
poetry install --no-root --sync --with test,test-{envname}
commands =
find . -type f -name "*.pyc" -delete
poetry run pytest {posargs}
[testenv:py310]
basepython = python3.10
commands_pre =
poetry install --no-root --sync --with test
[testenv:py311]
basepython = python3.11
commands_pre =
poetry install --no-root --sync --with test
[testenv:py312]
basepython = python3.12
commands_pre =
poetry install --no-root --sync --with test
[testenv:py313]
basepython = python3.13
commands_pre =
poetry install --no-root --sync --with test
[flake8]
# Black default line length is 88
max-line-length = 88
show-source = True
builtins = _
ignore = B008
exclude =
.venv
.git
.tox
dist
doc
*lib/python*
*egg
build
[testenv:flake8]
basepython = {[base]python}
deps =
flake8>=7.0
flake8-bugbear>=24.0
flake8-docstrings>=1.7
flake8-typing-imports>=1.15
flake8-colors>=0.1,<0.2
pep8-naming>=0.13
pydocstyle>=6.3
commands =
poetry run flake8 {[base]package}
[testenv:black]
basepython = {[base]python}
deps =
black>=22.3,<22.4
commands = poetry run black --check --diff {[base]package}
[testenv:bandit]
basepython = {[base]python}
deps =
bandit>=1.7.5
commands =
- mkdir /tmp/bandit
- poetry run bandit -r {[base]package} -x tests -s B110,B410 -f html -o /tmp/bandit/index.html
[testenv:bandit-report]
basepython = {[base]python}
deps =
{[testenv:bandit]deps}
commands =
- mkdir /tmp/bandit
- poetry run bandit -r {[base]package} -x tests -s B110,B410 -f html -o /tmp/bandit/index.htm
[testenv:mypy]
description = Static type checks
basepython = {[base]python}
deps =
mypy==1.3.0
types-tabulate==0.9.0.2
pandas-stubs==2.0.1.230501
commands =
poetry run mypy --config-file mypy.ini -p {[base]package}
[testenv:pip-missing-reqs]
basepython = {[base]python}
deps = pip_check_reqs
commands=
mkdir -p tmp
poetry export -o tmp/requirements.txt
poetry run pip-missing-reqs --requirements-file tmp/requirements.txt --ignore-file={[base]package}/tests/* {[base]package}
rm tmp/requirements.txt