spacr.cli_repro

spacr repro — replay a pipeline run from its recorded journal.

Every pipeline invocation writes a run journal (see spacr.run_journal) containing the exact settings + environment that produced a result. This CLI re-runs those settings, opens a FRESH journal folder, and reports whether the outcome matches.

Usage:

spacr repro ~/.spacr/runs/2026-07-23_143507_ab12cd34__mask
spacr repro ~/.spacr/runs/2026-07-23_143507_ab12cd34__mask --dry
spacr repro ~/.spacr/runs/2026-07-23_143507_ab12cd34__mask --show
  • --dry prints the resolved settings + which pipeline entry will run; doesn’t invoke it.

  • --show prints the manifest + settings; doesn’t invoke it.

  • --export snakemake|nextflow --out DIR writes the run as a workflow that runs the same module once per plate with spacr-run, locally, on a cluster, or inside the spaCR Docker/Apptainer image.

Exit codes:

0 — replay ran to completion (regardless of scientific outcome) 1 — replay raised (journal captures the traceback for triage) 2 — bad input (missing run folder / unresolvable app_key)

Functions

main(→ int)

CLI entry point wired as the spacr-repro console script.

Module Contents

spacr.cli_repro.main(argv=None) → int[source]

CLI entry point wired as the spacr-repro console script.

Parameters:

argv – optional argv list; defaults to sys.argv[1:].

Returns:

process exit code.