| #!/usr/bin/env python3 | |
| """Prepare the strict exact-only Source Atlas relational contract.""" | |
| from __future__ import annotations | |
| import argparse | |
| import json | |
| from pathlib import Path | |
| from mitointeract_recovery.source_atlas import prepare_source_atlas | |
| def main() -> None: | |
| parser = argparse.ArgumentParser() | |
| parser.add_argument("--source-records", type=Path, required=True) | |
| parser.add_argument("--output-dir", type=Path, required=True) | |
| args = parser.parse_args() | |
| if not args.source_records.is_file(): | |
| raise FileNotFoundError(args.source_records) | |
| report = prepare_source_atlas(args.source_records, args.output_dir) | |
| print(json.dumps(report, indent=2, sort_keys=True)) | |
| if __name__ == "__main__": | |
| main() | |