NFVBENCH-197 Upgrade NFVbench packaging (Ubuntu version and requirements)
[nfvbench.git] / tox.ini
1 [tox]
2 minversion = 1.6
3 envlist = py36,pep8,lint,docs,docs-linkcheck
4 skipsdist = True
5
6 [testenv]
7 pip_version = pip==20.2.4
8 usedevelop = True
9 install_command = pip install -U {opts} {packages}
10 setenv =
11    VIRTUAL_ENV={envdir}
12 deps = -r{toxinidir}/requirements.txt
13        -r{toxinidir}/test-requirements.txt
14 commands = py.test -q --basetemp={envtmpdir} {posargs}
15
16 [testenv:pep8]
17 basepython = python3
18 commands = flake8 {toxinidir}
19
20 [testenv:lint]
21 basepython = python3
22 commands = pylint --rcfile pylint.rc nfvbench test
23
24 [testenv:venv]
25 basepython = python3
26 commands = {posargs}
27
28 [testenv:cover]
29 basepython = python3
30 commands = python setup.py testr --coverage --testr-args='{posargs}'
31
32 [flake8]
33 # H803 skipped on purpose per list discussion.
34 # E123, E125 skipped as they are invalid PEP-8.
35 max-line-length = 100
36 show-source = True
37 #E302: expected 2 blank linee
38 #E303: too many blank lines (2)
39 #H233: Python 3.x incompatible use of print operator
40 #H236: Python 3.x incompatible __metaclass__, use six.add_metaclass()
41 #H302: import only modules.
42 #H304: No relative imports
43 #H306: imports not in alphabetical order
44 #H404: multi line docstring should start without a leading new line
45 #H405: multi line docstring summary not separated with an empty line
46 #H904: Wrap long lines in parentheses instead of a backslash
47 ignore = E123,E125,H803,E302,E303,H104,H233,H236,H302,H304,H306,H404,H405,H904,D102,D100,D107
48 builtins = _
49 exclude=venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,dib-venv
50
51 [testenv:docs]
52 basepython = python3
53 deps = -rdocs/requirements.txt
54 commands =
55     sphinx-build -b html -n -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/html
56     echo "Generated docs available in {toxinidir}/docs/_build/html"
57 whitelist_externals = echo
58
59 [testenv:docs-linkcheck]
60 basepython = python3
61 deps = -rdocs/requirements.txt
62 commands = sphinx-build -b linkcheck -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/linkcheck