Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Do not merge.
PR is mainly to provoke discussion surrounding IPNS R/W support and what would need to happen to get this repo minimally working with DVC.
My understanding is that if this had write support, it could be used in DVC (even if not efficient). IPNS is one solution (although I hear DNSLink is probably better).
I'm also just playing with this to get a better feel for the fsspec code. I've mainly added doctests that demo a few ways I've tried to use the repo.
I also added an IPNSFileSystem, because the current IPFSFileSystem does not work with ipns references. The reason for this was something I found odd. The
get
method in the Gateway hard-coded an "/ipfs/" prefix on the path. If that wasn't there, this would work with "/ipns/" prefixed addresses, although it would be cumbersome to type:ipfs:///ipfs/<cid>
oripfs:///ipns/<name>
the triple/
is not desirable.I abstracted the entire thing to just use a
'/{self.protocol}/
prefix, and I added that to both "ls" and "info" methods of the filesystem itself for consistency with the "get" call of the gateway. Not sure exactly what the right design decisions are here. Thoughts?