Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use ansys-api-mapdl-v0 #681

Merged
merged 2 commits into from
Oct 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions ansys/mapdl/core/mapdl_grpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
import numpy as np
from tqdm import tqdm
from grpc._channel import _InactiveRpcError, _MultiThreadedRendezvous
from ansys.grpc.mapdl import mapdl_pb2 as pb_types
from ansys.grpc.mapdl import mapdl_pb2_grpc as mapdl_grpc
from ansys.grpc.mapdl import ansys_kernel_pb2 as anskernel
from ansys.api.mapdl.v0 import mapdl_pb2 as pb_types
from ansys.api.mapdl.v0 import mapdl_pb2_grpc as mapdl_grpc
from ansys.api.mapdl.v0 import ansys_kernel_pb2 as anskernel

from ansys.mapdl.core.mapdl import _MapdlCore
from ansys.mapdl.core.errors import MapdlExitedError, protect_grpc, MapdlRuntimeError
Expand Down
4 changes: 2 additions & 2 deletions ansys/mapdl/core/math.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
from enum import Enum

import numpy as np
from ansys.grpc.mapdl import ansys_kernel_pb2 as anskernel
from ansys.grpc.mapdl import mapdl_pb2 as pb_types
from ansys.api.mapdl.v0 import ansys_kernel_pb2 as anskernel
from ansys.api.mapdl.v0 import mapdl_pb2 as pb_types

from .errors import ANSYSDataTypeError, protect_grpc
from .mapdl_grpc import MapdlGrpc
Expand Down
2 changes: 1 addition & 1 deletion ansys/mapdl/core/mesh_grpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import os
import numpy as np

from ansys.grpc.mapdl import ansys_kernel_pb2 as anskernel
from ansys.api.mapdl.v0 import ansys_kernel_pb2 as anskernel
from ansys.mapdl.reader.mesh import Mesh

from ansys.mapdl.core.misc import threaded, supress_logging
Expand Down
2 changes: 1 addition & 1 deletion ansys/mapdl/core/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def __init__(self, additional=None, ncol=3, text_width=80, sort=False, gpu=True)
"pyiges",
"scipy",
"grpc", # grpcio
"ansys.grpc.mapdl", # ansys-grpc-mapdl
"ansys.api.mapdl.v0", # ansys-api-mapdl-v0
"ansys.mapdl.reader", # ansys-mapdl-reader
"google.protobuf", # protobuf library
]
Expand Down
2 changes: 1 addition & 1 deletion ansys/mapdl/core/xpl.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import json

import numpy as np
from ansys.grpc.mapdl import ansys_kernel_pb2 as anskernel
from ansys.api.mapdl.v0 import ansys_kernel_pb2 as anskernel

from ansys.mapdl.core.errors import MapdlRuntimeError

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"pyiges>=0.1.4",
"scipy>=1.3.0", # for sparse (consider optional?)
"grpcio>=1.30.0", # tested up to grpcio==1.35
"ansys-grpc-mapdl==0.4.0", # supports at least 2020R2 - 2021R2
"ansys-api-mapdl-v0==0.4.1", # supports at least 2020R2 - 2021R2
"ansys-mapdl-reader>=0.50.15",
"protobuf>=3.12.2", # minimum required based on latest ansys-grpc-mapdl
]
Expand Down
5 changes: 2 additions & 3 deletions tests/test_launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ def test_license_type_keyword():
checks.append(license_description in mapdl.__str__().split('\n')[0])
mapdl.exit()

breakpoint()
assert any(checks)

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

successful_check = False
for license_description, each_keyword in zip(LICENSES.values(), keywords):
mapdl = launch_mapdl(license_type=each_keyword)
for license_name, license_description in LICENSES.items():
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know how did I write this.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's ok, this isn't checked in our online CI/CD and I only discovered this when running tests locally. Another reason to have a windows/linux standalone package of MAPDL.

mapdl = launch_mapdl(license_type=license_name)

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