-
Notifications
You must be signed in to change notification settings - Fork 940
/
tox.ini
119 lines (110 loc) · 3.25 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
110
111
112
113
114
115
116
117
118
119
# Copyright 2017, Yahoo Inc.
# Licensed under the terms of the apache license. See the LICENSE file in the project root for terms
[config]
package_dir = tensorflowonspark
package_name = tensorflowonspark
[tox]
envlist = py37
skip_missing_interpreters = true
[testenv]
allowlist_externals =
bash
changedir = {toxinidir}
commands =
/bin/bash scripts/start_spark.sh
python -m unittest discover -s tests
# pytest --junitxml=pytest_{envname}.xml -o junit_suite_name={envname} --cov={[config]package_name} --cov-report=xml:coverage.xml --cov-report term-missing tests/
/bin/bash scripts/stop_spark.sh
deps =
-rrequirements.txt
coverage
six
pytest
pytest-cov
install_command = {envpython} {envbindir}/pip install {opts} {packages}
list_dependencies_command = {envpython} {envbindir}/pip freeze
passenv = SSH_AUTH_SOCK BUILD_NUMBER HOSTNAME SPARK_HOME SPARK_LOCAL_IP MASTER SPARK_WORKER_INSTANCES SPARK_CLASSPATH CORES_PER_WORKER
setenv =
SPARK_LOCAL_IP = 127.0.0.1
MASTER = spark://{env:HOSTNAME}:7077
PYTHONPATH = /opt/spark/python
SPARK_CLASSPATH = ./lib/tensorflow-hadoop-1.0-SNAPSHOT.jar
SPARK_WORKER_INSTANCES = 2
CORES_PER_WORKER = 1
extras =
test
[testenv:coverage]
commands =
coverage combine -a
coverage report -m --skip-covered
deps =
coverage
six
pytest
pytest-cov
skip_install = true
[testenv:lint_codestyle]
deps =
six
pycodestyle
commands = {envpython} {envbindir}/pycodestyle {[config]package_dir}
changedir = {toxinidir}
install_command = {envpython} {envbindir}/pip install {opts} {packages}
list_dependencies_command = {envpython} {envbindir}/pip freeze
passenv = SSH_AUTH_SOCK BUILD_NUMBER
extras =
pep8
[testenv:lint_pylint]
deps =
isort<=4.2.15
six
pylint
commands = {envpython} {envbindir}/pylint --output-format=parseable {[config]package_dir}
changedir = {toxinidir}
install_command = {envpython} {envbindir}/pip install {opts} {packages}
list_dependencies_command = {envpython} {envbindir}/pip freeze
passenv = SSH_AUTH_SOCK BUILD_NUMBER
extras =
pylint
[testenv:lint_mypy]
deps =
mypy
lxml
commands =
{envpython} {envbindir}/mypy -p {[config]package_name} --ignore-missing-imports --txt-report artifacts/mypy
changedir = {toxinidir}
install_command = {envpython} {envbindir}/pip install {opts} {packages}
list_dependencies_command = {envpython} {envbindir}/pip freeze
passenv = SSH_AUTH_SOCK BUILD_NUMBER
extras =
mypy
[testenv:doc_build]
deps =
sphinx!=1.8.0
sphinx_rtd_theme
guzzle_sphinx_theme
recommonmark
sphinx_markdown_tables
commands = {envpython} {envbindir}/sphinx-build -b html doc/source build/sphinx/html
changedir = {toxinidir}
install_command = {envpython} {envbindir}/pip install {opts} {packages}
list_dependencies_command = {envpython} {envbindir}/pip freeze
passenv = SSH_AUTH_SOCK BUILD_NUMBER
extras =
doc_build
basepython = python3.6
[testenv:add_api_docs]
deps =
sphinx
commands =
{envpython} {envbindir}/sphinx-apidoc -T -e -M -o doc/source/ src "artifacts/*" "dist/*" "screwdriver/*" "scripts/*" setup.py "tests/*"
changedir = {toxinidir}
extras =
doc_build
passenv = SSH_AUTH_SOCK BUILD_NUMBER
install_command = {envpython} {envbindir}/pip install {opts} {packages}
list_dependencies_command = {envpython} {envbindir}/pip freeze
basepython = python3.6
[pycodestyle]
ignore = E1,E2,E3,E4,E5,W293
max_line_length = 160