util to convert the masks to bool + ruff bump - #319
Merged
TeunHuijben merged 4 commits intoJul 27, 2026
Conversation
JoOkuma
requested changes
Jul 27, 2026
JoOkuma
left a comment
Member
There was a problem hiding this comment.
Hi @TeunHuijben , thanks for the PR, I left a few comments to make it a bit more general
Comment on lines
+129
to
+139
| def _copy_geff(geff_store: StoreLike, output_path: StoreLike) -> Path: | ||
| """Copy a geff directory to ``output_path`` and return the new path.""" | ||
| try: | ||
| src = Path(os.fspath(geff_store)) | ||
| dst = Path(os.fspath(output_path)) | ||
| except TypeError as e: | ||
| raise TypeError("output_path is only supported for filesystem-path geff stores.") from e | ||
| if dst.exists(): | ||
| raise FileExistsError(f"output_path already exists: {dst}") | ||
| shutil.copytree(src, dst) | ||
| return dst |
Member
There was a problem hiding this comment.
Is there a zarr copy function that processes the storelike objects?
I'm thinking of the case where it cannot be loaded as a os.fspath
Contributor
Author
There was a problem hiding this comment.
zarr.copy_store doesn't exist for zarr3
Contributor
Author
There was a problem hiding this comment.
What about this implementation?
JoOkuma
approved these changes
Jul 27, 2026
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.
The latest version of tracksdata stores masks as booleans in a GEFF. But previously exported GEFFs are saved as
uint64, which causes memory to explode upon loading.This PR implements a utility that converts the mask elements to booleans, either duplicating the geff or doing so in place.
Sorry for doing the
ruffstuff as well in this PR, but GitHub CI takes the latest ruff, so I had to be compliant.