Invalid "selection" values in "read_zarr()" should raise an error
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 394
- Forks
- 95
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 7
Description
spatialdata.read_zarr() currently appears to silently ignore invalid values passed to selection.
For example:
sdata = spatialdata.read_zarr(
path,
selection=("table",),
)
returns a SpatialData object with no loaded tables instead of indicating that "table" is not a valid selector.
It would be safer if read_zarr() validated selection against the supported values:
{"images", "labels", "points", "shapes", "tables"}
and raised a clear ValueError for unknown entries. Silent failure can otherwise make a valid Zarr store look empty and is difficult to diagnose.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the spatialdata.read_zarr() entry point and inspect how the selection argument is handled. Validate entries against images, labels, points, shapes, and tables, and confirm that an unknown value such as "table" raises a clear ValueError instead of silently omitting data.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, data
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 78/100