[WAVE 1] Test printing OCPs without controls#1069
Open
mickaelbegon wants to merge 1 commit into
Open
Conversation
Contributor
Author
|
Wave 1 preparation update: this PR does not touch plotting code. Its shared Matplotlib failure is addressed by prerequisite #1081; it will remain draft until that prerequisite lands and CI is rerun. |
mickaelbegon
force-pushed
the
codex/fix-637-print-control-type-none
branch
from
July 23, 2026 13:43
be0f093 to
fcd3159
Compare
mickaelbegon
marked this pull request as ready for review
July 23, 2026 13:46
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1069 +/- ##
=======================================
Coverage 77.26% 77.26%
=======================================
Files 196 196
Lines 21506 21506
=======================================
Hits 16616 16616
Misses 4890 4890
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Summary
ocp.print()with no control variablesControlType.NONEfixture to the current dynamics signaturen_phaseargument so the regression stays lightweightContext
The production printing code now skips empty control collections correctly, so the historical crash is no longer reproducible. However, the existing no-control test returned before constructing its OCP and could not protect this behavior. This PR restores a small executable path specifically for the reported issue.
Validation
MPLCONFIGDIR=/private/tmp/bioptim-mpl-637 python -m pytest tests/shard6/test_controltype_none.py::test_print_control_type_none -q(1 passed)git diff --checkCloses #637
This change is