#!/usr/bin/env python3 """Run the full pipeline end-to-end.""" import argparse import subprocess import sys ap = argparse.ArgumentParser() ap.add_argument("--congress", type=int, default=119) ap.add_argument("--skip-fetch", action="store_true") ap.add_argument("--skip-enrich", action="store_true") args = ap.parse_args() C = str(args.congress) steps = [] if not args.skip_fetch: steps.append(["python3", "fetch.py", "--congress", C]) steps.append(["python3", "parse.py", "--congress", C]) if not args.skip_enrich: steps.append(["python3", "enrich_roster.py", "--congress", C]) steps.append(["python3", "parse.py", "--congress", C]) # re-parse to merge enriched roster steps.append(["python3", "-m", "pytest", "tests/", "-q"]) steps.append(["python3", "build_members.py", "--congress", C]) steps.append(["python3", "build_app.py", "--congress", C]) for s in steps: print("==>", " ".join(s)) r = subprocess.run(s) if r.returncode != 0: sys.exit(r.returncode) print("build_all: done")