Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix join non matching table #813

Merged
merged 4 commits into from
Dec 26, 2024
Merged

fix join non matching table #813

merged 4 commits into from
Dec 26, 2024

Conversation

melonora
Copy link
Collaborator

Currently, matching an element to non matching table (sliced table) can fail when match_rows is not no.

For example on main this would fail:

from spatialdata.datasets import blobs_annotating_element
from spatialdata import join_spatialelement_

sdata = blobs_annotating_element("blobs_circles")
sdata['table'] = sdata['table'][:3]
el, table = join_spatialelement_table(sdata, spatial_element_names="blobs_circles", table_name="table", how="inner", match_rows="left")

This PR fixes that issue.

Copy link

codecov bot commented Dec 23, 2024

Codecov Report

Attention: Patch coverage is 94.44444% with 1 line in your changes missing coverage. Please review.

Project coverage is 91.80%. Comparing base (7fc5eb4) to head (7a57b9b).
Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
src/spatialdata/_core/query/relational_query.py 94.44% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #813      +/-   ##
==========================================
+ Coverage   91.79%   91.80%   +0.01%     
==========================================
  Files          45       45              
  Lines        7055     7064       +9     
==========================================
+ Hits         6476     6485       +9     
  Misses        579      579              
Files with missing lines Coverage Δ
src/spatialdata/_core/query/relational_query.py 90.66% <94.44%> (+0.19%) ⬆️

@LucaMarconato LucaMarconato enabled auto-merge (squash) December 26, 2024 16:45
@LucaMarconato LucaMarconato merged commit 7bce868 into scverse:main Dec 26, 2024
8 checks passed
@LucaMarconato LucaMarconato mentioned this pull request Jan 2, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants