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

Suggestion to revampt API endpoint table (hub-docs/api.md) #962

Merged
merged 5 commits into from
Sep 27, 2023

Conversation

Wauplin
Copy link
Contributor

@Wauplin Wauplin commented Sep 22, 2023

Discussed multiple times. Last time in huggingface/huggingface_hub#1682 (comment). I'll first revamp the table and in a later PR add the Collection API endpoints.

Let's agree on the layout first. What I did here is to delete the table and have 1 endpoint = 1 section in the page. That should create a "nice" table of content on the right.

Any opinion or feedback? cc @julien-c @osanseviero @Pierrci

(Note: I -almost- didn't change the content but some things should be clarified. Payloads often don't include the headers so either add them everywhere or have a section dedicated to it. Also maybe at some point have different section to group APIs together (e.g. the collection API in one section). Anyway, that's off-topic for now.).

WDYT?

Current docs: https://huggingface.co/docs/hub/api
PR docs: https://moon-ci-docs.huggingface.co/docs/hub/pr_962/en/api

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Sep 22, 2023

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

@julien-c
Copy link
Member

i do think https://moon-ci-docs.huggingface.co/docs/hub/pr_962/en/api is much better already!

@gary149 WDYT?

Copy link
Member

@stevhliu stevhliu left a comment

Choose a reason for hiding this comment

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

Very nice, I think this is a lot cleaner!

docs/hub/api.md Outdated Show resolved Hide resolved
@Wauplin Wauplin mentioned this pull request Sep 25, 2023
@osanseviero
Copy link
Contributor

Not 100% sure, but would it work to have a h2 with section titles (models, datasets, spaces, repos, user, others) and then the specific endpoints as h3?

Copy link
Contributor

@osanseviero osanseviero left a comment

Choose a reason for hiding this comment

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

Very nice. This is much better than current state. Thanks for tackling this!

@Wauplin
Copy link
Contributor Author

Wauplin commented Sep 25, 2023

Not 100% sure, but would it work to have a h2 with section titles (models, datasets, spaces, repos, user, others) and then the specific endpoints as h3?

Yes, I would personally be in favor of this. Haven't touched it yet as I wanted to have general feedback on the layout first before spending more time on it. I can take care of the h2/h3 section titles when adding the Collections API (#967)

Copy link
Member

@julien-c julien-c left a comment

Choose a reason for hiding this comment

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

approving but pinging @gary149 for a super quick review!

Copy link
Contributor

@gary149 gary149 left a comment

Choose a reason for hiding this comment

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

Si is so much better! thank you!

@Wauplin Wauplin merged commit 7cfa938 into main Sep 27, 2023
@Wauplin Wauplin deleted the revampt-api-endpoint-table branch September 27, 2023 07:03
@julien-c
Copy link
Member

very cool contrib, @Wauplin <3

let's aim to grow the usage & developer experience of the Hub API in the coming months 🦾

@Wauplin Wauplin mentioned this pull request Sep 27, 2023
@Pierrci
Copy link
Member

Pierrci commented Oct 2, 2023

Much clearer indeed, thanks @Wauplin!

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