forked from aws/sagemaker-experiments
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
137 lines (123 loc) · 2.41 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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
[tox]
envlist = py{35,36,37}
skip_missing_interpreters = False
ignore_basepython_conflict = True
[flake8]
max-line-length = 120
exclude =
build/
.git
__pycache__
.tox
venv/
tests/
doc/
max-complexity = 10
ignore =
C901,
E203,
FI10,
FI11,
FI12,
FI13,
FI14,
FI15,
FI16,
FI17,
FI18,
FI50,
FI51,
FI52,
FI53,
FI54,
FI55,
FI56,
FI57,
W503
require-code = True
[testenv]
passenv =
AWS_*
SAGEMAKER_ENDPOINT
COVERAGE_FILE
# {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 smexperiments -m pytest {posargs}
{env:IGNORE_COVERAGE:} coverage report --fail-under=95
extras = test
deps =
boto3 >= 1.10.32
python-dateutil
pytest
pytest-cov
docker
[testenv:flake8]
basepython = python3
skipdist = true
skip_install = true
deps =
flake8
flake8-future-import
commands = flake8
[testenv:black-format]
# Used during development (before committing) to format .py files.
deps = black
commands =
black -l 120 ./
[testenv:black-check]
# Used during continuous integration
deps = black
commands =
black -l 120 --check ./
[testenv:pylint]
skipdist = true
skip_install = true
deps =
pylint
commands =
python -m pylint --exit-zero --rcfile=.pylintrc -j 0 src/smexperiments
[testenv:slow-tests]
passenv =
AWS_*
SAGEMAKER_ENDPOINT
# {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 =
pytest {posargs} --verbose --runslow --capture=no
extras = test
deps =
boto3 >= 1.10.32
pytest
docker
[testenv:docs]
basepython = python3
changedir = docs
deps =
Pygments
docutils
alabaster
commonmark
recommonmark
sphinx
sphinx-rtd-theme
readthedocs-sphinx-ext
commands =
sphinx-build -T -W -b html -d _build/doctrees-readthedocs -D language=en . _build/html
[testenv:release]
description = create a GitHub release, version number is derived from commit messages
basepython = python3
passenv =
GITHUB_*
deps =
PyGithub
pathlib
commands = python scripts/release.py {posargs}
[testenv:upload-coverage]
basepython = python3
deps =
codecov
passenv =
CODECOV_UPLOAD_TOKEN
commands =
codecov -t {env:CODECOV_UPLOAD_TOKEN:}