run_all.py — src/32-dark

The file src/32-dark/run_all.py of the validation package of the paper 32-dark, rendered with an anchor per line; the file itself is beside this page.

32-dark ledgersrc/32-dark/run_all.py · 1.5 KBrun_all.py
1"""2run_all.py — the 32-dark validation package, end to end3=======================================================4Runs the thirteen scripts through the registry (darkcommon), writes results.json — one record per family, carrying5the paper's ledger row(s) it witnesses — and exits nonzero if any family fails. Python ≥ 3.10 with numpy, mpmath and6matplotlib (scipy for the exponential-disk curve of deep_mond); ≈ 30 s. The scripts write their figures and7deep.json into out/, the paper's two figures into figures/.89    python3 run_all.py1011Families (one per script, in the README's order):12    flux_exact born_exact firstpassage_finite meridian_walk | deep_regime deep_regime_fp | interpolation rar_shape deep_mond13    | rar_scatter cluster_coherent predictions | make_figures14"""15import sys, time16import darkcommon1718FAMILIES = ["dark." + s for s in [19    "flux_exact", "born_exact", "firstpassage_finite", "meridian_walk",20    "deep_regime", "deep_regime_fp",21    "interpolation", "rar_shape", "deep_mond",22    "rar_scatter", "cluster_coherent", "predictions",23    "make_figures"]]2425def main():26    t0 = time.time()27    for fam in FAMILIES:28        print(f"\n— {darkcommon.script_of(fam)}.py")29        darkcommon.run_block(fam)30    ok = darkcommon.summary(write=True)31    print(f"{len(darkcommon.RESULTS)} families, {len(darkcommon.MICRO)} micro-checks, {time.time() - t0:.0f} s; results.json written")32    sys.exit(0 if ok else 1)3334if __name__ == "__main__":35    main()36