Skip to content
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

What if we rearrange postProcess method? #164

Closed
Gui-FernandesBR opened this issue Mar 28, 2022 · 2 comments · Fixed by #249
Closed

What if we rearrange postProcess method? #164

Gui-FernandesBR opened this issue Mar 28, 2022 · 2 comments · Fixed by #249
Assignees
Labels
Enhancement New feature or request, including adjustments in current codes Flight Flight Class related features Help wanted Extra attention is needed Question Further information is requested Refactor

Comments

@Gui-FernandesBR
Copy link
Member

Is your feature request related to a problem? Please describe.

Sometimes it feels like the Flight.postProcess method is draining our time away. Everytime you need to evaluate one specific function (e.g. Flight.R2) you have to run the simulation setting postProcess() in order to catch the desired values.
The problem is that sometimes you don't wanna post process every single attribute, but only a set of data instead.

My suggestion here is that we make with postProcess something similar to what happened on allInfo() few years ago... We could agregate some attributes of postProcess together and . All in all, the old postProcess will be trasnformed in a function that only need to call the other methods, this way not introducing breaking cahnges

Questions
What do you guys think about such ideia? Do you have suggestions before we start coding?
Below I give u an example of what would be the new postProcess structure.

The only atention point is that some functions depends on others, meaning that, for insstance, if you want to evaluate "SpecialFunction" is will need to evaluate "postProcessAeroForces" together.
image

@Gui-FernandesBR Gui-FernandesBR added Enhancement New feature or request, including adjustments in current codes Help wanted Extra attention is needed Question Further information is requested labels Mar 28, 2022
@giovaniceotto
Copy link
Member

giovaniceotto commented Mar 28, 2022

Yes please!!! We really need to refactor the Flight.postProcess method urgently. I like your idea of breaking it down by topics, similar to the Flight.allInfo method.

I'll add one more idea to the table: Python's property(): Add Managed Attributes to Your Classes

Or, if all you need a quick intro to property decorators: Python Property Decorator - @property

Using the property decorator, we could create a managed attribute for each post process variable and really calculate them only when they are called, independently.

@Gui-FernandesBR, let me know what you think about the idea.

@Gui-FernandesBR
Copy link
Member Author

Solved by #249

@Gui-FernandesBR Gui-FernandesBR linked a pull request Nov 5, 2022 that will close this issue
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request, including adjustments in current codes Flight Flight Class related features Help wanted Extra attention is needed Question Further information is requested Refactor
Projects
None yet
2 participants