Skip to content

[c++] Minor function-extract in a unit-test helper#2919

Merged
johnkerl merged 1 commit intomainfrom
kerl/minor-unit-test-helper-mod
Aug 28, 2024
Merged

[c++] Minor function-extract in a unit-test helper#2919
johnkerl merged 1 commit intomainfrom
kerl/minor-unit-test-helper-mod

Conversation

@johnkerl
Copy link
Copy Markdown
Contributor

@johnkerl johnkerl commented Aug 20, 2024

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

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

Changes:

This is not strictly necessary -- all is does is remove some code duplication, which is a cosmetic nice-to-have. However, I found it helpful fo help me understand the functions in libtiledbsoma/test/common.cc, since I'll need to add to it.

Specifcally:

  • In the SOMA data model SparseNDArray and DenseNDArray are always indexed by int64
  • SOMADataFrame is indexed by default with a single int64 soma_joinid
  • However, users can have additional indices, of varying types, in addition to the int64 soma_joinid -- or, they can have one or more dims while soma_joinid is merely an attr, not a dim at all.

That third bullet has been unit-tested in TileDB-SOMA-Py for some time now; it hasn't been unit-tested in libtiledbsoma at all. For the changes on #2407 I'd like to rectify that, to increase confidence in PRs such as #2917.

Notes for Reviewer:

Currently this is stacked atop kerl/cpp-resizes which is PR #2917. If this PR can be approved sooner than some of the other ones on #2407 (and I believe it should be) then I will rebase this on top of current main in an attempt to unstack it from #2917.

@johnkerl johnkerl requested a review from nguyenv August 20, 2024 20:13
@johnkerl johnkerl changed the title [c++] Minor unit-test-helper function-extract [c++] Minor function-extract in a unit-test helper Aug 20, 2024
@johnkerl johnkerl force-pushed the kerl/minor-unit-test-helper-mod branch 2 times, most recently from 9cd956f to 01bd669 Compare August 28, 2024 13:54
@johnkerl johnkerl changed the base branch from kerl/cpp-resizes to main August 28, 2024 13:58
@johnkerl
Copy link
Copy Markdown
Contributor Author

Rebased onto fresh main just now (as planned)

@johnkerl johnkerl force-pushed the kerl/minor-unit-test-helper-mod branch from 01bd669 to fd9d7cf Compare August 28, 2024 14:01
@codecov
Copy link
Copy Markdown

codecov Bot commented Aug 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.02%. Comparing base (08193f2) to head (fd9d7cf).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2919      +/-   ##
==========================================
+ Coverage   89.87%   90.02%   +0.15%     
==========================================
  Files          38       38              
  Lines        3999     3999              
==========================================
+ Hits         3594     3600       +6     
+ Misses        405      399       -6     
Flag Coverage Δ
python 90.02% <ø> (+0.15%) ⬆️

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

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

@johnkerl johnkerl merged commit ae3e417 into main Aug 28, 2024
@johnkerl johnkerl deleted the kerl/minor-unit-test-helper-mod branch August 28, 2024 14:31
@ryan-williams ryan-williams mentioned this pull request Aug 29, 2024
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