Repository navigation
[GUI] Remove options with no meaning in Python from Preferences - #719
Conversation
There was a problem hiding this comment.
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 finished @arnodelorme's task in 1m 2s —— View job Code review
Blocking
ImportantContradicting docs in NitsNone. Test gaps
EEGLAB parity notesDropping these controls is an EEGPrep decision Arno made in #709, and
Checked for correctness bugs, EEGLAB parity, data structure compatibility, changed-behavior tests, and CLAUDE.md/AGENTS.md compliance. I posted two inline comments. |
| - ``option_savetwofiles``: EEGPrep saves a dataset in one file. | ||
| - ``option_saveasstruct``: dataset fields are always saved as individual | ||
| variables (the EEGLAB 2021 format), with no switch to undo it. | ||
| - ``option_parallel``: it drives MATLAB's parallel toolbox. | ||
| - ``option_memmapdata``: memory-mapped arrays are not a preference in Python. |
There was a problem hiding this comment.
Blocking: these two reasons are wrong. Both options still change runtime behavior:
option_savetwofilesmakespop_savesetwrite.set+.fdtby default (storage.py#L829-L832, used at pop_saveset.py#L776-L778).option_memmapdatamakespop_loadsetmemory-map.fdtdata (pop_loadset.py#L191-L193).
This is also a regression for users. If someone turned on two-file saving before this PR, options.json still has option_savetwofiles=1 and load_eegprep_options restores it. Every later save then writes two files, and the GUI no longer has a control to turn that off.
Pick one of these fixes:
- Do what pop_editoptions (Preferences): remove the options with no meaning in Python and say why in the header #709 asks ("Python should only save the data in one file"): make
pop_savesetstop readingoption_savetwofilesand makepop_loadsetstop readingoption_memmapdata. Explicitsavemode="twofiles"andmemmap=would still work. Then updatestorage.rst,configuration.rst(lines 19, 29, 47-52, 236-238), andtests/test_storage.py::test_option_savetwofiles_defaults_to_sidecar_storage. That changespop_saveset/pop_loadset, so check whether this counts as a core change. - Or keep the runtime behavior and change the reasons here, in
pop_editoptions.md, and inconfiguration.rstto say these are script-only options that still work throughEEG_OPTIONS.
| Preferences leaves out the EEGLAB options that have no meaning in Python: | ||
| two-file saving (EEGPrep saves a dataset in one file), the switch for saving | ||
| fields as individual variables (always on), the parallel toolbox, memory-mapped | ||
| arrays, single precision, the EEG object, RMS scaling of ICA activities (always | ||
| on), Show advanced options, plugins pending approval, and HTML in graphics. | ||
| Their keys stay in ``EEG_OPTIONS`` with their defaults, so EEGLAB scripts and | ||
| saved option files still load. |
There was a problem hiding this comment.
Important: this paragraph contradicts the same page. The "Common Global Options" table (L47-L52) and L236-L238 still say option_savetwofiles and option_memmapdata change how pop_saveset and pop_loadset behave, and they do. storage.rst says the same. Make all of these pages agree with whichever fix you choose for the blocking comment on pop_editoptions.py.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
The review bot found that two options removed from the Preferences window, two-file saving and memory-mapped loading, were still read by pop_saveset and pop_loadset, so an old options.json with two-file saving turned on would keep writing a .set and a .fdt with no way to switch it off. Following Arno's words in #709 ("Python should only save the data in one file. So no more two-file options ... Memory map array is irrelevant"), commit 0775cd1 makes pop_saveset stop reading option_savetwofiles and pop_loadset stop reading option_memmapdata. Asking explicitly still works: savemode="twofiles" writes a .fdt sidecar and memmap=True maps it, and a dataset loaded from a .set and .fdt pair still keeps its two files when saved again. The header of pop_editoptions, its help page, the pop_saveset and pop_loadset help, configuration.rst, storage.rst, advanced_topics.rst and the changelog now say the same thing. The old test is replaced by one that turns both options on and checks that only one .set file is written. Tests: 149 passed and 2 skipped in test_storage, test_stream11_preferences, test_file_menu_audit_673, test_mmo_eeglab_tests and the pop_saveset and pop_loadset tests; the one failure (test_real_testmff_matches_eeglab_epochs) also fails before this change because the local environment lacks defusedxml. This touches core file input and output, so the EEGLAB reference run is needed before merging; it was started on this branch: https://github.com/sccn/eegprep/actions/runs/45951295256 — orchestrator |

File > Preferences no longer shows two-file saving, the save-as-fields switch, the parallel toolbox, memory-mapped arrays, single precision, the EEG object, RMS scaling, Show advanced options, pending plugins, and HTML in graphics. The header of pop_editoptions says why for each. Their keys and defaults stay in EEG_OPTIONS. The list now sits on the EEGLAB blue background, as in every scrolling dialog, and the note on the greyed options is reworded.
Fixes #709
Part of #741