-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
executable file
·89 lines (80 loc) · 2.48 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
[tox]
minversion = 3.0
envlist = py36,py38,py39,pep8,genconfig
skipsdist = True
#toxworkdir = {env:HOME}/keystone_rba_plugin/.tox
#ignore_basepython_conflict = true
#isolated_build = True
#isolated_build_env=.package
#run_provision = True
#requires = virtualenv >= 20.10.0
#skip_missing_interpreters = True
# envlogdir={envdir}/log
[testenv]
# basepython = python3
#pip_version = pip==21.3
usedevelop = False
download = False
recreate = False
alwayscopy = False
sitepackages = False
install_command = pip install {opts} {packages}
setenv =
VIRTUAL_ENV={envdir}
KEYSTONE_DBPASS={env:KEYSTONE_DBPASS}
deps =
#-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt
commands =
find keystone_rba_plugin -type f -name "*.pyc" -delete
stestr --test-path=./keystone_rba_plugin/tests run {posargs}
allowlist_externals =
bash
find
[testenv:pep8]
deps =
.[bandit]
{[testenv]deps}
commands =
flake8 --ignore=D100,D101,D102,D103,D104,E305,E402,W503,W504,W605
bandit -r keystone_rba_plugin -x 'keystone_rba_plugin/tests/*'
[testenv:cover]
setenv =
{[testenv]setenv}
PYTHON=coverage run --source keystone_rba_plugin --parallel-mode
commands =
find keystone_rba_plugin -type f -name "*.pyc" -delete
stestr --test-path=./keystone_rba_plugin/tests run {posargs}
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml
[testenv:genconfig]
basepython = python3
deps =
.[oslo.config]
{[testenv]deps}
commands = oslo-config-generator --config-file=etc/config-generator/keystone_rba_plugin.conf
allowlist_externals = oslo-config-generator
[testenv:venv]
basepython = python3
commands = {posargs}
[testenv:debug]
commands = oslo_debug_helper {posargs}
[flake8]
filename= *.py
show-source = true
enable-extensions = H203,H904
# D100: Missing docstring in public module
# D101: Missing docstring in public class
# D102: Missing docstring in public method
# D103: Missing docstring in public function
# D104: Missing docstring in public package
# D203: 1 blank line required before class docstring (deprecated in pep257)
# TODO(wxy): Fix the pep8 issue.
# E402: module level import not at top of file
# W503: line break before binary operator
# W504 line break after binary operator
ignore = D100,D101,D102,D103,D104,D203,E402,W503,W504
exclude=doc,.venv,.git,.tox,build,dist,*lib/python*,*egg,tools,vendor,.update-venv,*.ini,*.po,*.pot
max-complexity=24