Skip to content

Commit d4ec721

Browse files
Merge branch 'main' into feat/procedural_curve_impl
2 parents 074db14 + 08aa3df commit d4ec721

File tree

4 files changed

+37
-22
lines changed

4 files changed

+37
-22
lines changed

doc/changelog.d/2226.added.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
For 261 dotnet 8 is included in core service
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Bump panel from 1.7.5 to 1.8.0

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ doc = [
105105
"notebook==7.4.5",
106106
"numpydoc==1.9.0",
107107
"numpy==2.2.6",
108-
"panel==1.7.5",
108+
"panel==1.8.0",
109109
"pdf2image==1.17.0",
110110
"Pint==0.24.4",
111111
"protobuf==5.29.3",

src/ansys/geometry/core/connection/product_instance.py

Lines changed: 34 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -465,29 +465,42 @@ def prepare_and_start_backend(
465465
# Verify dotnet is installed
466466
import shutil
467467

468-
if not shutil.which("dotnet"):
469-
raise RuntimeError(
470-
"Cannot find 'dotnet' command. "
471-
"Please install 'dotnet' to use the Ansys Geometry Core Service. "
472-
"At least dotnet 8.0 is required."
468+
if not any(
469+
CORE_GEOMETRY_SERVICE_EXE.replace(".exe", "") in file.name
470+
for file in Path(root_service_folder).iterdir()
471+
):
472+
if not shutil.which("dotnet"):
473+
raise RuntimeError(
474+
"Cannot find 'dotnet' command. "
475+
"Please install 'dotnet' to use the Ansys Geometry Core Service. "
476+
"At least dotnet 8.0 is required."
477+
)
478+
# At least dotnet 8.0 is required
479+
# private method and controlled input by library - excluding bandit check.
480+
if (
481+
subprocess.check_output(["dotnet", "--version"]).decode("utf-8").split(".")[0] # nosec B607, B603
482+
< "8"
483+
):
484+
raise RuntimeError(
485+
"Ansys Geometry Core Service requires at least dotnet 8.0. "
486+
"Please install a compatible version."
487+
)
488+
# For Linux, we need to use the dotnet command to launch the Core Geometry Service
489+
args.append("dotnet")
490+
args.append(
491+
Path(
492+
root_service_folder,
493+
CORE_GEOMETRY_SERVICE_EXE.replace(".exe", ".dll"),
494+
)
473495
)
474-
475-
# At least dotnet 8.0 is required
476-
# private method and controlled input by library - excluding bandit check.
477-
if subprocess.check_output(["dotnet", "--version"]).decode("utf-8").split(".")[0] < "8": # nosec B607, B603
478-
raise RuntimeError(
479-
"Ansys Geometry Core Service requires at least dotnet 8.0. "
480-
"Please install a compatible version."
481-
)
482-
483-
# For Linux, we need to use the dotnet command to launch the Core Geometry Service
484-
args.append("dotnet")
485-
args.append(
486-
Path(
487-
root_service_folder,
488-
CORE_GEOMETRY_SERVICE_EXE.replace(".exe", ".dll"),
496+
else:
497+
# For Linux, we need to use the exe file to launch the Core Geometry Service
498+
args.append(
499+
Path(
500+
root_service_folder,
501+
CORE_GEOMETRY_SERVICE_EXE.replace(".exe", ""),
502+
)
489503
)
490-
)
491504
else:
492505
raise RuntimeError(
493506
f"Cannot connect to backend {backend_type.name} using ``prepare_and_start_backend()``"

0 commit comments

Comments
 (0)