Skip to content

Forward repr_periods and opscenarios of single strategic scenarios - #111

Merged
JulStraus merged 1 commit into
mainfrom
fix/single_strat_scen
Oct 30, 2026
Merged

JulStraus merged 1 commit into
mainfrom
fix/single_strat_scen

Conversation

@JulStraus

Copy link
Copy Markdown
Collaborator

repr_periods and opscenarios of SingleStrategicScenario and SingleStrategicScenarioWrapper forward to the internal time structure, as strat_periods already did. Before, loops over strategic_scenarios of a structure without strategic scenarios returned a single element instead of the representative periods and scenarios inside it. On the wrapper both functions threw a MethodError

This is fixed in this PR.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@JulStraus
JulStraus requested a review from trulsf October 29, 2026 09:23
@JulStraus JulStraus added the bug Something isn't working label Oct 29, 2026
@JulStraus

Copy link
Copy Markdown
Collaborator Author

Thinking about it, I am uncertain whether we want to define it for SingleStrategicScenarioWrapper. But then again, we had it also for strat_periods. And I realized I want the functions in a different file ;) Will fix that

@JulStraus

Copy link
Copy Markdown
Collaborator Author

Or no, I cannot have it in the file I wanted to have it as it would ruin a bit the docstring documentation. That would require then more work.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
src/op_scenarios/opscenarios.jl 76.47% <100.00%> (+0.56%) ⬆️
src/representative/rep_periods.jl 87.83% <100.00%> (+0.33%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@trulsf trulsf left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@JulStraus
JulStraus merged commit b4bcae1 into main Oct 30, 2026
6 checks passed
@JulStraus
JulStraus deleted the fix/single_strat_scen branch October 30, 2026 05:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants