plot.py produces result.svg from
collated.csv
analyze.py produces collated.csv from
samples.csv and controls.csv
Both samples.csv and controls.csv
depends on normalize.py and raw.csv, but
normalize.py takes a long time to run
How can we regenerate the files we need, but only when we need them?
[%g build_manager “Build managers” %] keep track of which files depend on which
First tool of this kind was [Make][gnu_make]
Many others now exist (e.g., [Snakemake][snakemake])
If a [%g build_target “target” %] is [%g build_stale “stale” %] with respect to any of its [%g dependency “dependencies” %], run a [%g build_recipe “recipe” %] to refresh it
Run recipes in order
Run each recipe at most once
Targets and dependencies must form a [%g dag “directed acyclic graph” %]
A [%g topological_order “topological ordering” %] of a graph arranges nodes so that each one comes after everything it depends on
[% figure slug=“build-dependencies” img=“dependencies.svg” alt=“Dependencies in a four-node graph” caption=“Dependencies and topological order” %]
[%inc double_linear_dep.json %]
[%inc build_simple.py mark=main %]
[%inc build_simple.py mark=config %]
[%inc build_simple.py mark=check %]
[% figure slug=“build-diamond” img=“diamond.svg” alt=“Representing graph” caption=“Representing dependency graph” %]
[% figure slug=“build-topo-sort” img=“topo_sort.svg” alt=“Trace of topological sorting” caption=“Topological sort” %]
[%inc build_simple.py mark=sort %]
[%inc double_linear_dep.json %] [%inc double_linear_dep.out %]
assert isn’t a friendly way to handle user errors
ValueErrordict is ordered but set is not[%inc build_better.py mark=main %]
[%inc build_better.py mark=config %]
[%inc build_better.py mark=sort %]
[%inc test_build_better.py mark=test_circular %]
[%inc test_build_better.py mark=test_no_dep %]
[%inc build_time.py mark=class %]
[%inc test_build_time.py mark=tests %]
[% figure slug=“build-concept-map” img=“concept_map.svg” alt=“Concept map of build manager” caption=“Concept map.” %]