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

[python] Add get_obs #1151

Merged
merged 7 commits into from
May 23, 2024
Merged

[python] Add get_obs #1151

merged 7 commits into from
May 23, 2024

Conversation

ivirshup
Copy link
Collaborator

@ivirshup ivirshup commented May 17, 2024

Fixes #1037

TODO:

  • Add get_var
  • Docs
  • Confirm argument names

@ivirshup ivirshup added the python api Related to the API label May 17, 2024
Copy link

codecov bot commented May 21, 2024

Codecov Report

Attention: Patch coverage is 97.67442% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 91.16%. Comparing base (e36addb) to head (f2db37f).

Files Patch % Lines
...lxgene_census/src/cellxgene_census/_get_anndata.py 93.75% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1151      +/-   ##
==========================================
+ Coverage   91.12%   91.16%   +0.04%     
==========================================
  Files          77       77              
  Lines        5857     5896      +39     
==========================================
+ Hits         5337     5375      +38     
- Misses        520      521       +1     
Flag Coverage Δ
unittests 91.16% <97.67%> (+0.04%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

Copy link
Contributor

@prathapsridharan prathapsridharan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall this looks good to me. I have one question about the implementation in the test case.

@pablo-gar @ebezzi - Can y'all take a look too please?

@ivirshup ivirshup marked this pull request as ready for review May 21, 2024 17:46
Copy link
Contributor

@prathapsridharan prathapsridharan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but please wait for @ebezzi and @pablo-gar to review as well before merging to main

Copy link
Contributor

@pablo-gar pablo-gar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@prathapsridharan @ebezzi I see a pattern in the file structure in api/python/cellxgene_census/src/cellxgene_census whereby the SOMAExperiment helpers are under _experiment.py, the anndata helpers are _get_anndata.py

Would it make sense to have the proposed helpers in this PR under a new _axis_metadata.py or _get_axis_metadata.py file?

I defer to you both as this touches dev eng design.

LGTM otherwise

@prathapsridharan
Copy link
Contributor

get_obs and get_var to me seems consistent when put together with anndata related functions. And the same applies to helper functions needed in service of get_anndata, get_obs, get_var.

I think we can shift things around later if needed but for now this organization seems fine to me

Copy link
Member

@ebezzi ebezzi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo in the docs, but otherwise LGTM.

@ivirshup ivirshup requested a review from ebezzi May 21, 2024 21:15
@ivirshup
Copy link
Collaborator Author

Thanks for the catch! Applied your changes.

@ivirshup ivirshup merged commit ef8472a into main May 23, 2024
14 checks passed
@ivirshup ivirshup deleted the ivirsh/get-obs branch May 23, 2024 01:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
python api Related to the API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add convenience wrapper for querying axis metadata
4 participants