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 unit tests for 2023.2.pre1 server and add License context manager #846

Merged
merged 13 commits into from
Mar 22, 2023

Conversation

cbellot000
Copy link
Contributor

No description provided.

@codecov
Copy link

codecov bot commented Mar 17, 2023

Codecov Report

Merging #846 (6866690) into master (1e0fd71) will decrease coverage by 0.02%.
The diff coverage is 100.00%.

❗ Current head 6866690 differs from pull request most recent head 18315e6. Consider uploading reports for the commit 18315e6 to get more accurate results

@@            Coverage Diff             @@
##           master     #846      +/-   ##
==========================================
- Coverage   88.89%   88.88%   -0.02%     
==========================================
  Files          72       72              
  Lines        8193     8220      +27     
==========================================
+ Hits         7283     7306      +23     
- Misses        910      914       +4     

@cbellot000 cbellot000 changed the title fix unit tests for 2023.2.pre1 server fix unit tests for 2023.2.pre1 server and add License context manager Mar 20, 2023
Comment on lines 44 to 48
"""Can be optionally used to pre checkout a licence before using licensed DPF Operators.
Improves performances if many Operators requiring licensing are used afterwards.
It can also be used to force checkout before running a script when few
ANSYS license increments are available.
Check in the license when the object is deleted.
Copy link
Contributor

Choose a reason for hiding this comment

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

For line 48, my assumption is that the check in is automatic when the object is deleted. If you have to manually check in the license after deleting the object, keep line 48 as originally written.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

that's correct @JennaPaikowsky, thanks

Copy link
Contributor

@JennaPaikowsky JennaPaikowsky left a comment

Choose a reason for hiding this comment

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

Just a few edits here

Comment on lines +188 to +189
"""Sets the default number of threads to use for all operators,
default is omp_get_num_threads.
Copy link
Contributor

@PProfizi PProfizi Mar 22, 2023

Choose a reason for hiding this comment

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

Suggested change
"""Sets the default number of threads to use for all operators,
default is omp_get_num_threads.
"""Returns the license timeout in seconds.

return self._data_tree.get_as("license_timeout_in_seconds", types.double)

@license_timeout_in_seconds.setter
def license_timeout_in_seconds(self, value):
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
def license_timeout_in_seconds(self, value):
def license_timeout_in_seconds(self, value):
"""Sets the license timeout in seconds."""

@cbellot000 cbellot000 merged commit a24aae7 into master Mar 22, 2023
@cbellot000 cbellot000 deleted the feat/preprate_2023.2.pre1 branch March 22, 2023 14:56
@PProfizi PProfizi added the enhancement New feature or request label Apr 3, 2023
@PProfizi PProfizi added this to the v0.8.0 milestone Apr 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants