Enh/motor thrustcurve api#870
Conversation
|
I really like this implementation!! |
There was a problem hiding this comment.
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
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #870 +/- ##
===========================================
+ Coverage 80.27% 80.33% +0.06%
===========================================
Files 104 104
Lines 12769 12815 +46
===========================================
+ Hits 10250 10295 +45
- Misses 2519 2520 +1 ☔ 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. |
|
Do you think there is something else to modify ? @Gui-FernandesBR |
29a7aaa to
142eaf8
Compare
|
I sent you an invite to the fork. If its not working i will for sure add the requested changes for tomorow, thank you !! |
…with clean imports
…urve_api with exception testing
… genericmotors.rst file
Co-authored-by: Gui-FernandesBR <63590233+Gui-FernandesBR@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>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
be79157 to
a048bb4
Compare
Gui-FernandesBR
left a comment
There was a problem hiding this comment.
LGTM, hope it is working.
Great implementation!!
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