PatchOp

class of dascore.workflow.processor
inherits from: Task, DascoreBaseModel, pydantic.main.BaseModel
source

PatchOp(
    name: str ,
    kwargs: dict[str, Any] = ,
    version: str = ““,
    module: str =”“,
)-> None

Any patch function, as a task.

Parameters

Parameter Description
name What the operation is called on a patch. A dotted name walks a
namespace, so a plugin’s function is "myplugin.denoise".
kwargs The arguments the operation was given, bound against its signature,
so that two spellings of one call are one mapping.

Examples

import dascore as dc
from dascore.workflow import PatchOp

patch = dc.get_example_patch()
op = PatchOp(name="pass_filter", kwargs={"time": (10, 100)})
assert op(patch).equals(patch.pass_filter(time=(10, 100)))

Methods

Name Description
from_call Return the operation a call to a patch function is.
fingerprint_at Return the fingerprint this operation has.
new Create new instance with some attributed updated.
run Run the operation against a patch.
save Write this task to a file, and return where it was written.
to_dict Return a document which describes this task.
update Return a new task with some parameters changed.