nmk.model.builder¶
nmk task builder definition module
Classes¶
Task builder base class |
Module Contents¶
- class nmk.model.builder.NmkTaskBuilder(model: nmk.model.model.NmkModel)¶
Bases:
abc.ABCTask builder base class
- Parameters:
model – nmk model instance
- task: nmk.model.task.NmkTask = None¶
Associated task instance
- logger: nmk.logs.NmkLogWrapper = None¶
Logger for this builder
- model¶
nmk model instance
- update_task(task: nmk.model.task.NmkTask)¶
Task instance setter
- Parameters:
task – task instance
- update_logger(logger: nmk.logs.NmkLogWrapper)¶
Logger instance setter
- Parameters:
logger – logger instance
- abstractmethod build()¶
Build method; invoked when task is executed. Shall be overridden by sub-classes
- property inputs: list[pathlib.Path]¶
List of task input paths
- property outputs: list[pathlib.Path]¶
List of task output paths
- property main_input: pathlib.Path¶
Path to main input (first input of the list)
- property main_output: pathlib.Path¶
Path to main output (first output of the list)
- allow_missing_input(missing_input: pathlib.Path) bool¶
This builder method will be called to check if the implementation allows for a given input to be missing (sometimes, the task builder implementation may have conditional behavior WRT. if a given input exists or not).
Default implementation is that all inputs are mandatory (always return False)
- Parameters:
missing_input – path to missing input