File: tox.ini

package info (click to toggle)
python-aodhclient 3.10.1-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 616 kB
  • sloc: python: 2,812; sh: 34; makefile: 24
file content (99 lines) | stat: -rw-r--r-- 2,552 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
[tox]
minversion = 4.2.5
envlist = py3,pep8

[testenv]
usedevelop = True
setenv =
  VIRTUAL_ENV={envdir}
  AODH_CLIENT_EXEC_DIR={envdir}/bin
passenv =
  GNOCCHI_*
  AODH_*
  OS_TEST_TIMEOUT
  OS_STDOUT_CAPTURE
  OS_STDERR_CAPTURE
  OS_LOG_CAPTURE
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 --slowest {posargs}

[testenv:functional]
deps =
  {[testenv]deps}
  pifpaf[gnocchi]>=0.23
  gnocchi[postgresql,file]
setenv =
  OS_TEST_PATH = ./aodhclient/tests/functional
  OS_TESTENV_NAME = {envname}
  AODH_CLIENT_EXEC_DIR={envdir}/bin
  AODH_ENDPOINT=http://localhost/alarming/
  GNOCCHI_ENDPOINT=http://localhost/metric/
  PROMETHEUS_ENDPOINT=http://localhost:9090
allowlist_externals =
  bash
commands =
  bash tools/fix_ca_bundle.sh
  stestr --test-path {env:OS_TEST_PATH} run --slowest {posargs}

[testenv:pep8]
skip_install = true
deps =
  pre-commit
commands =
  pre-commit run -a

[testenv:venv]
# Used by openstack-infra to build the doc
deps = -r{toxinidir}/doc/requirements.txt
commands = {posargs}

[testenv:cover]
deps =
    {[testenv]deps}
    coverage>=3.6 # Apache-2.0
setenv =
  {[testenv]setenv}
  PYTHON=coverage run --source aodhclient --parallel-mode
commands =
  stestr run {posargs}
  coverage combine
  coverage html -d cover
  coverage xml -o cover/coverage.xml
  coverage report

[testenv:releasenotes]
deps =
  -r{toxinidir}/doc/requirements.txt
  -r{toxinidir}/requirements.txt
allowlist_externals =
  sphinx-build
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees --keep-going -b html releasenotes/source releasenotes/build/html

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

[testenv:debug]
commands = oslo_debug_helper {posargs}

[flake8]
show-source = True
# W503 line break before binary operator
# W504 line break after binary operator
ignore = W503,W504
# [H106] Do not 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
exclude=.venv,.git,.tox,dist,doc,*egg,build