-
-
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
BUG: Parachute Pressures not being Set before All Info. #534
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #534 +/- ##
==========================================
+ Coverage 71.15% 71.23% +0.08%
==========================================
Files 55 55
Lines 9259 9259
==========================================
+ Hits 6588 6596 +8
+ Misses 2671 2663 -8
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ 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.
Well done!
I think we should adopt the Function.savetxt
to do the same job once we finish its PR.
Nevertheless, for this hotfix I think we are fine with the solution, thanks.
Should we expect any significant increase in simulation execution speed since we are adding a new call inside |
That could be tested, of course, but I don't think so. The method basically makes two Function instances per parachute if I recall correctly. Unless the simulation has unusualy too many points or a lot of parachutes, the time spend should be in the Again, that could be easily tested later. This solution is not the best one, but I do think it involves the least amount of changes for a Hotfix. I am open to other suggestions. |
I reviewed it again and I don't think it's a problem. The new behavior is not prejudicial in terms of code performance. |
In order to prevent future errors, we ideally should implement unit test for the methods we fix in hotfixes. @phmbressan please review the commit and feel free to proceed and merge. |
Since I opened the PR GitHub does not allow me to submit an approval. |
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! The export pressure function has broken a million times before. Its good that we finally have a test for it!
Pull request type
Checklist
black rocketpy/ tests/
) has passed locallypytest --runslow
) have passed locallyCHANGELOG.md
has been updated (if relevant)Current behavior
The method
export_pressure
incorrectly calls thelists
:parachute.clean_pressure_signal
andnoisy_pressure_signal
as if they were functions. Furthermore, this data is not set before the call of theall_info
, which could lead to invalid exports if it was working.The issue when trying to export the pressure was:
New behavior
The employed fix was to call the method that set these values not in the
all_info
, but afterFlight
computations. On top of that, the incorrectlist
calls were substituted by their_function
counterparts.Now the data is being exported correctly:
Breaking change