Skip to content

Commit ce1bb5e

Browse files
authored
use ansys-api-mapdl-v0 (ansys#681)
1 parent de78bb7 commit ce1bb5e

File tree

7 files changed

+11
-12
lines changed

7 files changed

+11
-12
lines changed

ansys/mapdl/core/mapdl_grpc.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
import numpy as np
1818
from tqdm import tqdm
1919
from grpc._channel import _InactiveRpcError, _MultiThreadedRendezvous
20-
from ansys.grpc.mapdl import mapdl_pb2 as pb_types
21-
from ansys.grpc.mapdl import mapdl_pb2_grpc as mapdl_grpc
22-
from ansys.grpc.mapdl import ansys_kernel_pb2 as anskernel
20+
from ansys.api.mapdl.v0 import mapdl_pb2 as pb_types
21+
from ansys.api.mapdl.v0 import mapdl_pb2_grpc as mapdl_grpc
22+
from ansys.api.mapdl.v0 import ansys_kernel_pb2 as anskernel
2323

2424
from ansys.mapdl.core.mapdl import _MapdlCore
2525
from ansys.mapdl.core.errors import MapdlExitedError, protect_grpc, MapdlRuntimeError

ansys/mapdl/core/math.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
from enum import Enum
88

99
import numpy as np
10-
from ansys.grpc.mapdl import ansys_kernel_pb2 as anskernel
11-
from ansys.grpc.mapdl import mapdl_pb2 as pb_types
10+
from ansys.api.mapdl.v0 import ansys_kernel_pb2 as anskernel
11+
from ansys.api.mapdl.v0 import mapdl_pb2 as pb_types
1212

1313
from .errors import ANSYSDataTypeError, protect_grpc
1414
from .mapdl_grpc import MapdlGrpc

ansys/mapdl/core/mesh_grpc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import os
55
import numpy as np
66

7-
from ansys.grpc.mapdl import ansys_kernel_pb2 as anskernel
7+
from ansys.api.mapdl.v0 import ansys_kernel_pb2 as anskernel
88
from ansys.mapdl.reader.mesh import Mesh
99

1010
from ansys.mapdl.core.misc import threaded, supress_logging

ansys/mapdl/core/misc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def __init__(self, additional=None, ncol=3, text_width=80, sort=False, gpu=True)
7070
"pyiges",
7171
"scipy",
7272
"grpc", # grpcio
73-
"ansys.grpc.mapdl", # ansys-grpc-mapdl
73+
"ansys.api.mapdl.v0", # ansys-api-mapdl-v0
7474
"ansys.mapdl.reader", # ansys-mapdl-reader
7575
"google.protobuf", # protobuf library
7676
]

ansys/mapdl/core/xpl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import json
44

55
import numpy as np
6-
from ansys.grpc.mapdl import ansys_kernel_pb2 as anskernel
6+
from ansys.api.mapdl.v0 import ansys_kernel_pb2 as anskernel
77

88
from ansys.mapdl.core.errors import MapdlRuntimeError
99

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"pyiges>=0.1.4",
2525
"scipy>=1.3.0", # for sparse (consider optional?)
2626
"grpcio>=1.30.0", # tested up to grpcio==1.35
27-
"ansys-grpc-mapdl==0.4.0", # supports at least 2020R2 - 2021R2
27+
"ansys-api-mapdl-v0==0.4.1", # supports at least 2020R2 - 2021R2
2828
"ansys-mapdl-reader>=0.50.15",
2929
"protobuf>=3.12.2", # minimum required based on latest ansys-grpc-mapdl
3030
]

tests/test_launcher.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,6 @@ def test_license_type_keyword():
138138
checks.append(license_description in mapdl.__str__().split('\n')[0])
139139
mapdl.exit()
140140

141-
breakpoint()
142141
assert any(checks)
143142

144143
dummy_license_name = 'dummy'
@@ -155,8 +154,8 @@ def test_license_type_keyword_names():
155154
# This test might became a way to check available licenses, which is not the purpose.
156155

157156
successful_check = False
158-
for license_description, each_keyword in zip(LICENSES.values(), keywords):
159-
mapdl = launch_mapdl(license_type=each_keyword)
157+
for license_name, license_description in LICENSES.items():
158+
mapdl = launch_mapdl(license_type=license_name)
160159

161160
#Using first line to ensure not picking up other stuff.
162161
successful_check = license_description in mapdl.__str__().split('\n')[0] or successful_check

0 commit comments

Comments
 (0)