
- The reference to cgcs_patch was the older centos python2 location, and has now bee updated to the python3 debian package. - Removed 'legacy-resolver' from the pip install command. - The basepython is now python3 and the upper-constraints for debian and python3 are now specified. - The older python2 to 3 conversion directives in pylint have been removed, and only the errors that are currently valid are being suppressed. - The python2 vs python3 requirements are now updated to only reflect python3. - The zuul job for pylint specifies the debian nodeset. - override tox constraints file to use the STX constraints This means starlingx/root needs to be a required project None of these changes have any runtime effect. These changes only affect tox and zuul. Test Plan: PASS: tox Story: 2010642 Task: 47916 Change-Id: I1cd8a78e5e26efc4b3d4b346749735e4de9f6016 Signed-off-by: Al Bailey <al.bailey@windriver.com>
102 lines
3.3 KiB
INI
102 lines
3.3 KiB
INI
[tox]
|
|
envlist = pep8,linters,pylint
|
|
minversion = 2.3
|
|
skipsdist = True
|
|
stxdir = {toxinidir}/..
|
|
|
|
# Note: STX_DC_CLIENT is set by zuul to be distcloud-client, it is
|
|
# defaulted here to the path that works in developer environments
|
|
[testenv]
|
|
basepython = python3
|
|
install_command = pip install \
|
|
-v -v -v \
|
|
-c{env:TOX_CONSTRAINTS_FILE:https://opendev.org/starlingx/root/raw/branch/master/build-tools/requirements/debian/upper-constraints.txt} \
|
|
{opts} {packages}
|
|
|
|
setenv = VIRTUAL_ENV={envdir}
|
|
OS_STDOUT_CAPTURE=1
|
|
OS_STDERR_CAPTURE=1
|
|
OS_TEST_TIMEOUT=60
|
|
STX_DC_CLIENT = {env:STX_DC_CLIENT:distributedcloud-client}
|
|
deps = -r{toxinidir}/test-requirements.txt
|
|
usedevelop = False
|
|
|
|
[testenv:linters]
|
|
allowlist_externals = bash
|
|
commands =
|
|
bash -c "find {toxinidir} \
|
|
-not \( -type d -name .?\* -prune \) \
|
|
-type f \
|
|
-not -name \*~ \
|
|
-not -name \*.md \
|
|
-name \*.sh \
|
|
-print0 | xargs --no-run-if-empty -0 bashate -v"
|
|
bash -c "find {toxinidir} \
|
|
\( -name .tox -prune \) \
|
|
-o -type f -name '*.yaml' \
|
|
-print0 | xargs --no-run-if-empty -0 yamllint"
|
|
|
|
[flake8]
|
|
# H102 Apache 2.0 license header not found
|
|
# W503 line break before binary operator
|
|
# W504 line break after binary operator
|
|
# E741 ambiguous variable name 'l'
|
|
ignore = H102,W503,W504,E741
|
|
# H106 Do not put vim configuration in source files (off by default).
|
|
# H203 Use assertIs(Not)None to check for None (off by default).
|
|
# H904 Delay string interpolations at logging calls (off by default).
|
|
enable-extensions = H106,H203,H904
|
|
|
|
[testenv:pep8]
|
|
skip_install = True
|
|
commands =
|
|
flake8
|
|
|
|
[testenv:pylint]
|
|
skip_install = True
|
|
deps = {[testenv]deps}
|
|
-e{[tox]stxdir}/{env:STX_DC_CLIENT}/distributedcloud-client
|
|
-e{[tox]stxdir}/config/sysinv/cgts-client/cgts-client
|
|
-e{[tox]stxdir}/config/sysinv/sysinv/sysinv
|
|
-e{[tox]stxdir}/fault/python-fmclient/fmclient
|
|
-e{[tox]stxdir}/ha/service-mgmt-client/sm-client
|
|
-e{[tox]stxdir}/nfv/nfv/nfv-client
|
|
-e{[tox]stxdir}/update/sw-patch/cgcs-patch
|
|
-e{[tox]stxdir}/utilities/ceph/python-cephclient/python-cephclient
|
|
horizon
|
|
requests-toolbelt
|
|
commands =
|
|
pylint starlingx-dashboard/starlingx-dashboard/starlingx_dashboard --rcfile=./pylint.rc
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
|
|
[testenv:docs]
|
|
deps = -r{toxinidir}/doc/requirements.txt
|
|
install_command = pip install -U {opts} {packages}
|
|
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:releasenotes]
|
|
deps = -r{toxinidir}/doc/requirements.txt
|
|
install_command = pip install -U {opts} {packages}
|
|
commands =
|
|
rm -rf releasenotes/build
|
|
sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
|
allowlist_externals =
|
|
rm
|
|
reno
|
|
|
|
[testenv:newnote]
|
|
# Re-use the releasenotes venv
|
|
envdir = {toxworkdir}/releasenotes
|
|
deps = -r{toxinidir}/doc/requirements.txt
|
|
install_command = pip install -U {opts} {packages}
|
|
commands = reno new {posargs}
|
|
|
|
[testenv:bandit]
|
|
description = Bandit code scan for *.py files under config folder
|
|
commands = bandit -r {toxinidir}/ -x '**/.tox/**,**/.eggs/**' -lll
|