Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Pre-release daily workflows failing with zarr 3.0.0a0 #200

Closed
3 tasks done
rly opened this issue Jun 18, 2024 · 2 comments · Fixed by #201
Closed
3 tasks done

[Bug]: Pre-release daily workflows failing with zarr 3.0.0a0 #200

rly opened this issue Jun 18, 2024 · 2 comments · Fixed by #201
Assignees
Labels
category: bug errors in the code or code behavior

Comments

@rly
Copy link
Contributor

rly commented Jun 18, 2024

What happened?

All pre-release daily workflows are failing. https://github.com/hdmf-dev/hdmf-zarr/actions/runs/9559407286

It looks like they install the latest zarr 3.0.0 pre-release, 3.0.0a0, which was released last week.

I think this can be addressed by changing from zarr.hierarchy import Group to from zarr import Group. I will give it a try.

Steps to Reproduce

Run tests with zarr 3.0.0a0

Traceback

/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/importlib/__init__.py:90: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/unit/test_io_convert.py:43: in <module>
    from hdmf_zarr.backend import (ZarrIO,
.tox/py312-prerelease/lib/python3.12/site-packages/hdmf_zarr/__init__.py:1: in <module>
    from .backend import ZarrIO
.tox/py312-prerelease/lib/python3.12/site-packages/hdmf_zarr/backend.py:11: in <module>
    from zarr.hierarchy import Group
E   ModuleNotFoundError: No module named 'zarr.hierarchy'

Operating System

Linux

Python Executable

Conda

Python Version

3.12

Package Versions

No response

Code of Conduct

@rly rly added the category: bug errors in the code or code behavior label Jun 18, 2024
@rly rly added this to the Next Major Release: 1.0.0 milestone Jun 18, 2024
@rly rly self-assigned this Jun 18, 2024
@rly
Copy link
Contributor Author

rly commented Jun 18, 2024

Attempting to fix this proved to be more than a few minutes of import changes. The Zarr Python API changes quite a bit from v2 to v3, and it seems like some things that we use like ProcessSynchronizer and ThreadSynchronizer have been removed/replaced. I haven't looked deeply into it yet. But for now, I think we should limit zarr<3 until we can provide proper zarr-python v3 support

This was referenced Jun 18, 2024
@oruebel
Copy link
Contributor

oruebel commented Jun 18, 2024

some things that we use like ProcessSynchronizer and ThreadSynchronizer have been removed/replaced.

The main part where the synchronizers come in is in how we open the file:

def open(self):

and then that is being configured in the __init__ is here:

if isinstance(synchronizer, bool):
if synchronizer:
sync_path = tempfile.mkdtemp()
self.__synchronizer = zarr.ProcessSynchronizer(sync_path)
else:
self.__synchronizer = None
else:
self.__synchronizer = synchronizer

We are really not doing anything special with the synchronizers and in most common cases, I think the synchronizer is not being used (I think this mainly comes in for parallel I/O). So if we need to update this for Zarr 3, I think we should be able doable to keep the changes centered around file open logic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: bug errors in the code or code behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants