group-based-policy/tox.ini

114 lines
3.9 KiB
INI
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[tox]
envlist = py38,py39,py310,pep8
minversion = 3.18.0
skipsdist = False
ignore_basepython_conflict = True
[testenv]
basepython = {env:TOX_PYTHON:python3}
setenv = VIRTUAL_ENV={envdir}
OS_LOG_CAPTURE={env:OS_LOG_CAPTURE:true}
OS_STDOUT_CAPTURE={env:OS_STDOUT_CAPTURE:true}
OS_STDERR_CAPTURE={env:OS_STDERR_CAPTURE:true}
PYTHONWARNINGS=default::DeprecationWarning
passenv =
TRACE_FAILONLY
GENERATE_HASHES
http_proxy
HTTP_PROXY
https_proxy
HTTPS_PROXY
no_proxy
NO_PROXY
usedevelop = True
install_command =
pip install {opts} {packages}
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/2023.1}
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
whitelist_externals = sh
commands = stestr run {posargs}
[testenv:hashtest]
# This is the same as default environment, but with a random PYTHONHASHSEED.
# You can also specify a specific hashseed (for test repeatability) as follows:
# tox --hashseed 1235130571 -e hashtest
setenv = VIRTUAL_ENV={envdir}
[testenv:functional]
basepython = {env:TOX_PYTHON:python3}
setenv = OS_TEST_PATH=./gbpservice/tests/functional
OS_SUDO_TESTING=1
[testenv:dsvm-functional]
basepython = python3
setenv = OS_TEST_PATH=./gbpservice/tests/functional
OS_SUDO_TESTING=1
OS_ROOTWRAP_CMD=sudo /usr/local/bin/neutron-rootwrap /etc/neutron/rootwrap.conf
OS_FAIL_ON_MISSING_DEPS=1
sitepackages=True
[tox:jenkins]
sitepackages = True
[testenv:pep8]
basepython = {env:TOX_PYTHON:python3}
commands =
flake8
gbp-db-manage check_migration
[testenv:i18n]
commands =
python ./tools/check_i18n.py ./neutron ./tools/i18n_cfg.py
[testenv:cover]
basepython = python3
commands =
coverage erase
coverage run -m testtools.run
coverage report --include="*gbpservice*" --omit="*test*" --omit="*.tox*" --omit="*nfp*" -m
[testenv:venv]
commands = {posargs}
[testenv:docs]
commands = python setup.py build_sphinx
[flake8]
# E125 continuation line does not distinguish itself from next logical line - REVISIT
# E126 continuation line over-indented for hanging indent
# E128 continuation line under-indented for visual indent
# E129 visually indented line with same indent as next logical line - REVISIT
# E402 module level import not at top of file - REVISIT
# E731 do not assign a lambda expression, use a def - REVISIT
# E741 ambiguous variable name - REVISIT
# F601 dictionary key name repeated with different values - REVISIT
# F811 redefinition of unused variable - REVISIT
# F812 list comprehension redefines name from line - REVISIT
# H214: Use assertIn/NotIn(A, B) rather than assertTrue/False(A in/not in B) when checking collection contents - REVISIT
# H216 The unittest.mock module should be used rather than the third party mock package unless actually needed
# H237 module is removed in Python 3 - REVISIT
# H301: one import per line - REVISIT
# H306: imports not in alphabetical order (time, os) - REVISIT
# H401 docstring should not start with a space - REVISIT
# H404 multi line docstring should start with a summary - REVISIT
# H405 multi line docstring summary not separated with an empty line
# N530 direct neutron imports not allowed
# W504 line break after binary operator - REVISIT
# W605 invalid escape sequence - REVISIT
ignore = E125,E126,E128,E129,E402,E731,E741,F601,F811,F812,H214,H216,H237,H301,H306,H401,H404,H405,N530,W504,W605
# H106: Dont put vim configuration in source files
# H203: Use assertIs(Not)None to check for None
# H204: Use assert(Not)Equal to check for equality
# H205: Use assert(Greater|Less)(Equal) for comparison
# H904: Delay string interpolations at logging calls
enable-extensions = H106,H203,H204,H205,H904
show-source = true
exclude = .venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,tools,.ropeproject,rally-scenarios,
import-order-style = pep8
[hacking]
import_exceptions = neutron.openstack.common.gettextutils
local-check-factory = neutron_lib.hacking.checks.factory