Skip to content

[GUI] Fit BIDS import to the available tasks, sessions and runs - #991

Open
arnodelorme wants to merge 3 commits into
agent/issue-875-file-loadeegfrom
agent/issue-875-file-importbids
Open

arnodelorme wants to merge 3 commits into
agent/issue-875-file-loadeegfrom
agent/issue-875-file-importbids

Conversation

@arnodelorme

@arnodelorme arnodelorme commented Dec 1, 2026 •

Copy link
Copy Markdown
Collaborator

The BIDS import form now sizes its filter rows from the entities present in the chosen dataset. It uses the shared content-driven layout. Stacked on #965 (agent/issue-875-file-loadeeg).

Format or settings window, MATLAB and EEGPrep before and after

Native height differences and histogram of normalized numerical distances

Measurements and verification

Native client geometry on jamming was 1007.8 × 352.3 px in MATLAB, 1078 × 422 before and 1013 × 352 after. Screenshots use each toolkit’s captured frame. Three imports of BIDS_test toggled event and channel-location sidecars. Each resulting 16 × 15,360 sample array matched exactly at 256 Hz. The reference and EEGPrep used different channel labels with BIDS channel locations enabled. With that option off, the labels matched. The focused File menu run passed 111 tests (five deselected). Both source trees passed the capture safeguards.

Closes #992. Part of #875.

Full inventory report for the project team. pop_importbids (p. 22). PDF · Editable Word.

@arnodelorme

Copy link
Copy Markdown
Collaborator Author

🤖 Review before taking this out of draft.

State. The updated parent (#965) is merged in (bb61592a4). On the Mac 231 tests pass and jamming passes 307 geometry tests.

What I checked. pop_importbids moves to the supergui layout. The fixed window size, the measured width of 1078 pixels and the special list box style sheet all go away, which removes three hand tuned constants. Empty text controls become spacers, as {} in the EEGLAB list.

Small remark, not blocking. The new test compares the height with a number written in the test (352.29, EEGLAB on Linux). A recorded case in tools/gui_geometry would be easier to refresh when EEGLAB changes.

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


Code review

  • Overall assessment: Looks good. Moving pop_importbids to the shared supergui layout removes the fixed size, the 1078 px width and the dialog's own list box style sheet. I found nothing that replaces them incorrectly.
  • Highest-risk area: Dialog geometry. Optional session, run and recording rows now set the window height through geomvert alone.
  • Merge recommendation: Safe to merge.

Blocking

None.

Important

None.

Nits

  • tests/test_stream10_export_bids.py:903: the test expects a height of 352.29, the EEGLAB Linux measurement written in the test. Your own comment already raises this, and I agree. A recorded case under tools/gui_geometry would be easier to update when EEGLAB changes. This doesn't block the merge.

Test gaps

None that block the merge. The new test covers the case with session and run rows, which is the one where the old fixed formula went wrong. The existing test_import_dialog_uses_scanned_popup_and_listboxes still checks which rows appear.

EEGLAB parity notes

None. I checked the following:

  • Row heights: geomvert keeps 1.5 for the list box rows and 0.5 for the spacer rows, so pop_importbids.m row heights survive the move to supergui. The supergui path in qt.py reads them.
  • Spacers: ControlSpec("spacer") is how supergui shows {} entries from EEGLAB lists. It is left out of the width, which matches supergui.m. That makes it more faithful than the old ("text", "").
  • Disabled list boxes: the base style sheet in qt.py:1016-1019 already gives a disabled QListWidget the EEGLAB disabled colours. Deleting _LISTBOX_STYLESHEET therefore loses no styling, and the old fixed 38 px list box height correctly goes away because supergui sizes each control's rectangle.
  • Unused import: the theme import that is no longer used was removed.
  • Docs: the new line in interactive_pop_workflows.rst describes the behaviour users will see.
  • Import options: _import_dialog still reads the same tags, so the options passed to the import are unchanged.

Not done

Running ruff or pytest needed approval in this runner, so I didn't run either. The ruff rules in pyproject.toml don't include isort, so placing import sys before import shutil won't fail lint.

Checked for correctness bugs, EEGLAB parity, data structure compatibility, tests for the changed behaviour, and AGENTS.md compliance. I reviewed head bb61592.

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.

1 participant