e8c7b2ad73
Modify code to conform to flake8 and pylint. Jobs are now flake8, pylint, py39 and metadata. Add bindep.txt Deprecate old py27,py36 testenvs from tox.ini in the python package folder in favor of py39 instead. However, keep the root folder tox.ini py36 job because that test is checking code other than the python package. Test Plan PASS - All zuul jobs pass as expected. Story: 2010929 Task: 49280 Change-Id: Ic64ad41a3bf6454dd9ea0f6e862c3b31a0541660 Signed-off-by: Reed, Joshua <Joshua.Reed@windriver.com>
76 lines
2.0 KiB
INI
76 lines
2.0 KiB
INI
[tox]
|
|
envlist = linters,py36
|
|
minversion = 2.3
|
|
skipsdist = True
|
|
sitepackages=False
|
|
|
|
[testenv]
|
|
install_command = pip install -U {opts} {packages}
|
|
setenv =
|
|
VIRTUAL_ENV={envdir}
|
|
OS_STDOUT_CAPTURE=1
|
|
OS_STDERR_CAPTURE=1
|
|
OS_DEBUG=1
|
|
OS_LOG_CAPTURE=1
|
|
deps =
|
|
-r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
allowlist_externals =
|
|
bash
|
|
|
|
[testenv:py36]
|
|
basepython = python3.6
|
|
setenv =
|
|
TESTPATH=./notificationservice-base-v2/docker/ptptrackingfunction/trackingfunctionsdk/tests/
|
|
commands =
|
|
unit2 discover -s ./notificationservice-base-v2/docker/ptptrackingfunction
|
|
deps =
|
|
-r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
|
|
[testenv:bashate]
|
|
# Treat all E* codes as Errors rather than warnings using: -e 'E*'
|
|
commands =
|
|
bash -c "find {toxinidir} \
|
|
-not \( -type d -name .?\* -prune \) \
|
|
-type f \
|
|
-not -name \*~ \
|
|
-not -name \*.md \
|
|
-name \*.sh \
|
|
-print0 | xargs -r -n 1 -0 bashate -v \
|
|
-e 'E*'"
|
|
|
|
[testenv:linters]
|
|
commands =
|
|
{[testenv:bashate]commands}
|
|
|
|
[testenv:docs]
|
|
basepython = python3
|
|
install_command = pip install -U {opts} {packages}
|
|
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
|
|
allowlist_externals = rm
|
|
|
|
[testenv:api-ref]
|
|
basepython = python3
|
|
install_command = pip install -U {opts} {packages}
|
|
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
|
|
allowlist_externals = rm
|
|
|
|
[testenv:pylint]
|
|
basepython = python3
|
|
description = Dummy environment to allow pylint to be run in subdir tox
|
|
|
|
[testenv:flake8]
|
|
basepython = python3
|
|
description = Dummy environment to allow flake8 to be run in subdir tox
|
|
|
|
[testenv:metadata]
|
|
basepython = python3
|
|
description = Dummy environment to allow sysinv-app to be run in subdir tox
|