Chandan Kumar | 5e61987 | 2017-09-07 22:23:55 +0530 | [diff] [blame] | 1 | [tox] |
| 2 | minversion = 2.0 |
Brian Haley | 33ef460 | 2018-04-26 14:37:49 -0400 | [diff] [blame] | 3 | envlist = pep8 |
Chandan Kumar | 5e61987 | 2017-09-07 22:23:55 +0530 | [diff] [blame] | 4 | skipsdist = True |
| 5 | |
| 6 | [testenv] |
| 7 | usedevelop = True |
| 8 | install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages} |
| 9 | setenv = |
| 10 | VIRTUAL_ENV={envdir} |
| 11 | PYTHONWARNINGS=default::DeprecationWarning |
| 12 | deps = -r{toxinidir}/test-requirements.txt |
| 13 | commands = python setup.py test --slowest --testr-args='{posargs}' |
| 14 | |
| 15 | [testenv:pep8] |
Dongcan Ye | 6381395 | 2017-11-18 14:22:25 +0800 | [diff] [blame] | 16 | commands = |
| 17 | sh ./tools/misc-sanity-checks.sh |
Brian Haley | 33ef460 | 2018-04-26 14:37:49 -0400 | [diff] [blame] | 18 | flake8 |
Dongcan Ye | 6381395 | 2017-11-18 14:22:25 +0800 | [diff] [blame] | 19 | whitelist_externals = |
| 20 | sh |
Chandan Kumar | 5e61987 | 2017-09-07 22:23:55 +0530 | [diff] [blame] | 21 | |
| 22 | [testenv:venv] |
| 23 | commands = {posargs} |
| 24 | |
| 25 | [testenv:cover] |
| 26 | commands = python setup.py test --coverage --testr-args='{posargs}' |
| 27 | |
| 28 | [testenv:docs] |
| 29 | commands = python setup.py build_sphinx |
| 30 | |
| 31 | [testenv:releasenotes] |
| 32 | commands = |
| 33 | sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html |
| 34 | |
| 35 | [testenv:debug] |
Manjeet Singh Bhatia | 3448e0b | 2018-02-14 10:41:11 -0800 | [diff] [blame] | 36 | commands = oslo_debug_helper -t neutron_tempest_plugin/ {posargs} |
Chandan Kumar | 5e61987 | 2017-09-07 22:23:55 +0530 | [diff] [blame] | 37 | |
| 38 | [flake8] |
Chandan Kumar | 667d3d3 | 2017-09-22 12:24:06 +0530 | [diff] [blame] | 39 | # 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 Haley | 6767cec | 2018-04-10 15:30:23 -0400 | [diff] [blame] | 47 | ignore = E125,E126,E128,E129,E265,H404,H405,N530 |
Chandan Kumar | 667d3d3 | 2017-09-22 12:24:06 +0530 | [diff] [blame] | 48 | # 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 Haley | 6767cec | 2018-04-10 15:30:23 -0400 | [diff] [blame] | 51 | enable-extensions = H106,H203,H904 |
Chandan Kumar | 667d3d3 | 2017-09-22 12:24:06 +0530 | [diff] [blame] | 52 | show-source = true |
Brian Haley | 6767cec | 2018-04-10 15:30:23 -0400 | [diff] [blame] | 53 | exclude = ./.*,build,dist,doc,*egg*,releasenotes |
Chandan Kumar | 667d3d3 | 2017-09-22 12:24:06 +0530 | [diff] [blame] | 54 | import-order-style = pep8 |