-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
160 lines (144 loc) · 3.08 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
[tox]
minversion = 3.24.0
envlist = black,flake8,mypy,py38
[testenv:py{27,35,36,37,38,39}]
deps =
pytest
pytest-cov
PyYAML
wandb
setenv =
COVERAGE_FILE={envdir}/.coverage
commands =
python -m pytest --cov-config=.coveragerc --cov --cov-report= --no-cov-on-fail {posargs:tests/}
[testenv:flake8]
basepython = python3
skip_install = true
deps =
flake8
flake8-colors
flake8-bugbear
pep8-naming
flake8-fixme
flake8-typing-imports
flake8-import-order
commands =
flake8 {posargs:src/}
[testenv:mypy]
basepython = python3
skip_install = true
deps =
mypy==0.991
lxml
setenv =
MYPYPATH = {toxinidir}
commands =
mypy --install-types --non-interactive --show-error-codes --html-report mypy-results/ src/
[flake8]
min_python_version = 3.6.0
max-line-length = 120
exclude =
src/yea_wandb/mock_server.py
src/yea_wandb/mock_requests.py
ignore =
# TODO()'s are allowed for now
T101,
# black formatting is inconsistent with flake8
E203,
# Cant enforce both W503 and W504
W503,
[black]
paths = src/ setup.py
deps =
black
[testenv:blackformat]
deps = {[black]deps}
basepython = python3
skip_install = true
commands =
black {[black]paths}
[testenv:black]
deps = {[black]deps}
basepython = python3
skip_install = true
commands =
black --check {[black]paths}
[testenv:blackdiff]
basepython = python3
skip_install = true
deps = {[black]deps}
commands =
black --diff {[black]paths}
[isort]
profile = black
skip =
src/yea_wandb/mock_server.py
src/yea_wandb/mock_requests.py
src/yea_wandb/backend.py
[isortbase]
args = -o yea -p yaml
[testenv:isort]
deps = isort
basepython = python3
skip_install = true
commands =
isort {[isortbase]args} --check {posargs:src/}
[testenv:isortformat]
deps = isort
basepython = python3
skip_install = true
commands =
isort {[isortbase]args} {posargs:src/}
[testenv:isortdiff]
deps = isort
basepython = python3
skip_install = true
commands =
isort {[isortbase]args} --check --diff {posargs:src/}
[testenv:cover]
skip_install = true
basepython = python3
deps =
pytest
coverage
codecov
whitelist_externals =
mkdir
cp
commands =
mkdir -p cover-results
/usr/bin/env bash -c '{envpython} -m coverage combine {toxworkdir}/py*/.coverage*'
coverage xml --ignore-errors
cp .coverage coverage.xml cover-results/
coverage report --ignore-errors --skip-covered
[testenv:covercircle]
skip_install = true
basepython = python3
passenv = CI CIRCLECI CIRCLE_* CODECOV_* TOXENV
deps =
pytest
coverage
codecov
setenv =
CIRCLE_BUILD_NUM={env:CIRCLE_WORKFLOW_ID}
whitelist_externals =
mkdir
cp
commands =
mkdir -p cover-results
/usr/bin/env bash -c '{envpython} -m coverage combine {toxworkdir}/py*/.coverage*'
coverage xml --ignore-errors
cp .coverage coverage.xml cover-results/
coverage report --ignore-errors --skip-covered
codecov -e TOXENV -F unittest
[testenv:release]
skip_install = true
basepython = python3
deps =
twine
wheel
setuptools
whitelist_externals =
make
commands =
make release-tox