nfvbenchvm: set mgmt interface MTU=1500 by default
[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 # E117,E126,E127,E128,E211,E226,E231,E252,E305,E731,W503,W504 skipped as they
36 # are introduced by newer versions of flake8 (update from 2.2.4 to 3.9.2)
37 # H216,H301,H401 skipped as they are introduced by newer version of hacking
38 # (update from 0.10.3 to 4.1.0)
39 max-line-length = 100
40 show-source = True
41 #E117: over-indented (comment)
42 #E126: continuation line over-indented for hanging indent
43 #E127: continuation line over-indented for visual indent
44 #E128: continuation line under-indented for visual indent
45 #E211: whitespace before '('
46 #E226: missing whitespace around arithmetic operator
47 #E231: missing whitespace after ','
48 #E252: missing whitespace around parameter equals
49 #E302: expected 2 blank linee
50 #E303: too many blank lines (2)
51 #E305: expected 2 blank lines after class or function definition, found 1
52 #E731: do not assign a lambda expression, use a def
53 #W503: line break before binary operator
54 #W504: line break after binary operator
55 #H101: Use TODO(NAME)
56 #H216: The unittest.mock module should be used rather than the third party mock package unless actually needed. If so, disable the H216 check in hacking config and ensure mock is declared in the project's requirements.
57 #H233: Python 3.x incompatible use of print operator
58 #H236: Python 3.x incompatible __metaclass__, use six.add_metaclass()
59 #H301: one import per line
60 #H302: import only modules.
61 #H304: No relative imports
62 #H306: imports not in alphabetical order
63 #H401: docstring should not start with a space
64 #H404: multi line docstring should start without a leading new line
65 #H405: multi line docstring summary not separated with an empty line
66 #H904: Wrap long lines in parentheses instead of a backslash
67 ignore = E117,E123,E125,E126,E127,E128,E211,E226,E231,E252,E302,E303,E305,E731,W503,W504,H101,H104,H216,H233,H236,H301,H302,H304,H306,H401,H404,H405,H803,H904,D102,D100,D107
68 builtins = _
69 exclude=venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,dib-venv
70
71 [testenv:docs]
72 basepython = python3
73 deps = -rdocs/requirements.txt
74 commands =
75     sphinx-build -b html -n -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/html
76     echo "Generated docs available in {toxinidir}/docs/_build/html"
77 whitelist_externals = echo
78
79 [testenv:docs-linkcheck]
80 basepython = python3
81 deps = -rdocs/requirements.txt
82 passenv = http_proxy https_proxy no_proxy
83 commands = sphinx-build -b linkcheck -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/linkcheck