-
Notifications
You must be signed in to change notification settings - Fork 441
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
Skip MathText test for VTK and Matplotlib version incompatibilities #3838
Conversation
Codecov Report
@@ Coverage Diff @@
## main #3838 +/- ##
==========================================
+ Coverage 94.11% 94.18% +0.07%
==========================================
Files 87 87
Lines 19108 19156 +48
==========================================
+ Hits 17984 18043 +59
+ Misses 1124 1113 -11 |
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 disagree with this change. (and it would need to be 9.2.5, not 9.2.2)
Indeed, the MPL version needs to be limited depending on the VTK version (matplotlib<3.6 for VTK<=9.2.2). This is currently handled on CI and not in our requirements_*.txt
files. Reference:
- name: Limit Matplotlib for VTK<=9.2.2 |
In my opinion, this should be left as is, and we should better document that "For VTK<=9.2.2, this requires matplotlib<3.6" which developers will have to handle locally when using VTK<=9.2.2.
However, I recognize that this opinion introduces confusion and developer burden. So how about this?:
We could modify this test to have the following condition that checks to make sure VTK and MPL are compatible:
@pytest.mark.skipif(
matplotlib._parse_to_version_info(matplotlib._get_version()) >= (3, 6)
and pyvista.vtk_version_info <= (9, 2, 2),
reason='VTK and Matplotlib version incompatibility. For VTK<=9.2.2, MathText requires matplotlib<3.6',
)
Though using a private API from MPL might not be the best choice... |
Why not just do something along the lines of |
Implemented both suggestions in 8638c86. |
It's necessary to conditionally skip a test in
tests/plotting/test_plotter.py
as it's possible to have a local testing enviornment where this test always fails:Problem Overview
In
tests/plotting/test_plotter.py
we have:pyvista/tests/plotting/test_plotting.py
Line 2501 in 1f78d08
Yet we don't specify a conditional
matplotlib
requirement inrequirements_test.txt
:pyvista/requirements_test.txt
Line 13 in 1f78d08
This means that the test will fail with the following environment: