forked from wandb/client-ng
-
Notifications
You must be signed in to change notification settings - Fork 1
/
tox.ini
132 lines (120 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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
[tox]
minversion=3.7
envlist = codemod,yapf,mypy,py27,py35,py36,py37,cover
[testenv]
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/requirements_dev.txt
pytest
pytest-cov
pytest-xdist
setenv =
py{27,35,36}: COVERAGE_FILE={envdir}/.coverage
commands =
python -m pytest --cov=wandb --cov=tests/ --cov-report= --no-cov-on-fail
[testenv:codemod]
skip_install = true
deps =
libcst
commands=
/bin/bash -c './tools/strip_type_annotations.sh'
[testenv:flake8]
basepython=python3
skip_install = true
deps =
flake8
flake8-bugbear
flake8-colors
flake8-docstrings>=1.3.1
flake8-import-order>=0.9
flake8-typing-imports>=1.1
pep8-naming
commands =
flake8 wandb/ tests/ setup.py
[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:reformat]
basepython=python3
skip_install = true
deps=
yapf
commands=
/bin/bash -c 'yapf -i {toxinidir}/wandb/sdk/*.py'
[flake8]
ignore = D203, W503, E203
exclude =
.tox,
.git,
__pycache__,
docs/source/conf.py,
build,
dist,
tests/fixtures/*,
*.pyc,
*.egg-info,
.cache,
.eggs
max-complexity = 10
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}
commands =
/usr/bin/env bash -c '{envpython} -m coverage combine {toxworkdir}/py*/.coverage'
coverage report --ignore-errors --skip-covered --include wandb/*
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 100 --skip-covered --include tests/*
#coverage report --fail-under 25 --skip-covered --show-missing --include wandb/*
coverage report --fail-under 25 --skip-covered --include wandb/*
[testenv:coveralls]
# NOTE: Coveralls should be run with:
# tools/coveralls.sh
# basepython = python3
deps =
coveralls
commands =
coveralls