Skip to content
Docs menu

Automation: one command, locked and seeded

Automation removes manual work when you or others repeat the workflow: one command, locked versions, fetched inputs and recorded seeds. It is assessed beside the level and is not a step toward L3.

Last updated

Automation findings sit beside the level. The level stays where Materials and Documentation put it.
Level relationshipSeparate from the level

One command produces the results

What counts
Common gaps
How to fix
Makefile
.PHONY: all data smoke
all: data results/table1.csv results/figure2.pdf

data:
	bash scripts/get_data.sh

results/table1.csv: data
	python -m analysis.table1 --out $@

results/figure2.pdf: results/table1.csv analysis/figure2.R
	Rscript analysis/figure2.R

smoke:
	python -m analysis.table1 --subsample 0.01 --out /tmp/table1_smoke.csv

The software environment is pinned

What counts
Common gaps
How to fix
bash
# Python: lock every direct and indirect version in uv.lock
uv lock

# R: record the R version and every package version in renv.lock
Rscript -e 'renv::snapshot()'

Input retrieval is automated

What counts
Common gaps
How to fix
bash
#!/usr/bin/env bash
# scripts/get_data.sh: fetch and verify every open input
set -euo pipefail
mkdir -p data/raw
curl -fL -o data/raw/counts.csv.gz \
  "https://zenodo.org/records/0000000/files/counts.csv.gz"
sha256sum -c data/checksums.sha256

Random seeds and variability are controlled

What counts
Common gaps
How to fix
python
import argparse, random
import numpy as np
import torch

parser = argparse.ArgumentParser()
parser.add_argument("--seed", type=int, default=0)
args = parser.parse_args()

random.seed(args.seed)
np.random.seed(args.seed)
torch.manual_seed(args.seed)
torch.use_deterministic_algorithms(True)  # error on nondeterministic ops

Tests and notebooks

What counts
Common gaps
How to fix

See where your project stands

Run the analysis on your paper or repository. Every finding names its area and links back here.