Skip to content

Commit f1ed128

Browse files
authored
Merge branch 'main' into move-to-nanobind
2 parents 4c6c542 + ff9f447 commit f1ed128

File tree

10 files changed

+74
-41
lines changed

10 files changed

+74
-41
lines changed

.readthedocs.yml

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,17 @@ submodules:
55
build:
66
os: ubuntu-24.04
77
tools:
8-
python: "3.12"
8+
python: '3.13'
9+
jobs:
10+
post_checkout:
11+
# unshallow so version can be derived from tag
12+
- git fetch --unshallow || true
13+
create_environment:
14+
- asdf plugin add uv
15+
- asdf install uv latest
16+
- asdf global uv latest
17+
build:
18+
html:
19+
- CMAKE_ARGS="-DRSC_BUILD_EXTENSIONS=OFF" uvx hatch run docs:build
20+
- mv docs/_build $READTHEDOCS_OUTPUT
921

10-
commands:
11-
# Install and set up uv
12-
- asdf plugin add uv
13-
- asdf install uv latest
14-
- asdf global uv latest
15-
16-
# Use uv to synchronize dependencies
17-
- CMAKE_ARGS="-DRSC_BUILD_EXTENSIONS=OFF" uv pip install --system ".[doc]"
18-
19-
# Build documentation using sphinx
20-
- python -m sphinx -T -b html -d docs/_build/doctrees -D language=en docs $READTHEDOCS_OUTPUT/html
21-
22-
sphinx:
23-
configuration: docs/conf.py
24-
fail_on_warning: true

docs/Installation.md

