Skip to content

[GUI] Separate experiment and acquisition fields in BIDS task metadata - #1048

Open
arnodelorme wants to merge 3 commits into
agent/issue-875-file-editoptionsfrom
agent/issue-875-file-taskinfo
Open

arnodelorme wants to merge 3 commits into
agent/issue-875-file-editoptionsfrom
agent/issue-875-file-taskinfo

Conversation

@arnodelorme

@arnodelorme arnodelorme commented Dec 1, 2026 •

Copy link
Copy Markdown
Collaborator

Dataset and task fields now appear beside the acquisition settings. The three narrative fields accept multiple lines and the README starter can be edited before use. Stacked on #1034 (agent/issue-875-file-editoptions).

EEGLAB, EEGPrep before, EEGPrep after

Native geometry and same-input distances

Measurements and verification

Native client dimensions on jamming were 1200.0 × 900.0 px in MATLAB, 588 × 920 before and 1430 × 865 after. EEGLAB uses a fixed 1200 × 900 pixel figure. The content-driven Qt form grew from a single 588-pixel-wide column to a 1430 × 865 pixel two-column layout. Three submitted GUI examples yielded the same dataset name and line frequency (50, 60 and 50 Hz) in both applications. The two focused File/BIDS suites passed 113 tests with 5 deselected. The Qt capture used the guarded checkout on PYTHONPATH.

Closes #1049. Part of #875.

Full inventory report for the project team. pop_taskinfo (p. 15). PDF · Editable Word.

@arnodelorme

Copy link
Copy Markdown
Collaborator Author

🤖 Review before taking this out of draft.

State. The updated parent (#1034, with develop) is merged in (ca36803d7). On the Mac 314 tests pass and jamming passes 307 geometry tests.

What I checked. The task form now has the two columns of EEGLAB (task on the left, acquisition on the right), three multi line boxes and the "Show README template" button.

Findings, none blocking.

  1. fit_width is switched off for five labels chosen by name. It works, but the reason (which label is too long for its column) is not written anywhere.
  2. The README template is a long text inside the dialog code. A packaged resource would be easier to edit.
  3. No recorded EEGLAB case backs this form.

Verdict: ready for review.

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

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


Code review

  • Overall assessment: Needs one change. The two-column layout, the * required markers, the three QTextEdit boxes and the PowerLineFrequency popup all match pop_taskinfo.m, and their values still reach _dialog_metadata correctly. The tagged template pushbutton reads as False and is dropped, so it does not get into etc.bids.task or the history. The remaining problem is the README template text.
  • Highest-risk area: the README text written by Show README template, which ends up in the exported BIDS README.
  • Merge recommendation: needs changes.

Blocking

None.

Important

  • The README template text is not EEGLAB's (bids_tools.py:264, pop_taskinfo_dialog_spec). In EEGLAB, default_readme (EEG-BIDS pop_taskinfo.m L348-354) opens pop_comments(bids_template_README()). That template is the BIDS starter-kit README:

    • a # README heading;
    • a WARNING block saying the template was not updated;
    • sections on data access, the contact person, an overview, methods and so on.

    This PR uses its own five-heading outline instead (# Dataset summary, ## Participants and task, …). An EEGLAB user who accepts the template gets a different exported README, and the "template not updated" warning that reviewers rely on is lost.
    Fix: port bids_template_README.m as a packaged resource, for example src/eegprep/resources/bids_template_README.md. Load it once with importlib.resources and pass it as value. This also covers the author's point 2 about moving the long inline string into a resource. If the different content is intentional, document it in pop_taskinfo.md and the Sphinx docs. (Inline comment posted.)

Nits

  • Three labels are shorter than EEGLAB's. pop_taskinfo.m uses:

    • README (short introduction to the experiment):
    • Participant task description (description of the experiment):
    • Participant instructions (as exact as possible):

    The PR already overrides Name, EEGReference, SoftwareFilters and PowerLineFrequency in the same fields.update(...) call. Adding these three there would finish the label parity. The label list in test_stream10_export_bids.py would need the same update.

Test gaps

  • The new QTextEdit branch in qt._edit_text (qt.py:2283-2285) is untested. If it breaks, the template text gets stored in _VALUE_PROPERTY and never appears in the README box. Suggested test, next to test_bids_task_acquisition_fields_share_the_first_row:
    1. Build pop_taskinfo_dialog_spec().
    2. Patch QInputDialog.getMultiLineText to return ("edited readme", True). This is a GUI I/O boundary, so a patch is acceptable here.
    3. Click widgets["template"].
    4. Assert widgets["README"].toPlainText() == "edited readme".
    5. Accept the dialog and assert that README reaches etc.bids.task.

EEGLAB parity notes

  • Template button position. EEGLAB places it next to the README label. Here it sits in the footer row, beside For several tasks, script using bids_export and * Required field. That is fine, but say so in the PR notes if it is intentional.
  • Template contents. EEGLAB's pop_comments also shows the template rather than the current README text, so the new behavior matches. Accepting it replaces anything already typed in README, as it does in EEGLAB.

Checked: the diff against agent/issue-875-file-editoptions, _dialog_metadata and _task_initial round-trip, how _read_widget handles pushbuttons and QTextEdit, the other edit_text callers (no other QTextEdit targets), and EEG-BIDS pop_taskinfo.m and bids_template_README.m.

I posted this summary here instead of with gh pr comment, because this session cannot write to /tmp.

"target": "README",
"title": "Dataset README",
"label": "Edit the template, then press Ok to use it as the README.",
"value": "# Dataset summary\n\n## Participants and task\n\n## Recording and acquisition\n\n## Data access and contact\n\n## Citation and references\n",

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.

Important (EEGLAB parity): this starter text is not EEGLAB's README template. In pop_taskinfo.m (EEG-BIDS L348-354), default_readme opens pop_comments(bids_template_README()). That template is the BIDS starter-kit README: a # README heading, a WARNING section saying the template was not updated, then sections on data access, contact person, overview, methods and so on. Anyone who accepts this button ends up with a different README in the exported BIDS dataset, and the "template not updated" warning that reviewers rely on is lost.

Suggested fix: port bids_template_README.m to a packaged resource such as src/eegprep/resources/bids_template_README.md. Read it once with importlib.resources into a module constant and pass that constant as value. That also removes the long inline string.

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