summaryrefslogtreecommitdiff
path: root/tox.ini
blob: 6265ece15de3e4d889282d1f7a1b244f5e0f1af0 (plain)
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
[tox]
envlist = py27,pep8
minversion = 1.6
skipsdist = True

[testenv]
usedevelop = True
install_command = pip install {opts} {packages}
setenv =
    PYTHONUNBUFFERED=1
    VIRTUAL_ENV={envdir}
    OS_TEST_PATH=tests/unit
deps =
  -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
  -r{toxinidir}/requirements.txt
  -r{toxinidir}/test-requirements.txt
  psutil==3.0.1
whitelist_externals = bash
                      find
commands =
  find . -type f -name "*.pyc" -delete
  stestr run {posargs}

[testenv:functional]
basepython = python2.7
setenv = {[testenv]setenv}
         SPARK_HOME=/opt/spark/current
         SPARK_SCALA_VERSION=2.10
         OS_TEST_PATH=tests/functional
commands =
  stestr run --serial {posargs}

[testenv:functional-py35]
basepython = python3.5
setenv = {[testenv]setenv}
         SPARK_HOME=/opt/spark/current
         OS_TEST_PATH=tests/functional
commands =
  stestr run --serial {posargs}

[testenv:pep8]
basepython = python3
commands =
  flake8

[testenv:docs]
commands =
  python setup.py build_sphinx

[testenv:venv]
basepython = python3
commands = {posargs}

[testenv:cover]
basepython = python3
# Also do not run test_coverage_ext tests while gathering coverage as those
# tests conflict with coverage.
setenv =
    PYTHON=coverage run --source monasca_transform --parallel-mode
commands =
    find monasca_transform -type f -name "*.pyc" -delete
    stestr run {posargs}
    coverage combine
    coverage html -d cover
    coverage xml -o cover/coverage.xml

[flake8]
max-complexity = 30
max-line-length = 100
# H106 Don’t put vim configuration in source files
# H203 Use assertIs(Not)None to check for None
enable-extensions=H106,H203
show-source = True
exclude=.venv,.git,.tox,dist,*egg,build

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