easyidp.data.dataset.Dataset¶
- class easyidp.data.dataset.Dataset(manifest_name, cache_root=None, notify_missing=True)¶
EasyIDP dataset backed by a JSON manifest.
- Parameters:
manifest_name (str) – Name of the JSON manifest without extension (e.g.
"lotus").cache_root (Path or str, optional) – Root directory for cached datasets. Defaults to the value returned by
easyidp.config.get("data_dir")().notify_missing (bool, optional) – Retained for backward compatibility only; no longer logs warnings.
Examples
>>> dataset = Dataset("lotus") >>> dataset.name 'lotus' >>> dataset.path("shp").name 'plots.shp'
- __init__(manifest_name, cache_root=None, notify_missing=True)¶
Methods
__init__(manifest_name[, cache_root, ...])download([mirror, force, progress])Download this dataset to cache_root.
dry_run()Return a JSON-friendly summary dict without touching the network.
is_ready()Return
Truewhen every ready_check file exists on disk.path(key)Return the absolute
Pathfor a dotted file key.Attributes
- download(mirror='auto', force=False, progress=True)¶
Download this dataset to cache_root.
- Parameters:
mirror (str, optional) – Mirror name or
"auto"(default) to pick the first available.force (bool, optional) – Re-download even if the dataset is ready.
progress (bool, optional) – Show a progress bar during download.
- dry_run()¶
Return a JSON-friendly summary dict without touching the network.
- Returns:
Summary with keys
name,description,root,ready,needs_download,size_bytes,missing. All path values are plain strings.- Return type:
dict
- is_ready()¶
Return
Truewhen every ready_check file exists on disk.If no
ready_checklist is present, all files are checked.
- property name¶
Dataset manifest name.
- path(key)¶
Return the absolute
Pathfor a dotted file key.- Parameters:
key (str) – Dotted file key (e.g.
"metashape.project").- Returns:
Absolute path.
- Return type:
Path
- property root¶
Extracted dataset directory.