-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathtox.ini
72 lines (63 loc) · 1.94 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
[tox]
minversion = 3.18.0
envlist = py3,pep8,pylint,docs
[testenv]
usedevelop = true
allowlist_externals =
rm
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
setenv =
PYTHONDONTWRITEBYTECODE=1
# TODO(stephenfin): Remove once we bump our upper-constraint to SQLAlchemy 2.0
SQLALCHEMY_WARN_20=1
passenv =
HTTP_PROXY
HTTPS_PROXY
NO_PROXY
OS_DEBUG
GENERATE_HASHES
commands =
stestr run {posargs}
[testenv:venv]
commands =
{posargs}
[testenv:pylint]
commands =
pylint --rcfile .pylintrc freezer_api
[testenv:pep8]
deps =
pre-commit
commands =
pre-commit run --all-files --show-diff-on-failure
[testenv:docs]
deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/doc/requirements.txt
commands =
rm -rf doc/build
# sphinx-build -W --keep-going -b html api-ref/source api-ref/build/html
sphinx-build -W --keep-going -b html doc/source doc/build/html
[testenv:api-ref]
deps = {[testenv:docs]deps}
commands =
rm -rf api-ref/build
sphinx-build -W -a -E --keep-going -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html
[testenv:releasenotes]
deps = {[testenv:docs]deps}
commands =
rm -rf releasenotes/build
sphinx-build -W -a -E -d releasenotes/build/doctrees --keep-going -b html releasenotes/source releasenotes/build/html
[testenv:genpolicy]
commands =
oslopolicy-sample-generator --config-file etc/freezer/freezer-policy-generator.conf
[flake8]
# Ignored hackings:
# H202 -> assertRaises(Exception, ...) too broad
# H401 -> Docstrings should not start with a space
# H404 -> Multi line docstrings should start without a leading new line.
# H405 -> Multi line docstrings should start with a one line summary followed by an empty line.
ignore = H202,H401,H404,H405
show-source = true
exclude = .venv,.tox,dist,doc,*egg,specs,build,*/source/conf.py