#!/usr/bin/env python3 """Regenerate the mathematical data and run the accompanying identities.""" from __future__ import annotations from pathlib import Path import subprocess import sys ROOT = Path(__file__).resolve().parents[1] def main() -> int: for name in ('coefficients.py', 'covariance.py', 'numerics.py'): command = [sys.executable, str(ROOT/'code'/name)] result = subprocess.run(command, cwd=ROOT, check=False) if result.returncode: print(f"Calculation failed in code/{name}.", file=sys.stderr) return result.returncode print("All calculations completed successfully.") return 0 if __name__ == '__main__': raise SystemExit(main())