80 lines
2.5 KiB

minversion = 3.1
envlist = py3,pep8
setenv =
deps =
commands =
stestr run {posargs}
commands =
python -m pip install -q -e "git+file://{toxinidir}/../cliff#egg=cliff"
python -m pip install -q -e "git+file://{toxinidir}/../keystoneauth#egg=keystoneauth"
python -m pip install -q -e "git+file://{toxinidir}/../openstacksdk#egg=openstacksdk"
python -m pip freeze
stestr run {posargs}
description =
Run style checks.
deps =
commands =
pre-commit run --all-files --show-diff-on-failure
commands =
commands =
python setup.py test --coverage --coverage-package-name=osc_lib --testr-args='{posargs}'
coverage report
commands =
oslo_debug_helper -t osc_lib/tests {posargs}
deps =
commands =
sphinx-apidoc -o doc/api osc_lib osc_lib/tests
# Create ChangeLog file
python setup.py sdist
sphinx-build -a -E -W -d doc/build/doctrees -b html doc/source doc/build/html
deps =
commands =
sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
show-source = True
exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build,tools
# The following are ignored on purpose. It's not super worth it to fix them.
# However, if you feel strongly about it, patches will be accepted to fix them
# if they fix ALL of the occurances of one and only one of them.
# E203 Black will put spaces after colons in list comprehensions
# E501 Black takes care of line length for us
# H238 New Style Classes are the default in Python3
# H301 Black will put commas after imports that can't fit on one line
# H4 Are about docstrings and there's just a huge pile of pre-existing issues.
# W503 Is supposed to be off by default but in the latest pycodestyle isn't.
# Also, both openstacksdk and Donald Knuth disagree with the rule. Line
# breaks should occur before the binary operator for readability.
ignore = E203, E501, H301, H238, H4, W503
import-order-style = pep8
application-import-names = osc_lib