runbooks 1.1.3__py3-none-any.whl → 1.1.5__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (247) hide show
  1. runbooks/__init__.py +31 -2
  2. runbooks/__init___optimized.py +18 -4
  3. runbooks/_platform/__init__.py +1 -5
  4. runbooks/_platform/core/runbooks_wrapper.py +141 -138
  5. runbooks/aws2/accuracy_validator.py +812 -0
  6. runbooks/base.py +7 -0
  7. runbooks/cfat/WEIGHT_CONFIG_README.md +1 -1
  8. runbooks/cfat/assessment/compliance.py +8 -8
  9. runbooks/cfat/assessment/runner.py +1 -0
  10. runbooks/cfat/cloud_foundations_assessment.py +227 -239
  11. runbooks/cfat/models.py +6 -2
  12. runbooks/cfat/tests/__init__.py +6 -1
  13. runbooks/cli/__init__.py +13 -0
  14. runbooks/cli/commands/cfat.py +274 -0
  15. runbooks/cli/commands/finops.py +1164 -0
  16. runbooks/cli/commands/inventory.py +379 -0
  17. runbooks/cli/commands/operate.py +239 -0
  18. runbooks/cli/commands/security.py +248 -0
  19. runbooks/cli/commands/validation.py +825 -0
  20. runbooks/cli/commands/vpc.py +310 -0
  21. runbooks/cli/registry.py +107 -0
  22. runbooks/cloudops/__init__.py +23 -30
  23. runbooks/cloudops/base.py +96 -107
  24. runbooks/cloudops/cost_optimizer.py +549 -547
  25. runbooks/cloudops/infrastructure_optimizer.py +5 -4
  26. runbooks/cloudops/interfaces.py +226 -227
  27. runbooks/cloudops/lifecycle_manager.py +5 -4
  28. runbooks/cloudops/mcp_cost_validation.py +252 -235
  29. runbooks/cloudops/models.py +78 -53
  30. runbooks/cloudops/monitoring_automation.py +5 -4
  31. runbooks/cloudops/notebook_framework.py +179 -215
  32. runbooks/cloudops/security_enforcer.py +125 -159
  33. runbooks/common/accuracy_validator.py +11 -0
  34. runbooks/common/aws_pricing.py +349 -326
  35. runbooks/common/aws_pricing_api.py +211 -212
  36. runbooks/common/aws_profile_manager.py +341 -0
  37. runbooks/common/aws_utils.py +75 -80
  38. runbooks/common/business_logic.py +127 -105
  39. runbooks/common/cli_decorators.py +36 -60
  40. runbooks/common/comprehensive_cost_explorer_integration.py +456 -464
  41. runbooks/common/cross_account_manager.py +198 -205
  42. runbooks/common/date_utils.py +27 -39
  43. runbooks/common/decorators.py +235 -0
  44. runbooks/common/dry_run_examples.py +173 -208
  45. runbooks/common/dry_run_framework.py +157 -155
  46. runbooks/common/enhanced_exception_handler.py +15 -4
  47. runbooks/common/enhanced_logging_example.py +50 -64
  48. runbooks/common/enhanced_logging_integration_example.py +65 -37
  49. runbooks/common/env_utils.py +16 -16
  50. runbooks/common/error_handling.py +40 -38
  51. runbooks/common/lazy_loader.py +41 -23
  52. runbooks/common/logging_integration_helper.py +79 -86
  53. runbooks/common/mcp_cost_explorer_integration.py +478 -495
  54. runbooks/common/mcp_integration.py +63 -74
  55. runbooks/common/memory_optimization.py +140 -118
  56. runbooks/common/module_cli_base.py +37 -58
  57. runbooks/common/organizations_client.py +176 -194
  58. runbooks/common/patterns.py +204 -0
  59. runbooks/common/performance_monitoring.py +67 -71
  60. runbooks/common/performance_optimization_engine.py +283 -274
  61. runbooks/common/profile_utils.py +248 -39
  62. runbooks/common/rich_utils.py +643 -92
  63. runbooks/common/sre_performance_suite.py +177 -186
  64. runbooks/enterprise/__init__.py +1 -1
  65. runbooks/enterprise/logging.py +144 -106
  66. runbooks/enterprise/security.py +187 -204
  67. runbooks/enterprise/validation.py +43 -56
  68. runbooks/finops/__init__.py +29 -33
  69. runbooks/finops/account_resolver.py +1 -1
  70. runbooks/finops/advanced_optimization_engine.py +980 -0
  71. runbooks/finops/automation_core.py +268 -231
  72. runbooks/finops/business_case_config.py +184 -179
  73. runbooks/finops/cli.py +660 -139
  74. runbooks/finops/commvault_ec2_analysis.py +157 -164
  75. runbooks/finops/compute_cost_optimizer.py +336 -320
  76. runbooks/finops/config.py +20 -20
  77. runbooks/finops/cost_optimizer.py +488 -622
  78. runbooks/finops/cost_processor.py +332 -214
  79. runbooks/finops/dashboard_runner.py +1006 -172
  80. runbooks/finops/ebs_cost_optimizer.py +991 -657
  81. runbooks/finops/elastic_ip_optimizer.py +317 -257
  82. runbooks/finops/enhanced_mcp_integration.py +340 -0
  83. runbooks/finops/enhanced_progress.py +40 -37
  84. runbooks/finops/enhanced_trend_visualization.py +3 -2
  85. runbooks/finops/enterprise_wrappers.py +230 -292
  86. runbooks/finops/executive_export.py +203 -160
  87. runbooks/finops/helpers.py +130 -288
  88. runbooks/finops/iam_guidance.py +1 -1
  89. runbooks/finops/infrastructure/__init__.py +80 -0
  90. runbooks/finops/infrastructure/commands.py +506 -0
  91. runbooks/finops/infrastructure/load_balancer_optimizer.py +866 -0
  92. runbooks/finops/infrastructure/vpc_endpoint_optimizer.py +832 -0
  93. runbooks/finops/markdown_exporter.py +338 -175
  94. runbooks/finops/mcp_validator.py +1952 -0
  95. runbooks/finops/nat_gateway_optimizer.py +1513 -482
  96. runbooks/finops/network_cost_optimizer.py +657 -587
  97. runbooks/finops/notebook_utils.py +226 -188
  98. runbooks/finops/optimization_engine.py +1136 -0
  99. runbooks/finops/optimizer.py +25 -29
  100. runbooks/finops/rds_snapshot_optimizer.py +367 -411
  101. runbooks/finops/reservation_optimizer.py +427 -363
  102. runbooks/finops/scenario_cli_integration.py +77 -78
  103. runbooks/finops/scenarios.py +1278 -439
  104. runbooks/finops/schemas.py +218 -182
  105. runbooks/finops/snapshot_manager.py +2289 -0
  106. runbooks/finops/tests/test_finops_dashboard.py +3 -3
  107. runbooks/finops/tests/test_reference_images_validation.py +2 -2
  108. runbooks/finops/tests/test_single_account_features.py +17 -17
  109. runbooks/finops/tests/validate_test_suite.py +1 -1
  110. runbooks/finops/types.py +3 -3
  111. runbooks/finops/validation_framework.py +263 -269
  112. runbooks/finops/vpc_cleanup_exporter.py +191 -146
  113. runbooks/finops/vpc_cleanup_optimizer.py +593 -575
  114. runbooks/finops/workspaces_analyzer.py +171 -182
  115. runbooks/hitl/enhanced_workflow_engine.py +1 -1
  116. runbooks/integration/__init__.py +89 -0
  117. runbooks/integration/mcp_integration.py +1920 -0
  118. runbooks/inventory/CLAUDE.md +816 -0
  119. runbooks/inventory/README.md +3 -3
  120. runbooks/inventory/Tests/common_test_data.py +30 -30
  121. runbooks/inventory/__init__.py +2 -2
  122. runbooks/inventory/cloud_foundations_integration.py +144 -149
  123. runbooks/inventory/collectors/aws_comprehensive.py +28 -11
  124. runbooks/inventory/collectors/aws_networking.py +111 -101
  125. runbooks/inventory/collectors/base.py +4 -0
  126. runbooks/inventory/core/collector.py +495 -313
  127. runbooks/inventory/discovery.md +2 -2
  128. runbooks/inventory/drift_detection_cli.py +69 -96
  129. runbooks/inventory/find_ec2_security_groups.py +1 -1
  130. runbooks/inventory/inventory_mcp_cli.py +48 -46
  131. runbooks/inventory/list_rds_snapshots_aggregator.py +192 -208
  132. runbooks/inventory/mcp_inventory_validator.py +549 -465
  133. runbooks/inventory/mcp_vpc_validator.py +359 -442
  134. runbooks/inventory/organizations_discovery.py +56 -52
  135. runbooks/inventory/rich_inventory_display.py +33 -32
  136. runbooks/inventory/unified_validation_engine.py +278 -251
  137. runbooks/inventory/vpc_analyzer.py +733 -696
  138. runbooks/inventory/vpc_architecture_validator.py +293 -348
  139. runbooks/inventory/vpc_dependency_analyzer.py +382 -378
  140. runbooks/inventory/vpc_flow_analyzer.py +3 -3
  141. runbooks/main.py +152 -9147
  142. runbooks/main_final.py +91 -60
  143. runbooks/main_minimal.py +22 -10
  144. runbooks/main_optimized.py +131 -100
  145. runbooks/main_ultra_minimal.py +7 -2
  146. runbooks/mcp/__init__.py +36 -0
  147. runbooks/mcp/integration.py +679 -0
  148. runbooks/metrics/dora_metrics_engine.py +2 -2
  149. runbooks/monitoring/performance_monitor.py +9 -4
  150. runbooks/operate/dynamodb_operations.py +3 -1
  151. runbooks/operate/ec2_operations.py +145 -137
  152. runbooks/operate/iam_operations.py +146 -152
  153. runbooks/operate/mcp_integration.py +1 -1
  154. runbooks/operate/networking_cost_heatmap.py +33 -10
  155. runbooks/operate/privatelink_operations.py +1 -1
  156. runbooks/operate/rds_operations.py +223 -254
  157. runbooks/operate/s3_operations.py +107 -118
  158. runbooks/operate/vpc_endpoints.py +1 -1
  159. runbooks/operate/vpc_operations.py +648 -618
  160. runbooks/remediation/base.py +1 -1
  161. runbooks/remediation/commons.py +10 -7
  162. runbooks/remediation/commvault_ec2_analysis.py +71 -67
  163. runbooks/remediation/ec2_unattached_ebs_volumes.py +1 -0
  164. runbooks/remediation/multi_account.py +24 -21
  165. runbooks/remediation/rds_snapshot_list.py +91 -65
  166. runbooks/remediation/remediation_cli.py +92 -146
  167. runbooks/remediation/universal_account_discovery.py +83 -79
  168. runbooks/remediation/workspaces_list.py +49 -44
  169. runbooks/security/__init__.py +19 -0
  170. runbooks/security/assessment_runner.py +1150 -0
  171. runbooks/security/baseline_checker.py +812 -0
  172. runbooks/security/cloudops_automation_security_validator.py +509 -535
  173. runbooks/security/compliance_automation_engine.py +17 -17
  174. runbooks/security/config/__init__.py +2 -2
  175. runbooks/security/config/compliance_config.py +50 -50
  176. runbooks/security/config_template_generator.py +63 -76
  177. runbooks/security/enterprise_security_framework.py +1 -1
  178. runbooks/security/executive_security_dashboard.py +519 -508
  179. runbooks/security/integration_test_enterprise_security.py +5 -3
  180. runbooks/security/multi_account_security_controls.py +959 -1210
  181. runbooks/security/real_time_security_monitor.py +422 -444
  182. runbooks/security/run_script.py +1 -1
  183. runbooks/security/security_baseline_tester.py +1 -1
  184. runbooks/security/security_cli.py +143 -112
  185. runbooks/security/test_2way_validation.py +439 -0
  186. runbooks/security/two_way_validation_framework.py +852 -0
  187. runbooks/sre/mcp_reliability_engine.py +6 -6
  188. runbooks/sre/production_monitoring_framework.py +167 -177
  189. runbooks/tdd/__init__.py +15 -0
  190. runbooks/tdd/cli.py +1071 -0
  191. runbooks/utils/__init__.py +14 -17
  192. runbooks/utils/logger.py +7 -2
  193. runbooks/utils/version_validator.py +51 -48
  194. runbooks/validation/__init__.py +6 -6
  195. runbooks/validation/cli.py +9 -3
  196. runbooks/validation/comprehensive_2way_validator.py +754 -708
  197. runbooks/validation/mcp_validator.py +906 -228
  198. runbooks/validation/terraform_citations_validator.py +104 -115
  199. runbooks/validation/terraform_drift_detector.py +447 -451
  200. runbooks/vpc/README.md +617 -0
  201. runbooks/vpc/__init__.py +8 -1
  202. runbooks/vpc/analyzer.py +577 -0
  203. runbooks/vpc/cleanup_wrapper.py +476 -413
  204. runbooks/vpc/cli_cloudtrail_commands.py +339 -0
  205. runbooks/vpc/cli_mcp_validation_commands.py +480 -0
  206. runbooks/vpc/cloudtrail_audit_integration.py +717 -0
  207. runbooks/vpc/config.py +92 -97
  208. runbooks/vpc/cost_engine.py +411 -148
  209. runbooks/vpc/cost_explorer_integration.py +553 -0
  210. runbooks/vpc/cross_account_session.py +101 -106
  211. runbooks/vpc/enhanced_mcp_validation.py +917 -0
  212. runbooks/vpc/eni_gate_validator.py +961 -0
  213. runbooks/vpc/heatmap_engine.py +190 -162
  214. runbooks/vpc/mcp_no_eni_validator.py +681 -640
  215. runbooks/vpc/nat_gateway_optimizer.py +358 -0
  216. runbooks/vpc/networking_wrapper.py +15 -8
  217. runbooks/vpc/pdca_remediation_planner.py +528 -0
  218. runbooks/vpc/performance_optimized_analyzer.py +219 -231
  219. runbooks/vpc/runbooks_adapter.py +1167 -241
  220. runbooks/vpc/tdd_red_phase_stubs.py +601 -0
  221. runbooks/vpc/test_data_loader.py +358 -0
  222. runbooks/vpc/tests/conftest.py +314 -4
  223. runbooks/vpc/tests/test_cleanup_framework.py +1022 -0
  224. runbooks/vpc/tests/test_cost_engine.py +0 -2
  225. runbooks/vpc/topology_generator.py +326 -0
  226. runbooks/vpc/unified_scenarios.py +1302 -1129
  227. runbooks/vpc/vpc_cleanup_integration.py +1943 -1115
  228. runbooks-1.1.5.dist-info/METADATA +328 -0
  229. {runbooks-1.1.3.dist-info → runbooks-1.1.5.dist-info}/RECORD +233 -200
  230. runbooks/finops/README.md +0 -414
  231. runbooks/finops/accuracy_cross_validator.py +0 -647
  232. runbooks/finops/business_cases.py +0 -950
  233. runbooks/finops/dashboard_router.py +0 -922
  234. runbooks/finops/ebs_optimizer.py +0 -956
  235. runbooks/finops/embedded_mcp_validator.py +0 -1629
  236. runbooks/finops/enhanced_dashboard_runner.py +0 -527
  237. runbooks/finops/finops_dashboard.py +0 -584
  238. runbooks/finops/finops_scenarios.py +0 -1218
  239. runbooks/finops/legacy_migration.py +0 -730
  240. runbooks/finops/multi_dashboard.py +0 -1519
  241. runbooks/finops/single_dashboard.py +0 -1113
  242. runbooks/finops/unlimited_scenarios.py +0 -393
  243. runbooks-1.1.3.dist-info/METADATA +0 -799
  244. {runbooks-1.1.3.dist-info → runbooks-1.1.5.dist-info}/WHEEL +0 -0
  245. {runbooks-1.1.3.dist-info → runbooks-1.1.5.dist-info}/entry_points.txt +0 -0
  246. {runbooks-1.1.3.dist-info → runbooks-1.1.5.dist-info}/licenses/LICENSE +0 -0
  247. {runbooks-1.1.3.dist-info → runbooks-1.1.5.dist-info}/top_level.txt +0 -0
