File: tox.ini

package info (click to toggle)
blazar 16.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,784 kB
  • sloc: python: 22,193; sh: 263; makefile: 68; xml: 1
file content (111 lines) | stat: -rw-r--r-- 3,412 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
[tox]
envlist = py3,pep8
minversion = 3.18.0
ignore_basepython_conflict = True

[testenv]
basepython = python3
usedevelop = True
allowlist_externals = rm
deps =
       -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
       -r{toxinidir}/requirements.txt
       -r{toxinidir}/test-requirements.txt
setenv = VIRTUAL_ENV={envdir}
         DISCOVER_DIRECTORY=blazar/tests
         PYTHONHASHSEED=0
commands =
    stestr run --slowest {posargs}

sitepackages = False

[testenv:cover]
setenv =
  {[testenv]setenv}
  PYTHON=coverage run --source blazar --parallel-mode
commands =
    coverage erase
    stestr run {posargs}
    coverage combine
    coverage html -d cover
    coverage xml -o cover/coverage.xml
    coverage report

[testenv:pep8]
skip_install = True
commands = flake8 {posargs}

[testenv:venv]
commands = {posargs}

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

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

[testenv:genconfig]
commands = oslo-config-generator --config-file=etc/blazar/blazar-config-generator.conf

[flake8]
show-source = true
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,tools,api-ref
# NOTE(tonyb): Ignore a few errors/warnings that are now "on by default".
# W503 line break before binary operator
# W504 line break after binary operator
# E402 module level import not at top of file
ignore=H105,H238,E123,E402,W503,W504
# [H904] Delay string interpolations at logging calls.
enable-extensions=H904
# To get a list of functions that have a complexity of 17 or more, set
# max-complexity to 17 and run 'tox -epep8'.
# 23 is currently the most complex thing we have:
# 'ManagerService.update_lease' - blazar/manager/service.py
max-complexity=23

[flake8:local-plugins]
extension =
  B301 = checks:no_translate_logs
  B302 = checks:no_log_warn
paths = ./blazar/hacking

[testenv:pylint]
deps = -r{toxinidir}/requirements.txt
       pylint==1.9.1
commands = pylint blazar

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

[testenv:api-ref]
# This environment is called from CI scripts to test and publish
# the API Ref to docs.openstack.org.
deps = {[testenv:docs]deps}
commands =
    rm -rf api-ref/build
    sphinx-build -WE --keep-going -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html

[testenv:genpolicy]
commands =
    oslopolicy-sample-generator --config-file etc/blazar/blazar-policy-generator.conf

# This environment can be used to quickly validate that all needed system
# packages required to successfully execute test targets are installed
[testenv:bindep]
# Do not install any requirements. We want this to be fast and work even if
# system dependencies are missing, since it's used to tell you what system
# dependencies are missing! This also means that bindep must be installed
# separately, outside of the requirements files.
deps = bindep
commands = bindep test