(
path: str,
commit: str | None = None,
is_dataset: bool = False,
)
| 395 | |
| 396 | |
| 397 | def format_hf_link( |
| 398 | path: str, |
| 399 | commit: str | None = None, |
| 400 | is_dataset: bool = False, |
| 401 | ) -> str: |
| 402 | prefix = "datasets/" if is_dataset else "" |
| 403 | base_url = f"https://huggingface.co/{prefix}{path}" |
| 404 | link = f"[{path}]({base_url})" |
| 405 | |
| 406 | if commit: |
| 407 | commit_url = f"{base_url}/commit/{commit}" |
| 408 | link += f" (Commit: [`{commit[:7]}`]({commit_url}))" |
| 409 | |
| 410 | return link |
| 411 | |
| 412 | |
| 413 | def generate_reproduce_readme( |
no outgoing calls
no test coverage detected