-
Notifications
You must be signed in to change notification settings - Fork 20
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
simple duration printout #294
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.
so currently write
will print to stdout, but this will make stdout noisy if you're also using that for the actual output of the command
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #294 +/- ##
==========================================
+ Coverage 91.64% 91.66% +0.02%
==========================================
Files 92 92
Lines 5662 5678 +16
==========================================
+ Hits 5189 5205 +16
Misses 473 473
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
return result | ||
|
||
return wrapper | ||
|
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.
I don't think you need something as complicated as how openmmtools does it: https://github.com/choderalab/openmmtools/blob/main/openmmtools/utils/utils.py#L65-L183
But I much rather see the timing information written to a log level (maybe info?) so that a user can control where the output goes using either standard python logging tooling or posix things like 2&> /dev/null
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.
I opened OpenFreeEnergy/gufe#168 which I think is a better system that @mikemhenry is alluding to. This is good enough and a nice improvement for 0.7 though
8866c46
to
7ba66f0
Compare
This pr brings simple duration timings to the cmd line tools:
adds this line to the output:
Duration: 0:00:30.134822
it is a super small code change, that adds a decorator to the cli tools.