-
Notifications
You must be signed in to change notification settings - Fork 42
/
tox.ini
64 lines (58 loc) · 1.56 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
[tox]
minversion = 4.4.0
envlist = py39,py310,py311,py312,pep8,cover,docs
skipsdist = True
ignore_basepython_conflict=true
[testenv]
basepython = python3
setenv =
VIRTUAL_ENV={envdir}
PYTHONDONTWRITEBYTECODE=1
LANGUAGE=en_US
TESTS_DIR=./hardware/tests
usedevelop = True
install_command =
pip install -U {opts} {packages}
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands =
stestr run {posargs}
[testenv:pep8]
deps=
hacking~=6.1.0 # Apache-2.0
flake8-import-order~=0.18.0 # LGPLv3
pycodestyle>=2.0.0 # MIT
commands = flake8 {posargs}
[testenv:venv]
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands = {posargs}
[testenv:cover]
deps=
{[testenv]deps}
coverage>=4.4 # Apache-2.0
setenv =
VIRTUAL_ENV={envdir}
PYTHON=coverage run --source hardware --omit='*tests*' --parallel-mode
commands =
coverage erase
stestr run {posargs}
coverage combine
coverage report --omit='*tests*'
coverage html -d cover --omit='*tests*'
coverage xml -o cover/coverage.xml --omit='*tests*'
[testenv:docs]
deps = -r{toxinidir}/doc/requirements.txt
commands = sphinx-build -b html -W doc/source doc/build/html
[flake8]
application-import-names = hardware
builtins = _
exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build
# [H238] old style class declaration
# [H803] git commit title should not end with period
# [W503] line break occurred before a binary operator
ignore = H238,H803,W503
import-order-style = pep8
show-source = True