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

[c++] Simplify internal API for dataframe-resizer #3090

Merged

Conversation

johnkerl
Copy link
Member

@johnkerl johnkerl commented Sep 28, 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:

While the full-generality upgrade_domain is tasked out on #2407, the foremost use-case for append mode, and tests/testthat/test-write-soma-resume.R for PR #3089, will need a simpller keystroke-saver which is already implemented in C++.

What this existing method does in C++ is resize the soma_joinid dim, if it's a dim, and leave the other dims as-is; if soma_joinid is not a dim, leave it as-is. This exists in C++, it's unit-tested in C++, and it's ready (and it's time) to be plumbed up to Python and R as well.

I realize now that having C++ maybe_resize_joinid take a length-1 vector, and assert that it's length-1, is silly -- it should simply take a single int64_t. This PR does just that. It also removes the confusing prefix maybe_.

Notes for Reviewer:

Copy link

codecov bot commented Sep 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (kerl/sdf-domain-at-create@7dc11ab). Learn more about missing BASE report.

Additional details and impacted files
@@                     Coverage Diff                      @@
##             kerl/sdf-domain-at-create    #3090   +/-   ##
============================================================
  Coverage                             ?   89.16%           
============================================================
  Files                                ?       45           
  Lines                                ?     4284           
  Branches                             ?        0           
============================================================
  Hits                                 ?     3820           
  Misses                               ?      464           
  Partials                             ?        0           
Flag Coverage Δ
python 89.16% <ø> (?)

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

Components Coverage Δ
python_api 89.16% <0.00%> (?)
libtiledbsoma ∅ <0.00%> (?)

@johnkerl johnkerl force-pushed the kerl/maybe-resize-soma-joinid-cpp-tweak branch from 89d98ef to 0178ab5 Compare September 28, 2024 20:38
@johnkerl johnkerl force-pushed the kerl/maybe-resize-soma-joinid-cpp-tweak branch from 0178ab5 to 7981d82 Compare September 28, 2024 21:49
@johnkerl johnkerl changed the base branch from main to kerl/sdf-domain-at-create September 28, 2024 21:50
johnkerl and others added 4 commits September 30, 2024 09:31
…rsion (#3086)

* Update the encoding version to 1.1.0
* Update errors for valid soma types that are not yet implemented
Add `SOMAMultiscaleImage` to `libtiledbsoma`.
@johnkerl johnkerl force-pushed the kerl/maybe-resize-soma-joinid-cpp-tweak branch from 7981d82 to 96f70e1 Compare September 30, 2024 16:59
@johnkerl
Copy link
Member Author

Thanks @nguyenv !

@johnkerl johnkerl force-pushed the kerl/maybe-resize-soma-joinid-cpp-tweak branch from 96f70e1 to 3258070 Compare September 30, 2024 17:48
@johnkerl johnkerl merged commit 1531119 into kerl/sdf-domain-at-create Sep 30, 2024
25 checks passed
@johnkerl johnkerl deleted the kerl/maybe-resize-soma-joinid-cpp-tweak branch September 30, 2024 18:17
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.

4 participants