fingerprint_call

function of dascore.workflow.processor source

fingerprint_call(
    func ,
    args: <class ‘tuple = (),
    kwargs: dict | None[<class ’dict, None] = None,
)-> ’str’

Return the digest which identifies one call to a patch function.

The same digest the PatchOp for that call carries, so a call made as a method and the same call made as a task are one operation.

Parameters

Parameter Description
func The patch function, as decorated.
args The positional arguments of the call, without the patch.
kwargs The keyword arguments of the call.

Examples

import dascore as dc
from dascore.workflow import fingerprint_call

called = fingerprint_call(dc.proc.normalize, (), {"dim": "time"})
assert called == dc.proc.normalize.op(dim="time").fingerprint