"""Admit a reviewed full map as the physical session's operator/LAB default. Explicit offline maintenance command; no solver, no device commands, no new catalog session and no change to raw capture or already pinned studies. """ import argparse from pathlib import Path from package_recorded_map_version import RecordedParent from k1link.reconstruction.map_version import MapVersion from k1link.reconstruction.session_versions import SessionMapVersions def main(): parser = argparse.ArgumentParser(description=__doc__) parser.add_argument("--version", type=Path, required=True) parser.add_argument("--raw", type=Path, required=True) parser.add_argument("--data-dir", type=Path, required=True) args = parser.parse_args() version = MapVersion(args.version, args.version.name) parent = version.document["source"] original = RecordedParent(args.raw, parent["session_id"], parent["generation"]) admitted = SessionMapVersions(args.data_dir).activate(version, original) print( f"Session: {parent['session_id']}\nDefault map: {admitted.generation}\n" "Uses: recorded playback, laboratory reference. Vehicle control: false." ) if __name__ == "__main__": main()