blazar-dashboard/tox.ini
Pierre Riteau 0a4fc6a160 Remove Python 3.8 support and replace pytz code
Python 3.8 is no longer part of the tested runtimes for 2024.2 [1]
because its EOL is coming soon.

Python >= 3.9 provides the zoneinfo module to manipulate timezones. This
change replaces the usage of pytz, which was an implicit dependency
recently removed from Horizon [2].

[1] https://governance.openstack.org/tc/reference/runtimes/2024.2.html
[2] https://review.opendev.org/c/openstack/horizon/+/921651

Change-Id: If1f6627047787ae1965d5e66a2e73ad539a44039
2024-09-12 09:07:50 +02:00

73 lines
2.2 KiB
INI

[tox]
envlist = py3,pep8
minversion = 3.18.0
ignore_basepython_conflict = True
[testenv]
basepython = python3
usedevelop = True
setenv = VIRTUAL_ENV={envdir}
NOSE_WITH_OPENSTACK=1
NOSE_OPENSTACK_COLOR=1
NOSE_OPENSTACK_RED=0.05
NOSE_OPENSTACK_YELLOW=0.025
NOSE_OPENSTACK_SHOW_ELAPSED=1
install_command = pip install {opts} {packages}
deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands =
python manage.py test {posargs} --settings=blazar_dashboard.test.settings
[testenv:pep8]
commands = flake8 {posargs}
[testenv:venv]
commands = {posargs}
[testenv:cover]
commands =
coverage erase
coverage run {toxinidir}/manage.py test blazar_dashboard --settings=blazar_dashboard.test.settings {posargs} --exclude-dir=blazar_dashboard/test/integration_tests {posargs}
coverage xml --omit '.tox/cover/*' -o 'cover/coverage.xml'
coverage html --omit '.tox/cover/*' -d 'cover/htmlcov'
[testenv:eslint]
allowlist_externals = npm
commands =
npm install
npm run postinstall
npm run lint
[testenv:docs]
deps =
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-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 --keep-going -b latex doc/source doc/build/pdf
make -C doc/build/pdf
[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 --keep-going -b html releasenotes/source releasenotes/build/html
[flake8]
# F405 TEMPLATES may be undefined, or defined from star imports
# (because it is not easy to avoid this in openstack_dashboard.test.settings)
# W504 line break after binary operator
ignore = F405,W504
exclude = .venv,.git,.tox,dist,*lib/python*,*egg,build,node_modules
max-complexity = 20
[testenv:bandit]
deps = -r{toxinidir}/test-requirements.txt
commands = bandit -r blazar_dashboard -l -n 5 -x blazar_dashboard/test