Skip to content

[WAVE 1] Test cost printing across uneven multiphase states#1076

Open
mickaelbegon wants to merge 2 commits into
pyomeca:masterfrom
mickaelbegon:codex/fix-712-multiphase-print-cost
Open

[WAVE 1] Test cost printing across uneven multiphase states#1076
mickaelbegon wants to merge 2 commits into
pyomeca:masterfrom
mickaelbegon:codex/fix-712-multiphase-print-cost

Conversation

@mickaelbegon

@mickaelbegon mickaelbegon commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Summary

  • exercise Solution.print_cost() on a multiphase OCP whose phases have different state dimensions
  • assert both phase-specific objective and constraint sections are evaluated
  • preserve the current phase-local SolutionData behavior against the regression reported in Error sol.print_cost() #712

The faulty key-based concatenation described in #712 has already disappeared in the current implementation. This focused regression test documents and protects the corrected behavior.

Validation

  • pytest tests/shard5/test_global_torque_driven_ocp.py::test_phase_transition_uneven_variable_number_by_mapping -q
  • 2 passed

This change is Reviewable

@mickaelbegon mickaelbegon changed the title Test cost printing across uneven multiphase states [WAVE 1] Test cost printing across uneven multiphase states Jul 22, 2026
@mickaelbegon

Copy link
Copy Markdown
Contributor Author

Wave 1 preparation update: this PR remains intentionally isolated. Full CI is waiting behind the shared Matplotlib prerequisite #1081; it will be marked ready after that lands and checks are rerun.

@mickaelbegon
mickaelbegon force-pushed the codex/fix-712-multiphase-print-cost branch from cf5b33d to 31527d0 Compare July 23, 2026 13:43
@mickaelbegon
mickaelbegon marked this pull request as ready for review July 23, 2026 13:46
@codecov

codecov Bot commented Jul 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.26%. Comparing base (5ed90c1) to head (31527d0).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1076   +/-   ##
=======================================
  Coverage   77.26%   77.26%           
=======================================
  Files         196      196           
  Lines       21506    21506           
=======================================
  Hits        16616    16616           
  Misses       4890     4890           
Flag Coverage Δ
unittests 77.26% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

1 participant