forked from indigo-dc/orpy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
105 lines (90 loc) · 2.59 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
95
96
97
98
99
100
101
102
103
104
105
[tox]
minversion = 2.1
envlist = py36,py27,pep8,pip-missing-reqs,pypi,bandit
skipsdist = True
[testenv]
usedevelop = True
basepython = python3
whitelist_externals =
find
rm
install_command = pip install -U {opts} {packages}
setenv =
VIRTUAL_ENV={envdir}
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands =
find . -type f -name "*.pyc" -delete
[testenv:venv]
commands = {posargs}
[testenv:cover]
# TODO(stephenfin): Remove the PYTHON hack below in favour of a [coverage]
# section once we rely on coverage 4.3+
#
# https://bitbucket.org/ned/coveragepy/issues/519/
envdir = {toxworkdir}/shared
setenv =
{[testenv]setenv}
PYTHON=coverage run --source orpy --parallel-mode
commands =
{[testenv]commands}
coverage erase
stestr run {posargs}
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml
coverage report
[testenv:py27]
# TODO(efried): Remove this once https://github.com/tox-dev/tox/issues/425 is fixed.
basepython = python2.7
commands =
{[testenv]commands}
stestr run {posargs}
[testenv:py35]
# TODO(efried): Remove this once https://github.com/tox-dev/tox/issues/425 is fixed.
basepython = python3.5
commands =
{[testenv]commands}
stestr run {posargs}
[testenv:py36]
# TODO(efried): Remove this once https://github.com/tox-dev/tox/issues/425 is fixed.
basepython = python3.6
commands =
{[testenv:py35]commands}
[testenv:pep8]
envdir = {toxworkdir}/shared
commands =
flake8
[testenv:bandit]
envdir = {toxworkdir}/shared
commands = bandit -r orpy -x tests -s B110,B410
[testenv:pypi]
envdir = {toxworkdir}/shared
commands = python3 setup.py check -r -s -m
[testenv:cobertura]
commands = py.test --cov=orpy --cov-report=xml --cov-report=term-missing orpy/tests
[testenv:bandit-report]
commands =
- mkdir /tmp/bandit
- bandit -r orpy -x tests -s B110,B410 -f html -o /tmp/bandit/index.html
[testenv:docs]
# TODO(melwitt): This can be removed when the docs target can be run
# with python 3.x
basepython = python2.7
commands =
rm -rf doc/build
python setup.py build_sphinx
[testenv:pip-missing-reqs]
# do not install test-requirements as that will pollute the virtualenv for
# determining missing packages
# this also means that pip-missing-reqs must be installed separately, outside
# of the requirements.txt files
deps = pip_check_reqs
commands=pip-missing-reqs -d --ignore-file=orpy/tests/* orpy
[flake8]
# H803 skipped on purpose per list discussion.
# E123, E125 skipped as they are invalid PEP-8.
show-source = True
ignore = E123,E125,H803,H405
builtins = _
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build