-
-
Notifications
You must be signed in to change notification settings - Fork 208
ENH: _MotorPrints inheritance - issue #460 #828
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this 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
_MotorPrintsbase and updates Solid, Liquid, and Hybrid motor print classes to inherit from it, removing redundantmotor_detailsmethods. - Removes a duplicate
Enumimport and reorders imports inmathutils/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 pltfor clarity and common practice.
import matplotlib as plt
Codecov ReportAll modified and coverable lines are covered by tests ✅
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. 🚀 New features to boost your workflow:
|
…m#828) * ENH: refactor motor prints classes to inherit from _MotorPrints * STY: make format * ENH: add entry for _MotorPrints inheritance in changelog
No description provided.