![Hervé Beraud](/assets/img/avatar_default.png)
We need to specify doc requirements in doc/requirements.txt to avoid problems with the pip resolver [1] for the release team [2][3]. Removing specific doc requirements from test-requirements.txt. The problem here is that this repos haven't doc/requirements.txt file and by default in this case zuul will use the test-requirements.txt file to pull requirements [4]. This requirements file contains extra requirements like flake8 that collided with those allowed in our job environment and so the new pip resolver fails to install these requirements and the job exits in error. This project meet the conditions leading to the bug. [1] http://lists.openstack.org/pipermail/release-job-failures/2021-January/001500.html [2] http://lists.openstack.org/pipermail/openstack-discuss/2021-January/019611.html [3] http://lists.openstack.org/pipermail/openstack-discuss/2021-January/019612.html [4] https://opendev.org/zuul/zuul-jobs/src/branch/master/roles/ensure-sphinx/tasks/main.yaml#L36 Change-Id: I11c1f9816ad93f7c3a7d9de5894746d48154e18d
63 lines
1.9 KiB
INI
63 lines
1.9 KiB
INI
[tox]
|
|
minversion = 3.1.1
|
|
envlist = py37,pep8
|
|
ignore_basepython_conflict = True
|
|
|
|
[testenv]
|
|
basepython = python3
|
|
deps =
|
|
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
|
-r{toxinidir}/test-requirements.txt
|
|
-r{toxinidir}/requirements.txt
|
|
commands = stestr run --slowest {posargs}
|
|
|
|
[testenv:pep8]
|
|
commands = flake8
|
|
|
|
[testenv:docs]
|
|
deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
|
-r{toxinidir}/doc/requirements.txt
|
|
whitelist_externals =
|
|
rm
|
|
commands =
|
|
rm -rf doc/build/html doc/build/doctrees
|
|
sphinx-build -W --keep-going -b html -d doc/build/doctrees doc/source doc/build/html
|
|
|
|
[testenv:cover]
|
|
setenv =
|
|
PYTHON=coverage run --source pycadf --parallel-mode
|
|
commands =
|
|
stestr run {posargs}
|
|
coverage combine
|
|
coverage html -d cover
|
|
coverage xml -o cover/coverage.xml
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
|
|
[testenv:debug]
|
|
commands = oslo_debug_helper {posargs}
|
|
|
|
[flake8]
|
|
show-source = True
|
|
# H405: Multi line docstrings should start with a one line summary followed by
|
|
# an empty line.
|
|
# D100: Missing docstring in public module
|
|
# D101: Missing docstring in public class
|
|
# D102: Missing docstring in public method
|
|
# D103: Missing docstring in public function
|
|
# D104: Missing docstring in public package
|
|
# D105: Missing docstring in magic method
|
|
# D200: One-line docstring should fit on one line with quotes
|
|
# D202: No blank lines allowed after function docstring
|
|
# D203: 1 blank required before class docstring
|
|
# D204: 1 blank line required after class docstring
|
|
# D205: 1 blank line required between summary line and description
|
|
# D208: Docstring is over-indented
|
|
# D400: First line should end with a period
|
|
# D401: First line should be in imperative mood
|
|
# W503 line break before binary operator
|
|
# W504 line break after binary operator
|
|
ignore = H405,D100,D101,D102,D103,D104,D105,D200,D202,D203,D204,D205,D208,D400,D401,W503,W504
|
|
exclude = .tox,dist,doc,*.egg,build
|