File: tox.ini

package info (click to toggle)
python-octavia-lib 3.8.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 536 kB
  • sloc: python: 2,148; sh: 57; makefile: 23
file content (115 lines) | stat: -rw-r--r-- 3,405 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
[tox]
minversion = 3.18.0
envlist = docs,py3,pep8
ignore_basepython_conflict = True

[testenv]
usedevelop = True
setenv =
   VIRTUAL_ENV={envdir}
   PYTHONWARNINGS=default::DeprecationWarning
   OS_LOG_CAPTURE={env:OS_LOG_CAPTURE:true}
   OS_STDOUT_CAPTURE={env:OS_STDOUT_CAPTURE:true}
   OS_STDERR_CAPTURE={env:OS_STDERR_CAPTURE:true}
   OS_TEST_TIMEOUT=60
deps =
  -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
  -r{toxinidir}/requirements.txt
  -r{toxinidir}/test-requirements.txt
commands = stestr run {posargs}

[testenv:pep8]
commands = flake8
           doc8 --ignore-path doc/source/contributor/modules \
           doc/source octavia_lib HACKING.rst README.rst
           # Run security linter
           bandit -r octavia_lib -ll -ii -x octavia_lib/tests
           {toxinidir}/tools/coding-checks.sh --pylint '{posargs}'
allowlist_externals =
    {toxinidir}/tools/coding-checks.sh

[testenv:venv]
commands = {posargs}

[testenv:cover]
setenv =
    VIRTUAL_ENV={envdir}
    PYTHON=coverage run --source octavia_lib --parallel-mode
commands =
    stestr run {posargs}
    coverage combine
    coverage html -d cover
    coverage xml -o cover/coverage.xml
    coverage report --fail-under=95 --skip-covered

[testenv:docs]
deps =
  -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
  -r{toxinidir}/doc/requirements.txt
allowlist_externals =
  rm
commands =
  rm -rf doc/build doc/source/reference/modules
  sphinx-build -W -b html doc/source doc/build/html

[testenv:pdf-docs]
deps = {[testenv:docs]deps}
allowlist_externals =
  make
  rm
commands =
  rm -rf doc/build/pdf
  sphinx-build -W -b latex doc/source doc/build/pdf
  make -C doc/build/pdf

[testenv:releasenotes]
deps = {[testenv:docs]deps}
commands =
  sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html

[testenv:debug]
commands = oslo_debug_helper {posargs}

[flake8]
# W504 line break after binary operator
ignore = W504
show-source = True
builtins = _
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build
# [H106]: Don't put vim configuration in source files
# [H203]: Use assertIs(Not)None to check for None
# [H204]: Use assert(Not)Equal to check for equality
# [H205]: Use assert(Greater|Less)(Equal) for comparison
# [H904]: Delay string interpolations at logging calls
enable-extensions=H106,H203,H204,H205,H904

[hacking]
import_exceptions = octavia_lib.i18n

[flake8:local-plugins]
extension =
  O316 = checks:assert_true_instance
  O318 = checks:assert_equal_or_not_none
  O323 = checks:assert_equal_true_or_false
  O324 = checks:no_mutable_default_args
  O338 = checks:assert_equal_in
  O339 = checks:no_log_warn
  O341 = checks:no_translate_logs
  O342 = checks:check_raised_localized_exceptions
  O343 = checks:check_no_basestring
  O345 = checks:check_no_eventlet_imports
  O346 = checks:check_line_continuation_no_backslash
  O348 = checks:check_no_logging_imports
  O501 = checks:check_no_octavia_namespace_imports
paths =
  ./octavia_lib/hacking

[doc8]
max-line-length = 79

[testenv:requirements]
deps =
  -egit+https://opendev.org/openstack/requirements#egg=openstack-requirements
allowlist_externals = sh
commands =
    sh -c '{envdir}/src/openstack-requirements/playbooks/files/project-requirements-change.py --req {envdir}/src/openstack-requirements --local {toxinidir} master'