Repository navigation
[GUI] Verify both checkouts before capturing dialogs - #889
arnodelorme wants to merge 1 commit into
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 38s —— View job PR review: Verify both checkouts before capturing dialogs
Summary: This is a small tooling change, and the direction is right. Before this PR, the runner only printed how far each checkout was behind develop. Now it refuses to capture from a stale or dirty checkout, or from an EEGPrep imported out of another tree. It's tooling only, so no EEGLAB parity run is needed. What works
Suggestions (non-blocking, details in the inline comments)
Not checked: I couldn't run |
| matlab -nosplash -nodesktop -r "try, addpath('$eeglab/functions/guifunc', '$eeglab/functions/adminfunc', '$eeglab/functions/sigprocfunc', '$eeglab/functions/miscfunc', '$here/matlab'); cases = dir('$here/cases/*.json'); for iCase = 1:length(cases), draw_geometry(fullfile(cases(iCase).folder, cases(iCase).name), fullfile('$out/matlab', cases(iCase).name(1:end-5))); end, catch err, disp(getReport(err)); exit(1); end, exit(0);" | ||
| for casefile in "$here"/cases/*.json; do | ||
| QT_QPA_PLATFORM=xcb PYTHONPATH="$eegprep/src" python "$here/draw_geometry.py" "$casefile" "$out/python/$(basename "$casefile" .json)" | ||
| QT_QPA_PLATFORM=xcb python "$here/draw_geometry.py" "$casefile" "$out/python/$(basename "$casefile" .json)" |
There was a problem hiding this comment.
Dropping the forced PYTHONPATH="$eegprep/src" means each user now has to set it (README step), and check_capture.py only fails afterwards if they forget. The script already knows $eegprep, so it could set it once near the top and the check would then only catch a broken environment:
export PYTHONPATH="$eegprep/src${PYTHONPATH:+:$PYTHONPATH}"That also lets the README drop the PYTHONPATH="$PWD/src" prefix, which points at the wrong place when the command runs from a subdirectory. Keep the is_relative_to check either way. It still catches an editable install from a different checkout that wins on sys.path.
| [*git, "fetch", "--quiet", "origin", "refs/heads/develop:refs/remotes/origin/develop"], check=True | ||
| ) | ||
| if subprocess.check_output( | ||
| [*git, "status", "--porcelain", "--untracked-files=all", "--ignore-submodules=none"] |
There was a problem hiding this comment.
--untracked-files=all --ignore-submodules=none is strict for the EEGLAB checkout. Many local EEGLAB trees have modified plugin submodules or untracked plugin folders, and those do not change the guifunc/adminfunc/sigprocfunc/miscfunc files that draw_geometry.m uses. If that strictness is what you want, fine. If it's too strict, limiting the EEGLAB status check to -- functions would remove false failures without hiding stale GUI code.
Also, when the output folder sits inside the EEGPrep checkout, the first run passes and every later run fails with "uncommitted changes", unless the folder is gitignored. The README mentions this, but the error message doesn't hint at it.
|
🤖 Review (Claude Fable 5.2): ready to merge. The guard was run on jamming in the four situations it is written for, and it does what it says. The earlier automatic review could not run the script. This one did, on jamming, on develop (
The first line is the case that went wrong on November 29, when a script drew from an old copy of the package without a word. It can no longer happen silently. Not blocking, for a later change:
|
Check that both capture checkouts are clean and contain the latest origin/develop before drawing. Verify that Python imported EEGPrep from the requested checkout and record both commits for the report.
Part of #875.