-
Notifications
You must be signed in to change notification settings - Fork 43
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
fsspec URL chaining #28
Comments
Note: a url-chaining implementation should also support other chaining styles, see: zarr-developers/zeps#48 |
Hi, I'm interested in getting this functionality. Is there a lot to do for this? If not, I could maybe have a look? |
Thank you for offering to contribute! To implement url chaining support two items have to be completed:
To provide an example of how this should look like: # interface does not exist yet
# this is just a mockup
>>> from upath import UPath
>>> pth = UPath("simplecache::zip://path/in/archive/spreadsheet.csv::s3://mybucket/data.zip")
S3Path("simplecache::zip://path/in/archive/spreadsheet.csv::s3://mybucket/data.zip")
>>> len(pth.chain)
3
>>> pth.chain[-2]
ZipPath("simplecache::zip://path/in/archive/spreadsheet.csv::s3://mybucket/data.zip")
>>> pth2 = pth.chain[-2]
>>> pth2.with_name("other_spreadsheet.csv")
ZipPath("simplecache::zip://path/in/archive/other_spreadsheet.csv::s3://mybucket/data.zip") When this gets implemented, there are a very likely few complications that would have to be solved. For example, the various caches implemented in filesystem_spec don't take a path, they just use the path of the next filesystem in the chain. So this should probably be special-cased in UPath somehow. Also when instantiating I'll try to provide more information once I am back from traveling! Cheers, |
This is not urgent, but based on my very limited and quick testing, it seems that fsspec URL chaining may not work properly.
It is possible I was not doing it properly, or there maybe some clever way to work around the limitation, but I thought it was worth raising an issue for now.
The text was updated successfully, but these errors were encountered: