pnpl.datasets.mixins.RadboudDownloadMixin#
- class pnpl.datasets.mixins.RadboudDownloadMixin[source]#
Mixin providing WebDAV-backed download from the Radboud Data Repository.
Classes using this mixin should define: -
RADBOUD_DATASET_URL: str — full WebDAV URL of the dataset root,e.g.
"https://webdav.data.ru.nl/dccn/DSC_3011085.05_995_v1/".Optional class-level overrides: -
RADBOUD_USERNAME_ENV(default"RADBOUD_USERNAME") -RADBOUD_PASSWORD_ENV(default"RADBOUD_PASSWORD")Expected instance attributes: -
data_path: str — local directory; remote paths are mappedrelative to this.
download: bool — whether downloading is enabled.
- __init__()#
Methods
__init__()ensure_directory(dpath)Recursively download a remote directory to
dpath.ensure_file(fpath)Ensure a file exists locally, downloading via WebDAV if needed.
prefetch_files(file_paths)Prefetch multiple files in parallel (skips already-present).
resolve_remote_file(rel_path)Return
{"size", "is_collection", "url"}for a remote path, without listing siblings or descendants.Attributes
RADBOUD_DATASET_URLRADBOUD_PASSWORD_ENVRADBOUD_USERNAME_ENV