Skip to content

Commit 5f2f55b

Browse files
committed
docs(gallery): derive the gallery from the notebook sources (#746)
The Gallery page duplicated the per-notebook grid cards that also live in the notebooks submodule's section index pages (tutorials/index, examples/index). The two lists were maintained independently in separate repos and drifted: adding a notebook required editing both, and when one was missed the Gallery silently omitted it (e.g. 'Interactive region annotation' on stable). Make the section index pages the single source: gallery.md keeps the intro and a visible toctree to those pages, so every notebook is listed automatically and the Gallery can never fall out of sync. Remove the now-orphaned card images under _static/gallery/ (the section cards use _static/img/). Fixes #746.
1 parent 227434d commit 5f2f55b

6 files changed

Lines changed: 5 additions & 64 deletions

File tree

-50.2 KB
Binary file not shown.
-84 KB
Binary file not shown.
-228 KB
Binary file not shown.
-31 KB
Binary file not shown.
-548 KB
Binary file not shown.

docs/gallery.md

Lines changed: 5 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -8,73 +8,14 @@ Sources live in
88
every notebook is executable end-to-end and re-executed on a weekly schedule
99
against the latest `spatialdata-plot` release.
1010

11-
## Tutorials
11+
- **Tutorials** — learn the API on synthetic data. Start with *Getting started*.
12+
- **Examples** — worked analyses on datasets you'd actually encounter.
1213

13-
Entry-point material for learning the API on synthetic data.
14-
15-
::::{grid} 1 2 2 2
16-
:gutter: 3
17-
18-
:::{grid-item-card} Getting started
19-
:link: notebooks/tutorials/getting_started
20-
:link-type: doc
21-
:img-top: _static/gallery/getting_started.png
22-
23-
The fluent `.pl` API, layering, and styling on the in-memory `blobs`
24-
dataset. Ideal first read.
25-
:::
26-
27-
:::{grid-item-card} Colour and palettes
28-
:link: notebooks/tutorials/color_and_palette
29-
:link-type: doc
30-
:img-top: _static/gallery/color_and_palette.png
31-
32-
How `color=` resolves, the v0.3.0 `groups` behaviour, and building
33-
perceptually well-spaced or colourblind-safe palettes with
34-
`make_palette` and `make_palette_from_data`.
35-
:::
36-
37-
:::{grid-item-card} Speeding up rendering
38-
:link: notebooks/tutorials/performance
39-
:link-type: doc
40-
:img-top: _static/gallery/performance.png
41-
42-
Keep rendering fast on large data: automatic rasterization and scale
43-
selection for images, and the `datashader` backend for large collections
44-
of shapes and points.
45-
:::
46-
47-
::::
48-
49-
## Examples
50-
51-
Worked examples on real datasets you'd actually analyse.
52-
53-
::::{grid} 1 2 2 2
54-
:gutter: 3
55-
56-
:::{grid-item-card} Visium mouse brain
57-
:link: notebooks/examples/visium_mouse_brain
58-
:link-type: doc
59-
:img-top: _static/gallery/visium_mouse_brain.png
60-
61-
Render H&E tissue, overlay spots, color by gene expression and by cluster,
62-
and finish with a publication-style figure.
63-
:::
64-
65-
:::{grid-item-card} Interactive region annotation
66-
:link: notebooks/examples/interactive_annotate
67-
:link-type: doc
68-
:img-top: _static/gallery/interactive_annotate.png
69-
70-
Draw regions of interest directly on a `spatialdata-plot` canvas with
71-
`sdata.pl.annotate(...)` and persist them as a `ShapesModel` element.
72-
:::
73-
74-
::::
14+
Each section below links every notebook it contains. The card lists live with
15+
the notebook sources (the section index pages), so a newly added notebook shows
16+
up here automatically and the gallery can never fall out of sync.
7517

7618
```{toctree}
77-
:hidden:
7819
:maxdepth: 2
7920
8021
notebooks/tutorials/index

0 commit comments

Comments
 (0)