-
Notifications
You must be signed in to change notification settings - Fork 54
/
Copy pathtox.ini
112 lines (93 loc) · 3.22 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
[tox]
minversion = 3.18.0
envlist = py3,pep8
ignore_basepython_conflict = True
[testenv]
basepython = python3
allowlist_externals =
find
rm
setenv = VIRTUAL_ENV={envdir}
PYTHONWARNINGS=default::DeprecationWarning
usedevelop = True
deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands =
find . -type f -name "*.py[co]" -delete
rm -f .testrepository/times.dbm
stestr run {posargs}
[testenv:debug]
commands = oslo_debug_helper {posargs}
[testenv:pep8]
commands =
flake8 {posargs} cloudkitty
doc8 {posargs}
[testenv:bandit]
deps = -r{toxinidir}/test-requirements.txt
commands = bandit -r cloudkitty -n5 -x cloudkitty/tests/* -ll
[testenv:cover]
setenv =
VIRTUAL_ENV={envdir}
PYTHON=coverage run --source cloudkitty --parallel-mode
commands =
stestr run {posargs}
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml
coverage report
[testenv:genconfig]
commands =
oslo-config-generator --config-file etc/oslo-config-generator/cloudkitty.conf
[testenv:genpolicy]
commands = oslopolicy-sample-generator --config-file=etc/oslo-policy-generator/cloudkitty.conf
[testenv:docs]
deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/requirements.txt
-r{toxinidir}/doc/requirements.txt
commands = sphinx-build -W --keep-going -b html doc/source doc/build/html
# TODO(smcginnis) Temporarily disabling this as it fails. Error is that
# something is too large, likely from pulling in one of the conf sample files
# [testenv:pdf-docs]
# envdir = {toxworkdir}/docs
# allowlist_externals =
# make
# commands =
# sphinx-build -W --keep-going -b latex doc/source doc/build/pdf
# make -C doc/build/pdf
[testenv:api-ref]
# This environment is called from CI scripts to test and publish
# the API Ref to docs.openstack.org.
deps = -r{toxinidir}/doc/requirements.txt
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
[testenv:venv]
commands = {posargs}
[flake8]
filename = *.py,app.wsgi
exclude = .git,.venv,.tox,dist,doc,*egg,build,.ropeproject,releasenotes
# [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
enable-extensions=H203,H204,H205
[doc8]
ignore-path = .venv,.git,.tox,.tmp,*cloudkitty/locale*,*lib/python*,cloudkitty.egg*,doc/build,releasenotes/*
[hacking]
import_exceptions = cloudkitty.i18n
[flake8:local-plugins]
extension =
C310 = checks:CheckLoggingFormatArgs
C313 = checks:no_translate_logs
C314 = checks:CheckForStrUnicodeExc
C315 = checks:CheckForTransAdd
C317 = checks:check_oslo_namespace_imports
C318 = checks:dict_constructor_with_list_copy
C319 = checks:no_xrange
C320 = checks:no_log_warn_check
C321 = checks:check_explicit_underscore_import
paths = ./cloudkitty/hacking
[testenv:releasenotes]
deps = {[testenv:docs]deps}
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees --keep-going -b html releasenotes/source releasenotes/build/html