-
Notifications
You must be signed in to change notification settings - Fork 8
/
tox.ini
170 lines (154 loc) · 2.79 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
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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
# SPDX-FileCopyrightText: 2022 - 2024 StorPool <[email protected]>
# SPDX-License-Identifier: Apache-2.0
[tox]
minversion = 4.1
envlist =
ruff
ruff-isort
black
pep8
mypy
pylint
unit-tests
validate
isolated_build = True
[defs]
distfiles =
python/sp_osi \
python/unit_tests
testfiles =
noxfile.py \
python/chroot_test \
python/kolla_rebuild
pyfiles =
{[defs]distfiles} \
{[defs]testfiles}
[testenv:ruff]
skip_install = True
tags =
check
deps =
ruff == 0.0.260
commands =
ruff check --target-version=py38 -- {[defs]pyfiles}
[testenv:ruff-isort]
skip_install = True
tags =
check
deps =
ruff == 0.0.260
commands =
ruff check --target-version=py38 --select=I --diff -- {[defs]pyfiles}
[testenv:black]
skip_install = True
tags =
check
deps =
-r python/requirements/black.txt
commands =
black --check {[defs]pyfiles}
[testenv:black-reformat]
skip_install = True
tags =
format
manual
deps =
-r python/requirements/black.txt
commands =
black {[defs]pyfiles}
[testenv:pep8]
skip_install = True
tags =
check
deps =
-r python/requirements/flake8.txt
commands =
flake8 {[defs]pyfiles}
[testenv:mypy]
skip_install = True
tags =
check
deps =
-r python/requirements/install.txt
-r python/requirements/test.txt
-r python/requirements/mypy.txt
commands =
mypy {[defs]distfiles}
mypy --python-version=3.8 {[defs]testfiles}
[testenv:pylint]
skip_install = True
tags =
check
deps =
-r python/requirements/install.txt
-r python/requirements/test.txt
-r python/requirements/pylint.txt
commands =
pylint {[defs]pyfiles}
[testenv:unit-tests]
tags =
tests
deps =
-r python/requirements/install.txt
-r python/requirements/test.txt
commands =
pytest {posargs} python/unit_tests
[testenv:validate]
tags =
tests
deps =
-r python/requirements/install.txt
commands =
sp-openstack -v validate
[testenv:test-chroot]
skip_install = True
tags =
tests
manual
deps =
-r python/requirements/run-chroot-test.txt
setenv =
PYTHONPATH = {toxinidir}/python
commands =
python3 -B -u -m chroot_test {env:CHROOT_TEST_ARGS:-c focal-amd64}
[testenv:kolla-rebuild]
skip_install = True
tags =
tools
manual
deps =
-r python/requirements/install.txt
setenv =
PYTHONPATH = {toxinidir}/python
commands =
python3 -B -u -m kolla_rebuild {env:KOLLA_REBUILD_ARGS:-r zed}
[testenv:reuse]
skip_install = True
tags =
check
manual
deps =
reuse >= 1, < 2
commands =
reuse lint
[testenv:pyupgrade]
skip_install = True
tags =
check
manual
deps =
pyupgrade >= 3, < 4
allowlist_externals =
sh
commands =
sh -c 'pyupgrade --py36-plus python/sp_osi/*.py python/unit_tests/*.py'
sh -c 'pyupgrade --py38-plus python/chroot_test/*.py noxfile.py'
[testenv:docs]
skip_install = True
tags =
docs
manual
deps =
-r python/requirements/docs.txt
commands =
mkdocs build