Skip to content

[GUI] Lay out the pop_jointprob dialog with supergui - #919

Closed
claude[bot] wants to merge 4 commits into
developfrom
agent/20261201-fix-907
Closed

claude[bot] wants to merge 4 commits into
developfrom
agent/20261201-fix-907

Conversation

@claude

@claude claude Bot commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

The joint probability dialog had a fixed 600x320 size, which spread its rows and pushed the buttons down. It now uses the supergui layout with the geometry and controls of pop_jointprob.m. The geometry test gains a pop_jointprob case; its MATLAB pixel reference still has to be recorded on jamming.

Fixes #907

Drop the fixed 600x320 size so supergui sizes the figure from EEGLAB's
geometry, and pass ' ' to both checkboxes as pop_jointprob.m does.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

@claude claude Bot left a comment

Copy link
Copy Markdown
Contributor Author

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 Dec 1, 2026 •

Copy link
Copy Markdown
Contributor Author

Claude finished @claude[bot]'s task in 56s —— View job


Code review

  • Overall assessment: needs changes. The dialog spec change is correct. The test plumbing hides missing MATLAB references, and one line fails the formatting check.
  • Highest-risk area: tests/test_gui_geometry.py, where the new MEASURED filter decides which cases get the pixel tests.
  • Merge recommendation: needs changes

Blocking

None.

Important

  • tests/test_gui_geometry.py:61: MEASURED hides missing references. The filter silently drops any case that has no reference/<name>.json, from both test_layout_places_controls_where_matlab_does and test_drawn_dialog_has_matlab_rows_and_aligned_edit_boxes. Until this PR, all 14 cases had a reference and a missing file failed loudly. Now, if a reference is deleted or a future case lands without one, both tests stop running for it with no trace. AGENTS.md says "preserve skip behavior instead of weakening assertions". Fix: keep CASES in both parametrizations and mark only pop_jointprob as xfail(strict=True, raises=FileNotFoundError). Or record the reference on jamming before merging and drop the filter.

Nits

  • src/eegprep/functions/popfunc/pop_jointprob.py:105: missing space in +((1, 0.22, 0.85),). CI's ruff format --check . will fail on it. I left a one-line suggestion inline.

Test gaps

  • pop_jointprob has no MATLAB pixel reference yet (the PR body says so). So the only check of the new layout is test_pop_dialog_has_the_geometry_eeglab_passes_to_inputgui, which compares the spec with the case file. The case file isn't output from record_geometry.m either: per the PR body, MATLAB hasn't been run for this case. If it was typed by hand, that test only proves the spec matches a hand-written file. Please regenerate cases/pop_jointprob.json and reference/pop_jointprob.json with record_geometry.m before merging, so both sides of the comparison come from EEGLAB.

EEGLAB parity notes

  • The geometry, the order of the 19 controls, the popup default (EEGPLOT, value 2) and the checkbox defaults (1 and 0) all agree with the case file. Adding " " as the checkbox string matches {'style' 'checkbox' 'string' ' ' ...} in pop_jointprob.m, and the _described comparison needs it. Python tags (elecrange/superpose/reject) differ from EEGLAB's (cpnum/rejmarks/rejtrials). Nothing outside _run_gui reads them and the test doesn't compare tags, so this is fine.
  • Not verified:
    • I couldn't compare against pop_jointprob.m directly because the vendored EEGLAB checkout isn't in this CI workspace.
    • I couldn't run pytest/ruff because those commands aren't allowed in this job.

The PR doesn't change any numerical code, so it doesn't need the EEGLAB MATLAB reference run.

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

Comment thread tests/test_gui_geometry.py Outdated
}
CASES = sorted(POP_DIALOGS)
# Cases whose pixel positions MATLAB has measured (matlab/draw_geometry.m).
MEASURED = [name for name in CASES if (GEOMETRY / "reference" / f"{name}.json").exists()]

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Important (test gap / weakened assertion). MEASURED drops any case whose reference/<name>.json is missing, and it does this silently. It covers every case, not just pop_jointprob. Until this PR, all 14 cases had a reference, so a missing file failed loudly in _reference(name). Now a future case added without its MATLAB measurement, or a reference file deleted by accident, takes the pixel-position test and the drawn-dialog test out of the run without a trace. That runs against AGENTS.md: "preserve skip behavior instead of weakening assertions".

See

CASES = sorted(POP_DIALOGS)
# Cases whose pixel positions MATLAB has measured (matlab/draw_geometry.m).
MEASURED = [name for name in CASES if (GEOMETRY / "reference" / f"{name}.json").exists()]
# uilist entries whose first value EEGPrep shows on purpose although EEGLAB leaves it empty:

Suggested fix: keep CASES in both parametrizations and mark only the known gap, so it shows up in the test report and fails strictly once the reference lands:

UNMEASURED = {"pop_jointprob"}  # reference not yet recorded with record_geometry.m (#907)
MEASURED_CASES = [
    pytest.param(name, marks=pytest.mark.xfail(strict=True, raises=FileNotFoundError, reason="MATLAB reference not recorded"))
    if name in UNMEASURED else name
    for name in CASES
]

Another option is to record reference/pop_jointprob.json before merging, and then this filter isn't needed at all.

size=(600, 320),
geometry=((1, 0.1, 0.75),) * 3 + ((1, 0.26, 0.9),) + (1,) + ((1, 0.22, 0.85),) * 2,
layout="supergui",
geometry=((1, 0.1, 0.75),) * 3 + ((1, 0.26, 0.9),) + ((1,),) +((1, 0.22, 0.85),) * 2,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Nit. There's a space missing after + (((1,),) +((1, 0.22, 0.85),)). CI's ruff format --check . will reject this line.

Suggested change
geometry=((1, 0.1, 0.75),) * 3 + ((1, 0.26, 0.9),) + ((1,),) +((1, 0.22, 0.85),) * 2,
geometry=((1, 0.1, 0.75),) * 3 + ((1, 0.26, 0.9),) + ((1,),) + ((1, 0.22, 0.85),) * 2,

github-actions Bot and others added 3 commits December 1, 2026 00:54
Co-Authored-By: Claude Opus 5.5 <[email protected]>
# Conflicts:
#	docs/source/api/interactive_pop_workflows.rst
#	tests/test_gui_geometry.py
#	tools/gui_geometry/cases/pop_jointprob.json
@arnodelorme

Copy link
Copy Markdown
Collaborator

🤖 Second round on the review above: after merging develop, nothing remains of this pull request (commit 2486b4ca, 0 files changed against develop).

  • Develop already has the pop_jointprob dialog on the supergui layout with the case and the MATLAB reference recorded on jamming (commit 542f7990, merged on November 30 with the rejection dialogs).
  • The MEASURED filter the review objected to is removed: both pixel tests run on every case again, exactly as on develop.
  • The hand-written case file is replaced by develop's recorded one.

This pull request can be closed as superseded. It is left open for Arno to decide.

@arnodelorme

Copy link
Copy Markdown
Collaborator

Closed at Arno's request (email of December 1, 2026): this branch has no change left against develop. — orchestrator

@arnodelorme arnodelorme closed this Dec 1, 2026
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.

[GUI] Match the pop_jointprob dialog to EEGLAB

1 participant