You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
pop_saveh (File > History scripts > Save dataset or session history script): graphical and numerical parity with EEGLAB #785
EEGPrep checks each EEGLAB function on its own, in one issue, for both the window and the numbers (Arno, November 26, 2026). This issue is pop_saveh, File menu: History scripts > Save dataset or session history script. It stays open until the window and the numbers are both acceptably close to EEGLAB's, even when a pull request is merged or closed.
Window: The save dialog offers .m and .py for both dataset and session history.
Numbers: Both files contain MATLAB syntax. Saving session history records EEG.history as the source. EEGLAB uses ALLCOM for the session and EEG.history for the dataset.
What remains: Pass the selected source to the writer before converting it to text. Preserve command order, emit the selected language and append the session redraw only for session history.
Repro on develop (aa81d9ab): Start an empty session, load one tutorial file and save its session history with each suffix. Inspect the recorded save command and the first line of the .py file. Repeat with Save dataset history script.
Done when: All four files identify the right source. Replay session histories in empty workspaces and dataset histories with the starting EEG. Check the samples, dataset selection and operation order. The .py files must parse as Python.
Reproduce: GUI session save records pop_saveh(EEG.history, ...); .py files contain MATLAB syntax
menu_actions._save_history passes the ALLCOM list (session) or EEG.history (dataset) unchanged
pop_saveh writes Python for .py via the console converter (_console_python_command); eegprep.eeglab() redraw only for session history; session .py starts from an empty workspace
pop_loadset(filename=..., filepath=...) accepted, so the GUI-recorded load command replays after translation
Regression test: both suffixes x both sources, recorded source, command order, .py parses, session replays from an empty workspace and dataset replays from the starting EEG with matching data and channel selection
What the pull request did. Saving the session history now writes the commands of ALLCOM, and saving the dataset history writes EEG.history. A .py file holds Python, and a .m file is written exactly as EEGLAB writes it. A session .py file ends with a redraw line that shows the datasets the script loaded in the window that is open.
One difference from EEGLAB, which Arno asked for ("Do not empty ALLCOM"). After running a saved session file, EEGLAB ends with an empty ALLCOM (MATLAB R2025b, on a real session). EEGPrep keeps the commands of the session. This concerns the history list only, no dataset and no number differ.
A MATLAB transpose in a history line is kept as written in the .py file and is not translated to NumPy. A comment of one word with no semicolon before it (x = 1 % note) is also valid Python and stays as it is.
Arno's look at the window and at the saved files, to decide whether this function is done.
Activity
Save session history from ALLCOM and write Python for .py history scr…
claude commentedon Nov 28, 2026
🤖 Plan:
pop_saveh(EEG.history, ...);.pyfiles contain MATLAB syntaxmenu_actions._save_historypasses theALLCOMlist (session) orEEG.history(dataset) unchangedpop_savehwrites Python for.pyvia the console converter (_console_python_command);eegprep.eeglab()redraw only for session history; session.pystarts from an empty workspacepop_loadset(filename=..., filepath=...)accepted, so the GUI-recorded load command replays after translation.pyparses, session replays from an empty workspace and dataset replays from the starting EEG with matching data and channel selectionRoot cause:
menu_actions.pyL1105-L1112 joinedALLCOMinto one string, sopop_saveh.pyL40 saw astrand recordedEEG.history.pop_savehignored the suffix.[History] Save session history from ALLCOM
arnodelorme commentedon Nov 29, 2026
🤖 Pull request [History] Save session history from ALLCOM and write Python for .py scripts is merged into develop, at Arno's request. This issue stays open, by its own rule, until Arno finds the window and the numbers close enough to EEGLAB's.
What the pull request did. Saving the session history now writes the commands of
ALLCOM, and saving the dataset history writesEEG.history. A.pyfile holds Python, and a.mfile is written exactly as EEGLAB writes it. A session.pyfile ends with a redraw line that shows the datasets the script loaded in the window that is open.One difference from EEGLAB, which Arno asked for ("Do not empty ALLCOM"). After running a saved session file, EEGLAB ends with an empty
ALLCOM(MATLAB R2025b, on a real session). EEGPrep keeps the commands of the session. This concerns the history list only, no dataset and no number differ.What is left.
.pyfile and is not translated to NumPy. A comment of one word with no semicolon before it (x = 1 % note) is also valid Python and stays as it is.— orchestrator