Update tox.ini to work with python3.9 and tox 4
This change combines the following commits from `master`: commit932ff63d6d
Author: Al Bailey <al.bailey@windriver.com> Date: Tue Dec 27 01:29:24 2022 +0000 Update tox.ini to work with tox 4 Signed-off-by: Al Bailey <al.bailey@windriver.com> commit4d34b1ac65
Author: Thiago Brito <thiago.brito@windriver.com> Date: Wed Jun 22 12:27:57 2022 -0300 Add flake8-import-order and use python3.9 on tox Signed-off-by: Thiago Brito <thiago.brito@windriver.com> So that this repo is able to pass Zuul's tests and remain maintainable. Signed-off-by: Luan Nunes Utimura <LuanNunes.Utimura@windriver.com> Change-Id: Id3fc303e6febdbe434bb3e3b70d8e4e94cc098ed (cherry picked from commit932ff63d6d
) (cherry picked from commit4d34b1ac65
)
This commit is contained in:
parent
88aab7bb87
commit
c36c729f60
18
.zuul.yaml
18
.zuul.yaml
|
@ -5,16 +5,26 @@
|
||||||
- stx-release-notes-jobs
|
- stx-release-notes-jobs
|
||||||
check:
|
check:
|
||||||
jobs:
|
jobs:
|
||||||
- openstack-tox-pep8
|
- stx-upstream-tox-pep8
|
||||||
- openstack-tox-linters
|
- stx-upstream-tox-linters
|
||||||
gate:
|
gate:
|
||||||
jobs:
|
jobs:
|
||||||
- openstack-tox-pep8
|
- stx-upstream-tox-pep8
|
||||||
- openstack-tox-linters
|
- stx-upstream-tox-linters
|
||||||
post:
|
post:
|
||||||
jobs:
|
jobs:
|
||||||
- stx-upstream-upload-git-mirror
|
- stx-upstream-upload-git-mirror
|
||||||
|
|
||||||
|
- job:
|
||||||
|
name: stx-upstream-tox-pep8
|
||||||
|
parent: openstack-tox-pep8
|
||||||
|
nodeset: debian-bullseye
|
||||||
|
|
||||||
|
- job:
|
||||||
|
name: stx-upstream-tox-linters
|
||||||
|
parent: openstack-tox-linters
|
||||||
|
nodeset: debian-bullseye
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: stx-upstream-upload-git-mirror
|
name: stx-upstream-upload-git-mirror
|
||||||
parent: upload-git-mirror
|
parent: upload-git-mirror
|
||||||
|
|
|
@ -3,6 +3,7 @@ import fnmatch
|
||||||
import os
|
import os
|
||||||
import resource
|
import resource
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -12,10 +12,11 @@
|
||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
import sys
|
||||||
|
|
||||||
from keystone.server import wsgi as wsgi_server
|
from keystone.server import wsgi as wsgi_server
|
||||||
|
|
||||||
import sys
|
|
||||||
sys.argv = sys.argv[:1]
|
sys.argv = sys.argv[:1]
|
||||||
|
|
||||||
application = wsgi_server.initialize_public_application()
|
application = wsgi_server.initialize_public_application()
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
bashate >= 0.2
|
bashate
|
||||||
PyYAML >= 3.1.0
|
PyYAML
|
||||||
yamllint >= 0.5.2
|
yamllint
|
||||||
flake8 >= 2.5.4 # MIT
|
flake8
|
||||||
|
flake8-import-order
|
||||||
|
|
39
tox.ini
39
tox.ini
|
@ -4,7 +4,12 @@ minversion = 2.3
|
||||||
skipsdist = True
|
skipsdist = True
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
install_command = pip install -U {opts} {packages}
|
basepython = python3.9
|
||||||
|
install_command = pip install \
|
||||||
|
-v -v -v \
|
||||||
|
-U \
|
||||||
|
-c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/starlingx/root/raw/branch/master/build-tools/requirements/debian/upper-constraints.txt} \
|
||||||
|
{opts} {packages}
|
||||||
setenv = VIRTUAL_ENV={envdir}
|
setenv = VIRTUAL_ENV={envdir}
|
||||||
OS_STDOUT_CAPTURE=1
|
OS_STDOUT_CAPTURE=1
|
||||||
OS_STDERR_CAPTURE=1
|
OS_STDERR_CAPTURE=1
|
||||||
|
@ -12,8 +17,7 @@ setenv = VIRTUAL_ENV={envdir}
|
||||||
deps = -r{toxinidir}/test-requirements.txt
|
deps = -r{toxinidir}/test-requirements.txt
|
||||||
|
|
||||||
[testenv:linters]
|
[testenv:linters]
|
||||||
basepython = python3
|
allowlist_externals = bash
|
||||||
whitelist_externals = bash
|
|
||||||
commands =
|
commands =
|
||||||
bash -c "find {toxinidir} \
|
bash -c "find {toxinidir} \
|
||||||
-not \( -type d -name .?\* -prune \) \
|
-not \( -type d -name .?\* -prune \) \
|
||||||
|
@ -27,8 +31,18 @@ commands =
|
||||||
-o -name '*.yaml' \
|
-o -name '*.yaml' \
|
||||||
-print0 | xargs -0 yamllint"
|
-print0 | xargs -0 yamllint"
|
||||||
|
|
||||||
|
[flake8]
|
||||||
|
# E123, E125 skipped as they are invalid PEP-8.
|
||||||
|
# E501 skipped because some of the code files include templates
|
||||||
|
# that end up quite wide
|
||||||
|
# H405: multi line docstring summary not separated with an empty line
|
||||||
|
show-source = True
|
||||||
|
ignore = E123,E125,E501,H405
|
||||||
|
exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build,release-tag-*
|
||||||
|
import-order-style = google
|
||||||
|
|
||||||
|
|
||||||
[testenv:pep8]
|
[testenv:pep8]
|
||||||
basepython = python3
|
|
||||||
usedevelop = False
|
usedevelop = False
|
||||||
description =
|
description =
|
||||||
Run style checks.
|
Run style checks.
|
||||||
|
@ -38,18 +52,7 @@ commands =
|
||||||
flake8
|
flake8
|
||||||
|
|
||||||
|
|
||||||
[flake8]
|
|
||||||
# E123, E125 skipped as they are invalid PEP-8.
|
|
||||||
# E501 skipped because some of the code files include templates
|
|
||||||
# that end up quite wide
|
|
||||||
# H405: multi line docstring summary not separated with an empty line
|
|
||||||
show-source = True
|
|
||||||
ignore = E123,E125,E501,H405
|
|
||||||
exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build,release-tag-*
|
|
||||||
|
|
||||||
|
|
||||||
[testenv:venv]
|
[testenv:venv]
|
||||||
basepython = python3
|
|
||||||
commands = {posargs}
|
commands = {posargs}
|
||||||
|
|
||||||
[testenv:docs]
|
[testenv:docs]
|
||||||
|
@ -58,7 +61,7 @@ deps = -r{toxinidir}/doc/requirements.txt
|
||||||
commands =
|
commands =
|
||||||
rm -rf doc/build
|
rm -rf doc/build
|
||||||
sphinx-build -a -E -W -d doc/build/doctrees -b html doc/source doc/build/html
|
sphinx-build -a -E -W -d doc/build/doctrees -b html doc/source doc/build/html
|
||||||
whitelist_externals = rm
|
allowlist_externals = rm
|
||||||
|
|
||||||
[testenv:releasenotes]
|
[testenv:releasenotes]
|
||||||
basepython = python3
|
basepython = python3
|
||||||
|
@ -66,13 +69,13 @@ deps = -r{toxinidir}/doc/requirements.txt
|
||||||
commands =
|
commands =
|
||||||
rm -rf releasenotes/build
|
rm -rf releasenotes/build
|
||||||
sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
||||||
whitelist_externals =
|
allowlist_externals =
|
||||||
rm
|
rm
|
||||||
reno
|
reno
|
||||||
|
|
||||||
[testenv:newnote]
|
[testenv:newnote]
|
||||||
basepython = python3
|
|
||||||
# Re-use the releasenotes venv
|
# Re-use the releasenotes venv
|
||||||
|
basepython = python3
|
||||||
envdir = {toxworkdir}/releasenotes
|
envdir = {toxworkdir}/releasenotes
|
||||||
deps = -r{toxinidir}/doc/requirements.txt
|
deps = -r{toxinidir}/doc/requirements.txt
|
||||||
commands = reno new {posargs}
|
commands = reno new {posargs}
|
||||||
|
|
Loading…
Reference in New Issue