-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathtox.ini
137 lines (128 loc) · 2.43 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{38,39,310,311,312,313}
flake8
lintclient
[testenv]
passenv =
DOCKER_*
PYTEST_*
deps =
coverage
mock
pytest
pytest-cov
pytest-forked
pytest-girder
pytest-mock
pytest-xdist
celery
urllib3
extras =
girder
worker
allowlist_externals =
mkdir
npx
rm
commands =
rm -rf build/test/coverage/web_temp
girder build --dev
pytest --forked --cov {envsitepackagesdir}/slicer_cli_web {posargs}
npx nyc report --temp-dir build/test/coverage/web_temp --report-dir .tox/coverage --reporter cobertura --reporter text-summary
[testenv:flake8]
skipsdist = true
skip_install = true
deps =
flake8
flake8-bugbear
flake8-docstrings
flake8-isort
flake8-quotes
pep8-naming
commands =
flake8 {posargs}
[testenv:format]
description = Autoformat import order and pep8
skipsdist = true
skip_install = true
deps =
autopep8
isort
commands =
isort {posargs:.}
autopep8 -ria slicer_cli_web tests
[testenv:lintclient]
skip_install = true
usedevelop = false
deps =
changedir = {toxinidir}/slicer_cli_web/web_client
allowlist_externals =
npm
commands =
npm install --no-package-lock
npm run lint
[testenv:release]
passenv =
TWINE_USERNAME
TWINE_PASSWORD
TWINE_REPOSITORY_URL
CIRCLE_BRANCH
deps =
build
twine
commands =
python -m build
twine check dist/*
twine upload --skip-existing dist/*
[flake8]
max-line-length = 100
show-source = True
format = pylint
exclude =
node_modules,
.eggs,
.git,
__pycache__,
.tox
ignore =
# D10* - Missing docstring in *
D10,
# D20* - One-line docstrings ...
D20,
# E123 - Closing bracket does not match indentation of opening bracket’s line
E123
# N802 - Function name should be lowercase.
N802,
# N803 - Argument name should be lowercase.
N803,
# N806 - Variable in function should be lowercase.
N806,
# N812 - Lowercase imported as non lowercase.
N812,
# N815 - mixedCase variable in class scope
N815,
# N816 - mixedCase variable in global scope
N816,
# W504 - Line break after binary operator
W504,
D205,
D400,
D401
[pytest]
addopts = --verbose --strict --showlocals --cov-report="term" --cov-report="xml" --cov
cache_dir = .tox/pytest_cache
testpaths = tests
[coverage:paths]
source =
slicer_cli_web/
.tox/*/lib/python*/site-packages/slicer_cli_web/
[coverage:run]
branch = True
parallel = True
data_file = .tox/coverage/.coverage
omit =
tests/*
.tox/*
[coverage:xml]
output = .tox/coverage/py_coverage.xml