| """ |
| Integration module for the enhanced HVAC calculator. |
| |
| This module integrates all the enhancements into the main application: |
| 1. Window shading calculation fix |
| 2. Scenario comparison functionality |
| 3. Attribution and purpose information |
| """ |
|
|
| import sys |
| import os |
| import importlib |
| import streamlit as st |
|
|
| |
| sys.path.append(os.path.dirname(os.path.abspath(__file__))) |
|
|
| def integrate_enhancements(): |
| """ |
| Integrate all enhancements into the HVAC calculator application. |
| |
| This function: |
| 1. Integrates the scenario comparison functionality |
| 2. Adds attribution and purpose information |
| 3. Ensures the window shading calculation fix is applied |
| """ |
| |
| from utils.scenario_integration import add_scenario_ui_to_calculator, add_scenario_comparison_to_app |
| import app as app_module |
| import pages.cooling_calculator as cooling_module |
| import pages.heating_calculator as heating_module |
| |
| |
| |
| |
| add_scenario_ui_to_calculator(cooling_module, "cooling") |
| add_scenario_ui_to_calculator(heating_module, "heating") |
| |
| |
| add_scenario_comparison_to_app(app_module) |
| |
| |
| |
| |
| |
| |
| return { |
| "app": app_module, |
| "cooling_calculator": cooling_module, |
| "heating_calculator": heating_module |
| } |
|
|
| def run_enhanced_app(): |
| """ |
| Run the enhanced HVAC calculator application. |
| |
| This function integrates all enhancements and then runs the main application. |
| """ |
| |
| enhanced_modules = integrate_enhancements() |
| |
| |
| enhanced_modules["app"].main() |
|
|
| if __name__ == "__main__": |
| run_enhanced_app() |
|
|