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

Feat: Update get_mechanical_path #707

Merged
merged 7 commits into from
Apr 16, 2024
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
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
Loading