Skip to content

Multiple Switches and Time Series DF Improvements - #201

Merged
zzink-nrel merged 7 commits into
mainfrom
zz/switch_and_power_df
Aug 3, 2026
Merged

Multiple Switches and Time Series DF Improvements#201
zzink-nrel merged 7 commits into
mainfrom
zz/switch_and_power_df

Conversation

@zzink-nrel

@zzink-nrel zzink-nrel commented Jul 29, 2026

Copy link
Copy Markdown
Contributor
  • Improve time series df creation speed
  • Allow for multiple time series metadata as is the case for use of multiple time series with different feature values
  • Handle loops with multiple switches contained in the loop.

Change Summary

Related issue number

Checklist

  • The pull request title is a good summary of the changes.
  • Tests for the changes exist
  • Tests pass on CI
  • Documentation reflects the changes where applicable
  • My PR is ready to review, please add a comment including "please review" to assign reviewers

@zzink-nrel
zzink-nrel requested a review from AadilLatif July 29, 2026 20:31
@zzink-nrel zzink-nrel changed the title Zz/switch and power df Multiple Switches and Time Series DF Improvements Jul 29, 2026

@AadilLatif AadilLatif left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good overall, just two things:

  1. In get_directed_graph — if switch_edges returns edges that aren't in the DFS tree (the warning branch), the cycle never gets broken and the while cycles: loop spins forever. You could pop the cycle off the list in that branch to be safe:
else:
    logger.warning(...)
    cycles.pop(0)
    continue
  1. _get_timestamps return annotation still says -> list but the SingleTimeSeries branch now returns a pd.DatetimeIndex. Not blocking but worth fixing while you're in there.

Everything else is clean. The numpy-based df assembly is a nice perf win.

@sonarqubecloud

Copy link
Copy Markdown

@zzink-nrel
zzink-nrel requested a review from AadilLatif July 31, 2026 16:37
@zzink-nrel
zzink-nrel merged commit 1dd0294 into main Aug 3, 2026
5 checks passed
@zzink-nrel
zzink-nrel deleted the zz/switch_and_power_df branch August 3, 2026 17:57
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