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/r] Expose shape-related accessors to Python/R bindings #2953

Merged
merged 3 commits into from
Sep 5, 2024

Conversation

johnkerl
Copy link
Member

@johnkerl johnkerl commented Sep 4, 2024

Issue and/or context: As tracked on issue #2407 / [sc-51048].

Note that the intended Python and R API changes are all agreed on and finalized as described in #2407.

Changes:

  • These accessors are already implemented and unit-tested in C++
  • On this PR, I expose only the language bindings as-is with minimal unit-testing -- more unit-testing to follow (including feature-flag logic) as tracked on [python/r/c++] Revisit shape for component arrays #2407
  • The _maybe_sjid_shape and _maybe_sjid_maxshape accessors will be crucial for experiment-level resize logic as on append mode, which does not yet exist in TileDB-SOMA-R (see [r] Port append-mode logic #1630)

Notes for Reviewer:

@johnkerl johnkerl requested a review from nguyenv September 4, 2024 13:22
@johnkerl johnkerl marked this pull request as ready for review September 4, 2024 13:22
@johnkerl johnkerl removed the request for review from nguyenv September 4, 2024 15:39
@johnkerl johnkerl force-pushed the kerl/py-r-accessor-plumbing branch from ba528ba to 021ed67 Compare September 4, 2024 16:14
apis/python/src/tiledbsoma/_dataframe.py Show resolved Hide resolved
apis/python/src/tiledbsoma/_dataframe.py Show resolved Hide resolved
apis/python/src/tiledbsoma/_tdb_handles.py Outdated Show resolved Hide resolved
apis/python/tests/test_shape.py Outdated Show resolved Hide resolved
apis/python/tests/test_shape.py Outdated Show resolved Hide resolved
apis/python/tests/test_sparse_nd_array.py Outdated Show resolved Hide resolved
@johnkerl johnkerl force-pushed the kerl/py-r-accessor-plumbing branch from 6cbe435 to 6dba46b Compare September 4, 2024 20:51
@johnkerl johnkerl requested review from nguyenv and removed request for mojaveazure and nguyenv September 4, 2024 20:55
@johnkerl johnkerl marked this pull request as draft September 4, 2024 20:58
@johnkerl johnkerl force-pushed the kerl/py-r-accessor-plumbing branch from 6dba46b to 8ef6cf4 Compare September 4, 2024 21:03
Base automatically changed from kerl/sdf-test-accessors to main September 4, 2024 21:04
@johnkerl johnkerl force-pushed the kerl/py-r-accessor-plumbing branch 4 times, most recently from 195240b to 2a9f119 Compare September 4, 2024 22:30
@johnkerl johnkerl marked this pull request as ready for review September 4, 2024 22:31
@johnkerl johnkerl requested a review from mojaveazure September 4, 2024 22:31
@johnkerl johnkerl force-pushed the kerl/py-r-accessor-plumbing branch 2 times, most recently from 448dd7a to 06aac21 Compare September 4, 2024 22:42
@johnkerl johnkerl requested a review from nguyenv September 4, 2024 22:43
@johnkerl johnkerl changed the title [python/r] Expose shape-related accessors from C++ to bindings [python/r] Expose shape-related accessors to Python/R bindings Sep 4, 2024
@johnkerl johnkerl force-pushed the kerl/py-r-accessor-plumbing branch 2 times, most recently from 6e2b8ce to 5c09c72 Compare September 5, 2024 13:36
Copy link

codecov bot commented Sep 5, 2024

Codecov Report

Attention: Patch coverage is 78.43137% with 11 lines in your changes missing coverage. Please review.

Project coverage is 61.31%. Comparing base (8c4890c) to head (5312d49).
Report is 2 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #2953       +/-   ##
===========================================
- Coverage   89.87%   61.31%   -28.57%     
===========================================
  Files          38       93       +55     
  Lines        3999    12417     +8418     
  Branches        0      781      +781     
===========================================
+ Hits         3594     7613     +4019     
- Misses        405     4606     +4201     
- Partials        0      198      +198     
Flag Coverage Δ
libtiledbsoma 47.45% <0.00%> (?)
python 90.02% <88.88%> (+0.15%) ⬆️

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

Components Coverage Δ
python_api 90.02% <88.88%> (+0.15%) ⬆️
libtiledbsoma 50.19% <0.00%> (∅)

@johnkerl johnkerl force-pushed the kerl/py-r-accessor-plumbing branch from 5c09c72 to 465e9a1 Compare September 5, 2024 16:32
Copy link
Member

@nguyenv nguyenv left a comment

Choose a reason for hiding this comment

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

Looks good for the Python side.

@johnkerl
Copy link
Member Author

johnkerl commented Sep 5, 2024

@mojaveazure can you please take a look at the R side? Thank you!

apis/r/R/SOMADataFrame.R Outdated Show resolved Hide resolved
apis/r/R/SOMANDArrayBase.R Show resolved Hide resolved
apis/r/R/SOMADataFrame.R Outdated Show resolved Hide resolved
@johnkerl johnkerl requested a review from mojaveazure September 5, 2024 21:00
@johnkerl johnkerl dismissed mojaveazure’s stale review September 5, 2024 21:28

Requested change was made

@johnkerl johnkerl force-pushed the kerl/py-r-accessor-plumbing branch from bac2027 to 5312d49 Compare September 5, 2024 21:40
@johnkerl
Copy link
Member Author

johnkerl commented Sep 5, 2024

Thanks @nguyenv and @mojaveazure !

@johnkerl johnkerl merged commit dd47db9 into main Sep 5, 2024
14 of 15 checks passed
@johnkerl johnkerl deleted the kerl/py-r-accessor-plumbing branch September 5, 2024 21:59
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.

3 participants