pyvista / pyvista-xarray

xarray DataArray accessors for PyVista
Apache License 2.0
101 stars 7 forks source link

Fix vtk import #69

Closed annehaley closed 5 months ago

annehaley commented 5 months ago

When importing pvxarray on a system that does not have libX11-6 installed (such as CI runners), the import can fail with the following error: ImportError: libX11.so.6: cannot open shared object file: No such file or directory. This is because we currently import from vtk.util.vtkAlgorithm import VTKPythonAlgorithmBase. We should not import from vtk directly, as this loads all modules. To load only necessary modules, we should import from vtkmodules instead.

codecov-commenter commented 5 months ago

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 43.09%. Comparing base (117dec9) to head (cb2fcf5). Report is 2 commits behind head on main.

Files Patch % Lines
pvxarray/vtk_source.py 0.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #69 +/- ## ======================================= Coverage 43.09% 43.09% ======================================= Files 11 11 Lines 478 478 ======================================= Hits 206 206 Misses 272 272 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.