You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Remove pop_eegio; native readers get their own menus; pop_fileio says it is not available #814
Arno wants the native EEGPrep readers to appear as separate menus, as in EEGLAB, instead of one EEG-IO entry.
Remove pop_eegio for now.
Each native import of EEGPrep gets its own menu entry, like EEGLAB.
pop_fileio tells the user it is not available on this platform and names the alternatives (unless there is a good reason otherwise; check what it calls today).
Supersedes part of the pending rename (approval 73 of the orchestrator).
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.
Scope check: too large for an agent PR (menu tree, dispatcher, BIDS exporter, pop_biosig, help, docs, about 23 test/doc files with 44 pop_fileio( test calls). Analysis below for human review.
Human decides the open questions, then implementation
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
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.
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.
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.
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
Should pop_fileio raise an error, or show a message box in the GUI and return {}? EEGLAB's own pop_fileio works, so whichever we pick departs from EEGLAB.
Does the MNE-IO entry (Using the MNE-IO interface → pop_biosig) stay as a top-level Import item, given it duplicates the two BDF/EDF entries?
🤖 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.
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.
Activity
claude commentedon Nov 28, 2026
🤖 Plan:
eegio)pop_biosig, help, docs, about 23 test/doc files with 44pop_fileio(test calls). Analysis below for human review.Research
There is no
pop_eegiomodule. The "EEG-IO" entry ispop_fileioitself. It picks a native reader from the file extension or a Data format popup (pop_loadset,pop_loadcnt,pop_loadbv,pop_readegi, Neuroscan.eegvialoadeeg,pop_mffimport,pop_importdata), and uses MNE for EDF/BDF/GDF. So "removing pop_eegio" means removing the EEG-IO menu entry and turningpop_fileiointo a "not available" stub. The catch:pop_fileiois also the internal dispatcher forpop_biosigand the BIDS exporter, so that logic has to move beforepop_fileiocan be stubbed.Relevant code
src/eegprep/functions/popfunc/pop_fileio.py#L54-L161: the extension/format dispatcher plus the blockrange/channel/sample/trial selectionsrc/eegprep/functions/guifunc/eeglab_menu.py#L48:Using the EEG-IO interfacemenu entrysrc/eegprep/functions/guifunc/menu_actions.py#L93-L98,#L441-L446,#L727-L760:pop_fileio*action names and handlers, including hiddenpop_fileio_{brainvision,cnt,eeg,mff}actionssrc/eegprep/functions/popfunc/pop_biosig.py#L78: callspop_fileio(..., feature="pop_biosig")to read EDF/BDF/GDFsrc/eegprep/plugins/EEG_BIDS/bids_tools.py#L802-L805: falls back topop_fileio(path)for any other extensionProposed approach
pop_fileio.pyinto a private helper, e.g.popfunc/_file_io.py(it already holdsmne_raw_to_eeg/eeg_from_data). Pointpop_biosigandbids_toolsat that helper.pop_fileioa 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 rewriteresources/help/pop_fileio.md. Removepop_fileio_brainvision_mat,pop_fileio_{brainvision,cnt,eeg,mff}and their help files, or rename them to native names.eeglab_menu.py, underUsing 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 deleteUsing the EEG-IO interface. Each entry needs a file dialog and menu handler that returns(EEG, com)and goes throughEEGPrepSession.extras.py,cli/commands/migrate.py(mappop_fileioto 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 callpop_fileio(...)directly. Most should call the native reader instead. Add one regression test thatpop_fileioraises the "not available" error and one that the menu tree has nopop_fileioaction.Open questions
pop_fileioraise an error, or show a message box in the GUI and return{}? EEGLAB's ownpop_fileioworks, so whichever we pick departs from EEGLAB.Using the MNE-IO interface→pop_biosig) stay as a top-level Import item, given it duplicates the two BDF/EDF entries?pop_eegio) get closed or retargeted after this?arnodelorme commentedon Nov 29, 2026
🤖 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.
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)
arnodelorme commentedon Dec 1, 2026
🤖 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.
arnodelorme commentedon Dec 1, 2026
🤖 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.