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

✨ Add n_observations function to read n_obs from AnnData and tiledbsoma #2097

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Koncopd
Copy link
Member

@Koncopd Koncopd commented Oct 22, 2024

Re https://laminlabs.slack.com/archives/C04FPE8V01W/p1726658747846539

This function infers n_obs from anndata (both zarr and hdf5) and tiledbsoma. I am reluctant to add this to Artifact by default though.

@Koncopd Koncopd marked this pull request as draft October 22, 2024 12:31
Copy link

codecov bot commented Oct 22, 2024

Codecov Report

Attention: Patch coverage is 82.35294% with 9 lines in your changes missing coverage. Please review.

Project coverage is 92.45%. Comparing base (c41fc2c) to head (523ece4).
Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
lamindb/core/storage/_observations.py 82.00% 9 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2097      +/-   ##
==========================================
- Coverage   92.52%   92.45%   -0.08%     
==========================================
  Files          54       55       +1     
  Lines        6435     6480      +45     
==========================================
+ Hits         5954     5991      +37     
- Misses        481      489       +8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

@github-actions github-actions bot temporarily deployed to pull request October 22, 2024 13:21 Inactive
@Koncopd
Copy link
Member Author

Koncopd commented Oct 23, 2024

Do we want it to be used by default?

@falexwolf
Copy link
Member

This shouldn't be part of the Artifact API. If it's used internally while constructing the Artifact object, that's OK!

Can you more comprehensively document why this PR exists? The Slack link is internal and hence nobody external will understand why you're doing what you're doing here. ☺️

@falexwolf
Copy link
Member

This looks perfectly great. We should just call this in Artifact() by default if a corresponding path is called within say from_anndata().

@Koncopd
Copy link
Member Author

Koncopd commented Nov 22, 2024

Ok, makes sense. It still needs a bit of improvement though.
Should we also have .from_tiledbsoma?

@falexwolf
Copy link
Member

Ok, makes sense. It still needs a bit of improvement though.
Should we also have .from_tiledbsoma?

Yes, I think so!

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