Repository navigation
Expand file tree
/
Copy pathtox.ini
More file actions
118 lines (106 loc) · 2.95 KB
/
Copy pathtox.ini
File metadata and controls
118 lines (106 loc) · 2.95 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
[tox]
minversion = 4.28.0
envlist = py3,pep8
[testenv]
description =
Run unit tests.
usedevelop = True
setenv =
VIRTUAL_ENV={envdir}
PYTHONDONTWRITEBYTECODE=1
PYTHONUNBUFFERED=1
PYTHONWARNINGS=default::DeprecationWarning
constraints =
{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
dependency_groups =
test
commands = stestr run --slowest {posargs}
[testenv:pep8]
description =
Run style checks.
dependency_groups =
test
types
deps =
pre-commit
allowlist_externals = pre-commit
commands =
pre-commit run --all-files --show-diff-on-failure {posargs}
{[testenv:mypy]commands}
[testenv:mypy]
description =
Run type checks.
dependency_groups =
test
types
commands =
mypy --cache-dir="{envdir}/mypy_cache" -p sushy {posargs}
[testenv:codespell]
description =
Run codespell to check spelling.
deps = pre-commit
commands = pre-commit run --all-files --show-diff-on-failure codespell
[testenv:venv]
description =
Run specified command in a virtual environment with all dependencies installed.
setenv = PYTHONHASHSEED=0
dependency_groups =
test
doc
commands = {posargs}
[testenv:cover]
description =
Run unit tests with coverage.
setenv =
{[testenv]setenv}
PYTHON=coverage run --parallel-mode
# After running this target, visit sushy/cover/index.html
# in your browser, to see a nicer presentation report with annotated
# HTML listings detailing missed lines.
commands = coverage erase
stestr run {posargs}
coverage combine
coverage report
coverage html
coverage xml -o cover/coverage.xml
[testenv:docs]
description =
Build documentation in HTML format.
dependency_groups =
doc
commands = sphinx-build -W -b html doc/source doc/build/html
[testenv:pdf-docs]
description =
Build documentation in PDF format.
usedevelop = False
allowlist_externals = make
dependency_groups =
doc
commands = sphinx-build -b latex doc/source doc/build/pdf
make -C doc/build/pdf
[testenv:releasenotes]
description =
Build release notes.
usedevelop = False
dependency_groups =
doc
commands =
sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[testenv:debug]
description =
Run unit tests under the oslo debug helper.
commands = oslo_debug_helper -t sushy/tests {posargs}
[flake8]
show-source = True
# E123, E125 skipped as they are invalid PEP-8.
# W503 Line break occurred before a binary operator. Conflicts with W504.
ignore = E123,E125,W503
# [H106] Don't put vim configuration in source files.
# [H203] Use assertIs(Not)None to check for None.
# [H204] Use assert(Not)Equal to check for equality.
# [H205] Use assert(Greater|Less)(Equal) for comparison.
# [H210] Require 'autospec', 'spec', or 'spec_set' in mock.patch/mock.patch.object calls
# [H904] Delay string interpolations at logging calls.
enable-extensions=H106,H203,H204,H205,H210,H904
import-order-style = pep8
application-import-names = sushy