-
Notifications
You must be signed in to change notification settings - Fork 134
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: Add min version decorator #5631
Conversation
This decorator should be compatible in many classes of PyAEDT. However, there is a limitation which requires the decorated object to be able to access the AEDT desktop. Current ways to achieve such check is to leverage any existing attribute among odesktop, _odesktop and _desktop.
Thanks for opening a Pull Request. If you want to perform a review write a comment saying: @ansys-reviewer-bot review |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5631 +/- ##
=======================================
Coverage 85.27% 85.27%
=======================================
Files 152 154 +2
Lines 61017 60981 -36
=======================================
- Hits 52033 52004 -29
+ Misses 8984 8977 -7 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is clearly a must have feature. Thanks @SMoraisAnsys . Let's make sure we promote its extensive usage.
Co-authored-by: Maxime Rey <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job!
Description
This feature adds the ability to decorate a method with a check on AEDT version.
This way, check the version inside the method is no longer required and one can see right away that there is a limitation on the method.
The decorator should be compatible in many classes of PyAEDT. However, there is a limitation which requires the decorated object to be able to access the AEDT desktop.
Current ways to achieve such check is to leverage any existing attribute among
odesktop
,_odesktop
and_desktop
.Issue linked
Associated to #5504
Checklist
Note
The test are performed on a mock object to simplify things but I also tested it on a fake Desktop and it worked just fine, here is the class I used to test with real AEDT object