MCPcopy Create free account
hub / github.com/SZAILAB/MaterialDFT-Demo / _validate_schema

Function _validate_schema

scripts/run_eval_bridge.py:714–720  ·  view source on GitHub ↗
(manifest: dict[str, Any], validator: Draft202012Validator)

Source from the content-addressed store, hash-verified

712
713
714def _validate_schema(manifest: dict[str, Any], validator: Draft202012Validator) -> tuple[bool, str]:
715 errors = sorted(validator.iter_errors(manifest), key=lambda e: list(e.path))
716 if not errors:
717 return True, "ok"
718 first = errors[0]
719 path = "/".join(str(x) for x in first.path)
720 return False, f"/{path}: {first.message}"
721
722
723def main() -> int:

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected