Skip to content

BUG: accept static_margin assignment with a DeprecationWarning - #1225

Merged
Gui-FernandesBR merged 1 commit into
developfrom
bug/static-margin-setter
Nov 20, 2026
Merged

Gui-FernandesBR merged 1 commit into
developfrom
bug/static-margin-setter

Conversation

@Gui-FernandesBR

Copy link
Copy Markdown
Member

Related to #1209

Since the lazy static margin change, rocket.static_margin = ... raises AttributeError, which worked on v1.13. This adds a setter that accepts the assignment, emits a DeprecationWarning at the caller's line, and keeps the value until the next geometry, mass or surface change marks the margin dirty (the same way a later evaluate_static_margin overwrote it on v1.13). Internal code writes to _static_margin and never triggers the warning. It was the only attribute that became read-only in that change.

🤖 Generated with Claude Code

https://claude.ai/code/session_01XDW575d9C9zpS7Z1v2KXVq

Rocket.static_margin became a read-only property, so assigning it raised AttributeError. The setter warns and keeps the value until the next geometry, mass or surface change.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01XDW575d9C9zpS7Z1v2KXVq
@Gui-FernandesBR
Gui-FernandesBR requested a review from a team as a code owner November 19, 2026 23:31
@codecov

codecov Bot commented Nov 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.55%. Comparing base (9bf63a0) to head (d9ffb06).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #1225   +/-   ##
========================================
  Coverage    86.55%   86.55%           
========================================
  Files          131      131           
  Lines        18248    18255    +7     
========================================
+ Hits         15794    15801    +7     
  Misses        2454     2454           

☔ 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 merged commit 47bbd24 into develop Nov 20, 2026
10 checks passed
@Gui-FernandesBR
Gui-FernandesBR deleted the bug/static-margin-setter branch November 20, 2026 20:42
MateusStano added a commit that referenced this pull request Nov 28, 2026
* 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]>
@MateusStano MateusStano mentioned this pull request Nov 28, 2026
8 tasks done
MateusStano added a commit that referenced this pull request Nov 29, 2026
Put back the deprecated Rocket.static_margin setter from #1225, so the
assignment keeps working with a DeprecationWarning for one more release.
Reword the callable-gravity potential energy test, add a NaN altitude test
for potential_energy, and match NumPy's message in the sensor seed tests.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
MateusStano added a commit that referenced this pull request Nov 29, 2026
* MNT: drop the deprecated static_margin setter

The static margin is computed from the rocket, and assigning it was never
documented. Assigning it raises AttributeError again.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* MNT: simplify the sensor seed check

Replace the seed type alias, its two helpers and the type hints with one check
that rejects random generator objects, and shorten the comments, the error
message and the seed docstrings. NumPy rejects any other invalid seed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* MNT: clean up the tip-off and energy code in Flight

- The out_of_rail_* docstrings say the upper rail button leaves the rail.
- Remove Flight.attitude_unit; udot_rail2 computes the rail direction.
- Remove _gravitational_potential_per_mass; potential_energy integrates
  Environment.gravity with Function.integral.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* MNT: let Parachute alone decide what a valid trigger is

Inline the height trigger check in Parachute, and have StochasticParachute
build a Parachute for each trigger member instead of restating the rules.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* DOC: list the current required packages on the installation page

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* MNT: install contextily on Python 3.14 too

rasterio, which contextily needs, now ships Python 3.14 wheels for Linux,
macOS and Windows, so the background map of the Monte Carlo plots no longer
needs to be skipped there.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* MNT: keep the static_margin setter and address review nits

Put back the deprecated Rocket.static_margin setter from #1225, so the
assignment keeps working with a DeprecationWarning for one more release.
Reword the callable-gravity potential energy test, add a NaN altitude test
for potential_energy, and match NumPy's message in the sensor seed tests.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* TST: check the gravity integral at a NaN altitude

The previous test built potential_energy from a NaN altitude, which raises
in the mass product on develop as well. Test the per-node integral that
potential_energy relies on instead, for array and callable gravity.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
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