Skip to content

Rel/v1.12.0#935

Open
MateusStano wants to merge 38 commits intomasterfrom
rel/v1.12.0
Open

Rel/v1.12.0#935
MateusStano wants to merge 38 commits intomasterfrom
rel/v1.12.0

Conversation

@MateusStano
Copy link
Member

I am changing how we make realeases a bit. We were previously making three PRs for each release:

  • One for merging develop into master
  • One for updating master version
  • One for updating develop version

This time I am simply making one PR from a branch that already has the correct versioning straight to master.

Important!

Readthedocs is not being built because of #933

phmbressan and others added 30 commits November 2, 2025 17:49
MNT: update develop to release v1.11.0
Co-authored-by: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>
* DOC: Add entry for custom warnings in CHANGELOG.md

Added a placeholder in the [Unreleased] section for the upcoming feature
to add custom warnings when a rocket is missing motors and/or aero-surface. See #285.

* ENH: add custom warning for Rocket with no components

This enhancement adds a warning when a Rocket object has no motors,
parachutes, or AeroSurface components. It notifies the user so that
they can add missing components before running simulations. See #285

* ENH:Add tests for _check_missing_components method in Rocket class

* TST:improve test_check_missing_no_components_missing to correctly handle warnings

* BUG: do not warn for rockets without parachute

Only warn if motor or aerodynamic surfaces are missing. Never raise a warning for no parachute. See #285

* TST:Update the test:do not warn when missing parachute

* MNT: simplify checks and update docstrings in rocket.py

- Removed redundant len() check for aerodynamic_surfaces.
- Added 'Returns: None' section to NumPy-style docstring.
- Removed redundant '[WARNING]' prefix in warnings messages.

* TST:update test_check_missing_no_components_missing to avoid TypeError: exceptions must be derived from Warning, not <class 'NoneType'>

* TST:update test_check_missing_no_components_missing:import the lib at the top of file

* TST:update test_check_missing_no_components_missing:import the lib at the top of file

* Fix lint errors

---------

Co-authored-by: Tang Xiaoyu <xiaoyu.tang.fr@gmail.com>
Co-authored-by: Marchma0 <nehlilkamel@gmail.com>
* Add the function to create a motor from the API of thrustcurve and the test

* Improve load_from_thrustcurve_api and test_load_from_thrustcurve_api with clean imports

* Clean up load_from_thrustcurve_api and improve test_load_from_thrustcurve_api with exception testing

* Use warnings.warn() in load_from_thrustcurve_api when motor is found (as requested)

* Added documentation for the load_from_thrustcurve_api method into the genericmotors.rst file

* Changes to conform to lint

* Fixed Pylint errors

* Update docs/user/motors/genericmotor.rst

Co-authored-by: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>

* Update docs/user/motors/genericmotor.rst

Co-authored-by: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>

* Update docs/user/motors/genericmotor.rst

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Set private the method call_thrustcurve_api

* Update docs/user/motors/genericmotor.rst

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update tests/unit/motors/test_genericmotor.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update rocketpy/motors/motor.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update docs/user/motors/genericmotor.rst

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update docs/user/motors/genericmotor.rst

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update docs/user/motors/genericmotor.rst

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Modify the changelog

* Bug fix

* Refactor GenericMotor class: comment out unused designation and manufacturer variables

* Add the function to create a motor from the API of thrustcurve and the test

* Improve load_from_thrustcurve_api and test_load_from_thrustcurve_api with clean imports

* Clean up load_from_thrustcurve_api and improve test_load_from_thrustcurve_api with exception testing

* Use warnings.warn() in load_from_thrustcurve_api when motor is found (as requested)

* Added documentation for the load_from_thrustcurve_api method into the genericmotors.rst file

* Changes to conform to lint

* Fixed Pylint errors

* Update docs/user/motors/genericmotor.rst

Co-authored-by: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>

* Update docs/user/motors/genericmotor.rst

Co-authored-by: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>

* Update docs/user/motors/genericmotor.rst

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Set private the method call_thrustcurve_api

* Update docs/user/motors/genericmotor.rst

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update tests/unit/motors/test_genericmotor.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update rocketpy/motors/motor.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update docs/user/motors/genericmotor.rst

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update docs/user/motors/genericmotor.rst

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update docs/user/motors/genericmotor.rst

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Modify the changelog

* Bug fix

---------

Co-authored-by: monta <montadharettaieb@gmail.com>
* ENH: Enable only radial burning

* DOC: Update docstring for only_radial_burn default value in HybridMotor

* fix pylint

---------

