BUG: Parachute Pressures not being Set before All Info.#534
BUG: Parachute Pressures not being Set before All Info.#534phmbressan merged 3 commits intomasterfrom
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. |
Gui-FernandesBR
left a comment
There was a problem hiding this comment.
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. |
MateusStano
left a comment
There was a problem hiding this comment.
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.mdhas been updated (if relevant)Current behavior
The method
export_pressureincorrectly calls thelists:parachute.clean_pressure_signalandnoisy_pressure_signalas 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 afterFlightcomputations. On top of that, the incorrectlistcalls were substituted by their_functioncounterparts.Now the data is being exported correctly:
Breaking change