From e45840caf8ebbc485faec47af674818ce7810317 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 12 Nov 2026 16:46:05 +0000 Subject: [PATCH 1/3] build(deps): bump the pre-commit group with 5 updates Bumps the pre-commit group with 5 updates: | Package | From | To | | --- | --- | --- | | [https://github.com/biomejs/pre-commit](https://github.com/biomejs/pre-commit) | `v2.5.3` | `2.6.5` | | [https://github.com/tox-dev/pyproject-fmt](https://github.com/tox-dev/pyproject-fmt) | `v2.25.3` | `2.30.6` | | [https://github.com/astral-sh/ruff-pre-commit](https://github.com/astral-sh/ruff-pre-commit) | `v0.15.21` | `0.17.3` | | [https://github.com/zizmorcore/zizmor-pre-commit](https://github.com/zizmorcore/zizmor-pre-commit) | `v1.24.1` | `1.32.0` | | [https://github.com/pre-commit/mirrors-mypy](https://github.com/pre-commit/mirrors-mypy) | `v1.20.2` | `2.4.1` | Updates `https://github.com/biomejs/pre-commit` from v2.5.3 to 2.6.5 - [Release notes](https://github.com/biomejs/pre-commit/releases) - [Commits](https://github.com/biomejs/pre-commit/compare/v2.5.3...v2.6.5) Updates `https://github.com/tox-dev/pyproject-fmt` from v2.25.3 to 2.30.6 - [Release notes](https://github.com/tox-dev/pyproject-fmt/releases) - [Commits](https://github.com/tox-dev/pyproject-fmt/compare/v2.25.3...v2.30.6) Updates `https://github.com/astral-sh/ruff-pre-commit` from v0.15.21 to 0.17.3 - [Release notes](https://github.com/astral-sh/ruff-pre-commit/releases) - [Commits](https://github.com/astral-sh/ruff-pre-commit/compare/v0.15.21...v0.17.3) Updates `https://github.com/zizmorcore/zizmor-pre-commit` from v1.24.1 to 1.32.0 - [Release notes](https://github.com/zizmorcore/zizmor-pre-commit/releases) - [Commits](https://github.com/zizmorcore/zizmor-pre-commit/compare/v1.24.1...v1.32.0) Updates `https://github.com/pre-commit/mirrors-mypy` from v1.20.2 to 2.4.1 - [Commits](https://github.com/pre-commit/mirrors-mypy/compare/v1.20.2...v2.4.1) --- updated-dependencies: - dependency-name: https://github.com/biomejs/pre-commit dependency-version: 2.6.5 dependency-type: direct:production dependency-group: pre-commit - dependency-name: https://github.com/tox-dev/pyproject-fmt dependency-version: 2.30.6 dependency-type: direct:production dependency-group: pre-commit - dependency-name: https://github.com/astral-sh/ruff-pre-commit dependency-version: 0.17.3 dependency-type: direct:production dependency-group: pre-commit - dependency-name: https://github.com/zizmorcore/zizmor-pre-commit dependency-version: 1.32.0 dependency-type: direct:production dependency-group: pre-commit - dependency-name: https://github.com/pre-commit/mirrors-mypy dependency-version: 2.4.1 dependency-type: direct:production dependency-group: pre-commit ... Signed-off-by: dependabot[bot] --- .pre-commit-config.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 368303a4..353bb668 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -7,16 +7,16 @@ default_stages: minimum_pre_commit_version: 2.16.0 repos: - repo: https://github.com/biomejs/pre-commit - rev: v2.5.3 + rev: v2.6.5 hooks: - id: biome-format exclude: ^\.cruft\.json$ # inconsistent indentation with cruft - file never to be modified manually. - repo: https://github.com/tox-dev/pyproject-fmt - rev: v2.25.3 + rev: v2.30.6 hooks: - id: pyproject-fmt - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.15.21 + rev: v0.17.3 hooks: - id: ruff-check types_or: [python, pyi, jupyter] @@ -38,13 +38,13 @@ repos: args: [--assume-in-merge] - repo: https://github.com/zizmorcore/zizmor-pre-commit - rev: v1.24.1 + rev: v1.32.0 hooks: - id: zizmor args: [--no-progress, --fix] - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.20.2 + rev: v2.4.1 hooks: - id: mypy additional_dependencies: [numpy, types-requests] From 1b758822711370be1b5442f5ebb954ca3ba6679b Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Thu, 12 Nov 2026 16:46:44 +0000 Subject: [PATCH 2/3] [autofix.ci] apply automated fixes --- docs/contributing.md | 3 +-- docs/gallery.md | 2 +- plans/issue-749.md | 19 ++++++++++++------- pyproject.toml | 9 ++++++--- 4 files changed, 20 insertions(+), 13 deletions(-) diff --git a/docs/contributing.md b/docs/contributing.md index 10317dc9..9aabbe5c 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -11,7 +11,7 @@ the [scientific Python tutorials][], or the [scanpy developer guide][]. [scientific Python tutorials]: https://learn.scientific-python.org/development/tutorials/ [scanpy developer guide]: https://scanpy.scverse.org/page/dev/ -:::{tip} The *hatch* project manager +:::{tip} The _hatch_ project manager We highly recommend to familiarize yourself with [`hatch`][hatch]. Hatch is a Python project manager that @@ -101,7 +101,6 @@ hatch env find hatch-test.py3.14-stable and manually point it to the python binary. - :::: ::::{tab-item} uv diff --git a/docs/gallery.md b/docs/gallery.md index 6372ff0a..8b93e2a8 100644 --- a/docs/gallery.md +++ b/docs/gallery.md @@ -10,7 +10,7 @@ against the latest `spatialdata-plot` release. ## Tutorials -Learn the API on synthetic data. Start with *Getting started*. +Learn the API on synthetic data. Start with _Getting started_. :::{include} notebooks/tutorials/index.md :start-after: diff --git a/plans/issue-749.md b/plans/issue-749.md index 5fcf5c15..7a02c17b 100644 --- a/plans/issue-749.md +++ b/plans/issue-749.md @@ -12,9 +12,9 @@ passes a single `ax`, `_plan_panels` raises: ValueError: Mismatch between number of matplotlib axes objects (1) and number of panels (2). ``` -PR #580 added a `strict_cs` narrowing (keep only CS with element types for *all* +PR #580 added a `strict_cs` narrowing (keep only CS with element types for _all_ render commands), but it does **not** help here: both coordinate systems contain -the *same* element, so both survive the filter. The two panels are redundant — +the _same_ element, so both survive the filter. The two panels are redundant — they render the identical element set, differing only by a scale transform. Confirmed reproducible on current `main` (see `/tmp/repro_issue_749.py`). @@ -31,18 +31,19 @@ dropped (redundant) coordinate systems and pointing to `coordinate_systems=`. If the sets are genuinely distinct (count still `> n_ax`), fall through to the existing, correct `ValueError`. -| File | Change | Rationale | -|------|--------|-----------| -| `src/spatialdata_plot/pl/basic.py` (`_resolve_coordinate_systems`) | After `strict_cs`, dedup redundant CS by element set when `ax` given + auto-detected; warn | Fixes the mismatch only on the path that currently errors → strictly backward compatible | -| `tests/pl/test_show.py` | Regression test: multi-CS element + single `ax` no longer raises; distinct-CS case still raises | Lock behavior | +| File | Change | Rationale | +| ------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | +| `src/spatialdata_plot/pl/basic.py` (`_resolve_coordinate_systems`) | After `strict_cs`, dedup redundant CS by element set when `ax` given + auto-detected; warn | Fixes the mismatch only on the path that currently errors → strictly backward compatible | +| `tests/pl/test_show.py` | Regression test: multi-CS element + single `ax` no longer raises; distinct-CS case still raises | Lock behavior | Why scope to the `ax`-provided path only: the no-`ax` case currently produces one panel per coordinate system (redundant but not an error). Collapsing that too would change existing multi-panel output / baselines — a backward-compat -break the reporter explicitly asked to avoid. The `ax` path currently *errors*, +break the reporter explicitly asked to avoid. The `ax` path currently _errors_, so fixing it breaks nothing that worked before. ## Edge cases + - [ ] 2 CS, same element set, single `ax` → collapse to 1, warn, render (main fix). - [ ] 2 CS, **different** element sets, single `ax` → still raise ValueError (correct; genuinely 2 panels). - [ ] N CS redundant, `ax` is a list of N → counts already match, no change. @@ -52,16 +53,19 @@ so fixing it breaks nothing that worked before. - [ ] Multi-panel `color=[...]` → single CS required already; unaffected. ## Downstream impact + - Public API unchanged (no new/changed kwargs). - Only converts a previously-raised `ValueError` into a successful render + warning. - No baseline image changes expected (new path only exercised by the regression test, which is non-visual). ## Test plan + - [ ] Regression test (non-visual): multi-CS element, `filter_by_coordinate_system`, `render_shapes().show(ax=ax)` → no raise; assert 1 axis used. - [ ] Negative test: 2 CS with different elements + single `ax` → still raises `ValueError`. - [ ] Assert a `UserWarning` is emitted mentioning the dropped CS. ## Risks + - Representative choice is "first in coordinate-system order", which may be the `_downscaled_lowres` variant. Visually identical for a standalone plot (axes autoscale), but a user overlaying multiple `show()` calls on one `ax` should @@ -69,6 +73,7 @@ so fixing it breaks nothing that worked before. - Low risk overall: new code runs only where the code previously raised. ## Alternative (Approach 2 — not recommended) + Deduplicate redundant coordinate systems in auto-detect for **both** `ax` and no-`ax` paths. More internally consistent, but changes existing no-`ax` multi-panel output and possibly visual baselines → backward-incompatible. diff --git a/pyproject.toml b/pyproject.toml index f522b60c..de35ab65 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,6 +19,7 @@ classifiers = [ "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.14", + "Programming Language :: Python :: 3.15", ] dynamic = [ "version", # allow version to be set by git tags @@ -103,7 +104,9 @@ dependencies.python = ">=3.12" pypi-dependencies.spatialdata-plot = { path = ".", editable = true } tasks.format = "ruff format ." tasks.kernel-install = 'python -m ipykernel install --user --name pixi-dev --display-name "sdata-plot (dev)"' -tasks.kernel-install-interactive = "python -m ipykernel install --user --name sdata-plot-interactive --display-name \"sdata-plot (interactive)\"" +tasks.kernel-install-interactive = """\ + python -m ipykernel install --user --name sdata-plot-interactive --display-name \"sdata-plot (interactive)\"\ + """ tasks.lab = "jupyter lab" tasks.lint = "ruff check ." tasks.pre-commit-install = "pre-commit install" @@ -194,12 +197,12 @@ ini_options.filterwarnings = [ ] [tool.coverage] -run.branch = true +run.source = [ "spatialdata_plot" ] run.omit = [ "**/test_*.py", ] +run.branch = true run.parallel = true -run.source = [ "spatialdata_plot" ] paths.source = [ "src/spatialdata_plot", "*/site-packages/spatialdata_plot", From 2724589c1edc881a776c96c97d7f3948ae4775ff Mon Sep 17 00:00:00 2001 From: Phil Schaf Date: Thu, 12 Nov 2026 22:22:33 +0100 Subject: [PATCH 3/3] Disable biome Markdown formatting (handled by panache) Also revert the Markdown reformatting biome did in the auto-fix commit. --- biome.jsonc | 1 + docs/contributing.md | 3 ++- docs/gallery.md | 2 +- plans/issue-749.md | 19 +++++++------------ 4 files changed, 11 insertions(+), 14 deletions(-) diff --git a/biome.jsonc b/biome.jsonc index 9f8f2208..0464f278 100644 --- a/biome.jsonc +++ b/biome.jsonc @@ -2,6 +2,7 @@ "$schema": "https://biomejs.dev/schemas/2.2.0/schema.json", "vcs": { "enabled": true, "clientKind": "git", "useIgnoreFile": true }, "formatter": { "useEditorconfig": true }, + "markdown": { "formatter": { "enabled": false } }, // handled by panache "overrides": [ { "includes": ["./.vscode/*.json", "**/*.jsonc"], diff --git a/docs/contributing.md b/docs/contributing.md index 9aabbe5c..10317dc9 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -11,7 +11,7 @@ the [scientific Python tutorials][], or the [scanpy developer guide][]. [scientific Python tutorials]: https://learn.scientific-python.org/development/tutorials/ [scanpy developer guide]: https://scanpy.scverse.org/page/dev/ -:::{tip} The _hatch_ project manager +:::{tip} The *hatch* project manager We highly recommend to familiarize yourself with [`hatch`][hatch]. Hatch is a Python project manager that @@ -101,6 +101,7 @@ hatch env find hatch-test.py3.14-stable and manually point it to the python binary. + :::: ::::{tab-item} uv diff --git a/docs/gallery.md b/docs/gallery.md index 8b93e2a8..6372ff0a 100644 --- a/docs/gallery.md +++ b/docs/gallery.md @@ -10,7 +10,7 @@ against the latest `spatialdata-plot` release. ## Tutorials -Learn the API on synthetic data. Start with _Getting started_. +Learn the API on synthetic data. Start with *Getting started*. :::{include} notebooks/tutorials/index.md :start-after: diff --git a/plans/issue-749.md b/plans/issue-749.md index 7a02c17b..5fcf5c15 100644 --- a/plans/issue-749.md +++ b/plans/issue-749.md @@ -12,9 +12,9 @@ passes a single `ax`, `_plan_panels` raises: ValueError: Mismatch between number of matplotlib axes objects (1) and number of panels (2). ``` -PR #580 added a `strict_cs` narrowing (keep only CS with element types for _all_ +PR #580 added a `strict_cs` narrowing (keep only CS with element types for *all* render commands), but it does **not** help here: both coordinate systems contain -the _same_ element, so both survive the filter. The two panels are redundant — +the *same* element, so both survive the filter. The two panels are redundant — they render the identical element set, differing only by a scale transform. Confirmed reproducible on current `main` (see `/tmp/repro_issue_749.py`). @@ -31,19 +31,18 @@ dropped (redundant) coordinate systems and pointing to `coordinate_systems=`. If the sets are genuinely distinct (count still `> n_ax`), fall through to the existing, correct `ValueError`. -| File | Change | Rationale | -| ------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | -| `src/spatialdata_plot/pl/basic.py` (`_resolve_coordinate_systems`) | After `strict_cs`, dedup redundant CS by element set when `ax` given + auto-detected; warn | Fixes the mismatch only on the path that currently errors → strictly backward compatible | -| `tests/pl/test_show.py` | Regression test: multi-CS element + single `ax` no longer raises; distinct-CS case still raises | Lock behavior | +| File | Change | Rationale | +|------|--------|-----------| +| `src/spatialdata_plot/pl/basic.py` (`_resolve_coordinate_systems`) | After `strict_cs`, dedup redundant CS by element set when `ax` given + auto-detected; warn | Fixes the mismatch only on the path that currently errors → strictly backward compatible | +| `tests/pl/test_show.py` | Regression test: multi-CS element + single `ax` no longer raises; distinct-CS case still raises | Lock behavior | Why scope to the `ax`-provided path only: the no-`ax` case currently produces one panel per coordinate system (redundant but not an error). Collapsing that too would change existing multi-panel output / baselines — a backward-compat -break the reporter explicitly asked to avoid. The `ax` path currently _errors_, +break the reporter explicitly asked to avoid. The `ax` path currently *errors*, so fixing it breaks nothing that worked before. ## Edge cases - - [ ] 2 CS, same element set, single `ax` → collapse to 1, warn, render (main fix). - [ ] 2 CS, **different** element sets, single `ax` → still raise ValueError (correct; genuinely 2 panels). - [ ] N CS redundant, `ax` is a list of N → counts already match, no change. @@ -53,19 +52,16 @@ so fixing it breaks nothing that worked before. - [ ] Multi-panel `color=[...]` → single CS required already; unaffected. ## Downstream impact - - Public API unchanged (no new/changed kwargs). - Only converts a previously-raised `ValueError` into a successful render + warning. - No baseline image changes expected (new path only exercised by the regression test, which is non-visual). ## Test plan - - [ ] Regression test (non-visual): multi-CS element, `filter_by_coordinate_system`, `render_shapes().show(ax=ax)` → no raise; assert 1 axis used. - [ ] Negative test: 2 CS with different elements + single `ax` → still raises `ValueError`. - [ ] Assert a `UserWarning` is emitted mentioning the dropped CS. ## Risks - - Representative choice is "first in coordinate-system order", which may be the `_downscaled_lowres` variant. Visually identical for a standalone plot (axes autoscale), but a user overlaying multiple `show()` calls on one `ax` should @@ -73,7 +69,6 @@ so fixing it breaks nothing that worked before. - Low risk overall: new code runs only where the code previously raised. ## Alternative (Approach 2 — not recommended) - Deduplicate redundant coordinate systems in auto-detect for **both** `ax` and no-`ax` paths. More internally consistent, but changes existing no-`ax` multi-panel output and possibly visual baselines → backward-incompatible.