-
-
Notifications
You must be signed in to change notification settings - Fork 177
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
Implement TarFS.geturl and ZipFS.geturl and Fix #329, #333, #340 #330
Conversation
…provide FSURL string.
…lder')) triggers CreateFailed 🐛 osfs.geturl() cannot be opened by itself
Hi all, I will get the test cases fixed later |
@chfw This isn't actually the intent of the Good catch with the missing archive exceptions. How did you insert those funky icons in the commit messages? Some tool or do you do them manually? |
@willmcgugan here is the fit commit emoji style guide: https://github.com/slashsbin/styleguide-git-commit-message I accept that your intent was meant for browser. However, I am using zipfs and tarfs in a new context where: I would need a universal url that pyfs2 willingly read a file out. Both tarfs and zipfs do read content out given: zip://test.zip/my/folder/file. But both refuses to emit url which I find it naturally shall emit. FS has its interface specified already hence all sub fs shall respect where applicable. Then we won’t have to remember which fs can and cannot do. |
I'd be surprised if this worked as is. I'd expect that it would consider FS URLs do support a syntax that can indicate a path within a filesystem, by separating the filesystem part from the path with a
The URLs returned must be externally consumable I'm afraid, it could break some projects if we change that. However, there is a It would work something like this:
And that won't break any existing code as |
I think your advice is great! My use case is taken care of and the change won't break others.
Let me update it. And yes, your doubt is valid. There exists an abstract layer in my lib handles the URL: https://github.com/moremoban/moban/blob/pyfs2/moban/file_system.py#L98 |
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.
Great work, thanks for sticking at it. Just a few requests.
This PR is getting so big, I wonder if it's worth splitting it into smaller separate PRs? 🤷♂️ |
Or Merge it now and I will prepare another PR to address your review comments. |
I have addressed all review comments now. The ball is in your court. |
Could you please approve the PR? |
@chfw Just want to give it one last look over. Will do that soon. |
@willmcgugan Any chance for this PR to get released soon? |
Sorry for the delay @chfw All good, but I've merged a PR and created a merge conflict for you. If you wouldn't mind resolving that and we should be good to go. |
@willmcgugan , good to merge now. |
Hooray! |
Type of changes
Checklist
Description
Fix #329, #333, #340
And deliver geturl for ZipFS and TarFS, and my use case is to get url for a file inside a zip, deposit the url, and read it later.
The existing code in ZipFS and TarFS did not imagine an download url is really needed for a file inside a zip or tar. Hence, I would like to present my use case and get it supported.