This repository has been archived by the owner on Apr 10, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
77 lines (70 loc) · 2.49 KB
/
tox.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
[tox]
minversion = 4.3.0
envlist = pep8,py311
ignore_basepython_conflict=True
[testenv]
description =
Run unit tests.
package = editable
passenv =
setenv =
LANG=en_US.UTF-8
LANGUAGE=en_US:en
install_command = python -I -m pip install -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} {opts} {packages}
deps =
-r{toxinidir}/test-requirements.txt
# -r{toxinidir}/requirements.txt
commands =
stestr run {posargs}
stestr slowest
[testenv:functional{,-py36,-py37,-py38,-py39,-py310,-py311}]
description =
Run functional tests.
setenv =
{[testenv]setenv}
commands =
# Generators conflict with each other since every service is screwing
# OsloConfig to its own flavor and I have not found a working way to deal with
# that except of physically isolating them
stestr --test-path ./codegenerator/tests/functional/ run {posargs}
stestr slowest
[testenv:docs{,-py311}]
description =
Build documentation in HTML format.
# We do not want the package (because of heavy dependencies for docs)
skip_install = True
deps =
-r{toxinidir}/doc/requirements.txt
commands =
sphinx-build -W --keep-going -b html -j auto doc/source/ doc/build/html
[testenv:pep8]
description =
Run style checks.
deps =
pre-commit
commands =
pre-commit run --all-files --show-diff-on-failure
[flake8]
application-import-names = codegenerator
# 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
show-source = True
exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build,
#[testenv:codegenerator]
#description =
# Codegenerator.
#deps =
# -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
# -r{toxinidir}/codegenerator-requirements.txt
#commands =