Skip to content

Add identification functions - #105

Merged
JulStraus merged 2 commits into
mainfrom
feat/check_ts
Oct 19, 2026
Merged

JulStraus merged 2 commits into
mainfrom
feat/check_ts

Conversation

@JulStraus

Copy link
Copy Markdown
Collaborator

New exported functions has_opscenarios and has_repr_periods check whether a TimeStructure or TimeStructurePeriod contains OperationalScenarios or RepresentativePeriods. They work on all structures, including TwoLevelTree and the single-period wrappers.

This PR hence closes #78.

- OperationalScenarios and
- RepresentativePeriods
@JulStraus
JulStraus requested review from hellemo and trulsf October 16, 2026 13:03
@JulStraus JulStraus added the enhancement New feature or request label Oct 16, 2026
@codecov-commenter

codecov-commenter commented Oct 16, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
src/TimeStruct.jl 100.00% <ø> (ø)
src/structures.jl 80.00% <ø> (ø)
src/utils.jl 86.92% <100.00%> (+2.55%) ⬆️
🚀 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.

Looks fine. It could be a possibility to have a version for a generic TimeStructure that defaults to false, saving some lines, but I think I like to have the explicit false declarations.

@JulStraus

Copy link
Copy Markdown
Collaborator Author

Looks fine. It could be a possibility to have a version for a generic TimeStructure that defaults to false, saving some lines, but I think I like to have the explicit false declarations.

I considered it, but thought there is no harm in being explicit. A default false may be a problem in a future instance if we implement new time structures. In this situation, I think it is better to throw a MethodError.

@JulStraus
JulStraus merged commit 8553d92 into main Oct 19, 2026
6 checks passed
@JulStraus
JulStraus deleted the feat/check_ts branch October 19, 2026 06:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Identification of sub time structures

3 participants