11[tox]
22minversion = 4.11.0
33envlist = validate,py3,pep8,pip-install
4- ignore_basepython_conflict =true
54
65[testenv]
7- basepython = python3
8- usedevelop = True
9- deps = -c{toxinidir}/upper-constraints.txt
10- -r{toxinidir}/requirements.txt
11- -r{toxinidir}/test-requirements.txt
6+ usedevelop = true
7+ deps =
8+ -c{toxinidir}/upper-constraints.txt
9+ -r{toxinidir}/requirements.txt
10+ -r{toxinidir}/test-requirements.txt
1211commands =
1312 stestr run {posargs}
1413
@@ -40,72 +39,56 @@ allowlist_externals =
4039 generate-constraints
4140description = Regenerates upper-constraints.txt
4241# Generate needs an unconstrained install to get new dependencies
43- deps = -r{toxinidir}/requirements.txt
44- -r{toxinidir}/test-requirements.txt
42+ deps =
43+ -r{toxinidir}/requirements.txt
44+ -r{toxinidir}/test-requirements.txt
4545commands = generate-constraints {posargs: -d denylist.txt -r global-requirements.txt -p python3.9 -p python3.10 -p python3.11 -p python3.12 -p python3.13 > upper-constraints.txt}
4646
4747[testenv:validate]
4848allowlist_externals =
4949 validate-constraints
5050commands =
51- validate-constraints {toxinidir}/global-requirements.txt {toxinidir}/upper-constraints.txt {toxinidir}/denylist.txt
51+ validate-constraints {toxinidir}/global-requirements.txt {toxinidir}/upper-constraints.txt {toxinidir}/denylist.txt
5252
5353[testenv:validate-projects]
5454allowlist_externals =
5555 validate-projects
5656commands = validate-projects {toxinidir}/projects.txt
5757
58- # TODO remove once zuul reconfigured to run linters on gate
5958[testenv:pep8]
60- deps = {[testenv:linters]deps}
61- allowlist_externals =
62- bash
63- commands =
64- flake8
65- bash -c " find {toxinidir}/tools \
66- -type f \
67- -name \*.sh \
68- -print0 | xargs -0 bashate -v -iE006,E010"
69- bash -c ' sed -e "s,===,==," upper-constraints.txt > {envtmpdir}/safety-check.txt'
70- -safety check --json -r {envtmpdir}/safety-check.txt
71-
72- [testenv:linters]
7359description = Perform linting
60+ skip_install = true
7461deps =
75- hacking>=1.0.0
76- bashate>=0.5.1
77- safety
62+ hacking~=7.0 # Apache-2.0
63+ bashate~=2.1 # Apache-2.0
7864allowlist_externals =
7965 bash
8066commands =
81- flake8
82- bash -c " find {toxinidir}/tools \
83- -type f \
84- -name \*.sh \
85- -print0 | xargs -0 bashate -v -iE006,E010"
86- bash -c ' sed -e "s,===,==," upper-constraints.txt > {envtmpdir}/safety-check.txt'
87- -safety check --json -r {envtmpdir}/safety-check.txt
67+ flake8
68+ bash -c " find {toxinidir}/tools \
69+ -type f \
70+ -name \*.sh \
71+ -print0 | xargs -0 bashate -v -iE006,E010"
8872
8973[testenv:bindep]
9074# Do not install any requirements. We want this to be fast and work even if
9175# system dependencies are missing, since it's used to tell you what system
92- # dependencies are missing! This also means that bindep must be installed
93- # separately, outside of the requirements files, and develop mode disabled
94- # explicitly to avoid unnecessarily installing the checked-out repo too (this
95- # further relies on "tox.skipsdist = True" above).
76+ # dependencies are missing!
77+ skip_install = true
9678deps = bindep
9779commands = bindep test
9880usedevelop = False
9981
10082[testenv:docs]
10183allowlist_externals =
10284 sphinx-build
103- deps = -c{env:TOX_CONSTRAINTS_FILE:{toxinidir}/upper-constraints.txt}
104- -r{toxinidir}/doc/requirements.txt
85+ deps =
86+ -c{env:TOX_CONSTRAINTS_FILE:{toxinidir}/upper-constraints.txt}
87+ -r{toxinidir}/doc/requirements.txt
10588commands = sphinx-build -W -b html doc/source doc/build/html
10689
10790[testenv:pip-install]
108- recreate = True
91+ recreate = true
10992deps = .
11093commands = python {toxinidir}/tools/check-install.py
11194
@@ -117,6 +100,7 @@ commands =
117100 {toxinidir}/playbooks/files/project-requirements-change.py --local {posargs}
118101
119102[testenv:babel]
103+ skip_install = true
120104# Use the local upper-constraints.txt file
121105allowlist_externals =
122106 {toxinidir}/tools/babel-test.sh
0 commit comments