-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
92 lines (79 loc) · 2.84 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
[tox]
min_version = 4.3.3
envlist = py3{8,9,10,11},pep8,pylint
[testenv]
usedevelop = True
package = wheel
wheel_build_env = .pkg
setenv =
LANGUAGE="en_US"
LC_ALL="en_US.UTF-8"
LC_CTYPE="en_US.UTF-8"
PYTHONWARNINGS=default::DeprecationWarning
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands_pre =
{envpython} --version
commands = pytest {posargs}
[testenv:py3{8,9,10,11}-lower-constraints]
; lower-constraints job verifies that minimum versions from requirements results
; in a working package that can run unit tests. Ensure lower-constraints.txt
; versions match requirements.txt and test-requirements.txt
; TODO(Dantali0n): Ensure files are checked for being up to date #14
usedevelop = False
deps =
-c{toxinidir}/lower-constraints.txt
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt
[testenv:{pep8,pylint,format}]
usedevelop = False
envdir = {toxworkdir}/linting
commands =
pep8: {envpython} -m flake8 --version
pep8: {envpython} -m flake8 radloggerpy tests
pylint: {envpython} -m pylint --version
pylint: {envpython} -m pylint radloggerpy tests
format: {envpython} -m autopep8 -v -aa --in-place --recursive radloggerpy
format: {envpython} -m autopep8 -v -aa --in-place --recursive tests
[testenv:typecheck]
commands =
mypy -p radloggerpy --ignore-missing-imports
[testenv:bandit]
commands =
bandit -r radloggerpy -x tests -n5 -ll # -s B320
[testenv:coverage]
commands = pytest --cov-report term --cov-report xml --cov-report html --cov=radloggerpy tests
[testenv:debug]
commands = oslo_debug_helper {posargs}
[testenv:docs]
allowlist_externals =
sh
; unset from testenv
setenv =
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/doc/requirements.txt
commands =
sh doc/cleanup.sh
sphinx-build -W -b html doc/source doc/build/html
[testenv:releasenotes]
deps = {[testenv:docs]deps}
commands =
sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[testenv:classdiagram]
deps = {[testenv:docs]deps}
commands = pyreverse --ignore=tests -my -k -o png radloggerpy/
[testenv:genconfig]
commands =
oslo-config-generator --config-file etc/radloggerpy/radloggerpy-config-generator.conf
[testenv:build]
usedevelop = False
commands = {envpython} -m build
[testenv:{extract_messages,update_catalog,compile_catalog}]
envdir = {toxworkdir}/localization
deps = {[testenv:docs]deps}
commands =
extract_messages: {envpython} -m babel.messages.frontend extract -F babel.cfg -k "_ gettext ngettext l_ lazy_gettext" -o radloggerpy/locale/radloggerpy.pot radloggerpy/
update_catalog: {envpython} -m babel.messages.frontend update -D radloggerpy -d radloggerpy/locale/ -i radloggerpy/locale/radloggerpy.pot
compile_catalog: {envpython} -m babel.messages.frontend compile -D radloggerpy -d radloggerpy/locale/