From 4ee685ea49b1efa3ed1d4cf428c75ef5dfe5550c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 21 Apr 2025 05:25:09 +0000 Subject: [PATCH 1/7] 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](https://github.com/pyvista/pyvista/compare/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] --- requirements/requirements_docs.txt | 2 +- requirements/requirements_test.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements/requirements_docs.txt b/requirements/requirements_docs.txt index a4750003033..bebf919ed7f 100644 --- a/requirements/requirements_docs.txt +++ b/requirements/requirements_docs.txt @@ -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 diff --git a/requirements/requirements_test.txt b/requirements/requirements_test.txt index ea128b0afc1..03a91951cdf 100644 --- a/requirements/requirements_test.txt +++ b/requirements/requirements_test.txt @@ -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 +pyvista==0.45.0 vtk==9.3.1 From a27d1e2429b216b44c566a9791d130e21b129b71 Mon Sep 17 00:00:00 2001 From: Paul Profizi <100710998+PProfizi@users.noreply.github.com> Date: Wed, 23 Apr 2025 09:55:09 +0200 Subject: [PATCH 2/7] Bump vtk==9.4.2 --- requirements/requirements_docs.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/requirements_docs.txt b/requirements/requirements_docs.txt index bebf919ed7f..76d358aa022 100644 --- a/requirements/requirements_docs.txt +++ b/requirements/requirements_docs.txt @@ -14,4 +14,4 @@ sphinx-notfound-page==1.1.0 sphinx-reredirects==0.1.3 sphinx_design==0.6.1 sphinxcontrib-napoleon==0.7 -vtk==9.3.1 +vtk==9.4.2 From 72a2f885d6168888c4c0b7a1f6eb6d8c708c67bd Mon Sep 17 00:00:00 2001 From: Paul Profizi <100710998+PProfizi@users.noreply.github.com> Date: Wed, 23 Apr 2025 09:55:30 +0200 Subject: [PATCH 3/7] Bump vtk==9.4.2 --- requirements/requirements_test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/requirements_test.txt b/requirements/requirements_test.txt index 03a91951cdf..ed7fe659593 100644 --- a/requirements/requirements_test.txt +++ b/requirements/requirements_test.txt @@ -9,4 +9,4 @@ pytest-cov==6.0.0 pytest-order==1.3.0 pytest-rerunfailures==15.0 pyvista==0.45.0 -vtk==9.3.1 +vtk==9.4.2 From a7fd8956505fd62d480cc703573f3cd09dcc2efa Mon Sep 17 00:00:00 2001 From: Paul Profizi <100710998+PProfizi@users.noreply.github.com> Date: Wed, 23 Apr 2025 09:56:13 +0200 Subject: [PATCH 4/7] Remove limit on VTK in pyproject.toml --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index af5ddf6b9e5..5511a98bbb4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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", From 5994f31db0e7c7fe1f563c430eb34f6341760cc4 Mon Sep 17 00:00:00 2001 From: Paul Profizi <100710998+PProfizi@users.noreply.github.com> Date: Wed, 23 Apr 2025 09:58:43 +0200 Subject: [PATCH 5/7] Use pyvista/setup-headless-display-action v4 --- .github/workflows/docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index d61606c844d..69b9643b615 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -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 From 0000f0186b4747e71b13dd2eda761f3d9adb5cba Mon Sep 17 00:00:00 2001 From: PProfizi Date: Wed, 23 Apr 2025 10:07:43 +0200 Subject: [PATCH 6/7] Test with new prepare_tests action --- .github/workflows/examples.yml | 2 +- .github/workflows/examples_docker.yml | 2 +- .github/workflows/pydpf-post.yml | 2 +- .github/workflows/test_docker.yml | 2 +- .github/workflows/tests.yml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml index 930d0fa52f0..2b77137a8ed 100644 --- a/.github/workflows/examples.yml +++ b/.github/workflows/examples.yml @@ -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 diff --git a/.github/workflows/examples_docker.yml b/.github/workflows/examples_docker.yml index d15d53c42ae..e6e379b59c2 100644 --- a/.github/workflows/examples_docker.yml +++ b/.github/workflows/examples_docker.yml @@ -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 diff --git a/.github/workflows/pydpf-post.yml b/.github/workflows/pydpf-post.yml index 17d81bfec11..0fdba8dd0de 100644 --- a/.github/workflows/pydpf-post.yml +++ b/.github/workflows/pydpf-post.yml @@ -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 diff --git a/.github/workflows/test_docker.yml b/.github/workflows/test_docker.yml index 11a806adf90..3ee2ee91d46 100644 --- a/.github/workflows/test_docker.yml +++ b/.github/workflows/test_docker.yml @@ -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 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 3e6121ddd5b..fd5f8914df7 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -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 From ffa9011e7d439db31367b082b22a74ec09a84a44 Mon Sep 17 00:00:00 2001 From: PProfizi Date: Wed, 30 Apr 2025 11:41:24 +0200 Subject: [PATCH 7/7] Fix _PyVistaPlotter.add_point_labels --- src/ansys/dpf/core/plotter.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/ansys/dpf/core/plotter.py b/src/ansys/dpf/core/plotter.py index 23e20189e09..2978046899f 100644 --- a/src/ansys/dpf/core/plotter.py +++ b/src/ansys/dpf/core/plotter.py @@ -193,7 +193,17 @@ def get_label_at_grid_point(index): 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"): for data_set in self._plotter._datasets: if type(data_set) is pv.core.pointset.UnstructuredGrid: active_scalars = data_set.active_scalars