Skip to content

Commit 8e5a9b8

Browse files
committed
use scverse-backends
1 parent 2466a1e commit 8e5a9b8

11 files changed

Lines changed: 162 additions & 1060 deletions

File tree

.github/workflows/test.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,6 @@ jobs:
9898
os: [ubuntu-latest, macos-latest]
9999
env: ${{ fromJSON(needs.get-environments.outputs.envs) }}
100100
exclude:
101-
- os: macos-latest
102-
env: { name: hatch-test.py3.11-stable }
103101
- os: macos-latest
104102
env: { name: hatch-test.py3.12-stable }
105103
- os: macos-latest

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Head over to the [documentation](https://squidpy.readthedocs.io/en/stable/) for
2020

2121
## Installation
2222

23-
We recommend running Squidpy on a recent Linux or macOS system with Python ≥3.11, but it also works on Windows via WSL.
23+
We recommend running Squidpy on a recent Linux or macOS system with Python ≥3.12, but it also works on Windows via WSL.
2424

2525
Install from [PyPI](https://pypi.org/project/squidpy) with:
2626

docs/api.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,14 +89,9 @@ import squidpy as sq
8989
## Settings
9090

9191
```{eval-rst}
92-
.. currentmodule:: squidpy._backends._settings
93-
94-
.. autoclass:: _Settings
95-
:members: backend, use_backend, available_backends, get_backend
96-
9792
.. data:: squidpy.settings
9893
99-
The global settings instance. See :class:`~squidpy._backends._settings._Settings`.
94+
The global backend settings instance provided by :mod:`scverse_backends`.
10095
```
10196

10297
## Datasets

docs/installation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Installation
22

3-
Squidpy requires Python version >= 3.11 to run.
3+
Squidpy requires Python version >= 3.12 to run.
44

55
## PyPI
66

pyproject.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ maintainers = [
2121
authors = [
2222
{ name = "scverse" },
2323
]
24-
requires-python = ">=3.11"
24+
requires-python = ">=3.12"
2525
classifiers = [
2626
"Development Status :: 5 - Production/Stable",
2727
"Environment :: Console",
@@ -31,7 +31,6 @@ classifiers = [
3131
"Operating System :: MacOS :: MacOS X",
3232
"Operating System :: POSIX :: Linux",
3333
"Programming Language :: Python :: 3 :: Only",
34-
"Programming Language :: Python :: 3.11",
3534
"Programming Language :: Python :: 3.12",
3635
"Programming Language :: Python :: 3.13",
3736
"Programming Language :: Python :: 3.14",
@@ -66,6 +65,7 @@ dependencies = [
6665
"scikit-image>=0.25",
6766
# due to https://github.com/scikit-image/scikit-image/issues/6850 breaks rescale ufunc
6867
"scikit-learn>=0.24",
68+
"scverse-backends",
6969
"spatialdata>=0.7.1",
7070
"spatialdata-plot",
7171
"statsmodels>=0.12",
@@ -142,7 +142,7 @@ version.source = "vcs"
142142
[tool.pixi]
143143
workspace.channels = [ "conda-forge" ]
144144
workspace.platforms = [ "linux-64", "osx-arm64" ]
145-
dependencies.python = ">=3.11"
145+
dependencies.python = ">=3.12"
146146
pypi-dependencies.squidpy = { path = ".", editable = true }
147147
tasks.format = "ruff format ."
148148
tasks.kernel-install = 'python -m ipykernel install --user --name pixi-dev --display-name "squidpy (dev)"'
@@ -151,12 +151,12 @@ tasks.lint = "ruff check ."
151151
tasks.pre-commit = "pre-commit run"
152152
tasks.pre-commit-install = "pre-commit install"
153153
tasks.test = "pytest -v --color=yes --tb=short --durations=10"
154-
feature.py311.dependencies.python = "3.11.*"
154+
feature.py312.dependencies.python = "3.12.*"
155155
feature.py313.dependencies.python = "3.13.*"
156156
environments.default = { features = [ "py313" ], solve-group = "py313" }
157-
environments.dev-py311 = { features = [ "dev", "test", "py311" ], solve-group = "py311" }
157+
environments.dev-py312 = { features = [ "dev", "test", "py312" ], solve-group = "py312" }
158158
environments.dev-py313 = { features = [ "dev", "test", "py313" ], solve-group = "py313" }
159-
environments.docs-py311 = { features = [ "docs", "py311" ], solve-group = "py311" }
159+
environments.docs-py312 = { features = [ "docs", "py312" ], solve-group = "py312" }
160160
environments.docs-py313 = { features = [ "docs", "py313" ], solve-group = "py313" }
161161
environments.test-py313 = { features = [ "test", "py313" ], solve-group = "py313" }
162162

src/squidpy/_backends/__init__.py

Lines changed: 35 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,39 @@
22

33
from __future__ import annotations
44

5-
from squidpy._backends._dispatch import dispatch
6-
from squidpy._backends._registry import available_backend_names, get_backend
7-
from squidpy._backends._settings import settings
5+
from scverse_backends import BackendDispatcher
86

9-
__all__ = ["dispatch", "get_backend", "available_backend_names", "settings"]
7+
_dispatcher = BackendDispatcher(
8+
entrypoint_group="squidpy.backends",
9+
host_name="squidpy",
10+
trusted_backends={
11+
"rapids_singlecell": {
12+
"aliases": ["rapids-singlecell", "rsc", "cuda"],
13+
"package": "rapids-singlecell",
14+
"distributions": [
15+
"rapids-singlecell",
16+
"rapids-singlecell-cu12",
17+
"rapids-singlecell-cu13",
18+
],
19+
"entrypoints": ["rapids_singlecell"],
20+
"module_prefixes": ["rapids_singlecell"],
21+
},
22+
},
23+
reserved_backends={
24+
"gpu": "Use a concrete backend alias such as 'cuda' or 'rsc'.",
25+
},
26+
)
27+
28+
dispatch = _dispatcher.dispatch
29+
settings = _dispatcher.settings
30+
get_backend = _dispatcher.get_backend
31+
available_backend_names = _dispatcher.available_backend_names
32+
discover = _dispatcher.discover
33+
34+
__all__ = [
35+
"available_backend_names",
36+
"discover",
37+
"dispatch",
38+
"get_backend",
39+
"settings",
40+
]

0 commit comments

Comments
 (0)