Skip to content

Commit

Permalink
Feat: Update get_mechanical_path (#707)
Browse files Browse the repository at this point in the history
Co-authored-by: pyansys-ci-bot <pyansys.github.bot@ansys.com>
  • Loading branch information
dipinknair and pyansys-ci-bot committed Apr 16, 2024
1 parent b9b6616 commit 5874a36
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 12 deletions.
4 changes: 2 additions & 2 deletions codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ coverage:
patch:
default:
# basic
target: 80%
target: 90%
if_not_found: success
if_ci_failed: error
if_ci_failed: success
if_no_uploads: error
1 change: 1 addition & 0 deletions doc/changelog.d/707.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Feat: Update `get_mechanical_path`
12 changes: 2 additions & 10 deletions src/ansys/mechanical/core/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,16 +179,8 @@ def cli(
if input_script:
raise Exception("Cannot open in server mode with an input script.")

if not revision:
exe = atp.get_mechanical_path() # check for saved mechanical path
if exe:
version = atp.version_from_path("mechanical", exe) # version is already int here
else:
exe, _version = atp.find_mechanical()
version = int(_version * 10)
else:
exe, _version = atp.find_mechanical(version=revision)
version = int(_version * 10)
exe = atp.get_mechanical_path(allow_input=False, version=revision)
version = atp.version_from_path("mechanical", exe)

version_name = atp.SUPPORTED_ANSYS_VERSIONS[version]

Expand Down

0 comments on commit 5874a36

Please sign in to comment.