Skip to content

add borrow_toggle_from_wtg#99

Merged
aclerc merged 3 commits into
mainfrom
ref-toggle
Jun 17, 2026
Merged

add borrow_toggle_from_wtg#99
aclerc merged 3 commits into
mainfrom
ref-toggle

Conversation

@aclerc

@aclerc aclerc commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Add borrow_toggle_from_wtg and associated logic to properly support analyses where each turbine has its own unique toggle pattern (in this case the references are always toggle off).

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds a toggle.borrow_toggle_from_wtg configuration option and integrates it into the toggle-based pre/post split so that when a non-test turbine is analyzed in the “test role” (e.g., reference round-robin), it can borrow a real test turbine’s toggle pattern and avoid an empty post period.

Changes:

  • Added Toggle.borrow_toggle_from_wtg (default None) plus WindUpConfig validation ensuring it references a turbine in cfg.test_wtgs.
  • Updated PrePostSplitter.split() to optionally use the borrowed turbine’s toggle series when test_wtg_name is not a configured test turbine.
  • Added unit tests covering the new config validation and the splitter’s borrowing behavior.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
wind_up/models.py Adds the new config field and a validator to restrict it to test_wtgs.
wind_up/interface.py Implements borrowing logic in toggle-based splitting via add_toggle_signals.
tests/test_models.py Adds validation tests for borrow_toggle_from_wtg (default/accept/reject).
tests/test_interface.py Adds behavioral tests ensuring borrowed vs. own toggle patterns are applied correctly.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@aclerc
aclerc marked this pull request as ready for review June 17, 2026 15:41
@aclerc
aclerc merged commit 4915fea into main Jun 17, 2026
5 checks passed
@aclerc
aclerc deleted the ref-toggle branch June 17, 2026 15:41
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