Skip to content

Commit

Permalink
Revert "update interface fix 3"
Browse files Browse the repository at this point in the history
This reverts commit fd6c79e.
  • Loading branch information
hpohekar committed Dec 17, 2024
1 parent fd6c79e commit 7bb53c4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/ansys/fluent/core/codegen/print_fluent_version.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
"""Module to write Fluent version information."""

from ansys.fluent.core import CODEGEN_OUTDIR, launch_fluent
from ansys.fluent.core import CODEGEN_OUTDIR, FluentVersion, launch_fluent


def print_fluent_version(app_utilities):
"""Write Fluent version information to file."""
version = app_utilities.get_product_version().number
version = FluentVersion(app_utilities.get_product_version()).number
build_info = app_utilities.get_build_info()
version_file = (CODEGEN_OUTDIR / f"fluent_version_{version}.py").resolve()
with open(version_file, "w", encoding="utf8") as f:
Expand Down
10 changes: 2 additions & 8 deletions src/ansys/fluent/core/services/app_utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,7 @@ def __init__(self, scheme_eval):

def get_product_version(self) -> str:
"""Get product version."""
import ansys.fluent.core as pyfluent

return pyfluent.FluentVersion(self.scheme_eval.version)
return self.scheme_eval.version

def get_build_info(self) -> dict:
"""Get build info."""
Expand Down Expand Up @@ -283,13 +281,9 @@ def __init__(self, service: AppUtilitiesService):

def get_product_version(self) -> str:
"""Get product version."""
import ansys.fluent.core as pyfluent

request = AppUtilitiesProtoModule.GetProductVersionRequest()
response = self.service.get_product_version(request)
return pyfluent.FluentVersion(
f"{response.major}.{response.minor}.{response.patch}"
)
return f"{response.major}.{response.minor}.{response.patch}"

def get_build_info(self) -> dict:
"""Get build info."""
Expand Down

0 comments on commit 7bb53c4

Please sign in to comment.