Task to get a file from synapse.org, a scientific data repository.
Classes:
Attributes:
logger
module-attribute
logger = structlog.getLogger()
GetFileFromSynapseTask
Bases: Task
Task to get a file from synapse.org (see: https://docs.synapse.org/synapse-docs/faq)
May require authentication. See Getting Started.
Methods:
Attributes:
expected_filename
instance-attribute
execute
execute(scratch_dir: Path, fetch: Fetch, wf: WF) -> Asset
Source code in mecfs_bio/build_system/task/get_file_from_synapse_task.py
| def execute(self, scratch_dir: Path, fetch: Fetch, wf: WF) -> Asset:
path = wf.download_from_synapse(self.synid, scratch_dir, self.expected_filename)
logger.debug(f"downloaded: {path}")
return FileAsset(path)
|