Summary
This hotfix improves AnnData on-disk schema compliance and subset-output interoperability, especially for downstream tools that validate element metadata.
Highlights
1) Root AnnData metadata enforcement
- Enforced root attributes on writable store operations:
encoding-type: "anndata"encoding-version: "0.1.0"
- Added non-fatal read-time warning when these root attributes are missing.
- Applied enforcement consistently through store copy/convert paths.
2) Subset output schema hardening
subsetnow guarantees presence of optional AnnData mapping groups when absent in source:layers,obsm,obsp,varm,varp
- These mapping groups now carry mapping metadata for compatibility with this codebase’s documented schema:
encoding-type: "dict"encoding-version: "0.1.0"
3) Documentation updates
- Updated element specification docs for HDF5 and Zarr to align with latest requirements and preserve explicit legacy compatibility notes.
- Clarified handling of historical mapping metadata (
dictv0.1.0) for backward compatibility.
Test Coverage Added/Updated
- Added tests for root AnnData attribute enforcement and warning behavior.
- Added/updated subset integration tests to validate optional group creation and mapping metadata.
Impact
- No intended breaking CLI changes.
- Improves compatibility with schema-aware downstream readers.
- Reduces risk of malformed subset outputs due to missing mapping metadata.
Notes for users
- Some
anndataversions (notably <= 0.12.0) may still fail inexperimental.concat_on_disk(..., merge='same')whenvarcontains columns due to upstream behavior. This is version-specific toanndata, not specific to this hotfix.
Included changes (since 0.3.1 baseline)
- Source: storage metadata enforcement and subset schema fixes
- Docs: element specification updates (HDF5/Zarr)
- Tests: new/expanded coverage for storage/subset behavior
- Lockfile: updated
uv.lock