a9db350555
Removed py27 tox tests and added py38 in tox. Also fixed some pep8 violations.
128 lines
3.3 KiB
INI
128 lines
3.3 KiB
INI
[tox]
|
|
minversion = 2.0
|
|
envlist = py36,py37,py38,pep8
|
|
skipdist = True
|
|
|
|
[travis]
|
|
python =
|
|
3.8: py38
|
|
3.7: py37
|
|
3.6: py36
|
|
|
|
[testenv]
|
|
usedevelop = True
|
|
setenv =
|
|
VIRTUAL_EN={envdir}
|
|
OS_TEST_PATH=./rbd_iscsi_client/tests
|
|
OS_TEST_TIMEOUT=60
|
|
OS_STDOUT_CAPTURE=1
|
|
OS_STDERR_CAPTURE=1
|
|
PYTHONPATH = {toxinidir}
|
|
|
|
install_command = pip install {opts} {packages}
|
|
deps =
|
|
-c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt}
|
|
-r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
|
|
commands =
|
|
stestr run {posargs}
|
|
stestr slowest
|
|
|
|
whitelist_externals = bash
|
|
find
|
|
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
|
|
|
|
[testenv:pep8]
|
|
basepython = python3
|
|
envdir = {toxworkdir}/pep8
|
|
commands = flake8 {posargs}
|
|
|
|
[testenv:debug]
|
|
basepython = python3
|
|
commands =
|
|
find . type f -name "*.pyc" -delete
|
|
oslo_debug_helper {posargs}
|
|
|
|
[testenv:fast8]
|
|
basepython = python3
|
|
envdir = {toxworkdir}/pep8
|
|
commands =
|
|
{toxinidir}/tools/fast8.sh
|
|
|
|
[testenv:pylint]
|
|
basepython = python3
|
|
deps =
|
|
-c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt}
|
|
-r{toxinidir}/requirements.txt
|
|
pylint==0.26.0
|
|
commands = bash tools/lintstack.sh
|
|
|
|
[testenv:venv]
|
|
basepython = python3
|
|
commands = {posargs}
|
|
|
|
[testenv:cover]
|
|
basepython = python3
|
|
# To see the report of missing coverage add to commands
|
|
# coverage report --show-missing
|
|
setenv =
|
|
{[testenv]setenv}
|
|
PYTHON=coverage run --source rbd_iscsi_client --parallel-mode
|
|
commands =
|
|
stestr run {posargs}
|
|
coverage combine
|
|
coverage html -d cover
|
|
coverage xml -o cover/coverage/xml
|
|
|
|
[testenv:docs]
|
|
basepython = python3
|
|
commands = python setup.py build_sphinx
|
|
|
|
[testenv:releasenotes]
|
|
basepython = python3
|
|
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
|
|
|
|
|
[flake8]
|
|
# Following checks are ignored on purpose.
|
|
#
|
|
# E251 unexpected spaces around keyword / parameter equals
|
|
# reason: no improvement in readability
|
|
# W503 line break before binary operator
|
|
# reason: pep8 itself is not sure about this one and
|
|
# reversed this rule in 2016
|
|
# W504 line break after binary operator
|
|
# reason: no agreement on this being universally
|
|
# preferable for our code. Disabled to keep checking
|
|
# tools from getting in our way with regards to this.
|
|
#
|
|
show-source = True
|
|
ignore = E251,W503,W504
|
|
enable-extensions=H106,H203,H204,H205
|
|
builtins = _
|
|
exclude=.venv,.git,.tox,dist,*lib/python*,*egg,build
|
|
max-complexity=30
|
|
|
|
[hacking]
|
|
import_exceptions = rbd_iscsi_client.i18n
|
|
|
|
[testenv:bindep]
|
|
basepython = python3
|
|
# 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
|
|
|
|
[testenv:lower-constraints]
|
|
basepython = python3
|
|
deps =
|
|
-c{toxinidir}/lower-constraints.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
-r{toxinidir}/requirements.txt
|