Download a file, possibly verifying it using a hash.
This Task is the main way GWAS summary statistics are added to the build system.
Classes:
Attributes:
DownloadFileTask
Bases: Task
Methods:
Attributes:
execute
execute(
scratch_dir: Path, fetch: Fetch, wf: WF
) -> FileAsset
Source code in mecfs_bio/build_system/task/download_file_task.py
| def execute(self, scratch_dir: Path, fetch: Fetch, wf: WF) -> FileAsset:
target = scratch_dir / self.meta.asset_id
wf.download_from_url(url=self._url, local_path=target, md5_hash=self._md5_hash)
return FileAsset(target)
|