-
-
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
ENH: generic surfaces pylint #689
ENH: generic surfaces pylint #689
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.
Good work, Lucas!!
In the future I think we should make all aerosurfaces inherit from the generic surface class.
ce68698
to
e45dc11
Compare
fb20304
to
c543fae
Compare
40a9cf8
to
c7a4179
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## enh/generic-surfaces #689 +/- ##
=======================================================
Coverage ? 74.87%
=======================================================
Files ? 98
Lines ? 11021
Branches ? 0
=======================================================
Hits ? 8252
Misses ? 2769
Partials ? 0 ☔ View full report in Codecov by Sentry. |
Pull request type
Checklist
black rocketpy/ tests/
) has passed locallypytest tests -m slow --runslow
) have passed locallyCurrent behavior
Fixes pylint for the generic surfaces PR.
New behavior
There are two major changes:
The
__init__
ofGenericSurface
andLinearGenericSurfaces
have been reworked to receive a single argument for the coefficients instead of a multitude of arguments.I cleaned up the arguments from
compute_forces_and_moments
method a bit. I kept the*args
because of the way the function is called in theFlight
class . Basically, the class iterates over all aerodynamic surfaces and calls this function for each of them. In turn, this function has different signatures depending on which aerodynamic surface we have. As I see it, there are three approaches:*args
to ignore some arguments for functions with smaller signatures;inspect
module to get the signature before hand, create an accordingly dictionary with arguments as keys and its values, and pass to the method.Approach 2) seems a bit ugly, approach 3) seems unnecessarily complicated and might difficult maintaining the code in the future. Hence, I chose 1). If someone has a better suggestion, I am eager to see it!
Breaking change