single-cell-data / TileDB-SOMA

Python and R SOMA APIs using TileDB’s cloud-native format. Ideal for single-cell data at any scale.
https://tiledbsoma.readthedocs.io
MIT License
90 stars 25 forks source link

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

Closed johnkerl closed 1 month ago

johnkerl commented 1 month ago

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:

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 commented 1 month ago

Rebased onto fresh main just now (as planned)

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

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

Additional details and impacted files ```diff @@ 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](https://app.codecov.io/gh/single-cell-data/TileDB-SOMA/pull/2919/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=single-cell-data) | Coverage Δ | | |---|---|---| | [python](https://app.codecov.io/gh/single-cell-data/TileDB-SOMA/pull/2919/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=single-cell-data) | `90.02% <ø> (+0.15%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=single-cell-data#carryforward-flags-in-the-pull-request-comment) to find out more. | [Components](https://app.codecov.io/gh/single-cell-data/TileDB-SOMA/pull/2919/components?src=pr&el=components&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=single-cell-data) | Coverage Δ | | |---|---|---| | [python_api](https://app.codecov.io/gh/single-cell-data/TileDB-SOMA/pull/2919/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=single-cell-data) | `90.02% <ø> (+0.15%)` | :arrow_up: | | [libtiledbsoma](https://app.codecov.io/gh/single-cell-data/TileDB-SOMA/pull/2919/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=single-cell-data) | `∅ <ø> (∅)` | |