fingerprint_call

function of dascore.utils.patch_registry 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.

Positional and keyword spellings of one call bind alike, so they are one operation with one fingerprint.

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.utils.patch_registry import fingerprint_call

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