()
| 68 | |
| 69 | |
| 70 | def _git_metadata() -> dict[str, Any]: |
| 71 | def run_git(args: list[str]) -> str | None: |
| 72 | result = subprocess.run( |
| 73 | ["git", *args], |
| 74 | cwd=REPO_ROOT, |
| 75 | capture_output=True, |
| 76 | text=True, |
| 77 | check=False, |
| 78 | ) |
| 79 | if result.returncode != 0: |
| 80 | return None |
| 81 | return result.stdout.strip() |
| 82 | |
| 83 | return { |
| 84 | "commit": run_git(["rev-parse", "--short", "HEAD"]), |
| 85 | "dirty": bool(run_git(["status", "--porcelain"])), |
| 86 | } |
| 87 | |
| 88 | |
| 89 | def _load_summary(run_dir: Path) -> dict[str, Any]: |
no test coverage detected