Skip to content

MNT: draw Monte Carlo box plots with orientation instead of vert - #1235

Merged
Gui-FernandesBR merged 2 commits into
developfrom
mnt/boxplot-orientation
Dec 6, 2026
Merged

Gui-FernandesBR merged 2 commits into
developfrom
mnt/boxplot-orientation

Conversation

@Gui-FernandesBR

Copy link
Copy Markdown
Member

Fixes #1230

Matplotlib 3.11 deprecates boxplot(vert=...) and 3.13 removes it, so both box plots in MonteCarloPlots now pass orientation="horizontal". That argument only exists from Matplotlib 3.10 (December 2024), so the floor in requirements.txt moves from 3.9 to 3.10 instead of branching on the installed version. The two new tests turn MatplotlibDeprecationWarning into an error and fail on the old calls with Matplotlib 3.11.

🤖 Generated with Claude Code

https://claude.ai/code/session_01XDW575d9C9zpS7Z1v2KXVq

@Gui-FernandesBR
Gui-FernandesBR requested a review from a team as a code owner November 21, 2026 13:24
@codecov

codecov Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.33%. Comparing base (48a9abe) to head (05b3913).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #1235   +/-   ##
========================================
  Coverage    87.33%   87.33%           
========================================
  Files          130      130           
  Lines        18161    18161           
========================================
  Hits         15861    15861           
  Misses        2300     2300           

☔ 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.

@Gui-FernandesBR Gui-FernandesBR left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

LGTM

Fixes #1230. Matplotlib 3.11 deprecates boxplot(vert=...) and 3.13 removes it, so both box plots in MonteCarloPlots now pass orientation="horizontal". That argument only exists from Matplotlib 3.10, so the floor in requirements.txt moves from 3.9 to 3.10. The new tests turn MatplotlibDeprecationWarning into an error and fail on the old calls.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XDW575d9C9zpS7Z1v2KXVq
@Gui-FernandesBR
Gui-FernandesBR force-pushed the mnt/boxplot-orientation branch from 97581f1 to c6eb782 Compare December 6, 2026 00:32

@Gui-FernandesBR Gui-FernandesBR left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Review Summary

Blockers: 0 · Warnings: 1 · Suggestions: 2

No blockers — requirements.txt and rocketpy/plots/monte_carlo_plots.py look clean and cover all boxplot / vert= usages in the repo. (Note: no CLAUDE.md in this repo, so only the general checklist was applied.)

Details

  • Warning: Close matplotlib figures in a fixture/teardown so failures do not leak figures or read stale ones.
  • Suggestions: Use distinct data ranges for other in the comparison test; assert mock_show.assert_called_once() to remove # pylint: disable=unused-argument.

@Gui-FernandesBR
Gui-FernandesBR merged commit 0ca4d94 into develop Dec 6, 2026
9 checks passed
@Gui-FernandesBR
Gui-FernandesBR deleted the mnt/boxplot-orientation branch December 6, 2026 00:56
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