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
Workarounds for VTK 9.1.0 #1097
Workarounds for VTK 9.1.0 #1097
Conversation
Thank you, I will be taking a look at this tomorrow and later this week. Now that 9.1 is out, I want to fix this ASAP and push out a release that works with the latest VTK. |
Sounds good, feel free to take over or push commits here if you want @prabhuramachandran ! |
@larsoner -- thanks, do you mind if I force-push once I make some headway? I rebased to master. |
Yes feel free |
With this all the mayavi tests pass but a little more work is needed.
- Fixes issues due to changes to the docstrings. - Fixes method signatures with callbacks and default arguments. - Fixes some test errors.
6970464
to
f732fe6
Compare
So the tests are passing for me on macos with VTK 9.1 but there is some other issue on Linux with gh-actions, @rahulporuri can you please take a look. I hate that the tests stop when one architecture fails and do not have any more time this week. |
Looks like there are some major segfaults with VTK-9.1.0. The tests pass well with 9.0.3 and most of the time locally with 9.1.0 for me but on CI they segfault repeatably without any error message. Locally I get a traceback like this:
So this does not seem to be mayavi specific although I need to investigate a little more. I think the build issues are fixed in this PR. |
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.
Mostly LGTM.
To summarize the contents of this PR, it looks like we're modifying the docstrings to remove the V.
prefix, handling the awkward initial condition for vtkEuclideanClusterExtraction.Radius$
. Beyond these, we seem to be special casing some more vtk classes when generating wrappers. Everything else feels unimportant. @prabhuramachandran is that an apt summary?
Note : I tested the MayaVi application on this branch locally and it seemed to work fine. The mayavi testsuite crashed on my machine when i used unittest discover
and nosetests
but the tvtk
testsuite ran with some failures. The tvtk
test failures are only observed with unittest discover
, not nosetests
.
@@ -206,7 +226,7 @@ def test_method_signature(self): | |||
p.get_method_signature(o.GetColor)) | |||
if hasattr(vtk, 'vtkArrayCoordinates'): | |||
self.assertEqual([([None], ('float', 'float', 'float')), | |||
([None], (['float', 'float', 'float'],))], | |||
([None], (['float', 'float', 'float'],))], |
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.
tangential : after we do the release, i would really like to run black on the codebase to address all such indentation/style issues in one go.
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.
Sure, although I do not like black, maybe blue?
@rahulporuri -- thanks, yes the summary seems accurate to me. |
Thanks. Merging for now, will look at the segfaults a little later. |
This PR is now ready to go with a few caveats. As commented by @prabhuramachandran in #1097 (comment), we are observing segfaults when we test against vtk 9.1.0 from PyPI. See GitHub Actions CI output on commits a63b08a, a053a10 or 53345b1. The segfaults with the VTK 9.1.0 are happening on all platforms.
For now, we are choosing to ignore those failures and we are only testing against vtk 9.0.3 on CI but note that we have tested these changes locally on Mac OS and Windows.
Original PR description by @larsoner
Depends/builds on #1050. Now I can at least get it to build+install on 9.1.0-rc2, but now I get:
Two issues I had to fix on top of #1050
V.
was missing in the signatures, so I had to work around itI'm not 100% sure I did either of these correctly, but again it at least let me build and try doing something, and even
import mayavi
(which indicates thattvtk.Version.vtk_version
is exposed properly as a trait/property now). The fact that PolyData is broken is not a good sign, though.This is about all the time I can devote to this, it would be good if someone else could look and fix things for 9.1.0...