Skip to content

Remove pop_eegio; native readers get their own menus; pop_fileio says it is not available #814

Done

Description

@arnodelorme

Arno wants the native EEGPrep readers to appear as separate menus, as in EEGLAB, instead of one EEG-IO entry.

Captures

Linux (jamming) captures of EEGLAB and EEGPrep from the November 28 run are added below, directly visible, by the EEGPrep worker. Fix nothing here before Arno says so, unless this issue is the one test fix named in its summary.

Arno's words

Arno's feedback of November 28, 2026 on the File and Edit comparison report (EEGLAB_vs_EEGPrep_File_and_Edit.pdf, run file-edit-native-2026-11-28 in adelorme-assistant/project_eegprep/reports).

Pop_eegio remove for now, as it is not needed. Instead, they are native imports in EEGPrep, and they should have their separate menu like in EEGLAB. Pop_fileio should indicate that it is not available under this platform and to use alternative functions. Unless you think otherwise. I'm not sure what pop file IO is calling right now. I think it's calling some native functions and we want separate menus. This is true of all the GUIs.

Activity

  1. added
    gui-parity
    on Nov 28, 2026
  2. claude commented on Nov 28, 2026

    @claude
    Contributor

    🤖 Plan:

    Research

    There is no pop_eegio module. The "EEG-IO" entry is pop_fileio itself. It picks a native reader from the file extension or a Data format popup (pop_loadset, pop_loadcnt, pop_loadbv, pop_readegi, Neuroscan .eeg via loadeeg, pop_mffimport, pop_importdata), and uses MNE for EDF/BDF/GDF. So "removing pop_eegio" means removing the EEG-IO menu entry and turning pop_fileio into a "not available" stub. The catch: pop_fileio is also the internal dispatcher for pop_biosig and the BIDS exporter, so that logic has to move before pop_fileio can be stubbed.

    Relevant code

    • src/eegprep/functions/popfunc/pop_fileio.py#L54-L161: the extension/format dispatcher plus the blockrange/channel/sample/trial selection
    • src/eegprep/functions/guifunc/eeglab_menu.py#L48: Using the EEG-IO interface menu entry
    • src/eegprep/functions/guifunc/menu_actions.py#L93-L98, #L441-L446, #L727-L760: pop_fileio* action names and handlers, including hidden pop_fileio_{brainvision,cnt,eeg,mff} actions
    • src/eegprep/functions/popfunc/pop_biosig.py#L78: calls pop_fileio(..., feature="pop_biosig") to read EDF/BDF/GDF
    • src/eegprep/plugins/EEG_BIDS/bids_tools.py#L802-L805: falls back to pop_fileio(path) for any other extension

    Proposed approach

    1. Move the reader dispatch and selection out of pop_fileio.py into a private helper, e.g. popfunc/_file_io.py (it already holds mne_raw_to_eeg/eeg_from_data). Point pop_biosig and bids_tools at that helper.
    2. Make pop_fileio a stub that raises a clear error, for example: pop_fileio: FieldTrip File-IO is not available in EEGPrep. Use pop_loadset, pop_loadbv, pop_loadcnt, pop_loadeeg, pop_readegi, pop_mffimport, pop_importdata, or pop_biosig. Remove its dialog spec and rewrite resources/help/pop_fileio.md. Remove pop_fileio_brainvision_mat, pop_fileio_{brainvision,cnt,eeg,mff} and their help files, or rename them to native names.
    3. In eeglab_menu.py, under Using EEGPrep functions and plugins, add one entry per native reader with EEGLAB's labels (EEGLAB gets these from plugins such as bva-io, neuroscanio and mffmatlabio): From Brain Vis. Rec. .vhdr or .ahdr file → pop_loadbv, From Neuroscan .CNT file → pop_loadcnt, From Neuroscan .EEG file → pop_loadeeg, From EGI .RAW file → pop_readegi, Import Magstim/EGI .mff file → pop_mffimport (check whether it is already a menu entry), plus the existing ASCII and BDF/EDF items. Then delete Using the EEG-IO interface. Each entry needs a file dialog and menu handler that returns (EEG, com) and goes through EEGPrepSession.
    4. Update extras.py, cli/commands/migrate.py (map pop_fileio to the native readers), __init__.py, the Sphinx pages (data_loading_and_saving.rst, interactive_pop_workflows.rst, eeglab_migration.rst, gui_console_session.rst, installation.rst, changelog), and the tests that call pop_fileio(...) directly. Most should call the native reader instead. Add one regression test that pop_fileio raises the "not available" error and one that the menu tree has no pop_fileio action.

    Open questions

  3. arnodelorme commented on Nov 29, 2026

    @arnodelorme
    CollaboratorAuthor

    🤖 File > Import data has distinct entries for BrainVision, Neuroscan and EGI formats. pop_fileio explains which reader to call. The migration table maps all seven previous selectors to their replacement calls, and the regression checks the native EGI RAW menu and its console history.

    Pull request #850.

    MATLAB and the native EEGPrep import menus before and after

    Identical single-sweep Neuroscan values and time locking event

    Editable Word report · PDF report

    The native reader alternatives reproduced the original signal data for all seven selectors. MATLAB and EEGPrep returned exactly 1.953125, 2.343750 and 2.734375 µV for Cz in the selected Neuroscan sweep at 250 Hz. Both put the time-locking event at sample 1. The EGI RAW menu imported and replayed the selected samples 2 through 4.

    Verification

    351 GUI and reader tests and 139 subtests passed on the final feature branch, with 7 reference cases deselected. All seven replacement calls were tested with files. Across the broader stack 590 distinct non-ASR tests passed, including the BrainVision Analyzer MATLAB reference fixture. A pre-existing ASR warning reproduced on the original code on macOS and the untouched test passed on Linux. Pre-commit, Ruff and ty passed. Full MATLAB reference run. Reference pins: EEGLAB d0963be9d81acc5b66e84f8d3d7c89e3ce127cc4 and eeglab_tests fec88f9ffe7c225eb1de8924db8b6a3e0d53a4d9. The original base-install CI failure exposed an inconsistent MNE extra marker. This branch and #857 share its correction. The rerun passed 169 tests and 139 subtests, with 4 reference cases deselected. GitHub has accepted the full reference run on this exact branch tip. Its counts and runtime are pending.

    — EEGPrep worker (Codex)

  4. arnodelorme commented on Dec 1, 2026

    @arnodelorme
    CollaboratorAuthor

    🤖 The new pop_loadeeg layout finding is tracked in #966. PR #965 includes the actual MATLAB and Qt captures and the same-input numerical comparison.

  5. arnodelorme commented on Dec 1, 2026

    @arnodelorme
    CollaboratorAuthor

    🤖 The new pop_readegi layout finding is tracked in #1022. PR #1021 includes the actual MATLAB and Qt captures and the same-input numerical comparison.

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

    gui-parity

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions