Skip to content

[Fable 5 Architecture Closeout] Phase 5 — BIDS, Qt, and FIR ownership decomposition #212

Closed

Description

@suraj-ranganath

🤖 Part of #207. This phase decomposes the large I/O, GUI renderer, and FIR ownership modules that could not be split safely in the behavior-preserving pass.

Summary

Move large mixed-concern modules toward EEGPrep’s EEGLAB-parity ownership map without changing behavior: popfunc wrappers stay thin, GUI renderer helpers stop being a stateless class namespace, and firfilt owns FIR design code instead of clean_rawdata private helpers.

Scope

Covers remaining findings from #197/#205 including:

  • functions/popfunc/pop_load_frombids.py: extract NEO raw-reader and montage/coordinate inference into appropriate shared reader/helper modules; leave BIDS orchestration and history in the pop wrapper.
  • functions/guifunc/qt.py: split QtDialogRenderer staticmethod namespace by widget/layout/dialog ownership or convert to module-level helpers with stable call sites.
  • FIR ownership: move firws, firwsord, and related FIR design helpers from plugins/clean_rawdata/private/sigproc.py into plugins/firfilt, with clean_rawdata importing downward from firfilt.
  • Any related GUI FIR band-edge/desired-amplitude helper duplication if it can be resolved without changing user-visible filtering behavior.

Acceptance Criteria

  • pop_load_frombids remains user-facing BIDS orchestration/history glue and no longer owns raw reader or montage-matching engines.
  • Extracted BIDS reader/montage helpers have direct tests plus existing BIDS import tests.
  • Qt renderer refactor preserves visual parity for representative dialogs; side-by-side screenshots are attached if visible behavior changes or layout is touched.
  • FIR helper ownership matches EEGLAB/firfilt semantics and avoids imports from clean_rawdata private modules.
  • No runtime dependency on vendored EEGLAB or uninstalled optional tooling.

References

  • AGENTS.md
  • .agents/skills/eegprep-feature-development/SKILL.md
  • .agents/skills/eeglab-gui-visual-parity/SKILL.md for Qt dialog changes
  • EEGLAB references for BIDS/plugin/firfilt ownership.

/goal Prompt

/goal Complete Fable 5 architecture closeout Phase 5 from issue #<THIS_ISSUE>: decompose pop_load_frombids, Qt dialog rendering helpers, and FIR ownership while preserving observable behavior. Keep popfunc wrappers thin, preserve GUI visual parity and BIDS/FIR numerical behavior, add direct tests for extracted helpers and existing workflow tests, attach GUI side-by-side images if dialog layout changes, and run focused pytest plus ruff, format, ty, pre-commit, and visual parity checks where relevant.

Activity

  1. added
    phase
    on Jun 12, 2026
  2. suraj-ranganath commented on Jun 12, 2026

    @suraj-ranganath
    MemberAuthor

    🤖 # Research

    Duplicate-work preflight found no open PR for #212, QtDialogRenderer, or firws/firfilt ownership; the only BIDS hit is the parent Fable 5 epic PR #206. Root cause is ownership drift: pop_load_frombids owns raw Neo loading and packaged montage matching, QtDialogRenderer carries unrelated stateless widget/layout/validation/callback helpers, and clean_rawdata private helpers still own FIR design code that firfilt should provide.

    Relevant code

    Proposed Fix

    Extract raw BIDS EEG loading to plugins/EEG_BIDS/raw.py and montage matching to plugins/EEG_BIDS/montage.py, leaving pop_load_frombids as the BIDS metadata/channel/event/history orchestrator. Move clean_rawdata FIR design helpers into plugins/firfilt/design.py, update clean_rawdata callers to import downward from firfilt, and keep numerical formulas unchanged. Refactor Qt renderer stateless helpers into module-level ownership groups while preserving QtDialogRenderer call sites used by tests and visual capture; run focused BIDS, FIR, and GUI tests before broad lint/type checks.

  3. suraj-ranganath commented on Jun 12, 2026

    @suraj-ranganath
    MemberAuthor

    🤖 Completed by merged phase PR #216 into feature/fable5-architecture-closeout.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    phase

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions