Skip to content

[GUI] Expose native format readers and document the FieldTrip alternatives - #850

Merged
arnodelorme merged 2 commits into
developfrom
agent/issue-814
Nov 29, 2026
Merged

arnodelorme merged 2 commits into
developfrom
agent/issue-814

Conversation

@arnodelorme

@arnodelorme arnodelorme commented Nov 29, 2026 •

Copy link
Copy Markdown
Collaborator

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.

MATLAB and the native EEGPrep import menus before and after

Identical single-sweep Neuroscan values and time locking event

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.

Editable Word report · PDF report

Cause and change

The aggregate importer hid format-specific readers and registered their menus through the BIDS extension. Its public entry now reports that FieldTrip is unavailable. Native menu actions call the appropriate reader and retain executable history. A private fallback preserves BIDS loading.

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.

Decision for Arno

At 18:56 Pacific the orchestrator’s automatic repo-push job sent the implementation to develop. This PR contains the remaining migration guidance and EGI regression. The complete native-reader change can be reviewed against its MNE parent. Original implementation diff.

The MNE interface is covered by #842.

Fixes #814
Part of #736
Addresses #843

@claude claude Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Code review skipped — your organization has no extra usage available to pay for this review.

If your organization's extra usage balance is empty, an organization admin can add extra usage credits at claude.ai/admin-settings/usage. If its monthly spend limit was reached, an admin can raise it on the same page. If neither applies, contact Anthropic support.

Once extra usage is available, someone with write access to this repository can comment @claude review on this pull request to trigger a review.

@claude

claude Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @arnodelorme's task in 43s —— View job


Code review

  • Overall assessment: Looks good. This branch adds only docs and one test. The reader changes are already on develop. I checked each row of the migration table against _read_requested_format in src/eegprep/functions/popfunc/pop_fileio.py. I also checked the pop_loadbv srange/chans parameters (1-based, inclusive), the pop_readegi datachunks dialog tag and the pop_fileio error message.
  • Highest-risk area: whether the migration table describes the readers' real behavior. It does.
  • Merge recommendation: Safe to merge.

Blocking

None.

Important

None.

Nits

None.

Test gaps

None. The new pop_readegi case in test_f10_accept_menu_import_updates_shared_session covers the EGI RAW menu path that no other test reached. It checks the data for datachunks='2:4' (columns 1:4 in 0-based indexing), that the console workspace stays in sync, and that the history command replays. I could not run the test here because the CI sandbox needs approval to run uv run pytest, so this relies on the PR's reported results.

EEGLAB parity notes

None. Removing the changelog entry for #761 is correct: it said pop_fileio(..., dataformat="biosig") still works, which is no longer true. Its menu wording now lives in the merged entry for #761/#813/#814.

Checked for correctness bugs, EEGLAB parity, data structure compatibility, changed-behavior tests, and CLAUDE.md/AGENTS.md compliance.

@arnodelorme

Copy link
Copy Markdown
Collaborator Author

Review (Claude Fable): needs Arno

  • The real change is already on develop, without a pull request. Commit 1a74fb97 (44 files, 241 lines added, 471 removed) was pushed to develop by the repo-push job at 18:56 Pacific. It was never reviewed or approved. Only Arno can decide to keep it or revert it.
  • What is left in this pull request is small and correct (47 lines added, 11 removed): the migration table, one EGI RAW menu test, and a six-line fix in extras.py. That fix matters, because develop is red without it.
  • My advice: keep 1a74fb97, wait for the MATLAB reference run, then merge this. The menus match the EEGLAB capture and the tests pass. The reference run was still queued when I looked.
Details

What reached develop without review

