Skip to content

Audit API

AuditGameSpec

Bases: BaseModel

One game selected for a cross-season reconstruction audit.

AuditManifest

Bases: BaseModel

Versioned, reproducible list of games to audit.

AuditGameResult

Bases: BaseModel

Compact audit outcome for one game.

sample_audit_manifest(catalog, *, games_per_stratum, random_seed=0)

Deterministically sample games by season, season type, and sample group.

audit_game_payloads(spec, play_by_play_payload, boxscore_payload)

Run reconstruction and invariant checks for one manifest game.

audit_reconstruction(spec, reconstruction, boxscore_payload)

Apply audit invariants to an already reconstructed game.

run_audit_manifest(manifest, *, client, output_dir=Path('data/audit'), use_cache=True)

Fetch and audit every manifest game without writing full processed tables.

Reproducible audits over the locally retained historical raw cache.

audit_cached_history(games, *, raw_dir=Path('data/raw'), output_dir)

Audit local source-selected raw data and persist complete provenance.