Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 6 additions & 9 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,16 @@ Thanks for opening a PR to scanpy!
Please be sure to follow the guidelines in our contribution guide (https://scanpy.scverse.org/page/dev/) to familiarize yourself with our workflow and speed up review.
-->

**LLM usage**

<!-- See the scverse AI policy: https://scverse.org/about/ai_policy/ -->
<!-- Pull requests that skip this section are closed without review; undisclosed LLM use can lead to a ban. -->

- [ ] LLM or coding agent used: <!-- "none", or the model and version, e.g. "Claude Opus 5.5 via Claude Code" -->
- [ ] If one was used, I, a human, have reviewed, understood and tested every changed line

<!-- Please check (“- [x]”) and fill in the following boxes -->

- [ ] Closes #
- [ ] [Tests][] included or not required because:
<!-- Only check the following box if you did not include release notes -->
<!-- Only check the following box if you did not include release notes -->
- [ ] [Release notes][] not necessary because:
<!-- See the scverse AI policy: https://scverse.org/about/ai_policy/
Pull requests that skip this section are closed without review; undisclosed LLM use can lead to a ban. -->
- [ ] LLM or coding agent used: <!-- "none", or the model and version, e.g. "Claude Opus 5.5 via Claude Code" -->
- [ ] If one was used, I, a human, have reviewed, understood and tested every changed line

[tests]: https://scanpy.readthedocs.io/page/dev/testing.html#writing-tests
[release notes]: https://scanpy.readthedocs.io/page/dev/documentation.html#adding-to-the-docs
12 changes: 12 additions & 0 deletions .panache.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#:schema https://panache.bz/panache.schema.json
flavor = "myst"

[format]
wrap = "preserve"

# MyST syntax extensions from `scverse_doc.config.MYST_ENABLE_EXTENSIONS`
[extensions]
myst-colon-fence = true # colon_fence
definition-lists = true # deflist
tex-math-dollars = true # dollarmath, amsmath
raw-html = true # html_image, html_admonition
5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ repos:
- id: biome-format
groups: [format]
exclude: ^\.cruft\.json$ # inconsistent indentation with cruft - file never to be modified manually.
- repo: https://github.com/jolars/panache-pre-commit
rev: v3.17.2
hooks:
- id: panache-format
groups: [format]
- repo: https://github.com/tox-dev/pyproject-fmt
rev: v2.30.3
hooks:
Expand Down
9 changes: 3 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ If you like scverse® and want to support our mission, please consider making a
<img
src="https://raw.githubusercontent.com/numfocus/templates/master/images/numfocus-logo.png"
width="200"
>
>
</a>
</div>

Expand All @@ -50,8 +50,6 @@ That is, if something is missing from our public API as documented, for example
[leading underscore]: https://peps.python.org/pep-0008/#public-and-internal-interfaces
[open an issue]: https://github.com/scverse/scanpy/issues/new/choose



## Citation

If you use `scanpy` in your work, please cite the `scanpy` publication as follows:
Expand All @@ -60,15 +58,14 @@ If you use `scanpy` in your work, please cite the `scanpy` publication as follow
>
> F. Alexander Wolf, Philipp Angerer, Fabian J. Theis
>
> _Genome Biology_ 2018 Feb 06. doi: [10.1186/s13059-017-1382-0](https://doi.org/10.1186/s13059-017-1382-0).
> *Genome Biology* 2018 Feb 06. doi: [10.1186/s13059-017-1382-0](https://doi.org/10.1186/s13059-017-1382-0).

You can cite the scverse publication as follows:

> **The scverse project provides a computational ecosystem for single-cell omics data analysis**
>
> Isaac Virshup, Danila Bredikhin, Lukas Heumos, Giovanni Palla, Gregor Sturm, Adam Gayoso, Ilia Kats, Mikaela Koutrouli, Scverse Community, Bonnie Berger, Dana Pe’er, Aviv Regev, Sarah A. Teichmann, Francesca Finotello, F. Alexander Wolf, Nir Yosef, Oliver Stegle & Fabian J. Theis
>
> _Nat Biotechnol._ 2023 Apr 10. doi: [10.1038/s41587-023-01733-8](https://doi.org/10.1038/s41587-023-01733-8).

> *Nat Biotechnol.* 2023 Apr 10. doi: [10.1038/s41587-023-01733-8](https://doi.org/10.1038/s41587-023-01733-8).

[contribution guide]: CONTRIBUTING.md
2 changes: 1 addition & 1 deletion biome.jsonc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://biomejs.dev/schemas/2.6.3/schema.json",
"formatter": { "useEditorconfig": true },
"markdown": { "parser": { "frontmatter": true } },
"markdown": { "formatter": { "enabled": false } }, // handled by panache
"overrides": [
{
"includes": ["./.vscode/*.json", "**/*.jsonc", "**/asv.conf.json"],
Expand Down
1 change: 0 additions & 1 deletion docs/api/classes.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,4 @@ Represent data as a neighborhood structure, usually a knn graph.
:toctree: generated/

Neighbors

```
1 change: 0 additions & 1 deletion docs/api/datasets.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,4 @@
datasets.pbmc68k_reduced
datasets.paul15
datasets.visium_sge

```
1 change: 0 additions & 1 deletion docs/api/get.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,4 @@ useful formats.
get.pca
get.rank_genes_groups_df
get.aggregate

```
1 change: 0 additions & 1 deletion docs/api/metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,4 @@ Collections of useful measurements for evaluating results.
metrics.confusion_matrix
metrics.gearys_c
metrics.morans_i

```
5 changes: 0 additions & 5 deletions docs/api/plotting.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ Functions with both backends:
pl.stacked_violin
pl.matrixplot
pl.ranking

```

Helper for computing dot areas, e.g. for {func}`~scanpy.pl.dotplot`:
Expand All @@ -48,7 +47,6 @@ Helper for computing dot areas, e.g. for {func}`~scanpy.pl.dotplot`:
:toctree: generated/

pl.dot_area

```

Legacy (matplotlib) only:
Expand All @@ -60,7 +58,6 @@ Legacy (matplotlib) only:

pl.clustermap
pl.dendrogram

```

## Classes
Expand All @@ -75,7 +72,6 @@ These classes allow fine tuning of visual parameters.
pl.DotPlot
pl.MatrixPlot
pl.StackedViolin

```

## Preprocessing
Expand All @@ -91,7 +87,6 @@ Methods for visualizing quality control and results of preprocessing functions.
pl.highest_expr_genes
pl.highly_variable_genes
pl.scrublet_score_distribution

```

## Tools
Expand Down
3 changes: 1 addition & 2 deletions docs/api/preprocessing.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

Filtering of highly-variable genes, batch-effect correction, per-cell normalization, preprocessing recipes.

Any transformation of the data matrix that is not a _tool_. Other than _tools_, preprocessing steps usually don't return an easily interpretable annotation, but perform a basic transformation on the data matrix.
Any transformation of the data matrix that is not a *tool*. Other than *tools*, preprocessing steps usually don't return an easily interpretable annotation, but perform a basic transformation on the data matrix.

## Basic Preprocessing

Expand Down Expand Up @@ -96,7 +96,6 @@ Also see {ref}`data integration tools <data-integration>` and external {ref}`ext

pp.bbknn
pp.neighbors

```

## Output types
Expand Down
1 change: 0 additions & 1 deletion docs/api/queries.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,4 @@ This module provides useful queries for annotation and enrichment.
queries.biomart_annotations
queries.mitochondrial_genes
queries.enrich

```
1 change: 0 additions & 1 deletion docs/api/settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ you'd usually want to set {attr}`settings.autoshow` to `False`.

IO related settings for saving figures, caching files and storing datasets.


```{eval-rst}
.. autosummary::

Expand Down
2 changes: 1 addition & 1 deletion docs/api/tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
.. currentmodule:: scanpy
```

Any transformation of the data matrix that is not _preprocessing_. In contrast to a _preprocessing_ function, a _tool_ usually adds an easily interpretable annotation to the data matrix, which can then be visualized with a corresponding plotting function.
Any transformation of the data matrix that is not *preprocessing*. In contrast to a *preprocessing* function, a *tool* usually adds an easily interpretable annotation to the data matrix, which can then be visualized with a corresponding plotting function.

## Embeddings

Expand Down
6 changes: 3 additions & 3 deletions docs/dev/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Next, if problems persist, clear the sphinx cache (`hatch run docs:clean`) and t
## Adding to the docs

For any user-visible changes, please make sure a note has been added to the release notes using `hatch run towncrier:create` (see towncrier’s {doc}`towncrier:tutorial`).
When asked for “Issue number (`+` if none)”, enter the _PR number_ instead.
When asked for “Issue number (`+` if none)”, enter the *PR number* instead.

Once you've added a new function to the documentation, you'll need to make sure there is a link somewhere in the documentation site pointing to it.
This should be added to `docs/api.md` under a relevant heading.
Expand Down Expand Up @@ -74,8 +74,8 @@ If your parameter only accepts an enumeration of strings, specify them like so:
There are three types of return sections – prose, tuple, and a mix of both.

1. Prose is for simple cases.
2. Tuple return sections are formatted like parameters. Other than in numpydoc, each tuple is first characterized by the identifier and _not_ by its type. Provide type annotation in the function header.
3. Mix of prose and tuple is relevant in complicated cases, e.g. when you want to describe that you _added something as annotation to an \`AnnData\` object_.
2. Tuple return sections are formatted like parameters. Other than in numpydoc, each tuple is first characterized by the identifier and *not* by its type. Provide type annotation in the function header.
3. Mix of prose and tuple is relevant in complicated cases, e.g. when you want to describe that you *added something as annotation to an `AnnData` object*.

#### Examples

Expand Down
4 changes: 2 additions & 2 deletions docs/dev/getting-set-up.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ This section of the docs covers our practices for working with `git` on our code
For a more complete git tutorials we recommend checking out:

[Atlassian's git tutorial](https://www.atlassian.com/git/tutorials)
: Beginner friendly introductions to the git command line interface
: Beginner friendly introductions to the git command line interface

[Setting up git for GitHub](https://docs.github.com/en/free-pro-team@latest/github/getting-started-with-github/set-up-git)
: Configuring git to work with your GitHub user account
: Configuring git to work with your GitHub user account

(forking-and-cloning)=

Expand Down
13 changes: 7 additions & 6 deletions docs/dev/release.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Making a release

First, check out {doc}`versioning` to see which kind of release you want to make.
That page also explains concepts like _pre-releases_ and applications thereof.
That page also explains concepts like *pre-releases* and applications thereof.

## Preparing the release

1. Switch to the `main` branch for a major/minor release and the respective release series branch for a _patch_ release (e.g. `1.8.x` when releasing version 1.8.4).
1. Switch to the `main` branch for a major/minor release and the respective release series branch for a *patch* release (e.g. `1.8.x` when releasing version 1.8.4).
2. Run `hatch run towncrier:build` to generate a PR that creates a new release notes file. Wait for the PR to be auto-merged.
3. If it is a _patch_ release, merge the backport PR (see {ref}`versioning-tooling`) into the `main` branch.
3. If it is a *patch* release, merge the backport PR (see {ref}`versioning-tooling`) into the `main` branch.

## Actually making the release

Expand All @@ -17,20 +17,20 @@ That page also explains concepts like _pre-releases_ and applications thereof.
4. Select the dropdown entry {guilabel}`+ Create new tag: 1.<minor>.<patch> on publish`.
5. In the second dropdown {guilabel}`Target:`, select the base branch i.e. `main` for a minor/major release,
and e.g. `1.9.x` for our example patch release `1.9.6`.
6. If the version is a _pre-release_ version, such as `1.7.0rc1` or `1.10.0a1`, tick the {guilabel}`Set as a pre-release` checkbox.
6. If the version is a *pre-release* version, such as `1.7.0rc1` or `1.10.0a1`, tick the {guilabel}`Set as a pre-release` checkbox.

[releases]: https://github.com/scverse/scanpy/releases

## After making a release

After _any_ release has been made:
After *any* release has been made:

- Create a milestone for the next release (in case you made a bugfix release) or releases (in case of a major/minor release).
For bugfix releases, this should have `on-merge: backport to 0.<minor>.x`,
so the [meeseeksdev][] bot will create a backport PR. See {doc}`versioning` for more info.
- Clear out and close the milestone you just made a release for.

After a _major_ or _minor_ release has been made:
After a *major* or *minor* release has been made:

- Tweet about it! Announce it on Zulip! Announce it on Discourse! Think about making a bot for this! Maybe actually do that?
- Create a new release notes file for the next minor release. This should only be added to the dev branch.
Expand All @@ -57,6 +57,7 @@ $ bsdtar -tf dist/*.whl
```

You can also upload the package to <test.pypi.org> ([tutorial][testpypi tutorial])

```console
$ twine upload --repository testpypi dist/*
```
Expand Down
4 changes: 2 additions & 2 deletions docs/dev/versioning.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ At a `point` release, there should be no changes beyond bug fixes.
Valid version numbers are described in [PEP 440](https://peps.python.org/pep-0440/).

[Pre-releases](https://peps.python.org/pep-0440/#pre-releases)
: should have versions like `1.7.0rc1` or `1.7.0rc2`.
: should have versions like `1.7.0rc1` or `1.7.0rc2`.

[Development versions](https://peps.python.org/pep-0440/#developmental-releases)
: should look like `1.8.0.dev0`, with a commit hash optionally appended as a local version identifier (e.g. `1.8.0.dev2+g00ad77b`).
: should look like `1.8.0.dev0`, with a commit hash optionally appended as a local version identifier (e.g. `1.8.0.dev2+g00ad77b`).

(versioning-tooling)=
## Tooling
Expand Down
1 change: 0 additions & 1 deletion docs/external/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ Import Scanpy's wrappers to external tools as:
import scanpy.external as sce
```


```{toctree}
:maxdepth: 2

Expand Down
1 change: 1 addition & 0 deletions docs/external/preprocessing.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
```

Previously found here, but now part of scanpy’s main API:

- {func}`scanpy.pp.harmony_integrate`
- {func}`scanpy.pp.hashsolo`
- {func}`scanpy.pp.scrublet`
Expand Down
1 change: 0 additions & 1 deletion docs/external/tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,4 @@

tl.sandbag
tl.cyclone

```
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
:link: installation
:link-type: doc

New to _scanpy_? Check out the installation guide.
New to *scanpy*? Check out the installation guide.
:::

:::{grid-item-card} Tutorials {octicon}`play;1em;`
Expand Down
4 changes: 0 additions & 4 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
To use `scanpy` from another project, install it using your favourite environment manager:

::::{tab-set}

:::{tab-item} Hatch (recommended)
:sync: hatch

Expand Down Expand Up @@ -39,7 +38,6 @@ $ pip install scanpy
[miniconda]: https://docs.anaconda.com/miniconda/miniconda-install/
[from pypi]: https://pypi.org/project/scanpy
:::

::::

If you use Hatch or pip, the extra `[leiden]` installs two packages that are needed for popular
Expand All @@ -60,7 +58,6 @@ $ cd scanpy
```

::::{tab-set}

:::{tab-item} Hatch (recommended)
:sync: hatch

Expand Down Expand Up @@ -103,7 +100,6 @@ $ pip install --group=dev --group=test --group=doc -e .

For instructions on how to work with the code, see the {ref}`contribution guide <contribution-guide>`.
:::

::::

[on github]: https://github.com/scverse/scanpy
Expand Down
1 change: 0 additions & 1 deletion docs/release-notes/1.10.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ Some highlights:
- Fix use of {func}`~scanpy.tl.dendrogram` on highly correlated low precision data {pr}`2928` {smaller}`P Angerer`
- Fix pytest deprecation warning {pr}`2879` {smaller}`P Angerer`


#### Development Process

- Scanpy is now tested against python 3.12 {pr}`2863` {smaller}`ivirshup`
Expand Down
1 change: 0 additions & 1 deletion docs/release-notes/1.10.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

- Fix `aggregate` when aggregating by more than two groups {pr}`2965` {smaller}`I Virshup`


#### Performance

- {func}`~scanpy.pp.scale` now uses numba kernels for `sparse.csr_matrix` and `sparse.csc_matrix` when `zero_center==False` and `mask_obs` is provided. This greatly speed up execution {pr}`2942` {smaller}`S Dicks`
2 changes: 2 additions & 0 deletions docs/release-notes/1.11.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ Release candidates:
#### Documentation

- {guilabel}`rc1` Improve {func}`~scanpy.pp.harmony_integrate` docs {smaller}`D Kühl` ({pr}`3362`)

- {guilabel}`rc1` Raise {exc}`FutureWarning` when calling deprecated {mod}`scanpy.pp` functions {smaller}`P Angerer` ({pr}`3380`)

- {guilabel}`rc1` {smaller}`P Angerer` ({pr}`3407`)

| Deprecate … | in favor of … |
Expand Down
Loading
Loading