-
Notifications
You must be signed in to change notification settings - Fork 12
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
Feature/log level input checking #119
Conversation
np.cumsum( | ||
(pnts['time_local'] - | ||
pnts['time_local'].shift()).fillna(pd.Timedelta(seconds=0)).astype('timedelta64[s]') | ||
with fsim.utils.suppress_logging(): |
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.
Can we change instances of fsim.utils.suppress_logging():
to a single fsim.utils.disable_logging()
at the top of the file?
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.
@kylecarow, I prefer the latter because I'd like it to be really obvious that we're suppressing logging so that we remember to fix the cause of the logging at some point in the future. Does this seem ok?
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'm fine with either way really. Do you mean keeping it as is?
err_str = f"Invalid arg: '{level}'. See doc string:\n{set_log_level.__doc__}" | ||
|
||
assert level in allowed_args, err_str | ||
|
||
if isinstance(level, str): | ||
level = logging._nameToLevel[level] |
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.
@calbaker optionally:
level = logging._nameToLevel[level] | |
level = logging._nameToLevel[level.upper()] |
This would allow lowercase log level strings "warning"
, "info"
, etc., but we would need to add those to the allowable inputs.
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.
@kylecarow , yea that sounds good. Could you make that change?
moved to #126 |
No description provided.