Skip to content

[GUI] Show the simple ERP STUDY instructions on two rows - #836

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

arnodelorme merged 2 commits into
developfrom
agent/issue-819

Conversation

@arnodelorme

@arnodelorme arnodelorme commented Nov 29, 2026 •

Copy link
Copy Markdown
Collaborator

The ERP STUDY wizard explains what it computes and how to arrange the datasets in two visible rows. EEGLAB clipped the previous instructions, and EEGPrep omitted the purpose of the calculation.

EEGLAB and EEGPrep before and after on Linux

Editable Word report · PDF report

Cause and change

The Python form put a shortened explanation in one label. Two full-width controls now use the same wording and geometry as the companion MATLAB change.

Verification

207 local GUI and function tests passed. Four reference cases were deselected. Pre-commit, Ruff and ty passed. On jamming under Xvfb, both complete lines were visible in MATLAB R2025b and Qt. The condition and subject defaults were 1 and 15. Windows CI reports the pre-existing one-pixel Qt row check #834, addressed by #835. Windows job.

Decision for Arno

The two rows describe the grand average and the required datasets. They omit the former aside about the standard STUDY editor.

Companion change in EEGLAB sccn/eeglab#999.

Fixes #819
Part of #809

@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 49s —— View job


Code review

  • Overall assessment: Looks good. The dialog change is correct and the new test would catch clipped instructions again. One docs nit (optional).

  • Highest-risk area: Where the new docs paragraph sits.

  • Merge recommendation: Safe to merge.

  • Gather context (diff, AGENTS.md, help resource, docs)

  • Review passes: AGENTS.md compliance, conventions, correctness, EEGLAB parity

  • Post review

Blocking

None.

Important

None.

Nits

  • docs/source/user_guide/study_workflows.rst:419-420: The new sentence about the simple ERP STUDY wizard is added at the very end of the page, after the closing cross-reference line and inside Limitations. It isn't a limitation, and readers of the pop_studyerp example won't see it there. Move it under "Create a simple ERP STUDY:" (line 49), before the code block. I left an inline comment on those lines.

Test gaps

None. test_studyerp_instructions_are_two_complete_rows checks both label texts, and also checks that each label is at least as wide as its rendered text, which catches clipping. The pop_studyerp callers are covered by the existing test_studyerp_cancel_changes_nothing_and_ok_builds.

Correctness checked

  • pop_studyerp_counts_dialog_spec now has five geometry rows, (1,)×3 plus two (1, 0.3, 0.4), and the controls split into the same five row groups (1, 1, 1, 3, 3).
  • The cond/subjects tags and their defaults (1, 15) are unchanged, so _studyerp_from_dialogs reads the same results.
  • The return values and the history command are unchanged.

EEGLAB parity notes

  • The vendored EEGLAB reference (src/eegprep/eeglab/) is not in this CI checkout, so I could not compare the new wording or the {1 1 1 [1 0.3 0.4] [1 0.3 0.4]} geometry against functions/studyfunc/pop_studyerp.m.
  • The PR says a companion MATLAB change uses the same text. Until that change merges upstream, EEGLAB still shows the old single label. That's fine as an intentional change, but please link the companion EEGLAB PR in the description so the visual parity case can be refreshed once it lands.

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

Comment on lines +419 to +420
In the simple ERP STUDY wizard, prepare one dataset per subject and condition
before entering the subject and condition counts.

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.

Nit: This guidance ends up at the bottom of the Limitations section, after the closing cross-reference line. It is not a limitation, and readers of the pop_studyerp example will not see it there.

Move these two lines under "Create a simple ERP STUDY:", before the code block (

Create a simple ERP STUDY:
.. code-block:: python
from eegprep import pop_studyerp
STUDY, ALLEEG, com = pop_studyerp(ALLEEG, return_com=True)
), and remove them here.

@arnodelorme

Copy link
Copy Markdown
Collaborator Author

Review (Claude Fable): needs Arno

Details

Wording to choose from

Source Row 1 Row 2
This pull request and sccn/eeglab#999 Create a simple STUDY and compute a grand average ERP for each condition. Store each subject's trials in a separate dataset for each condition.
Plan in #819 Creates a simple STUDY and its condition grand average ERPs. Store each condition of each subject in a separate dataset.
EEGLAB today (5 lines, one control) This interface creates a simple STUDY and computes its condition grand average ERPs. For each subject, trials for each condition must first be stored in a separate dataset. Create other STUDY using the standard editor.

If you change the wording, three places must change together: pop_studyerp.m, pop_studyerp_counts_dialog_spec and the new test, which checks the two strings literally.

Parity with EEGLAB

  • EEGLAB develop, functions/studyfunc/pop_studyerp.m lines 45 to 61: one text control holding 5 lines, guigeom = { [1] [1] [1 0.3 0.4] [1 0.3 0.4] }, geomvert [1 4 1 1].
  • [GUI] Show the simple ERP STUDY instructions on two rows eeglab#999: two text controls, guigeom = { [1] [1] [1] [1 0.3 0.4] [1 0.3 0.4] }, geomvert removed.
  • This pull request: geometry=((1,), (1,), (1,), (1, 0.3, 0.4), (1, 0.3, 0.4)), the same two strings. The tags cond and subjects and their defaults 1 and 15 are unchanged, so the second dialog reads the same results.
  • The cause is the text of this one window, not the shared layout code, so a change in supergui or inputgui is not called for here (rule 34). No fixed height is added (rule 26) and the column widths are untouched (rule 23).

What the pull request shows

  • The capture is visible in the body, with the four panels: EEGLAB before and after, EEGPrep before and after, on Linux (rule 27). Both lines are complete in both programs.
  • The Word and PDF reports linked in the body exist (GUI-819.docx, GUI-819.pdf).
  • No histogram is needed: the change touches no numbers.
  • One difference remains in the capture: the values in the edit boxes are centred in EEGLAB and left aligned in EEGPrep. It comes from the shared code and is not part of this issue.

Tests

  • Local run on the pull request head a80208b: tests/test_file_menu_audit_673.py, 69 passed, 1 failed. The failure is test_real_testmff_matches_eeglab_epochs, which needs defusedxml, missing in my local environment. It fails the same way on develop and passes in CI. The four studyerp tests pass, the new one included.
  • The new test builds the real Qt dialog and checks that each of the two labels is at least as wide as its text, which catches a clipped line.
  • I ran with the interpreter of the main checkout and PYTHONPATH set to the worktree, since the worktree has no environment of its own.

CI

Other open pull requests

Docs fix

docs/source/user_guide/study_workflows.rst, lines 419 and 420: the sentence about the wizard is added after the closing cross reference, in the "Limitations" section. It is not a limitation. Put it before the code block under "Create a simple ERP STUDY:" (line 48), or remove it, since the help page pop_studyerp.md already says the same.

Two notes on process

— orchestrator review

@arnodelorme
arnodelorme merged commit e062c84 into develop Nov 29, 2026
12 checks passed
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.

pop_studyerp: two rows of text, the same in EEGLAB and EEGPrep

1 participant