Skip to content

[GUI] Export data and ICA activity with content-sized rows - #912

Open
arnodelorme wants to merge 3 commits into
developfrom
agent/issue-875-file-export
Open

arnodelorme wants to merge 3 commits into
developfrom
agent/issue-875-file-export

Conversation

@arnodelorme

@arnodelorme arnodelorme commented Dec 1, 2026 •

Copy link
Copy Markdown
Collaborator

The pop_export dialog now uses the content-driven layout. On Linux its height changed from 376 to 326 pixels. EEGLAB measured 325.93 pixels. This change stacks on #896 (agent/issue-875-legacy-filter).

MATLAB, EEGPrep before and after

Window height and numerical distances

Cause and verification

The six checkbox rows keep the shared alignment requested in #706. Three text exports of the continuous sample used two, three and four decimal places. The files were read back and compared sample by sample. All three numerical distances were exactly zero. The new public-function regression failed before the change and passed after it. Across the five File changes, 192 focused tests passed on jamming. Both checkouts passed the capture safeguards.

Closes #913. Part of #875.

Full inventory report for the project team. pop_export (p. 19). PDF · Editable Word.

@arnodelorme

Copy link
Copy Markdown
Collaborator Author

🤖 Review before taking this out of draft (first of the File chain, now on develop).

State. Develop is merged in (626bdb2ce), then 431e5188c keeps the aligned columns of #717. On the Mac 298 tests pass (geometry suite and export tests). On jamming (Linux, the reference) the geometry suite passes and the form is as tall as the EEGLAB one within 1 pixel.

What I checked. The form uses the supergui layout with the column shares of #717, so the check boxes and the edit boxes stay on one column. Because those shares differ from EEGLAB on purpose, the test compares the height of the form and not each control (FILE_DIALOG_CALLS in tests/test_gui_geometry.py). test_every_recorded_case_is_compared still fails if a recorded case is compared by no test.

One point for Arno, not blocking. EEGLAB's own pop_export does not align these columns. If the alignment is wanted in both programs (rule 11), EEGLAB needs the same change and then this case can be compared control by control like the others.

Verdict: ready for review.

@arnodelorme
arnodelorme marked this pull request as ready for review December 2, 2026 05:49

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

Copy link
Copy Markdown
Contributor

Claude finished @arnodelorme's task in 1m 10s —— View job


Code review: PR #912

  • Pre-review gate (open, not draft, head 431e518 matches)

  • Read the diff and the AGENTS.md rules for GUI and tests

  • Review passes (AGENTS.md, conventions, correctness, EEGLAB parity)

  • Post review

  • Overall assessment: The change is safe to merge. It changes only the GUI spec: layout="supergui", text "" → spacer, and it drops weighted_columns/size. The export code path and the numbers it writes do not change, so no MATLAB reference run is needed.

  • Highest-risk area: The pop_export dialog spec is checked only by its height, not control by control.

  • Merge recommendation: Safe to merge. The two nits below are optional.

Blocking

None.

Important

None.

Nits

  1. tests/test_gui_geometry.py:86,253-268: test code that never runs. test_public_file_dialog_matches_matlab_height has a name.endswith(".continuous") branch. No FILE_DIALOG_CALLS key ends in .continuous, so the branch never runs. The new SAMPLE constant is used only there, and sample_eeg only wraps samples[0]. AGENTS.md says "Do not add features beyond what was asked. No speculative configurability". Fix: take samples and use samples[0], then remove SAMPLE and sample_eeg. (Inline comment posted.)

Test gaps

None. This intentional deviation is covered in three places:

  • The height check runs on the spec that pop_export(EEG, renderer=...) really opens.
  • test_layout_places_controls_where_matlab_does and test_drawn_dialog_has_matlab_rows_and_aligned_edit_boxes check the EEGLAB record itself, because CASES comes from reference/*.json.
  • test_every_recorded_case_is_compared still covers the new case.

EEGLAB parity notes

  1. src/eegprep/functions/popfunc/pop_export.py:112-116: the different column shares are not recorded in the spec. EEGLAB (cases/pop_export.json) uses rows of [1.7 0.25 0.7 0.6]×6, [3 0.7 0.8 0.6] and [3 2 0.05 0.05]. EEGPrep keeps the [GUI] Align pop_export checkboxes and edit boxes #717 rows: [3 0.7 0.8 0.6]×6 and [3 1.5 0.3 0.3]×2. The only note on this is a comment in the test file. DialogSpec.known_differences exists for exactly this, and it already holds the %.Nf note. Fix: add an entry there, for example: "Checkbox and edit rows share one column grid (#717); pop_export.m:77-99 uses [1.7 0.25 0.7 0.6] for the checkbox rows." This also covers Arno's point: if EEGLAB adopts the alignment, this entry and FILE_DIALOG_CALLS are the two places to remove.

What I checked:

  • The spacer controls follow the convention of 26 other pop_* specs.
  • The new record_geometry.m entry calls pop_export(EEG) on epoched data. This matches the epoched sample used by the Python height test.
  • Removing size=(852, 300) and weighted_columns is consistent with the content-sized supergui layout. No other caller reads them.
  • A docs line was added in interactive_pop_workflows.rst.

I could not run the tests here, because the sandbox blocked uv run pytest. I relied on the passing geometry suite on jamming that the PR reports.

from eegprep.functions.guifunc.qt import QtDialogRenderer

capture = _CancelledDialog()
eeg = pop_loadset(str(SAMPLE.with_name("eeglab_data.set"))) if name.endswith(".continuous") else sample_eeg

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. No FILE_DIALOG_CALLS key ends in .continuous, so this branch never runs. The new SAMPLE constant (line 86) exists only to serve it, and sample_eeg only wraps samples[0]. AGENTS.md asks for no speculative code. I suggest taking samples directly and dropping SAMPLE and sample_eeg. If a continuous File case is added later, add the branch then, as samples[1], the way test_pop_function_opens_the_dialog_eeglab_passes_to_inputgui does.

Suggested change
eeg = pop_loadset(str(SAMPLE.with_name("eeglab_data.set"))) if name.endswith(".continuous") else sample_eeg
eeg = samples[0]

(also change the signature to (name, samples) and remove SAMPLE and the sample_eeg fixture)

This branch has not been deployed

No deployments
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_export window: export data and ICA activity with content-sized rows

1 participant