You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
103 lines
2.9 KiB
103 lines
2.9 KiB
[tox] |
|
envlist = py36,py37,py27,pep8 |
|
minversion = 2.0 |
|
skipsdist = True |
|
|
|
[testenv] |
|
setenv = |
|
VIRTUAL_ENV={envdir} |
|
PYTHONWARNINGS=default::DeprecationWarning |
|
usedevelop = True |
|
install_command = pip install {opts} {packages} |
|
deps = -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt} |
|
-r{toxinidir}/requirements.txt |
|
-r{toxinidir}/test-requirements.txt |
|
whitelist_externals = * |
|
commands = |
|
find . -type f -name "*.py[c|o]" -delete |
|
bash tools/pretty_tox_serial.sh '{posargs}' |
|
|
|
[testenv:pep8] |
|
basepython = python3 |
|
commands = |
|
flake8 |
|
neutron-db-manage --subproject networking-l2gw check_migration |
|
|
|
[testenv:py27] |
|
setenv = OS_FAIL_ON_MISSING_DEPS=1 |
|
|
|
[testenv:venv] |
|
basepython = python3 |
|
commands = {posargs} |
|
|
|
[testenv:cover] |
|
basepython = python3 |
|
commands = python setup.py testr --coverage --testr-args='{posargs}' |
|
|
|
[testenv:docs] |
|
basepython = python3 |
|
deps = -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt} |
|
-r{toxinidir}/doc/requirements.txt |
|
commands = sphinx-build -W -d doc/build/doctrees -b html doc/source doc/build/html |
|
|
|
[testenv:pdf-docs] |
|
basepython = python3 |
|
envdir = {toxworkdir}/docs |
|
deps = {[testenv:docs]deps} |
|
whitelist_externals = |
|
make |
|
commands = |
|
sphinx-build -W -b latex doc/source doc/build/pdf |
|
make -C doc/build/pdf |
|
|
|
[flake8] |
|
# H803 skipped on purpose per list discussion. |
|
# H302 import only modules |
|
# E123 skipped as they are invalid PEP-8. |
|
# H904 Wrap long lines in parentheses instead of a backslash |
|
show-source = True |
|
ignore = E123,H803,H302,H904 |
|
builtins = _ |
|
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,.tmp |
|
import-order-style = pep8 |
|
|
|
[hacking] |
|
import_exceptions = networking_l2gw._i18n |
|
|
|
[testenv:bindep] |
|
basepython = python3 |
|
# Do not install any requirements. We want this to be fast and work even if |
|
# system dependencies are missing, since it's used to tell you what system |
|
# dependencies are missing! This also means that bindep must be installed |
|
# separately, outside of the requirements files, and develop mode disabled |
|
# explicitly to avoid unnecessarily installing the checked-out repo too (this |
|
# further relies on "tox.skipsdist = True" above). |
|
deps = bindep |
|
commands = bindep test |
|
usedevelop = False |
|
|
|
[testenv:lower-constraints] |
|
basepython = python3 |
|
deps = |
|
-c{toxinidir}/lower-constraints.txt |
|
-r{toxinidir}/test-requirements.txt |
|
-r{toxinidir}/requirements.txt |
|
|
|
[testenv:dev] |
|
# run locally (not in the gate) using editable mode |
|
# https://pip.pypa.io/en/stable/reference/pip_install/#editable-installs |
|
commands = |
|
pip install -q -e "git+https://opendev.org/openstack/neutron#egg=neutron" |
|
|
|
[testenv:py3-dev] |
|
basepython = python3 |
|
commands = |
|
{[testenv:dev]commands} |
|
{[testenv]commands} |
|
|
|
[testenv:pep8-dev] |
|
deps = |
|
{[testenv]deps} |
|
commands = |
|
{[testenv:dev]commands} |
|
{[testenv:pep8]commands}
|
|
|