Skip to content

Fix set_time_series_active_power_predefined to auto-set timeindex whe…#623

Open
nader-00 wants to merge 1 commit intodevfrom
fix/predefined-timeindex-auto-set
Open

Fix set_time_series_active_power_predefined to auto-set timeindex whe…#623
nader-00 wants to merge 1 commit intodevfrom
fix/predefined-timeindex-auto-set

Conversation

@nader-00
Copy link
Copy Markdown
Collaborator

@nader-00 nader-00 commented May 5, 2026

Description

Fixes an issue where [set_time_series_active_power_predefined] could leave [TimeSeries.timeindex] empty when importing predefined profiles without an explicit timeindex.

  • Automatically set TimeSeries.timeindex to default year (2011 or scenario-based) when importing predefined time series without explicit timeindex
  • Add warning log when auto-setting timeindex
  • Add regression test to ensure timeindex is properly set

Fixes #457

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • New and adjusted code is formatted using the pre-commit hooks
  • New and adjusted code includes type hinting now
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • The Read the Docs documentation is compiling correctly
  • If new packages are needed, I added them the setup.py, and if needed the rtd_requirements.txt, the eDisGo_env.yml and the eDisGo_env_dev.yml.
  • I have added new features to the corresponding whatsnew file

…n empty

- Automatically set TimeSeries.timeindex to default year (2011 or scenario-based) when importing predefined time series without explicit timeindex
- Add warning log when auto-setting timeindex
- Add regression test to ensure timeindex is properly set
@nader-00 nader-00 requested a review from MoritzSchloesser May 5, 2026 11:03
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.

1 participant