ReservedChecker

class ReservedChecker[source]

Methods

ReservedChecker.__init__()

ReservedChecker.check_reserved_compatibility(...)

Check to make sure that the reserved tags can be used together and no duplicates.

ReservedChecker.check_tag_requirements(...)

Check the tag requirements within the group.

ReservedChecker.get_def_information(group, ...)

ReservedChecker.get_group_requirements(...)

Returns the maximum and minimum number of groups required for these reserved tags.

ReservedChecker.get_incompatible(tag, ...)

Return the list of tags that cannot be in the same group with tag.

ReservedChecker.get_instance()

ReservedChecker.get_reserved(group)

Attributes

ReservedChecker.reserved_reqs_path

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_def_information(group, reserved_tags)[source]
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

static ReservedChecker.get_instance()[source]
ReservedChecker.get_reserved(group)[source]
ReservedChecker.reserved_reqs_path = '/home/docs/checkouts/readthedocs.org/user_builds/hed-python/checkouts/latest/hed/validator/data/reservedTags.json'