Skip to content

ENH: Restore power_off/on_drag as Function objects; add _input attributes for raw user input and update changelog#941

Open
Copilot wants to merge 5 commits intorel/v1.12.0from
copilot/sub-pr-935-again
Open

ENH: Restore power_off/on_drag as Function objects; add _input attributes for raw user input and update changelog#941
Copilot wants to merge 5 commits intorel/v1.12.0from
copilot/sub-pr-935-again

Conversation

Copy link

Copilot AI commented Mar 18, 2026

Pull request type

  • Code changes (bugfix, features)
  • Code maintenance (refactoring, formatting, tests)
  • ReadMe, Docs and GitHub updates
  • Other (please describe):

Checklist

  • Tests for the changes have been added (if needed)
  • Docs have been reviewed and added / updated
  • Lint (black rocketpy/ tests/) has passed locally
  • All tests (pytest tests -m slow --runslow) have passed locally
  • CHANGELOG.md has been updated (if relevant)

Current behavior

Rocket.power_off_drag and Rocket.power_on_drag had been changed to store raw user input, which broke backward compatibility because these public attributes were historically Function objects. This also created type inconsistency depending on construction path (for example, from_dict could still pass a Function).

New behavior

  • Restores Rocket.power_off_drag and Rocket.power_on_drag as Mach-only Function objects (aliasing power_off_drag_by_mach and power_on_drag_by_mach) to preserve the public API.
  • Preserves original user-provided drag inputs via new attributes:
    • power_off_drag_input
    • power_on_drag_input
  • Updates related docstrings in:
    • rocketpy/rocket/rocket.py
    • rocketpy/rocket/point_mass_rocket.py
  • Adds an Unreleased → Fixed changelog entry in CHANGELOG.md for this PR.

Breaking change

  • Yes
  • No

Additional information

This stacked PR targets rel/v1.12.0 and includes the follow-up changelog update requested in review feedback.


📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.

… raw user input

Co-authored-by: MateusStano <69485049+MateusStano@users.noreply.github.com>
Copilot AI changed the title [WIP] [WIP] Address feedback from review on PR #935 for rel/v1.12.0 adjustments ENH: Restore power_off/on_drag as Function objects; add _input attributes for raw user input Mar 18, 2026
Copilot AI requested a review from MateusStano March 18, 2026 01:37
@MateusStano
Copy link
Member

@copilot add pr to changelog

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

Copilot AI commented Mar 18, 2026

@copilot add pr to changelog

Done in e750b18. Added this PR to CHANGELOG.md under UnreleasedFixed.

@MateusStano MateusStano marked this pull request as ready for review March 18, 2026 01:56
@MateusStano MateusStano requested a review from a team as a code owner March 18, 2026 01:56
Copilot AI changed the title ENH: Restore power_off/on_drag as Function objects; add _input attributes for raw user input ENH: Restore power_off/on_drag as Function objects; add _input attributes for raw user input and update changelog Mar 18, 2026
@codecov
Copy link

codecov bot commented Mar 18, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (rel/v1.12.0@8938aa7). Learn more about missing BASE report.

Additional details and impacted files
@@              Coverage Diff               @@
##             rel/v1.12.0     #941   +/-   ##
==============================================
  Coverage               ?   81.09%           
==============================================
  Files                  ?      107           
  Lines                  ?    13906           
  Branches               ?        0           
==============================================
  Hits                   ?    11277           
  Misses                 ?     2629           
  Partials               ?        0           

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

MateusStano and others added 2 commits March 18, 2026 22:35
Co-authored-by: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>
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.

3 participants