-
Notifications
You must be signed in to change notification settings - Fork 31
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
Add support for verbosity keyword #74
Conversation
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.
Thanks for sharing. I left a few comments.
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.
Maybe it is worth to add the string keywords directly in the interface layer at
Lines 219 to 221 in d72c2ec
def set_verbosity(self, verbosity: int) -> None: | |
"""Set verbosity of calculation output""" | |
_lib.xtb_setVerbosity(self._env, verbosity) |
This would keep the harness clean from this logic and allow to reuse it easily in the ASE calculator as well as any other dependent interface.
Thats a great idea would you want to support ints still or only the valid strings I was thinking something like this to support both and we can return the int value the verbosity is set to? def set_verbosity(self, verbosity: Union[Literal["full", "minimal", "muted"], int]) ->int: |
For backwards compatibility it would be preferable to still have the int support. |
Codecov Report
@@ Coverage Diff @@
## main #74 +/- ##
==========================================
+ Coverage 97.04% 97.10% +0.05%
==========================================
Files 8 8
Lines 440 449 +9
==========================================
+ Hits 427 436 +9
Misses 13 13
Continue to review full report at Codecov.
|
@awvwgk I think this is now ready apart from the mypy warnings, any ideas how I should get around these? |
Seems like a false positive to me, we should be able to skip the statement with a |
Description
This PR implements and fixes #73 by adding support for a verbosity keyword which when set to muted will stop temporary files from being made which causes a failure when running many parallel xtb calculations.
Changelog description
The harness now accepts a
verbosity
keyword which can be a string or int corresponding to the level of verbosity, the accepted strings and associated ints arefull=2
,minimal=1
,muted=0
.Status
Ready to go