Skip to content

mecfs_bio.build_system.task.download_file_task

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:

logger module-attribute

logger = get_logger()

DownloadFileTask

Bases: Task

Methods:

Attributes:

deps property

deps: list[Task]

meta property

meta: Meta

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)