Skip to content

Conversation

@Gui-FernandesBR
Copy link
Member

No description provided.

@Gui-FernandesBR Gui-FernandesBR requested a review from Copilot June 17, 2025 01:59
@Gui-FernandesBR Gui-FernandesBR self-assigned this Jun 17, 2025
@Gui-FernandesBR Gui-FernandesBR requested a review from a team as a code owner June 17, 2025 01:59
@Gui-FernandesBR Gui-FernandesBR linked an issue Jun 17, 2025 that may be closed by this pull request
5 tasks
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

This PR refactors the motor-printing classes to share common behavior via a new _MotorPrints base class, cleans up duplicate imports, and adjusts import formatting in an integration test.

  • Introduces _MotorPrints base and updates Solid, Liquid, and Hybrid motor print classes to inherit from it, removing redundant motor_details methods.
  • Removes a duplicate Enum import and reorders imports in mathutils/function.py.
  • Adds a blank line in the integration test to separate imports.

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/integration/test_environment_analysis.py Added a blank line before from rocketpy import to separate groups
rocketpy/prints/solid_motor_prints.py Extended _SolidMotorPrints from _MotorPrints and removed dup code
rocketpy/prints/liquid_motor_prints.py Extended _LiquidMotorPrints from _MotorPrints and removed dup code
rocketpy/prints/hybrid_motor_prints.py Extended _HybridMotorPrints from _MotorPrints and removed dup code
rocketpy/mathutils/function.py Moved and deduplicated Enum import to the top of the stdlib block
Comments suppressed due to low confidence (1)

tests/integration/test_environment_analysis.py:5

  • [nitpick] Consider importing the pyplot submodule explicitly with import matplotlib.pyplot as plt for clarity and common practice.
import matplotlib as plt

@codecov
Copy link

codecov bot commented Jun 17, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.03%. Comparing base (4df0b38) to head (10d5a10).
Report is 23 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #828      +/-   ##
===========================================
+ Coverage    79.11%   80.03%   +0.91%     
===========================================
  Files           96       98       +2     
  Lines        11575    12019     +444     
===========================================
+ Hits          9158     9619     +461     
+ Misses        2417     2400      -17     

☔ 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 merged commit 71ed18c into develop Jun 19, 2025
7 checks passed
@Gui-FernandesBR Gui-FernandesBR deleted the enh/issue-460 branch June 19, 2025 23:56
@github-project-automation github-project-automation bot moved this from Backlog to Closed in LibDev Roadmap Jun 19, 2025
aZira371 pushed a commit to aZira371/RocketPy that referenced this pull request Sep 9, 2025
…m#828)

* ENH: refactor motor prints classes to inherit from _MotorPrints

* STY: make format

* ENH: add entry for _MotorPrints inheritance in changelog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Closed

Development

Successfully merging this pull request may close these issues.

ENH: Add _MotorPrints Inheritance to Motor Prints Classes

2 participants