Skip to content

Commit 6e23760

Browse files
Bump pyvista from 0.44.2 to 0.45.0 in /requirements (#2229)
* Bump pyvista from 0.44.2 to 0.45.0 in /requirements Bumps [pyvista](https://github.com/pyvista/pyvista) from 0.44.2 to 0.45.0. - [Release notes](https://github.com/pyvista/pyvista/releases) - [Commits](pyvista/pyvista@v0.44.2...v0.45.0) --- updated-dependencies: - dependency-name: pyvista dependency-version: 0.45.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * Bump vtk==9.4.2 * Bump vtk==9.4.2 * Remove limit on VTK in pyproject.toml * Use pyvista/setup-headless-display-action v4 * Test with new prepare_tests action * Fix _PyVistaPlotter.add_point_labels --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Paul Profizi <[email protected]> Co-authored-by: PProfizi <[email protected]>
1 parent e1839c9 commit 6e23760

File tree

10 files changed

+22
-12
lines changed

10 files changed

+22
-12
lines changed

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ jobs:
110110
python -c "from ansys.dpf import core"
111111
112112
- name: "Setup headless display"
113-
uses: pyvista/setup-headless-display-action@v2
113+
uses: pyvista/setup-headless-display-action@48066dd0b79cf46babc16223a1dce3aa4803ec43 # v4.0
114114

115115
- name: "Setup Graphviz"
116116
uses: ts-graphviz/setup-graphviz@v2

.github/workflows/examples.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ jobs:
120120
run: python -c "from ansys.dpf import core"
121121

122122
- name: "Prepare Testing Environment"
123-
uses: ansys/pydpf-actions/prepare_tests@v2.3
123+
uses: ansys/pydpf-actions/prepare_tests@dependencies/bump_pyvista_setup-headless-display-action_to_v4
124124
with:
125125
DEBUG: true
126126

.github/workflows/examples_docker.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ jobs:
116116
run: python -c "from ansys.dpf import core"
117117

118118
- name: "Prepare Testing Environment"
119-
uses: ansys/pydpf-actions/prepare_tests@v2.3
119+
uses: ansys/pydpf-actions/prepare_tests@dependencies/bump_pyvista_setup-headless-display-action_to_v4
120120
with:
121121
DEBUG: true
122122

.github/workflows/pydpf-post.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ jobs:
137137
ls
138138
139139
- name: "Prepare Testing Environment"
140-
uses: ansys/pydpf-actions/prepare_tests@v2.3
140+
uses: ansys/pydpf-actions/prepare_tests@dependencies/bump_pyvista_setup-headless-display-action_to_v4
141141
with:
142142
DEBUG: true
143143
working-directory: pydpf-post

.github/workflows/test_docker.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ jobs:
9898
run: python -c "from ansys.dpf import core"
9999

100100
- name: "Prepare Testing Environment"
101-
uses: ansys/pydpf-actions/prepare_tests@v2.3
101+
uses: ansys/pydpf-actions/prepare_tests@dependencies/bump_pyvista_setup-headless-display-action_to_v4
102102
with:
103103
DEBUG: true
104104

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ jobs:
206206
python -c "from ansys.dpf import core"
207207
208208
- name: "Prepare Testing Environment"
209-
uses: ansys/pydpf-actions/prepare_tests@v2.3
209+
uses: ansys/pydpf-actions/prepare_tests@dependencies/bump_pyvista_setup-headless-display-action_to_v4
210210
with:
211211
DEBUG: true
212212

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ plotting = [
5454
"matplotlib>=3.2",
5555
# 3D plotting
5656
"pyvista>=0.32.0",
57-
"vtk!=9.4.0",
57+
"vtk",
5858
# Animations
5959
"imageio < 2.28.1",
6060
"imageio-ffmpeg",

requirements/requirements_docs.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ imageio==2.37.0
55
imageio-ffmpeg==0.6.0
66
pypandoc==1.15
77
pytest-sphinx==0.6.3
8-
pyvista==0.44.2
8+
pyvista==0.45.0
99
sphinx==8.2.3
1010
sphinx-copybutton==0.5.2
1111
sphinx-gallery==0.19.0
@@ -14,4 +14,4 @@ sphinx-notfound-page==1.1.0
1414
sphinx-reredirects==0.1.6
1515
sphinx_design==0.6.1
1616
sphinxcontrib-napoleon==0.7
17-
vtk==9.3.1
17+
vtk==9.4.2

requirements/requirements_test.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ pytest==8.3.5
88
pytest-cov==6.0.0
99
pytest-order==1.3.0
1010
pytest-rerunfailures==15.0
11-
pyvista==0.44.2
12-
vtk==9.3.1
11+
pyvista==0.45.0
12+
vtk==9.4.2

src/ansys/dpf/core/plotter.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,17 @@ def get_label_at_grid_point(index):
193193
import pyvista as pv
194194

195195
active_scalars = None
196-
if parse(pv.__version__) >= parse("0.35.2"):
196+
if parse(pv.__version__) >= parse("0.42.0"):
197+
# Get actors of active renderer
198+
actors = list(self._plotter.actors.values())
199+
for actor in actors:
200+
mapper = actor.mapper if hasattr(actor, "mapper") else None
201+
if mapper:
202+
dataset = mapper.dataset
203+
if type(dataset) is pv.core.pointset.UnstructuredGrid:
204+
active_scalars = dataset.active_scalars
205+
break
206+
elif parse(pv.__version__) >= parse("0.35.2"):
197207
for data_set in self._plotter._datasets:
198208
if type(data_set) is pv.core.pointset.UnstructuredGrid:
199209
active_scalars = data_set.active_scalars

0 commit comments

Comments
 (0)