-
Notifications
You must be signed in to change notification settings - Fork 199
Added DAG support #231
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
Added DAG support #231
Conversation
About the error in Travis, it seems that version 0.4.22 does not support |
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.
Thank you! Just found some minor stuff and the whitespace issue that I'll take care of.
Glad to have this implemented!
#TODO: `from . import dag` | ||
from . import dag |
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.
You forgot to remove the TODO comment above 😉
maximum: str = VERSION_MAXIMUM, | ||
blacklist: ty.Iterable[str] = VERSION_BLACKLIST) -> None: |
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.
The file got littered with some problematic whitespace changes unfortunately. I'll update your commit to remove this part of the diff, please don't be offended.
Which program did you use to edit the file?
def imprt(self, data: ty.IO, **kwargs: base.CommonArgs): | ||
"""Imports a .car file with a DAG to IPFS |
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 should include a comment about why the name is spelled incorrectly (it wasn't immediately obvious to me and I'm sure there are lots of less experienced Python programmers that wouldn't get it all and just be annoyed by what they think is a typo).
class Section(base.SectionBase): | ||
@base.returns_single_item(base.ResponseBase) | ||
def get(self, cid: str, **kwargs: base.CommonArgs): | ||
"""Get and serialize the DAG node named by CID. |
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.
Nit: Tone of voice is different here from other other doc-strings.
Merged in #232. Thank you! |
@meyer1994: I just realized that this was missing support for the optional parameters of /dag/put. Could you add those? It would allow importing directories based on lists of CIDs like requested in #220. 🙂 |
@ntninja I will try to do it this weekend :) |
Thanks! 🙂 |
Created PR #238 |
Changelog
dag
attribute to clientdag
attribute has the following methods:put
get
resolve
import
export
Notes
This implementation was basically copying and pasting from other parts of the codebase. The tests were created in the same fashion. 😅