import dascore as dc
from dascore.utils.patch import get_patch_kind
patch = dc.get_example_patch()
kind = get_patch_kind(patch)
assert kind["tag"] == patch.attrs.tag
assert kind["acquisition_key"] is None # not setget_patch_kind
get_patch_kind(
patch: Patch | PatchAttrs ,
)-> ‘FrozenDict’
Return the attribute values which decide what kind of patch this is.
The attribute names come from the config option patch_kind_attrs. A name the patch lacks, or holds a null or empty string for, maps to None: an attribute left at its empty default is the same as no attribute, which is also how spool metadata records it. check_kind decides what None then compares equal to.
Parameters
| Parameter | Description |
|---|---|
| patch | A patch or its attrs. |