-
Notifications
You must be signed in to change notification settings - Fork 115
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
Adding plot testing #2299
Adding plot testing #2299
Conversation
Adding a cmap to avoid buggy plots
…ys/pymapdl into maint/adding-pyvista-tests
Codecov Report
@@ Coverage Diff @@
## main #2299 +/- ##
==========================================
- Coverage 86.39% 81.76% -4.64%
==========================================
Files 45 45
Lines 7977 8435 +458
==========================================
+ Hits 6892 6897 +5
- Misses 1085 1538 +453 |
Overall, the usage of the plugin looks good to me. I have a comment about the The approach you are using, saving directly the images in the repository, is the one used in In PyAnsys, the approach we are generally using is to upload the You can see some examples of this in PyGeometry and PyPrimeMesh: https://github.com/ansys/pyprimemesh/blob/1aee402e03195f1e4aa6f859055b1519454b637a/.github/workflows/ci_cd.yml#L125C1-L147C28 If this implementation is doable in PyMAPDL, I encourage you to do so, feel free to ask me if you have any doubts 😄 |
Thank you a lot for your detailed comment. I think the idea is good. It will decluter the repo a bit. However, to better have a grasp of the plot differences between local and CICD, I will keep the cache in the repo for now at least for now since we are not very familiar with this image cache checking. Later in the future, I will implement the change you mention once I'm confident on those changes. Again. I will follow your advice in a near future. Thank you a lot! |
LGTM ... because it LGT @AlejandroFernandezLuces |
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.
As the title.
Let's use the pytest plugin
pytest-pyvista
to compare plots and detect changes. This is going to add a bit of burden to the developer since we might need to update the image cache every time there are changes in anything related to plotting.But overall, I think this is a very good improvement, because there is the check and also there is the cache. We can inspect manually the cache and see if there is any plot suspicious.
Notes
I did have to disable the cache of some tests because they seemed to change quite a lot between run or between the machine I ran the test locally and the CICD.
I wonder if there is a way to make the CICD update those images. Probably, part of the nightly/scheduled build should be open an issue when important differences are found.
Skipped tests:
Look for:
The final CICD run showed the following fails:
Increased variance
Only one test at the moment