-
-
Notifications
You must be signed in to change notification settings - Fork 168
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/dispersion class/review #267
Enh/dispersion class/review #267
Conversation
I think that the rumors that cached_property was introduced only on python 3.8. |
This are being addressed by #283, let's keep it on track. |
@MateusStano I have just updated the PR description including in details what I have changed here in addition to the #232 PR. Reviewing this will definetely not be easy. I am available once you become ready to start work on dispersions again, I think we can arrange a meeting just to discuss it. Also, with regards to |
fixes to __process methods, and extra fixes to parachute __process method
add exportable_list, create __check_export_list
and deleted few unecessary and slow lines
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
Hey! So given how dependent this one is on other PRs I decided to clean it up before we merge those changes here. I changed some things that either optimized the simulation or solved some bugs. It should be pretty self-explanatory just by looking at the commits. I left a lot of TODOs with what we still need to do. There are also some bugs happening, if you try to run the 2nd example on the I think this review is better than the version in the original Dispersion PR and since we have to wait for other PRs there are a couple of ways we continue developing this:
What do you think we should do @Gui-FernandesBR ? |
Oh and by the way. I think all the Remaining Tasks you commented in this PR main initial comment are all still in need to be done, but I think they should all be things we open other PRs for implementations, instead of just committing directly to this one |
As you prefer! |
Pull request type
Please check the type of change your PR introduces:
Pull request checklist
Please check if your PR fulfills the following requirements, depending on the type of PR:
Code base additions (for bug fixes / features):
black rocketpy
) has passed locally and any fixes were madepytest --runslow
) have passed locallyWhat is the new behavior?
I am addressing some of the problems that I so on the #232 , here is a list of my changes at the Dispersion.py files only:
xxxxx_inputs
dictionaries and saved them as attributes of Dirpersion classclassCheck
methodsetDistributionFunc
now is private since the user is not supposed to interact with it. I'm also adding docstring to it and converting to snake_case just to facilitate the visualization at this part of the code.processDispersionDict
is also private now. But it consolidate several other__process_xxx_from_dict
private methods. Separating the code this way, I think it is more readable.__check_inputted_values_from_dict
will fill the dispersion dictionary with (mean, stdev) values where it does not have already these two parameters.__check_initial_objects
will create rocketpy main objects if the user do not provide it.yield_flight_setting
is also private now, same reasons as above. I added its docstring, please check this part because I'm not entirely sure about it.export_flight_data
also private, but here one significant change: thevariables
argument can be used to chose what output variables are going to be saved from each simulation, this improves the code in terms ofplot_results()
. The same with the prints.import_results()
, which is working almost te same way before, it can be used without the run_dispersion method. Also, I added the__process_results()
, which will now save the mean and st. dev of each output variable and an attibute of the dispersion class, allowing easy access in the future!Does this introduce a breaking change?
Remaning tasks (at this PR):
except:
casesRemaning tasks (probably in a future PR):
print_results()
method, print as a table instead of prints, this would be more organizedObs.: Yes, go ahead and test the dispersion_class notebook, it should be working correctly!!