@@ -22,63 +22,85 @@ Strategic Alignment:
22
22
  - Universal $132K Cost Optimization Methodology: Executive ROI quantification
23
23
  """
24
24
 
25
+ import json
25
26
  import os
26
27
  import sys
27
- import json
28
28
  import tempfile
29
- from datetime import datetime, timedelta
30
- from pathlib import Path
31
- from typing import Any, Dict, List, Optional, Union, Tuple
32
29
  from dataclasses import dataclass, field
30
+ from datetime import datetime, timedelta
33
31
  from enum import Enum
32
+ from pathlib import Path
33
+ from typing import Any, Dict, List, Optional, Tuple, Union
34
34
 
35
35
  # Jupyter and presentation imports
36
36
  try:
37
- from IPython.display import display, HTML, Markdown, Image
38
37
  from IPython.core.display import Javascript
38
+ from IPython.display import HTML, Image, Markdown, display
39
+
39
40
  JUPYTER_AVAILABLE = True
40
41
  except ImportError:
41
42
  JUPYTER_AVAILABLE = False
43
+
42
44
  # Create stub classes for non-Jupyter environments
43
45
  class HTML:
44
- def __init__(self, data): self.data = data
46
+ def __init__(self, data):
47
+ self.data = data
48
+
45
49
  class Markdown:
46
- def __init__(self, data): self.data = data
50
+ def __init__(self, data):
51
+ self.data = data
52
+
47
53
  class Image:
48
- def __init__(self, data): self.data = data
49
- def display(*args): pass
54
+ def __init__(self, data):
55
+ self.data = data
56
+
57
+ def display(*args):
58
+ pass
59
+
50
60
 
51
61
  from ..common.rich_utils import (
52
- console, print_header, print_success, print_error, print_warning, print_info,
53
- create_table, create_progress_bar, format_cost, create_panel, STATUS_INDICATORS
62
+ STATUS_INDICATORS,
63
+ console,
64
+ create_panel,
65
+ create_progress_bar,
66
+ create_table,
67
+ format_cost,
68
+ print_error,
69
+ print_header,
70
+ print_info,
71
+ print_success,
72
+ print_warning,
54
73
  )
55
- from .automation_core import UniversalAutomationEngine, OptimizationCategory, BusinessImpactLevel
74
+ from .automation_core import BusinessImpactLevel, OptimizationCategory, UniversalAutomationEngine
56
75
 
57
76
 
58
77
  class StakeholderType(str, Enum):
59
78
  """Target stakeholder types for business interfaces."""
60
- CTO = "cto" # Chief Technology Officer
61
- CFO = "cfo" # Chief Financial Officer
62
- PROCUREMENT = "procurement" # Procurement teams
63
- FINOPS = "finops" # Financial Operations teams
64
- MANAGER = "manager" # General management
79
+
80
+ CTO = "cto" # Chief Technology Officer
81
+ CFO = "cfo" # Chief Financial Officer
82
+ PROCUREMENT = "procurement" # Procurement teams
83
+ FINOPS = "finops" # Financial Operations teams
84
+ MANAGER = "manager" # General management
65
85
 
66
86
 
67
87
  class PresentationFormat(str, Enum):
68
88
  """Presentation output formats for stakeholders."""
69
- JUPYTER = "jupyter" # Interactive Jupyter notebook
70
- HTML = "html" # Static HTML export
71
- PDF = "pdf" # Executive PDF report
72
- MARKDOWN = "markdown" # Markdown documentation
73
- JSON = "json" # Raw data export
89
+
90
+ JUPYTER = "jupyter" # Interactive Jupyter notebook
91
+ HTML = "html" # Static HTML export
92
+ PDF = "pdf" # Executive PDF report
93
+ MARKDOWN = "markdown" # Markdown documentation
94
+ JSON = "json" # Raw data export
74
95
 
75
96
 
76
97
  @dataclass
77
98
  class BusinessConfiguration:
78
99
  """Business configuration for non-technical users."""
100
+
79
101
  analysis_scope: str = "multi_account" # single_account, multi_account
80
102
  target_aws_profile: str = "default"
81
- optimization_target: float = 0.25 # 25% cost reduction target
103
+ optimization_target: float = 0.25 # 25% cost reduction target
82
104
  executive_reporting: bool = True
83
105
  export_formats: List[str] = field(default_factory=lambda: ["json", "csv", "html"])
84
106
  stakeholder_type: StakeholderType = StakeholderType.MANAGER
@@ -87,6 +109,7 @@ class BusinessConfiguration:
87
109
  @dataclass
88
110
  class ExecutiveDashboardResult:
89
111
  """Executive dashboard analysis results."""
112
+
90
113
  business_summary: Dict[str, Any]
91
114
  financial_impact: Dict[str, Any]
92
115
  optimization_recommendations: List[Dict[str, Any]]
@@ -99,7 +122,7 @@ class ExecutiveDashboardResult:
99
122
  class ExecutiveDashboardCreator:
100
123
  """
