prism.task.PrismTask
Abstract class used to define tasks in a Prism project.
Constructor
prism.task.PrismTask
class prism.task.PrismTask(bool_run: bool = True, func: Optional[Callable[..., Any]] = None)
Parameters
bool_run: a boolean indicating whether to run the task. Default isTrue.func: optional callable that overwrites therunfunction. Default isNone.
Warning: you will never need to worry about instantiating a PrismTask class and setting bool_run / func when working with your tasks. This is all handled on the backend.
Methods
PrismTask.done() -> bool
Check if this task is already done. If this task is already done, then the task will be skipped. If not, it will be executed.
Note that if the --full-refresh option is specified, then all tasks are run from scratch (even the ones that are done).
Outputs:
Trueif the task is already done.Falseotherwise.
PrismTask.run() -> Any
Core logic for your task. This task must return a non-null output.
Outputs:
Any non-null output.
Attributes and underlying data
Last updated