[tox] minversion = 2.0 envlist = py38,py36,pep8 skipsdist = True ignore_basepython_conflict = True [testenv] basepython = python3 usedevelop = True install_command = pip install {opts} {packages} setenv = VIRTUAL_ENV={envdir} deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/2023.1} -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt allowlist_externals = find rm commands = find . -type f -name "*.pyc" -delete rm -f .testrepository/times.dbm stestr run {posargs} [testenv:pep8] allowlist_externals = {toxinidir}/tools/check_for_alembic_branches.sh commands = flake8 {toxinidir}/tools/check_for_alembic_branches.sh [testenv:venv] commands = {posargs} [testenv:cover] setenv = {[testenv]setenv} PYTHON=coverage run --source solum --parallel-mode commands = stestr run {posargs} coverage combine coverage html -d cover coverage xml -o cover/coverage.xml [testenv:debug] commands = oslo_debug_helper -t solum/tests {posargs} [testenv:docs] deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/2023.1} -r{toxinidir}/requirements.txt -r{toxinidir}/doc/requirements.txt commands = sphinx-build -W -b html doc/source doc/build/html [testenv:pdf-docs] deps = {[testenv:docs]deps} allowlist_externals = make commands = sphinx-build -W -b latex doc/source doc/build/pdf make -C doc/build/pdf [testenv:genconfig] commands = oslo-config-generator --config-file=etc/solum/config-generator.conf [testenv:genpolicy] commands = oslopolicy-sample-generator --config-file=etc/solum/policy-generator.conf [testenv:releasenotes] deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/2023.1} -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 [flake8] show-source = True builtins = _ exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build [hacking] import_exceptions = solum.i18n [flake8:local-plugins] extension = M322 = checks:no_mutable_default_args paths = ./solum/hacking [testenv:bandit] deps = -r{toxinidir}/test-requirements.txt commands = bandit -r solum -n5 -x tests -ll [testenv:bandit-baseline] envdir = {toxworkdir}/bandit commands = bandit-baseline -r solum -n5 -x tests -ii -ll