ansys-pyensight-core 0.10.3__tar.gz → 0.10.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of ansys-pyensight-core might be problematic. Click here for more details.
- {ansys_pyensight_core-0.10.3 → ansys_pyensight_core-0.10.5}/PKG-INFO +2 -2
- {ansys_pyensight_core-0.10.3 → ansys_pyensight_core-0.10.5}/pyproject.toml +2 -2
- {ansys_pyensight_core-0.10.3 → ansys_pyensight_core-0.10.5}/src/ansys/pyensight/core/dockerlauncher.py +3 -5
- {ansys_pyensight_core-0.10.3 → ansys_pyensight_core-0.10.5}/src/ansys/pyensight/core/locallauncher.py +14 -12
- {ansys_pyensight_core-0.10.3 → ansys_pyensight_core-0.10.5}/src/ansys/pyensight/core/utils/export.py +1 -1
- {ansys_pyensight_core-0.10.3 → ansys_pyensight_core-0.10.5}/src/ansys/pyensight/core/utils/omniverse.py +25 -2
- {ansys_pyensight_core-0.10.3 → ansys_pyensight_core-0.10.5}/LICENSE +0 -0
- {ansys_pyensight_core-0.10.3 → ansys_pyensight_core-0.10.5}/README.rst +0 -0
- {ansys_pyensight_core-0.10.3 → ansys_pyensight_core-0.10.5}/src/ansys/pyensight/core/__init__.py +0 -0
- {ansys_pyensight_core-0.10.3 → ansys_pyensight_core-0.10.5}/src/ansys/pyensight/core/common.py +0 -0
- {ansys_pyensight_core-0.10.3 → ansys_pyensight_core-0.10.5}/src/ansys/pyensight/core/deep_pixel_view.html +0 -0
- {ansys_pyensight_core-0.10.3 → ansys_pyensight_core-0.10.5}/src/ansys/pyensight/core/dvs.py +0 -0
- {ansys_pyensight_core-0.10.3 → ansys_pyensight_core-0.10.5}/src/ansys/pyensight/core/enscontext.py +0 -0
- {ansys_pyensight_core-0.10.3 → ansys_pyensight_core-0.10.5}/src/ansys/pyensight/core/enshell_grpc.py +0 -0
- {ansys_pyensight_core-0.10.3 → ansys_pyensight_core-0.10.5}/src/ansys/pyensight/core/ensight_grpc.py +0 -0
- {ansys_pyensight_core-0.10.3 → ansys_pyensight_core-0.10.5}/src/ansys/pyensight/core/ensobj.py +0 -0
- {ansys_pyensight_core-0.10.3 → ansys_pyensight_core-0.10.5}/src/ansys/pyensight/core/launch_ensight.py +0 -0
- {ansys_pyensight_core-0.10.3 → ansys_pyensight_core-0.10.5}/src/ansys/pyensight/core/launcher.py +0 -0
- {ansys_pyensight_core-0.10.3 → ansys_pyensight_core-0.10.5}/src/ansys/pyensight/core/libuserd.py +0 -0
- {ansys_pyensight_core-0.10.3 → ansys_pyensight_core-0.10.5}/src/ansys/pyensight/core/listobj.py +0 -0
- {ansys_pyensight_core-0.10.3 → ansys_pyensight_core-0.10.5}/src/ansys/pyensight/core/py.typed +0 -0
- {ansys_pyensight_core-0.10.3 → ansys_pyensight_core-0.10.5}/src/ansys/pyensight/core/renderable.py +0 -0
- {ansys_pyensight_core-0.10.3 → ansys_pyensight_core-0.10.5}/src/ansys/pyensight/core/session.py +0 -0
- {ansys_pyensight_core-0.10.3 → ansys_pyensight_core-0.10.5}/src/ansys/pyensight/core/sgeo_poll.html +0 -0
- {ansys_pyensight_core-0.10.3 → ansys_pyensight_core-0.10.5}/src/ansys/pyensight/core/utils/__init__.py +0 -0
- {ansys_pyensight_core-0.10.3 → ansys_pyensight_core-0.10.5}/src/ansys/pyensight/core/utils/adr.py +0 -0
- {ansys_pyensight_core-0.10.3 → ansys_pyensight_core-0.10.5}/src/ansys/pyensight/core/utils/dsg_server.py +0 -0
- {ansys_pyensight_core-0.10.3 → ansys_pyensight_core-0.10.5}/src/ansys/pyensight/core/utils/omniverse_cli.py +0 -0
- {ansys_pyensight_core-0.10.3 → ansys_pyensight_core-0.10.5}/src/ansys/pyensight/core/utils/omniverse_dsg_server.py +0 -0
- {ansys_pyensight_core-0.10.3 → ansys_pyensight_core-0.10.5}/src/ansys/pyensight/core/utils/omniverse_glb_server.py +0 -0
- {ansys_pyensight_core-0.10.3 → ansys_pyensight_core-0.10.5}/src/ansys/pyensight/core/utils/parts.py +0 -0
- {ansys_pyensight_core-0.10.3 → ansys_pyensight_core-0.10.5}/src/ansys/pyensight/core/utils/query.py +0 -0
- {ansys_pyensight_core-0.10.3 → ansys_pyensight_core-0.10.5}/src/ansys/pyensight/core/utils/readers.py +0 -0
- {ansys_pyensight_core-0.10.3 → ansys_pyensight_core-0.10.5}/src/ansys/pyensight/core/utils/resources/Materials/000_sky.exr +0 -0
- {ansys_pyensight_core-0.10.3 → ansys_pyensight_core-0.10.5}/src/ansys/pyensight/core/utils/support.py +0 -0
- {ansys_pyensight_core-0.10.3 → ansys_pyensight_core-0.10.5}/src/ansys/pyensight/core/utils/variables.py +0 -0
- {ansys_pyensight_core-0.10.3 → ansys_pyensight_core-0.10.5}/src/ansys/pyensight/core/utils/views.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ansys-pyensight-core
|
|
3
|
-
Version: 0.10.
|
|
3
|
+
Version: 0.10.5
|
|
4
4
|
Summary: A python wrapper for Ansys EnSight
|
|
5
5
|
Author-email: "ANSYS, Inc." <pyansys.core@ansys.com>
|
|
6
6
|
Maintainer-email: "ANSYS, Inc." <pyansys.core@ansys.com>
|
|
@@ -17,7 +17,7 @@ Classifier: Programming Language :: Python :: 3.12
|
|
|
17
17
|
Classifier: Programming Language :: Python :: 3.13
|
|
18
18
|
License-File: LICENSE
|
|
19
19
|
Requires-Dist: importlib-metadata>=4.0; python_version<='3.8'
|
|
20
|
-
Requires-Dist: ansys-api-pyensight==0.4.
|
|
20
|
+
Requires-Dist: ansys-api-pyensight==0.4.8
|
|
21
21
|
Requires-Dist: requests>=2.28.2
|
|
22
22
|
Requires-Dist: docker>=6.1.0
|
|
23
23
|
Requires-Dist: urllib3<2.4.0
|
|
@@ -6,7 +6,7 @@ build-backend = "flit_core.buildapi"
|
|
|
6
6
|
|
|
7
7
|
[project]
|
|
8
8
|
name = "ansys-pyensight-core"
|
|
9
|
-
version = "0.10.
|
|
9
|
+
version = "0.10.5"
|
|
10
10
|
description = "A python wrapper for Ansys EnSight"
|
|
11
11
|
readme = "README.rst"
|
|
12
12
|
requires-python = ">=3.10,<3.14"
|
|
@@ -27,7 +27,7 @@ classifiers = [
|
|
|
27
27
|
|
|
28
28
|
dependencies = [
|
|
29
29
|
"importlib-metadata>=4.0; python_version<='3.8'",
|
|
30
|
-
"ansys-api-pyensight==0.4.
|
|
30
|
+
"ansys-api-pyensight==0.4.8",
|
|
31
31
|
"requests>=2.28.2",
|
|
32
32
|
"docker>=6.1.0",
|
|
33
33
|
"urllib3<2.4.0",
|
|
@@ -384,7 +384,8 @@ class DockerLauncher(Launcher):
|
|
|
384
384
|
|
|
385
385
|
def launch_webui(self, container_env_str):
|
|
386
386
|
# Run websocketserver
|
|
387
|
-
cmd = "
|
|
387
|
+
cmd = f"/ansys_inc/v{self._ansys_version}/FluidsOne/server/linx64/fluidsone"
|
|
388
|
+
cmd += " --main-run-mode post"
|
|
388
389
|
# websocket port - this needs to come first since we now have
|
|
389
390
|
# --add_header as a optional arg that can take an arbitrary
|
|
390
391
|
# number of optional headers.
|
|
@@ -393,10 +394,7 @@ class DockerLauncher(Launcher):
|
|
|
393
394
|
http_port = self._service_host_port["http"][1]
|
|
394
395
|
ws_port = self._service_host_port["ws"][1]
|
|
395
396
|
cmd += f" --server-listen-port {webui_port}"
|
|
396
|
-
cmd +=
|
|
397
|
-
f" --server-web-roots /ansys_inc/v{self._ansys_version}/CEI/nexus{self._ansys_version}/"
|
|
398
|
-
)
|
|
399
|
-
cmd += f"ansys{self._ansys_version}/ensight/WebUI/web/ui/"
|
|
397
|
+
cmd += f" --server-web-roots /ansys_inc/v{self._ansys_version}/FluidsOne/web/ui"
|
|
400
398
|
cmd += f" --ensight-grpc-port {grpc_port}"
|
|
401
399
|
cmd += f" --ensight-html-port {http_port}"
|
|
402
400
|
cmd += f" --ensight-ws-port {ws_port}"
|
|
@@ -102,23 +102,26 @@ class LocalLauncher(Launcher):
|
|
|
102
102
|
"""Type of app to launch. Options are ``ensight`` and ``envision``."""
|
|
103
103
|
return self._application
|
|
104
104
|
|
|
105
|
-
def launch_webui(self,
|
|
106
|
-
|
|
105
|
+
def launch_webui(self, version, popen_common):
|
|
106
|
+
if os.environ.get("PYENSIGHT_FLUIDSONE_PATH"):
|
|
107
|
+
fluids_one_path = os.environ["PYENSIGHT_FLUIDSONE_PATH"]
|
|
108
|
+
else:
|
|
109
|
+
awp_path = os.path.dirname(self._install_path)
|
|
110
|
+
platf = "winx64" if self._is_windows() else "linx64"
|
|
111
|
+
fluids_one_path = os.path.join(awp_path, "FluidsOne", "server", platf, "fluids_one")
|
|
112
|
+
if self._is_windows():
|
|
113
|
+
fluids_one_path += ".exe"
|
|
114
|
+
cmd = [fluids_one_path, "--main-run-mode", "post"]
|
|
107
115
|
path_to_webui = self._install_path
|
|
108
116
|
# Dev environment
|
|
109
117
|
path_to_webui_internal = os.path.join(
|
|
110
118
|
path_to_webui, f"nexus{version}", f"ansys{version}", "ensight", "WebUI", "web", "ui"
|
|
111
119
|
)
|
|
112
120
|
# Ansys environment
|
|
113
|
-
|
|
114
|
-
os.path.join(os.path.dirname(path_to_webui), "simcfd", "web", "ui"),
|
|
115
|
-
os.path.join(os.path.dirname(path_to_webui), "fluidsone", "web", "ui"),
|
|
116
|
-
]
|
|
121
|
+
path_to_webui_ansys = os.path.join(os.path.dirname(path_to_webui), "FluidsOne", "web", "ui")
|
|
117
122
|
path_to_webui = path_to_webui_internal
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
path_to_webui = path
|
|
121
|
-
break
|
|
123
|
+
if os.path.exists(path_to_webui_ansys):
|
|
124
|
+
path_to_webui = path_to_webui_ansys
|
|
122
125
|
cmd += ["--server-listen-port", str(self._ports[5])]
|
|
123
126
|
cmd += ["--server-web-roots", path_to_webui]
|
|
124
127
|
cmd += ["--ensight-grpc-port", str(self._ports[0])]
|
|
@@ -270,7 +273,6 @@ class LocalLauncher(Launcher):
|
|
|
270
273
|
cmd = [os.path.join(self._install_path, "bin", "cpython"), websocket_script]
|
|
271
274
|
if is_windows:
|
|
272
275
|
cmd[0] += ".bat"
|
|
273
|
-
ensight_python = cmd[0]
|
|
274
276
|
cmd.extend(["--http_directory", self.session_directory])
|
|
275
277
|
# http port
|
|
276
278
|
cmd.extend(["--http_port", str(self._ports[2])])
|
|
@@ -317,7 +319,7 @@ class LocalLauncher(Launcher):
|
|
|
317
319
|
self._sessions.append(session)
|
|
318
320
|
|
|
319
321
|
if self._launch_webui:
|
|
320
|
-
self.launch_webui(
|
|
322
|
+
self.launch_webui(version, popen_common)
|
|
321
323
|
return session
|
|
322
324
|
|
|
323
325
|
def stop(self) -> None:
|
{ansys_pyensight_core-0.10.3 → ansys_pyensight_core-0.10.5}/src/ansys/pyensight/core/utils/export.py
RENAMED
|
@@ -175,7 +175,7 @@ class Export:
|
|
|
175
175
|
"""
|
|
176
176
|
if array is None:
|
|
177
177
|
return None
|
|
178
|
-
return dict(shape=array.shape, dtype=array.dtype.str, data=array.
|
|
178
|
+
return dict(shape=array.shape, dtype=array.dtype.str, data=array.tobytes())
|
|
179
179
|
|
|
180
180
|
@staticmethod
|
|
181
181
|
def _numpy_from_dict(obj: Optional[dict]) -> Any:
|
|
@@ -18,6 +18,14 @@ if TYPE_CHECKING:
|
|
|
18
18
|
from ansys.api.pyensight import ensight_api
|
|
19
19
|
|
|
20
20
|
|
|
21
|
+
def _handle_fluids_one(install_path):
|
|
22
|
+
cei_path = install_path
|
|
23
|
+
interpreter = os.path.join(cei_path, "bin", "cpython")
|
|
24
|
+
if platform.system() == "Windows":
|
|
25
|
+
interpreter += ".bat"
|
|
26
|
+
return interpreter
|
|
27
|
+
|
|
28
|
+
|
|
21
29
|
class OmniverseKitInstance:
|
|
22
30
|
"""Interface to an Omniverse application instance
|
|
23
31
|
|
|
@@ -212,8 +220,17 @@ def launch_kit_instance(
|
|
|
212
220
|
return OmniverseKitInstance(p.pid)
|
|
213
221
|
|
|
214
222
|
|
|
215
|
-
def find_app() -> Optional[str]:
|
|
223
|
+
def find_app(ansys_installation: Optional[str] = None) -> Optional[str]:
|
|
216
224
|
dirs_to_check = []
|
|
225
|
+
if ansys_installation:
|
|
226
|
+
# Given a different Ansys install
|
|
227
|
+
local_tp = os.path.join(os.path.join(ansys_installation, "tp", "omni_viewer"))
|
|
228
|
+
if os.path.exists(local_tp):
|
|
229
|
+
dirs_to_check.append(local_tp)
|
|
230
|
+
# Dev Folder
|
|
231
|
+
local_dev_omni = os.path.join(ansys_installation, "omni_build")
|
|
232
|
+
if os.path.exists(local_dev_omni):
|
|
233
|
+
dirs_to_check.append(local_dev_omni)
|
|
217
234
|
if "PYENSIGHT_ANSYS_INSTALLATION" in os.environ:
|
|
218
235
|
env_inst = os.environ["PYENSIGHT_ANSYS_INSTALLATION"]
|
|
219
236
|
dirs_to_check.append(os.path.join(env_inst, "tp", "omni_viewer"))
|
|
@@ -243,6 +260,8 @@ def launch_app(
|
|
|
243
260
|
log_file: Optional[str] = None,
|
|
244
261
|
log_level: Optional[str] = "warn",
|
|
245
262
|
cli_options: Optional[List[str]] = None,
|
|
263
|
+
ansys_installation: Optional[str] = None,
|
|
264
|
+
interpreter: Optional[str] = None,
|
|
246
265
|
) -> "OmniverseKitInstance":
|
|
247
266
|
"""Launch the Ansys Omniverse application
|
|
248
267
|
|
|
@@ -278,7 +297,9 @@ def launch_app(
|
|
|
278
297
|
|
|
279
298
|
"""
|
|
280
299
|
cmd = [sys.executable]
|
|
281
|
-
|
|
300
|
+
if interpreter:
|
|
301
|
+
cmd = [interpreter]
|
|
302
|
+
app = find_app(ansys_installation=ansys_installation)
|
|
282
303
|
if not app:
|
|
283
304
|
raise RuntimeError("Unable to find the Ansys Omniverse app")
|
|
284
305
|
cmd.extend([app])
|
|
@@ -379,6 +400,8 @@ class Omniverse:
|
|
|
379
400
|
pass
|
|
380
401
|
# Using the python interpreter running this code
|
|
381
402
|
self._interpreter = sys.executable
|
|
403
|
+
if "fluids_one" in self._interpreter: # compiled simba-app
|
|
404
|
+
self._interpreter = _handle_fluids_one(self._ensight._session._install_path)
|
|
382
405
|
if is_omni:
|
|
383
406
|
kit_path = os.path.dirname(sys.executable)
|
|
384
407
|
self._interpreter = os.path.join(kit_path, "python")
|
|
File without changes
|
|
File without changes
|
{ansys_pyensight_core-0.10.3 → ansys_pyensight_core-0.10.5}/src/ansys/pyensight/core/__init__.py
RENAMED
|
File without changes
|
{ansys_pyensight_core-0.10.3 → ansys_pyensight_core-0.10.5}/src/ansys/pyensight/core/common.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ansys_pyensight_core-0.10.3 → ansys_pyensight_core-0.10.5}/src/ansys/pyensight/core/enscontext.py
RENAMED
|
File without changes
|
{ansys_pyensight_core-0.10.3 → ansys_pyensight_core-0.10.5}/src/ansys/pyensight/core/enshell_grpc.py
RENAMED
|
File without changes
|
{ansys_pyensight_core-0.10.3 → ansys_pyensight_core-0.10.5}/src/ansys/pyensight/core/ensight_grpc.py
RENAMED
|
File without changes
|
{ansys_pyensight_core-0.10.3 → ansys_pyensight_core-0.10.5}/src/ansys/pyensight/core/ensobj.py
RENAMED
|
File without changes
|
|
File without changes
|
{ansys_pyensight_core-0.10.3 → ansys_pyensight_core-0.10.5}/src/ansys/pyensight/core/launcher.py
RENAMED
|
File without changes
|
{ansys_pyensight_core-0.10.3 → ansys_pyensight_core-0.10.5}/src/ansys/pyensight/core/libuserd.py
RENAMED
|
File without changes
|
{ansys_pyensight_core-0.10.3 → ansys_pyensight_core-0.10.5}/src/ansys/pyensight/core/listobj.py
RENAMED
|
File without changes
|
{ansys_pyensight_core-0.10.3 → ansys_pyensight_core-0.10.5}/src/ansys/pyensight/core/py.typed
RENAMED
|
File without changes
|
{ansys_pyensight_core-0.10.3 → ansys_pyensight_core-0.10.5}/src/ansys/pyensight/core/renderable.py
RENAMED
|
File without changes
|
{ansys_pyensight_core-0.10.3 → ansys_pyensight_core-0.10.5}/src/ansys/pyensight/core/session.py
RENAMED
|
File without changes
|
{ansys_pyensight_core-0.10.3 → ansys_pyensight_core-0.10.5}/src/ansys/pyensight/core/sgeo_poll.html
RENAMED
|
File without changes
|
|
File without changes
|
{ansys_pyensight_core-0.10.3 → ansys_pyensight_core-0.10.5}/src/ansys/pyensight/core/utils/adr.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ansys_pyensight_core-0.10.3 → ansys_pyensight_core-0.10.5}/src/ansys/pyensight/core/utils/parts.py
RENAMED
|
File without changes
|
{ansys_pyensight_core-0.10.3 → ansys_pyensight_core-0.10.5}/src/ansys/pyensight/core/utils/query.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ansys_pyensight_core-0.10.3 → ansys_pyensight_core-0.10.5}/src/ansys/pyensight/core/utils/views.py
RENAMED
|
File without changes
|