101
124
  Executive Dashboard Creator - Business Interface for Non-Technical Stakeholders
102
-
125
+
103
126
  Following Universal $132K Cost Optimization Methodology with executive focus:
104
127
  - CTO/CFO/Procurement ready cost analysis dashboards
105
128
  - Non-technical user interfaces with business configuration
@@ -108,62 +131,61 @@ class ExecutiveDashboardCreator:
108
131
  - MCP validation integration for executive-grade accuracy
109
132
  - Strategic business intelligence with implementation roadmaps
110
133
  """
111
-
134
+
112
135
  def __init__(self, automation_engine: UniversalAutomationEngine = None):
113
136
  """Initialize executive dashboard creator with automation engine."""
114
137
  self.automation_engine = automation_engine or UniversalAutomationEngine()
115
138
  self.temp_dir = Path(tempfile.gettempdir()) / "finops_dashboards"
116
139
  self.temp_dir.mkdir(exist_ok=True)
117
-
118
- async def create_executive_dashboard(self,
119
- config: BusinessConfiguration,
120
- optimization_focus: OptimizationCategory = None) -> ExecutiveDashboardResult:
140
+
141
+ async def create_executive_dashboard(
142
+ self, config: BusinessConfiguration, optimization_focus: OptimizationCategory = None
143
+ ) -> ExecutiveDashboardResult:
121
144
  """
