-
Notifications
You must be signed in to change notification settings - Fork 13
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 write_to_disk for uri backends #164
base: master
Are you sure you want to change the base?
Conversation
78cbeb8
to
6c6c44f
Compare
6c6c44f
to
5f39521
Compare
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.
This doesn't look like the right API seeing as the same logic is repeated in both IPFS and Github backends. Maybe this should be a singular utility function that takes a backend, a URI and the target path and does the writing to disk?
Can you show me more of how this would be used in the core library API?
Yeah, that's a fair point. I'm not against moving this logic to a util function. I was just thinking it might be cleaner/simpler since you already have the IPFS backend to do something like ipfs_backend.write_to_disk(uri, target_path) rather than import write_uri_to_disk
write_uri_to_disk(ipfs_backend, uri, target_path) In terms of duplicating the logic, I just moved the definition of |
I guess this relates to how we interact with the ipfs backend in general. Typically, I find myself instantiating a specific backend (i.e. |
What was wrong?
Writing resolved ipfs uris to disk is something I find myself doing a lot manually, and would be useful if available on uri backends.
Cute Animal Picture