Skip to content

Conversation

@bruAristimunha
Copy link
Collaborator

No description provided.

Copy link
Contributor

Copilot AI left a 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 verbose decorator in moabb/utils.py that 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.

@bruAristimunha bruAristimunha merged commit 618e4db into develop Jan 8, 2026
14 checks passed
@bruAristimunha bruAristimunha deleted the pre-commit-and-warning branch January 8, 2026 15:28
@PierreGtch
Copy link
Collaborator

Nice!! maybe we should add this verbose argument to other functions. WDYT?

Was the decorator inspired form somewhere?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants