Repository navigation
[GUI] Match ten dialog functions against recorded EEGLAB calls - #886
Conversation
|
Arno chose option (a) on November 29, 2026: the CTF search grid is converted using the head model's declared unit inside this pull request, with tests for millimeter and centimeter head models, dialog submission and history replay. The instruction was sent to the Codex Astra session that owns this pull request. — orchestrator |
There was a problem hiding this comment.
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 finished @arnodelorme's task in 1m 43s —— View job Code review
BlockingNone. Important
Nits
Test gapsNone. The parametrized mm/cm test covers dialog submission and history replay on a known source. EEGLAB parity notes
I could not open the EEGLAB |
|
🤖 The ten dialogs passed the visual comparison on jamming in all 20 cases. The largest row offset was 0.69 pixel. The report includes the captures, the distance histogram and the CTF results before and after the fix. PR 886 now converts the displayed CTF coordinates using the head model’s declared unit. Entering (1, −2, 4) cm recovered (10, −20, 40) mm in both the dialog and its replayed history for millimeter and centimeter models. Before the fix, the millimeter model missed the source by 41.24 mm. All 107 targeted tests passed. The broader Linux run passed 3,575 tests with 32 skips. PR 885 now targets develop and includes Arno’s merged PR 884. The Windows run passed all 14 tests in the event editor file, including the long-field-name regression for issue 859. At the report cutoff, 22:48 UTC, PR 885 had six successful checks, one skip and five pending. PR 886 had six successful checks, four skips and six pending. Both PRs are open for Arno’s review. The remaining dialogs need migration and comparison by menu. The next batch covers the FIR filter dialogs. |
|
🤖 All 99 inventory functions have native MATLAB and Qt captures on jamming. The report contains the 41 previously different dialogs, 40 previously uncompared entries, and 18 earlier matches. Of 307 paired output checks, 289 met tolerance and 18 exceeded it across nine functions. Five other cases could not be scored: two ICLabel network variants, MRI segmentation, eLORETA, and one component spectrum whose array dimensions differ. Of 152 geometry comparisons, 146 passed. The six remaining differences are the three BIDS editors, BioSig, EGI, and the multiline input dialog. Two accepted reader-specific workflows have captures but no comparable geometry measure. Each function page links its issue and PR and names the required branch base. The newest File changes are #1054 (base #1052) and #1056 (base #1034). The stacked PRs are ready for your review. GitHub only runs the full Tests workflow on its configured base branches; the report distinguishes the jamming checks. PR #885 targets develop, and its Windows job passed all 14 event-editor tests, including #859. Project tracker files for the team: full PDF, editable Word, base branch of every linked PR, and measured distances. The project tracker requires access. Individual function captures are public on the linked PRs. |
# Conflicts: # docs/source/api/interactive_pop_workflows.rst # tests/test_gui_geometry.py # tools/gui_geometry/draw_geometry.py # tools/gui_geometry/matlab/record_geometry.m
arnodelorme
left a comment
There was a problem hiding this comment.
This review was written by an AI assistant during a nightly check, not by Arno.
Code review
- Overall assessment: Looks good.
- Highest-risk area: CTF centimeter to head model unit conversion in
src/eegprep/plugins/dipfit/pop_dipfit_gridsearch.pyandsrc/eegprep/plugins/dipfit/ft_dipolefitting.py. - Merge recommendation: Safe to merge after human approval of the core
dipfitchange perAGENTS.md.
Blocking
None.
Important
None.
Nits
None.
Test gaps
None.
EEGLAB parity notes
- CTF dialog unit conversion (
pop_dipfit_gridsearch.py,ft_dipolefitting.py): On dialog submission withcoordformat == 'CTF'or MEG channels, EEGPrep converts the centimeter grid into the head model's declaredunit(mm,cm,m,dm, orum), whereas EEGLAB (pop_dipfit_gridsearch.m, lines 79 to 110) evaluates the centimeterlinspaceexpression directly without scaling tovol.unit. Explicit command arguments and recorded history remain in head model coordinates, matching EEGLAB. This intentional deviation for millimeter head models is documented inpop_dipfit_gridsearch.md,interactive_pop_workflows.rst, andchangelog.rst, and covered bytest_ctf_grid_dialog_and_history_locate_the_same_source. The PR description includes the pinned MATLAB reference run required byAGENTS.md. - Dialog specifications (
pop_eegthresh.py,pop_plottopo.py,pop_iclabel.py,draw_geometry.py): Checked againstpop_eegthresh.m(lines 113 to 142),pop_plottopo.m(lines 64 to 76), andpop_iclabel.m(lines 35 to 43). The ICA threshold prompts preserve EEGLAB's examples and spacing, unnamed datasets openpop_plottopowith an empty title field while plotting still falls back to'Channel ERPs'when left blank,pop_iclabelrestores the version popup tooltip (with EEGLAB'srepoducibilitytypo corrected), anddraw_geometry.pypreserves dotted variant suffixes when saving.pngand.jsonoutputs.
Tests and checks run locally on commit 4be45a013690150cb0bb5a5357e1ba326b45664a (detached worktree):
.venv-arm/bin/python -m pytest tests/test_gui_geometry.py tests/test_dipfit_workflows.py -q: 199 passed, 67 skipped (Linux reference position checks skipped on macOS). Note: running the same command under the older Python 3.11.venvwithoutonnxruntimefailed only ontest_pop_function_opens_the_dialog_eeglab_passes_to_inputgui[pop_iclabel]becausepop_iclabelchecksonnxruntime(included in thedevdependency group) before opening its dialog.EEGPREP_SKIP_MATLAB=1 .venv-arm/bin/python -m pytest tests/test_iclabel.py tests/test_console_workspace.py -k "not test_installed_wheels_open_both_sample_recordings_from_eegprep_sample_data" -q: 139 passed, 3 skipped..venv-arm/bin/python pre-commit.py --changed-from origin/develop,ruff check,ruff format --check, andty checkon the modified Python files: passed with zero diagnostics on changed files.
Checked for correctness bugs, EEGLAB parity, data structure compatibility, tests for changed behavior, and CLAUDE.md/AGENTS.md compliance.
# Conflicts: # tests/test_gui_geometry.py
The ten public functions now open dialogs that match the recorded EEGLAB controls across 20 sample cases. The CTF grid converts centimeters to the head model’s declared unit. Both dialog submission and console history recovered the same known source with millimeter and centimeter models.
ICA threshold examples
Unnamed dataset
CTF grid shown to the user
Fitted source before and after the CTF conversion
Row distance for all 20 cases
All 20 cases passed the five visual checks. Maximum vertical offset was 0.69 pixel. For the millimeter model, position error fell from 41.24 mm to zero and residual variance from 11.08% to below 10⁻²⁷%. The centimeter model retained zero position error.
Controls and captures
The regression tests invoke the ten public functions on matched inputs. They compare rows, column shares, labels, defaults, hidden controls and help buttons. The captures show the ICA threshold labels, the empty title for an unnamed ERP dataset and the CTF grid. ICLabel also restores its version tooltip. Native toolkit button shapes and colors differ.
The three-panel images show EEGLAB, EEGPrep before the layout changes at
cea86f8f, and EEGPrep at94398341. The fit table measures submission and history on the same physical source before the numerical fix at2dc218efand after at94398341. Numeric command arguments use the head model’s unit.Verification on jamming
EEGLAB
5e0be87059098662dc9b50fb378f9002b0ef173a, EEGPrep94398341344bf51f3711b4ba88a3cc717c1c2627. Both checkouts contained the current develop history. Python imported EEGPrep from the final checkout’ssrc. All 107 tests intests/test_gui_geometry.pyandtests/test_dipfit_workflows.pypassed. The millimeter regression failed on the previous implementation. The broader Linux run passed 3,575 tests with 32 skips, 1,072 deselections and 412 passing subtests in 239 s.Pinned MATLAB reference suite, final result. On jamming (Linux, MATLAB R2025b Update 7, Python 3.12.13), the whole suite ran on this branch at
94398341against EEGLABd0963be9d81acc5b66e84f8d3d7c89e3ce127cc4and eeglab_testsfec88f9ffe7c225eb1de8924db8b6a3e0d53a4d9: 4,680 passed, 4 failed, 59 skipped, 481 subtests passed, in 3,095.93 seconds (51 minutes 35 seconds). None of the four failures touches the dialogs or the CTF grid of this pull request. Each one comes from the setup of that run.test_bids_preproc.py::TestBidsPreproc::test_end2endand::test_crashability_slowdatafolder inside the checkout. The folder was not there when the run began (it was added 11 minutes later).FileNotFoundErroronreference-checkout/datain the log. Not rerun: the second one is the slow stress test over whole studies.test_bids_load_frombids_helpers.py::test_openneuro_edf_import_matches_matlab_pop_importbids--eeglab-support-path): 1 passed in 6.48 s.test_fuzz_harness.py::test_replay_20261015_fuzz_mismatches~/eeg_options.mon jamming at that moment of the run (a later test created it).Exact command of the full run
Log and JUnit file:
$D/full-reference.logand$D/full-reference.xml. The reruns:$D/precision-retry.logand$D/fuzz-retry.log(script$D/fuzz-retry.sh).Part of #875.
EEGLAB reference run (December 1, 2026)
Workflow
EEGLAB reference(.github/workflows/eeglab-reference.yml, real MATLAB backend) on commit41cbe141, the head after merging develop: https://github.com/sccn/eegprep/actions/runs/46603716218EEGLAB
d0963be9, eeglab_testsfec88f9f. Runtime 1 hour 25 minutes, most of it waiting in the queue.The four failures are on develop and not from this pull request. Two are
tests/test_stream11_datasets.py::test_f42_merge_opens_newset_and_cancel_preserves_datasets(failing since #904 gave thepop_mergesetdialog an empty title). Two are thepop_newtimefcases oftests/test_gui_geometry.py::test_drawn_dialog_has_matlab_rows_and_aligned_edit_boxes, which fail on GitHub's Ubuntu runner since #994 (repair in #1059). Develop's own Tests run shows the same four: https://github.com/sccn/eegprep/actions/runs/46606001709Deliberate difference with EEGLAB. A CTF grid submitted in the dialog is converted to the head model's declared unit (Arno's choice of November 29). For a millimetre head model EEGLAB passes the centimetre grid unchanged. The help page documents it and
test_ctf_grid_dialog_and_history_locate_the_same_sourcelocks it.