Skip to content

Commit 7a526d5

Browse files
Bump version 0.2.1
1 parent 59bc45e commit 7a526d5

File tree

4 files changed

+10
-5
lines changed

4 files changed

+10
-5
lines changed

doc/changelog.d/63.fixed.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
fix: Fix support for interactive documentation

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "flit_core.buildapi"
44

55
[project]
66
name = "ansys-tools-visualization-interface"
7-
version = "0.2.0"
7+
version = "0.2.1"
88
description = "A Python visualization interface for PyAnsys libraries"
99
readme = "README.rst"
1010
requires-python = ">=3.9,<4"
@@ -23,7 +23,7 @@ classifiers = [
2323
"Programming Language :: Python :: 3.12",
2424
]
2525
dependencies = [
26-
"pyvista >= 0.42.0,<1",
26+
"pyvista >= 0.43.0,<1",
2727
"beartype >= 0.17.0,<1",
2828
"websockets >= 12.0,<13",
2929
"trame >= 3.6.0,<4",

src/ansys/tools/visualization_interface/__init__.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,12 @@
2626
__version__ = importlib_metadata.version(__name__.replace(".", "-"))
2727

2828
USE_TRAME: bool = False
29-
DOCUMENTATION_BUILD: bool = False
29+
30+
DOCUMENTATION_BUILD: bool = os.environ.get("PYANSYS_VISUALIZER_DOC_MODE", "false").lower() == "true"
31+
"""Whether the documentation is being built or not."""
32+
3033
TESTING_MODE: bool = os.environ.get("PYANSYS_VISUALIZER_TESTMODE", "false").lower() == "true"
34+
"""Whether the library is being built or not, used to avoid showing plots while testing."""
3135

3236
from ansys.tools.visualization_interface.plotter import Plotter # noqa: F401, E402
3337
from ansys.tools.visualization_interface.types.edge_plot import EdgePlot # noqa: F401, E402

src/ansys/tools/visualization_interface/backends/pyvista/pyvista_interface.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ def show(
327327

328328
# Override Jupyter backend if building docs
329329
if DOCUMENTATION_BUILD:
330-
jupyter_backend = "static"
330+
jupyter_backend = "html"
331331

332332
# Enabling anti-aliasing by default on scene
333333
self.scene.enable_anti_aliasing("ssaa")
@@ -337,7 +337,7 @@ def show(
337337
self.scene.off_screen = True
338338

339339
# If running on testing, set off_screen to True for the plotter
340-
if TESTING_MODE:
340+
if TESTING_MODE or DOCUMENTATION_BUILD:
341341
self.scene.off_screen = True
342342

343343
self.scene.show(jupyter_backend=jupyter_backend, **kwargs)

0 commit comments

Comments
 (0)