-
Notifications
You must be signed in to change notification settings - Fork 37
Expand file tree
/
Copy pathtox.ini
More file actions
99 lines (89 loc) · 2.37 KB
/
tox.ini
File metadata and controls
99 lines (89 loc) · 2.37 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
[tox]
minversion = 3.18.0
envlist = py3,pep8
[testenv]
setenv =
LANG=en_US.UTF-8
LANGUAGE=en_US:en
LC_ALL=C
deps =
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
usedevelop = True
commands = stestr run --slowest {posargs}
distribute = false
[testenv:functional{,-py310,-py311,-py312,-py313}]
setenv =
{[testenv]setenv}
OS_TEST_PATH=./osprofiler/tests/functional
deps =
{[testenv]deps}
oslo.messaging
[testenv:pep8]
description =
Run style checks.
deps =
pre-commit
{[testenv:mypy]deps}
commands =
pre-commit run -a
{[testenv:mypy]commands}
[testenv:mypy]
description =
Run type checks.
deps =
{[testenv]deps}
mypy
types-PySocks
types-WebOb
types-netaddr
types-protobuf
types-psutil
types-python-dateutil
types-requests
types-setuptools
commands =
mypy --cache-dir="{envdir}/mypy_cache" {posargs:osprofiler}
[testenv:venv]
commands = {posargs}
[testenv:cover]
setenv =
PYTHON=coverage run --source osprofiler --parallel-mode
commands =
stestr run {posargs}
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml
[testenv:docs]
deps =
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/requirements.txt
-r{toxinidir}/doc/requirements.txt
allowlist_externals = rm
commands =
rm -rf doc/build api-guide/build api-ref/build doc/source/contributor/modules
sphinx-build -W --keep-going -b html -d doc/build/doctrees doc/source doc/build/html
usedevelop = false
[testenv:releasenotes]
deps =
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/doc/requirements.txt
allowlist_externals = rm
commands =
rm -rf releasenotes/build
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,__init__.py
# We only enable the hacking (H) and osprofiler (N) checks
select = H
# H301 Black will put commas after imports that can't fit on one line
# H405 Multi-line docstrings are fine
ignore = H301,H405
[flake8:local-plugins]
extension =
N351 = checks:check_no_constructor_data_struct
N352 = checks:check_dict_formatting_in_string
N354 = checks:check_raises
paths = ./osprofiler/hacking