-
-
Notifications
You must be signed in to change notification settings - Fork 150
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: Refactor Tank's testing Assertion with CAD data. #678
base: develop
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #678 +/- ##
===========================================
+ Coverage 75.87% 76.35% +0.48%
===========================================
Files 85 85
Lines 10085 10131 +46
===========================================
+ Hits 7652 7736 +84
+ Misses 2433 2395 -38 ☔ View full report in Codecov by Sentry. |
self.tank.net_mass_flow_rate.plot(*self.flux_time) | ||
self.fluid_height() | ||
self.fluid_volume() | ||
self.fluid_center_of_mass() |
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.
You should add an .all_info
and .info
method to the Tanks
class and Fluids
class now that the plots and prints are good
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.
I actually quite like this solution, seems to avoid some annoyances while being very pratical. I would suggest that you rename this file to something like tank_cad_validation_data_generator.ipynb
or something of the sort for clarity purposes.
Or maybe just add a markdown cell with one or two sentences explaining what the notebook is for.
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.
Great comment. I will do that.
The notebook is still a bit raw in terms of explanations, since I opted to wait for opinions on whether we'd keep it.
Pull request type
Checklist
black rocketpy/ tests/
) has passed locallypytest tests -m slow --runslow
) have passed locallyCHANGELOG.md
has been updated (if relevant)Current behavior
Currently the Tank's testing module present the following issues:
New behavior
This PR aims to bring the following changes to code:
cadquery
module for geometrical validation;Breaking change
Additional information
Check out CadQuery docs for further information and examples.
An important notice is that the CAD module is not executed in every test for the two reasons:
Therefore I have added the necessary code into a Jupyter notebook for easy recalculation of the expected values, but this can be discussed further on this PR.
P.S.: I will fix the PyLint errors shortly.