Skip to content

docs: rework landing page, installation and quickstart; trim the changelog page - #1323

Merged
jan-glx merged 12 commits into
mainfrom
doc_changes
Nov 23, 2026
Merged

jan-glx merged 12 commits into
mainfrom
doc_changes

Conversation

@jan-glx

@jan-glx jan-glx commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator

A collection of smaller docs changes.

  • Landing page: describe the library in two sentences instead of a list; drop the card grid (it duplicates the sidebar) and the "under active development" note.
  • Installation: the intro is reworked, and the Python requirement now comes from Requires-Python instead of being hard-coded.
  • Quickstart: reworked. The crop is named sdata_ROI and reused for aggregate and write.
  • Logo: the PNG logo is re-rendered from the SVG.
  • Changelog: the page (and its changelog TOC entry) stays, but now only points to GitHub Releases, where release notes are curated (see contributing.md). The "Unreleased" entries are dropped from it; they should go into the next release notes instead:

Changed

  • SpatialData.read() now only accepts a path or URL (str, Path or UPath) for file_path; passing an already-open zarr.Group raises a TypeError. Use spatialdata.read_zarr() to read from a zarr.Group.
  • SpatialData.attrs is now typed as dict[str, JSONValue] instead of dict[Any, Any], and SpatialData.get_attrs() as returning JSONValue | pd.DataFrame (typing only).
  • SpatialData.locate_element() now accepts a table (AnnData) (typing only).

Fixed

  • aggregate(values=<image>, by=<multiscale labels>) no longer crashes with AttributeError: 'DataTree' object has no attribute 'dtype' (fix: aggregate images by multiscale labels #1261).
  • Querying a SpatialData object with multiple (batched) bounding boxes now raises an explicit NotImplementedError instead of an opaque AssertionError.

@jan-glx
jan-glx marked this pull request as ready for review November 19, 2026 16:38

@Zethson Zethson left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! A few minor requests.

Comment thread docs/conf.py Resolved
Comment thread docs/index.md Resolved
Comment thread docs/index.md Resolved
Comment thread docs/index.md Resolved
- landing page: say what the Python library does first; move the
  specifications link to the top of the ecosystem list; drop the card
  grid (duplicates the sidebar); move the development note above the
  sponsor block; tighten the dask note (fix #1064 link, drop stale
  'upstream fix' sentence)
- installation: reword the first paragraph
- quickstart: build a SpatialData object from an image, a segmentation
  mask and an expression table instead of loading blobs
The old PNG (917x214) looked pixelated. It is now rendered from
spatialdata_horizontal.svg with Inkscape at 2x (1834x428), so it stays sharp
for the external links that still use it.
@jan-glx jan-glx changed the title docs: rework landing page, installation and quickstart; drop the unused changelog page docs: rework landing page, installation and quickstart; trim the changelog page Nov 23, 2026
@jan-glx

jan-glx commented Nov 23, 2026

Copy link
Copy Markdown
Collaborator Author

Thanks for the review, implemented all suggestions.

@jan-glx
jan-glx enabled auto-merge (squash) November 23, 2026 11:20
@codecov

codecov Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.58%. Comparing base (7aada08) to head (1206b14).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1323   +/-   ##
=======================================
  Coverage   91.58%   91.58%           
=======================================
  Files          53       53           
  Lines        8400     8400           
=======================================
  Hits         7693     7693           
  Misses        707      707           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Zethson Zethson left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry I missed one point. Then it's good to go!

Comment thread docs/index.md
This library is currently under active development. We may make changes to the API between versions as the community provides feedback. To ensure reproducibility, please make note of the version you are developing against.
```

<!-- panache-ignore-format-start -->

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I missed this. Can we keep the cards?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, auto-merge was faster than your comment. Restored them in #1331.

@jan-glx
jan-glx merged commit 7e388fb into main Nov 23, 2026
22 checks passed
@jan-glx
jan-glx deleted the doc_changes branch November 23, 2026 12:46
jan-glx added a commit that referenced this pull request Nov 23, 2026
Follow-up to #1323: restores the card grid on the landing page, as
requested in
#1323 (comment).
The block is unchanged from before #1323 and back in the same place,
below the NumFOCUS block.
jan-glx referenced this pull request Nov 23, 2026
2 implementations exist. This implementation uses 1 canvas and only
removes the label-count limit. The [other
implementation](#1166) adds
opt-in output tiles after this commit to limit output memory. Compare
the limitations.

### Summary

In [issue 987](#987),
`rasterize(..., return_regions_as_labels=True)` rejects more than
`65,535` labels. Select the output dtype from the maximum label. Closes
#987.

### Design

Use the existing `_get_uint_dtype()` helper, as proposed in the
[maintainer
direction](#187 (comment)).
Small outputs remain `uint16`. Larger outputs use `uint32` or `uint64`
only when required.

The implementation changes
[`src/spatialdata/_core/operations/rasterize.py`](https://github.com/stanbot8/spatialdata/blob/72250aa686c4be535f6d19038f9e0c13a0f2fb9e/src/spatialdata/_core/operations/rasterize.py).

### Limitations

This implementation uses 1 canvas. It removes the label-count limit, but
it does not bound output memory.

### Tests

1 boundary test rasterizes `65,536` indexed points. It preserves label
`65,536` in `uint32` output.

The focused rasterization suites pass with `28` tests. The complete
suite passes with `1,365` tests, `7` skips, and `1` expected failure. An
isolated installed wheel passes the same boundary case.

The test is in
[`tests/core/operations/test_rasterize.py`](https://github.com/stanbot8/spatialdata/blob/72250aa686c4be535f6d19038f9e0c13a0f2fb9e/tests/core/operations/test_rasterize.py).

<details>
<summary>Commands</summary>

```console
uv run pytest tests/core/operations/test_rasterize.py::test_rasterize_points_selects_label_dtype -q
```

</details>

---------

Co-authored-by: Jan Gleixner <jan.gleixner+git@gmail.com>
Co-authored-by: Jan Gleixner <j.gleixner@dkfz-heidelberg.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants