downloader#

Implements download and post-processing based on pooch.

irdl.downloader._fetch(pup: Pooch, fname: str) str#

Fetch a file from a pooch registry, displaying a Rich progress bar.

Parameters:
puppooch.Pooch

The Pooch instance managing the registry.

fnamestr

The file name to fetch (must be registered in pup).

Returns:
full_pathstr

The absolute path to the fetched file on disk.

irdl.downloader._pooch_from_doi(doi: str, path: str = PosixPath('/home/runner/.cache/irdl')) Pooch#

Create a Pooch instance from a DOI.

Parameters:
doistr

The DOI of the archive.

pathstr, optional

Path to the directory where the data should be stored. Default is IRDL_CACHE_DIR.

Returns:
puppooch.Pooch

The Pooch instance.

irdl.downloader._pooch_from_static_registry(path: str | Path, registry: Mapping[str, str | None], urls: Mapping[str, str]) Pooch#

Create a Pooch instance for direct static-file downloads.

Parameters:
pathstr or pathlib.Path

Directory where downloaded files should be stored.

registrymapping

Mapping of file names to known hashes.

urlsmapping

Mapping of file names to direct download URLs.

Returns:
puppooch.Pooch

The Pooch instance.