-
-
Notifications
You must be signed in to change notification settings - Fork 286
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
feature(store): list_* -> AsyncGenerators #1844
feature(store): list_* -> AsyncGenerators #1844
Conversation
- add zarr.testing.store module to support downstream use cases - set pytest-asyncio mode to auto -
@dstansby - wondering if you can help me debug these mypy failures:
I'm really surprised this isn't well supported by mypy/pytest. 🤷 |
@@ -0,0 +1,81 @@ | |||
import pytest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idea here is that we will provide a test harness for the generic store interface. This doesn't mean we can't have store-specific tests but those can go in our tests directory.
Importing zarr.testing.store
will raise an ImportError
if pytest is not installed. I think that could be fine but calling it out so others have a chance to comment. I think there are some things we can do to further hide this import if folks object to the current configuration.
@@ -1,96 +1,87 @@ | |||
# import array | |||
import array |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The story here is that when we first started the v3 work, I tried to "reuse" the v2 store tests. It wasn't a great fit and I wasn't able to migrate many tests to the new API those changes rather than continuing to use this module.
The contents match this file in test_storage.py
at the time we created the v3 branch (minus the v3 specific bits that have since been removed).
f0c57cb
to
eb49dd6
Compare
I think #1846 will fix this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good, thanks!!
This PR peels a few bits off from #1743, primarily focused on moving the output of the store list_* methods to
AsyncGenerators
.A few other nice things that ended up here: