Skip to content

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

Merged
pariterre merged 2 commits into
pyomeca:masterfrom
mickaelbegon:codex/fix-712-multiphase-print-cost
Jul 26, 2026
Merged

[WAVE 1] Test cost printing across uneven multiphase states#1076
pariterre merged 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 (89c83a3).
⚠️ 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.

@pariterre pariterre left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

:lgtm:

@pariterre reviewed 1 file and all commit messages, and made 1 comment.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on mickaelbegon).

@pariterre
pariterre merged commit d0c7a06 into pyomeca:master Jul 26, 2026
23 of 24 checks passed
@mickaelbegon

Copy link
Copy Markdown
Contributor Author

Codex analysis

CI follow-up after commit 89c83a3:

  • a fresh CI matrix replaced the two stale check statuses;
  • Ubuntu shard 1 and Windows shard 5 now both report success normally;
  • the two parameterizations of the uneven-multiphase cost-printing regression test pass locally on macOS;
  • all automated CI checks are green. The only remaining pending status is Reviewable, which represents human review rather than a test.

No code change was required for the stale GitHub check metadata.

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