File: tox.ini

package info (click to toggle)
watcher-dashboard 14.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 900 kB
  • sloc: python: 3,035; sh: 568; javascript: 50; makefile: 34
file content (78 lines) | stat: -rw-r--r-- 2,332 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
[tox]
minversion = 3.18.0
envlist = py3,pep8
# Automatic envs (pyXX) will only use the python version appropriate to that
# env and ignore basepython inherited from [testenv] if we set
# ignore_basepython_conflict.
ignore_basepython_conflict = True

[testenv]
basepython = python3
usedevelop = True
setenv =
  DJANGO_SETTINGS_MODULE=watcher_dashboard.test.settings
# Note the hash seed is set to 0 until horizon can be tested with a
# random hash seed successfully.
         PYTHONHASHSEED=0
allowlist_externals = /bin/bash
                      rm
                      find
install_command = pip install -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} {opts} {packages}
deps =
  -r{toxinidir}/requirements.txt
  -r{toxinidir}/test-requirements.txt
commands =
    rm -f .testrepository/times.dbm
    find . -type f -name "*.pyc" -delete
    find . -type d -name "__pycache__" -delete
    python manage.py test --settings=watcher_dashboard.test.settings \
        --exclude-tag integration \
        watcher_dashboard

[testenv:pep8]
commands = flake8

[testenv:venv]
commands = {posargs}

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

[testenv:cover]
commands =
    coverage erase
    coverage run --source watcher_dashboard {toxinidir}/manage.py test \
        --settings=watcher_dashboard.test.settings \
        --exclude-tag integration watcher_dashboard {posargs}
    coverage xml
    coverage html -d ./cover --omit='*tests*'
    coverage report

[testenv:docs]
deps =
  -r{toxinidir}/requirements.txt
  -r{toxinidir}/doc/requirements.txt
commands = sphinx-build -W -b html doc/source doc/build/html

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

[testenv:debug]
commands = oslo_debug_helper {posargs}

[flake8]
# F405 TEMPLATES may be undefined, or defined from star imports
# (because it is not easy to avoid this in openstack_dashboard.test.settings)
# W504 line break after binary operator
ignore = F405,W504
show-source = True
builtins = _
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,.ropeproject,tools