ansys-fluent-core 0.29.dev2__py3-none-any.whl → 0.29.dev3__py3-none-any.whl
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-fluent-core might be problematic. Click here for more details.
- ansys/fluent/core/__init__.py +1 -1
- ansys/fluent/core/_version.py +1 -1
- ansys/fluent/core/generated/api_tree/api_objects.json +1 -1
- ansys/fluent/core/launcher/error_handler.py +8 -0
- ansys/fluent/core/launcher/server_info.py +23 -3
- {ansys_fluent_core-0.29.dev2.dist-info → ansys_fluent_core-0.29.dev3.dist-info}/METADATA +2 -2
- {ansys_fluent_core-0.29.dev2.dist-info → ansys_fluent_core-0.29.dev3.dist-info}/RECORD +9 -9
- {ansys_fluent_core-0.29.dev2.dist-info → ansys_fluent_core-0.29.dev3.dist-info}/LICENSE +0 -0
- {ansys_fluent_core-0.29.dev2.dist-info → ansys_fluent_core-0.29.dev3.dist-info}/WHEEL +0 -0
|
@@ -29,6 +29,14 @@ class IpPortNotProvided(ValueError):
|
|
|
29
29
|
super().__init__("Provide either 'ip' and 'port' or 'server_info_file_name'.")
|
|
30
30
|
|
|
31
31
|
|
|
32
|
+
class InvalidIpPort(ValueError):
|
|
33
|
+
"""Raised when IP address and port are invalid."""
|
|
34
|
+
|
|
35
|
+
def __init__(self):
|
|
36
|
+
"""Initialize InvalidIpPort."""
|
|
37
|
+
super().__init__("Provide a valid 'ip' and 'port'.")
|
|
38
|
+
|
|
39
|
+
|
|
32
40
|
class UnexpectedKeywordArgument(TypeError):
|
|
33
41
|
"""Raised when a valid keyword argument is not specified."""
|
|
34
42
|
|
|
@@ -6,7 +6,7 @@ import tempfile
|
|
|
6
6
|
|
|
7
7
|
from ansys.fluent.core.fluent_connection import PortNotProvided
|
|
8
8
|
from ansys.fluent.core.launcher import launcher_utils
|
|
9
|
-
from ansys.fluent.core.launcher.error_handler import IpPortNotProvided
|
|
9
|
+
from ansys.fluent.core.launcher.error_handler import InvalidIpPort, IpPortNotProvided
|
|
10
10
|
from ansys.fluent.core.session import _parse_server_info_file
|
|
11
11
|
|
|
12
12
|
|
|
@@ -45,6 +45,27 @@ def _get_server_info_file_names(use_tmpdir=True) -> tuple[str, str]:
|
|
|
45
45
|
return file_name, file_name
|
|
46
46
|
|
|
47
47
|
|
|
48
|
+
def _check_ip_port(ip: str, port: int):
|
|
49
|
+
"""Check if a port is open on a given IP address."""
|
|
50
|
+
|
|
51
|
+
if not (ip and port):
|
|
52
|
+
raise IpPortNotProvided()
|
|
53
|
+
|
|
54
|
+
if not port:
|
|
55
|
+
raise PortNotProvided()
|
|
56
|
+
|
|
57
|
+
import socket
|
|
58
|
+
|
|
59
|
+
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
|
60
|
+
sock.settimeout(2)
|
|
61
|
+
try:
|
|
62
|
+
result = sock.connect_ex((ip, port))
|
|
63
|
+
if result != 0:
|
|
64
|
+
raise InvalidIpPort()
|
|
65
|
+
finally:
|
|
66
|
+
sock.close()
|
|
67
|
+
|
|
68
|
+
|
|
48
69
|
def _get_server_info(
|
|
49
70
|
server_info_file_name: str,
|
|
50
71
|
ip: str | None = None,
|
|
@@ -65,7 +86,6 @@ def _get_server_info(
|
|
|
65
86
|
ip = ip or os.getenv("PYFLUENT_FLUENT_IP", "127.0.0.1")
|
|
66
87
|
port = port or os.getenv("PYFLUENT_FLUENT_PORT")
|
|
67
88
|
|
|
68
|
-
|
|
69
|
-
raise PortNotProvided()
|
|
89
|
+
_check_ip_port(ip=ip, port=port)
|
|
70
90
|
|
|
71
91
|
return ip, port, password
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: ansys-fluent-core
|
|
3
|
-
Version: 0.29.
|
|
3
|
+
Version: 0.29.dev3
|
|
4
4
|
Summary: PyFluent provides Pythonic access to Ansys Fluent.
|
|
5
5
|
Author-email: "ANSYS, Inc." <pyansys.core@ansys.com>
|
|
6
6
|
Maintainer-email: "ANSYS, Inc." <pyansys.core@ansys.com>
|
|
@@ -11,7 +11,7 @@ Classifier: Programming Language :: Python :: 3
|
|
|
11
11
|
Classifier: License :: OSI Approved :: MIT License
|
|
12
12
|
Classifier: Operating System :: OS Independent
|
|
13
13
|
Requires-Dist: ansys-api-fluent>=0.3.33
|
|
14
|
-
Requires-Dist: ansys-platform-instancemanagement~=1.
|
|
14
|
+
Requires-Dist: ansys-platform-instancemanagement~=1.1
|
|
15
15
|
Requires-Dist: ansys-tools-filetransfer>=0.1,<0.3
|
|
16
16
|
Requires-Dist: ansys-units>=0.3.3,<0.5
|
|
17
17
|
Requires-Dist: docker>=7.1.0
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
ansys/fluent/core/__init__.py,sha256=
|
|
2
|
-
ansys/fluent/core/_version.py,sha256=
|
|
1
|
+
ansys/fluent/core/__init__.py,sha256=JsPMihBpWFLlYeUuMAdjoX-cu_7TmRftN5FdHiWsAUY,4499
|
|
2
|
+
ansys/fluent/core/_version.py,sha256=HjmYJ5mzCOJ2N5eFTlapHbFcQU3BADmOUGCa4JWmNYA,396
|
|
3
3
|
ansys/fluent/core/data_model_cache.py,sha256=L6AiDnm7IMrWhcKWY4uGwqJX1Abw09Y0aPBip4IcRZg,15809
|
|
4
4
|
ansys/fluent/core/exceptions.py,sha256=YAnt3wBfoaO4LMVZYMJijy2UmB79TwxgJ-7L5og7tFU,736
|
|
5
5
|
ansys/fluent/core/file_session.py,sha256=MRZN6dSZ8jbbnjngxHthDClD4oSoZ3Wfswctw0Tib2s,26696
|
|
@@ -56,7 +56,7 @@ ansys/fluent/core/generated/fluent_version_241.py,sha256=R60bDiS2y_VYuI49NMPWTYg
|
|
|
56
56
|
ansys/fluent/core/generated/fluent_version_242.py,sha256=098i_ge1V5f_MZxu9hIjNAF_nYL5RTEzsGNkrgVIn0A,167
|
|
57
57
|
ansys/fluent/core/generated/fluent_version_251.py,sha256=HB2VZqVDg8DbP2kDE1v2rCxCgUrXwnWdiLGaTOdNnF0,167
|
|
58
58
|
ansys/fluent/core/generated/fluent_version_252.py,sha256=d9zQD4c6zyzWTKIh9bjNO4k5PFFVxg59pMrUTInEcWw,150
|
|
59
|
-
ansys/fluent/core/generated/api_tree/api_objects.json,sha256=
|
|
59
|
+
ansys/fluent/core/generated/api_tree/api_objects.json,sha256=RwCZ23qPhebHTFrQJoDAlqLB2GrIbmRI64nCKC5BwP0,13551466
|
|
60
60
|
ansys/fluent/core/generated/datamodel_222/PMFileManagement.py,sha256=LhCYSB_swkVZ8iPqGus-miHD65LqZB_x3C6y0B_Bl34,7270
|
|
61
61
|
ansys/fluent/core/generated/datamodel_222/PartManagement.py,sha256=Lvq9BtPFQK_26m0K-pHIeN2QaMr_8xu2pGGW-07avPA,40605
|
|
62
62
|
ansys/fluent/core/generated/datamodel_222/meshing.py,sha256=w815twyOdeNBQjuyWGCWektjM4oDaWq2MBoSiZXiYoI,49964
|
|
@@ -139,7 +139,7 @@ ansys/fluent/core/generated/solver/tui_251.py,sha256=vZsxD1mMqdFZDGLF6epEOJgNPO7
|
|
|
139
139
|
ansys/fluent/core/generated/solver/tui_252.py,sha256=WWPSQcJV1R057-fLwgQ-TllVkM-KljorP2Zs_PRQ7OA,2154775
|
|
140
140
|
ansys/fluent/core/launcher/__init__.py,sha256=HpsP63Pawrbpoe941J6G5c1TPs__uvBAOtLjen7-1m4,456
|
|
141
141
|
ansys/fluent/core/launcher/container_launcher.py,sha256=igdqIsQh3a1qOPcY17dYOOeFUUA1BU5Jv40Eoj0CKnw,9818
|
|
142
|
-
ansys/fluent/core/launcher/error_handler.py,sha256=
|
|
142
|
+
ansys/fluent/core/launcher/error_handler.py,sha256=Iz-altoqSSWKCYipc6Nywce9bn98GvJLH18oHHu0_aU,2823
|
|
143
143
|
ansys/fluent/core/launcher/fluent_container.py,sha256=VNNgMayEGohmq9m7m-hEEooPCI9qQJiBbSDmC1dTphE,17068
|
|
144
144
|
ansys/fluent/core/launcher/fluent_launcher_options.json,sha256=QFuWt_s8wRKVqHd3s_GAVn-m6nRBF7i5cNOWICX0g1Y,805
|
|
145
145
|
ansys/fluent/core/launcher/launcher.py,sha256=krPgtAev25ASUk7k6TkLS4oqfp4Io9qj_qO-D-CpOXQ,17633
|
|
@@ -147,7 +147,7 @@ ansys/fluent/core/launcher/launcher_utils.py,sha256=qhMY1HFpkbff_W1ZUELoTF1s8f-R
|
|
|
147
147
|
ansys/fluent/core/launcher/pim_launcher.py,sha256=-HkwminXdNXwE5zw8sgYcDEFBs3N4TnSHXmXq9yfgW4,11517
|
|
148
148
|
ansys/fluent/core/launcher/process_launch_string.py,sha256=jo4pHhubIGnTp-GCQV_EpZytyrfAj14VNygjD2QrPcc,6213
|
|
149
149
|
ansys/fluent/core/launcher/pyfluent_enums.py,sha256=fLAlxXuoZeQLs8_ASqxNwdzc3LSc3RyJNEXk07sJgso,9529
|
|
150
|
-
ansys/fluent/core/launcher/server_info.py,sha256=
|
|
150
|
+
ansys/fluent/core/launcher/server_info.py,sha256=GsUXE84XsjnEF0HwpXmL6T9rH1pOu84MEmvzgvHYau0,3668
|
|
151
151
|
ansys/fluent/core/launcher/slurm_launcher.py,sha256=2TJkHaKjHq6MiQp0zuGu380aaMWhwIEnEXWHCMw8T_w,19244
|
|
152
152
|
ansys/fluent/core/launcher/standalone_launcher.py,sha256=R_vz_K6kTsE6u4PZ-dwr4dXYB1UGOaLIA9jZw5n19eE,14774
|
|
153
153
|
ansys/fluent/core/launcher/watchdog.py,sha256=Bg2o2LTEeIVTnt9-QjIT3X30Odszs1G4dhD7GLugpSY,5927
|
|
@@ -212,7 +212,7 @@ ansys/fluent/core/utils/fldoc.py,sha256=sBqtRiSQWEgC3jwOrbnrcTzS0RgS6gKpdJj490VK
|
|
|
212
212
|
ansys/fluent/core/utils/fluent_version.py,sha256=7kng7F4nGeEV5zJz7gsMxOAClRmDWpg62CM7-w9lvIE,4180
|
|
213
213
|
ansys/fluent/core/utils/networking.py,sha256=pU91zEGk6BDSHgSGJjMLubXVkAS_VVR_XhkKnB45uf0,3274
|
|
214
214
|
ansys/fluent/core/utils/setup_for_fluent.py,sha256=5PYQt_17OiHZHEGtxVrwjyXAE3FYwZPn2uTpJ8GaoK4,877
|
|
215
|
-
ansys_fluent_core-0.29.
|
|
216
|
-
ansys_fluent_core-0.29.
|
|
217
|
-
ansys_fluent_core-0.29.
|
|
218
|
-
ansys_fluent_core-0.29.
|
|
215
|
+
ansys_fluent_core-0.29.dev3.dist-info/LICENSE,sha256=gsgB71ilREszSYJUBTt851_vFWU4sLsyBhyL4lYtzyI,1089
|
|
216
|
+
ansys_fluent_core-0.29.dev3.dist-info/WHEEL,sha256=CpUCUxeHQbRN5UGRQHYRJorO5Af-Qy_fHMctcQ8DSGI,82
|
|
217
|
+
ansys_fluent_core-0.29.dev3.dist-info/METADATA,sha256=1hpPns0CMCg7Y7o7PCvGKwyXm9U9iEkUB3fULcEAlzs,9331
|
|
218
|
+
ansys_fluent_core-0.29.dev3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|