-
Notifications
You must be signed in to change notification settings - Fork 284
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
Docs Revamp: new "Repositories" page for hub-docs #92
Conversation
Some sections are incomplete.
What we could do for now while developing is:
cc @gary149 about this since we'll have to change some UX code for the docs as we were discussing |
in my opinion you can already split into nested pages. the changes required in moon-landing to support this should be super simple, i can do it early next week at the same time (or before) we merge this |
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 is awesome content, thank you! 🚀 🚀 🚀
docs/hub/repositories.md
Outdated
To be able to push your code to the Hub, you'll need to authenticate somehow. The easiest way to do this is by installing the [`huggingface_hub` CLI](https://huggingface.co/docs/huggingface_hub/index) and running the login command: | ||
|
||
```bash | ||
python -m pip install huggingface_hub | ||
huggingface-cli login | ||
``` |
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 will only be required for people that want to do things locally 🤔
For the requirements, instead of having a global "requirements" section, I was wondering if they should be the step 0 for each of the subpages. WDYT?
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 subpages that I'm splitting this into are Getting Started, Best Practices, and Next Steps. Would I put this in all 3 sections? I figure that if someone's looking at doing something in the "Best Practices", they would look in "Getting Started" to make sure they'd have the requirements all set.
Or do you think the subpages should be even more granular? e.g. Getting Started > Creating a repo, Getting Started > Cloning repos, etc.
docs/hub/repositories.md
Outdated
### How to use branches | ||
|
||
To effectively use Git repos collaboratively and to work on features without releasing premature code you can use **branches**. Branches allow you to separate your "work in progress" code from your "production-ready" code, with the additional benefit of letting multiple people work on a project without frequently conflicting with each others' contributions. To learn about Git branching, you can try out the [Learn Git Branching interactive tutorial](https://learngitbranching.js.org/). | ||
|
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.
Splitting a large paragraph into two for easier legibility. Co-authored-by: Omar Sanseviero <[email protected]>
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.
Good intro to repositories! 👍
Suggestions by stevhliu merged in batch from PR review. Co-authored-by: Steven Liu <[email protected]>
To handle nested pages for the moment I did it with @osanseviero's suggestion of having a table of contents and linking to the pages. I also put the pages into a Also, I've applied almost all the feedback (except for moving the images, WIP), so I think this is ready for another round of reviews 😄 |
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 new imgs with the lfs
icon look nice! Just a few more minor nits, but otherwise looks good to me 👍
Co-authored-by: Steven Liu <[email protected]>
… into revamp/repositories
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 looks great to me! Thanks for the PR! 🚀 🚀
Feel free to merge once all comments are addressed. In terms of format, we can always do follow-up PRs to modify once the design decisions are final
|
||
<h1>Best practices with repositories</h1> | ||
|
||
Here are some additional best practices to help you get the most out of your repository. |
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.
Could you please add a section named "Handling multiple experiments" with a large TODO? (I can help with that in a follow-up PR from my side)
I think we can add things from huggingface/huggingface_hub#769 and specially from #53
- Other users who visit the URL of your private repo will receive a `404 - Repo not found` error. | ||
- Other users will not be able to clone your repo. | ||
|
||
## Security for repositories |
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.
Not 100% sure if this is important for the best practices doc. WDYT?
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.
I'm down to remove it, personally! People can always refer to the security docs for info about this stuff.
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.
Yes, I agree
@@ -0,0 +1,27 @@ | |||
--- | |||
title: Getting Started with Repositories |
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.
Very nice section!
|
||
### Duplicating without Git history | ||
|
||
In many scenarios, if you want your own copy of a particular codebase you might not be concerned about the previous Git history. In this case, you can quickly duplicate a repo with the handy [Repo Duplicator](https://huggingface.co/spaces/osanseviero/repo_duplicator)! You'll have to create a User Access Token, which you can read more about in the [security documentation](TODO). |
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.
Nice!
|
||
|
||
## How to programmatically manage repositories | ||
|
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.
Nice reference to huggingface_hub
Add TODO for handling multiple experiments
Add a "Repositories" page with several subpages, outlining how repos are used on the hub, and best practices for creating and maintaining them. Some content remains WIP. Co-authored-by: Omar Sanseviero <[email protected]> Co-authored-by: Steven Liu <[email protected]>
Add a "Repositories" page with several subpages, outlining how repos are used on the hub, and best practices for creating and maintaining them. Some content remains WIP. Co-authored-by: Omar Sanseviero <[email protected]> Co-authored-by: Steven Liu <[email protected]>
Add a "Repositories" page with several subpages, outlining how repos are used on the hub, and best practices for creating and maintaining them. Some content remains WIP. Co-authored-by: Omar Sanseviero <[email protected]> Co-authored-by: Steven Liu <[email protected]>
Add a "Repositories" page with several subpages, outlining how repos are used on the hub, and best practices for creating and maintaining them. Some content remains WIP. Co-authored-by: Omar Sanseviero <[email protected]> Co-authored-by: Steven Liu <[email protected]>
Add a "Repositories" page with several subpages, outlining how repos are used on the hub, and best practices for creating and maintaining them. Some content remains WIP. Co-authored-by: Omar Sanseviero <[email protected]> Co-authored-by: Steven Liu <[email protected]>
This is part of the process of revamping the documentation (#62) + Docs Proposal
This PR contains the first version of the "Repositories" documentation for the Hugging Face Hub, which aims to give readers a introduction to how repos are used in the Hub (for models, datasets, and Spaces) and shows how to get started with cloning, committing, pushing, and more. In-depth git tutorials are offloaded to third-party content. Information in this doc is split into "Getting started", "Best practices", and "Next steps", each covering increasingly complex or niche features.
Note that at the moment everything is contained within a single page, but I think this is a prime candidate for nested pages. Since (as far as I know) Moon Landing doesn't support nested pages for these docs yet, I was thinking that this could start as a single page, then nesting pages could be implemented in Moon Landing, and then this page could be split (probably with each Heading 2 being a separate page). Or the Heading-level split could actually be handled by Moon Landing!
Also note that links to non-existing sections are marked as TODO, and will be patched in a future PR before the revamp release.