SchemaValidator

class SchemaValidator(hed_schema, check_for_warnings=True, error_handler=None)[source]

Validator class to wrap some code. In general, just call check_compliance.

Methods

hed.schema.schema_compliance.SchemaValidator.__init__(...)

hed.schema.schema_compliance.SchemaValidator.check_attributes()

Returns issues from validating known attributes in all sections

hed.schema.schema_compliance.SchemaValidator.check_duplicate_names()

Return issues for any duplicate names in all sections.

hed.schema.schema_compliance.SchemaValidator.check_invalid_chars()

Returns issues for bad chars in terms or descriptions.

hed.schema.schema_compliance.SchemaValidator.check_unknown_attributes()

Returns issues for any unknown attributes in any section

Attributes

hed.schema.schema_compliance.SchemaValidator.attribute_validators

SchemaValidator.__init__(hed_schema, check_for_warnings=True, error_handler=None)[source]
SchemaValidator.check_attributes()[source]

Returns issues from validating known attributes in all sections

SchemaValidator.check_duplicate_names()[source]

Return issues for any duplicate names in all sections.

SchemaValidator.check_invalid_chars()[source]

Returns issues for bad chars in terms or descriptions.

SchemaValidator.check_unknown_attributes()[source]

Returns issues for any unknown attributes in any section

SchemaValidator.attribute_validators = {'allowedCharacter': [<function allowed_characters_check>], 'conversionFactor': [<function conversion_factor>], 'defaultUnits': [<function unit_exists>], 'deprecatedFrom': [<function tag_is_deprecated_check>], 'inLibrary': [<function in_library_check>], 'relatedTag': [<function tag_exists_check>], 'suggestedTag': [<function tag_exists_check>], 'takesValue': [<function tag_is_placeholder_check>], 'unitClass': [<function tag_is_placeholder_check>, <function unit_class_exists>], 'valueClass': [<function tag_is_placeholder_check>, <function value_class_exists>]}