assets_guardian.core.reporting.excel.default_builder๏
Classes
|
Default transverse Excel sheet builder. |
- class assets_guardian.core.reporting.excel.default_builder.DefaultSheetBuilder(employees_file_path: str | Path | None, rules_file_path: str | Path | None, author: str | None = None)[source]๏
Bases:
ISheetBuilderDefault transverse Excel sheet builder.
Handles building standard core application sheets (Access Review Scope List, Employees list) independently of plugins.
Initializes the default transverse sheet builder.
- Parameters:
employees_file_path โ Path to the JSON file containing the employee list.
rules_file_path โ Path to the JSON Excel rules configuration file.
author โ Full name of the audit author.
- build(worksheet: Any, data: Any, preserved: Any, rules: Any) None[source]๏
Builds the requested sheet based on its name.
- Parameters:
worksheet โ The Excel worksheet currently being written (ExcelWorksheet).
data โ Structured collected results.
preserved โ Preserved data.
rules โ Formatting rules for the current sheet.
- get_rules() dict[str, Any][source]๏
Loads and returns global formatting and validation rules.
- Returns:
A dictionary containing validation rules for transverse sheets.
- Return type:
dict[str, Any]
- property preserved_columns: dict[str, dict[str, list[str]]]๏
Defines columns to preserve for default sheets.
- Returns:
- An empty dict since no columns
need to be preserved for these sheets.
- Return type:
dict[str, dict[str, list[str]]]
- property sheet_names: list[str]๏
Returns the list of default sheets defined in the rules file.
- Returns:
The list of transverse sheet names to create.
- Return type:
list[str]