Skip to content

Route low-level processing messages through logging #182

Closed

Description

@suraj-ranganath

🤖 Low-level processing helpers still print progress and warnings directly to stdout. That bypasses the console-safe logging path and can pollute JSON CLI output or the mixed GUI plus eegprep-console prompt.

Relevant code:

  • src/eegprep/functions/sigprocfunc/epoch.py:54 - direct progress print
  • src/eegprep/functions/sigprocfunc/epoch.py:119 - direct warning print
  • src/eegprep/functions/miscfunc/eeg_mne2eeg_epochs.py:48 - direct conversion warning print

Acceptance criteria:

  • Processing messages use logging, not print.
  • CLI JSON output remains clean.
  • Tests cover no stdout for affected public workflows.

Activity

  1. added
    bug
    on Jun 10, 2026
  2. claude commented on Jun 10, 2026

    @claude
    Contributor

    🤖 # Research

    Three direct print() calls in low-level processing helpers bypass the standard logging path, so progress and warning lines leak to stdout regardless of the host (CLI JSON, eegprep-console, GUI). Root cause: these modules never adopted the logger = logging.getLogger(__name__) pattern used by the rest of sigprocfunc//miscfunc/.

    Relevant code

    • src/eegprep/functions/sigprocfunc/epoch.py#L54 - print('Epoching...')
    • src/eegprep/functions/sigprocfunc/epoch.py#L119,L124 - per-event boundary/valuelim warnings
    • src/eegprep/functions/miscfunc/eeg_mne2eeg_epochs.py#L48 - reference-conversion warning
    • src/eegprep/functions/sigprocfunc/runica.py#L28 - existing logger pattern to mirror

    Proposed Fix

    Add module loggers and route the three messages through them: logger.info('Epoching...') for progress, logger.warning(...) for the two epoch warnings and the reference-conversion warning. Add regression tests that call each public workflow and assert no captured stdout.

    PR: #184

    🤖 Plan:

    • Confirm issue actionable, no duplicate PR
    • Branch agent/20260610-fix-182
    • Add tests asserting silent stdout for epoch and eeg_mne2eeg_epochs
    • Route prints through logging in epoch.py and eeg_mne2eeg_epochs.py
    • ./pre-commit.py --fix and run targeted tests (pass)
    • Open PR Route low-level processing messages through logging #184
    • Monitor CI
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions