Skip to content

mecfs_bio.build_system.wf.base_wf

Classes:

RobustDownloadWF

Bases: WF

Methods:

download_from_url

download_from_url(
    url: str, local_path: Path, md5_hash: str | None
) -> None
Source code in mecfs_bio/build_system/wf/base_wf.py
def download_from_url(
    self, url: str, local_path: Path, md5_hash: str | None
) -> None:
    robust_download_with_aria(
        md5sum=md5_hash,
        url=url,
        dest=local_path,
    )

SimpleWF

Bases: WF

Methods:

download_from_url

download_from_url(
    url: str, local_path: Path, md5_hash: str | None
) -> None
Source code in mecfs_bio/build_system/wf/base_wf.py
def download_from_url(
    self, url: str, local_path: Path, md5_hash: str | None
) -> None:
    # py3_wget attempts to read the whole file to check md5.  doesn't work for large files.  So implement my own check
    py3_wget.download_file(
        url=url,
        output_path=local_path,
    )
    verify_hash(
        downloaded_file=local_path,
        expected_hash=md5_hash,
    )

WF

Bases: ABC

An interface to the external world. Currently only used for downloading files. May be extended in the future .

Methods:

download_from_url

download_from_url(
    url: str, local_path: Path, md5_hash: str | None
) -> None
Source code in mecfs_bio/build_system/wf/base_wf.py
def download_from_url(
    self, url: str, local_path: Path, md5_hash: str | None
) -> None:
    pass