vuegen.config_manager module#
ConfigManage creates configuration files from folders and can create components for reports from YAML config files.
- class vuegen.config_manager.ConfigManager(logger: Logger | None = None, max_depth: int = 2)[source]#
Bases:
objectClass for handling metadata of reports from YAML config file and creating report objects.
- create_yamlconfig_fromdir(base_dir: str) Tuple[Dict[str, str | List[Dict]], Path][source]#
Generates a YAML-compatible config file from a directory. It also returns the resolved folder path.
- initialize_report(config: dict) tuple[Report, dict][source]#
Extracts report metadata from a YAML config file and returns a Report object and the raw metadata.
- Parameters:
config (dict) – The report metadata obtained from a YAML config file.
- Returns:
report, config – A tuple containing the Report object created from the YAML config file and the raw metadata dictionary.
- Return type:
- Raises:
FileNotFoundError – If the specified file does not exist.
ValueError – If the YAML config file is corrupted or contains missing/invalid values.