nourish.dataset.Dataset.download¶
-
Dataset.download(check=True)¶ Downloads, extracts, and removes dataset archive. It adds a directory write lock during execution.
- Parameters
check (bool) – Check to make sure the data files are not already present in
_data_dir(passed in viadata_dirin the constructorDataset) by runningis_downloaded(). If set toTrue, raise an error if they are present and prevent a subsequent download. Set toFalseto remove this safeguard, and subsequent calls todownload()will then overwrite data files if they were previously downloaded to_data_dir.- Raises
RuntimeError – The dataset was previously downloaded as indicated by
is_downloaded()returningTrue.NotADirectoryError –
Dataset._data_dir(passed in viadata_dirin the constructorDataset) points to an existing file that is not a directory.OSError – The SHA512 checksum of a downloaded dataset doesn’t match the expected checksum.
exceptions.DirectoryLockAcquisitionError – Failed to acquire the directory lock.
- Return type