Skip to content

Add stochasticity#4

Merged
FelixCAAuer merged 9 commits intomainfrom
feature/stochasticity
Jun 16, 2025
Merged

Add stochasticity#4
FelixCAAuer merged 9 commits intomainfrom
feature/stochasticity

Conversation

@FelixCAAuer
Copy link
Copy Markdown
Contributor

No description provided.

@FelixCAAuer FelixCAAuer requested a review from Copilot June 16, 2025 15:13
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Adds support for stochastic scenarios by introducing a Global_Scenarios table with related XML definitions, Excel reader/writer methods, and scenario‐based filtering in the CaseStudy API.

  • Update changelog to document the new Global_Scenarios feature
  • Extend TableDefinitions.xml with Global_Scenarios and its columns
  • Implement write_dGlobal_Scenarios, get_dGlobal_Scenarios, and scenario filtering in CaseStudy

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
changelog-LEGOExcels.md Added Global_Scenarios section in the changelog
TableDefinitions.xml Defined new Global_Scenarios table and added column metadata
ExcelWriter.py Introduced write_dGlobal_Scenarios and updated writer combinations
ExcelReader.py Added get_dGlobal_Scenarios reader function
CaseStudy.py Integrated dGlobal_Scenarios in init and added scenario filtering
Comments suppressed due to low confidence (5)

ExcelReader.py:64

  • The docstring states this parameter is unused, but it is passed as keep_excl_columns to __read_non_pivoted_file. Please update the description to reflect its actual use.
:param keep_excluded_entries: Unused but kept for compatibility with other functions

ExcelWriter.py:196

  • [nitpick] New I/O methods (write_dGlobal_Scenarios) are introduced; adding unit tests or integration tests would help ensure correct file generation and catch future regressions.
def write_dGlobal_Scenarios(self, dGlobal_Scenarios: pd.DataFrame, folder_path: str) -> None:

TableDefinitions.xml:613

  • It looks like 'relativeWeight' is being added under the Power_Hindex definition; confirm it belongs in the Global_Scenarios table definition instead.
<Column id="relativeWeight">

TableDefinitions.xml:627

  • The 'scenarioID' column is defined here but appears intended for Global_Scenarios. Please verify placement under the correct TableDefinition.
<Column id="scenarioID">

CaseStudy.py:44

  • Using self.example_folder here may be a typo; other files use self.data_folder. Confirm the correct base path is used for loading Global_Scenarios.
self.dGlobal_Scenarios = ExcelReader.get_dGlobal_Scenarios(self.example_folder + self.global_scenarios_file)

@FelixCAAuer FelixCAAuer merged commit 9ad2d47 into main Jun 16, 2025
6 checks passed
@FelixCAAuer FelixCAAuer deleted the feature/stochasticity branch June 16, 2025 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants