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