122
145
  Create comprehensive executive dashboard for business stakeholders.
123
-
146
+
124
147
  Args:
125
148
  config: Business configuration with stakeholder requirements
126
149
  optimization_focus: Specific optimization category focus
127
-
150
+
128
151
  Returns:
129
152
  Complete executive dashboard with business intelligence
130
153
  """
131
154
  print_header("Executive Dashboard Creator", "Enterprise Business Intelligence Platform v1.0")
132
-
155
+
133
156
  try:
134
157
  # Step 1: Business-focused resource analysis
135
158
  console.print("šŸ” [bold blue]Executing Business-Focused Analysis...[/bold blue]")
136
159
  analysis_results = await self.automation_engine.discover_resources_universal(
137
160
  optimization_focus=optimization_focus
138
161
  )
139
-
162
+
140
163
  # Step 2: Executive business summary generation
141
164
  console.print("šŸ“Š [bold blue]Generating Executive Business Summary...[/bold blue]")
142
165
  business_summary = self._generate_business_summary(analysis_results, config)
143
-
166
+
144
167
  # Step 3: Financial impact analysis for C-suite
145
168
  console.print("šŸ’° [bold blue]Calculating Financial Impact Analysis...[/bold blue]")
146
169
  financial_impact = self._calculate_executive_financial_impact(analysis_results, config)
147
-
170
+
148
171
  # Step 4: Strategic optimization recommendations
149
172
  console.print("šŸŽÆ [bold blue]Creating Strategic Recommendations...[/bold blue]")
150
173
  recommendations = self._generate_optimization_recommendations(analysis_results, config)
151
-
174
+
152
175
  # Step 5: Implementation roadmap for executives
153
176
  console.print("šŸ—ŗļø [bold blue]Building Implementation Roadmap...[/bold blue]")
154
177
  roadmap = self._create_implementation_roadmap(analysis_results, config)
155
-
178
+
156
179
  # Step 6: Risk assessment for executive decision making
157
180
  console.print("āš ļø [bold blue]Generating Risk Assessment...[/bold blue]")
158
181
  risk_assessment = self._generate_risk_assessment(analysis_results, config)
159
-
182
+
160
183
  # Step 7: Export generation for stakeholder distribution
161
184
  console.print("šŸ“¤ [bold blue]Generating Executive Export Files...[/bold blue]")
162
185
  export_files = await self._generate_export_files(
163
- analysis_results, business_summary, financial_impact,
164
- recommendations, roadmap, risk_assessment, config
186
+ analysis_results, business_summary, financial_impact, recommendations, roadmap, risk_assessment, config
165
187
  )
166
-
188
+
167
189
  dashboard_result = ExecutiveDashboardResult(
168
190
  business_summary=business_summary,
169
191
  financial_impact=financial_impact,
@@ -171,23 +193,24 @@ class ExecutiveDashboardCreator:
171
193
  implementation_roadmap=roadmap,
172
194
  risk_assessment=risk_assessment,
173
195
  export_files=export_files,
174
- presentation_ready=True
196
+ presentation_ready=True,
175
197
  )
176
-
198
+
177
199
  # Display executive summary
178
200
  self._display_executive_dashboard(dashboard_result, config)
179
-
201
+
180
202
  return dashboard_result
181
-
203
+
182
204
  except Exception as e:
183
205
  print_error(f"Executive dashboard creation failed: {e}")
184
206
  raise
185
-
186
- def _generate_business_summary(self, analysis_results: Dict[str, Any],
187
- config: BusinessConfiguration) -> Dict[str, Any]:
207
+
208
+ def _generate_business_summary(
209
+ self, analysis_results: Dict[str, Any], config: BusinessConfiguration
210
+ ) -> Dict[str, Any]:
188
211
  """Generate executive business summary."""
189
212
  business_impact = analysis_results["business_impact"]
190
-
213
+
191
214
  return {
192
215
  "total_infrastructure_analyzed": analysis_results["total_resources_discovered"],
193
216
  "optimization_opportunities_identified": business_impact["total_opportunities"],
@@ -198,23 +221,26 @@ class ExecutiveDashboardCreator:
198
221
  "regions_covered": len(analysis_results["regions_covered"]),
199
222
  "analysis_timestamp": analysis_results["analysis_timestamp"],
200
223
  "strategic_alignment": {
201
- "cost_optimization_target": f"{config.optimization_target*100}%",
224
+ "cost_optimization_target": f"{config.optimization_target * 100}%",
202
225
  "stakeholder_focus": config.stakeholder_type.value.upper(),
203
- "enterprise_readiness": "C-suite presentation ready"
204
- }
226
+ "enterprise_readiness": "C-suite presentation ready",
227
+ },
205
228
  }
206
-
207
- def _calculate_executive_financial_impact(self, analysis_results: Dict[str, Any],
208
- config: BusinessConfiguration) -> Dict[str, Any]:
229
+
230
+ def _calculate_executive_financial_impact(
231
+ self, analysis_results: Dict[str, Any], config: BusinessConfiguration
232
+ ) -> Dict[str, Any]:
209
233
  """Calculate financial impact for executive stakeholders."""
210
234
  business_impact = analysis_results["business_impact"]
211
235
  total_savings = business_impact["total_potential_annual_savings"]
212
-
236
+
213
237
  # Calculate ROI metrics for executives
214
238
  implementation_cost = 50_000 # Conservative implementation cost estimate
215
239
  annual_savings = total_savings
216
- roi_percentage = ((annual_savings - implementation_cost) / implementation_cost) * 100 if implementation_cost > 0 else 0
217
-
240
+ roi_percentage = (
241
+ ((annual_savings - implementation_cost) / implementation_cost) * 100 if implementation_cost > 0 else 0
242
+ )
243
+
218
244
  return {
219
245
  "annual_cost_reduction": annual_savings,
220
246
  "monthly_savings": annual_savings / 12,
@@ -225,15 +251,16 @@ class ExecutiveDashboardCreator:
225
251
  "payback_period_months": (implementation_cost / (annual_savings / 12)) if annual_savings > 0 else 0,
226
252
  "three_year_value": (annual_savings * 3) - implementation_cost,
227
253
  "optimization_categories": business_impact["impact_by_category"],
228
- "confidence_level": "High - Based on proven $132K methodology"
254
+ "confidence_level": "High - Based on proven $132K methodology",
229
255
  }
230
-
231
- def _generate_optimization_recommendations(self, analysis_results: Dict[str, Any],
232
- config: BusinessConfiguration) -> List[Dict[str, Any]]:
256
+
257
+ def _generate_optimization_recommendations(
258
+ self, analysis_results: Dict[str, Any], config: BusinessConfiguration
259
+ ) -> List[Dict[str, Any]]:
233
260
  """Generate strategic optimization recommendations for executives."""
234
261
  recommendations = []
235
262
  business_impact = analysis_results["business_impact"]
236
-
263
+
237
264
  # Priority recommendations based on business impact
238
265
  for category, impact_data in business_impact["impact_by_category"].items():
239
266
  recommendation = {
@@ -244,31 +271,32 @@ class ExecutiveDashboardCreator:
244
271
  "resource_requirements": "Minimal - Automated analysis with human approval",
245
272
  "risk_level": "Low - READ-ONLY analysis with safety controls",
246
273
  "stakeholder_approval": "Required - Executive approval for implementation",
247
- "success_criteria": f"≄{config.optimization_target*100}% cost reduction achieved"
274
+ "success_criteria": f"≄{config.optimization_target * 100}% cost reduction achieved",
248
275
  }
249
-
276
+
250
277
  # Add category-specific recommendations
251
278
  if category == "cost_optimization":
252
279
  recommendation["strategic_value"] = "Immediate financial impact with enterprise ROI"
253
280
  recommendation["next_steps"] = [
254
281
  "Executive approval for optimization implementation",
255
282
  "Phased rollout with safety controls and monitoring",
256
- "Monthly savings validation and reporting"
283
+ "Monthly savings validation and reporting",
257
284
  ]
258
285
  elif category == "security_compliance":
259
286
  recommendation["strategic_value"] = "Risk mitigation and regulatory compliance"
260
287
  recommendation["next_steps"] = [
261
288
  "Security team review and validation",
262
289
  "Compliance framework alignment verification",
263
- "Automated remediation with audit trails"
290
+ "Automated remediation with audit trails",
264
291
  ]
265
-
292
+
266
293
  recommendations.append(recommendation)
267
-
294
+
268
295
  return recommendations
269
-
270
- def _create_implementation_roadmap(self, analysis_results: Dict[str, Any],
271
- config: BusinessConfiguration) -> Dict[str, Any]:
296
+
297
+ def _create_implementation_roadmap(
298
+ self, analysis_results: Dict[str, Any], config: BusinessConfiguration
299
+ ) -> Dict[str, Any]:
272
300
  """Create strategic implementation roadmap for executives."""
273
301
  return {
274
302
  "phase_1_analysis": {
@@ -277,19 +305,19 @@ class ExecutiveDashboardCreator:
277
305
  "deliverables": [
278
306
  "Executive business case with quantified ROI",
279
307
  "Risk assessment and mitigation strategy",
280
- "Implementation timeline and resource requirements"
308
+ "Implementation timeline and resource requirements",
281
309
  ],
282
- "approval_required": "C-suite sign-off on optimization strategy"
310
+ "approval_required": "C-suite sign-off on optimization strategy",
283
311
  },
284
312
  "phase_2_implementation": {
285
- "duration": "4-8 weeks",
313
+ "duration": "4-8 weeks",
286
314
  "objective": "Systematic optimization execution with safety controls",
287
315
  "deliverables": [
288
316
  "Automated optimization with human approval gates",
289
317
  "Real-time monitoring and progress reporting",
290
- "Monthly savings validation and evidence collection"
318
+ "Monthly savings validation and evidence collection",
291
319
  ],
292
- "approval_required": "Technical team validation and stakeholder updates"
320
+ "approval_required": "Technical team validation and stakeholder updates",
293
321
  },
294
322
  "phase_3_optimization": {
295
323
  "duration": "Ongoing",
@@ -297,68 +325,72 @@ class ExecutiveDashboardCreator:
297
325
  "deliverables": [
298
326
  "Quarterly optimization reviews and adjustments",
299
327
  "Annual ROI validation and strategic planning",
300
- "Enterprise scaling and additional optimization opportunities"
328
+ "Enterprise scaling and additional optimization opportunities",
301
329
  ],
302
- "approval_required": "Quarterly executive review and strategic adjustment"
330
+ "approval_required": "Quarterly executive review and strategic adjustment",
303
331
  },
304
332
  "success_metrics": {
305
- "financial": f"≄{config.optimization_target*100}% cost reduction achieved",
333
+ "financial": f"≄{config.optimization_target * 100}% cost reduction achieved",
306
334
  "operational": "≄99.5% accuracy in cost projections and analysis",
307
- "strategic": "Executive stakeholder satisfaction and continued investment"
308
- }
335
+ "strategic": "Executive stakeholder satisfaction and continued investment",
336
+ },
309
337
  }
310
-
311
- def _generate_risk_assessment(self, analysis_results: Dict[str, Any],
312
- config: BusinessConfiguration) -> Dict[str, Any]:
338
+
339
+ def _generate_risk_assessment(
340
+ self, analysis_results: Dict[str, Any], config: BusinessConfiguration
341
+ ) -> Dict[str, Any]:
313
342
  """Generate comprehensive risk assessment for executive decision making."""
314
343
  return {
315
344
  "implementation_risks": {
316
345
  "technical_risk": {
317
346
  "level": "Low",
318
347
  "description": "READ-ONLY analysis with established safety controls",
319
- "mitigation": "Proven automation patterns with ≄99.5% accuracy validation"
348
+ "mitigation": "Proven automation patterns with ≄99.5% accuracy validation",
320
349
  },
321
350
  "financial_risk": {
322
- "level": "Low",
351
+ "level": "Low",
323
352
  "description": "Conservative savings projections based on proven methodology",
324
- "mitigation": "Phased implementation with continuous ROI validation"
353
+ "mitigation": "Phased implementation with continuous ROI validation",
325
354
  },
326
355
  "operational_risk": {
327
356
  "level": "Medium",
328
357
  "description": "Change management and stakeholder adoption requirements",
329
- "mitigation": "Executive sponsorship and comprehensive training program"
330
- }
358
+ "mitigation": "Executive sponsorship and comprehensive training program",
359
+ },
331
360
  },
332
361
  "business_continuity": {
333
362
  "service_impact": "Minimal - Analysis and optimization during maintenance windows",
334
363
  "rollback_capability": "Complete - All changes reversible with audit trails",
335
- "monitoring_coverage": "Comprehensive - Real-time performance and cost monitoring"
364
+ "monitoring_coverage": "Comprehensive - Real-time performance and cost monitoring",
336
365
  },
337
366
  "regulatory_compliance": {
338
367
  "frameworks_supported": ["SOC2", "PCI-DSS", "HIPAA", "AWS Well-Architected"],
339
368
  "audit_readiness": "Complete audit trails with evidence collection",
340
- "compliance_validation": "≄99.5% accuracy with MCP cross-validation"
369
+ "compliance_validation": "≄99.5% accuracy with MCP cross-validation",
341
370
  },
342
371
  "strategic_risks": {
343
372
  "competitive_advantage": "High - Cost optimization enables strategic reinvestment",
344
373
  "vendor_dependencies": "Low - Multi-cloud patterns with AWS expertise",
345
- "skill_requirements": "Minimal - Automated systems with executive dashboards"
374
+ "skill_requirements": "Minimal - Automated systems with executive dashboards",
346
375
  },
347
376
  "overall_risk_rating": "Low Risk, High Reward",
348
- "executive_recommendation": "Proceed with implementation following proven methodology"
377
+ "executive_recommendation": "Proceed with implementation following proven methodology",
349
378
  }
350
-
351
- async def _generate_export_files(self, analysis_results: Dict[str, Any],
352
- business_summary: Dict[str, Any],
353
- financial_impact: Dict[str, Any],
354
- recommendations: List[Dict[str, Any]],
355
- roadmap: Dict[str, Any],
356
- risk_assessment: Dict[str, Any],
357
- config: BusinessConfiguration) -> List[str]:
379
+
380
+ async def _generate_export_files(
381
+ self,
382
+ analysis_results: Dict[str, Any],
383
+ business_summary: Dict[str, Any],
384
+ financial_impact: Dict[str, Any],
385
+ recommendations: List[Dict[str, Any]],
386
+ roadmap: Dict[str, Any],
387
+ risk_assessment: Dict[str, Any],
388
+ config: BusinessConfiguration,
389
+ ) -> List[str]:
358
390
  """Generate export files for stakeholder distribution."""
359
391
  export_files = []
360
392
  timestamp = datetime.now().strftime("%Y%m%d_%H%M%S")
361
-
393
+
362
394
  try:
363
395
  # Generate JSON export (detailed data)
364
396
  if "json" in config.export_formats:
@@ -370,41 +402,44 @@ class ExecutiveDashboardCreator:
370
402
  "recommendations": recommendations,
371
403
  "implementation_roadmap": roadmap,
372
404
  "risk_assessment": risk_assessment,
373
- "generated_timestamp": datetime.now().isoformat()
405
+ "generated_timestamp": datetime.now().isoformat(),
374
406
  }
375
-
376
- with open(json_file, 'w') as f:
407
+
408
+ with open(json_file, "w") as f:
377
409
  json.dump(export_data, f, indent=2, default=str)
378
410
  export_files.append(str(json_file))
379
-
411
+
380
412
  # Generate HTML export (executive presentation)
381
413
  if "html" in config.export_formats:
382
414
  html_file = self.temp_dir / f"executive_dashboard_{timestamp}.html"
383
415
  html_content = self._generate_html_report(
384
416
  business_summary, financial_impact, recommendations, roadmap, risk_assessment, config
385
417
  )
386
-
387
- with open(html_file, 'w') as f:
418
+
419
+ with open(html_file, "w") as f:
388
420
  f.write(html_content)
389
421
  export_files.append(str(html_file))
390
-
422
+
391
423
  # Generate CSV export (financial data)
392
424
  if "csv" in config.export_formats:
393
425
  csv_file = self.temp_dir / f"executive_financial_analysis_{timestamp}.csv"
394
426
  self._generate_csv_export(financial_impact, recommendations, csv_file)
395
427
  export_files.append(str(csv_file))
396
-
428
+
397
429
  except Exception as e:
398
430
  print_warning(f"Export file generation incomplete: {str(e)}")
399
-
431
+
400
432
  return export_files
401
-
402
- def _generate_html_report(self, business_summary: Dict[str, Any],
403
- financial_impact: Dict[str, Any],
404
- recommendations: List[Dict[str, Any]],
405
- roadmap: Dict[str, Any],
406
- risk_assessment: Dict[str, Any],
407
- config: BusinessConfiguration) -> str:
433
+
434
+ def _generate_html_report(
435
+ self,
436
+ business_summary: Dict[str, Any],
437
+ financial_impact: Dict[str, Any],
438
+ recommendations: List[Dict[str, Any]],
439
+ roadmap: Dict[str, Any],
440
+ risk_assessment: Dict[str, Any],
441
+ config: BusinessConfiguration,
442
+ ) -> str:
408
443
  """Generate HTML report for executive presentation."""
409
444
  html_template = f"""
