spb/firc0001_uqo
Public
1#!/usr/bin/env bash2# Single entry point of the replication package (protocol Part IX).3# ./run_all.sh exhibits + tests + paper from the committed data/ exports (laptop, ~1 min)4# ./run_all.sh --with-node additionally regenerates data/ from the two DuckDB files (master node M3U96b, read-only)5# ./run_all.sh --with-audit additionally runs the Stage D read-only audits (code/audit/run_all.sh, node)6# Raw filings, the DuckDB files and the LLM extraction are never rebuilt here (see docs/DATA_AVAILABILITY.md).7set -euo pipefail8cd "$(dirname "$0")"9export OMP_NUM_THREADS=${OMP_NUM_THREADS:-4}10REPO=${REPO:-$HOME/UQO_RESEARCH_DB}11PY=${PY:-python3}1213for arg in "$@"; do14 case "$arg" in15 --with-node)16 echo "== export_stats.py (read-only DuckDB, threads=4) -> data/"17 nice -n 10 "$REPO/.venv/bin/python" -I code/export_stats.py "$REPO" data/ ;;18 --with-audit)19 echo "== Stage D audits -> results/"20 nice -n 10 bash code/audit/run_all.sh ;;21 *) echo "unknown option $arg" >&2; exit 2 ;;22 esac23done2425echo "== make_tables.py -> paper/tables, paper/figures, paper/tables/numbers.tex, results/inline_numbers.json"26nice -n 10 "$PY" -I code/make_tables.py2728echo "== tests"29nice -n 10 "$PY" -I -m pytest -q tests3031echo "== paper"32( cd paper && nice -n 10 latexmk -pdf -interaction=nonstopmode main.tex > /dev/null && grep -c '^!' main.log || true )33echo "done: paper/main.pdf"34