Repository navigation
Closed
Labels
phaseEpic implementation phase
Description
🤖 Phase issue for the STUDY and standalone integration epic #78.
Goal
Implement STUDY metadata, design, file I/O, and session synchronization foundations so later STUDY measure/clustering work has stable contracts.
Target branch and PR flow
- Create the phase branch from
feature/study-standalone-completionafter Epic: Complete EEGPrep core EEGLAB parity except browser and external plugins #60 has integrated, unless starting earlier from the latest compatible epic branch is explicitly coordinated. - Open the phase PR back into
feature/study-standalone-completion. - The phase PR should close this issue.
Dependencies
- Depends on Epic: Complete EEGPrep core EEGLAB parity except browser and external plugins #60 core contracts, especially
EEGPrepSession, multi-dataset selection, history, and GUI/console synchronization. - Should land before Phase 5b and 5c.
In scope
- STUDY creation from loaded datasets and browse/select workflows.
- STUDY load/save/resave and clear-study behavior.
- STUDY metadata editing.
- STUDY design editing, variables, factors, and dataset consistency checks.
STUDY,CURRENTSTUDY,ALLEEG, andCURRENTSETsynchronization throughEEGPrepSessionandeegprep-console.- Relevant menu actions, GUI dialogs, help Markdown, history strings, and valid Python console echoes.
Out of scope
- Measure precompute, measure plotting, and clustering; see Phase 5b.
- Final end-to-end STUDY hardening and broad parity fixtures; see Phase 5c.
- External-only LIMO behavior unless explicitly represented by a clear user-facing message.
Acceptance criteria
- STUDY create/load/save/edit/design workflows are usable from GUI, Python API, and
eegprep-console. - Multi-dataset selection and STUDY dataset membership follow the contracts established in Epic: Complete EEGPrep core EEGLAB parity except browser and external plugins #60.
- Commands emitted by GUI are valid Python and replayable.
- Tests cover sample/multi-dataset fixtures, cancel/error paths, 1-based UI indices versus Python internals, session synchronization, and deterministic MATLAB parity where feasible.
- GUI dialogs have visual parity captures and PR user-attachment side-by-side images.
- Required lint/type/test commands pass.
/goal prompt
/goal Complete EEGPrep parity for STUDY metadata, design, file I/O, and session synchronization workflows against EEGLAB. Use the #60 session/history/menu contracts, inspect EEGLAB source first, implement GUI/API/eegprep-console paths, add sample and multi-dataset tests plus MATLAB parity where deterministic, add visual parity screenshots for GUI dialogs, run ruff/format/ty and focused plus non-slow pytest, and iterate until review finds no actionable parity or correctness issues.
Metadata
Metadata
Assignees
Labels
phaseEpic implementation phase
Activity
claude commentedon May 27, 2026
🤖 Plan:
Research
Phase tracking issue for the full STUDY/group-level workflow port. Current STUDY surface in EEGPrep is a thin stub: only minimal create/load/save plus an ERP wrapper exist, no designs, no precompute, no clustering, no
std_*helpers, and no multi-dataset parity fixtures. All advanced STUDY menu items are wired to the not-implemented placeholder dispatcher.Current state
src/eegprep/functions/studyfunc/— onlypop_study,pop_loadstudy,pop_savestudy,pop_studyerp,pop_studywizard; nostd_*modules.src/eegprep/functions/studyfunc/pop_study.py#L8-L26— STUDY = name + datasetinfo + design list; no variables/factors/changrp/cluster fields.src/eegprep/functions/guifunc/menu_placeholders.py#L16-L68—pop_studydesign,pop_precomp,pop_chanplot,pop_preclust,pop_clust,pop_clusteditall stubbed.src/eegprep/functions/guifunc/session.py#L42-L196andadminfunc/console.py#L23-L223— STUDY/CURRENTSTUDY sync skeleton is in place; can be reused.sample_data/— only single-subjecteeglab_data*; no multi-dataset STUDY fixture.src/eegprep/eeglab/— empty in this checkout; parity work needs the vendored EEGLAB tree populated locally for development.Proposed Approach
This is a multi-week, multi-module port. Open Phase 5 as a long-lived branch (
feature/phase-5-studycut fromfeature/eeglab-completion) and decompose into focused sub-PRs that each merge into the phase branch. Suggested sequence:eeg_checkset-style validator. Land the full STUDY dict shape (name,task,notes,filename,filepath,datasetinfo,subject,condition,group,session,run,changrp,cluster,design,etc,history) andstd_checkset. Includes a multi-dataset fixture undersample_data/study_demo/and pytest covering create/save/load round-trip with non-trivial fields.std_makedesign,std_selectdesign,pop_studydesign,std_combtrial, plus dataset consistency check (std_checkdatasetinfo). Wirepop_studydesigninto menu_actions, replacing the placeholder.std_precomp,std_readdata/std_readfile, measure file I/O (.dat*,.ica*),pop_precompfor bothchannelsandcomponentsvariants. Reuse existing ERP/spectral routines where present; add MATLAB parity tests for a deterministic measure (e.g. ERP mean) on the two-dataset fixture.std_erpplot,std_specplot,std_erspplot,std_itcplot,std_topoplot, pluspop_chanplot. Gate behind Phase 4 plotting primitives — explicitly note dependency in the phase PR.std_preclust,std_pca,std_kmeans/std_dipoleclust,pop_preclust,pop_clust,std_editset,pop_clustedit. Cluster data structures must match EEGLAB so.studyfiles round-trip.pop_*, addreturn_com=True, updatemenu_actions._study_action, and extendtests/test_console_workspace.pyfor namespace/history sync. GUI visual parity captures via theeeglab-gui-visual-parityskill.Out of scope reminders (from issue body): LIMO and runtime dependence on vendored EEGLAB.
Open questions for the human owner before implementation starts
pop_savestudy) or add a.set-style MAT-v7 path for true EEGLAB binary parity? JSON is simpler; MAT enables MATLAB to open EEGPrep-written.studyfiles directly.std_precompwrite EEGLAB-compatible.dat*/.ica*files, or EEGPrep-native sidecars with a converter? The former preserves cross-tool workflows; the latter is cleaner.kmeans/pcapaths (requires seeded RNG matching) or behavioral parity only?eeglab_data.set, or check in a trimmed real study?Will not open a PR. Awaiting decisions on the open questions before starting sub-PR 1.
[-]Phase 5: STUDY and group-level workflows[/-][+]Phase 5a: STUDY metadata, design, file I/O, and session synchronization[/+]