410
445
  <!DOCTYPE html>
@@ -435,15 +470,15 @@ class ExecutiveDashboardCreator:
435
470
  <div class="summary">
436
471
  <h2>Executive Business Summary</h2>
437
472
  <div class="metric">
438
- <div class="metric-value">{business_summary['optimization_opportunities_identified']:,}</div>
473
+ <div class="metric-value">{business_summary["optimization_opportunities_identified"]:,}</div>
439
474
  <div class="metric-label">Optimization Opportunities</div>
440
475
  </div>
441
476
  <div class="metric">
442
- <div class="metric-value">{format_cost(business_summary['annual_savings_potential'])}</div>
477
+ <div class="metric-value">{format_cost(business_summary["annual_savings_potential"])}</div>
443
478
  <div class="metric-label">Annual Savings Potential</div>
444
479
  </div>
445
480
  <div class="metric">
446
- <div class="metric-value">{business_summary['roi_timeline_months']}</div>
481
+ <div class="metric-value">{business_summary["roi_timeline_months"]}</div>
447
482
  <div class="metric-label">ROI Timeline (Months)</div>
448
483
  </div>
449
484
  </div>
@@ -452,10 +487,10 @@ class ExecutiveDashboardCreator:
452
487
  <h2>Financial Impact Analysis</h2>
