forked from aws/sagemaker-python-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
114 lines (101 loc) · 2.8 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
# Tox (http://tox.testrun.org/) is a tool for running tests
# in multiple virtualenvs. This configuration file will run the
# test suite on all supported python versions. To use it, "pip install tox"
# and then run "tox" from this directory.
[tox]
envlist = flake8,pylint,twine,sphinx,py27,py36
skip_missing_interpreters = False
[flake8]
max-line-length = 120
exclude =
build/
.git
__pycache__
examples/
*pb2.py
.tox
tests/data/
venv/
*service_pb2_grpc.py
max-complexity = 10
ignore =
FI10,
FI12,
FI13,
FI14,
FI15,
FI16,
FI17,
FI50,
FI51,
FI52,
FI53,
FI54,
FI55,
FI56,
FI57,
W503
require-code = True
[testenv]
passenv =
AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY
AWS_SESSION_TOKEN
AWS_CONTAINER_CREDENTIALS_RELATIVE_URI
AWS_DEFAULT_REGION
# {posargs} can be passed in by additional arguments specified when invoking tox.
# Can be used to specify which tests to run, e.g.: tox -- -s
commands =
coverage run --source sagemaker -m pytest {posargs}
{env:IGNORE_COVERAGE:} coverage report --fail-under=90 --omit */tensorflow/tensorflow_serving/*
deps = .[test]
[testenv:flake8]
basepython = python3
skipdist = true
skip_install = true
deps =
flake8
flake8-future-import
commands = flake8
[testenv:pylint]
basepython = python3
skipdist = true
skip_install = true
deps =
pylint==2.3.1
commands =
python -m pylint --rcfile=.pylintrc -j 0 src/sagemaker
[testenv:twine]
basepython = python3
# twine check was added starting in 1.12.0
# https://github.com/pypa/twine/blob/master/docs/changelog.rst
deps =
twine>=1.12.0
# https://packaging.python.org/guides/making-a-pypi-friendly-readme/#validating-restructuredtext-markup
commands =
python setup.py sdist
twine check dist/*.tar.gz
[testenv:sphinx]
basepython = python3
changedir = doc
# Based on: https://github.com/rtfd/readthedocs.org/blob/8f0c78dde5edcc85acf90462a8518735a25482d3/readthedocs/doc_builder/python_environments.py#L263
install_command = python -m pip install --upgrade -I {packages}
# Based on: https://github.com/rtfd/readthedocs.org/blob/8f0c78dde5edcc85acf90462a8518735a25482d3/readthedocs/doc_builder/python_environments.py#L280
deps =
Pygments==2.2.0
setuptools<40
docutils==0.13.1
mock==1.0.1
pillow==2.6.1
alabaster>=0.7,<0.8,!=0.7.5
commonmark==0.5.4
recommonmark==0.4.0
sphinx<1.8
sphinx-rtd-theme<0.5
readthedocs-sphinx-ext<0.6
# pip install requirements.txt is separate as RTD does it in separate steps
# having the requirements.txt installed in deps above results in Double Requirement exception
# https://github.com/pypa/pip/issues/988
commands =
pip install --exists-action=w -r requirements.txt
sphinx-build -T -W -b html -d _build/doctrees-readthedocs -D language=en . _build/html