feat(lab): seal M4.8R3 occupancy shadows
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Seal a complete M4.8R3 Worker shadow against the accepted native baseline."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import argparse
|
||||
import json
|
||||
from pathlib import Path
|
||||
|
||||
from k1link.laboratory.m48r3_static_occupancy_shadow import (
|
||||
M48R3StaticOccupancyShadowError,
|
||||
build_m48r3_static_occupancy_shadow,
|
||||
)
|
||||
|
||||
|
||||
def main() -> int:
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument("--repository-root", type=Path, required=True)
|
||||
parser.add_argument("--profile", type=Path, required=True)
|
||||
parser.add_argument("--baseline-result", type=Path, required=True)
|
||||
parser.add_argument("--baseline-frames", type=Path, required=True)
|
||||
parser.add_argument("--candidate-result", type=Path, required=True)
|
||||
parser.add_argument("--candidate-frames", type=Path, required=True)
|
||||
parser.add_argument("--m48r2-result-root", type=Path, required=True)
|
||||
parser.add_argument("--output-root", type=Path, required=True)
|
||||
arguments = parser.parse_args()
|
||||
try:
|
||||
result = build_m48r3_static_occupancy_shadow(
|
||||
repository_root=arguments.repository_root,
|
||||
profile_path=arguments.profile,
|
||||
baseline_result_path=arguments.baseline_result,
|
||||
baseline_frames_path=arguments.baseline_frames,
|
||||
candidate_result_path=arguments.candidate_result,
|
||||
candidate_frames_path=arguments.candidate_frames,
|
||||
m48r2_result_root=arguments.m48r2_result_root,
|
||||
output_root=arguments.output_root,
|
||||
)
|
||||
except (M48R3StaticOccupancyShadowError, OSError, ValueError) as exc:
|
||||
parser.error(str(exc))
|
||||
print(
|
||||
json.dumps(
|
||||
{
|
||||
"result_id": result.result_id,
|
||||
"result_root": str(result.result_root),
|
||||
"accepted": result.manifest["accepted"],
|
||||
"gates": result.report["gates"],
|
||||
},
|
||||
ensure_ascii=False,
|
||||
indent=2,
|
||||
sort_keys=True,
|
||||
)
|
||||
)
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
raise SystemExit(main())
|
||||
Reference in New Issue
Block a user