schema_compliance

Utilities for HED schema checking.

Functions

check_compliance(hed_schema[, ...])

Check for hed3 compliance of a schema object.

check_compliance(hed_schema, check_for_warnings=True, name=None, error_handler=None)[source]

Check for hed3 compliance of a schema object.

Parameters:
  • hed_schema (HedSchema) – HedSchema object to check for hed3 compliance.

  • check_for_warnings (bool) – If True, check for formatting issues like invalid characters, capitalization, etc.

  • name (str) – If present, will use as filename for context.

  • error_handler (ErrorHandler or None) – Used to report errors. Uses a default one if none passed in.

Returns:

A list of all warnings and errors found in the file. Each issue is a dictionary.

Return type:

list

Raises:

ValueError

  • Trying to validate a HedSchemaGroup directly

Classes

SchemaValidator(hed_schema, error_handler)

Validator class to wrap some code.