# # Copyright (c) 2023 Wind River Systems, Inc. # # SPDX-License-Identifier: Apache-2.0 # [tox] envlist = pep8,py39,pylint minversion = 2.3.2 skipsdist = True stxdir = {toxinidir}/../.. [testenv] allowlist_externals = find sh basepython = python3 deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt -e{[tox]stxdir}/config/tsconfig/tsconfig install_command = pip install \ -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/starlingx/root/raw/branch/master/build-tools/requirements/debian/upper-constraints.txt} \ {opts} {packages} passenv = XDG_CACHE_HOME setenv = VIRTUAL_ENV={envdir} LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=C OS_STDERR_CAPTURE=1 OS_STDOUT_CAPTURE=1 OS_TEST_TIMEOUT=60 PYTHONDONTWRITEBYTECODE=True PYTHONHASHSEED=0 sitepackages = False usedevelop = true [bandit] exclude = tests skips = [testenv:bandit] commands = bandit --ini tox.ini -n 5 -r software_client [testenv:cover] setenv = {[testenv]setenv} PYTHON=coverage run --parallel-mode commands = coverage erase stestr run {posargs} coverage combine coverage html -d cover coverage xml -o cover/coverage.xml coverage report [flake8] # H106: Don't 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 exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build,release-tag-* max-line-length = 80 show-source = True ignore = E402,H306,H404,H405,W504,E501 [testenv:flake8] commands = flake8 {posargs} [testenv:pep8] commands = flake8 {posargs} [testenv:py39] basepython = python3.9 commands = stestr run {posargs} stestr slowest [testenv:pylint] commands = pylint software_client --rcfile=./pylint.rc [stestr] test_path=./software_client/tests top_dir=./ group_regex=([^\.]*\.)*