scverse / spatialdata

An open and interoperable data framework for spatial omics data
https://spatialdata.scverse.org/
BSD 3-Clause "New" or "Revised" License
174 stars 34 forks source link

Join outside sdata #512

Closed melonora closed 1 month ago

melonora commented 1 month ago

This PR adds a function join_spatialelement_table which is equivalent to join_sdata_spatialelement_table but does not require the elements to be part of a SpatialData object.

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 83.67347% with 8 lines in your changes are missing coverage. Please review.

Project coverage is 92.49%. Comparing base (f97a120) to head (89c27d1). Report is 5 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #512 +/- ## ========================================== - Coverage 92.57% 92.49% -0.08% ========================================== Files 43 43 Lines 5938 5971 +33 ========================================== + Hits 5497 5523 +26 - Misses 441 448 +7 ``` | [Files](https://app.codecov.io/gh/scverse/spatialdata/pull/512?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scverse) | Coverage Δ | | |---|---|---| | [src/spatialdata/\_\_init\_\_.py](https://app.codecov.io/gh/scverse/spatialdata/pull/512?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scverse#diff-c3JjL3NwYXRpYWxkYXRhL19faW5pdF9fLnB5) | `100.00% <ø> (ø)` | | | [src/spatialdata/dataloader/datasets.py](https://app.codecov.io/gh/scverse/spatialdata/pull/512?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scverse#diff-c3JjL3NwYXRpYWxkYXRhL2RhdGFsb2FkZXIvZGF0YXNldHMucHk=) | `90.68% <100.00%> (ø)` | | | [src/spatialdata/\_core/query/relational\_query.py](https://app.codecov.io/gh/scverse/spatialdata/pull/512?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scverse#diff-c3JjL3NwYXRpYWxkYXRhL19jb3JlL3F1ZXJ5L3JlbGF0aW9uYWxfcXVlcnkucHk=) | `94.72% <82.97%> (-1.52%)` | :arrow_down: |
LucaMarconato commented 1 month ago

Instead of doing a post-hoc review I did a bit of refactoring, you can see it here: https://github.com/scverse/spatialdata/pull/519