(args: argparse.Namespace)
| 439 | |
| 440 | |
| 441 | def compare_runs(args: argparse.Namespace) -> int: |
| 442 | base_dir = Path(args.baseline) |
| 443 | current_dir = Path(args.current) |
| 444 | baseline, current, paths, suspicious = _comparison_data(base_dir, current_dir) |
| 445 | report = _summarize_comparison( |
| 446 | base_dir, current_dir, baseline, current, suspicious, paths |
| 447 | ) |
| 448 | report_path = current_dir / "comparison.md" |
| 449 | report_path.write_text(report) |
| 450 | print(report) |
| 451 | print(f"comparison report: {report_path}") |
| 452 | |
| 453 | if suspicious and args.fail_on_suspicious: |
| 454 | return 1 |
| 455 | return 0 |
| 456 | |
| 457 | |
| 458 | def _artifact_path(run_dir: Path, page: dict[str, Any], kind: str, suffix: str) -> Path: |
nothing calls this directly
no test coverage detected