File: tox.ini

package info (click to toggle)
ironic-inspector 8.0.0-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 2,152 kB
  • sloc: python: 12,421; sh: 550; makefile: 185
file content (97 lines) | stat: -rw-r--r-- 2,711 bytes parent folder | download
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
[tox]
envlist = py3,py27,pep8,functional

[testenv]
usedevelop = True
install_command = pip install -U -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
deps =
    -r{toxinidir}/test-requirements.txt
commands =
    stestr run {posargs}
setenv =
    VIRTUAL_ENV={envdir}
    PYTHONDONTWRITEBYTECODE=1
    TZ=UTC
    TESTS_DIR=./ironic_inspector/test/unit/
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY

[testenv:venv]
basepython = python3
commands = {posargs}

[testenv:releasenotes]
basepython = python3
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html

[testenv:cover]
basepython = python3
setenv =
    {[testenv]setenv}
    PYTHON=coverage run --branch --omit='*test*' --source ironic_inspector --parallel-mode
commands =
    coverage erase
    stestr run {posargs}
    coverage combine
    coverage report -m --omit='*test*' --fail-under 90
    coverage html -d ./cover --omit='*test*'

[testenv:pep8]
basepython = python3
commands =
    flake8 ironic_inspector
    doc8 README.rst CONTRIBUTING.rst doc/source

[testenv:functional]
basepython = python2.7
commands =
    python -m ironic_inspector.test.functional

[testenv:functional-py35]
basepython = python3
commands =
    python3 -m ironic_inspector.test.functional

[testenv:genconfig]
basepython = python3
envdir = {toxworkdir}/venv
commands = oslo-config-generator --config-file config-generator.conf

[testenv:genpolicy]
basepython = python3
sitepackages = False
envdir = {toxworkdir}/venv
commands = oslopolicy-sample-generator --config-file {toxinidir}/policy-generator.conf

[testenv:genstates]
basepython = python3
deps = {[testenv]deps}
commands = {toxinidir}/tools/states_to_dot.py -f {toxinidir}/doc/source/images/states.svg --format svg

[flake8]
max-complexity=15
# [H106] Don't put vim configuration in source files.
# [H203] Use assertIs(Not)None to check for None.
# [H204] Use assert(Not)Equal to check for equality.
# [H205] Use assert(Greater|Less)(Equal) for comparison.
# [H904] Delay string interpolations at logging calls.
enable-extensions=H106,H203,H204,H205,H904
import-order-style = pep8
application-import-names = ironic_inspector

[hacking]
import_exceptions = ironicclient.exceptions,ironic_inspector.common.i18n

[testenv:docs]
basepython = python3
setenv = PYTHONHASHSEED=0
sitepackages = False
deps = -r{toxinidir}/test-requirements.txt
commands =
  python setup.py build_sphinx

[testenv:lower-constraints]
basepython = python3
deps =
  -c{toxinidir}/lower-constraints.txt
  -r{toxinidir}/test-requirements.txt
  -r{toxinidir}/requirements.txt