MNT: Rename radius to radius_function in CylindricalTank and SphericalTank#957
Merged
Gui-FernandesBR merged 7 commits intoJun 19, 2026
Merged
Conversation
Copilot
AI
changed the title
[WIP] Fix name conflict in radius property and input of TankGeometry
MNT: Rename Apr 29, 2026
radius to radius_function in CylindricalTank and SphericalTank
…lTank Agent-Logs-Url: https://github.com/RocketPy-Team/RocketPy/sessions/34182dad-3a90-44dc-96a2-e29c6a9b9f55 Co-authored-by: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>
…ion parameter Agent-Logs-Url: https://github.com/RocketPy-Team/RocketPy/sessions/34182dad-3a90-44dc-96a2-e29c6a9b9f55 Co-authored-by: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>
17c4ac8 to
df04850
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #957 +/- ##
===========================================
+ Coverage 80.27% 81.17% +0.90%
===========================================
Files 104 113 +9
Lines 12769 14689 +1920
===========================================
+ Hits 10250 11924 +1674
- Misses 2519 2765 +246 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Gui-FernandesBR
added a commit
that referenced
this pull request
Jul 4, 2026
* MNT: final fixes before next release Documentation, CHANGELOG and test polish ahead of the next release (v1.13.0), covering PRs merged since v1.12.0. CHANGELOG - Add missing entries: Individual Fins (#818), AIGFS/HRRR forecast models (#951), duplicate-controller fix (#949), Valkyrie flight example (#967). - Hygiene: de-duplicate #958/#966, move #974 to Fixed and #1041 to Removed only, drop the already-released #914 duplicate, and point the logging (#973) and ND-interp (#969) entries at their PRs. - Backfill #940/#941/#944 (shipped in v1.12.0 code but never logged) under the [v1.12.0] section. Docs - New exceptions reference page (rocketpy.exceptions) wired into the reference index; note UnstableRocketWarning in the rocket stability docs (#970). - tanks.rst: switch examples to radius_function= and add a deprecation note (#957). - forecast.rst: fix the HRRR example (missing code directive + stray sentence) (#951). - airbrakes.rst: document discrete vs continuous controllers (sampling_rate=None) (#946). - rocket_usage.rst: note that Parachute is now an abstract base; instantiate HemisphericalParachute (#958). Tests - New regression tests: 3D ND-interp NaN outside convex hull (#969), abstract Parachute cannot be instantiated (#958), Monte Carlo convergence stopping (#922), EnvironmentAnalysis surviving wind API (#1041), radial-burn grain geometry over time (#944), RingClusterMotor full flight (#924), discrete controller invoked once per node (#949), acceleration-based parachute trigger deploys (#911). - Backfill regression tests for ThrustCurve API timeouts (#940) and power_off/on_drag Function objects + _input attributes (#941). * make format
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CylindricalTankandSphericalTankstored their scalar radius input privately (__input_radius) while theTankGeometry.radiusproperty returns aPiecewiseFunction. This meantStochasticModel(which callsgetattr(obj, input_name)) would get theFunctioninstead of the original scalar when accessingobj.radius.Changes
CylindricalTank/SphericalTank: Renamed constructor parameterradius→radius_function; stored asself.radius_function(public), replacing the private__input_radiusradius=keyword arg accepted via**kwargswith aDeprecationWarningpointing toradius_functionto_dict()now emits"radius_function"key;from_dict()handles both keys (deprecated"radius"triggersDeprecationWarning)to_dictkey nameMigration
After this change,
obj.radius_functionreturns the original scalar input whileobj.radiuscontinues to return thePiecewiseFunctionof height.Pull request type
Checklist
black rocketpy/ tests/) has passed locallypytest tests -m slow --runslow) have passed locallyCHANGELOG.mdhas been updated (if relevant)Current behavior
CylindricalTank(radius=0.1, height=2.0).radiusreturns aPiecewiseFunction, not0.1.StochasticModelsthat callgetattr(obj, 'radius')to retrieve the nominal scalar value get the wrong type.New behavior
obj.radius_functionexposes the original scalar input.obj.radiusis unchanged (still thePiecewiseFunction). Oldradius=usage triggersDeprecationWarning.Breaking change
Keyword-argument callers using
radius=will see aDeprecationWarning. Serialized data with a"radius"key into_dict()output will trigger aDeprecationWarningonfrom_dict(). Positional callers are unaffected.