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