Skip to content

Commit e05c825

Browse files
build(deps): bump pyvista from 0.45.3 to 0.46.0 in /requirements (#2519)
Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: PProfizi <[email protected]>
1 parent f475532 commit e05c825

File tree

4 files changed

+15
-6
lines changed

4 files changed

+15
-6
lines changed

requirements/requirements_docs.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jupyter_sphinx==0.5.3
77
nbsphinx==0.9.5
88
pypandoc==1.15
99
pytest-sphinx==0.6.3
10-
pyvista==0.45.3
10+
pyvista==0.46.0
1111
sphinx==8.2.3
1212
sphinx-copybutton==0.5.2
1313
sphinx-gallery==0.19.0

requirements/requirements_test.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ pytest==8.4.1
88
pytest-cov==6.2.1
99
pytest-order==1.3.0
1010
pytest-rerunfailures==15.0
11-
pyvista==0.45.3
11+
pyvista==0.46.0
1212
vtk==9.4.2

src/ansys/dpf/core/helpers/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def _sort_supported_kwargs(bound_method, **kwargs):
3434

3535
warnings.simplefilter("ignore")
3636
# Get supported arguments
37-
supported_args = inspect.getfullargspec(bound_method).args
37+
supported_args = inspect.signature(bound_method).parameters.keys()
3838
kwargs_in = {}
3939
kwargs_not_avail = {}
4040
# Filter the given arguments

src/ansys/dpf/core/vtk_helper.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,12 +185,18 @@ def dpf_mesh_to_vtk_op(mesh, nodes=None, as_linear=True):
185185
celltypes_pv = mesh_to_pyvista.outputs.cell_types()
186186
if VTK9:
187187
grid = pv.UnstructuredGrid(cells_pv, celltypes_pv, nodes_pv)
188-
setattr(grid, "_dpf_cache_op", [cells_pv, celltypes_pv, nodes_pv])
188+
# setattr(grid, "_dpf_cache_op", [cells_pv, celltypes_pv, nodes_pv])
189+
pv.set_new_attribute(
190+
obj=grid, name="_dpf_cache_op", value=[cells_pv, celltypes_pv, nodes_pv]
191+
)
189192
return grid
190193
else:
191194
offsets_pv = mesh_to_pyvista.outputs.offsets()
192195
grid = pv.UnstructuredGrid(offsets_pv, cells_pv, celltypes_pv, nodes_pv)
193-
setattr(grid, "_dpf_cache_op", [cells_pv, celltypes_pv, nodes_pv, offsets_pv])
196+
# setattr(grid, "_dpf_cache_op", [cells_pv, celltypes_pv, nodes_pv, offsets_pv])
197+
pv.set_new_attribute(
198+
obj=grid, name="_dpf_cache_op", value=[cells_pv, celltypes_pv, nodes_pv, offsets_pv]
199+
)
194200
return grid
195201

196202

@@ -350,7 +356,10 @@ def compute_offset():
350356

351357
# Quick fix required to hold onto the data as PyVista does not make a copy.
352358
# All of those now return DPFArrays
353-
setattr(grid, "_dpf_cache", [node_coordinates, coordinates_field])
359+
# setattr(grid, "_dpf_cache", [node_coordinates, coordinates_field])
360+
pv.set_new_attribute(
361+
obj=grid, name="_dpf_cache", value=[node_coordinates, coordinates_field]
362+
)
354363

355364
return grid
356365

0 commit comments

Comments
 (0)