453
488
  <table>
454
489
  <tr><th>Metric</th><th>Value</th><th>Timeline</th></tr>
455
- <tr><td>Annual Cost Reduction</td><td>{format_cost(financial_impact['annual_cost_reduction'])}</td><td>12 months</td></tr>
456
- <tr><td>Monthly Savings</td><td>{format_cost(financial_impact['monthly_savings'])}</td><td>Ongoing</td></tr>
457
- <tr><td>ROI Percentage</td><td>{financial_impact['roi_percentage']:.1f}%</td><td>Annual</td></tr>
458
- <tr><td>Payback Period</td><td>{financial_impact['payback_period_months']:.1f} months</td><td>One-time</td></tr>
490
+ <tr><td>Annual Cost Reduction</td><td>{format_cost(financial_impact["annual_cost_reduction"])}</td><td>12 months</td></tr>
491
+ <tr><td>Monthly Savings</td><td>{format_cost(financial_impact["monthly_savings"])}</td><td>Ongoing</td></tr>
492
+ <tr><td>ROI Percentage</td><td>{financial_impact["roi_percentage"]:.1f}%</td><td>Annual</td></tr>
493
+ <tr><td>Payback Period</td><td>{financial_impact["payback_period_months"]:.1f} months</td><td>One-time</td></tr>
459
494
  </table>
