-
-
Notifications
You must be signed in to change notification settings - Fork 176
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
BUG: plot drag curves when function source is callable #599
BUG: plot drag curves when function source is callable #599
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #599 +/- ##
===========================================
- Coverage 73.37% 73.35% -0.02%
===========================================
Files 57 57
Lines 9453 9473 +20
===========================================
+ Hits 6936 6949 +13
- Misses 2517 2524 +7 ☔ View full report in Codecov by Sentry. |
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.
Could you also fix this line?
f"Number of points defining the lift curve: {len(self.aero_surface.airfoil_cl.x_array)}" |
The airfoil prints will run into the same bug if it is callable defined
This is a very good comment. Let's fix it in another PR. I think it's important to add a test to this PR so we prevent the same error from happening again in the future |
Pull request type
Checklist
black rocketpy/ tests/
) has passed locallypytest tests -m slow --runslow
) have passed locallyCHANGELOG.md
has been updated (if relevant)Current behavior
When you use a callable object as the source of your power_on or power_off curves in the Rocket class, the
all_info()
method will break becauseself.rocket.power_on_drag.x_array
is inexistentNew behavior
Solved the issue by adding a try/except block that will prevent code from breaking in the situation
Breaking change
Additional information
None