Repository navigation
Closed
Labels
phaseEpic implementation phase
Description
🤖 Phase issue for the EEGLAB completion epic.
Goal
Complete File/Edit feature parity for dataset metadata, event metadata, channel metadata, and multi-dataset state using the shared contracts established in Phase 1a.
Target branch and PR flow
- Create the phase branch from
feature/eeglab-completionafter Phase 1a merges. - Open the phase PR back into
feature/eeglab-completion. - The phase PR should close this issue.
Parallelization
Can run in parallel with Phases 2, 3, and 4 after Phase 1a merges. Coordinate with Phase 5 for STUDY metadata assumptions.
In scope
- Dataset metadata editing and comments.
- Event field/value editing and event-based selection.
- Dataset copy, merge, delete, and the user-facing multi-dataset selection mutator based on the Phase 1a selection-state contract.
- Channel location editing/import/export, channel centering, and channel correspondence helpers.
- File/Edit menu placeholders in this category.
- GUI dialogs, help Markdown, console commands, history strings, and menu dispatch for the implemented workflows.
Out of scope
- Shared contract design already handled by Phase 1a except for small local refinements discovered during implementation.
- EEGBrowser/eegplot scrolling-browser workflows.
- Runtime dependence on
src/eegprep/eeglab.
Acceptance criteria
- File/Edit menu actions in this category are implemented or explicitly excluded with browser/external rationale.
EEGPrepSession, GUI, andeegprep-consolestay synchronized for all dataset/event/channel metadata mutations.- The multi-dataset selection mutator conforms to the Phase 1a selection-state contract and remains readable by STUDY workflows.
- User-facing
pop_*functions supportreturn_com=True, valid Python console echoes, help Markdown, and GUI dispatch. - Tests cover
sample_data, synthetic edge cases, 1-based UI indices versus Python internals, cancel/error paths, and MATLAB parity where EEGLAB behavior is deterministic. - GUI dialogs have visual parity captures and side-by-side PR attachments.
- Required checks pass: focused tests, relevant MATLAB parity tests,
uv run --no-sync ruff check .,uv run --no-sync ruff format --check .,uv run --no-sync ty check, and the non-slow pytest suite unless a documented external blocker exists.
/goal prompt
/goal Complete EEGPrep parity for File/Edit dataset, event, and channel metadata workflows against EEGLAB using the shared contracts from Phase 1a, including the Phase 1a multi-dataset selection-state contract but excluding EEGBrowser-dependent paths. Verify by comparing EEGLAB source behavior, implementing GUI/API/console paths, adding sample_data and MATLAB parity tests, adding visual parity screenshots for GUI dialogs, running focused tests plus ruff/format/ty and the non-slow suite, and iterating until review finds no actionable parity or correctness issues.
Metadata
Metadata
Assignees
Labels
phaseEpic implementation phase
Activity
claude commentedon May 27, 2026
🤖 Plan:
Not opening a PR. Phase 1b is an epic-level phase covering ~10 user-facing workflows across
popfunc/,guifunc/,resources/help/,adminfunc/console.py, and tests, plus per-dialog visual parity captures. Far above the 100-line single-PR threshold, and the issue itself says to split into sub-PRs againstfeature/eeglab-completionafter Phase 1a (#61) merges. Phase 1a is still OPEN, so broad implementation here is blocked pending its merge.Research
Phase 1b targets every Edit-menu (and one Datasets-menu) action currently routed to
show_coming_soonfor dataset/event/channel metadata and multi-dataset state. EEGLAB sources are not vendored undersrc/eegprep/eeglab/in this checkout — implementers must read from https://github.com/sccn/eeglab during the port.feature/eeglab-completionexists but is identical todevelop(no Phase 1a content yet).Scope inventory — placeholders to remove
pop_editsetpop_editset.mpop_commentspop_comments.mpop_editeventfieldpop_editeventfield.mpop_editeventvalspop_editeventvals.mpop_selecteventpop_selectevent.mpop_rmdatpop_rmdat.mpop_chaneditpop_chanedit.mpop_copysetpop_copyset.mpop_mergesetpop_mergeset.mselect_multiple_datasetseeglab.mcb_selectstudy regionAll ten are registered in
menu_placeholders.py#L11-L76; menu items already wired ineeglab_menu.py#L129-L139and#L336; fall through toshow_coming_soonatmenu_actions.py#L252. Notepop_rmdatis not yet a module underfunctions/popfunc/; onlypop_select,pop_delset,pop_adjusteventsare implemented from the Edit submenu.Already in place
EEGPrepSession.store_current,add_history,notify_changed,retrieve,delete_current,clear_allinguifunc/session.py#L105-L185.menu_actions.py#L643-L697(_run_pop_function+_store_current_from_gui) — new pop functions plug in by adding a branch indispatch()and an elif arm in_run_pop_function, and removing the id fromPLACEHOLDER_ACTIONS.<function_name>.mdundersrc/eegprep/resources/help/(current set:pop_reref,pop_select,pop_runica, etc.).tests/test_console_workspace.py— extend per new pop function for bare-call auto-store and namespace sync.Relevant code
src/eegprep/functions/guifunc/menu_placeholders.py#L11-L76— placeholder set to drainsrc/eegprep/functions/guifunc/menu_actions.py#L643-L697— pop dispatch templatesrc/eegprep/functions/guifunc/eeglab_menu.py#L129-L139— Edit submenu wiringsrc/eegprep/functions/guifunc/session.py#L105-L185— session sync surfacesrc/eegprep/functions/popfunc/pop_adjustevents.py—return_com/ history string pattern to mirrorProposed Approach
Block on Phase 1a (#61) merging into
feature/eeglab-completion, then land the following sub-PRs againstfeature/eeglab-completion. Sequencing places lightweight metadata first (template for later PRs), stabilizes event-field shape before event-based selection consumes it, lands channel metadata before plotting phases need it, and landsselect_multiple_datasetsselection state beforepop_mergesetconsumes it.pop_comments— string-only dataset metadata; smallest PR, becomes the template (pop module + GUI dialog + Help md + dispatch + 2 tests).pop_editset—setname,subject,condition,group,session,chanlocsreference, sampling-rate display; useseeg_checkset.pop_editeventfield— add/rename/delete event-struct fields; keepureventfield correspondence intact.pop_editeventvals— per-row event editor; relies oneeg_checkset('eventconsistency')already ineeg_checkset.py(covered bytests/test_eeg_checkset_eventconsistency.py).pop_selectevent+pop_rmdat— event-based epoch/continuous selection; share a helper that resolves event queries to sample ranges, then delegate topop_select/pop_epoch.pop_chanedit— largest single dialog; channel struct editor with import/export, centering, cart/sph/topo round-trips. Coordinate parity is sensitive; recommend numerical tolerance budget pre-agreed in the PR.select_multiple_datasets+ Datasets-menu multi-select state — surfaces selection vector onEEGPrepSessionso Matlab conversion fixes and new eegrej function #8 and Pop epoch #9 can consume it.pop_copyset—EEGPrepSession.store_current(copy=True, ...)path; mostly session-layer.pop_mergeset— multi-dataset concatenation; needs boundary-event insertion andureventrecompute (reuseeeg_findboundaries.py).Each sub-PR must include, per AGENTS.md and the issue's acceptance criteria: pop module in
functions/popfunc/pop_<name>.py,inputguidialog spec,return_com=True+ EEGLAB-style history string, Help Markdown inresources/help/, dispatch wiring +PLACEHOLDER_ACTIONSremoval,test_console_workspace.pyextension for bare-call auto-store, asample_data-based unit test, a MATLAB parity test where EEGLAB behavior is deterministic, and a visual parity capture undertools/visual_parity/attached side-by-side in the PR (not committed).Open questions for a human before implementation begins
pop_editeventfield+pop_editeventvalsin one PR)?pop_mergesetconsume the multi-dataset selection state from PR EDF testing and MATLAB modification #7 (forcing the listed order), or accept explicit indices and treat selection state as a separate UI concern?pop_chaneditcoordinate transforms (cart ⇄ sph ⇄ topo round-trip) andpop_mergesetboundary-event semantics?feature/eeglab-completionbefore any non-slow / parity gate flips, or per-sub-PR gating with the epic PR re-running the full gate at integration?pop_rmdatbelongs in this phase — the issue text says "event-based selection" but does not namepop_rmdatexplicitly. Phase 2 ("Signal conditioning, filtering, baseline, and cleaning") could also claim it.No duplicate work detected:
gh pr list --state openreturns no PRs, and no closed PRs touch any of thesepop_*ids.