Skip to content

[Docs] Document missing endpoint and template_str parameters#4298

Merged
Wauplin merged 1 commit into
huggingface:mainfrom
aicayzer:docs/document-missing-parameters
Jun 1, 2026
Merged

[Docs] Document missing endpoint and template_str parameters#4298
Wauplin merged 1 commit into
huggingface:mainfrom
aicayzer:docs/document-missing-parameters

Conversation

@aicayzer

@aicayzer aicayzer commented May 29, 2026

Copy link
Copy Markdown
Contributor

Summary

Fills five Args entries that exist in the public-API signatures but aren't documented. Same shape as #4289 — pure docstring additions, no behaviour change.

  • hf_hub_download — add endpoint (file_download.py).
  • snapshot_download — add endpoint (_snapshot_download.py).
  • RepoCard.from_template / ModelCard.from_template / DatasetCard.from_template — add template_str (repocard.py, three docstrings).

endpoint text matches the wording introduced for lfs.py / repocard_data.py in #4289 ("The Hub endpoint to send the request to. Defaults to the value of HF_ENDPOINT."). template_str text notes the precedence rule the implementation already enforces (template_path overrides template_str when both are supplied).

make style and make quality clean.


Note

Low Risk
Docstring-only updates with no code or behavior changes.

Overview
Documents five public API parameters that were already in function signatures but missing from Args sections—no runtime changes.

Download APIs: hf_hub_download (file_download.py) and snapshot_download (_snapshot_download.py) now document endpoint (Hub URL; defaults to HF_ENDPOINT), aligned with wording from #4289.

Repo cards: RepoCard.from_template, ModelCard.from_template, and DatasetCard.from_template (repocard.py) now document template_str for inline Jinja templates, including that template_path takes precedence when both are set.

Reviewed by Cursor Bugbot for commit 7ff8c4d. Bugbot is set up for automated code reviews on this repo. Configure here.

- file_download.py: add `endpoint` to hf_hub_download Args
- _snapshot_download.py: add `endpoint` to snapshot_download Args
- repocard.py: add `template_str` to RepoCard / ModelCard / DatasetCard
  from_template Args (×3)

All five parameters are already in the signatures; this only fills the
docstrings. Same shape as huggingface#4289.

@Wauplin Wauplin left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

thanks

@Wauplin Wauplin merged commit c6dfc6d into huggingface:main Jun 1, 2026
19 of 23 checks passed
@bot-ci-comment

bot-ci-comment Bot commented Jun 1, 2026

Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@codecov

codecov Bot commented Jun 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.93%. Comparing base (1daa48b) to head (7ff8c4d).
⚠️ Report is 395 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4298      +/-   ##
==========================================
+ Coverage   75.00%   75.93%   +0.93%     
==========================================
  Files         145      172      +27     
  Lines       13978    20167    +6189     
==========================================
+ Hits        10484    15314    +4830     
- Misses       3494     4853    +1359     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Wauplin pushed a commit that referenced this pull request Jun 2, 2026
…les (#4300)

- file_download.py: add `endpoint` to hf_hub_url Args
- hf_api.py: fix preupload_lfs_files Args block — rename `operations`
  to `additions` (matches the actual parameter name) and add the
  missing `free_memory` entry

All three parameters are already in the signatures; this only fills
the docstrings. Same shape as #4298.
@huggingface-hub-bot

Copy link
Copy Markdown
Contributor

This PR has been shipped as part of the v1.18.0 release.

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.

2 participants