Skip to content

mecfs_bio.build_system.task.counting_task

For testing purposes, recording the number of times that a wrapped task has been executed.

Classes:

  • CountingTask

    For testing. Records the number of times a task has been executed

CountingTask

Bases: GeneratingTask

For testing. Records the number of times a task has been executed

Methods:

Attributes:

deps property

deps: list[Task]

meta property

meta: Meta

run_count class-attribute instance-attribute

run_count: int = 0

wrapped instance-attribute

wrapped: Task

execute

execute(scratch_dir: Path, fetch: Fetch, wf: WF) -> Asset
Source code in mecfs_bio/build_system/task/counting_task.py
def execute(self, scratch_dir: Path, fetch: Fetch, wf: WF) -> Asset:
    self.run_count += 1
    return self.wrapped.execute(scratch_dir, fetch, wf)