-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
94 lines (83 loc) · 2.23 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]
minversion = 3.4.0
envlist = unittest, flake8, docs, bandit, build
[testenv]
basepython = python3
usedevelop = True
setenv =
VIRTUAL_ENV={envdir}
PYTHONWARNINGS=default::DeprecationWarning
install_command = pip install {opts} {packages}
whitelist_externals = /usr/bin/make
[testenv:unittest]
deps =
discover
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt
commands = discover -s examples/softboxen-example-switch/tests -s tests
[testenv:flake8]
skip_install = true
deps =
flake8
flake8-bugbear
flake8-colors
flake8-docstrings
flake8-import-order
flake8-typing-imports
pep8-naming
commands =
flake8 --config .flake8.ini --count --import-order-style pep8 \
--application-import-names softboxen softboxen tests setup.py \
{posargs}
[testenv:pylint]
deps =
pyflakes
pylint
-r{toxinidir}/requirements.txt
commands =
pylint softboxen
[testenv:cover]
setenv =
{[testenv]setenv}
PYTHON=coverage run --parallel-mode
deps =
{[testenv:unittest]deps}
coverage
discover
commands = coverage erase
coverage run --source softboxen -m unittest discover {posargs}
coverage report --fail-under 80
[testenv:bandit]
skip_install = true
deps =
bandit
commands =
bandit -r softboxen -c .bandit.yml
[testenv:docs]
skip_install = true
commands = make -C docs html
[testenv:build]
skip_install = true
deps =
wheel
setuptools
commands =
python setup.py -q sdist bdist_wheel
[testenv:example-cli]
deps =
{[testenv:unittest]deps}
{toxinidir}/examples/softboxen-example-switch
commands =
softboxen-cli \
--service-root file:///{toxinidir}/examples/models/softboxen/v1/index.json \
--template-root {toxinidir}/examples/softboxen-example-switch/softboxen_example_switch/templates \
--box-uuid 123e4567-e89b-12d3-a456-426655440000
[testenv:example-restapi]
commands =
{toxinidir}/tests/integration/restapi.sh {posargs}
[testenv:example-restcli]
deps = {toxinidir}/examples/softboxen-example-switch
commands =
softboxen-cli --service-root http://127.0.0.1:5000/softboxen/v1 \
--template-root {toxinidir}/examples/softboxen-example-switch/softboxen_example_switch/templates \
{posargs}