Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1292 +/- ##
==========================================
+ Coverage 78.44% 78.46% +0.02%
==========================================
Files 63 63
Lines 9532 9533 +1
Branches 1594 1594
==========================================
+ Hits 7477 7480 +3
+ Misses 1489 1488 -1
+ Partials 566 565 -1
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Building spatial neighbor graphs from a
SpatialDataobject withcopy=Truecurrently writes computed centroids into the original table before returning the graph. This can overwrite existing coordinates, add a new coordinate key, or leave changed coordinates behind when graph construction fails.Pass
copythrough the shared input preparation path and use a temporary AnnData containing observation metadata and the metadata needed for legacy graph dispatch. This keeps computed coordinates out of the original table without copying or loading expression matrices, including for backed tables. The change covers the legacy function and all five current graph-building entry points.copy=Falseretains its existing behavior.How has this been tested?
tests/graph/test_spatial_neighbors_copy.pyand the existingtests/graph/test_spatial_neighbors.pyon Python 3.13/macOS.git diff --checkpassed.-W); verified the generated release note.Closes
Closes #1154