-
Notifications
You must be signed in to change notification settings - Fork 54
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
Support init of ome_zarr_py.io.ZarrLocation with zarr.storage.FSStore #349
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #349 +/- ##
==========================================
+ Coverage 85.06% 85.36% +0.30%
==========================================
Files 13 13
Lines 1533 1531 -2
==========================================
+ Hits 1304 1307 +3
+ Misses 229 224 -5 ☔ View full report in Codecov by Sentry. |
Thanks, @berombau. Would you be up for adding a test that makes use of this? |
for more information, see https://pre-commit.ci
@joshmoore Sure, I added some basic tests. More bespoke testing would require a dependency on s3fs or universal_pathlib, but this covers my use case. |
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.
Hey @berombau. Sorry for the slow response.
Sure, I added some basic tests.
❤️
More bespoke testing would require a dependency on s3fs or universal_pathlib
fsspec[s3]
does pull in s3fs if you want to add it into the testing. I also don't think there would be any objections to a dependency on universal_pathlib
. A step further might be to add moto
for testing like in https://github.com/zarr-developers/zarr-python/blob/a81db0782535ba04c32c277102a6457d118a73e8/zarr/tests/test_storage.py#L1380
The changes all look good to me, and I can see getting them in as they are. The one additional step that we likely want to take as a follow-up is to better specify what's required of the FSStore instance that is to be used, i.e., to better document the requirements of the init_store()
method both for anyone wanting to pass their own FSStore but also for anyone subclassing that method.
Hopefully with the next major version we will be dropping many of the requirements on that method, so that implementations other than FSStore (and with arbitrary dimension separators) can be supported.
cc: @will-moore
This PR would solve #369 for bioio-ome-zarr. What needs to happen to get this change merged? |
It's ready to go in the next release, I think. I worked with |
Thanks, all! Due to the change of the API, going to release this now as 0.9.0. @pgarrison, interested to hear if it solves all your troubles. 🙂 |
@joshmoore yes I was able to use this pattern to read a public |
By supporting FSStore as input, more complex ZarrLocations are possible like private remote stores.