Closed moradology closed 1 week ago
Hey @martindurant - would you prefer this (or some version thereof) implemented over in kerchunk rather than here?
The only reason to have it in kerchunk, is to indicate a level of experimentation and allow for releasing whenever is convenient. I suppose ice/zarr has no problem depending on it. I don't think it really matters.
OK, digging into things a little bit, I think there's a decent argument for pushing this behavior upstream to fsspec
itself for the sake of not requiring a kerchunk
dependency in zarr-python
. In particular, this method will need to have access to the wrapper: https://github.com/zarr-developers/zarr-python/blob/main/src/zarr/storage/remote.py#L159-L168
The alternative might be to provide it as a util in zarr-python
itself, as kerchunk
also depends on zarr-python
.
I find myself without as much context on prior decisions regarding project organization as might be useful, so please feel free to correct any apparent misunderstandings!
It can stay here, perhaps it'll come in useful for some other uses besides zarr.
Py3.8 has reached end-of-life, so you could either remove its CI, or protect your code with a condition sys.version_info > (3, 9)
.
Is there anything more you need from me to finish this off? I am happy to have it supersede my attempt (but you might hear about future issues! :) ).
I still need to get the docs updated here. Other than that, I think I think this should be good. I've been chasing other test failures for zarr3 integration, but will plan to get docs updated + CI fixed ready for potential merger tomorrow
OK, thank you. Let me know.
KK, I think this is ready. Wasn't entirely sure how best to handle fsid
, so that might deserve some critical attention (I just created a new one like: "async_{wrapped_class.fsid}") but otherwise things look OK
how best to handle fsid
I think what you've done is fine.
I did the lint, but please check this - is there a chance that self
gets lost?
Just looked things over again. It appears to me that line was kept in error and should be ditched
This PR adds support for arbitrarily wrapping synchronous filesystems to make them compatible with interfaces which might expect
AsynchronousFileSystem
instances. Both instance and class-level wrapping behavior is provided and tested. This is a feature that will be of use downstream to enable kerchunk/zarr-python3 compatibility and is related to the efforts here