-
Notifications
You must be signed in to change notification settings - Fork 225
Pre commit and warning #863
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
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.
Pull request overview
This pull request adds a custom verbose decorator to provide better verbosity control during library initialization and evaluation. The decorator allows users to control the logging level of the 'moabb' logger through a verbose parameter similar to MNE's verbosity system.
Key changes:
- Adds a new
verbosedecorator inmoabb/utils.pythat controls the 'moabb' logger level based on a verbose parameter (True→INFO, False→WARNING, or explicit level) - Applies the decorator to
BaseEvaluation.__init__to enable verbosity control during evaluation initialization - Adds comprehensive tests for the verbose decorator functionality, including warning visibility and suppression scenarios
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| moabb/utils.py | Implements the verbose decorator that temporarily adjusts the 'moabb' logger level based on function arguments or instance attributes |
| moabb/evaluations/base.py | Adds verbose parameter to BaseEvaluation.__init__ and applies the @verbose decorator to control logging during initialization |
| moabb/tests/test_verbose.py | Adds test cases for verbose decorator functionality, testing warning visibility, suppression with ERROR level, and MNE-style False behavior |
| docs/source/whats_new.rst | Documents the new verbosity control feature in the changelog |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <[email protected]> Signed-off-by: Bru <[email protected]>
Co-authored-by: Copilot <[email protected]> Signed-off-by: Bru <[email protected]>
Co-authored-by: Copilot <[email protected]> Signed-off-by: Bru <[email protected]>
…x/moabb into pre-commit-and-warning
|
Nice!! maybe we should add this verbose argument to other functions. WDYT? Was the decorator inspired form somewhere? |
No description provided.