blob: d966308bcafc92b8434eda0eb3baa05110b85613 [file] [log] [blame]
Chandan Kumar5e619872017-09-07 22:23:55 +05301[tox]
2minversion = 2.0
Brian Haley33ef4602018-04-26 14:37:49 -04003envlist = pep8
Chandan Kumar5e619872017-09-07 22:23:55 +05304skipsdist = True
5
6[testenv]
7usedevelop = True
8install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
9setenv =
10 VIRTUAL_ENV={envdir}
11 PYTHONWARNINGS=default::DeprecationWarning
12deps = -r{toxinidir}/test-requirements.txt
13commands = python setup.py test --slowest --testr-args='{posargs}'
14
15[testenv:pep8]
Dongcan Ye63813952017-11-18 14:22:25 +080016commands =
17 sh ./tools/misc-sanity-checks.sh
Brian Haley33ef4602018-04-26 14:37:49 -040018 flake8
Dongcan Ye63813952017-11-18 14:22:25 +080019whitelist_externals =
20 sh
Chandan Kumar5e619872017-09-07 22:23:55 +053021
22[testenv:venv]
23commands = {posargs}
24
25[testenv:cover]
26commands = python setup.py test --coverage --testr-args='{posargs}'
27
28[testenv:docs]
29commands = python setup.py build_sphinx
30
31[testenv:releasenotes]
32commands =
33 sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
34
35[testenv:debug]
Manjeet Singh Bhatia3448e0b2018-02-14 10:41:11 -080036commands = oslo_debug_helper -t neutron_tempest_plugin/ {posargs}
Chandan Kumar5e619872017-09-07 22:23:55 +053037
38[flake8]
Chandan Kumar667d3d32017-09-22 12:24:06 +053039# E125 continuation line does not distinguish itself from next logical line
40# E126 continuation line over-indented for hanging indent
41# E128 continuation line under-indented for visual indent
42# E129 visually indented line with same indent as next logical line
43# E265 block comment should start with '# '
44# H404 multi line docstring should start with a summary
45# H405 multi line docstring summary not separated with an empty line
46# N530 direct neutron imports not allowed
Brian Haley6767cec2018-04-10 15:30:23 -040047ignore = E125,E126,E128,E129,E265,H404,H405,N530
Chandan Kumar667d3d32017-09-22 12:24:06 +053048# H106: Don't put vim configuration in source files
49# H203: Use assertIs(Not)None to check for None
50# H904: Delay string interpolations at logging calls
Brian Haley6767cec2018-04-10 15:30:23 -040051enable-extensions = H106,H203,H904
Chandan Kumar667d3d32017-09-22 12:24:06 +053052show-source = true
Brian Haley6767cec2018-04-10 15:30:23 -040053exclude = ./.*,build,dist,doc,*egg*,releasenotes
Chandan Kumar667d3d32017-09-22 12:24:06 +053054import-order-style = pep8