-
Notifications
You must be signed in to change notification settings - Fork 6
/
tox.ini
109 lines (97 loc) · 2.71 KB
/
tox.ini
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
[tox]
project = eskapade
description = global configuration settings and variables.
envlist =
py35,
py36,
whichpy,
flake8,
pep257
minversion = 2.9.0
skip_missing_interpreters = true
[testenv]
description = run the unit tests with pytest under {basepython}
passenv = PYTHONPATH SPARK_HOME SPARK_JARS_DIR SPARK_MAJOR_VERSION HDP_VERSION
basepython =
py35: python3.5
py36: python3.6
deps =
pytest==3.5.0
pytest-timeout==1.2.1
pytest-cov==2.5.1
pytest-pylint==0.9.0
commands =
pytest {posargs:--cov-config="{toxinidir}/tox.ini" \
--cov="{envsitepackagesdir}/{[tox]project}" \
--cov-report term-missing \
--cov-report xml \
--junitxml=junit-{envname}.xml \
--timeout=180 \
tests}
[testenv:flake8]
basepython = python3
deps =
flake8
skip_install = True
commands =
{envbindir}/flake8 python/{[tox]project} tests/{[tox]project}_python
[testenv:pep257]
basepython = python3
deps =
pep257
skip_install = True
commands =
{envbindir}/pep257 python/{[tox]project} --ignore D104,D105,D203,D213
[testenv:coverage]
description = combine coverage data and create reports
deps = coverage
skip_install = True
changedir = {toxworkdir}
setenv = COVERAGE_FILE=.coverage
commands = coverage erase
coverage combine
coverage report --rcfile="{toxinidir}/tox.ini"
coverage xml
[testenv:codecov]
description = [only run on CI]: upload coverage data to codecov (depends on coverage running first)
deps = codecov
skip_install = True
commands = codecov --file "{toxworkdir}/coverage.xml"
[testenv:whichpy]
description = print the python verion.
basepython = python3
skip_install = True
commands = {basepython} -c "import sys; print('Python %s on %s' % (sys.version, sys.platform))"
[testenv:X]
description = print the positional arguments passed in with echo.
skip_install = True
commands = echo {posargs}
[flake8]
statistics = True
output-file = flake.txt
tee = True
max-line-length = 120
ignore =
# F721: syntax error in doctest
F721,
# Missing docstring in public package
D104,
# Missing docstring in magic method
D105,
# 1 blank line required before class docstring
D203,
# Multi-line docstring summary should start at the second line
D213
[coverage:run]
omit = python/{[tox]project}/version.py
[coverage:report]
skip_covered = True
show_missing = True
exclude_lines = if __name__ == ["']__main__["']:
[coverage:paths]
source = python/{[tox]project}
{toxworkdir}/*/lib/python*/site-packages/{[tox]project}
{toxworkdir}/*/Lib/site-packages/{[tox]project}
[pytest]
testpaths = tests/{[tox]project}_python
addopts = -ra