enthought / mayavi

3D visualization of scientific data in Python
http://docs.enthought.com/mayavi/mayavi/
Other
1.3k stars 284 forks source link

Fix bug with cell_to_point_data. #1134

Closed prabhuramachandran closed 2 years ago

prabhuramachandran commented 2 years ago

Also add a github action to test headless builds. This will test if Mayavi can be installed on a remote server and if all the tests pass there. This test is scheduled to run on a PR as well as every week.

rahulporuri commented 2 years ago

@prabhuramachandran looks like CI is failing - the new test is running into a potentially unrelated error

======================================================================
ERROR: test_cell_to_point_data (mayavi.tests.test_filters.TestFilters)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/unittest/mock.py", line 1183, in patched
    return func(*args, **keywargs)
  File "/home/runner/work/mayavi/mayavi/mayavi/tests/test_filters.py", line 17, in test_cell_to_point_data
    src = mlab.pipeline.open(os.path.join('data', 'pyramid_ug.vtu'))
  File "/home/runner/work/mayavi/mayavi/mayavi/tools/sources.py", line 1424, in open
    src = engine.open(filename)
  File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/site-packages/apptools/scripting/recordable.py", line 48, in _wrapper
    result = func(*args, **kw)
  File "/home/runner/work/mayavi/mayavi/mayavi/core/engine.py", line 322, in open
    src.initialize(filename)
  File "/home/runner/work/mayavi/mayavi/mayavi/core/file_data_source.py", line 217, in initialize
    self.base_file_name = base_file_name
  File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/site-packages/traits/trait_notifiers.py", line 348, in __call__
    handle_exception(object, trait_name, old, new)
  File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/site-packages/traits/trait_notifiers.py", line 149, in _handle_exception
    raise excp
  File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/site-packages/traits/trait_notifiers.py", line [342](https://github.com/enthought/mayavi/runs/5251956215?check_suite_focus=true#step:6:342), in __call__
    self.handler(*args)
  File "/home/runner/work/mayavi/mayavi/mayavi/core/file_data_source.py", line 246, in _base_file_name_changed
    self._update_files_fired()
  File "/home/runner/work/mayavi/mayavi/mayavi/core/file_data_source.py", line 323, in _update_files_fired
    self.file_list = file_list
  File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/site-packages/traits/trait_notifiers.py", line [348](https://github.com/enthought/mayavi/runs/5251956215?check_suite_focus=true#step:6:348), in __call__
    handle_exception(object, trait_name, old, new)
  File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/site-packages/traits/trait_notifiers.py", line 149, in _handle_exception
    raise excp
  File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/site-packages/traits/trait_notifiers.py", line 342, in __call__
    self.handler(*args)
  File "/home/runner/work/mayavi/mayavi/mayavi/core/file_data_source.py", line 227, in _file_list_changed
    self._timestep_changed(timestep)
  File "/home/runner/work/mayavi/mayavi/mayavi/core/file_data_source.py", line 238, in _timestep_changed
    self.file_path = FilePath(file_list[value])
  File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/site-packages/traits/trait_notifiers.py", line 348, in __call__
    handle_exception(object, trait_name, old, new)
  File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/site-packages/traits/trait_notifiers.py", line 149, in _handle_exception
    raise excp
  File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/site-packages/traits/trait_notifiers.py", line 342, in __call__
    self.handler(*args)
  File "/home/runner/work/mayavi/mayavi/mayavi/sources/vtk_xml_file_reader.py", line 295, in _file_path_changed
    self.reader = eval('tvtk.XML%sReader()'%d_type)
  File "<string>", line 1, in <module>
AttributeError: 'TVTK' object has no attribute 'XMLNoneReader'