fix metadata loss in to_geff - #333
Merged
Merged
Conversation
JoOkuma
approved these changes
Aug 7, 2026
JoOkuma
left a comment
Member
There was a problem hiding this comment.
LGTM.
An optional suggestion, it might be worth considering merging io._geff_metadata and io._geff_dtypes
Contributor
Author
|
Thanks! I merged the files |
Member
|
@TeunHuijben awesome, feel free to merge whenever you're ready |
TeunHuijben
added a commit
to TeunHuijben/tracksdata
that referenced
this pull request
Aug 8, 2026
* fix metadata loss in to_geff * merge two io/geff files into 1
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.
Fix graph metadata loss in
to_geff+ add graph-less metadata readerProblem
Downstream libraries need
shape(the dense segmentation shape) to survive a geffround-trip. Two things blocked that:
to_geffsilently dropped all graph metadata when the caller supplied its ownGeffMetadata— the merge intoextra["tracksdata"]only ran in thegeff_metadata is Nonebranch.from_geffalready read the extras back, so onlythe write path was broken.
extra["tracksdata"]["shape"]— a private detail we couldn't move.Changes
to_geffmerges graph metadata intoextra["tracksdata"]for caller-suppliedmetadata too. Caller entries win on collisions; the caller's object isn't mutated.
tracksdata.io.read_graph_metadata(source), taking a store/path or analready-parsed
GeffMetadata. Returns{}for non-tracksdata geffs.shapeis the canonical key (matchingGraphArrayView/to_ctc).Note: values pass through JSON, so
(5, 100, 100)reads back as[5, 100, 100].