add borrow_toggle_from_wtg#99
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
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(defaultNone) plusWindUpConfigvalidation ensuring it references a turbine incfg.test_wtgs. - Updated
PrePostSplitter.split()to optionally use the borrowed turbine’s toggle series whentest_wtg_nameis 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
marked this pull request as ready for review
June 17, 2026 15:41
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add
borrow_toggle_from_wtgand associated logic to properly support analyses where each turbine has its own unique toggle pattern (in this case the references are always toggle off).