File size: 906 Bytes
10ed3aa | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | #!/usr/bin/env python3
"""Validate v1.1 HOT3D views with the new reader; strict about missing media by default."""
import argparse
import json
from pathlib import Path
import torch
from hot3d_bundle import audit_view
def main():
p=argparse.ArgumentParser(description=__doc__);p.add_argument('view',type=Path)
p.add_argument('--schema',type=Path,default=Path(__file__).resolve().parents[1]/'doc/schema.json')
p.add_argument('--source',type=Path,help='matching v1.0 view for exact numeric/metadata comparison')
p.add_argument('--numerical-only',action='store_true',help='explicitly allow absent unchanged media/assets (NOT release approval)')
a=p.parse_args();torch.set_num_threads(1)
print(json.dumps(audit_view(a.view,json.loads(a.schema.read_text()),source=a.source,
require_media=not a.numerical_only),indent=2))
if __name__=='__main__':main()
|