Code reference

Utilities for pooch.

Functions

doi_to_repository(doi)

Instantiate a data repository instance from a given DOI.

doi_to_url(doi)

Follow a DOI link to resolve the URL of the archive.

retry(func, check)

Retry func until check(func()) returns True.

transport_data.util.pooch.doi_to_repository(doi: str) DataRepository[source]

Instantiate a data repository instance from a given DOI.

This version differs from the upstream version in using doi_to_url() and ZenodoRepository from the current module.

transport_data.util.pooch.doi_to_url(doi: str) str[source]

Follow a DOI link to resolve the URL of the archive.

This version differs from the upstream version in only making a single request, to doi.org. The HTTP 302 (redirect) response has a “location” header that gives the resolved URL for the DOI; this is returned directly and not queried.

transport_data.util.pooch.retry(func: Callable, check: Callable)[source]

Retry func until check(func()) returns True.

Classes

DOIDownloader([progressbar, chunk_size, ...])

Pooch(base_url[, registry, urls, ...])

pooch.Pooch with special powers.

ZenodoRepository(doi, archive_url, **kwargs)

Custom version of pooch.downloaders.ZenodoRepository.