-
Notifications
You must be signed in to change notification settings - Fork 214
Expand file tree
/
Copy pathtox.ini
More file actions
131 lines (119 loc) · 3.73 KB
/
tox.ini
File metadata and controls
131 lines (119 loc) · 3.73 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
[tox]
minversion = 4.3.0
envlist = py3,pep8
[testenv]
description =
Run unit tests.
usedevelop = true
setenv =
OS_STDOUT_CAPTURE=1
OS_STDERR_CAPTURE=1
OS_TEST_TIMEOUT=60
deps =
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt
commands =
stestr run {posargs}
[testenv:pep8]
description =
Run style checks.
deps =
pre-commit
{[testenv:mypy]deps}
commands =
pre-commit run --all-files --show-diff-on-failure
{[testenv:mypy]commands}
[testenv:mypy]
description =
Run type checks.
deps =
{[testenv]deps}
mypy
types-requests
commands =
mypy --cache-dir="{envdir}/mypy_cache" {posargs:openstackclient}
[testenv:unit-tips]
commands =
python -m pip install -q -U -e {toxinidir}/../cliff#egg=cliff
python -m pip install -q -U -e {toxinidir}/../keystoneauth#egg=keystoneauth
python -m pip install -q -U -e {toxinidir}/../osc-lib#egg=osc_lib
python -m pip install -q -U -e {toxinidir}/../openstacksdk#egg=openstacksdk
python -m pip freeze
stestr run {posargs}
[testenv:functional{,-tips,-py310,-py311,-py312,-py313,-py314}]
description =
Run functional tests.
setenv =
OS_TEST_PATH=./openstackclient/tests/functional
passenv =
OS_*
commands =
tips: python -m pip install -q -U -e {toxinidir}/../cliff#egg=cliff
tips: python -m pip install -q -U -e {toxinidir}/../keystoneauth#egg=keystoneauth1
tips: python -m pip install -q -U -e {toxinidir}/../osc-lib#egg=osc_lib
tips: python -m pip install -q -U -e {toxinidir}/../openstacksdk#egg=openstacksdk
tips: python -m pip freeze
{[testenv]commands}
[testenv:venv]
description =
Run specified command in a virtual environment with all dependencies installed.
deps =
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/requirements.txt
-r{toxinidir}/doc/requirements.txt
commands =
{posargs}
[testenv:cover]
description =
Run unit tests and generate coverage report.
setenv =
{[testenv]setenv}
PYTHON=coverage run --source openstackclient --parallel-mode
commands =
stestr run {posargs}
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml
[testenv:debug]
description =
Run specified tests through oslo_debug_helper, which allows use of pdb.
passenv =
OS_*
commands =
oslo_debug_helper -t openstackclient/tests {posargs}
[testenv:docs]
description =
Build documentation in HTML format.
deps =
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/doc/requirements.txt
commands =
sphinx-build -a -E -W -d doc/build/doctrees -b html doc/source doc/build/html
sphinx-build -a -E -W -d doc/build/doctrees -b man doc/source doc/build/man
# Validate redirects (must be done after the docs build
whereto doc/build/html/.htaccess doc/test/redirect-tests.txt
[testenv:releasenotes]
description =
Build release note documentation in HTML format.
deps =
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/doc/requirements.txt
commands =
sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[flake8]
show-source = true
exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build,tools,releasenotes
# We only enable the hacking (H) and openstackclient (O) checks
select = H,O
# H301 Black will put commas after imports that can't fit on one line
ignore = H301
import-order-style = pep8
application_import_names = openstackclient
[flake8:local-plugins]
extension =
O400 = checks:assert_no_oslo
O401 = checks:assert_no_duplicated_setup
O402 = checks:assert_use_of_client_aliases
O403 = checks:assert_find_ignore_missing_kwargs
paths = ./hacking