:py:mod:`mloq.runner` ===================== .. py:module:: mloq.runner .. autoapi-nested-parse:: This module defines the pipeline for running a mloq command, such as config loading, template writing and interfacing with click. Module Contents --------------- Functions ~~~~~~~~~ .. autoapisummary:: mloq.runner.load_config mloq.runner.write_record mloq.runner.run_command .. py:function:: load_config(config_file, hydra_args) Load the necessary configuration for running mloq from a mloq.yaml file. If no path to mloq.yaml is provided, it returns a template to be filled in using the interactive mode. :param config_file: Path to the target mloq.yaml file. :param hydra_args: Arguments passed to hydra for composing the project configuration. :returns: DictConfig containing the project configuration. .. py:function:: write_record(record, path, overwrite = False, only_config = False) Write the contents of the provided record to the target path. The writing process is performed by :class: `Writer`, class that fills in rendered templates according to the given configuration. :param record: CMDRecord containing all the data to be written. :param path: Target directory to write the data. :param overwrite: If True overwrite existing files. :param only_config: Do not write any file except mloq.yaml :returns: None. .. py:function:: run_command(cmd_cls, use_click = True) Run the given Command class. :param cmd_cls: Command to be executed. :param use_click: If True run the function as a "cli" command. :returns: A function that will run the target class as a mloq command.