2015-06-19 23:10:54 -04:00
|
|
|
|
[tox]
|
2019-02-20 00:54:19 +00:00
|
|
|
|
minversion = 3.1.1
|
2018-10-12 14:49:26 +00:00
|
|
|
|
envlist = py37,py27,pep8
|
2015-06-19 23:10:54 -04:00
|
|
|
|
skipsdist = True
|
|
|
|
|
|
|
|
|
|
[testenv]
|
2019-02-20 00:54:19 +00:00
|
|
|
|
basepython = python3
|
2015-06-19 23:10:54 -04:00
|
|
|
|
usedevelop = True
|
|
|
|
|
install_command = pip install -U {opts} {packages}
|
|
|
|
|
setenv =
|
2018-07-18 13:34:08 +01:00
|
|
|
|
VIRTUAL_ENV={envdir}
|
2019-04-23 19:39:44 +08:00
|
|
|
|
CONSTRAINTS_OPT=-c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt}
|
2018-07-18 13:34:08 +01:00
|
|
|
|
deps =
|
|
|
|
|
{env:CONSTRAINTS_OPT}
|
|
|
|
|
-r{toxinidir}/requirements.txt
|
|
|
|
|
-r{toxinidir}/test-requirements.txt
|
2015-06-19 23:10:54 -04:00
|
|
|
|
whitelist_externals = bash
|
2018-06-25 09:23:34 +07:00
|
|
|
|
commands = stestr run --black-regex ".tests.functional" {posargs}
|
2015-06-19 23:10:54 -04:00
|
|
|
|
|
|
|
|
|
[testenv:pep8]
|
|
|
|
|
commands = flake8
|
|
|
|
|
|
|
|
|
|
[testenv:venv]
|
|
|
|
|
commands = {posargs}
|
2018-04-06 18:51:47 +00:00
|
|
|
|
deps =
|
2018-07-18 13:34:08 +01:00
|
|
|
|
{env:CONSTRAINTS_OPT}
|
2018-04-06 18:51:47 +00:00
|
|
|
|
-r{toxinidir}/requirements.txt
|
|
|
|
|
-r{toxinidir}/test-requirements.txt
|
|
|
|
|
-r{toxinidir}/doc/requirements.txt
|
2015-06-19 23:10:54 -04:00
|
|
|
|
|
2019-02-20 00:54:19 +00:00
|
|
|
|
[testenv:functional-py27]
|
2017-07-17 15:27:53 +01:00
|
|
|
|
basepython = python2.7
|
|
|
|
|
setenv =
|
|
|
|
|
{[testenv]setenv}
|
|
|
|
|
commands =
|
|
|
|
|
stestr run --black-regex ".tests.unit" '{posargs}'
|
|
|
|
|
|
2019-02-20 00:54:19 +00:00
|
|
|
|
[testenv:functional]
|
|
|
|
|
setenv =
|
|
|
|
|
{[testenv]setenv}
|
|
|
|
|
commands =
|
|
|
|
|
stestr run --black-regex ".tests.unit" '{posargs}'
|
|
|
|
|
|
2015-06-19 23:10:54 -04:00
|
|
|
|
[testenv:docs]
|
2018-07-18 13:34:08 +01:00
|
|
|
|
deps =
|
|
|
|
|
{env:CONSTRAINTS_OPT}
|
|
|
|
|
-r{toxinidir}/doc/requirements.txt
|
2018-09-09 05:55:59 -04:00
|
|
|
|
commands = sphinx-build -W -b html doc/source doc/build/html
|
2015-06-19 23:10:54 -04:00
|
|
|
|
|
2016-04-20 16:14:39 +01:00
|
|
|
|
[testenv:releasenotes]
|
2018-07-18 13:34:08 +01:00
|
|
|
|
deps =
|
|
|
|
|
{env:CONSTRAINTS_OPT}
|
|
|
|
|
-r{toxinidir}/doc/requirements.txt
|
2016-04-20 16:14:39 +01:00
|
|
|
|
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
|
|
|
|
|
2018-04-06 18:51:47 +00:00
|
|
|
|
[testenv:lower-constraints]
|
|
|
|
|
deps =
|
|
|
|
|
-c{toxinidir}/lower-constraints.txt
|
|
|
|
|
-r{toxinidir}/requirements.txt
|
|
|
|
|
-r{toxinidir}/test-requirements.txt
|
|
|
|
|
-r{toxinidir}/doc/requirements.txt
|
|
|
|
|
commands =
|
|
|
|
|
stestr run --black-regex ".tests.functional" {posargs}
|
|
|
|
|
sphinx-build -W doc/source doc/build
|
|
|
|
|
|
2015-06-19 23:10:54 -04:00
|
|
|
|
[flake8]
|
|
|
|
|
# E123, E125 skipped as they are invalid PEP-8.
|
|
|
|
|
# Following checks are ignored on purpose.
|
|
|
|
|
#
|
|
|
|
|
# E251 unexpected spaces around keyword / parameter equals
|
|
|
|
|
# reason: no improvement in readability
|
|
|
|
|
#
|
|
|
|
|
# E265 block comment should start with '# '
|
|
|
|
|
# reason: no improvement in readability
|
|
|
|
|
#
|
|
|
|
|
# H904 wrap long lines in parentheses instead of a backslash
|
2019-04-23 19:39:44 +08:00
|
|
|
|
# reason: removed in hacking (https://review.opendev.org/#/c/101701/)
|
2015-06-19 23:10:54 -04:00
|
|
|
|
#
|
|
|
|
|
# H404 skipped on purpose per jay pipes discussion.
|
|
|
|
|
#
|
|
|
|
|
# Due to the upgrade to hacking 0.9.2 the following checking are
|
|
|
|
|
# ignored on purpose for the moment and should be re-enabled.
|
2017-07-11 10:52:20 +08:00
|
|
|
|
# H106: Don’t put vim configuration in source files
|
|
|
|
|
# H203: Use assertIs(Not)None to check for None
|
2015-06-19 23:10:54 -04:00
|
|
|
|
|
|
|
|
|
show-source = True
|
2017-02-03 16:05:51 +08:00
|
|
|
|
ignore = E123,E125,E126,E127,E128,E251,E265,H302,H405,H904,H404
|
2017-07-11 10:52:20 +08:00
|
|
|
|
enable-extensions=H106,H203
|
2015-06-19 23:10:54 -04:00
|
|
|
|
builtins = _
|
2017-07-04 10:29:13 +01:00
|
|
|
|
exclude=.venv,.git,.tox,dist,*lib/python*,*egg,build
|
2015-06-19 23:10:54 -04:00
|
|
|
|
max-complexity=30
|
|
|
|
|
|
|
|
|
|
[hacking]
|
|
|
|
|
import_exceptions = os_vif.i18n
|