mloq.runner
Contents
mloq.runner
#
This module defines the pipeline for running a mloq command, such as config loading, template writing and interfacing with click.
Module Contents#
Functions#
|
Load the necessary configuration for running mloq from a mloq.yaml file. |
|
Write the contents of the provided record to the target path. |
|
Run the given Command class. |
- mloq.runner.load_config(config_file, hydra_args)[source]#
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.
- Parameters
config_file (Union[pathlib.Path, str]) – Path to the target mloq.yaml file.
hydra_args (str) – Arguments passed to hydra for composing the project configuration.
- Returns
DictConfig containing the project configuration.
- Return type
omegaconf.DictConfig
- mloq.runner.write_record(record, path, overwrite=False, only_config=False)[source]#
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.
- Parameters
record (mloq.record.CMDRecord) – CMDRecord containing all the data to be written.
path (Union[pathlib.Path, str]) – Target directory to write the data.
overwrite (bool) – If True overwrite existing files.
only_config (bool) – Do not write any file except mloq.yaml
- Returns
None.
- Return type
None