Repository navigation
Expand file tree
/
Copy pathtox.ini
More file actions
160 lines (139 loc) · 4.11 KB
/
Copy pathtox.ini
File metadata and controls
160 lines (139 loc) · 4.11 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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
[tox]
minversion = 4.28.0
envlist = pep8,py3
[testenv]
usedevelop = True
setenv =
LANGUAGE=en_US
LC_ALL=en_US.utf-8
constraints =
{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands =
stestr run {posargs}
passenv =
OS_DEBUG
GENERATE_HASHES
[testenv:functional]
commands =
stestr --test-path=./masakari/tests/functional run --concurrency=1 --slowest {posargs}
[testenv:genconfig]
commands =
oslo-config-generator --config-file=etc/masakari/masakari-config-generator.conf
oslo-config-generator --config-file=etc/masakari/masakari-customized-recovery-flow-config-generator.conf
[testenv:genpolicy]
commands =
oslopolicy-sample-generator --config-file=etc/masakari/masakari-policy-generator.conf
[testenv:linters]
skip_install = True
commands =
{[testenv:pep8]commands}
{[testenv:doc8]commands}
{[testenv:yamllint]commands}
{[testenv:bashate]commands}
[testenv:pep8]
skip_install = True
commands =
flake8 {posargs}
[testenv:doc8]
skip_install = True
commands =
doc8 README.rst CONTRIBUTING.rst HACKING.rst doc/source
doc8 releasenotes/source
doc8 -e '.yaml' releasenotes/notes
doc8 -e '.rst' -e '.inc' api-ref/source
[testenv:yamllint]
skip_install = True
commands =
yamllint -s .
[testenv:bashate]
skip_install = True
commands =
bashate devstack/plugin.sh -v --ignore E006 --error E005,E042,E043
[testenv:venv]
commands = {posargs}
[testenv:cover]
setenv =
PYTHON=coverage run --source masakari --parallel-mode
commands =
stestr run {posargs}
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml
[testenv:docs]
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/doc/requirements.txt
commands =
sphinx-build -W -b html doc/source doc/build/html
[testenv:pdf-docs]
deps = {[testenv:docs]deps}
allowlist_externals =
make
commands =
sphinx-build -W -b latex doc/source doc/build/pdf
make -C doc/build/pdf
[testenv:releasenotes]
skip_install = True
deps =
-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
[testenv:debug]
commands = oslo_debug_helper {posargs}
[testenv:api-ref]
# This environment is called from CI scripts to test and publish
# the API Ref to docs.openstack.org.
deps = {[testenv:docs]deps}
allowlist_externals =
rm
commands =
rm -rf api-ref/build
sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html
[flake8]
show-source = True
# E123, E125 skipped as they are invalid PEP-8.
# The below hacking rules by default are disabled should be enabled:
# [H106] Don't put vim configuration in source files.
# [H203] Use assertIs(Not)None to check for None.
# [H904] Delay string interpolations at logging calls.
enable-extensions = H106,H203,H904
# [W504] line break after binary operator (use W503 instead)
ignore = E123,E125,E128,E731,H405,W504
builtins = _
exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build
[hacking]
import_exceptions = masakari.i18n
[flake8:local-plugins]
extension =
M301 = checks:no_db_session_in_public_api
M302 = checks:use_timeutils_utcnow
M303 = checks:capital_cfg_help
M308 = checks:no_translate_logs
M309 = checks:no_import_translation_in_tests
M310 = checks:no_setting_conf_directly_in_tests
M315 = checks:no_mutable_default_args
M316 = checks:check_explicit_underscore_import
M317 = checks:use_jsonutils
M320 = checks:dict_constructor_with_list_copy
M322 = checks:check_greenthread_spawns
M324 = checks:check_config_option_in_central_place
M325 = checks:check_doubled_words
M329 = checks:no_os_popen
M331 = checks:no_log_warn
M333 = checks:check_policy_registration_in_central_place
M334 = checks:check_policy_enforce
paths = ./masakari/hacking
[testenv:bindep]
skip_install = True
deps = bindep
commands = bindep test
[doc8]
# NOTE(yoctozepto): this is due to multiple violations - it is better to keep
# it limited sanely rather than disable the D001 "Line too long" rule altogether
max-line-length = 105