
Gating jobs started to fail with latest pyproject-api (1.6.1) release. This release would need latest tox (4.11.0) to not fail, but we are pinning tox via pinning virtualenv in tox.ini. To resolve this we have to remove the virtualenv pinning, which was a "temporary" hack to avoid py3*-check-uc jobs to break. This job is failing because of ryu package, which is unmaintained and projects started to use os_ken instead, which "is a fork of the Ryu library tailored for OpenStack Neutron" [1]. Hence, this patch removes ryu from requirements files to eliminate the need of pinning virtualenv. [1] https://opendev.org/openstack/os-ken Change-Id: I23ba892e6dd7f2566e5af6626c072c2dcc5a4382
137 lines
4.2 KiB
INI
137 lines
4.2 KiB
INI
[tox]
|
|
minversion = 4.11.0
|
|
envlist = validate,py3,pep8,pip-install
|
|
ignore_basepython_conflict=true
|
|
|
|
[testenv]
|
|
basepython = python3
|
|
usedevelop = True
|
|
deps = -c{toxinidir}/upper-constraints.txt
|
|
-r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
commands =
|
|
stestr run {posargs}
|
|
|
|
[testenv:py38-check-uc]
|
|
allowlist_externals =
|
|
check-conflicts
|
|
basepython = python3.8
|
|
deps = -r{toxinidir}/upper-constraints.txt
|
|
commands = check-conflicts {toxinidir}/upper-constraints.txt {toxinidir}/upper-constraints-xfails.txt
|
|
|
|
[testenv:py39-check-uc]
|
|
allowlist_externals =
|
|
check-conflicts
|
|
basepython = python3.9
|
|
deps = -r{toxinidir}/upper-constraints.txt
|
|
commands = check-conflicts {toxinidir}/upper-constraints.txt {toxinidir}/upper-constraints-xfails.txt
|
|
|
|
[testenv:py310-check-uc]
|
|
basepython = python3.10
|
|
deps = -r{toxinidir}/upper-constraints.txt
|
|
commands = check-conflicts {toxinidir}/upper-constraints.txt {toxinidir}/upper-constraints-xfails.txt
|
|
|
|
[testenv:py311-check-uc]
|
|
basepython = python3.11
|
|
deps = -r{toxinidir}/upper-constraints.txt
|
|
commands = check-conflicts {toxinidir}/upper-constraints.txt {toxinidir}/upper-constraints-xfails.txt
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
|
|
[testenv:update]
|
|
allowlist_externals =
|
|
update-requirements
|
|
commands = update-requirements {posargs}
|
|
|
|
[testenv:generate]
|
|
allowlist_externals =
|
|
generate-constraints
|
|
description = Regenerates upper-constraints.txt
|
|
# Generate needs an unconstrained install to get new dependencies
|
|
deps = -r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
commands = generate-constraints {posargs: -b blacklist.txt -r global-requirements.txt -p python3.6 -p python3.7 -p python3.8 -p python3.9 -p python3.10 > upper-constraints.txt}
|
|
|
|
[testenv:validate]
|
|
allowlist_externals =
|
|
validate-constraints
|
|
commands =
|
|
validate-constraints {toxinidir}/global-requirements.txt {toxinidir}/upper-constraints.txt {toxinidir}/blacklist.txt
|
|
|
|
[testenv:validate-projects]
|
|
allowlist_externals =
|
|
validate-projects
|
|
commands = validate-projects {toxinidir}/projects.txt
|
|
|
|
# TODO remove once zuul reconfigured to run linters on gate
|
|
[testenv:pep8]
|
|
deps = {[testenv:linters]deps}
|
|
allowlist_externals =
|
|
bash
|
|
commands =
|
|
flake8
|
|
bash -c "find {toxinidir}/tools \
|
|
-type f \
|
|
-name \*.sh \
|
|
-print0 | xargs -0 bashate -v -iE006,E010"
|
|
bash -c 'sed -e "s,===,==," upper-constraints.txt > {envtmpdir}/safety-check.txt'
|
|
-safety check --json -r {envtmpdir}/safety-check.txt
|
|
|
|
[testenv:linters]
|
|
description = Perform linting
|
|
deps =
|
|
hacking>=1.0.0
|
|
bashate>=0.5.1
|
|
safety
|
|
allowlist_externals =
|
|
bash
|
|
commands =
|
|
flake8
|
|
bash -c "find {toxinidir}/tools \
|
|
-type f \
|
|
-name \*.sh \
|
|
-print0 | xargs -0 bashate -v -iE006,E010"
|
|
bash -c 'sed -e "s,===,==," upper-constraints.txt > {envtmpdir}/safety-check.txt'
|
|
-safety check --json -r {envtmpdir}/safety-check.txt
|
|
|
|
[testenv:bindep]
|
|
# 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:docs]
|
|
allowlist_externals =
|
|
sphinx-build
|
|
deps = -c{env:TOX_CONSTRAINTS_FILE:{toxinidir}/upper-constraints.txt}
|
|
-r{toxinidir}/doc/requirements.txt
|
|
commands = sphinx-build -W -b html doc/source doc/build/html
|
|
|
|
[testenv:pip-install]
|
|
recreate = True
|
|
deps = .
|
|
commands = python {toxinidir}/tools/check-install.py
|
|
|
|
[testenv:requirements-check]
|
|
allowlist_externals =
|
|
{toxinidir}/playbooks/files/project-requirements-change.py
|
|
deps = -r{toxinidir}/requirements.txt
|
|
commands =
|
|
{toxinidir}/playbooks/files/project-requirements-change.py --local {posargs}
|
|
|
|
[testenv:babel]
|
|
# Use the local upper-constraints.txt file
|
|
allowlist_externals =
|
|
{toxinidir}/tools/babel-test.sh
|
|
deps = Babel
|
|
commands = {toxinidir}/tools/babel-test.sh
|
|
|
|
[flake8]
|
|
exclude = .venv,.git,.tox,dist,doc,*egg,build
|