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

FIX: Licensingclient path update for version 252 #5854

Open
wants to merge 19 commits into
base: main
Choose a base branch
from

Conversation

ramin4667
Copy link
Contributor

Description

This PR updates PyAEDT for the changed licensingclient folder in release 25.2.

Issue linked

Error for not finding licensingclient folder.

Checklist

  • I have tested my changes locally.
  • I have added necessary documentation or updated existing documentation.
  • I have followed the coding style guidelines of this project.
  • I have added appropriate tests (unit, integration, system).
  • I have reviewed my changes before submitting this pull request.
  • I have linked the issue or issues that are solved by the PR if any.
  • I have agreed with the Contributor License Agreement (CLA).

@ansys-reviewer-bot
Copy link
Contributor

Thanks for opening a Pull Request. If you want to perform a review write a comment saying:

@ansys-reviewer-bot review

@ramin4667 ramin4667 requested a review from myoung301 February 27, 2025 19:42
@github-actions github-actions bot added the bug Something isn't working label Feb 27, 2025
Copy link

codecov bot commented Feb 27, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.49%. Comparing base (4d786bf) to head (ab71e2b).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5854      +/-   ##
==========================================
- Coverage   84.92%   83.49%   -1.44%     
==========================================
  Files         161      161              
  Lines       62156    62159       +3     
==========================================
- Hits        52785    51897     -888     
- Misses       9371    10262     +891     
🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@myoung301 myoung301 left a comment

Choose a reason for hiding this comment

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

A couple minor questions.

@@ -948,11 +948,17 @@ def available_license_feature(
port = name_env[0]
name = name_env[1]

if not input_dir:
if not input_dir and aedt_versions.latest_version:
Copy link
Contributor

Choose a reason for hiding this comment

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

@maxcapodi78 This logic is different than what you proposed. This appears to work for our use case, but is it ok to prefer the latest_version over current_version as we do here?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it's best to favor the latest_version for licensing so this makes sense to me. The tests pass and this fixed the issue we were seeing locally for 25.2.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Could you update the function by adding an extra parameter instead ? For example use_latest=False.
This would help people working with early dev versions to avoid using that release by default.

@myoung301 myoung301 enabled auto-merge (squash) March 7, 2025 19:31
@@ -948,11 +948,17 @@ def available_license_feature(
port = name_env[0]
name = name_env[1]

if not input_dir:
if not input_dir and aedt_versions.latest_version:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could you update the function by adding an extra parameter instead ? For example use_latest=False.
This would help people working with early dev versions to avoid using that release by default.

input_dir = Path(aedt_versions.installed_versions[aedt_versions.current_version])
else:
input_dir = Path(input_dir)

# The licensing client location has changed in the Windows 25R2 AEDT installation.
if not check_if_path_exists(os.path.join(input_dir, "licensingclient")):
input_dir = Path(os.path.dirname(input_dir))
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm not sure to understand how this behave with the following code defining ansysli_util_path. Can you example why, if the path does not exist, it is still used afterward ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants