Skip to main content
Version: latest

agrag.candidates.patch.read_patch

read_patch(path:Path) -> SchemaPatch

Read a JSON file and validate it as a schema patch.

Parameters:

  • path (Path) – Patch file to read.

Returns:

Raises:

  • OSError – If the file cannot be read.
  • ValueError – If its contents are invalid JSON or do not match the model.