nmk.model.builder ================= .. py:module:: nmk.model.builder .. autoapi-nested-parse:: nmk task builder definition module Classes ------- .. autoapisummary:: nmk.model.builder.NmkTaskBuilder Module Contents --------------- .. py:class:: NmkTaskBuilder(model: nmk.model.model.NmkModel) Bases: :py:obj:`abc.ABC` Task builder base class :param model: nmk model instance .. py:attribute:: task :type: nmk.model.task.NmkTask :value: None Associated task instance .. py:attribute:: logger :type: nmk.logs.NmkLogWrapper :value: None Logger for this builder .. py:attribute:: model nmk model instance .. py:method:: update_task(task: nmk.model.task.NmkTask) Task instance setter :param task: task instance .. py:method:: update_logger(logger: nmk.logs.NmkLogWrapper) Logger instance setter :param logger: logger instance .. py:method:: build() :abstractmethod: Build method; invoked when task is executed. Shall be overridden by sub-classes .. py:property:: inputs :type: list[pathlib.Path] List of task input paths .. py:property:: outputs :type: list[pathlib.Path] List of task output paths .. py:property:: main_input :type: pathlib.Path Path to main input (first input of the list) .. py:property:: main_output :type: pathlib.Path Path to main output (first output of the list) .. py:method:: 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) :param missing_input: path to missing input