Lines changed: 32 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,52 @@
11
# Installation
22
## Conda
3-
The easiest way to install *rapids-singlecell* is to use one of the *yaml* file provided in the [conda](https://github.com/scverse/rapids_singlecell/tree/main/conda) folder. These *yaml* files install everything needed to run the example notebooks and get you started.
3+
The easiest way to install *rapids-singlecell* is to use one of the *yaml* files provided in the [conda](https://github.com/scverse/rapids_singlecell/tree/main/conda) folder. These *yaml* files install everything needed to run the example notebooks and get you started.
4+
5+
`````{tab-set}
6+
````{tab-item} CUDA 13
7+
```bash
8+
conda env create -f conda/rsc_rapids_25.12.yml
9+
# or
10+
mamba env create -f conda/rsc_rapids_25.12.yml
411
```
5-
conda env create -f conda/rsc_rapids_25.12.yml #default CUDA-13.0 PYTHON-3.13
12+
*Python 3.13, CUDA 13.0*
13+
````
14+
````{tab-item} CUDA 12
15+
```bash
16+
conda env create -f conda/rsc_rapids_25.10.yml
617
# or
7-
mamba env create -f conda/rsc_rapids_25.10.yml #default CUDA-12.9 PYTHON-3.13
18+
mamba env create -f conda/rsc_rapids_25.10.yml
819
```
20+
*Python 3.13, CUDA 12.9*
21+
````
22+
`````
23+
924
```{note}
1025
RAPIDS currently doesn't support `channel_priority: strict`; use `channel_priority: flexible` instead
1126
```
1227

1328
## PyPI
1429
*rapids-singlecell* is also on PyPI.
15-
```
30+
```bash
1631
pip install rapids-singlecell
1732
```
1833
The default installer doesn't cover RAPIDS nor CuPy. Information on how to install RAPIDS & CuPy can be found [here](https://rapids.ai/start.html).
1934

20-
If you want to use RAPIDS new PyPI packages, the whole library with all dependencies can be install with:
21-
```
22-
uv pip install 'rapids-singlecell[rapids12]' --extra-index-url=https://pypi.nvidia.com #CUDA12
23-
uv pip install 'rapids-singlecell[rapids13]' --extra-index-url=https://pypi.nvidia.com #CUDA13
24-
35+
If you want to use RAPIDS new PyPI packages, the whole library with all dependencies can be installed with:
2536

37+
`````{tab-set}
38+
````{tab-item} CUDA 13
39+
```bash
40+
uv pip install 'rapids-singlecell[rapids13]' --extra-index-url=https://pypi.nvidia.com
2641
```
42+
````
43+
````{tab-item} CUDA 12
44+
```bash
45+
uv pip install 'rapids-singlecell[rapids12]' --extra-index-url=https://pypi.nvidia.com
46+
```
47+
````
48+
`````
49+
2750
It is important to ensure that the CUDA environment is set up correctly so that RAPIDS and CuPy can locate the necessary libraries.
2851

2952
```{note}

docs/conf.py

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,13 @@
5858
"sphinx.ext.githubpages",
5959
"sphinx_autodoc_typehints",
6060
"sphinx.ext.extlinks",
61-
"readthedocs_ext.readthedocs",
6261
"sphinx.ext.imgconverter",
6362
"sphinx_copybutton",
6463
"nbsphinx",
6564
"scanpydoc",
6665
"sphinx.ext.linkcode",
67-
"sphinx_copybutton",
66+
"sphinx_tabs.tabs",
67+
"sphinxext.opengraph",
6868
]
6969

7070
autosummary_generate = True
@@ -130,7 +130,14 @@
130130
# List of patterns, relative to source directory, that match files and
131131
# directories to ignore when looking for source files.
132132
# This pattern also affects html_static_path and html_extra_path.
133-
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", "._*", "*.ipynb_checkpoints"]
133+
exclude_patterns = [
134+
"_build",
135+
"Thumbs.db",
136+
".DS_Store",
137+
"._*",
138+
"*.ipynb_checkpoints",
139+
"release-notes/blank.md",
140+
]
134141

135142

136143
# -- Options for HTML output -------------------------------------------------
@@ -152,6 +159,11 @@
152159
html_css_files = ["_static/css/override.css"]
153160
html_title = "rapids-singlecell"
154161

162+
# OpenGraph metadata for social media previews
163+
ogp_site_url = "https://rapids-singlecell.readthedocs.io/"
164+
ogp_site_name = "rapids-singlecell"
165+
ogp_image = "_static/logo_RTD.svg"
166+
155167
qualname_overrides = {
156168
"numpy.bool_": "numpy.bool", # Since numpy 2, numpy.bool is the canonical dtype
157169
}
@@ -163,6 +175,7 @@
163175
("py:class", "anndata._core.views.ArrayView"),
164176
("py:class", "anndata._core.raw.Raw"),
165177
("py:class", "scanpy._utils.Empty"),
178+
("py:data", "typing.Union"),
166179
*[
167180
("py:class", f"anndata._core.aligned_mapping.{cls}{kind}")
168181
for cls in "Layers AxisArrays PairwiseArrays".split()

docs/release-notes/0.13.0.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* Add support for aggregate operations on CSC matrices, Fortran-ordered arrays, and Dask with sparse CSR and dense matrices {pr}`395` {smaller}`S Dicks`
66
* Adds dask support for `tl.score_genes` & `tl.score_genes_cell_cycle` {pr}`408` {smaller}`S Dicks`
77
* Adds dask support for `tl.rank_genes_groups_logreg` {pr}`413` {smaller}`S Dicks`
8-
* Updates {mod}`dcg` to work `Decoupler 2.0.0` {pr}`418` {smaller}`S Dicks`
8+
* Updates {mod}`rapids_singlecell.dcg` to work with `Decoupler 2.0.0` {pr}`418` {smaller}`S Dicks`
99

1010
```{rubric} Performance
1111
```

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ doc = [
4242
"nbsphinx>=0.8.12",
4343
"myst-nb",
4444
"sphinx-design",
45+
"sphinx-tabs",
46+
"sphinxext-opengraph",
4547
"scanpydoc[typehints,theme]>=0.9.4",
46-
"readthedocs-sphinx-ext",
47-
"sphinx_copybutton",
4848
"dask",
4949
"pytest",
5050
]

src/rapids_singlecell/decoupler_gpu/_method_waggr.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ def _func_waggr(
175175
verbose: bool = False,
176176
) -> tuple[np.ndarray, np.ndarray]:
177177
r"""
178-
Weighted Aggregate (WAGGR) :cite:`decoupler`.
178+
Weighted Aggregate (WAGGR).
179179
180180
This approach aggregates the molecular features :math:`x_i` from one observation :math:`i` with
181181
the feature weights :math:`w` of a given feature set :math:`j` into an enrichment score :math:`ES`.

src/rapids_singlecell/decoupler_gpu/_method_zscore.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def _func_zscore(
1818
verbose: bool = False,
1919
) -> tuple[cp.ndarray, cp.ndarray]:
2020
r"""
21-
Z-score (ZSCORE) :cite:`zscore`.
21+
Z-score (ZSCORE).
2222
2323
This approach computes the mean value of the molecular features for known targets,
2424
optionally subtracts the overall mean of all measured features,

src/rapids_singlecell/preprocessing/_neighbors/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -187,12 +187,12 @@ def neighbors(
187187
* 'n_lists': Number of inverted lists for IVF indexing. Default is 2 * next_power_of_2(sqrt(n_samples)).
188188
189189
* 'n_probes': Number of lists to probe during search. Default is 20. Higher values
190-
increase accuracy but reduce speed.
190+
increase accuracy but reduce speed.
191191
192192
For `nn_descent` algorithm, the following parameters can be specified:
193193
194194
* 'intermediate_graph_degree': The degree of the intermediate graph. Default is None.
195-
It is recommended to set it to `>= 1.5 * n_neighbors`.
195+
It is recommended to set it to `>= 1.5 * n_neighbors`.
196196
197197
For `all_neighbors` algorithm, the following parameters can be specified:
198198
@@ -213,7 +213,7 @@ def neighbors(
213213
* 'n_lists': Number of inverted lists for IVF indexing. Default is 2 * next_power_of_2(sqrt(n_samples)).
214214
215215
* 'n_probes': Number of lists to probe during search. Default is 20. Higher values
216-
increase accuracy but reduce speed.
216+
increase accuracy but reduce speed.
217217
218218
key_added
219219
If not specified, the neighbors data is stored in .uns['neighbors'],
@@ -400,7 +400,7 @@ def bbknn(
400400
* 'n_lists': Number of inverted lists for IVF indexing. Default is 2 * next_power_of_2(sqrt(n_samples)).
401401
402402
* 'n_probes': Number of lists to probe during search. Default is 20. Higher values
403-
increase accuracy but reduce speed.
403+
increase accuracy but reduce speed.
404404
405405
trim
406406
Trim the neighbours of each cell to these many top connectivities.

src/rapids_singlecell/squidpy_gpu/_co_oc.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ def co_occurrence(
5353
Otherwise, modifies the ``adata`` with the following keys:
5454
5555
- :attr:`anndata.AnnData.uns` ``['{cluster_key}_co_occurrence']['occ']`` - the co-occurrence probabilities
56-
across interval thresholds.
56+
across interval thresholds.
5757
- :attr:`anndata.AnnData.uns` ``['{cluster_key}_co_occurrence']['interval']`` - the distance thresholds
58-
computed at ``interval``.
58+
computed at ``interval``.
5959
"""
6060

6161
_assert_categorical_obs(adata, key=cluster_key)

src/rapids_singlecell/tools/_clustering.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -466,9 +466,9 @@ def kmeans(
466466
computed with default parameters or `n_pcs` if present.
467467
n_init
468468
Number of initializations to run the KMeans algorithm
469-
random_state: float (default: 42)
469+
random_state
470470
if you want results to be the same when you restart Python, select a
471-
state.
471+
state. Default is 42.
472472
key_added
473473
`adata.obs` key under which to add the cluster labels.
474474
copy

0 commit comments

Comments
 (0)