Skip to content

Commit d4dce38

Browse files
test: Add interaction testing (#352)
Co-authored-by: pyansys-ci-bot <[email protected]>
1 parent 9c63667 commit d4dce38

File tree

7 files changed

+344
-17
lines changed

7 files changed

+344
-17
lines changed

.github/workflows/ci_cd.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ jobs:
125125
uses: actions/upload-artifact@v4
126126
with:
127127
name: pytest-pyvista-images-${{ runner.os }}
128-
path: tests/graphics/image_cache
128+
path: tests/_image_cache
129129
retention-days: 7
130130

131131
- uses: codecov/codecov-action@v5
@@ -175,7 +175,7 @@ jobs:
175175
path: ${{ env.PACKAGE_NAME }}-artifacts
176176

177177
- name: "Upload artifacts to PyPI using trusted publisher"
178-
uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4
178+
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0
179179
with:
180180
repository-url: "https://upload.pypi.org/legacy/"
181181
print-hash: true

.github/workflows/label.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
steps:
3636
# Label based on modified files
3737
- name: Label based on changed files
38-
uses: actions/labeler@v5
38+
uses: actions/labeler@v6
3939
with:
4040
repo-token: ${{ secrets.GITHUB_TOKEN }}
4141
sync-labels: true

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/adamchainz/blacken-docs
3-
rev: 1.19.1
3+
rev: 1.20.0
44
hooks:
55
- id: blacken-docs
66
additional_dependencies: [black==23.12.1]
@@ -29,12 +29,12 @@ repos:
2929

3030
# this validates our github workflow files
3131
- repo: https://github.com/python-jsonschema/check-jsonschema
32-
rev: 0.33.2
32+
rev: 0.33.3
3333
hooks:
3434
- id: check-github-workflows
3535

3636
- repo: https://github.com/astral-sh/ruff-pre-commit
37-
rev: v0.12.9
37+
rev: v0.13.0
3838
hooks:
3939
- id: ruff
4040
args: [--fix]
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Test: Add interaction testing

pyproject.toml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,18 +36,18 @@ pyvistaqt = [
3636
"pyvistaqt >= 0.11.1,<1",
3737
]
3838
tests = [
39-
"pytest==8.4.1",
40-
"pyvista==0.46.1",
39+
"pytest==8.4.2",
40+
"pyvista==0.46.3",
4141
"pytest-pyvista==0.2.0",
42-
"pytest-cov==6.2.1",
43-
"pyside6==6.9.1",
42+
"pytest-cov==7.0.0",
43+
"pyside6==6.9.2",
4444
]
4545

4646
doc = [
47-
"pyvista==0.46.1",
48-
"ansys-sphinx-theme==1.5.3",
47+
"pyvista==0.46.3",
48+
"ansys-sphinx-theme==1.6.1",
4949
"jupyter_sphinx==0.5.3",
50-
"jupytext==1.17.2",
50+
"jupytext==1.17.3",
5151
"nbsphinx==0.9.6",
5252
"numpydoc==1.9.0",
5353
"sphinx==8.2.3",
@@ -56,7 +56,7 @@ doc = [
5656
"sphinx_design==0.6.1",
5757
"sphinx-gallery==0.19.0",
5858
"sphinx-jinja==2.0.2",
59-
"ansys-fluent-core==0.34.2",
59+
"ansys-fluent-core==0.35.0",
6060
]
6161

6262
[project.urls]

src/ansys/tools/visualization_interface/plotter.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
# SOFTWARE.
2222

2323
"""Module for the Plotter class."""
24-
from typing import Any
24+
from typing import Any, List
2525

2626
from ansys.tools.visualization_interface.backends._base import BaseBackend
2727
from ansys.tools.visualization_interface.backends.pyvista.pyvista import PyVistaBackend
@@ -67,7 +67,7 @@ def show(
6767
screenshot: str = None,
6868
name_filter: bool = None,
6969
**kwargs
70-
) -> None:
70+
) -> List:
7171
"""Show the plotted objects.
7272
7373
Parameters
@@ -80,8 +80,13 @@ def show(
8080
Flag to filter the object, by default None.
8181
kwargs : dict
8282
Additional options the selected backend accepts.
83+
84+
Returns
85+
-------
86+
List
87+
List of picked objects.
8388
"""
84-
self._backend.show(
89+
return self._backend.show(
8590
plottable_object=plottable_object,
8691
screenshot=screenshot,
8792
name_filter=name_filter,

0 commit comments

Comments
 (0)