schema_attribute_validators¶
The built-in functions to validate known attributes.
Template for the functions: attribute_checker_template(hed_schema, tag_entry, attribute_name, possible_values):
hed_schema (HedSchema): The schema to use for validation tag_entry (HedSchemaEntry): The schema entry for this tag. attribute_name (str): The name of this attribute
- returns:
bool
Functions
|
Check allowed character has a valid value |
|
|
|
Check allowed character has a valid value |
|
Check if the single tag is a partnered schema tag |
|
Check if the list of possible tags exists in the schema. |
|
Check if the tag has a valid deprecatedFrom attribute, and that any children have it |
|
Check if comma separated list has valid HedTags. |
|
|
|
|
|
- allowed_characters_check(hed_schema, tag_entry, attribute_name)[source]¶
Check allowed character has a valid value
- Parameters:
hed_schema (HedSchema) – The schema to use for validation
tag_entry (HedSchemaEntry) – The schema entry for this attribute.
attribute_name (str) – The name of this attribute
- Returns:
A list of issues. Each issue is a dictionary.
- Return type:
list
- in_library_check(hed_schema, tag_entry, attribute_name)[source]¶
Check allowed character has a valid value
- Parameters:
hed_schema (HedSchema) – The schema to use for validation
tag_entry (HedSchemaEntry) – The schema entry for this attribute.
attribute_name (str) – The name of this attribute
- Returns:
A list of issues. Each issue is a dictionary.
- Return type:
list
- tag_exists_base_schema_check(hed_schema, tag_entry, attribute_name)[source]¶
Check if the single tag is a partnered schema tag
- Parameters:
hed_schema (HedSchema) – The schema to use for validation
tag_entry (HedSchemaEntry) – The schema entry for this tag.
attribute_name (str) – The name of this attribute
- Returns:
A list of issues. Each issue is a dictionary.
- Return type:
list
- tag_exists_check(hed_schema, tag_entry, attribute_name)[source]¶
Check if the list of possible tags exists in the schema.
- Parameters:
hed_schema (HedSchema) – The schema to use for validation
tag_entry (HedSchemaEntry) – The schema entry for this tag.
attribute_name (str) – The name of this attribute
- Returns:
A list of issues. Each issue is a dictionary.
- Return type:
list
- tag_is_deprecated_check(hed_schema, tag_entry, attribute_name)[source]¶
Check if the tag has a valid deprecatedFrom attribute, and that any children have it
- Parameters:
hed_schema (HedSchema) – The schema to use for validation
tag_entry (HedSchemaEntry) – The schema entry for this tag.
attribute_name (str) – The name of this attribute
- Returns:
A list of issues. Each issue is a dictionary.
- Return type:
list
- tag_is_placeholder_check(hed_schema, tag_entry, attribute_name)[source]¶
Check if comma separated list has valid HedTags.
- Parameters:
hed_schema (HedSchema) – The schema to use for validation
tag_entry (HedSchemaEntry) – The schema entry for this tag.
attribute_name (str) – The name of this attribute
- Returns:
A list of issues. Each issue is a dictionary.
- Return type:
list