[tox] minversion = 3.18.0 envlist = py3,pep8,functional-py3 ignore_basepython_conflict=true [testenv] usedevelop = True basepython = python3 setenv = VIRTUAL_ENV={envdir} PYTHONDONTWRITEBYTECODE = 1 LANGUAGE=en_US LC_ALL=en_US.UTF-8 PYTHONWARNINGS=default::DeprecationWarning deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt commands = stestr run --slowest {posargs} passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY [testenv:pep8] deps = hacking>=4.1.0,<5.0.0 # Apache-2.0 doc8>=0.6.0 # Apache-2.0 flake8-import-order>=0.17.1 # LGPLv3 pycodestyle>=2.0.0,<3.0.0 # MIT Pygments>=2.2.0 # BSD commands = flake8 ironic_inspector_client doc8 README.rst doc/source [testenv:functional-py3] deps = {[testenv]deps} -r{toxinidir}/functest-requirements.txt commands = python -m ironic_inspector_client.tests.functional {posargs} [testenv:functional-py38] basepython = python3.8 deps = {[testenv:functional-py3]deps} commands = {[testenv:functional-py3]commands} [testenv:func] # Replaced in CI with "functional" environment but kept here as a # backwards-compatibility shim for transition deps = {[testenv:functional-py3]deps} commands = {[testenv:functional-py3]commands} [testenv:venv] deps = -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} -r{toxinidir}/requirements.txt -r{toxinidir}/doc/requirements.txt commands = {posargs} [testenv:cover] setenv = {[testenv]setenv} PYTHON=coverage run --source ironic_inspector_client --omit='*tests*' --parallel-mode commands = coverage erase stestr run {posargs} coverage combine coverage report --omit='*tests*' coverage html -d ./cover --omit='*tests*' [testenv:releasenotes] deps = -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} -r{toxinidir}/requirements.txt -r{toxinidir}/doc/requirements.txt commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html [testenv:docs] deps = -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} -r{toxinidir}/requirements.txt -r{toxinidir}/functest-requirements.txt -r{toxinidir}/test-requirements.txt -r{toxinidir}/doc/requirements.txt commands = sphinx-build -W -b html doc/source doc/build/html [testenv:pdf-docs] allowlist_externals = make deps = {[testenv:docs]deps} commands = sphinx-build -W -b latex doc/source doc/build/pdf make -C doc/build/pdf [flake8] # [E741] ambiguous variable name # [W503] Line break before binary operator. ignore = E741,W503 exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build import-order-style = pep8 application-import-names = ironic_inspector_client max-complexity=15 # [H106] Don't 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. # [H210] Require ‘autospec’, ‘spec’, or ‘spec_set’ in mock.patch/mock.patch.object calls # [H904] Delay string interpolations at logging calls. enable-extensions=H106,H203,H204,H205,H210,H904 per-file-ignores = ironic_inspector_client/tests/functional.py:E402 [hacking] import_exceptions = ironic_inspector_client.common.i18n [testenv:lower-constraints] deps = -c{toxinidir}/lower-constraints.txt -r{toxinidir}/test-requirements.txt -r{toxinidir}/requirements.txt # This environment can be used to quickly validate that all needed system # packages required to successfully execute test targets are installed [testenv:bindep] # 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. deps = bindep commands = bindep test