Skip to content

Bump pyvista from 0.44.2 to 0.45.0 in /requirements #2229

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Apr 30, 2025
Merged
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ jobs:
python -c "from ansys.dpf import core"

- name: "Setup headless display"
uses: pyvista/setup-headless-display-action@v2
uses: pyvista/setup-headless-display-action@48066dd0b79cf46babc16223a1dce3aa4803ec43 # v4.0

- name: "Setup Graphviz"
uses: ts-graphviz/setup-graphviz@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ jobs:
run: python -c "from ansys.dpf import core"

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

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/examples_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ jobs:
run: python -c "from ansys.dpf import core"

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

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pydpf-post.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ jobs:
ls

- name: "Prepare Testing Environment"
uses: ansys/pydpf-actions/prepare_tests@v2.3
uses: ansys/pydpf-actions/prepare_tests@dependencies/bump_pyvista_setup-headless-display-action_to_v4
with:
DEBUG: true
working-directory: pydpf-post
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ jobs:
run: python -c "from ansys.dpf import core"

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

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ jobs:
python -c "from ansys.dpf import core"

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

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ plotting = [
"matplotlib>=3.2",
# 3D plotting
"pyvista>=0.32.0",
"vtk!=9.4.0",
"vtk",
# Animations
"imageio < 2.28.1",
"imageio-ffmpeg",
Expand Down
4 changes: 2 additions & 2 deletions requirements/requirements_docs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ imageio==2.37.0
imageio-ffmpeg==0.6.0
pypandoc==1.15
pytest-sphinx==0.6.3
pyvista==0.44.2
pyvista==0.45.0
sphinx==8.2.3
sphinx-copybutton==0.5.2
sphinx-gallery==0.19.0
Expand All @@ -14,4 +14,4 @@ sphinx-notfound-page==1.1.0
sphinx-reredirects==0.1.6
sphinx_design==0.6.1
sphinxcontrib-napoleon==0.7
vtk==9.3.1
vtk==9.4.2
4 changes: 2 additions & 2 deletions requirements/requirements_test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ pytest==8.3.5
pytest-cov==6.0.0
pytest-order==1.3.0
pytest-rerunfailures==15.0
pyvista==0.44.2
vtk==9.3.1
pyvista==0.45.0
vtk==9.4.2
12 changes: 11 additions & 1 deletion src/ansys/dpf/core/plotter.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,17 @@
import pyvista as pv

active_scalars = None
if parse(pv.__version__) >= parse("0.35.2"):
if parse(pv.__version__) >= parse("0.42.0"):
# Get actors of active renderer
actors = list(self._plotter.actors.values())
for actor in actors:
mapper = actor.mapper if hasattr(actor, "mapper") else None
if mapper:
dataset = mapper.dataset
if type(dataset) is pv.core.pointset.UnstructuredGrid:
active_scalars = dataset.active_scalars
break
elif parse(pv.__version__) >= parse("0.35.2"):

Check warning on line 206 in src/ansys/dpf/core/plotter.py

View check run for this annotation

Codecov / codecov/patch

src/ansys/dpf/core/plotter.py#L206

Added line #L206 was not covered by tests
for data_set in self._plotter._datasets:
if type(data_set) is pv.core.pointset.UnstructuredGrid:
active_scalars = data_set.active_scalars
Expand Down
Loading