ReservedChecker¶
- class ReservedChecker[source]
Methods
Check to make sure that the reserved tags can be used together and no duplicates. |
|
Check the tag requirements within the group. |
|
|
|
Returns the maximum and minimum number of groups required for these reserved tags. |
|
|
Return the list of tags that cannot be in the same group with tag. |
|
Attributes
- ReservedChecker.__init__()¶
- ReservedChecker.check_reserved_compatibility(group, reserved_tags)[source]¶
Check to make sure that the reserved tags can be used together and no duplicates.
- Parameters:
group (HedTagGroup) – A group to be checked.
reserved_tags (list of HedTag) – A list of reserved tags in this group.
- ReservedChecker.check_tag_requirements(group, reserved_tags)[source]¶
Check the tag requirements within the group.
- Parameters:
group (HedTagGroup) – A group to be checked.
reserved_tags (list of HedTag) – A list of reserved tags in this group.
Notes: This is only called when there are some reserved incompatible tags.
- ReservedChecker.get_group_requirements(reserved_tags)[source]¶
Returns the maximum and minimum number of groups required for these reserved tags.
- Parameters:
reserved_tags (list of HedTag) – The reserved tags to be checked.
- Returns:
tuple (max_required, min_required)
- ReservedChecker.get_incompatible(tag, reserved_tags)[source]¶
Return the list of tags that cannot be in the same group with tag.
- Parameters:
tag (HedTag) –
reserved_tags (list of HedTag) - reserved tags (no duplicates) –
- Returns:
list of HedTag
- ReservedChecker.reserved_reqs_path = '/home/docs/checkouts/readthedocs.org/user_builds/hed-python/checkouts/latest/hed/validator/data/reservedTags.json'¶