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

[python/r] Implement `resize` and `tiledbsoma_upgrade_shape` #2950

Closed johnkerl closed 1 month ago

johnkerl commented 1 month ago

Issue and/or context: As tracked on issue #2407 / [sc-51048]. Here we implement resize and upgrade_shape for ND arrays. The dataframe mutators are deferred to a separate PR.

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

Changes:

Implements and tests the mutators.

Notes for Reviewer:

For a separate PR: needs unit-test cases, including some saved-off arrays (in a tar file, say) lacking the new-shape feature which we can apply upgrade-shape to in unit-test cases.

johnkerl commented 1 month ago

@mojaveazure ready for round two!

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 78.57143% with 6 lines in your changes missing coverage. Please review.

Project coverage is 89.79%. Comparing base (ff2eb5b) to head (68b9767). Report is 7 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #2950 +/- ## ========================================== + Coverage 89.73% 89.79% +0.06% ========================================== Files 39 39 Lines 4080 4096 +16 ========================================== + Hits 3661 3678 +17 + Misses 419 418 -1 ``` | [Flag](https://app.codecov.io/gh/single-cell-data/TileDB-SOMA/pull/2950/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/2950/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=single-cell-data) | `89.79% <78.57%> (+0.06%)` | :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/2950/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/2950/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=single-cell-data) | `89.79% <78.57%> (+0.06%)` | :arrow_up: | | [libtiledbsoma](https://app.codecov.io/gh/single-cell-data/TileDB-SOMA/pull/2950/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=single-cell-data) | `∅ <ø> (∅)` | |
johnkerl commented 1 month ago

@nguyenv and @mojaveazure ready for the next round! :)