Skip to content

Fix wrapping VTK's Get* methods#693

Merged
prabhuramachandran merged 5 commits into
enthought:masterfrom
prabhuramachandran:pipeline-fixes
Aug 1, 2018
Merged

Fix wrapping VTK's Get* methods#693
prabhuramachandran merged 5 commits into
enthought:masterfrom
prabhuramachandran:pipeline-fixes

Conversation

@prabhuramachandran
Copy link
Copy Markdown
Member

  • Fix array handler tests for newer numpy versions. These versions have a float16/float128 dtype which are not directly supported in VTK.
  • BUG: wrap the Get methods correctly. Many of the new pipeline methods were not wrapped correctly. For example the vtkAlgorithm.GetInputAlgorithm has multiple signatures. TVTK was wrapping any getter which had one of its signatures with no args as a pure property and not exposing the method itself. This means that users cannot call obj.get_input_algorithm(0, 0) which is broken. We now wrap the no arg call as a property but also wrap the generic method as a callable method.
  • Fix the pipeline browser for the new pipeline.
  • Add a few reasonable tests for the browser

This generally works better with the new pipeline.
These versions have a float16/float128 dtype which are not directly
supported in VTK.
Many of the new pipeline methods were not wrapped correctly.  For
example the vtkAlgorithm.GetInputAlgorithm has multiple signatures.
TVTK was wrapping any getter which had one of its signatures with no
args as a pure property and not exposing the method itself.  This means
that users cannot call `obj.get_input_algorithm(0, 0)` which is broken.
We now wrap the no arg call as a property but also wrap the generic
method as a callable method.
Add a few reasonable tests for the browser.
@prabhuramachandran prabhuramachandran changed the title Several important fixes Fix wrapping VTK's Get* methods Aug 1, 2018
@prabhuramachandran prabhuramachandran merged commit 8b25717 into enthought:master Aug 1, 2018
@prabhuramachandran prabhuramachandran deleted the pipeline-fixes branch August 1, 2018 01:01
@codecov-io
Copy link
Copy Markdown

codecov-io commented Aug 1, 2018

Codecov Report

Merging #693 into master will increase coverage by 0.35%.
The diff coverage is 36%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #693      +/-   ##
==========================================
+ Coverage   50.59%   50.95%   +0.35%     
==========================================
  Files         257      257              
  Lines       23443    23436       -7     
  Branches     3198     3195       -3     
==========================================
+ Hits        11862    11942      +80     
+ Misses      10822    10717     -105     
- Partials      759      777      +18
Impacted Files Coverage Δ
tvtk/wrapper_gen.py 10.96% <0%> (-0.05%) ⬇️
mayavi/sources/vtk_data_source.py 82.75% <100%> (ø) ⬆️
tvtk/pipeline/browser.py 43.61% <53.33%> (+20.63%) ⬆️
tvtk/array_handler.py 79.27% <0%> (-0.85%) ⬇️
tvtk/pyface/tvtk_scene.py 39.52% <0%> (+1.06%) ⬆️
mayavi/core/module_manager.py 74.72% <0%> (+1.09%) ⬆️
tvtk/common.py 71.76% <0%> (+1.17%) ⬆️
tvtk/pyface/ui/qt4/scene.py 43.11% <0%> (+1.37%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f8a4d7a...4eb6c1d. Read the comment docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants