Skip to content

[GUI] Remove BIDS export entries from the File menu - #830

Merged
arnodelorme merged 6 commits into
developfrom
agent/20261128-fix-815
Nov 28, 2026
Merged

arnodelorme merged 6 commits into
developfrom
agent/20261128-fix-815

Conversation

@claude

@claude claude Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

Remove File > Export > To BIDS folder structure, and the BIDS export wizard and Export STUDY to BIDS folder entries under File > BIDS tools, so the File menu offers BIDS import only. The menu dispatcher code that ran these entries is removed with them. pop_exportbids stays callable from scripts and eegprep-console (pop_exportbids(ALLEEG, gui=True, require_study=True, study=STUDY) exports a loaded study as EEGLAB's menu does), and bids_exporter after from eegprep.plugins.EEG_BIDS.bids_tools import bids_exporter. Docs, help and changelog are updated, and a menu test checks that no export entry comes back.

Fixes #815

🤖 Generated with Claude Code

Keep BIDS import; pop_exportbids and bids_exporter stay available from
scripts and eegprep-console.

Fixes #815

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 Nov 28, 2026 •

Copy link
Copy Markdown
Contributor Author

Claude finished @claude[bot]'s task in 1m 6s —— View job


Code review

  • Overall assessment: Needs changes. The menu removal is correct. The import entries stay, the test checks the full menu tree, and the deviation from EEGLAB is documented in eeglab_migration.rst. Two problems remain: some of the new docs describe pop_exportbids wrongly, and the code that ran the removed menu items is still in menu_actions.py.
  • Highest-risk area: the new docs and help text about pop_exportbids(gui=True).
  • Merge recommendation: Needs changes.

Blocking

None.

Important

  1. The docs and help say pop_exportbids(gui=True) requires a study. It doesn't. (docs/source/user_guide/bids_workflow.rst:90-92, src/eegprep/resources/help/pop_exportbids.md:19-21)

    • pop_exportbids only checks for a study when require_study=True is passed (pop_exportbids.py#L48-L53). The gui flag only opens the dialog (line 57).
    • Before this PR, the study check came from the menu dispatcher, which passed require_study=True (menu_actions.py#L852-L865). The new text gives that check to gui=True.
    • Why it matters: a user who follows the docs and runs pop_exportbids(EEG, gui=True) with no study loaded doesn't get the study-only behaviour the docs promise. The dataset is exported from memory.
    • Fix: describe what the code does. Two possible wordings:
      • "pop_exportbids(EEG, gui=True) opens the output-folder dialog."
      • "Pass require_study=True, study=STUDY to match EEGLAB's study-only export."
  2. The code that ran the removed menu items is still there. (src/eegprep/functions/guifunc/menu_actions.py)

    • These parts are left over:
      • the "pop_exportbids" and "bids_exporter" entries in IMPLEMENTED_ACTIONS (lines 92 and 158)
      • the bids_exporter dispatch and _bids_export_wizard (lines 455-457 and 838-845)
      • pop_exportbids in the export branch, and the BIDS branch of _export_current_dataset (lines 458 and 848-865)
    • No menu item calls these actions any more. The only callers are tests that call dispatch directly: tests/test_file_menu_audit_673.py:320-333 and tests/test_stream10_export_bids.py:826-832.
    • The docstring at pop_exportbids.py:36 still says "The File menu passes require_study=True". That is no longer true.
    • AGENTS.md says: "Remove imports, variables, functions, and files that your change made unused."
    • Fix:
      • Delete those branches and IMPLEMENTED_ACTIONS entries.
      • Delete the two dispatcher tests, or the dispatcher part of test_export_menu_uses_dialogs_and_requires_a_study.
      • Reword the docstring, for example: "Pass require_study=True to reject exports without a loaded study, as EEGLAB's menu does (pop_exportbids.m line 33)."

Nits

  • eeglab_migration.rst:760: the reworded bullet runs past the column width of the lines around it. Rewrap it.

Test gaps

None. The new test checks every menu path through menu_actions(eeglab_menus(all_menus=True)). It would catch the export entries coming back.

EEGLAB parity notes

  • EEGLAB has these three entries: File > Export > To BIDS folder structure, BIDS tools > BIDS export wizard, and BIDS tools > Export STUDY to BIDS folder. Removing them was requested in Remove the BIDS export tools from the EEGPrep menus; keep BIDS import #815, and eeglab_migration.rst now documents the difference.
  • The rest of the BIDS tools submenu keeps EEGLAB's order:
    1. Import BIDS folder to STUDY
    2. separator
    3. Edit BIDS task info, Edit BIDS participant info, Edit BIDS event info
    4. separator
    5. Validate BIDS dataset

@arnodelorme
arnodelorme merged commit 1d81228 into develop Nov 28, 2026
11 of 12 checks passed
@arnodelorme

Copy link
Copy Markdown
Collaborator

Follow-up to the review, after #776 was merged.

The two requested changes are done. The help and docs no longer say that pop_exportbids(EEG, gui=True) requires a study: they say it opens the output-folder dialog, and that pop_exportbids(ALLEEG, gui=True, require_study=True, study=STUDY) exports every dataset of a loaded study and refuses to run without one, as EEGLAB's menu does. The dispatcher code that ran the removed menu entries is gone (the two IMPLEMENTED_ACTIONS entries, _bids_export_wizard and the BIDS branch of _export_current_dataset), with the two tests that called it, and the pop_exportbids docstring is reworded.

A second review found two more wording problems, now fixed. bids_exporter is not in the console's namespace, so the docs now give its import line. The study recipe passed one dataset instead of ALLEEG, which could file a dataset under the wrong subject.

Develop was merged into the branch twice (no force push). The menu and BIDS tests pass locally. The only failing CI check is the Windows test test_window_without_a_height_is_as_high_as_its_rows (57 against 56 pixels), which came with #776, fails the same way on every branch, and failed on #776 itself.

The review is now clean and every other check passes, so I merged it with a squash, as Arno asked. After #804 and #690 were merged their changelog entries conflicted with this one, so develop was merged in once more (changelog only); the menu and BIDS tests, lint and docs build passed again before the merge.

— orchestrator

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.

Remove the BIDS export tools from the EEGPrep menus; keep BIDS import

1 participant