1a74fb97 has no pull request attached. #842 shows as merged for the same reason: its three commits arrived in the same push, with no merge commit. The commit changes reader behaviour, so AGENTS.md asks for human approval and one MATLAB reference run before merge. Neither happened. The changes that matter:

  • pop_fileio(...) now raises NotImplementedError and names the readers to use. Scripts that call it stop working. This is what Remove pop_eegio; native readers get their own menus; pop_fileio says it is not available #814 asks for.
  • pop_loadeeg sets xmin to 0 when one sweep is selected. This agrees with eeg_checkset.m lines 841 to 842.
  • pop_importepoch accepts one selected sweep stored as a 3-D array. pop_importepoch.m has no single-trial refusal either, only the row count check at line 266.
  • The EEG-IO menu entry and its dialog are gone. Six native entries replace the File-IO ones.

pop_loadeeg.m is not in the EEGLAB submodule (the neuroscanio plugin is absent), so I could not compare that function line by line.

Menu parity

The capture is right. EEGPrep now lists BIDS, Brain Vis. Rec. (.vhdr or .ahdr), Brain Vis. Anal., Magstim/EGI .mff, EGI .RAW, Neuroscan .CNT, Neuroscan .EEG. That is EEGLAB's order with its plugins installed. "From EGI .RAW file" exists only in EEGPrep (rule 1). Dropping the FILE-IO entry follows rule 22 and #814. Rules 23, 26 and 34 are not involved: no dialog layout and no supergui or inputgui code changes.

The diff of this pull request

  • Migration table: each row agrees with the former _read_requested_format dispatcher. I ran pop_importdata(data=path, dataformat="matlab") and it reads a .mat array. The chans and srange arguments of pop_loadbv are 1-based and inclusive, as the text says.
  • extra_for_library: small and fine. On develop, tests/test_package_help.py::test_every_public_optional_path_carries_its_marker fails (1 failed, 41 passed on test_package_help.py and test_stream9_gui_importers.py). On this branch those files plus test_optional_extras.py give 68 passed. [GUI] Read BioSig files with the optional Python BioSig library #857 carries the same fix and merges cleanly with this one.
  • New test: it drives the EGI RAW menu through the file chooser and the dialog, checks samples 2 to 4, the console namespace and the history replay. It tests behaviour, not internals.
  • Changelog: removing the Reader menus: FILE-IO becomes EEG-IO and BIOSIG becomes MNE-IO #761 entry is correct, since it said pop_fileio(..., dataformat="biosig") still works.

Evidence shown to Arno (rules 27, 29, 30)

The body has the summary, the three-way menu capture, a figure, folded text, and the Word and PDF links. The figure is thin: three samples of one Neuroscan sweep. Rule 30 asks for one distance per test case. The claim about seven selectors compares EEGPrep with its former self, not with MATLAB.

CI

Passing: base install, pre-commit, Ruff and ty, docs, EEGLAB Python backend. Failing: Windows, on tests/test_guifunc_primitives.py::test_window_without_a_height_is_as_high_as_its_rows (57 against 56 pixels). This pull request does not touch that file, and #835 works on that row height measure. The Linux, macOS, Pyodide and E1 jobs were still queued. The MATLAB reference run 46219936641 was queued too, so its counts are not in the body yet.

Other open pull requests

No new conflict. This branch merges cleanly with #836, #837, #841, #844, #846, #848, #849, #851, #852, #856, #857 and #858. #778, #797, #835 and #845 conflict, but they already conflict with develop itself.

Small points, none blocking

  • The title describes what is already on develop. Something like "[docs] Map the former pop_fileio selectors to the native readers" would describe this diff.
  • For a later issue: pop_fileio.py still holds the whole former dispatcher as the private _read_recording. Only pop_biosig and the BIDS loader call it, and neither uses the dataformat selectors. 32 test calls reach into that private function, and one error text still mentions "the data-format popup", which no longer exists.
  • The cause of the direct push should be fixed in the orchestrator. An agent branch that tracks origin/develop gets pushed into develop by repo-push. Create the branch with git worktree add --no-track -b.

— orchestrator review

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.

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

1 participant