forked from openstack/monasca-common
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
53 lines (47 loc) · 1.57 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
[tox]
minversion = 1.6
skipsdist = True
envlist = py27,pep8
[testenv]
setenv = VIRTUAL_ENV={envdir}
passenv = http_proxy
HTTP_PROXY
https_proxy
HTTPS_PROXY
no_proxy
NO_PROXY
usedevelop = True
install_command =
{toxinidir}/tools/tox_install.sh {env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
whitelist_externals = find
commands =
find . -type f -name "*.pyc" -delete
nosetests --with-coverage --cover-package=monasca_common/. --cover-erase
[testenv:pep8]
deps =
{[testenv]deps}
commands =
{[testenv:flake8]commands}
{[bandit]commands}
[testenv:venv]
commands = {posargs}
[testenv:flake8]
commands =
flake8 monasca_common
[flake8]
max-complexity = 50
max-line-length = 120
builtins = _
exclude=.venv,.git,.tox,dist,*egg,build
show-source = True
# note: Due to the need to fork kafka-python, many pep8 violations occure.
# All of the below ignores are caused by the forked kafka-python library
# so when monasca migrates to pykafka, the below line can be removed.
ignore = E121,E126,E127,E128,E131,E221,E226,E241,E251,E261,E302,E303,E501,E701,F401,H101,H102,H301,H304,H306,H404,H405
[bandit]
commands =
# B101(assert_ussed) - Validation uses asserts because of performance reasons
# monasca_common/kafka_lib is a clone of kafka-python and will be deleted in the future
bandit -r monasca_common -n5 -s B101 -x monasca_common/tests -x monasca_common/kafka_lib