-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathtox.ini
94 lines (82 loc) · 2.51 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
93
94
[tox]
envlist = py3,pep8,cover
minversion = 2.7
skipsdist = True
ignore_basepython_conflict = True
[testenv]
basepython = python3
setenv =
VIRTUAL_ENV={envdir}
OS_TEST_PATH=tests
passenv =
*_proxy
*_PROXY
usedevelop = True
install_command = pip install {opts} {packages}
allowlist_externals = bash
find
rm
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
.[jira_plugin]
commands =
find . -type f -name "*.pyc" -delete
stestr run {posargs}
[testenv:cover]
description = Calculates code coverage
setenv =
PYTHON=coverage run --source monasca_notification --parallel-mode
commands =
stestr run {posargs}
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml
[testenv:debug]
commands =
oslo_debug_helper -t ./monasca_notification/tests {posargs}
[testenv:pep8]
commands =
{[testenv:flake8]commands}
{[testenv:bandit]commands}
[testenv:venv]
commands = {posargs}
[testenv:flake8]
commands =
flake8 monasca_notification
flake8 tests
[testenv:bandit]
commands =
bandit -r monasca_notification -n5 -x monasca_notification/tests
[testenv:genconfig]
description = Generates an example of monasca-notification configuration file
commands = oslo-config-generator \
--config-file={toxinidir}/config-generator/notification.conf
[flake8]
max-line-length = 100
# TODO: ignored checks should be enabled in the future
# H201 no 'except:' at least use 'except Exception:'
# H202: assertRaises Exception too broad
# H405 multi line docstring summary not separated with an empty line
# W504 line break occurred after a binary operator
ignore = F821,H201,H202,H405,W504
exclude=.venv,.git,.tox,dist,*egg,build
[hacking]
import_exceptions =
six.moves
[testenv:releasenotes]
deps = -r{toxinidir}/doc/requirements.txt
commands =
sphinx-build -a -E -W -d releasenotes/build/doctrees -b html \
releasenotes/source releasenotes/build/html
[testenv:bindep]
# Do not install any requirements. We want this to be fast and work even if
# system dependencies are missing, since it's used to tell you what system
# dependencies are missing! This also means that bindep must be installed
# separately, outside of the requirements files, and develop mode disabled
# explicitly to avoid unnecessarily installing the checked-out repo too (this
# further relies on "tox.skipsdist = True" above).
deps = bindep
commands = bindep test
usedevelop = False