ansys-pyensight-core 0.9.1__tar.gz → 0.9.3__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.
- {ansys_pyensight_core-0.9.1 → ansys_pyensight_core-0.9.3}/PKG-INFO +3 -2
- {ansys_pyensight_core-0.9.1 → ansys_pyensight_core-0.9.3}/pyproject.toml +3 -2
- {ansys_pyensight_core-0.9.1 → ansys_pyensight_core-0.9.3}/src/ansys/pyensight/core/__init__.py +1 -1
- {ansys_pyensight_core-0.9.1 → ansys_pyensight_core-0.9.3}/src/ansys/pyensight/core/common.py +17 -0
- {ansys_pyensight_core-0.9.1 → ansys_pyensight_core-0.9.3}/src/ansys/pyensight/core/dockerlauncher.py +4 -0
- ansys_pyensight_core-0.9.3/src/ansys/pyensight/core/dvs.py +792 -0
- {ansys_pyensight_core-0.9.1 → ansys_pyensight_core-0.9.3}/src/ansys/pyensight/core/ensight_grpc.py +302 -0
- {ansys_pyensight_core-0.9.1 → ansys_pyensight_core-0.9.3}/src/ansys/pyensight/core/libuserd.py +200 -76
- {ansys_pyensight_core-0.9.1 → ansys_pyensight_core-0.9.3}/src/ansys/pyensight/core/utils/omniverse.py +202 -77
- {ansys_pyensight_core-0.9.1 → ansys_pyensight_core-0.9.3}/src/ansys/pyensight/core/utils/omniverse_cli.py +19 -11
- {ansys_pyensight_core-0.9.1 → ansys_pyensight_core-0.9.3}/src/ansys/pyensight/core/utils/omniverse_dsg_server.py +113 -44
- {ansys_pyensight_core-0.9.1 → ansys_pyensight_core-0.9.3}/src/ansys/pyensight/core/utils/omniverse_glb_server.py +32 -10
- {ansys_pyensight_core-0.9.1 → ansys_pyensight_core-0.9.3}/LICENSE +0 -0
- {ansys_pyensight_core-0.9.1 → ansys_pyensight_core-0.9.3}/README.rst +0 -0
- {ansys_pyensight_core-0.9.1 → ansys_pyensight_core-0.9.3}/src/ansys/pyensight/core/deep_pixel_view.html +0 -0
- {ansys_pyensight_core-0.9.1 → ansys_pyensight_core-0.9.3}/src/ansys/pyensight/core/enscontext.py +0 -0
- {ansys_pyensight_core-0.9.1 → ansys_pyensight_core-0.9.3}/src/ansys/pyensight/core/enshell_grpc.py +0 -0
- {ansys_pyensight_core-0.9.1 → ansys_pyensight_core-0.9.3}/src/ansys/pyensight/core/ensobj.py +0 -0
- {ansys_pyensight_core-0.9.1 → ansys_pyensight_core-0.9.3}/src/ansys/pyensight/core/launch_ensight.py +0 -0
- {ansys_pyensight_core-0.9.1 → ansys_pyensight_core-0.9.3}/src/ansys/pyensight/core/launcher.py +0 -0
- {ansys_pyensight_core-0.9.1 → ansys_pyensight_core-0.9.3}/src/ansys/pyensight/core/listobj.py +0 -0
- {ansys_pyensight_core-0.9.1 → ansys_pyensight_core-0.9.3}/src/ansys/pyensight/core/locallauncher.py +0 -0
- {ansys_pyensight_core-0.9.1 → ansys_pyensight_core-0.9.3}/src/ansys/pyensight/core/py.typed +0 -0
- {ansys_pyensight_core-0.9.1 → ansys_pyensight_core-0.9.3}/src/ansys/pyensight/core/renderable.py +0 -0
- {ansys_pyensight_core-0.9.1 → ansys_pyensight_core-0.9.3}/src/ansys/pyensight/core/session.py +0 -0
- {ansys_pyensight_core-0.9.1 → ansys_pyensight_core-0.9.3}/src/ansys/pyensight/core/sgeo_poll.html +0 -0
- {ansys_pyensight_core-0.9.1 → ansys_pyensight_core-0.9.3}/src/ansys/pyensight/core/utils/__init__.py +0 -0
- {ansys_pyensight_core-0.9.1 → ansys_pyensight_core-0.9.3}/src/ansys/pyensight/core/utils/adr.py +0 -0
- {ansys_pyensight_core-0.9.1 → ansys_pyensight_core-0.9.3}/src/ansys/pyensight/core/utils/dsg_server.py +0 -0
- {ansys_pyensight_core-0.9.1 → ansys_pyensight_core-0.9.3}/src/ansys/pyensight/core/utils/export.py +0 -0
- {ansys_pyensight_core-0.9.1 → ansys_pyensight_core-0.9.3}/src/ansys/pyensight/core/utils/parts.py +0 -0
- {ansys_pyensight_core-0.9.1 → ansys_pyensight_core-0.9.3}/src/ansys/pyensight/core/utils/query.py +0 -0
- {ansys_pyensight_core-0.9.1 → ansys_pyensight_core-0.9.3}/src/ansys/pyensight/core/utils/readers.py +0 -0
- {ansys_pyensight_core-0.9.1 → ansys_pyensight_core-0.9.3}/src/ansys/pyensight/core/utils/resources/Materials/000_sky.exr +0 -0
- {ansys_pyensight_core-0.9.1 → ansys_pyensight_core-0.9.3}/src/ansys/pyensight/core/utils/support.py +0 -0
- {ansys_pyensight_core-0.9.1 → ansys_pyensight_core-0.9.3}/src/ansys/pyensight/core/utils/variables.py +0 -0
- {ansys_pyensight_core-0.9.1 → ansys_pyensight_core-0.9.3}/src/ansys/pyensight/core/utils/views.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: ansys-pyensight-core
|
|
3
|
-
Version: 0.9.
|
|
3
|
+
Version: 0.9.3
|
|
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>
|
|
@@ -16,7 +16,7 @@ Classifier: Programming Language :: Python :: 3.10
|
|
|
16
16
|
Classifier: Programming Language :: Python :: 3.11
|
|
17
17
|
Classifier: Programming Language :: Python :: 3.12
|
|
18
18
|
Requires-Dist: importlib-metadata>=4.0; python_version<='3.8'
|
|
19
|
-
Requires-Dist: ansys-api-pyensight==0.4.
|
|
19
|
+
Requires-Dist: ansys-api-pyensight==0.4.6
|
|
20
20
|
Requires-Dist: requests>=2.28.2
|
|
21
21
|
Requires-Dist: docker>=6.1.0
|
|
22
22
|
Requires-Dist: urllib3<3.0.0
|
|
@@ -26,6 +26,7 @@ Requires-Dist: pypng>=0.0.20
|
|
|
26
26
|
Requires-Dist: psutil>=5.9.2
|
|
27
27
|
Requires-Dist: usd-core>=24.8
|
|
28
28
|
Requires-Dist: pygltflib>=1.16.2
|
|
29
|
+
Requires-Dist: grpcio==1.67.0
|
|
29
30
|
Requires-Dist: build>=0.10.0 ; extra == "dev"
|
|
30
31
|
Requires-Dist: bump2version>=1.0.1 ; extra == "dev"
|
|
31
32
|
Requires-Dist: ipdb>=0.9.4 ; extra == "dev"
|
|
@@ -6,7 +6,7 @@ build-backend = "flit_core.buildapi"
|
|
|
6
6
|
|
|
7
7
|
[project]
|
|
8
8
|
name = "ansys-pyensight-core"
|
|
9
|
-
version = "0.9.
|
|
9
|
+
version = "0.9.3"
|
|
10
10
|
description = "A python wrapper for Ansys EnSight"
|
|
11
11
|
readme = "README.rst"
|
|
12
12
|
requires-python = ">=3.9,<4"
|
|
@@ -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.6",
|
|
31
31
|
"requests>=2.28.2",
|
|
32
32
|
"docker>=6.1.0",
|
|
33
33
|
"urllib3<3.0.0",
|
|
@@ -37,6 +37,7 @@ dependencies = [
|
|
|
37
37
|
"psutil>=5.9.2",
|
|
38
38
|
"usd-core>=24.8",
|
|
39
39
|
"pygltflib>=1.16.2",
|
|
40
|
+
"grpcio==1.67.0"
|
|
40
41
|
]
|
|
41
42
|
|
|
42
43
|
[project.optional-dependencies]
|
{ansys_pyensight_core-0.9.1 → ansys_pyensight_core-0.9.3}/src/ansys/pyensight/core/__init__.py
RENAMED
|
@@ -5,7 +5,7 @@ except ModuleNotFoundError: # pragma: no cover
|
|
|
5
5
|
__version__ = importlib_metadata.version(__name__.replace(".", "-"))
|
|
6
6
|
|
|
7
7
|
VERSION = __version__
|
|
8
|
-
DEFAULT_ANSYS_VERSION = "
|
|
8
|
+
DEFAULT_ANSYS_VERSION = "251"
|
|
9
9
|
|
|
10
10
|
# Ansys version number that this release is associated with
|
|
11
11
|
__ansys_version__ = DEFAULT_ANSYS_VERSION
|
{ansys_pyensight_core-0.9.1 → ansys_pyensight_core-0.9.3}/src/ansys/pyensight/core/common.py
RENAMED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
""" This module provides a list of common utilities shared between different PyEnSight modules."""
|
|
2
2
|
|
|
3
|
+
import os
|
|
3
4
|
import random
|
|
4
5
|
import re
|
|
5
6
|
import socket
|
|
@@ -214,3 +215,19 @@ def pull_image(docker_client: "DockerClient", image_name: str) -> None:
|
|
|
214
215
|
docker_client.images.pull(image_name)
|
|
215
216
|
except Exception:
|
|
216
217
|
raise RuntimeError(f"Can't pull Docker image: {image_name}")
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
def _is_within_directory(directory, target):
|
|
221
|
+
"""Check if target is inside of the input directory."""
|
|
222
|
+
abs_directory = os.path.abspath(directory)
|
|
223
|
+
abs_target = os.path.abspath(target)
|
|
224
|
+
return os.path.commonprefix([abs_directory, abs_target]) == abs_directory
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
def safe_extract(tar, path=".", members=None, *, numeric_owner=False):
|
|
228
|
+
"""Utility to check tar extraction to avoid bandit check issue."""
|
|
229
|
+
for member in tar.getmembers():
|
|
230
|
+
member_path = os.path.join(path, member.name)
|
|
231
|
+
if not _is_within_directory(path, member_path):
|
|
232
|
+
raise Exception("Attempted Path Traversal in Tar File")
|
|
233
|
+
tar.extractall(path, members, numeric_owner=numeric_owner)
|
{ansys_pyensight_core-0.9.1 → ansys_pyensight_core-0.9.3}/src/ansys/pyensight/core/dockerlauncher.py
RENAMED
|
@@ -325,6 +325,7 @@ class DockerLauncher(Launcher):
|
|
|
325
325
|
detach=True,
|
|
326
326
|
auto_remove=True,
|
|
327
327
|
remove=True,
|
|
328
|
+
user="ensight:ensight",
|
|
328
329
|
)
|
|
329
330
|
else:
|
|
330
331
|
logging.debug(f"Running container {self._image_name} with cmd {enshell_cmd}\n")
|
|
@@ -340,6 +341,7 @@ class DockerLauncher(Launcher):
|
|
|
340
341
|
detach=True,
|
|
341
342
|
auto_remove=True,
|
|
342
343
|
remove=True,
|
|
344
|
+
user="ensight:ensight",
|
|
343
345
|
)
|
|
344
346
|
logging.debug(f"_container = {str(self._container)}\n")
|
|
345
347
|
else:
|
|
@@ -357,6 +359,7 @@ class DockerLauncher(Launcher):
|
|
|
357
359
|
detach=True,
|
|
358
360
|
auto_remove=True,
|
|
359
361
|
remove=True,
|
|
362
|
+
user="ensight:ensight",
|
|
360
363
|
)
|
|
361
364
|
else: # pragma: no cover
|
|
362
365
|
logging.debug(
|
|
@@ -373,6 +376,7 @@ class DockerLauncher(Launcher):
|
|
|
373
376
|
detach=True,
|
|
374
377
|
auto_remove=True,
|
|
375
378
|
remove=True,
|
|
379
|
+
user="ensight:ensight",
|
|
376
380
|
)
|
|
377
381
|
# logging.debug(f"_container = {str(self._container)}\n")
|
|
378
382
|
logging.debug("Container started.\n")
|