Skip to content

[python/r] Expose shape-related accessors to Python/R bindings#2953

Merged
johnkerl merged 3 commits intomainfrom
kerl/py-r-accessor-plumbing
Sep 5, 2024
Merged

[python/r] Expose shape-related accessors to Python/R bindings#2953
johnkerl merged 3 commits intomainfrom
kerl/py-r-accessor-plumbing

Conversation

@johnkerl
Copy link
Copy Markdown
Contributor

@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
Comment thread apis/python/src/tiledbsoma/_dataframe.py
Comment thread apis/python/src/tiledbsoma/_dataframe.py
Comment thread apis/python/src/tiledbsoma/_tdb_handles.py Outdated
Comment thread apis/python/tests/test_shape.py Outdated
Comment thread apis/python/tests/test_shape.py Outdated
Comment thread apis/python/tests/test_sparse_nd_array.py Outdated
@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
@codecov
Copy link
Copy Markdown

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
Copy Markdown
Contributor

@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
Copy Markdown
Contributor Author

johnkerl commented Sep 5, 2024

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

Comment thread apis/r/R/SOMADataFrame.R Outdated
Comment thread apis/r/R/SOMANDArrayBase.R
Comment thread apis/r/R/SOMADataFrame.R Outdated
@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
Copy Markdown
Contributor Author

johnkerl commented Sep 5, 2024

Thanks @nguyenv and @mojaveazure !

@johnkerl johnkerl merged commit dd47db9 into main Sep 5, 2024
@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