tessl install tessl/pypi-luigi@2.8.0Python workflow management framework for building complex pipelines of batch jobs with dependency resolution and task scheduling.
Agent Success
Agent success rate when using this tile
72%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.31x
Baseline
Agent success rate without this tile
55%
Design a file-based workflow that derives summary metrics from numeric input by composing multiple dependent stages.
[5, -2, 5, 10, 0], running the workflow writes a seeded input file, a cleaned numbers file containing unique non-negative integers sorted ascending ([5, 10] as JSON), a metrics file with count, sum, and average for the cleaned numbers ({"count": 2, "sum": 15, "average": 7.5}), and a final report JSON combining the cleaned numbers and metrics under "numbers" and "metrics" keys. @testrun_workflow returns absolute paths for "seed", "clean", "metrics", and "report" entries that point to the files produced during execution. @test@generates
from pathlib import Path
from typing import Iterable, Mapping
def run_workflow(numbers: Iterable[int], work_dir: Path) -> Mapping[str, Path]:
"""
Orchestrates a multi-stage pipeline that writes:
- a seeded input file with the provided numbers,
- a cleaned numbers file containing only unique, non-negative integers sorted ascending,
- a metrics file with count, sum, and average for the cleaned numbers,
- a final report combining cleaned numbers and metrics.
The work_dir is used for all task outputs. Returns mapping keys:
\"seed\", \"clean\", \"metrics\", \"report\" pointing to the produced files.
"""
...Provides task definitions, scheduling, and dependency resolution for the workflow.