[tox] minversion = 2.0 envlist = py3,py27,pep8,functional [testenv] install_command = pip install {opts} {packages} usedevelop = True 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 commands = coverage run --branch --include "ironic_inspector_client*" -m unittest discover ironic_inspector_client.test coverage report -m --fail-under 90 setenv = PYTHONDONTWRITEBYTECODE=1 passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY [testenv:pep8] basepython = python3 commands = flake8 ironic_inspector_client doc8 README.rst doc/source [testenv:functional] basepython = python2.7 deps = {[testenv]deps} -r{toxinidir}/functest-requirements.txt commands = python -m ironic_inspector_client.test.functional {posargs} [testenv:functional-py3] basepython = python3 deps = {[testenv]deps} -r{toxinidir}/functest-requirements.txt commands = python -m ironic_inspector_client.test.functional {posargs} [testenv:functional-py36] basepython = python3.6 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 basepython = python3 deps = {[testenv:functional]deps} commands = {[testenv:functional]commands} [testenv:venv] basepython = python3 deps = -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt} -r{toxinidir}/requirements.txt -r{toxinidir}/doc/requirements.txt commands = {posargs} [testenv:releasenotes] basepython = python3 deps = -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt} -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] basepython = python3 deps = -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt} -r{toxinidir}/requirements.txt -r{toxinidir}/doc/requirements.txt commands = sphinx-build -W -b html doc/source doc/build/html [testenv:pdf-docs] basepython = python3 whitelist_externals = make deps = {[testenv:docs]deps} commands = sphinx-build -W -b latex doc/source doc/build/pdf make -C doc/build/pdf [flake8] 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. # [H904] Delay string interpolations at logging calls. enable-extensions=H106,H203,H204,H205,H904 [hacking] import_exceptions = ironic_inspector_client.common.i18n [testenv:lower-constraints] basepython = python3 deps = -c{toxinidir}/lower-constraints.txt -r{toxinidir}/test-requirements.txt -r{toxinidir}/requirements.txt