-
Notifications
You must be signed in to change notification settings - Fork 113
Expand file tree
/
Copy pathpyproject.toml
More file actions
301 lines (292 loc) · 8.31 KB
/
pyproject.toml
File metadata and controls
301 lines (292 loc) · 8.31 KB
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
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
[build-system]
build-backend = "hatchling.build"
requires = [ "hatch-vcs", "hatchling" ]
[project]
name = "squidpy"
description = "Spatial Single Cell Analysis in Python"
readme = "README.md"
keywords = [
"bio-informatics",
"image analysis",
"single-cell",
"spatial data analysis",
"spatial transcriptomics",
]
license = "BSD-3-Clause"
maintainers = [
{ name = "Selman Ozleyen", email = "selman.ozleyen@helmholtz-munich.de" },
{ name = "Tim Treis", email = "tim.treis@scverse.org" },
]
authors = [
{ name = "scverse" },
]
requires-python = ">=3.11"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Framework :: Jupyter",
"Intended Audience :: Science/Research",
"Natural Language :: English",
"Operating System :: MacOS :: MacOS X",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Topic :: Scientific/Engineering :: Bio-Informatics",
"Topic :: Scientific/Engineering :: Visualization",
"Typing :: Typed",
]
dynamic = [
"version", # allow version to be set by git tags
]
dependencies = [
"aiohttp>=3.8.1",
"anndata>=0.9",
"cycler>=0.11",
"dask[array]>=2021.2",
"dask-image>=0.5",
"docrep>=0.3.1",
"fast-array-utils",
"fsspec>=2021.11",
"imagecodecs>=2025.8.2,<2026",
"matplotlib>=3.3",
"matplotlib-scalebar>=0.8",
"networkx>=2.6",
"numba>=0.56.4",
"numpy>=1.23",
"omnipath>=1.0.7",
"pandas>=2.1",
"pillow>=8",
"pooch>=1.6",
"pyyaml>=6",
"scanpy>=1.9.3",
"scikit-image>=0.25",
# due to https://github.com/scikit-image/scikit-image/issues/6850 breaks rescale ufunc
"scikit-learn>=0.24",
"spatialdata>=0.7.1",
"spatialdata-plot",
"statsmodels>=0.12",
# https://github.com/scverse/squidpy/issues/526
"tifffile!=2022.4.22",
"tqdm>=4.50.2",
"validators>=0.18.2",
"xarray>=2024.10",
"zarr>=3",
]
optional-dependencies.dev = [
"hatch>=1.9",
"ipykernel",
"ipywidgets",
"jupyterlab",
"jupytext",
"notebook",
"pre-commit>=3",
"ruff",
]
optional-dependencies.docs = [
"docutils<0.22", # Pin to avoid sphinx-tabs KeyError with backrefs
"ipython",
"ipywidgets>=8",
"myst-nb>=0.17.1",
"nbsphinx>=0.8.1",
"sphinx>=5.3",
"sphinx-autodoc-annotation",
"sphinx-autodoc-typehints>=1.10.3",
"sphinx-copybutton>=0.5",
"sphinx-design",
"sphinx-rtd-theme",
"sphinx-tabs",
"sphinxcontrib-bibtex>=2.3",
"sphinxcontrib-spelling>=7.6.2",
]
optional-dependencies.leiden = [
"leidenalg",
"spatialleiden>=0.4",
]
optional-dependencies.test = [
"coverage[toml]>=7",
"pytest>=7",
# Just for VS Code
"pytest-cov>=4",
"pytest-mock>=3.5",
"pytest-timeout>=2.1",
"pytest-xdist>=3",
"scanpy[leiden]",
]
urls."Bug Tracker" = "https://github.com/scverse/squidpy/issues"
urls.Documentation = "https://squidpy.readthedocs.io"
urls.Home-page = "https://github.com/scverse/squidpy"
urls.Source = "https://github.com/scverse/squidpy"
[tool.setuptools]
package-dir = { "" = "src" }
include-package-data = true
[tool.setuptools_scm]
[tool.hatch]
build.hooks.vcs.version-file = "_version.py"
build.targets.wheel.packages = [ "src/squidpy" ]
metadata.allow-direct-references = true
version.source = "vcs"
[tool.pixi]
workspace.channels = [ "conda-forge" ]
workspace.platforms = [ "linux-64", "osx-arm64" ]
dependencies.python = ">=3.11"
pypi-dependencies.squidpy = { path = ".", editable = true }
tasks.format = "ruff format ."
tasks.kernel-install = 'python -m ipykernel install --user --name pixi-dev --display-name "squidpy (dev)"'
tasks.lab = "jupyter lab"
tasks.lint = "ruff check ."
tasks.pre-commit = "pre-commit run"
tasks.pre-commit-install = "pre-commit install"
tasks.test = "pytest -v --color=yes --tb=short --durations=10"
feature.py311.dependencies.python = "3.11.*"
feature.py313.dependencies.python = "3.13.*"
environments.default = { features = [ "py313" ], solve-group = "py313" }
environments.dev-py311 = { features = [ "dev", "test", "py311" ], solve-group = "py311" }
environments.dev-py313 = { features = [ "dev", "test", "py313" ], solve-group = "py313" }
environments.docs-py311 = { features = [ "docs", "py311" ], solve-group = "py311" }
environments.docs-py313 = { features = [ "docs", "py313" ], solve-group = "py313" }
environments.test-py313 = { features = [ "test", "py313" ], solve-group = "py313" }
[tool.ruff]
line-length = 120
exclude = [
".git",
".tox",
"__pycache__",
"build",
"dist",
"docs/_build",
"setup.py",
]
format.docstring-code-format = true
lint.select = [
"B", # flake8-bugbear
"BLE", # flake8-blind-except
"C4", # flake8-comprehensions
"E", # pycodestyle
"F", # pyflakes
"I", # isort
# below are not autofixed
"UP", # pyupgrade
"W", # pycodestyle
]
# "squidpy/*.py"= ["RST303"]
lint.ignore = [
# B008 Do not perform function calls in argument defaults.
"B008",
# B024 Do not use `__class__` for string comparisons.
"B024",
# D100 Missing docstring in public module
"D100",
# Missing docstring in public package
"D104",
# Missing docstring in magic method
"D105",
# D107 Missing docstring in __init__,
"D107",
# Missing blank line before section
"D411",
# line too long -> we accept long comment lines; formatter gets rid of long code lines
"E501",
# Do not assign a lambda expression, use a def -> lambda expression assignments are convenient
"E731",
# allow I, O, l as variable names -> I is the identity matrix, i, j, k, l is reasonable indexing notation
"E741",
## Flake8 rules not supported by ruff:
# RST201 Block quote ends without a blank line; unexpected unindent.
# "RST201",
# RST301 Unexpected indentation.
# "RST301",
# RST306 Unknown target name.
# "RST306",
# RST203 Definition list ends without a blank line; unexpected unindent.
# "RST203",
# line break before a binary operator -> black does not adhere to PEP8
# "W503",
# line break occured after a binary operator -> black does not adhere to PEP8
# "W504",
# whitespace before : -> black does not adhere to PEP8
# "E203",
# whitespace before : -> black does not adhere to PEP8
# "E203",
# missing whitespace after ,', ';', or ':' -> black does not adhere to PEP8
# "E231",
# continuation line over-indented for hanging indent -> black does not adhere to PEP8
# "E126",
# inline comment should start with '#' -> Scanpy allows them for specific explanations
# "E266",
# format string does contain unindexed parameters
# "P101",
# indentation is not a multiple of 4
# "E111",
# "E114",
]
lint.per-file-ignores."*/__init__.py" = [ "D104", "F401" ]
lint.per-file-ignores.".scripts/ci/download_data.py" = [ "B", "D" ]
lint.per-file-ignores."docs/*" = [ "B", "D" ]
lint.per-file-ignores."src/squidpy/_constants/_constants.py" = [ "D101" ]
lint.per-file-ignores."src/squidpy/_constants/_pkg_constants.py" = [ "D101", "D102", "D106" ]
lint.per-file-ignores."src/squidpy/pl/_ligrec.py" = [ "B", "D" ]
lint.per-file-ignores."tests/*" = [ "D" ]
lint.unfixable = [
"B",
"BLE",
"C4",
"F401", # ... imported but unused
]
# Disallow all relative imports.
lint.flake8-tidy-imports.ban-relative-imports = "all"
lint.isort.required-imports = [ "from __future__ import annotations" ]
[tool.pytest]
strict = true
filterwarnings = [
"error::numba.NumbaPerformanceWarning",
"ignore::UserWarning",
"ignore::anndata.OldFormatWarning",
"ignore:.*pkg_resources:DeprecationWarning",
]
python_files = [ "test_*.py" ]
testpaths = [ "tests/" ]
addopts = [
"--ignore=docs",
]
markers = [
"internet: tests that require internet",
"gpu: tests that require GPU",
]
[tool.coverage]
run.branch = true
run.omit = [
"*/__init__.py",
"*/_version.py",
"tox/*",
]
run.parallel = true
run.source = [ "squidpy" ]
paths.source = [
"squidpy",
"*/site-packages/squidpy",
]
report.exclude_lines = [
"\\#.*pragma:\\s*no.?cover",
"^\\s*raise AssertionError\\b",
"^\\s*raise NotImplementedError\\b",
"^\\s*return NotImplemented\\b",
"^if __name__ == .__main__.:$",
]
report.precision = 2
report.show_missing = true
report.skip_empty = true
report.sort = "Miss"
[tool.cruft]
skip = [
"tests",
"src/**/__init__.py",
"src/**/basic.py",
"docs/api.md",
"docs/changelog.md",
"docs/references.bib",
"docs/references.md",
"docs/notebooks/example.ipynb",
]