Skip to content
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

✨ Programmatic API for the community tab #930

Merged
merged 44 commits into from
Aug 9, 2022

Conversation

SBrandeis
Copy link
Contributor

@SBrandeis SBrandeis commented Jun 24, 2022

Programmatic API to interact with discussions and pull requests on the Hub:

  • Listing
  • Creating
  • Commenting
  • Editing
  • Merging
    etc etc

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Jun 24, 2022

The documentation is not available anymore as the PR was closed or merged.

@SBrandeis SBrandeis changed the title ✨ WIP: programmatic API for the community tab ✨ Programmatic API for the community tab Jun 27, 2022
@SBrandeis SBrandeis marked this pull request as ready for review June 27, 2022 21:23
@SBrandeis SBrandeis requested review from LysandreJik, osanseviero and julien-c and removed request for LysandreJik June 27, 2022 21:23
Copy link
Member

@LysandreJik LysandreJik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very impressive PR. Thanks for working on this @SBrandeis, really love the documentation you wrote to explain everything.

That the diff and history are accessible through this API are pretty nifty.

docs/source/package_reference/community.mdx Outdated Show resolved Hide resolved
src/huggingface_hub/hf_api.py Show resolved Hide resolved

Returns: [`DiscussionWithDetails`]

<Tip>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that so far, through the codebase we have been using <Tip> quite a bit because Raises: wasn't implemented. I would continue with <Tip> in this PR, and offer a PR that switches everything to Raises:.

The only place where I can see some Raises: are in the lfs.py file that was modified recently and which are not visible in the documentation, AFAIK.

src/huggingface_hub/hf_api.py Outdated Show resolved Hide resolved
src/huggingface_hub/hf_api.py Show resolved Hide resolved
@julien-c
Copy link
Member

this should be ready to merge, do you want to give it a final look then merge @Wauplin?

Copy link
Contributor

@Wauplin Wauplin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @SBrandeis, I reviewed the PR which got me to understand more how things are implemented 🙂 . A majority of the comments are just typos since I read all the documentation you've written. For other parts, I'm just curious on if I understood things correctly.

docs/source/how-to-discussions-and-pull-requests.mdx Outdated Show resolved Hide resolved
docs/source/how-to-discussions-and-pull-requests.mdx Outdated Show resolved Hide resolved
src/huggingface_hub/community.py Outdated Show resolved Hide resolved
src/huggingface_hub/community.py Outdated Show resolved Hide resolved
src/huggingface_hub/hf_api.py Outdated Show resolved Hide resolved
src/huggingface_hub/hf_api.py Show resolved Hide resolved
src/huggingface_hub/hf_api.py Outdated Show resolved Hide resolved
src/huggingface_hub/hf_api.py Outdated Show resolved Hide resolved
src/huggingface_hub/hf_api.py Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants