forked from enolfc/caso
-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathtox.ini
More file actions
141 lines (123 loc) · 3.2 KB
/
tox.ini
File metadata and controls
141 lines (123 loc) · 3.2 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
137
138
139
140
141
[tox]
min_version = 4.3.3
isolated_build = true
envlist =
py3{8, 9, 10, 11, 12, 13}
flake8
black
bandit
mypy
pypi
skipsdist = True
[gh-actions]
python =
3.8: py38
3.9: py39
3.10: py310
3.11: py311
3.12: py312
3.13: py312, flake8, black, bandit, mypy, pypi
[base]
python = python3.13
package = caso
[pytest]
addopts = -p no:warnings
[testenv]
usedevelop = True
basepython = python3
allowlist_externals =
poetry
find
rm
mkdir
setenv =
VIRTUAL_ENV={envdir}
LC_ALL=en_US.utf-8
OS_STDOUT_CAPTURE=1
OS_STDERR_CAPTURE=1
OS_TEST_TIMEOUT=160
commands_pre =
poetry -V
poetry sync --no-root --with test,test-{envname}
commands =
find . -type f -name "*.pyc" -delete
poetry run pytest {posargs}
[testenv:py310]
basepython = python3.10
commands_pre =
poetry sync --no-root --with test
[testenv:py311]
basepython = python3.11
commands_pre =
poetry sync --no-root --with test
[testenv:py312]
basepython = python3.12
commands_pre =
poetry sync --no-root --with test
[testenv:py313]
basepython = python3.13
commands_pre =
poetry sync --no-root --with test
[testenv:cov]
basepython = python3.13
commands_pre =
poetry sync --no-root --with test
commands =
find . -type f -name "*.pyc" -delete
poetry run pytest {posargs} --cov={[base]package} \
--cov-report term \
--cov-report=xml
[flake8]
# Black default line length is 88
max-line-length = 88
show-source = True
builtins = _
exclude =
.venv
.git
.tox
dist
doc
*lib/python*
*egg
build
[testenv:flake8]
basepython = {[base]python}
commands =
poetry run flake8 {[base]package}
[testenv:black]
basepython = {[base]python}
commands =
poetry run black --check --diff {[base]package}
[testenv:bandit]
basepython = {[base]python}
commands =
poetry run bandit -r {[base]package} -x tests -s B110,B410
[testenv:pypi]
basepython = {[base]python}
commands =
poetry publish --build --dry-run
[testenv:genconfig]
basepython = {[base]python}
commands_pre =
poetry sync --no-root --with test
pip install -U .
commands =
poetry run oslo-config-generator --config-file=etc/{[base]package}-config-generator.conf
[testenv:docs]
basepython = {[base]python}
deps =
-r {toxinidir}/doc/requirements.txt
commands =
rm -rf doc/build
sphinx-build -W --keep-going -b html -j auto doc/source doc/build/html
[testenv:mypy]
description = Static type checks
basepython = {[base]python}
commands =
poetry run mypy --config-file mypy.ini -p {[base]package} --explicit-package-bases
[testenv:reno]
description = Run release notes
basepython = {[base]python}
commands =
poetry run reno {posargs}