distcloud/tox.ini
Al Bailey 501fa35af2 Update pylint for distributedcloud
The pylint that was specified as an upper constraint was not
as strict as the newer versions.

- Fixed or suppressed any new error codes being reported.
Suppressed error codes should be fixed by additional reviews.

- added a zuul target for pylint

- Added dcdbsync to the folders being processed by pylint.

- Removed the env:UPPER_CONSTRAINTS_FILE from tox.ini so that zuul
does not override the upper constraints with an newer version.

- Needed to add greenlet to the extension-pkg-whitelist since
runtime introspection of that component is not possible.

- oslo-messaging get_transport deprecated 'aliases' in pike, and
removed it in rocky. The packaged version in STX is 5.30.6
which still supports aliases. This requires us to explicitly
run tox with the version that we ship (pre-stein). This is
controlled by a local upper-constraints.txt file.
Related-Bug: 1865054

- Paste file handling reports a pylint issue which has been suppressed
Related-Bug: 1865085

Story: 2004515
Task: 38882
Change-Id: Ie7c8c2adab1eeb9100159a2aa29968a0b557e2e4
Signed-off-by: Al Bailey <Al.Bailey@windriver.com>
2020-02-27 15:02:43 -06:00

86 lines
2.2 KiB
INI

[tox]
envlist = linters
minversion = 2.3
skipsdist = True
[testenv]
install_command = pip install \
-c https://opendev.org/openstack/requirements/raw/branch/stable/stein/upper-constraints.txt \
{opts} {packages}
setenv =
VIRTUAL_ENV={envdir}
OS_STDOUT_CAPTURE=1
OS_STDERR_CAPTURE=1
OS_TEST_TIMEOUT=60
CURRENT_CFG_FILE={toxinidir}/.current.cfg
commands = find {toxinidir} -type f -not -path '{toxinidir}/.tox/*' -not -path '*/__pycache__/*' -name '*.py[c|o]' -delete
deps = -r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt
keyring
whitelist_externals =
rm
find
reno
[testenv:venv]
basepython = python3
commands = {posargs}
[testenv:flake8]
basepython = python3
description = Dummy environment to allow flake8 to be run in subdir tox
[testenv:pep8]
basepython = python3
description = Dummy environment to allow pep8 to be run in subdir tox
[testenv:pylint]
basepython = python3
description = Dummy environment to allow pylint to be run in subdir tox
[testenv:linters]
basepython = python3
whitelist_externals = bash
commands =
bash -c "find {toxinidir} \
\( -name .tox -prune \) \
-o -type f -name '*.yaml' \
-print0 | xargs -r -0 yamllint"
[testenv:docs]
basepython = python3
deps = -r{toxinidir}/doc/requirements.txt
commands =
rm -rf doc/build
sphinx-build -a -E -W -d doc/build/doctrees -b html doc/source doc/build/html
whitelist_externals = rm
[testenv:releasenotes]
basepython = python3
deps = -r{toxinidir}/doc/requirements.txt
commands =
rm -rf releasenotes/build
sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
whitelist_externals =
rm
reno
[testenv:newnote]
basepython = python3
# Re-use the releasenotes venv
envdir = {toxworkdir}/releasenotes
deps = -r{toxinidir}/doc/requirements.txt
commands = reno --rel-notes-dir {toxinidir}/releasenotes new {posargs}
[testenv:api-ref]
basepython = python3
deps =
-r{toxinidir}/doc/requirements.txt
commands =
rm -rf api-ref/build
sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html
whitelist_externals = rm