File size: 743 Bytes
04bd3b9 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | #!/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()
|