This repository has been archived by the owner on Sep 24, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathtox.ini
224 lines (207 loc) · 4.84 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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
[tox]
minversion=3.7
envlist = codemod,black,mypy,flake8,py36,py27,py37,py38,cover
[testenv]
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/requirements_dev.txt
pytest
pytest-cov
pytest-xdist
pytest-flask
pytest-mock<=3.2.0
pytest-timeout
pytest-openfiles
passenv = USERNAME
setenv =
py{27,35,36,37,38}: COVERAGE_FILE={envdir}/.coverage
py{37}: WINDIR=C:\\Windows
# Pytorch installations on non-darwin need the `-f`
install_command = pip install -f https://download.pytorch.org/whl/torch_stable.html {opts} {packages}
commands =
py{35,36,37,38}: ipython kernel install --user --name=wandb_python
python -m pytest --cov-config=tox.ini --cov=wandb --cov=tests/ --cov-report= --no-cov-on-fail --ignore=wandb/sweeps --ignore=build/ {posargs}
[testenv:dev]
usedevelop = true
basepython = python3
commands = ipython
[testenv:codemod]
skip_install = true
deps =
libcst
commands=
/bin/bash -c './tools/strip_type_annotations.sh'
[testenv:codemodcheck]
skip_install = true
deps =
libcst
commands=
/bin/bash -c './tools/strip_type_annotations.sh --check'
[testenv:flake8]
basepython=python3
skip_install = true
deps =
flake8
flake8-colors
flake8-bugbear
pep8-naming
flake8-fixme
flake8-typing-imports>=1.1
flake8-import-order>=0.9
# flake8-docstrings>=1.3.1
commands =
flake8
[testenv:pylint]
basepython=python3
deps=pylint
commands=
pylint -rn --rcfile={toxinidir}/.pylintrc wandb.sdk
[testenv:mypy]
basepython=python3
skip_install = true
deps=
mypy
setenv =
MYPYPATH = {toxinidir}
commands=
mypy --show-error-codes --config-file {toxinidir}/mypy.ini -p wandb
[testenv:coverage]
basepython=python3
deps=
coverage
pytest
commands=
coverage run --source wandb -m pytest
coverage report -m
[testenv:yapf]
basepython=python3
skip_install = true
deps=
yapf
commands=
/bin/bash -c 'yapf -d {toxinidir}/wandb/sdk/*.py'
[testenv:format]
basepython=python3
skip_install = true
deps=
black==19.10b0
commands=
black wandb/
[testenv:black]
basepython=python3
skip_install = true
deps=
black==19.10b0
commands=
black --check wandb/
[flake8]
max-line-length = 88
# ignore = D203, W503, E203
ignore =
# TODO()'s are allowed for now
T101,
W503,
# allow long lines, lets use blacks rules
E501,
# ignore space after comma rule, let black rule
E231,
# select = C,E,F,W,B,B901,I,N
per-file-ignores =
wandb/cli/cli.py:E501,C901,I202,E203 # conflict with black
wandb/sdk/wandb_watch.py:E501
wandb/lib/git.py:E501
wandb/wandb_controller.py:N803,N806
wandb/apis/public.py:B006
exclude =
.tox,
.git,
__pycache__,
docs/source/conf.py,
docs/*.py,
build,
dist,
tests/fixtures/*,
tests/,
codemod/,
standalone_tests/,
wandb/__init__.py,
wandb/wandb_torch.py,
wandb/data/,
wandb/errors/,
wandb/old/,
wandb/sdk_py27/,
wandb/proto/,
wandb/util.py,
wandb/data_types.py,
wandb/env.py,
wandb/sweeps/,
wandb/integration/magic.py,
wandb/integration/keras/,
wandb/integration/tensorboard/,
wandb/integration/lightgbm/,
wandb/integration/xgboost/,
wandb/integration/fastai/,
wandb/filesync/,
wandb/internal/internal_api.py,
wandb/internal/file_pusher.py,
wandb/internal/file_stream.py,
wandb/internal/git_repo.py,
wandb/internal/artifacts.py,
wandb/sdk/wandb_artifacts.py,
wandb/keras/,
wandb/compat/,
wandb/superagent/,
wandb/plots/,
wandb/sklearn/,
wandb/viz.py,
vendor/,
wandb/vendor/,
wandb/apis/__init__.py,
*.pyc,
*.egg-info,
.cache,
.eggs
max-complexity = 18
import-order-style = google
application-import-names = flake8
format = ${cyan}%(path)s${reset}:${yellow_bold}%(row)d${reset}:${green_bold}%(col)d${reset}: ${red_bold}%(code)s${reset} %(text)s
[testenv:covercircle]
skip_install = true
basepython = python3
passenv = CIRCLECI CIRCLE_* CI_PULL_REQUEST COVERALLS_PARALLEL COVERALLS_REPO_TOKEN
deps =
pytest
coverage
coveralls
setenv =
CIRCLE_BUILD_NUM={env:CIRCLE_WORKFLOW_ID}
COVERALLS_PARALLEL=true
commands =
/usr/bin/env bash -c '{envpython} -m coverage combine {toxworkdir}/py*/.coverage'
coverage report --ignore-errors --skip-covered --omit "wandb/vendor/*"
coveralls
[testenv:cover]
skip_install = true
# basepython = python3.6
deps =
pytest
coverage
commands =
/usr/bin/env bash -c '{envpython} -m coverage combine {toxworkdir}/py*/.coverage'
coverage report --fail-under 80 --skip-covered --include "tests/*"
coverage report --fail-under 50 --skip-covered
[testenv:coveralls]
# NOTE: Coveralls should be run with:
# tools/coveralls.sh
# basepython = python3
deps =
coveralls
commands =
coveralls
[coverage:run]
omit =
*/wandb/vendor/*
[coverage:paths]
source =
wandb/sdk/
wandb/sdk_py27/