460
495
  </div>
461
496
 
@@ -464,77 +499,77 @@ class ExecutiveDashboardCreator:
464
499
  <table>
465
500
  <tr><th>Category</th><th>Priority</th><th>Business Impact</th><th>Timeline</th></tr>
466
501
  """
467
-
502
+
468
503
  for rec in recommendations:
469
504
  html_template += f"""
470
505
  <tr>
471
- <td>{rec['category']}</td>
472
- <td>{rec['priority']}</td>
473
- <td>{rec['business_impact']}</td>
474
- <td>{rec['implementation_timeline']}</td>
506
+ <td>{rec["category"]}</td>
507
+ <td>{rec["priority"]}</td>
508
+ <td>{rec["business_impact"]}</td>
509
+ <td>{rec["implementation_timeline"]}</td>
475
510
  </tr>
476
511
  """
477
-
512
+
478
513
  html_template += """
479
514
  </table>
480
515
  </div>
481
516
  </body>
482
517
  </html>
483
518
  """
484
-
519
+
485
520
  return html_template
486
-
487
- def _generate_csv_export(self, financial_impact: Dict[str, Any],
488
- recommendations: List[Dict[str, Any]],
489
- csv_file: Path) -> None:
521
+
522
+ def _generate_csv_export(
523
+ self, financial_impact: Dict[str, Any], recommendations: List[Dict[str, Any]], csv_file: Path
524
+ ) -> None:
490
525
  """Generate CSV export for financial data."""
491
526
  import csv
492
-
493
- with open(csv_file, 'w', newline='') as f:
527
+
528
+ with open(csv_file, "w", newline="") as f:
494
529
  writer = csv.writer(f)
495
-
530
+
496
531
  # Financial metrics section
497
- writer.writerow(['Financial Analysis'])
498
- writer.writerow(['Metric', 'Value', 'Notes'])
499
- writer.writerow(['Annual Cost Reduction', f"${financial_impact['annual_cost_reduction']:,.2f}", 'Conservative estimate'])
500
- writer.writerow(['Monthly Savings', f"${financial_impact['monthly_savings']:,.2f}", 'Ongoing benefit'])
501
- writer.writerow(['ROI Percentage', f"{financial_impact['roi_percentage']:.1f}%", 'Annual return'])
502
- writer.writerow(['Payback Period', f"{financial_impact['payback_period_months']:.1f} months", 'Investment recovery'])
532
+ writer.writerow(["Financial Analysis"])
533
+ writer.writerow(["Metric", "Value", "Notes"])
534
+ writer.writerow(
535
+ ["Annual Cost Reduction", f"${financial_impact['annual_cost_reduction']:,.2f}", "Conservative estimate"]
536
+ )
537
+ writer.writerow(["Monthly Savings", f"${financial_impact['monthly_savings']:,.2f}", "Ongoing benefit"])
538
+ writer.writerow(["ROI Percentage", f"{financial_impact['roi_percentage']:.1f}%", "Annual return"])
539
+ writer.writerow(
540
+ ["Payback Period", f"{financial_impact['payback_period_months']:.1f} months", "Investment recovery"]
541
+ )
503
542
  writer.writerow([]) # Empty row
504
-
543
+
505
544
  # Recommendations section
506
- writer.writerow(['Strategic Recommendations'])
507
- writer.writerow(['Category', 'Priority', 'Business Impact', 'Implementation Timeline'])
545
+ writer.writerow(["Strategic Recommendations"])
546
+ writer.writerow(["Category", "Priority", "Business Impact", "Implementation Timeline"])
508
547
  for rec in recommendations:
509
- writer.writerow([
510
- rec['category'],
511
- rec['priority'],
512
- rec['business_impact'],
513
- rec['implementation_timeline']
514
- ])
515
-
516
- def _display_executive_dashboard(self, result: ExecutiveDashboardResult,
517
- config: BusinessConfiguration) -> None:
548
+ writer.writerow(
549
+ [rec["category"], rec["priority"], rec["business_impact"], rec["implementation_timeline"]]
550
+ )
551
+
552
+ def _display_executive_dashboard(self, result: ExecutiveDashboardResult, config: BusinessConfiguration) -> None:
518
553
  """Display executive dashboard summary."""
519
-
554
+
520
555
  # Executive Summary Panel
521
556
  summary = result.business_summary
522
557
  financial = result.financial_impact
523
-
558
+
524
559
  summary_content = f"""
