MCPcopy Index your code
hub / github.com/Project-MONAI/MONAI / _download_from_github

Function _download_from_github

monai/bundle/scripts.py:190–197  ·  view source on GitHub ↗
(repo: str, download_path: Path, filename: str, progress: bool = True)

Source from the content-addressed store, hash-verified

188
189
190def _download_from_github(repo: str, download_path: Path, filename: str, progress: bool = True) -> None:
191 repo_owner, repo_name, tag_name = repo.split("/")
192 if ".zip" not in filename:
193 filename += ".zip"
194 url = _get_git_release_url(repo_owner, repo_name, tag_name=tag_name, filename=filename)
195 filepath = download_path / f"{filename}"
196 download_url(url=url, filepath=filepath, hash_val=None, progress=progress)
197 extractall(filepath=filepath, output_dir=download_path, has_base=True)
198
199
200def _download_from_monaihosting(download_path: Path, filename: str, version: str, progress: bool) -> None:

Callers 1

downloadFunction · 0.85

Calls 4

download_urlFunction · 0.90
extractallFunction · 0.90
_get_git_release_urlFunction · 0.85
splitMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…