feat(perception): canonicalize metric geometry

This commit is contained in:
DCCONSTRUCTIONS
2026-08-05 16:56:17 +03:00
parent b1f9957317
commit 3ecbe3fb21
11 changed files with 2514 additions and 3 deletions
+21
View File
@@ -33,6 +33,15 @@ DETECTOR_RUNTIME_MODULES = (
"recorded_source.py",
"yolox_object_detector.py",
)
GEOMETRY_RUNTIME_MODULES = (
"contracts.py",
"geometry.py",
"geometry_math.py",
"geometry_replay.py",
"geometry_replay_cli.py",
"providers.py",
"recorded_source.py",
)
def _imports(path: Path) -> set[str]:
@@ -181,6 +190,18 @@ def test_detector_runtime_closure_imports_no_legacy_compute_package() -> None:
assert {name: modules for name, modules in violations.items() if modules} == {}
def test_geometry_runtime_closure_imports_no_legacy_compute_or_device_package() -> None:
violations = {
name: sorted(
module
for module in _imports(PERCEPTION_ROOT / name)
if module.startswith(("k1link.compute", "k1link.device_plugins"))
)
for name in GEOMETRY_RUNTIME_MODULES
}
assert {name: modules for name, modules in violations.items() if modules} == {}
def test_new_perception_boundary_has_no_experiment_specific_imports() -> None:
violations: dict[str, str] = {}
for path in PERCEPTION_ROOT.glob("*.py"):