Files
ceilometer/tox.ini
jlarriba 8d5dd9fa57 Exclude .eggs dir from pep8 tests
Depending on how tox can be configured, there could be an .eggs
directory being created in the ceilometer root dir. That dir
should not be checked by pep8.

Change-Id: I0856657b25017fa1a6aaa97245502fcf13c84c90
Signed-off-by: jlarriba <jlarriba@redhat.com>
2025-09-04 09:50:04 +00:00

105 lines
2.8 KiB
INI

[tox]
minversion = 3.18.0
envlist = py3{9,12},pep8
ignore_basepython_conflict=true
[testenv]
basepython = python3
deps =
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
usedevelop = True
setenv =
CEILOMETER_TEST_BACKEND={env:CEILOMETER_TEST_BACKEND:none}
passenv =
OS_TEST_TIMEOUT
OS_STDOUT_CAPTURE
OS_STDERR_CAPTURE
OS_LOG_CAPTURE
CEILOMETER_*
commands =
stestr run {posargs}
oslo-config-generator --config-file=etc/ceilometer/ceilometer-config-generator.conf
allowlist_externals = bash
[testenv:cover]
setenv =
PYTHON=coverage run --source ceilometer --parallel-mode
commands =
stestr run {posargs}
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml
[testenv:pep8]
skip_install = true
deps =
pre-commit
commands =
pre-commit run -a
[testenv:releasenotes]
deps =
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/doc/requirements.txt
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[testenv:genconfig]
commands = oslo-config-generator --config-file=etc/ceilometer/ceilometer-config-generator.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 --keep-going -b html -j auto doc/source doc/build/html
setenv = PYTHONHASHSEED=0
[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:debug]
allowlist_externals =
find
commands =
find . -type f -name "*.pyc" -delete
oslo_debug_helper {posargs}
[testenv:venv]
commands = {posargs}
setenv = PYTHONHASHSEED=0
[doc8]
ignore = D000
ignore-path = .venv,.git,.tox,.eggs,*ceilometer/locale*,*lib/python*,ceilometer.egg*,doc/build,doc/source/api,releasenotes/*
[flake8]
# E123 closing bracket does not match indentation of opening bracket's line
# W503 line break before binary operator
# W504 line break after binary operator
ignore = E123,W503,W504
exclude=.venv,.git,.tox,.eggs,dist,doc,*lib/python*,*egg,build,install-guide
# [H106] Do not 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
[hacking]
import_exceptions =
ceilometer.i18n
[flake8:local-plugins]
extension =
C301 = checks:no_log_warn
C302 = checks:no_os_popen
paths = ./ceilometer/hacking