File: tox.ini

package info (click to toggle)
sahara-plugin-vanilla 4.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 2,532 kB
  • sloc: xml: 34,886; python: 4,787; sh: 79; sql: 23; makefile: 20
file content (105 lines) | stat: -rw-r--r-- 3,529 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
[tox]
envlist = py38,pep8
minversion = 3.1.1
skipsdist = True
# this allows tox to infer the base python from the environment name
# and override any basepython configured in this file
ignore_basepython_conflict = true

[testenv]
basepython = python3
usedevelop = True
install_command = pip install {opts} {packages}
setenv =
    VIRTUAL_ENV={envdir}
    DISCOVER_DIRECTORY=sahara_plugin_vanilla/tests/unit
deps =
    -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
    -r{toxinidir}/requirements.txt
    -r{toxinidir}/test-requirements.txt
commands = stestr run {posargs}
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY

[testenv:debug-py36]
basepython = python3.6
commands = oslo_debug_helper -t sahara_plugin_vanilla/tests/unit {posargs}

[testenv:debug-py37]
basepython = python3.7
commands = oslo_debug_helper -t sahara_plugin_vanilla/tests/unit {posargs}

[testenv:pep8]
deps =
  -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
  -r{toxinidir}/requirements.txt
  -r{toxinidir}/test-requirements.txt
  -r{toxinidir}/doc/requirements.txt
commands =
    flake8 {posargs}
    doc8 doc/source
    # Run bashate checks
    bash -c "find sahara_plugin_vanilla -iname '*.sh' -print0 | xargs -0 bashate -v"

[testenv:venv]
commands = {posargs}

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

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

[testenv:releasenotes]
deps =
  -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
  -r{toxinidir}/doc/requirements.txt
commands =
  rm -rf releasenotes/build releasenotes/html
  sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
whitelist_externals = rm

[testenv:debug]
# It runs tests from the specified dir (default is sahara_plugin_vanilla/tests)
# in interactive mode, so, you could use pbr for tests debug.
# Example usage: tox -e debug -- -t sahara_plugin_vanilla/tests/unit some.test.path
# https://docs.openstack.org/oslotest/latest/features.html#debugging-with-oslo-debug-helper
commands = oslo_debug_helper -t sahara_plugin_vanilla/tests/unit {posargs}

[flake8]
show-source = true
builtins = _
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,tools
# [H904] Delay string interpolations at logging calls
# [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
enable-extensions=H904,H106,H203,H204,H205
# [E123] Closing bracket does not match indentation of opening bracket's line
# [E226] Missing whitespace around arithmetic operator
# [E402] Module level import not at top of file
# [E731] Do not assign a lambda expression, use a def
# [W503] Line break occurred before a binary operator
# [W504] line break after binary operator
ignore=E123,E226,E402,E731,W503,W504

[testenv:lower-constraints]
deps =
  -c{toxinidir}/lower-constraints.txt
  -r{toxinidir}/test-requirements.txt
  -r{toxinidir}/requirements.txt
  -r{toxinidir}/doc/requirements.txt