Keep spikeinterface importable when zarr-python v3 is installed - #4751
Merged
Conversation
Four v2-only spellings that break under v3 and stay valid under 2.18: the zarr.hierarchy.Group annotations, evaluated at import time, zarr.open's positional mode and its use as a context manager, len() on the zarr arrays of the sorting extractor, and the main-ids guard that does not know numpy's variable-width StringDType.
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.
I am testing the zarr migration and as you know hdmf-zarr is what is keeping us from moving forward:
hdmf-dev/hdmf-zarr#325
hdmf-dev/hdmf-zarr#366
For testing I am making small changes here that allow me to keep spikeinterface in the environment without adding read support from version 3. Those changes are minimal:
This is way smaller than #4260 which is the complete thing and it does not make the zarr extractors write v3, it only keeps the import and the reading paths alive for people who have zarr 3 in the environment for another package. Loading an analyzer from a zarr folder still fails under 3 and that one really needs the migration. This will make future integration easier I feel : )
Note that 2 is useful more generally and I think we should support the new string dtype in general but I just wanted to do a surgical change here.