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]: Remote read with/without consolidated metadata is not being tested #185

Closed
3 tasks done
oruebel opened this issue Apr 26, 2024 · 0 comments · Fixed by #206
Closed
3 tasks done

[Bug]: Remote read with/without consolidated metadata is not being tested #185

oruebel opened this issue Apr 26, 2024 · 0 comments · Fixed by #206
Assignees
Labels
category: bug errors in the code or code behavior priority: medium non-critical problem and/or affecting only a small set of users topic: testing issues related to testing

Comments

@oruebel
Copy link
Contributor

oruebel commented Apr 26, 2024

What happened?

#184 adds a bug fix for reading files from S3 with consolidated metadata. However, we currently are not testing reading with consolidated metadata only for local files. Since consolidated metadata is particularly relevant for reading from S3, it would be useful to add tests to ensure this is working correctly with files on S3 as well.

Steps to Reproduce

I believe we currently do no have a test file with consolidated metadata on DANDI. It would be useful to add some small Zarr files with and without consolidated metadata to our test DANDI dataset so that we can test that the remote files are being opened correctly in the streaming tests. Currently we are using a dataset from the Allen Institute for the streaming tests but it would be useful to test the behavior for streaming access more thoroughly using our own files.

To test whether a file is indeed opened correctly with consolidated metadata we can use the following check in the unit tests :

with ZarrIO(self.store, mode='r') as read_io:
read_io.open()
self.assertIsInstance(read_io.file.store, zarr.storage.ConsolidatedMetadataStore)
# Confirm that opening the file IN 'r-' mode indeed forces a regular open without consolidated metadata
with ZarrIO(self.store, mode='r-') as read_io:
read_io.open()
self.assertIsInstance(read_io.file.store, zarr.storage.DirectoryStore)

Traceback

N/A

Operating System

macOS

Python Executable

Conda

Python Version

3.9

Package Versions

No response

Code of Conduct

@oruebel oruebel added category: bug errors in the code or code behavior priority: medium non-critical problem and/or affecting only a small set of users topic: testing issues related to testing labels Apr 26, 2024
@mavaylon1 mavaylon1 mentioned this issue Jul 18, 2024
6 tasks
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 priority: medium non-critical problem and/or affecting only a small set of users topic: testing issues related to testing
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants