fix: respect multi-axis pos_attr when segmentation is present#188
Merged
TeunHuijben merged 3 commits intov2-devfrom Apr 3, 2026
Merged
fix: respect multi-axis pos_attr when segmentation is present#188TeunHuijben merged 3 commits intov2-devfrom
TeunHuijben merged 3 commits intov2-devfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## v2-dev #188 +/- ##
=======================================
Coverage 92.96% 92.96%
=======================================
Files 59 59
Lines 3268 3269 +1
=======================================
+ Hits 3038 3039 +1
Misses 230 230 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
|
Is this a problem on main too? |
Collaborator
Author
|
I think it is, but only surfaces when I was loading external graphs that had x/y/z/pos columns and I didn't want to use the pos column |
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.
When
pos_attrwas passed as a list (e.g. ['z', 'y', 'x']) toTracks/SolutionTracksalongside segmentation data, the user-specified position key was silently ignored. Two bugs caused this:_get_feature_set()only handledpos_attrinside an ifself.segmentationis None block, so multi-axis positions were never registered when segmentation was present._setup_core_computed_features()unconditionally overwrotefeatures.position_keywith theRegionpropsAnnotatordefault ("pos"), discarding any value set earlier.Fix: move multi-axis
pos_attrhandling outside the segmentation guard (since those columns are always static/pre-existing on nodes), and guard the annotator assignment with ifself.features.position_keyisNone