-
Notifications
You must be signed in to change notification settings - Fork 20
/
tox.ini
164 lines (152 loc) · 3.05 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
[tox]
envlist =
py{38,39,310,311,312}
lint
lintclient
[testenv]
deps =
coverage
filelock
mock
pooch
pytest
pytest-cov
pytest-girder
pytest-rerunfailures
pytest-xdist
setuptools_scm
urllib3<1.26
-rrequirements-dev.txt
extras =
analysis
allowlist_externals =
rm
npx
commands =
rm -rf build/test/coverage/web_temp
girder build --dev
pytest --reruns=3 --numprocesses {env:PYTEST_NUMPROCESSES:logical} --cov {envsitepackagesdir}/histomicsui {posargs}
npx nyc report --temp-dir build/test/coverage/web_temp --report-dir .tox/coverage --reporter cobertura --reporter text-summary
passenv = PYTEST_*
setenv =
NPM_CONFIG_FUND=false
NPM_CONFIG_AUDIT=false
NPM_CONFIG_AUDIT_LEVEL=high
NPM_CONFIG_LOGLEVEL=warn
NPM_CONFIG_PROGRESS=false
NPM_CONFIG_PREFER_OFFLINE=true
PIP_FIND_LINKS=https://girder.github.io/large_image_wheels
[testenv:noanalysis]
extras =
[testenv:lint]
skipsdist = true
skip_install = true
deps =
flake8
flake8-bugbear
flake8-docstrings
flake8-isort
flake8-quotes
ruff
commands =
ruff check histomicsui tests
flake8 {posargs}
[testenv:lintclient]
skip_install = true
usedevelop = false
deps =
changedir = {toxinidir}/histomicsui/web_client
allowlist_externals =
npm
commands =
npm install --no-package-lock
npm run lint
[testenv:formatclient]
skip_install = true
usedevelop = false
deps =
changedir = {toxinidir}/histomicsui/web_client
allowlist_externals =
npm
commands =
npm install --no-package-lock
npm run format
[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
max-complexity = 14
exclude =
build
node_modules
*/*egg*/*
.git
__pycache__
.tox
*/web_client/*
ignore =
# D10* - Missing docstring in *
D10
D200
D205
D400
D401
# 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
[testenv:format]
description = Autoformat import order and pep8
skipsdist = true
skip_install = true
deps =
autopep8
isort
unify
ruff
commands =
isort {posargs:.}
autopep8 -ria histomicsui tests
unify --in-place --recursive histomicsui tests
ruff check histomicsui tests --fix
[pytest]
addopts = --verbose --strict-markers --showlocals --cov-report="term" --cov-report="xml" --cov
testpaths = tests
[coverage:paths]
source =
histomicsui/
.tox/*/lib/python*/site-packages/histomicsui/
[coverage:run]
data_file = .tox/coverage/.coverage
branch = True
omit =
tests/*
.tox/*
parallel = True
[coverage:xml]
output = .tox/coverage/py_coverage.xml