Skip to content

IO refactor#133

Draft
ilia-kats wants to merge 3 commits intoscverse:mainfrom
ilia-kats:io_refactor
Draft

IO refactor#133
ilia-kats wants to merge 3 commits intoscverse:mainfrom
ilia-kats:io_refactor

Conversation

@ilia-kats
Copy link
Copy Markdown
Collaborator

Switch to AnnData's public API as much as possible.

I was hoping to be able to get rid of most of our custom implementations and just use read_elem for everything, but unfortunately that is not possible:

  • for h5ad files, read_elem does not handle backed mode and AnnData's read_h5ad only supports file paths, not opened files/groups.
  • for Zarr files, we have the write_data argument which is not supported by AnnData. This was presumably introduced as an analog to _write_h5mu's write_data. However, the _write_h5mu write_data argument is required for handling backed h5mu files in MuData.write_h5mu. Zarr files cannot be backed, so that argument is presumably not needed and can be removed.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 30, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.47%. Comparing base (5ccf921) to head (da9e2d3).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #133      +/-   ##
==========================================
+ Coverage   90.98%   91.47%   +0.48%     
==========================================
  Files          11       10       -1     
  Lines        1797     1759      -38     
==========================================
- Hits         1635     1609      -26     
+ Misses        162      150      -12     
Files with missing lines Coverage Δ
src/mudata/_core/io.py 94.96% <100.00%> (-0.02%) ⬇️
src/mudata/_core/mudata.py 93.12% <100.00%> (-0.01%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

1 participant