-
-
Notifications
You must be signed in to change notification settings - Fork 208
Enh/motor thrustcurve api #870
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
base: develop
Are you sure you want to change the base?
Enh/motor thrustcurve api #870
Conversation
|
I really like this implementation!! |
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 adds a new method load_from_thrustcurve_api to the GenericMotor class that allows users to download motor data directly from the ThrustCurve.org API by providing a motor name. This feature simplifies motor initialization by eliminating the need to manually download .eng files.
- Adds API integration with ThrustCurve.org to download motor data
- Implements a new static method that searches for motors and downloads their
.engfiles - Includes comprehensive test coverage for the new functionality
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 7 comments.
| File | Description |
|---|---|
| rocketpy/motors/motor.py | Adds new static method load_from_thrustcurve_api with required imports (base64, tempfile, requests) to enable downloading and loading motor data from ThrustCurve API |
| tests/unit/motors/test_genericmotor.py | Adds test case to verify the new API loading functionality works correctly with Cesaroni M1670 motor data |
|
I see 2 major problems: 1 - Documentation: we should add a description of how to use the new feature. |
ff57272 to
2770ba2
Compare
…with clean imports
2770ba2 to
da39fcb
Compare
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
Copilot reviewed 2 out of 2 changed files in this pull request and generated 9 comments.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #870 +/- ##
===========================================
+ Coverage 80.27% 80.31% +0.03%
===========================================
Files 104 104
Lines 12769 12805 +36
===========================================
+ Hits 10250 10284 +34
- Misses 2519 2521 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…urve_api with exception testing
|
@Gui-FernandesBR Thank you for going over the code. I just updated the latest commit to run make format for import/order/style cleanup and added tests for exception handling in load_from_thrustcurve_api. |
… genericmotors.rst file
|
Hi all, We’ve updated the PR based on your feedback. Could you please check if it looks good now or if anything else needs improvement ? |
@Marchma0 can you check why linters are not passing? Also, if you could please mark previous comments as "resolved", that would make our review easier |
|
We updated the code, i think we resolved pylint errors. |
Pull request type
Checklist
black rocketpy/ tests/) has passed locallypytest tests -m slow --runslow) have passed locallyCurrent behavior
#661
New behavior
We added the function to load a motor from the thrustcruve API and we tested it.
Breaking change