cloudkitty/tox.ini
Pierre Riteau 386f086a8b [docs] Install cloudkitty requirements using constraints
The deps configuration for the docs environment only uses upper
constraints for doc/requirements.txt. However, cloudkitty also gets
installed automatically without upper constraints, which produces
various errors on older branches.

Install cloudkitty requirements using constraints to fix this issue.

Change-Id: Ia6f12151be829be6d2f21b3536536697345e05f4
2022-10-03 16:34:02 +02:00

101 lines
2.9 KiB
INI

[tox]
minversion = 3.18.0
skipsdist = True
envlist = py3,pep8
ignore_basepython_conflict = True
[testenv]
basepython = python3
allowlist_externals = rm
setenv = VIRTUAL_ENV={envdir}
PYTHONWARNINGS=default::DeprecationWarning
usedevelop = True
deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands =
/usr/bin/find . -type f -name "*.py[co]" -delete
rm -f .testrepository/times.dbm
stestr run {posargs}
[testenv:debug]
commands = oslo_debug_helper {posargs}
[testenv:pep8]
commands =
flake8 {posargs} cloudkitty
doc8 {posargs}
[testenv:bandit]
deps = -r{toxinidir}/test-requirements.txt
commands = bandit -r cloudkitty -n5 -x cloudkitty/tests/* -ll
[testenv:cover]
setenv =
VIRTUAL_ENV={envdir}
PYTHON=coverage run --source cloudkitty --parallel-mode
commands =
stestr run {posargs}
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml
coverage report
[testenv:genconfig]
commands =
oslo-config-generator --config-file etc/oslo-config-generator/cloudkitty.conf
[testenv:genpolicy]
commands = oslopolicy-sample-generator --config-file=etc/oslo-policy-generator/cloudkitty.conf
[testenv:docs]
deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/requirements.txt
-r{toxinidir}/doc/requirements.txt
commands = sphinx-build -W --keep-going -b html doc/source doc/build/html
# TODO(smcginnis) Temporarily disabling this as it fails. Error is that
# something is too large, likely from pulling in one of the conf sample files
# [testenv:pdf-docs]
# envdir = {toxworkdir}/docs
# allowlist_externals =
# make
# commands =
# sphinx-build -W --keep-going -b latex doc/source doc/build/pdf
# make -C doc/build/pdf
[testenv:venv]
commands = {posargs}
[flake8]
filename = *.py,app.wsgi
exclude = .git,.venv,.tox,dist,doc,*egg,build,.ropeproject,releasenotes
[doc8]
ignore-path = .venv,.git,.tox,.tmp,*cloudkitty/locale*,*lib/python*,cloudkitty.egg*,doc/build,releasenotes/*
[hacking]
import_exceptions = cloudkitty.i18n
[flake8:local-plugins]
extension =
C310 = checks:CheckLoggingFormatArgs
C311 = checks:validate_assertIsNone
C312 = checks:validate_assertTrue
C313 = checks:no_translate_logs
C314 = checks:CheckForStrUnicodeExc
C315 = checks:CheckForTransAdd
C317 = checks:check_oslo_namespace_imports
C318 = checks:dict_constructor_with_list_copy
C319 = checks:no_xrange
C320 = checks:no_log_warn_check
C321 = checks:check_explicit_underscore_import
C322 = checks:assert_raises_regexp
paths = ./cloudkitty/hacking
[testenv:releasenotes]
deps = {[testenv:docs]deps}
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees --keep-going -b html releasenotes/source releasenotes/build/html