lir.config.util module
- class lir.config.util.TeeParser[source]
Bases:
ConfigParserParse configuration for allowing multiple tasks for given input.
- parse(config: ContextAwareDict, output_dir: Path) Any[source]
Read configuration for modules section and provide wrapped corresponding transformers.
- Parameters:
config (ContextAwareDict) – Configuration for the Tee transformer, containing a modules field with a list of module configurations.
output_dir (Path) – Output directory for the parsed modules.
- Returns:
A Tee transformer wrapping the parsed modules.
- Return type:
Any
- lir.config.util.simplify_data_structure(data: Any) dict | list | str | float | int | bool | None[source]
Simplify data structure: specialized data types are replaced.
For example, ContextAwareDict is replaced by dict.
- Parameters:
data (Any) – Input data to simplify.
- Returns:
Simplified structure containing only plain Python container and scalar types.
- Return type:
dict | list | str | float | int | bool | None