3 envlist = py38,pep8,lint,docs,docs-linkcheck
8 install_command = pip install -U {opts} {packages}
12 -chttps://opendev.org/openstack/requirements/raw/branch/stable/yoga/upper-constraints.txt
13 -r{toxinidir}/requirements.txt
14 -r{toxinidir}/test-requirements.txt
15 commands = py.test -q --basetemp={envtmpdir} {posargs} test/
18 basepython = python3.8
20 commands = flake8 {toxinidir}
23 basepython = python3.8
25 commands = pylint --rcfile pylint.rc nfvbench test
28 # H803 skipped on purpose per list discussion.
29 # E123, E125 skipped as they are invalid PEP-8.
30 # E117,E126,E127,E128,E211,E226,E231,E252,E305,E731,W503,W504 skipped as they
31 # are introduced by newer versions of flake8 (update from 2.2.4 to 3.9.2)
32 # H216,H301,H401 skipped as they are introduced by newer version of hacking
33 # (update from 0.10.3 to 4.1.0)
36 #E117: over-indented (comment)
37 #E126: continuation line over-indented for hanging indent
38 #E127: continuation line over-indented for visual indent
39 #E128: continuation line under-indented for visual indent
40 #E211: whitespace before '('
41 #E226: missing whitespace around arithmetic operator
42 #E231: missing whitespace after ','
43 #E252: missing whitespace around parameter equals
44 #E302: expected 2 blank linee
45 #E303: too many blank lines (2)
46 #E305: expected 2 blank lines after class or function definition, found 1
47 #E731: do not assign a lambda expression, use a def
48 #W503: line break before binary operator
49 #W504: line break after binary operator
51 #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.
52 #H233: Python 3.x incompatible use of print operator
53 #H236: Python 3.x incompatible __metaclass__, use six.add_metaclass()
54 #H301: one import per line
55 #H302: import only modules.
56 #H304: No relative imports
57 #H306: imports not in alphabetical order
58 #H401: docstring should not start with a space
59 #H404: multi line docstring should start without a leading new line
60 #H405: multi line docstring summary not separated with an empty line
61 #H904: Wrap long lines in parentheses instead of a backslash
62 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
64 exclude=venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,nfvbenchvm
67 basepython = python3.8
69 -chttps://opendev.org/openstack/requirements/raw/branch/stable/yoga/upper-constraints.txt
70 -rdocs/requirements.txt
73 sphinx-build -b html -n -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/html
74 echo "Generated docs available in {toxinidir}/docs/_build/html"
75 whitelist_externals = echo
77 [testenv:docs-linkcheck]
78 basepython = python3.8
80 -chttps://opendev.org/openstack/requirements/raw/branch/stable/yoga/upper-constraints.txt
81 -rdocs/requirements.txt
83 passenv = http_proxy https_proxy no_proxy
84 commands = sphinx-build -b linkcheck -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/linkcheck