fc8c53f221
OpenStack is dropping the py2.7 support in ussuri cycle. monasca-notification is ready with python 3 and ok to drop the python 2.7 support. Complete discussion & schedule can be found in - http://lists.openstack.org/pipermail/openstack-discuss/2019-October/010142.html - https://etherpad.openstack.org/p/drop-python2-support Ussuri Communtiy-wide goal: https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html Depends-On: https://review.opendev.org/#/c/693631/ Change-Id: Ic69f559bc0bcd791fa33a978cd27cf1de10dba2d
97 lines
2.5 KiB
INI
97 lines
2.5 KiB
INI
[tox]
|
|
envlist = py37,pep8,cover
|
|
minversion = 2.7
|
|
skipsdist = True
|
|
|
|
[testenv]
|
|
basepython = python3
|
|
setenv =
|
|
VIRTUAL_ENV={envdir}
|
|
OS_TEST_PATH=tests
|
|
passenv =
|
|
*_proxy
|
|
*_PROXY
|
|
usedevelop = True
|
|
install_command = pip install {opts} {packages}
|
|
whitelist_externals = bash
|
|
find
|
|
rm
|
|
deps =
|
|
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
|
-r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
.[jira_plugin]
|
|
commands =
|
|
find . -type f -name "*.pyc" -delete
|
|
stestr run {posargs}
|
|
|
|
[testenv:cover]
|
|
commands =
|
|
coverage erase
|
|
python setup.py test --coverage --testr-args='{posargs}' \
|
|
--coverage-package-name=monasca_notification
|
|
coverage report
|
|
|
|
[testenv:debug]
|
|
commands =
|
|
oslo_debug_helper -t ./monasca_notification/tests {posargs}
|
|
|
|
[testenv:pep8]
|
|
commands =
|
|
{[testenv:flake8]commands}
|
|
{[testenv:bandit]commands}
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
|
|
[testenv:flake8]
|
|
commands =
|
|
flake8 monasca_notification
|
|
flake8 tests
|
|
|
|
[testenv:bandit]
|
|
commands =
|
|
bandit -r monasca_notification -n5 -x monasca_notification/tests
|
|
|
|
[testenv:genconfig]
|
|
description = Generates an example of monasca-notification configuration file
|
|
commands = oslo-config-generator \
|
|
--config-file={toxinidir}/config-generator/notification.conf
|
|
|
|
[flake8]
|
|
max-line-length = 100
|
|
# TODO: ignored checks should be enabled in the future
|
|
# H201 no 'except:' at least use 'except Exception:'
|
|
# H202: assertRaises Exception too broad
|
|
# H405 multi line docstring summary not separated with an empty line
|
|
ignore = F821,H201,H202,H405
|
|
exclude=.venv,.git,.tox,dist,*egg,build
|
|
|
|
[hacking]
|
|
import_exceptions =
|
|
six.moves
|
|
|
|
[testenv:lower-constraints]
|
|
deps =
|
|
-c{toxinidir}/lower-constraints.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
-r{toxinidir}/requirements.txt
|
|
.[jira_plugin]
|
|
|
|
[testenv:releasenotes]
|
|
deps = -r{toxinidir}/doc/requirements.txt
|
|
commands =
|
|
sphinx-build -a -E -W -d releasenotes/build/doctrees -b html \
|
|
releasenotes/source releasenotes/build/html
|
|
|
|
[testenv:bindep]
|
|
# Do not install any requirements. We want this to be fast and work even if
|
|
# system dependencies are missing, since it's used to tell you what system
|
|
# dependencies are missing! This also means that bindep must be installed
|
|
# separately, outside of the requirements files, and develop mode disabled
|
|
# explicitly to avoid unnecessarily installing the checked-out repo too (this
|
|
# further relies on "tox.skipsdist = True" above).
|
|
deps = bindep
|
|
commands = bindep test
|
|
usedevelop = False
|