525
560
  šŸ† Executive Cost Optimization Dashboard
526
561
 
527
562
  šŸ“Š Business Intelligence Summary:
528
- • Infrastructure Analyzed: {summary['total_infrastructure_analyzed']:,} resources
529
- • Optimization Opportunities: {summary['optimization_opportunities_identified']:,}
530
- • High-Impact Opportunities: {summary['high_impact_opportunities']:,}
531
- • Annual Savings Potential: {format_cost(summary['annual_savings_potential'])}
563
+ • Infrastructure Analyzed: {summary["total_infrastructure_analyzed"]:,} resources
564
+ • Optimization Opportunities: {summary["optimization_opportunities_identified"]:,}
565
+ • High-Impact Opportunities: {summary["high_impact_opportunities"]:,}
566
+ • Annual Savings Potential: {format_cost(summary["annual_savings_potential"])}
532
567
 
533
568
  šŸ’° Financial Impact Analysis:
534
- • ROI Percentage: {financial['roi_percentage']:.1f}%
535
- • Payback Period: {financial['payback_period_months']:.1f} months
536
- • Net Annual Benefit: {format_cost(financial['net_annual_benefit'])}
537
- • Three-Year Value: {format_cost(financial['three_year_value'])}
569
+ • ROI Percentage: {financial["roi_percentage"]:.1f}%
570
+ • Payback Period: {financial["payback_period_months"]:.1f} months
571
+ • Net Annual Benefit: {format_cost(financial["net_annual_benefit"])}
572
+ • Three-Year Value: {format_cost(financial["three_year_value"])}
538
573
 
539
574
  šŸŽÆ Executive Deliverables:
540
575
  • Strategic Recommendations: {len(result.optimization_recommendations)} categories
@@ -544,16 +579,18 @@ class ExecutiveDashboardCreator:
544
579
 
545
580
  šŸ“ˆ Strategic Alignment:
546
581
  • Stakeholder Focus: {config.stakeholder_type.value.upper()}
547
- • Optimization Target: {config.optimization_target*100}%
548
- • Presentation Ready: {'āœ… Yes' if result.presentation_ready else 'āŒ No'}
582
+ • Optimization Target: {config.optimization_target * 100}%
583
+ • Presentation Ready: {"āœ… Yes" if result.presentation_ready else "āŒ No"}
549
584
  """
550
-
551
- console.print(create_panel(
552
- summary_content.strip(),
553
- title=f"šŸ† Executive Dashboard - {config.stakeholder_type.value.upper()} Ready",
554
- border_style="green"
555
- ))
556
-
585
+
586
+ console.print(
587
+ create_panel(
588
+ summary_content.strip(),
589
+ title=f"šŸ† Executive Dashboard - {config.stakeholder_type.value.upper()} Ready",
590
+ border_style="green",
591
+ )
592
+ )
593
+
557
594
  if result.export_files:
558
595
  console.print("\nšŸ“¤ [bold blue]Export Files Generated:[/bold blue]")
559
596
  for export_file in result.export_files:
@@ -561,16 +598,18 @@ class ExecutiveDashboardCreator:
561
598
 
562
599
 
563
600
  # Factory functions for easy integration
564
- def create_executive_dashboard_config(stakeholder_type: StakeholderType = StakeholderType.MANAGER,
565
- optimization_target: float = 0.25,
566
- export_formats: List[str] = None) -> BusinessConfiguration:
601
+ def create_executive_dashboard_config(
602
+ stakeholder_type: StakeholderType = StakeholderType.MANAGER,
603
+ optimization_target: float = 0.25,
604
+ export_formats: List[str] = None,
605
+ ) -> BusinessConfiguration:
567
606
  """Factory function to create business configuration."""
568
607
  export_formats = export_formats or ["json", "csv", "html"]
569
608
  return BusinessConfiguration(
570
609
  stakeholder_type=stakeholder_type,
571
610
  optimization_target=optimization_target,
572
611
  export_formats=export_formats,
573
- executive_reporting=True
612
+ executive_reporting=True,
574
613
  )
575
614
 
576
615
 
@@ -579,18 +618,17 @@ def get_executive_dashboard_creator(automation_engine: UniversalAutomationEngine
579
618
  return ExecutiveDashboardCreator(automation_engine)
580
619
 
581
620
 
582
- if __name__ == '__main__':
621
+ if __name__ == "__main__":
583
622
  # Test executive dashboard creation
584
623
  import asyncio
585
-
624
+
586
625
  async def test_dashboard():
587
626
  creator = ExecutiveDashboardCreator()
588
627
  config = create_executive_dashboard_config(StakeholderType.CFO)
589
-
628
+
590
629
  result = await creator.create_executive_dashboard(
591
- config=config,
592
- optimization_focus=OptimizationCategory.COST_OPTIMIZATION
630
+ config=config, optimization_focus=OptimizationCategory.COST_OPTIMIZATION
593
631
  )
594
632
  console.print(f"Dashboard created with {len(result.export_files)} export files")
595
-
596
- asyncio.run(test_dashboard())
633
+
634
+ asyncio.run(test_dashboard())