make_function_task_class

function of dascore.workflow.task source

make_function_task_class(
    func: Callable ,
    base: type[Task] = <class ‘dascore.workflow.task.Task’>,
    version: str = 1.0,
    inputs: int = 0,
)-> ‘type[Task]’

Return a Task subclass whose fields are a function’s parameters.

Parameters

Parameter Description
func The function the class stands for.
base The class to derive from; a patch function derives from
PatchProcessor rather than from Task itself.
version The version of the new class.
inputs How many leading parameters are not made fields. They are what the
task is given when it runs, such as the patch a patch function
operates on. None by default here, unlike the task decorator,
which takes one.