Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

io submodule #1681

Closed
ivirshup opened this issue Sep 18, 2024 · 1 comment · Fixed by #1682
Closed

io submodule #1681

ivirshup opened this issue Sep 18, 2024 · 1 comment · Fixed by #1682

Comments

@ivirshup
Copy link
Member

Please describe your wishes and possible alternatives to achieve the desired result.

We should have a public submodule io since we're starting to grow our IO api.

This should include all public methods related to io, including:

  • read_elem, write_elem
  • sparse_dataset

Eventually I would also like whatever public API we have for the registries to be included here.

I think it would make sense to put some of the more esoteric reader functions in here, like read_text, read_loom, etc. However, I'm not so sure about read_h5ad, read_zarr. I think these could be exported from both the main namespace and io, but am not 100% sure on this.

@flying-sheep
Copy link
Member

I'm not so sure about read_h5ad, read_zarr.

If you’re unsure because you don’t know how to categorize these, I think I can help: Those are the lossless formats, whereas the others are approximate formats that don’t support all of an AnnData object’s features. I already added some docs in a recent PR to distinguish the two tiers of format support.

One alternative would be to have only one read method in the root like def read(path: Path, *, format: Literal['zarr', ...] | None = None) which would be used when people just want to read one of the lossless formats without options.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants