core.config.template_loader
Custom YAML loader with template and include support for jobmon logging configuration.
Classes
Custom YAML loader that supports !include and !template directives. |
Functions
|
Include another YAML file. |
|
Reference a template from the templates directory. |
|
Load all template files from the templates directory. |
|
Load a logconfig file with template support. |
|
Convenience function to load any YAML file with template support. |
Module Contents
- class core.config.template_loader.TemplateLoader(stream: Any)
Bases:
yaml.SafeLoaderCustom YAML loader that supports !include and !template directives.
Initialize TemplateLoader with a YAML stream.
- core.config.template_loader.include_constructor(loader: TemplateLoader, node: yaml.nodes.ScalarNode) Any
Include another YAML file.
- core.config.template_loader.template_constructor(loader: TemplateLoader, node: yaml.nodes.ScalarNode) Any
Reference a template from the templates directory.
- core.config.template_loader.load_all_templates(config_root: str) Dict[str, Any]
Load all template files from the templates directory.
Note: Core templates have been removed in favor of programmatic generation. This function now primarily supports user-provided templates via !include.
- core.config.template_loader.load_logconfig_with_templates(config_path: str) Dict[str, Any]
Load a logconfig file with template support.
Supports: - !include path/to/file.yaml - !template template_name - YAML merge operators (<<)
- Parameters:
config_path – Path to the main logconfig file
- Returns:
Fully resolved configuration dictionary