check_patch_attrs

function of dascore.workflow.checks source

check_patch_attrs(
    patch: Patch ,
    required_attrs: dict[dict[str, Any], str, collections.abc.Sequence[str], None] ,
)-> ‘PatchType’

Check for expected attributes.

Parameters

Parameter Description
patch The patch to validate
required_attrs The expected attrs. Can be a name, a sequence of them, or a mapping.
If a mapping, also check that the values are equal.

Raises

PatchAttributeError If the patch is missing any of them, or holds a different value.