Co-authored-by: Gui-FernandesBR <guilherme_fernandes@usp.br>
* DRAFT: for ENH/3-dof-simulation (See  #655)

ENH: adds 3 DOF simulation capability to rocketpy.Flight.

*ENH: added "u_dot_3dof" for "solid_propulsion"
mode

*ENH: adding "u_dot_generalized_3dof" for "standard"
mode (still incomplete)

*ENH: new parameter "simulation_mode" for swtiching
between 3 dof and 6 dof

*ENH: updated conditions for "__init_equations_of_motion"

*ENH: 2 new example files have been created to test 3 dof model
"test_bella_lui_flight_sim" and "test_camoes_flight_sim"

* ENH/3-dof-simulation (See  RocketPy-Team#655)
ENH: adds 3 DOF simulation capability to rocketpy.Flight.

*ENH: added "u_dot_3dof" for "solid_propulsion"
mode

*ENH: added "u_dot_generalized_3dof" for "standard"
mode

*ENH: new parameter "simulation_mode" for swtiching
between 3 dof and 6 dof

*ENH: updated conditions for "__init_equations_of_motion"

* MNT: cleaned up new functions and
ENH: fixed standard 3 dof

*MNT: Cleaned up the "u_dot_3dof" and "u_dot_generalized_3_dof"

*MNT: Corrected Typos in "simulation_mode"
description

*ENH: "u_dot_generalized_3_dof" fixed and tested
on examples.

* ENH: Addition of point mass classes to rocketpy.rocket and rocketpy.motor

ENH: added "BaseRocket" and "PointMassRocket" to rocket class

ENH: added "PointMassMotor" to motor class with various input cases of thrust values

* ENH: PointMassMotor and PointMassRocket working as intended after some tests

ENH: Added a new jupyter notebook for a simplified 3 DOF example

MNT: PointMassMotor intialization error fixed

MNT: PointMassRocket properties enhanced based on the example runs

* MNT: Removing unnecessary files added by mistake.

* MNT: Cleaned up PointMassMotor and PointMassRocket class

MNT: Cleaned up the flight class u_dot_generalized_3dof

TODO: Add info for 3 dof cases and fix some new issues when parachute is added.

* MNT: Cleaning up flight class and PointMassMotor class

* MNT: point mass motor cleanup

-MNT: removing the parameters not needed for point mass kind of motors

-MNT: removing extra parameter thrust_curve

-MNT: fixing problems with motor class inheritance

* ENH: restructuring rocket class

-ENH: removed 'BaseRocket' class now 'PointMassRocket' inherits directly from 'Rocket' class

* MNT: fixing certain calculations on point mass motor

-MNT: fixed calculations of mass flow rate and exhaust velocity
-MNT: adjusted propellant initial mass setter error by allocating the input initial mass to the property

* Rename PointMassMotor.py to pointmassmotor.py

MNT: renaming pointmassmotor.py

-MNT:snake case renaming

* MNT: updates to 3dof example

-MNT: incorporating latest structural changes made to PointMassMotor and PointMassRocket

* MNT: lint cleanup and adding 3dof to init

-MNT: cleaned up PointMassRocket rocket.py for linters.
-ENH: including PointMassMotor in motors and rocketpy __init__.py
-MNT: adopting to structural changes in 3dof on the 3_DOF_TRIAL.ipynb
-MNT: including pointmassmotor in settings.json as a spell word

* MNT: Point mass motor and rocket fixes

- MNT: pointmassmotor fixing the various properties.
- MNT: fixing super init and init inheritance by changing order in pointmassrocket
- MNT: pointmassrocket property setter and default value fixes

* MNT: flight class fix on simulation mode detection

- MNT: implemented identification of simulation mode based on check if point mass objects are used

* MNT: make format changes

- MNT: used make format to correct formatting mistakes on all the new classes.

* MNT: point mass motor cleanup

-MNT: removing the parameters not needed for point mass kind of motors

-MNT: removing extra parameter thrust_curve

-MNT: fixing problems with motor class inheritance

* ENH: restructuring rocket class

-ENH: removed 'BaseRocket' class now 'PointMassRocket' inherits directly from 'Rocket' class

* MNT: fixing certain calculations on point mass motor

-MNT: fixed calculations of mass flow rate and exhaust velocity
-MNT: adjusted propellant initial mass setter error by allocating the input initial mass to the property

* Rename PointMassMotor.py to pointmassmotor.py

MNT: renaming pointmassmotor.py

-MNT:snake case renaming

* ENH: _MotorPrints inheritance - issue #460 (#828)

* ENH: refactor motor prints classes to inherit from _MotorPrints

* STY: make format

* ENH: add entry for _MotorPrints inheritance in changelog

* MNT: fix deprecations and warnings (#829)

* MNT: update code and remove deprecated functions

* MNT: simplify geodesic_to_utm import and usage in Environment class

* MNT: update CHANGELOG to fix deprecations and warnings

* make lint

* MNT: remove unused post_processed attribute from Flight class

* MNT: update matplotlib version to 3.8.3 in requirements.txt

* MNT: update matplotlib version to 3.10.0 in requirements.txt

* MNT: downgrade matplotlib version to 3.9.0 in requirements.txt

* MNT: change boxplot orientation to horizontal for compatibility with future Python versions

* MNT: change boxplot orientation from horizontal to vertical for consistency

* DEV: streamline caching of Python dependencies in GitHub Actions

* ENH: Add the Coriolis Force to the Flight class (#799)

* wind factor bug corrected

the wind factor wasn't applied to the env.wind_velocity properties

* BUG: StochasticModel visualize attributes of a uniform distribution

It showed the nominal and the standard deviation values and it doesn't make sense in a uniform distribution. In a np.random.uniform the 'nominal value' is the lower bound of the distribution, and the 'standard deviation' value is the upper bound. Now, a new condition has been added for the uniform distributions where the mean and semi range are calculated and showed. This way the visualize_attribute function will show the whole range where the random values are uniformly taken in

* variable names corrections

* Corrections requested by the pylint test

* ENH: add multiplication for 2D functions in rocketpy.function

Added the ability to multiply functions with 2D domains in the __mul__ function

* ENH: StochasticAirBrakes class created

The StochasticAirBrakes class has been created. The __init__.py files in the stochastic and rocketpy folders have also been modified accordingly to incorporate this new class

* ENH: set_air_brakes function created

This functions appends an airbrake and controller objects previuosly created to the rocket

* ENH: add StochasticAirBrake to rocketpy.stochastic_rocket

Some functions has been modified and other has been created in order to include the new StochasticAirBrakes feature into the StochasticRocket class. A new function named 'add_air_brakes' has been created to append a StochasticAirBrakes and Controller objects to the StochasticRocket object. A new function '_create_air_brake' has been introduced to create a sample of an AirBrake object through a StochasticAirBrake object. Enventually, the 'create_object' function has been modified to add the sampled AirBrakes to the sampled Rocket

* BUG: StochasticAirBrake object input in _Controller

When defining the _Controller object a StochasticAirBrake was input. This is already corrected and a AirBrake object is now introduced

* ENH: add time_overshoot option to rocketpy.stochastic_flight

Since the new StochasticAirBrake class is defined, we need the 'time_overshoot' option in the Flight class to ensure that the time step defined in the simulation is the controller sampling rate. The MonteCarlo class has had to be modified as well to include this option.

* DOC: StochasticAirBrakes related documentation added

Documentation related to the StochasticAirBrakes implementation has been added in StochasticAirBrakes, StochasticRocket and Rocket classes.

* ENH: pylint recommendations done

* ENH: Reformatted files to pass Ruff linting checks

* ENH: Update rocketpy/stochastic/stochastic_rocket.py

Unnecessary comment

Co-authored-by: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>

* ENH: more intuitive uniform distribution display in StochasticModel

Co-authored-by: MateusStano <69485049+MateusStano@users.noreply.github.com>

* DOC: improve drag curve factor definition in StochasticAirBrakes

* ENH: Change assert statement to if

Co-authored-by: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>

* DOC: better explanation of __mul__ function

Co-authored-by: MateusStano <69485049+MateusStano@users.noreply.github.com>

* ENH: delete set_air_brakes function for simplicity

* ENH: inertial foreces added to u_dot_generalized

* ENH: define Earth's angular velocity vector in Environment

* ENH: some corrections to the Flight class

* ENH: modifications in the Flight class

* DOC: improving Environment documentation

* DOC: more improvements in the Environment class

* ENH: format changes done

* DOC: env.earth_rotation_vector improved

Co-authored-by: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>

* ENH: Coriolis acceleration added to u_dot

* BUG: print left

* ENH: ruff changes

* ENH: CHANGELOG updated

* ENH: remove unecessary frame rotation

* ENH: remove rotation from solid prop udot

* ENH: add coriolis to parachute

* TST: fix tests values

* MNT: remove debug functions

* DEV: changelog

---------

Co-authored-by: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>
Co-authored-by: MateusStano <69485049+MateusStano@users.noreply.github.com>
Co-authored-by: MateusStano <go34lap@mytum.de>
Co-authored-by: MateusStano <mateusstano@usp.br>

* MNT: deprecated decorator (#830)

* ENH: refactor motor prints classes to inherit from _MotorPrints

* STY: make format

* MNT: update code and remove deprecated functions

* ENH: add deprecation decorator and update deprecated methods

* make format

* fix warnings

* MNT: updates to 3dof example

-MNT: incorporating latest structural changes made to PointMassMotor and PointMassRocket

* MNT: lint cleanup and adding 3dof to init

-MNT: cleaned up PointMassRocket rocket.py for linters.
-ENH: including PointMassMotor in motors and rocketpy __init__.py
-MNT: adopting to structural changes in 3dof on the 3_DOF_TRIAL.ipynb
-MNT: including pointmassmotor in settings.json as a spell word

* MNT: Point mass motor and rocket fixes

- MNT: pointmassmotor fixing the various properties.
- MNT: fixing super init and init inheritance by changing order in pointmassrocket
- MNT: pointmassrocket property setter and default value fixes

* MNT: flight class fix on simulation mode detection

- MNT: implemented identification of simulation mode based on check if point mass objects are used

* MNT: make format changes

- MNT: used make format to correct formatting mistakes on all the new classes.

* MNT: rocket.py removed pointmassrocket inertia

- MNT: removed dry inertia setters from pointmassrocket

* MNT: flight.py review updates

- MNT: fixed the order of attributes shifted simulation mode after ode solver
- MNT: added flight.simulation in docstring

* MNT: flight.py sanitization

- MNT: manually updated flight.py to match the current version on develop

* MNT: make format and renaming 3 dof example

- MNT: make format changes to flight.py
- MNT: "3_DOF_TRIAL.ipynb" renamed to "3_dof_trial_sim.ipynb"

* MNT: Update flight.py to remove duplicate line

Co-authored-by: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>

* MNT: correcting indentation in flight.py

- MNT: indentation error in flight class for callback under parachute trigger

* MNT: docstring for pointmassrocket in rocket.py

- MNT: added a short doc string describing pointmassrocket class

* MNT: removing property from rocket.py poitmassrocket

- MNT: properties which are similar to attributes are not needed were removed from pointmassrocket
- MNT: removing default set values for attributes for pointmassrocket

* ENH: first version of tests for 3dof rocketpy

- ENH: added first versions of tests using python assert statements for pointmassmotor, pointmassrocket and 3dof segments of flight.

* adds docs

* Refactor PointMassRocket class into its own module for improved organization and clarity

* refactored tests

* fix test

* remove example notebook

* type hint fix

* Configure matplotlib to use non-interactive backend for tests

* fix tests

* solve comments by copilot

* small fix

* DOC: Update test docstrings to follow RocketPy NumPy style guidelines

* docs: Update test docstrings to follow RocketPy style guidelines

Co-authored-by: aZira371 <99824864+aZira371@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: aZira371 <99824864+aZira371@users.noreply.github.com>

---------

Co-authored-by: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>
Co-authored-by: Gui-FernandesBR <guilherme_fernandes@usp.br>
Co-authored-by: Kevin Alcañiz <kevinalcaniz22@gmail.com>
Co-authored-by: MateusStano <69485049+MateusStano@users.noreply.github.com>
Co-authored-by: MateusStano <go34lap@mytum.de>
Co-authored-by: MateusStano <mateusstano@usp.br>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
* created new branch

* ENH: Add MERRA-2 compatibility with unit conversion and documentation.

* ENH: Finalize MERRA-2 support (Resolve conflicts, Update Docs)

* Style: Fix ruff formatting errors

* REV: Address all code review comments

* Apply suggestion from @Gui-FernandesBR

---------

Co-authored-by: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>
* ENH: Add persistent caching for ThrustCurve API and updated documentation

* REV: Address feedback (Robustness, Docstrings, Changelog)

* DOCS: Restore CHANGELOG history and add new entry

* REV: Final (hopefully) polish (Robustness test, Coverage, Docs)
* Initial plan

* Add save functionality to _MonteCarloPlots.all method

Co-authored-by: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>

* Improve test cleanup for monte_carlo_plots_all_save test

Co-authored-by: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>

* DOC: Add PR #848 to CHANGELOG.md

Co-authored-by: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>
…#885)

* Fix parallel Monte Carlo iteration count display to show monotonically increasing completed count

Co-authored-by: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>

* Add PR #806 to CHANGELOG.md

Co-authored-by: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>
* ENH: Create FlightComparator class

* ENH: Integrate FlightComparator into Flight class

* TST: Add comprehensive unit tests for FlightComparator

* DOCS: Add FlightComparator user guide and update CHANGELOG

* DOC: Fix doctest failure in FlightComparator docstring

* MTN: Cleaned up some comments

* ran ruff format

* ENH: Addressed feedback

* MNT: fix legend wording typos

* keeping these changes here

* Removed Flight.compare wrapper to fix circular imports, updated docs and tests accordingly

* removed pylint silencer

* addressed copilot feedback
* Add the method CI estimation and test

* Update the changelog

* Add the documentation

* Add more tests

* Update rocketpy/simulation/monte_carlo.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Added a button_height attribute to RailButtons with a default value of 15mm and updated the docstring

* added a _calculate_rail_button_bending_moments to calculate the desired attributes

* fixed new method added properties

* fixed typo

* fixed code, added documentation, updated changelog, added tests

* formatting

* FIX: Handle center_of_dry_mass_position as property or callable

* ENH: Address review feedback - make button_height optional (None), add prints/plots, improve documentation

* clarified documentation(assumptions) in flight.rst

* TST: Split default vs explicit None button_height tests

* make format

* MNT: Fix pylint config and remove duplicate test imports
* feat: add axial_acceleration with tests

* Update axial_acceleration.

* Update CHANGELOG

* Update CHANGELOG

* Refine docstring for axial_acceleration method

Updated docstring for axial_acceleration method to improve clarity.

---------

Co-authored-by: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>
…894)

* ENH: add animations for motor propellant mass and tank fluid volumes

* DOC: update changelog for animation enhancement

* TST:add test_show_or_save_animation_unsupported_format and solve some problems

* TST:add tests for the methods animate_propellant_mass and animate_fluid_volume and solve linters issues

* DOC:update documentation docs/user/motors/liquidmotor.rst and docs/user/motors/tanks.rst

* fix hangelog

* fix changelog

---------

Co-authored-by: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>
…f M, Re, α) (#875)

* Add grid interpolation support to Function class with from_grid() method

Co-authored-by: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>

* Add multi-dimensional drag coefficient support to Flight class and integration tests

Co-authored-by: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>

* Run ruff format on modified files

Co-authored-by: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>

* MNt: refactoring get_drag_coefficient in flight.py

- MNT: velocity_body was not being used in get_drag_coefficient, removed it as an input

* MNT: refactoring in flight.py and lint corrections to function.py and test_multidim_drag.py

-MNT:  removed unused velocity in body frame parameter requirement from all instances of get_drag_coefficient in flight.py

- MNT: corrected docstring for get_value_opt_grid in function.py

- MNT: shifted import of classes before the definition of functions in test_multidim_drag.py

* MNT: refactoring flight.py to remove unused parameters

* MNT: correction of docstring function.py

- MNT: rearranged the docstring of from_grid in function.py to match the expected output of doctest

* MNT: make format and lint corrections to function.py

- MNT: reran make format and lint on function.py to correct after previous changes to from_grid

* MNT: pylint adjustments for new methods in function.py

- MNT: disables pylint unused private member for get_value_opt_grid as it is called upon dynamically by from_grid

- MNT: disabled pylint too many statement for from_grid for now and added a to-do to refactor it into smaller methods/helper functions

- MNT: updated .pylintrc to record Re as good name

* MNt: make format after previous change to function.py

* MNT: removed Re where unused in test_multidim_drag.py

- MNT: Re variable was unused in test_3d_drag_with_varying_alpha thus replaced it

* TST: Add tests for shepard_fallback in test_function_grid.py (#879)

* Add tests for shepard_fallback in test_function_grid.py

Co-authored-by: aZira371 <99824864+aZira371@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: aZira371 <99824864+aZira371@users.noreply.github.com>

* TST: test_multidim_drag.py

- TST: Added integration-level check to verify the flight simulation actually uses alpha when evaluating multi dim drag coeff.
- TST: utilized pytest fixtures where possible.

* MNT: addition of is_multidimensional to function.py

- MNT: Function.is_multidimensional property in function.py. It returns True when the function's internal domain dimension is greater than 1 and safely returns False on errors.

- MNT: Replaced the ad-hoc hasattr/len check in flight.py with a clearer check:
if isinstance and drag_function.is_multidimensional

* MNT: Added validation in from_grid in function.py to raise a ValueError when an unsupported extrapolation value is provided.

* ENH: Added alpha-sensitive flight fixtures to flight_fixtures.py

ENH: Used  shared flight fixtures and simplify multi-drag integration tests in test_multidim_drag.py

ENH: Exposes multidimensionality and validated grid extrapolation in function.py

* MNT: renamed linear_grid to regular_grid for easy to understand nomenclature

- MNT: added a fallback to reynolds calculation in flight.py to avoid mu is zero case

- MNT: updated test_shepard_fallback_warning name and docstring to match implementation in test_function_grid.py

* MNT:  replaced the broad except Exception: with except (TypeError, ValueError, OverflowError): in get_drag_coefficient of flight.py

* TST: added from_grid unit tests to cover constructor-level validation and the explicit API.

* MNT: format and lint update to test_function_from_grid.py

* DOC: changelog.md update for multidim drag

* Address review feedback: add unsorted axis warning, flatten_for_compatibility parameter, and early return guard clause

Co-authored-by: aZira371 <99824864+aZira371@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>
Co-authored-by: Ishan <99824864+aZira371@users.noreply.github.com>
Co-authored-by: Ishan <dubeyishan371@gmail.com>
* ENH: addition of bella lui based 3 dof and 6 dof comparison notebook

- ENH: a new notebook bella_lui_3dof_vs_6dof.ipynb which uses new implementations of weathercocking model on 3dof

* ENH: addition of weathercocking model to flight.py

- ENH: introduced new weathercock_coeff parameter in Flight.init (default: 1.0)

- ENH: updated u_dot_generalized_3dof to compute quaternion derivatives proportional to misalignment with relative wind

- ENH: angular velocity = weathercock_coeff * sin(misalignment_angle)

* ENH: added tests for weathercocking to test_flight_3dof.py

- ENH: unit tests added for weathercocking to check whether weathercock_coeff=0 results in fixed attitude (no quaternion change).

- MNT: format and lint updates for new additions

* DOC: updating 3 dof documentation and corresponding index.rst

- DOC: added 3 dof and 6 dof comparison analysis to three_dof_simulation.rst

- DOC: updated iusers/index.rst to build three_dof_simulation.rst

- MNT: deleted the bella_lui_3dof_vs_6dof_comparison.ipynb as the doc now covers this section

* MNT: corrections to test_flight_3dof.py

- MNT: corrected doc string to represent correct orientation

- MNT: improved tolerance of check on quaternion derivative which should be ideally very small when axes are aligned

* MNT: docstring corrections to flight.py around new weathercocking implementation

* BUG: correction of singularity bug during align on vectors in weathercocking

- BUG: implemented a dot product check to ensure that singularity bug is avoided when rocket body and wind velocity are anti aligned to make rocket statically stable (in u_dot_generalized_3dof)

- MNT: removed redundant double assignment of e0 and w0 vectors within u_dot_generalized_3dof

- MNT: format correction to test_flight_3dof.py

* MNT: updating location of 3 dof doc in users index.rst

- MNT: 3 dof documentation only referred in users section/getting started

- MNT: correction of docstring in flight.py

- MNT: corrected unit_vector call when defining rotation axis in u_dot_generalized_3dof

- MNT:  docstring correction in test_flight_3dof.py

- ENH: test coverage added for anti alignment case in weathercock model to test_flight_3dof.py

* DOC: three_dof_simulation.rst update to add explanation of weather cocking coeff usage and value.

* MNT: changed default value of weather_coeff in flight.py and added fixtures to test_flight_3dof.py

* MNT: shifting test_flight_dof.py to integration tests.

- MNT: fixed default weathercock_coeff value in flight.py to match 3 dof behaviour by default

- MNT: corrected fixtures and docstrings in test_flight_3dof.py

* MNT: docsrting update in test_flight_3dof.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* MNT: Update of docstring in test_flight_3dof.py

- MNT: correction of docstring now that fixtures are used.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* DOC: Update of three_dof_simulation.rst

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update tests/integration/simulation/test_flight_3dof.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Docstring Update tests/integration/simulation/test_flight_3dof.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* docstring Update tests/integration/simulation/test_flight_3dof.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* docstring Update docs/user/three_dof_simulation.rst

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Docstring Update rocketpy/simulation/flight.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* MNT: Docstring updates to various files related to 3 dof

* MNT: unit vector edge case check in flight.py

- MNT: perp_axis singularity value error implemented to handle edge case for perp_axis being parallel to body axis in weathercocking model of 3 dof.

* DOC: Add note about motor file paths in 3-DOF comparison section (#902)

* Initial plan

* DOC: Add note about motor file paths in 3-DOF comparison section

Co-authored-by: aZira371 <99824864+aZira371@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: aZira371 <99824864+aZira371@users.noreply.github.com>

* MNT: eliminate quaternion derivative code duplication in u_dot_generalized_3dof (#903)

* Initial plan

* Refactor: eliminate quaternion derivative code duplication in u_dot_generalized_3dof

Co-authored-by: aZira371 <99824864+aZira371@users.noreply.github.com>

* Improve comment clarity in weathercocking aligned case

Co-authored-by: aZira371 <99824864+aZira371@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: aZira371 <99824864+aZira371@users.noreply.github.com>

* DOC: CHANGELOG.md update to reflect implementation of 3 dof lateral motion improvement

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
…ument bug (#904)

* TST: add branch coverage for fin_flutter_analysis and fix keyword bug

This commit increases test coverage for utilities.py by adding three new
tests that cover previously untested branches in the fin_flutter_analysis
function. The tests cover the see_prints=True branch, see_graphs=True
branch, and both flags enabled simultaneously.

During testing, discovered and fixed a bug where the filename parameter
was incorrectly passed as a positional argument to _flutter_plots, which
requires it as a keyword-only argument. This would cause a TypeError at
runtime when users attempted to save flutter plots to files.

Changes:
- Add test_fin_flutter_analysis_with_prints for print branch coverage
- Add test_fin_flutter_analysis_with_graphs for plotting branch coverage
- Add test_fin_flutter_analysis_complete_output for combined coverage
- Fix filename argument bug in fin_flutter_analysis (line 286)
- Fix test_flutter_plots to use keyword argument for filename
- Increases utilities.py coverage from 68% to 69% (+2 statements)

* DOC: updated CHANGELOG for test coverage and bug fix

* DOC: revert CHANGELOG.md changes per reviewer feedback
* MNT: updated flight.py 3dof for net_thrust

- MNT: added net_thrust to u_dot_generalized_3dof in flight.py

* TST: net_thrust availability test on 3 dof flight

* MNT: docstring adjustment in net_thrust test in test_flight_3dof.py

* MNT: lint check update

* DOC: changelog.md update

* DOC: bug changelog update
* ENH: Add contextily as a dependency for Monte Carlo simulations in pyproject.toml and requirements-optional.txt

* ENH: Add background map functionality to Monte Carlo plots

- Introduced a new method `_get_background_map` to fetch and display background maps using contextily.
- Added support for various map types: "satellite", "street", "terrain", and custom contextily providers.
- Updated `ellipses` and comparison methods to integrate background maps, enhancing visualization capabilities.
- Included error handling and warnings for missing dependencies and attributes.
- See issue #890

* DOC: Enhance documentation for _get_background_map method in Monte Carlo plots

- Added detailed docstring for the _get_background_map method, outlining parameters, return values, and background map options.
- Clarified usage of background types including "satellite", "street", "terrain", and contextily providers.

* MNT: Move imageio import to conditional block in _MonteCarloPlots class

- Moved the import of imageio to be conditional upon the presence of an image, improving dependency management.
- This change ensures that imageio is only imported when necessary, optimizing performance and reducing unnecessary imports.

* TST: Add unit tests for ellipses background functionality in Monte Carlo plots

- Introduced a new test file to validate the behavior of the `ellipses` method with various background options including None, satellite, street, terrain, and custom providers.
- Implemented tests to ensure proper error handling when the MonteCarlo object lacks necessary attributes.
- Added checks for warnings when contextily is not installed and verified that images take precedence over backgrounds.

* TST: Add integration test for Monte Carlo background map options at Kennedy Space Center

- Introduced a new test script to visualize and validate various background map options for Monte Carlo simulations at Kennedy Space Center.
- The script generates simulated data and tests background options including None, satellite, street, terrain, and custom providers, saving the results as images.

* DOC: Updated CHANGELOG.md

* STY: Reformat with black

* MNT: Fix wrong usage for set_aspect in _MonteCarloPlots.ellipses_comparison

* MNT: Refactor _get_background_map in _MonteCarloPlots class

- Removed unnecessary else statements and improved indentation issues.

* MNT: Move mercator_to_wgs84 from_MonteCarloPlots class to tools

- Removed the local definition of mercator_to_wgs84 and replaced it with an import from tools.
- Updated calls to mercator_to_wgs84 to include the earth_radius parameter for improved accuracy.

* MNT: Decompose _get_background_map and move utilities to tools.py

- Refactors `_get_background_map` into modular functions and extracts shared utility logic into `tools.py`. This significantly improves maintainability and separation of concerns.

* BUG: Fix map alignment by enforcing standard Earth radius in plots

- Previously, `_get_environment_coordinates` retrieved the Earth radius
directly from the environment object. When simulations utilized a
custom or local Earth radius for high-precision physics, this value was
incorrectly applied to the map projection calculations.

- Since background map providers (like Contextily) rely on the standard
Web Mercator projection (based on ~6,378,137m), using a non-standard
radius caused the background map to be shifted or scaled incorrectly
relative to the scatter plot data.

- This change forces the plotting module to use the standard WGS84 radius.
This ensures visual accuracy for map overlays without affecting the
physical integrity of the simulation data itself.

* TST: Add Kennedy Space Center environment fixture

- Add example_kennedy_env fixture to replace create_kennedy_environment helper function in tests. This follows the same pattern as other environment fixtures and improves test consistency.
- Make test_all_background_options() a a parametrized test.
- Remove main from test

* ENH: Improve error handling and documentation for automatically download background
- Enhanced error messages for missing or invalid map providers, providing clearer guidance on potential issues.
- Removed warnings for missing contextily library and replaced them with exceptions to enforce required dependencies.
- Updated docstring to include raised exceptions and clarify the function's behavior when fetching background maps.

* TST: Enhance Monte Carlo background map unit tests

- Refactored tests to improve error handling for missing environment attributes and invalid map providers.
- Replaced warnings with exceptions for missing dependencies, ensuring stricter validation.
- Added assertions to verify error messages for better clarity on issues encountered during background map fetching.
- Introduced new tests for handling network errors and invalid map provider scenarios.

* TST: Refactor Monte Carlo plot tests with mock class

- Introduced a MockMonteCarlo class to simulate Monte Carlo data for testing background map options without real simulations.
- Updated tests to utilize the MockMonteCarlo, improving clarity and maintainability.
- Simplified environment handling in tests by creating a SimpleEnvironment class for latitude and longitude attributes.
- Enhanced error handling and assertions in tests for various background map scenarios.

* DOC: Add background map options to documentation

- Updated the user documentation for the Monte Carlo simulations to include details on the new ``background`` parameter for displaying various map types.
- Provided examples for using satellite, street, and terrain maps, along with instructions for listing available providers.

* DOC: Update Monte Carlo analysis notebook with background parameter

* REV: Remove background documents form mrs.rst

* TST: Refactor Monte Carlo plot tests to remove cleanup function

- Since we switched to MockMonteCarlo for testing. Since it does not inherit MonteCarlo.__init__(), no files that need cleanup are produced.
- Removed the `_post_test_file_cleanup` function to streamline test cases.
- Updated tests to directly handle file cleanup for test_ellipses_background_save.

* TST: Enhance Monte Carlo plot tests with file cleanup

- Added file cleanup functionality to the Monte Carlo plot tests to ensure generated files are removed after execution.

* DOC: Update docstring for background map provider resolution

- Enhanced the docstring for the background map provider function to include details on potential ValueError exceptions.

* ENH: Improve error handling in Monte Carlo background map fetching

- Enhanced exception handling for various error scenarios when fetching background map tiles, including invalid coordinates, network issues, and image data errors.
- Added detailed error messages to guide users on potential causes and solutions for encountered issues.

* TST: Parameterize tests for bounds2img failure scenarios

- Introduced parameterized tests to cover various exception types raised during background map fetching, including ValueError, ConnectionError, and RuntimeError.
- Enhanced assertions to verify specific error messages, improving clarity on the nature of failures encountered.
- Updated the test for bounds2img to handle different network and image data errors, ensuring comprehensive coverage of edge cases.

* TST: Parameterize background map option tests in Monte Carlo plots

- Introduced parameterization for the `test_all_background_options` function to streamline testing of various background map options.
- Enhanced the test structure by removing hardcoded background options and utilizing pytest's parameterization feature for improved clarity and maintainability.
- Updated docstring to reflect new parameters and their usage in the test.

* MNT: Formatting monte_carlo_class_usage.ipynb with ruff

* TST: Refactor imports in Monte Carlo plot tests for consistency

- Moved import statements for numpy and rocketpy.tools to the top of the test functions to adhere to best practices and improve readability.
- Added pylint disable comments for imports outside of the top-level to maintain code quality standards.

* TST: Skip tests requiring contextily in Monte Carlo plot tests

- Added pytest.importorskip for contextily in both integration and unit test files to ensure tests are only run if the required library is installed.

* TST: Update contextily import in Monte Carlo plot tests

- Replaced direct import of contextily with pytest.importorskip to ensure tests are skipped if the library is not available, enhancing test robustness.

* Update contextily dependency in pyproject.toml and requirements-optional.txt

- Modified contextily dependency in pyproject.toml to conditionally require it for Python versions below 3.14.

* DOC: Update monte_carlo_class_usage.ipynb to note about contextily issue on python 3.14
…ontrollers (#843)

* ENH: Refactor Flight class to improve time node handling and sensor/controller processing

TST: add tests for overshootable controllers

TST: fix slow tests

fix merge conflicts

* fix tests

fix slow tests

update CHANGELOG

Update rocketpy/simulation/flight.py

fix lint
* DOCS: Update file paths in flight_comparator example and improve formatting in simulation files

* DOCS: fix several documentation errors

* update changelog

* fix tests

* fix docs tests
* ENH: replace ifelif else chains with match statement

* Update rocketpy/environment/environment.py

Co-authored-by: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>

* fix CI tests and add changes to CHANGELOG.md

* update CHANGELOG.md

* fix linters

---------

Co-authored-by: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>
…ui rocket (#914)

* TST: Add comprehensive 3DOF acceptance tests

Co-authored-by: aZira371 <99824864+aZira371@users.noreply.github.com>

* Configure 3DOF acceptance tests to skip until feature is available

Co-authored-by: aZira371 <99824864+aZira371@users.noreply.github.com>

* Apply ruff formatting to 3DOF acceptance tests

Co-authored-by: aZira371 <99824864+aZira371@users.noreply.github.com>

* Fix test logic issues based on code review feedback

Co-authored-by: aZira371 <99824864+aZira371@users.noreply.github.com>

* Refactor 3DOF fixtures to flight_fixtures.py and reuse existing environment fixture

Co-authored-by: aZira371 <99824864+aZira371@users.noreply.github.com>

* Remove unnecessary try/except blocks - PointMass classes are available in codebase

Co-authored-by: aZira371 <99824864+aZira371@users.noreply.github.com>

* Refactor acceptance tests with Bella Lui parameters and named constants

Co-authored-by: aZira371 <99824864+aZira371@users.noreply.github.com>

* Use named constants in flight fixtures for consistency

Co-authored-by: aZira371 <99824864+aZira371@users.noreply.github.com>

* Define launch constants at module level to avoid duplication

Co-authored-by: aZira371 <99824864+aZira371@users.noreply.github.com>

* Import launch constants from fixtures to eliminate duplication

Co-authored-by: aZira371 <99824864+aZira371@users.noreply.github.com>

* Fix docstrings to accurately describe fixture relationships

Co-authored-by: aZira371 <99824864+aZira371@users.noreply.github.com>

* Use appropriately named constant for weathercock apogee difference

Co-authored-by: aZira371 <99824864+aZira371@users.noreply.github.com>

* TST: Amend acceptance tests for 3DOF flight simulation based on Bella Lui rocket

Co-authored-by: aZira371 <99824864+aZira371@users.noreply.github.com>

* MNT: Adjust tolerance ranges to match Bella Lui rocket performance

Co-authored-by: aZira371 <99824864+aZira371@users.noreply.github.com>

* Refactor weathercocking tests to verify physics implementation rather than specific tolerances

Co-authored-by: aZira371 <99824864+aZira371@users.noreply.github.com>

* Update tests/acceptance/test_3dof_flight.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* MNT: removed unused tolerance parameter

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Remove duplicate bella_lui fixtures, keep only acceptance_point_mass fixtures

Co-authored-by: aZira371 <99824864+aZira371@users.noreply.github.com>

* Update tests/acceptance/test_3dof_flight.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Fix critical rocket radius and floating-point comparison issues

Co-authored-by: aZira371 <99824864+aZira371@users.noreply.github.com>

* MNT: update changelog.md for PR #914

- MNT: added required line to changelog.md

* Improve quaternion test tolerance to account for passive aerodynamic effects

Co-authored-by: aZira371 <99824864+aZira371@users.noreply.github.com>

* MNT: make format check

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: aZira371 <99824864+aZira371@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Ishan <dubeyishan371@gmail.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>
* Fix: Duplicate merge of _controllers in Flight.TimeNodes.merge()

* BUG: Fix duplicate controllers in Flight.TimeNodes.merge()

Update changelog

---------

Co-authored-by: ZuoRen Chen <zuorenchen@outlook.com>
MateusStano and others added 4 commits March 7, 2026 21:55
…, and related tests/docs (#927)

* MNT: simplify function grid interpolation structure.

* DOC: add regular grid to function docs

* ENH: improve multi dim drag implementation to avoid breaking changes

* TST: fix tests for new drag implementation

* ENH: Let the user solve the csv file error instead of muting the error

Co-authored-by: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>

* MNT: move create_grid function to tools

* ENH: copilot suggestion

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* ENH: copilot suggestion

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* ENH: move load_csv to tools

* ENH: remove unecessary dicretization

* MNT: ruff and pylint

* MNT: ruff update

* MNT: pylint

* ENH: Avoid circular imports

* MNT: fix pylint and cyclic imports again

* DEV: changelog

---------

Co-authored-by: Pedro Bressan <87212571+phmbressan@users.noreply.github.com>
Co-authored-by: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* BUG: Fix missing titles in roll parameter plots for fin sets

Call set_title(None) on clf_delta and cld_omega after set_inputs/set_outputs
in Fins.evaluate_roll_parameters() so the title is auto-generated from the
updated axis names instead of remaining None.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* MNT: Update CHANGELOG for PR #934

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
* DOC: Add simulation data  for hedy

* DOC: Add weather data for hedy launch

* DOC: Add CATS Vega flight data

* DOC: Add jupyter notebook

* DOC: Renamed folder and notebook

* DOC: Add Hedy rocket to examples index

Add Hedy (2025) from TU Wien Space Team to the simulated vs measured
apogee chart and to the toctree in docs/examples/index.rst.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* MNT: Apply ruff formatting to hedy notebook

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Gui-FernandesBR <guilherme_fernandes@usp.br>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
@MateusStano MateusStano requested a review from a team as a code owner March 9, 2026 00:09
@MateusStano MateusStano added the Releases Related with new releases label Mar 9, 2026
@MateusStano MateusStano self-assigned this Mar 9, 2026
@codecov
Copy link

codecov bot commented Mar 9, 2026

Codecov Report

❌ Patch coverage is 87.71704% with 191 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.05%. Comparing base (9cf3dd4) to head (1618fb0).

Files with missing lines Patch % Lines
rocketpy/simulation/flight.py 87.63% 45 Missing ⚠️
rocketpy/mathutils/function.py 85.77% 32 Missing ⚠️
rocketpy/tools.py 80.53% 22 Missing ⚠️
rocketpy/environment/environment.py 69.84% 19 Missing ⚠️
rocketpy/simulation/flight_comparator.py 94.62% 15 Missing ⚠️
rocketpy/motors/solid_motor.py 45.83% 13 Missing ⚠️
rocketpy/plots/rocket_plots.py 59.09% 9 Missing ⚠️
rocketpy/simulation/monte_carlo.py 61.90% 8 Missing ⚠️
rocketpy/rocket/rocket.py 89.06% 7 Missing ⚠️
rocketpy/plots/monte_carlo_plots.py 92.20% 6 Missing ⚠️
... and 4 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #935      +/-   ##
==========================================
+ Coverage   80.27%   81.05%   +0.78%     
==========================================
  Files         104      107       +3     
  Lines       12769    13891    +1122     
==========================================
+ Hits        10250    11260    +1010     
- Misses       2519     2631     +112     

☔ View full report in Codecov by Sentry.
📢 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 previously approved these changes Mar 9, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Release PR for RocketPy v1.12.0, consolidating version bump + a broad set of feature, test, and documentation updates associated with the release.

Changes:

  • Bump package version to 1.12.0, update docs release metadata, and update tooling configuration (Python 3.10+, Ruff target).
  • Add/extend multiple simulation & plotting capabilities (e.g., Monte Carlo background maps + save options, confidence intervals, animations, 3-DOF support pieces) with extensive new tests.
  • Expand environment and rocket/motor modeling support (e.g., MERRA-2 mapping, rail button bending moments, drag input refactor, point-mass motor/rocket).

Reviewed changes

Copilot reviewed 83 out of 86 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
tests/unit/test_utilities.py Add fin flutter branch coverage
tests/unit/test_rail_buttons_bending_moments.py New rail-button bending moment unit tests
tests/unit/test_plots.py Add animation helper tests + GIF checks
tests/unit/test_flight_data_exporter.py Regression test for CSV header spacing
tests/unit/simulation/test_monte_carlo_plots_background.py Unit tests for MC background fetching/errors
tests/unit/simulation/test_monte_carlo.py Tests for bootstrap CI estimator
tests/unit/simulation/test_flight.py Tests for axial accel + controller regression
tests/unit/rocket/test_rocket.py Tests for missing-components warning + drag inputs
tests/unit/rocket/test_point_mass_rocket.py New PointMassRocket unit tests
tests/unit/rocket/aero_surface/test_generic_surfaces.py CSV independent-variable order test
tests/unit/motors/test_solidmotor.py Split/rename motor info tests
tests/unit/motors/test_point_mass_motor.py New PointMassMotor unit tests
tests/unit/motors/test_hybridmotor.py Fixture rename + minor loop bound fix
tests/unit/motors/test_genericmotor.py Mocked ThrustCurve API + cache tests
tests/unit/mathutils/test_function.py Tests for regular_grid Function interpolation/extrapolation
tests/integration/test_plots.py Reduce compare flights combinations
tests/integration/simulation/test_monte_carlo_plots_background.py Integration test for background map outputs
tests/integration/simulation/test_monte_carlo.py Add save-path coverage + cleanup
tests/integration/simulation/test_flight_comparator_workflow.py Integration workflow for FlightComparator
tests/integration/simulation/test_flight.py Add overshoot integration coverage
tests/integration/motors/test_solid_motor.py Integration coverage for radial burn behavior
tests/integration/motors/test_hybridmotor.py Add hybrid radial burn integration coverage
tests/integration/environment/test_environment.py Fix RAP date handling + add MERRA2 test
tests/fixtures/motor/hybrid_fixtures.py Rename oxidizer tank fixture usage
tests/fixtures/flight/flight_fixtures.py Add time_overshoot fixture + 3DOF fixtures/constants
tests/fixtures/environment/environment_fixtures.py Add Kennedy environment fixture
tests/conftest.py Force matplotlib Agg + add MERRA2 netCDF fixture
tests/acceptance/test_bella_lui_rocket.py Update drag setup to 7D Function usage
rocketpy/utilities.py Pass filename= explicitly to flutter plots
rocketpy/units.py Refactor axis handling to match
rocketpy/stochastic/stochastic_rocket.py Apply drag factors to 7D drag functions
rocketpy/simulation/monte_carlo.py Add bootstrap CI estimation + sim monitor change
rocketpy/simulation/flight_data_exporter.py Fix CSV header comma spacing
rocketpy/simulation/init.py Export FlightComparator in public API
rocketpy/rocket/rocket.py Drag input refactor + missing-components warning + serialization changes
rocketpy/rocket/point_mass_rocket.py New PointMassRocket implementation
rocketpy/rocket/parachute.py Formatting cleanup for doc + lambda
rocketpy/rocket/aero_surface/tail.py Minor lambda formatting
rocketpy/rocket/aero_surface/rail_buttons.py Add button_height + serialization support
rocketpy/rocket/aero_surface/nose_cone.py Refactor kind selection to match
rocketpy/rocket/aero_surface/generic_surface.py Use shared CSV loader + accept header order
rocketpy/rocket/init.py Export PointMassRocket
rocketpy/prints/flight_prints.py Add bending-moment prints
rocketpy/plots/tank_plots.py Add tank volume animation
rocketpy/plots/rocket_plots.py Use Mach-only wrappers for drag curves + refactors
rocketpy/plots/plot_helpers.py Add animation save/show helper
rocketpy/plots/motor_plots.py Add propellant mass animation
rocketpy/plots/monte_carlo_plots.py Add background map fetching + save filename support
rocketpy/plots/flight_plots.py Add bending moment plots + callable-source handling
rocketpy/plots/compare/compare_flights.py Fix “Weather”→“Whether” in docstrings
rocketpy/motors/solid_motor.py Add only_radial_burn behavior + serialization
rocketpy/motors/point_mass_motor.py New PointMassMotor implementation
rocketpy/motors/motor.py Add ThrustCurve API loader + persistent cache
rocketpy/motors/hybrid_motor.py Thread only_radial_burn into hybrid init
rocketpy/motors/init.py Export PointMassMotor
rocketpy/environment/weather_model_mapping.py Add MERRA2 variable mapping
rocketpy/environment/environment.py Add MERRA2 support + refactor to match
rocketpy/init.py Export PointMassMotor/PointMassRocket
pyproject.toml Version bump + extras + Ruff target-version
docs/user/rocket/generic_surface.rst Document CSV column order flexibility
docs/user/mrs.rst Formatting fixes + add CI example section
docs/user/motors/tanks.rst Document tank volume animation
docs/user/motors/liquidmotor.rst Document tank volume animation usage
docs/user/motors/genericmotor.rst Document ThrustCurve API loader + caching
docs/user/index.rst Add 3DOF guide link + minor formatting
docs/user/function.rst Update ND interpolation support docs
docs/user/flight_comparator.rst New FlightComparator user guide
docs/user/flight.rst Document rail button bending moments
docs/user/first_simulation.rst Minor doc formatting fixes
docs/user/environment/1-atm-models/standard_atmosphere.rst Minor doc formatting fix
docs/user/environment/1-atm-models/reanalysis.rst Add MERRA-2 docs section
docs/user/compare_flights.rst Avoid long output in docs example
docs/conf.py Update release + add jupyter_sphinx kwargs
CHANGELOG.md Add v1.12.0 section (needs link fixes)
.vscode/settings.json Add “pointmassmotor” to spellchecker
.pylintrc Update config (good-names tweak)
.gitignore Ignore docs GIF outputs
Comments suppressed due to low confidence (1)

rocketpy/rocket/rocket.py:2006

  • Rocket.to_dict() now always serializes power_off_drag/power_on_drag as the processed 7D Functions, while the class docstring says the original user input is preserved for reconstruction/Monte Carlo workflows. This also means a Rocket reconstructed from dict will not retain the original input type/shape. If the intent is to preserve both, consider exporting both the raw inputs (when serializable) and the normalized 7D Functions (for simulation), or updating the docstring/serialization contract accordingly.

Comment on lines +1975 to +1999
base_url = "https://www.thrustcurve.org/api/v1"
# Step 1. Search motor
response = requests.get(f"{base_url}/search.json", params={"commonName": name})
response.raise_for_status()
data = response.json()

if not data.get("results"):
raise ValueError(
f"No motor found for name '{name}'. "
"Please verify the motor name format (e.g., 'Cesaroni_M1670' or 'M1670') and try again."
)

motor_info = data["results"][0]
motor_id = motor_info.get("motorId")
# NOTE: commented bc we don't use it, but keeping for possible future use
# designation = motor_info.get("designation", "").replace("/", "-")
# manufacturer = motor_info.get("manufacturer", "")

# Step 2. Download the .eng file
dl_response = requests.get(
f"{base_url}/download.json",
params={"motorIds": motor_id, "format": "RASP", "data": "file"},
)
dl_response.raise_for_status()
dl_data = dl_response.json()
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

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

requests.get(...) calls to the ThrustCurve API are made without an explicit timeout. This can hang indefinitely in offline/slow network environments (including CI) and makes the feature operationally fragile. Consider adding a conservative default timeout (and possibly retries/backoff) to both the search and download requests, and include it in the raised error context.

Copilot uses AI. Check for mistakes.
Comment on lines 356 to +380
# Define aerodynamic drag coefficients
self.power_off_drag = Function(
power_off_drag,
"Mach Number",
"Drag Coefficient with Power Off",
"linear",
"constant",
# Coefficients used during flight simulation
self.power_off_drag_7d = self.__process_drag_input(
power_off_drag, "Drag Coefficient with Power Off"
)
self.power_on_drag = Function(
power_on_drag,
"Mach Number",
"Drag Coefficient with Power On",
"linear",
"constant",
self.power_on_drag_7d = self.__process_drag_input(
power_on_drag, "Drag Coefficient with Power On"
)
self.power_on_drag_by_mach = Function(
lambda mach: self.power_on_drag_7d(0, 0, mach, 0, 0, 0, 0),
inputs="Mach Number",
outputs="Drag Coefficient with Power On",
interpolation="linear",
extrapolation="constant",
)
self.power_off_drag_by_mach = Function(
lambda mach: self.power_off_drag_7d(0, 0, mach, 0, 0, 0, 0),
inputs="Mach Number",
outputs="Drag Coefficient with Power Off",
interpolation="linear",
extrapolation="constant",
)
# Saving user input for monte carlo
self.power_off_drag = power_off_drag
self.power_on_drag = power_on_drag
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

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

Rocket.power_off_drag / Rocket.power_on_drag are now assigned to the raw user input, whereas historically these attributes were Function objects (and other parts of the codebase still treat drag curves as Functions, e.g. plots previously accessed .x_array/.y_array). This is a breaking public API change and also makes the attribute type inconsistent depending on construction path (e.g., from_dict currently passes a Function). Consider preserving backward compatibility by keeping power_off_drag/power_on_drag as Function wrappers (e.g., Mach-only), and storing the original user input under a new attribute like power_off_drag_input/power_on_drag_input.

Copilot uses AI. Check for mistakes.
Comment on lines +65 to +67
jupyter_execute_kwargs = {
"timeout": 300, # 5 minutes timeout per cell
"allow_errors": True, # Continue building even if cells raise errors
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

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

allow_errors=True will let documentation builds succeed even when examples/cells are failing, which can hide regressions and produce incomplete docs. If this is only a temporary workaround for the current RTD issue, consider gating it behind an env var (e.g., only on RTD), or keeping allow_errors=False and selectively skipping known-problematic cells/files instead.

Suggested change
jupyter_execute_kwargs = {
"timeout": 300, # 5 minutes timeout per cell
"allow_errors": True, # Continue building even if cells raise errors
jupyter_allow_errors_env = os.environ.get("ROCKETPY_JUPYTER_ALLOW_ERRORS", "")
jupyter_allow_errors = jupyter_allow_errors_env.lower() in {
"1",
"true",
"yes",
"on",
}
jupyter_execute_kwargs = {
"timeout": 300, # 5 minutes timeout per cell
"allow_errors": jupyter_allow_errors, # Optionally continue building even if cells raise errors

Copilot uses AI. Check for mistakes.
Comment on lines +49 to +59
- TST: Add acceptance tests for 3DOF flight simulation based on Bella Lui rocket [#914] (https://github.com/RocketPy-Team/RocketPy/pull/914_
- ENH: Add background map auto download functionality to Monte Carlo plots [#896](https://github.com/RocketPy-Team/RocketPy/pull/896)
- MNT: net thrust addition to 3 dof in flight class [#907] (https://github.com/RocketPy-Team/RocketPy/pull/907)
- ENH: 3-dof lateral motion improvement [#883](https://github.com/RocketPy-Team/RocketPy/pull/883)
- ENH: Add multi-dimensional drag coefficient support (Cd as function of M, Re, α) [#875](https://github.com/RocketPy-Team/RocketPy/pull/875)
- ENH: Add save functionality to `_MonteCarloPlots.all` method [#848](https://github.com/RocketPy-Team/RocketPy/pull/848)
- ENH: add animations for motor propellant mass and tank fluid volumes [#894](https://github.com/RocketPy-Team/RocketPy/pull/894)
- ENH: Rail button bending moments calculation in Flight class [#893](https://github.com/RocketPy-Team/RocketPy/pull/893)
- ENH: Implement Bootstrapping for Confidence Interval Estimation [#891](https://github.com/RocketPy-Team/RocketPy/pull/897)
- ENH: Built-in flight comparison tool (`FlightComparator`) to validate simulations against external data [#888](https://github.com/RocketPy-Team/RocketPy/pull/888)
- ENH: Add persistent caching for ThrustCurve API [#881](https://github.com/RocketPy-Team/RocketPy/pull/881)
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

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

The v1.12.0 changelog entries have broken/mismatched links (e.g., [#914] link is missing a closing )/has a trailing _, and the confidence interval entry label [#891] points to PR #897). This will render incorrectly on GitHub/PyPI. Please fix the markdown link syntax and ensure the PR numbers match the URLs.

Copilot uses AI. Check for mistakes.
Comment on lines +279 to +284
# 4. Verify Unit Conversion (Energy -> Height)
# Input: 9806.65 m2/s2
# Expected: 1000.0 m
print(f"Calculated Elevation: {env.elevation} m")
assert abs(env.elevation - 1000.0) < 1e-4, (
f"Failed to convert PHIS (m2/s2) to meters. Got {env.elevation}, expected 1000.0"
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

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

This test prints to stdout (print(f"Calculated Elevation: ...")), which adds noise to test output and can make CI logs harder to read. Prefer removing the print or asserting via the existing assert message (or capturing output with capsys if you need to validate it).

Copilot uses AI. Check for mistakes.
Comment on lines +544 to +555
if self.only_radial_burn:
factor = volume_diff / (
2 * np.pi * (grain_inner_radius * grain_height) ** 2
)
** 2
)
inner_radius_derivative_wrt_inner_radius = factor * (
grain_height - 2 * grain_inner_radius
)
inner_radius_derivative_wrt_height = factor * grain_inner_radius
height_derivative_wrt_inner_radius = (
-2 * inner_radius_derivative_wrt_inner_radius
)
height_derivative_wrt_height = -2 * inner_radius_derivative_wrt_height

return [
[
inner_radius_derivative_wrt_inner_radius,
inner_radius_derivative_wrt_height,
],
[height_derivative_wrt_inner_radius, height_derivative_wrt_height],
]
inner_radius_derivative_wrt_inner_radius = factor * (
grain_height - 2 * grain_inner_radius
)
inner_radius_derivative_wrt_height = 0
height_derivative_wrt_inner_radius = 0
height_derivative_wrt_height = 0
# Height is a constant, so all the derivatives with respect to it are set to zero
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

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

In the only_radial_burn branch, the Jacobian sets inner_radius_derivative_wrt_height = 0, but grain_inner_radius_derivative = -volume_diff / (2π r h) still depends on grain_height. This makes the Jacobian mathematically incorrect and can degrade/derail LSODA integration. Please compute the correct partial derivative w.r.t. height (and keep only height_derivative_* at zero since dh/dt=0).

Copilot uses AI. Check for mistakes.
RahulKrishna145 and others added 4 commits March 8, 2026 22:16
#854)

* solved environment parameter global usage, now can be used locally

* f string placeholder changes in test file

* ENH: Update air brakes controller to support 8-parameter signature and improve environment access

* make lint

* solved environment parameter global usage, now can be used locally

* f string placeholder changes in test file

* ENH: Update air brakes controller to support 8-parameter signature and improve environment access

* make lint

* fix tests

---------

Co-authored-by: Nitheesh Krishna <nitheeshhs@gmail.com>
Co-authored-by: Gui-FernandesBR <guilherme_fernandes@usp.br>
Co-authored-by: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>
Co-authored-by: Mateus Stano Junqueira <69485049+MateusStano@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Releases Related with new releases

Projects

None yet

Development

Successfully merging this pull request may close these issues.