-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
132 lines (123 loc) · 4.05 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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
[tox]
envlist = linters,pep8
minversion = 2.3
skipsdist = True
[testenv]
install_command = pip install \
-c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/stable/stein/upper-constraints.txt} \
{opts} {packages}
setenv = VIRTUAL_ENV={envdir}
OS_STDOUT_CAPTURE=1
OS_STDERR_CAPTURE=1
OS_TEST_TIMEOUT=60
deps = -r{toxinidir}/test-requirements.txt
whitelist_externals = reno
[testenv:linters]
basepython = python2.7
deps = {[testenv]deps}
eventlet
httplib2
iso8601
jsonpatch
keystonemiddleware
kombu
MySQL-python
oslo.config
pecan
prettytable
psutil
sqlalchemy
sqlalchemy-migrate
wsme
pylint
whitelist_externals = bash
commands =
bash -c "find {toxinidir} \
-not \( -type d -name .?\* -prune \) \
-type f \
-not -name \*~ \
-not -name \*.md \
\( \
-name \*.sh \
-or -not -wholename \*/devstack/files/\* \
-wholename \*/devstack/\* \
\) \
-print0 | xargs -0 bashate -v"
bash -c "find {toxinidir} \
\( -name middleware/io-monitor/recipes-common/io-monitor/io-monitor/io_monitor/test-tools/yaml/* -prune \) \
-o \( -name .tox -prune \) \
-o -type f -name '*.yaml' \
-print0 | xargs -0 yamllint"
pylint --rcfile=./pylint.rc --extension-pkg-whitelist=greenlet \
./service-mgmt-api/sm-api/sm_api/ \
./service-mgmt-tools/sm-tools/sm_tools/ \
./service-mgmt-client/sm-client/sm_client/
[flake8]
# The following are being suppressed for now
# E402 module level import not at top of file
# - hacking codes -
# H102: license header not found
# H104: File contains nothing but comments
# H105: Don't use author tags
# H306: imports not in alphabetical order
# H401: docstring should not start with a space
# H403: multi line docstrings should end on a new line
# H404: multi line docstring should start without a leading new line
# H405: multi line docstring summary not separated with an empty line
# H501: Do not use locals() for string formatting
# - errors -
# F811 redefinition of unused '<foo>' from line <x>
# F821 undefined name 'e'
# - bugbear -
# B008 Do not perform calls in argument defaults. The call is performed only once at function definition time.
ignore= E402,
H102,H104,H105,H106,H306,H401,H403,H404,H405,H501,
F811,F821,
B008
# Enable checks which are off by default
# H106 Don’t put vim configuration in source files (off by default). SHOULD BE ENABLED.
# H203 Use assertIs(Not)None to check for None (off by default).
# H904 Delay string interpolations at logging calls (off by default). SHOULD BE ENABLED.
enable-extensions = H203
max-line-length = 110
[testenv:pep8]
basepython = python3
usedevelop = False
skip_install = True
deps =
hacking
flake8-bugbear<=19.3.0
flake8 < 3.6.0
commands =
flake8
[testenv:venv]
basepython = python3
commands = {posargs}
[testenv:docs]
basepython = python3
deps = -r{toxinidir}/doc/requirements.txt
commands =
rm -rf doc/build
sphinx-build -a -E -W -d doc/build/doctrees -b html doc/source doc/build/html
whitelist_externals = rm
[testenv:releasenotes]
basepython = python3
deps = -r{toxinidir}/doc/requirements.txt
commands =
rm -rf releasenotes/build
sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
whitelist_externals = rm
[testenv:newnote]
basepython = python3
# Re-use the releasenotes venv
envdir = {toxworkdir}/releasenotes
deps = -r{toxinidir}/doc/requirements.txt
commands = reno new {posargs}
[testenv:api-ref]
basepython = python3
deps =
-r{toxinidir}/doc/requirements.txt
commands =
rm -rf api-ref/build
sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html
whitelist_externals = rm