check

method of dascore.workflow.processor.PatchProcessor source

check(
    self ,
    patch: Patch ,
)-> ‘PatchType’

Refuse a patch which does not carry what the operation needs.

The framework does not call this, and deliberately: a registered processor is reached through its patch function, whose decorator has already run the same checks from its own declaration of them. Running them again from the class’s declaration would mean two sources of truth which can disagree in silence. register_implementation reconciles the two instead, at import.

It is still here for a hand-written run which does not go through a patch function, which has nothing else to call.

Parameters

Parameter Description
patch The patch to check.

Returns

The patch, unchanged, so the call can stand in front of the work.

Raises

PatchCoordinateError If a required dimension or coordinate is missing. PatchAttributeError If a required attr is missing, or holds a different value.