Skip to content

Commit 58bbe99

Browse files
committed
Add vtk install to remove libGL error
1 parent 584c88e commit 58bbe99

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

.github/workflows/doc-test.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ jobs:
77
runs-on: ubuntu-latest
88
steps:
99
- uses: actions/checkout@v1
10+
- name: Install package
11+
# install vtk package to avoir libGL.so.1 error
12+
run: |
13+
python -m pip install --upgrade pip
14+
python -m pip install vtk
1015
- uses: ammaraskar/sphinx-action@dev
1116
with:
1217
docs-folder: "docs/"

geos-xml-viewer/src/geos_xml_viewer/filters/geosDeckReader.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
# SPDX-FileContributor: Lionel Untereiner
44
from typing_extensions import Self
55

6-
import vtkmodules.all as vtk
6+
from vtkmodules.vtkCommonCore import vtkInformation,vtkInformationVector
7+
from vtkmodules.vtkCommonDataModel import vtkPartitionedDataSetCollection
78
from vtkmodules.util.vtkAlgorithm import VTKPythonAlgorithmBase
89

910
from geos_xml_viewer.algorithms.deck import SimulationDeck, build_model, read
@@ -53,9 +54,9 @@ def GetAttributeName( self: Self ) -> str:
5354

5455
def RequestData(
5556
self: Self,
56-
request: vtk.vtkInformation,
57-
inInfoVec: vtk.vtkInformationVector,
58-
outInfoVec: vtk.vtkInformationVector,
57+
request: vtkInformation,
58+
inInfoVec: vtkInformationVector,
59+
outInfoVec: vtkInformationVector,
5960
) -> int:
6061
"""RequestData function of the vtk pipeline.
6162
@@ -68,9 +69,9 @@ def RequestData(
6869
int: Returns 1 if the pipeline is successful
6970
"""
7071
self.__simulationDeck = read( self.__filename )
71-
opt = vtk.vtkPartitionedDataSetCollection.GetData( outInfoVec )
72+
opt = vtkPartitionedDataSetCollection.GetData( outInfoVec )
7273

73-
output = vtk.vtkPartitionedDataSetCollection()
74+
output = vtkPartitionedDataSetCollection()
7475
build_model( self.__simulationDeck, output, self.__attributeName )
7576

7677
opt.ShallowCopy( output )

0 commit comments

Comments
 (0)