SchemaValidator

class SchemaValidator(hed_schema, error_handler)[source]

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

Methods

SchemaValidator.__init__(hed_schema, ...)

SchemaValidator.check_attributes()

Returns issues from validating known attributes in all sections

SchemaValidator.check_duplicate_names()

Return issues for any duplicate names in all sections.

SchemaValidator.check_if_prerelease_version()

SchemaValidator.check_invalid_chars()

Returns issues for bad chars in terms or descriptions.

SchemaValidator.check_prologue_epilogue()

Attributes

SchemaValidator.attribute_validators

SchemaValidator.attribute_validators_old

SchemaValidator.__init__(hed_schema, error_handler)[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_if_prerelease_version()[source]
SchemaValidator.check_invalid_chars()[source]

Returns issues for bad chars in terms or descriptions.

SchemaValidator.check_prologue_epilogue()[source]
SchemaValidator.attribute_validators = {'allowedCharacter': [<function allowed_characters_check>], 'conversionFactor': [<function conversion_factor>], 'defaultUnits': [], 'deprecatedFrom': [<function tag_is_deprecated_check>], 'inLibrary': [<function in_library_check>], 'relatedTag': [], 'suggestedTag': [], 'takesValue': [<function tag_is_placeholder_check>], 'unitClass': [<function tag_is_placeholder_check>], 'valueClass': [<function tag_is_placeholder_check>]}
SchemaValidator.attribute_validators_old = {'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': [functools.partial(<function item_exists_check>, section_key=<HedSectionKey.Tags: 'tags'>)], 'suggestedTag': [functools.partial(<function item_exists_check>, section_key=<HedSectionKey.Tags: 'tags'>)], 'takesValue': [<function tag_is_placeholder_check>], 'unitClass': [<function tag_is_placeholder_check>, functools.partial(<function item_exists_check>, section_key=<HedSectionKey.UnitClasses: 'unitClasses'>)], 'valueClass': [<function tag_is_placeholder_check>, functools.partial(<function item_exists_check>, section_key=<HedSectionKey.ValueClasses: 'valueClasses'>)]}