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

Hard-code .zmetadata in FSStore._normalize_key #1467

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion zarr/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
path) and a `getsize` method (return the size in bytes of a given value).

"""

import atexit
import errno
import glob
Expand Down Expand Up @@ -1404,7 +1405,12 @@ def _normalize_key(self, key):
if key:
*bits, end = key.split("/")

if end not in (self._array_meta_key, self._group_meta_key, self._attrs_key):
if end not in (
self._array_meta_key,
self._group_meta_key,
self._attrs_key,
".zmetadata", # see: #1121
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could we do this via a class attribute like _consolidated_meta_key?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, and that would definitely be better than my quick fix here (intended to test the CI) but there's really no good place for it to live. It should naturally be in a Consolidated* class, but FSStore should be unaware of that. This is simply a problem of there being no spec for consolidated.

):
end = end.replace(".", self.key_separator)
key = "/".join(bits + [end])

Expand Down
Loading