-
Notifications
You must be signed in to change notification settings - Fork 17
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
🍄 events moved to gaze df #885
base: main
Are you sure you want to change the base?
Conversation
for more information, see https://pre-commit.ci
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #885 +/- ##
===========================================
- Coverage 100.00% 99.79% -0.21%
===========================================
Files 72 74 +2
Lines 3321 3385 +64
Branches 594 596 +2
===========================================
+ Hits 3321 3378 +57
- Misses 0 5 +5
- Partials 0 2 +2 ☔ View full report in Codecov by Sentry. |
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.
Thank you so much! This PR is already in great shape!
There are some small quirks left to work out, especially regarding the logging/verbose parts.
|
||
LOG_LEVEL = os.environ.get('LOG_LEVEL', 'INFO') | ||
LOG_CONFIG = '[%(levelname)s] %(asctime)s %(name)s:%(lineno)d - %(message)s' | ||
logging.basicConfig(level=LOG_LEVEL, format=LOG_CONFIG) |
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 needed a bit of time to think about this.
we probably shouldn't set this in the package, as a user might have a custom logging config defined. after importing pymovements their config would be overwritten.
this logic should actually be on the side of the user, so I would suggest to revert the changes in this file.
still, defining logging levels and other configuration aspects can form a small mini tutorial. this would be out of scope of this PR but feel free to create one in case you like.
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.
indeed, will revert
although I'm not sure it's overwriting the user logging config, this should be only at the package level; but I'll have to check; on the long run probably a logging.ini
would be more appropriate
'Consider calling detect before.', | ||
) | ||
|
||
if verbose is True: |
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.
To log the debug message one would have to set verbose
to True
and set the logging level to DEBUG
.
So probably the verbose parameter isn't needed after all in this method and the if condition can be updated to
if logger.isEnabledFor(logging.DEBUG):
to avoid creating the debug string if not needed
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.
the verbose thing was there just to be consistent with the Dataset method, but maybe we can remove it together with the logging code above and keep it simple;
the message is not very informative either as it shows the same thing over and over again when the method is called from the Dataset
what do you think, should we drop the logging altogether?
Description
Fixes #
Implemented changes
Insert a description of the changes implemented in the pull request.
verbose
parameter to make senseType of change
How Has This Been Tested?
Please describe the tests that you ran to verify your changes.
Provide instructions so we can reproduce.
Please also list any relevant details for your test configuration
Checklist: