-
Notifications
You must be signed in to change notification settings - Fork 84
/
tox.ini
144 lines (127 loc) · 3.1 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
[pytest]
python_files = test_*.py
testpaths = tests/
xfail_strict = true
; qt_api=pyqt5
addopts =
--ignore=tests/plotting/test_interactive.py
filterwarnings =
ignore::UserWarning
ignore::anndata.OldFormatWarning
ignore:.*pkg_resources:DeprecationWarning
[coverage:run]
branch = true
parallel = true
source = squidpy
omit =
*/__init__.py
*/_version.py
squidpy/pl/_interactive/*
[coverage:paths]
source =
squidpy
*/site-packages/squidpy
[coverage:report]
exclude_lines =
\#.*pragma:\s*no.?cover
^if __name__ == .__main__.:$
^\s*raise AssertionError\b
^\s*raise NotImplementedError\b
^\s*return NotImplemented\b
show_missing = true
precision = 2
skip_empty = True
sort = Miss
[gh-actions]
python =
3.10: py310
3.11: py311
3.12: py312
[gh-actions:env]
PLATFORM =
ubuntu-latest: linux
macos-latest: macos
[tox]
isolated_build = True
envlist =
covclean
lint
py{3.10,3.11}-{linux,macos}
coverage
readme
check-docs
docs
skip_missing_interpreters = true
[testenv]
platform =
linux: linux
macos: (osx|darwin)
deps =
pytest
pytest-xdist
pytest-cov
; pytest-qt
pytest-mock
pytest-timeout
# see: https://github.com/numba/llvmlite/issues/669
extras = interactive
setenv = linux: PYTEST_FLAGS=--test-napari
passenv = TOXENV,CI,CODECOV_*,GITHUB_ACTIONS,PYTEST_FLAGS,DISPLAY,XAUTHORITY,MPLBACKEND
usedevelop = true
commands =
python -m pytest --color=yes --cov --cov-append --cov-report=xml --cov-config={toxinidir}/tox.ini --ignore docs/ {posargs:-vv} {env:PYTEST_FLAGS:}
[testenv:covclean]
description = Clean coverage files.
deps = coverage
skip_install = True
commands = coverage erase
[testenv:coverage]
description = Report the coverage difference.
deps =
coverage
diff_cover
skip_install = true
depends = py{310,311,312}-{linux,macos}
parallel_show_output = True
commands =
coverage report --omit="tox/*"
coverage xml --omit="tox/*" -o {toxinidir}/coverage.xml
diff-cover --compare-branch origin/main {toxinidir}/coverage.xml
[testenv:lint]
description = Perform linting.
deps = pre-commit>=3.0.4
skip_install = true
commands = pre-commit run --all-files --show-diff-on-failure {posargs:}
[testenv:clean-docs]
description = Clean the documentation artifacts.
deps =
skip_install = true
changedir = {toxinidir}/docs
allowlist_externals = make
commands = make clean
[testenv:check-docs]
description = Lint the documentation.
deps =
extras = docs
ignore_errors = true
allowlist_externals = make
pass_env = PYENCHANT_LIBRARY_PATH
set_env = SPHINXOPTS = -W -q --keep-going
changedir = {tox_root}{/}docs
commands =
make linkcheck {posargs}
[testenv:docs]
description = Build the documentation.
deps =
extras = docs
allowlist_externals = make
changedir = {tox_root}{/}docs
commands =
make html {posargs}
commands_post =
python -c 'import pathlib; print("Documentation is under:", pathlib.Path("{tox_root}") / "docs" / "_build" / "html" / "index.html")'
[testenv:download-data]
description = Download and cache data.
skip_install = false
deps =
commands = python ./.scripts/ci/download_data.py {posargs}