-
-
Notifications
You must be signed in to change notification settings - Fork 167
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
MNT: Extract logic from info in rocket class #312
Comments
Since each item in the This way, not only do we extract the logic from the |
@GabrielBarberini thanks for bringing that up. The classical |
Linking #234 that is quite related to this one |
Just started to solve this one these days, I believe we are close to an end. Some of the main classes of rocketpy already are free of "logics" since last #287. I am not sure if that's enough, but if you read the Flight or Rocket class today, there won't be any plot being defined, including the case of parachutes mentioned by @GabrielBarberini in this issue description. Some PRs will also help to complete this issue, they are: #324, #325, #326 However, I still see some problems here:
It would be nice having some inputs from the front-end side. Please notice that our team has been working in the |
The #375 also contributes to this issue solving |
Just added one more to the list: #381 |
The #233 also contributed to this one. Now there's only the dispersion plots remaining to be moved. |
Update: All the plots are now being handled inside the However, we are still pending on the data export function for the main classes, i.e. a good way of returning a file with all the important information of a class. |
Ok, after the small but great introduction on the #477 , I think we are done with this issue (finally). Some key highlights:
I think the Front-End can now consume data from all the classes applying a more sophisticated workflow based on these changes. @MateusStano if you agree with this message, please go ahead and close the issue. |
I think we are done with this issue. |
Is your feature request related to a problem? Please describe.
Currently, there is a bunch of logic and conditional loops inside the Rocket class
allInfo(self)
(line 1169) method. This makes it harder for the frontend team to consume a subset view data of allInfo without code duplication, hence violating DRY.Describe the solution you'd like
I think a good approach would be to encapsulate every loop and conditional existing at the allInfo method in a private method or lambda making the logic behind the view (print) transparent for the allInfo method.
Additional context
For instance, in the parachute data:
I think it would be better if we had something like:
The text was updated successfully, but these errors were encountered: