Repository navigation
MNT: raise typed stochastic exceptions instead of bare AssertionError - #1221
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #1221 +/- ##
===========================================
+ Coverage 86.71% 86.86% +0.14%
===========================================
Files 131 131
Lines 18292 18307 +15
===========================================
+ Hits 15862 15902 +40
+ Misses 2430 2405 -25 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Looks good. One thing before merging: the commit adds three empty files at the repo root, which look like test outputs committed by accident:
Can you remove them from the branch? After that I am fine with merging. |
eecb254 to
611a304
Compare
611a304 to
be07cd1
Compare
|
Removed the three |
The stochastic validators raised AssertionError for every bad input, which says nothing about whether the type or the value was wrong. They now raise StochasticTypeError or StochasticValueError from rocketpy.exceptions, which are also TypeError/ValueError and still AssertionError, so existing `except AssertionError` code keeps working. Messages are unchanged. Related to #1209. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01XDW575d9C9zpS7Z1v2KXVq
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01XDW577mr8JSrJHguXrmXzw
Wrong types in the positive-int list, ensemble members and parachute trigger now raise StochasticTypeError, and an empty trigger list raises StochasticValueError. The last plain TypeErrors in StochasticRocket and StochasticFlight become StochasticTypeError, and the tests assert the specific class for each of these sites. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01XDW577mr8JSrJHguXrmXzw
8aacf9d to
cb9130b
Compare
* DOC: backfill the v1.14.0 changelog The changelog automation has not run since #1112, so the PRs merged into develop after it were missing from [Unreleased]. Add them, add the entries for #1225, #1226 and #1227, update the tip-off, tube-fins and parachute-seed entries to what the release ships, and drop the raw commit link, the back-merge entry and the duplicate StochasticFreeFormFins entry. Related to #1209 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01XDW575d9C9zpS7Z1v2KXVq * DOC: add a Breaking changes section to the v1.14.0 changelog List what changes for a v1.13.0 user: Monte Carlo seeding and numbering, the deprecated static_margin assignment, the parachute trigger ValueError on the rail, the shifted flight results, and the sensor default temperature. Related to #1209 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01XDW575d9C9zpS7Z1v2KXVq * DOC: bring the v1.14.0 changelog up to date with develop Describe the forecast reuse and the opt-in disk cache that replaced the first cache (#1219), and add the PRs merged after the backfill: #1221, #1222, #1223, #1224, #1231, #1232, #1234, #1239 and #1242. Co-Authored-By: Claude Fable 5.2 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]> Co-authored-by: MateusStano <[email protected]>
Related to #1209
Covers the Exceptions item of the v1.14.0 checklist. The 48
raise AssertionErrorinrocketpy/stochasticnow raiseStochasticTypeError(wrong type or format) orStochasticValueError(right type, invalid value), as asked in #1194. Both live inrocketpy.exceptionsand also subclassTypeError/ValueErrorandAssertionError, so existingexcept AssertionErrorcode keeps working; the messages are unchanged.🤖 Generated with Claude Code
https://claude.ai/code/session_01XDW575d9C9zpS7Z1v2KXVq