Closed oruebel closed 3 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 86.05%. Comparing base (
afaab5f
) to head (c00e4bc
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@mavaylon1 could you please review this PR as well for the next release.
Note, I unfortunately could not add a unit test for this issue, but I filed https://github.com/hdmf-dev/hdmf-zarr/issues/185 to address this gap in our tests separately .
Motivation
ZarrIO.__open_consolidated`` currently used the following check
if os.path.isfile(path+'/.zmetadata'):` to determine whether the file should be open with consolidated metadata or without. This check, however, assumes that the file is local and will not work for remote files stored on S3.Changes
To address this issue this PR changes to a try/except logic instead.
zarr.open_consolidated
will raise aKeyError
if the.zmetata
is missing so we can just try to open the file this way first and the fall back to the regular method if it fails.Checklist
ruff
from the source directory.