Skip to content

Fetch ds003194 for the EEGLAB reference workflow - #639

Merged
suraj-ranganath merged 1 commit into
developfrom
cursor/fetch-ds003194-reference-de72
Nov 18, 2026
Merged

suraj-ranganath merged 1 commit into
developfrom
cursor/fetch-ds003194-reference-de72

Conversation

@suraj-ranganath

Copy link
Copy Markdown
Member

Cache OpenNeuro ds003194 snapshot 1.0.3 in the EEGLAB reference workflow and download it on a cache miss into openneuro/ds003194. The core shard's pop_importbids comparison fails when those files are absent, and the eeglab_tests checkout that supplies ds003061 does not contain this dataset.

Fixes #638

Open in Web Open in Cursor 

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

Copy link
Copy Markdown
Contributor

Claude finished @suraj-ranganath's task in 48s —— View job


Code review

  • Overall assessment: Looks correct. I found one small problem (nit) and nothing blocking. I checked these:
    • The fetch path openneuro/ds003194 at the repo root matches _ds003194_root() in tests/test_bids_load_frombids_helpers.py:649-656.
    • The six downloaded files match _DS003194_FILES at lines 639-646.
    • The heredoc is still terminated correctly after YAML strips the indentation from the run: | block.
    • set -euo pipefail and curl -f make a failed download stop the step, and every file's checksum is checked.
    • The .gitignore entry /openneuro/ applies only to the repo root.
  • Highest-risk area: the new fetch step runs on every shard, not just the one that needs it.
  • Merge recommendation: Safe to merge.

Blocking

None.

Important

None.

Nits

  • .github/workflows/eeglab-reference.yml:131-168: when the cache is cold, all 7 shards download ds003194, but only core runs test_openneuro_edf_import_matches_matlab_pop_importbids. A temporary S3 failure would also fail 6 shards that never read these files. To fix it, limit the restore and fetch steps to matrix.shard == 'core' and save the cache from core. Details are in the inline comment. Fix this →
  • The S3 URL always points to the dataset's latest files, not a fixed snapshot. The cache key and comment say 1.0.3, but nothing in the download pins that version. The checksums mean a newer OpenNeuro release fails loudly instead of silently changing the data, so this is acceptable. I'm noting it only so a future checksum failure is easy to recognise.

Test gaps

None. This changes CI only, so AGENTS.md doesn't require the MATLAB reference run. One workflow_dispatch run of eeglab-reference.yml on this branch would still confirm that the core shard now passes test_openneuro_edf_import_matches_matlab_pop_importbids, and add evidence to the PR that it fixes #638.

EEGLAB parity notes

None. This PR doesn't change any EEGPrep code.

key: openneuro-ds003194-1.0.3-nepo01

- name: Fetch ds003194
if: steps.ds003194-cache.outputs.cache-hit != 'true'

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.

Nit: Only the core shard reads ds003194. tests/test_bids_load_frombids_helpers.py isn't in any named shard list, so it only runs in core. With this condition, all 7 shards download the dataset when the cache is cold. A single S3 failure or checksum mismatch would then also fail heavy, stats, study, misc, hybrid and parity, which never use these files.

# OpenNeuro import comparison reads snapshot 1.0.3 from openneuro/ds003194.
- name: Restore ds003194 cache
id: ds003194-cache
uses: actions/cache/restore@v4
with:
path: openneuro/ds003194
key: openneuro-ds003194-1.0.3-nepo01
- name: Fetch ds003194
if: steps.ds003194-cache.outputs.cache-hit != 'true'
shell: bash
run: |
set -euo pipefail
root="openneuro/ds003194"
base="https://s3.amazonaws.com/openneuro.org/ds003194"
rm -rf "$root"
while read -r name expect; do
mkdir -p "$root/$(dirname "$name")"
curl -fsSL --retry 3 --retry-delay 2 -o "$root/$name" "$base/$name"
actual=$(md5sum "$root/$name" | awk '{print $1}')
if [[ "$actual" != "$expect" ]]; then
echo "::error title=ds003194 checksum::$name is $actual, expected $expect"
exit 1
fi
done <<'EOF'
dataset_description.json d6c9c445496b24e7076212a411576642
participants.tsv 16a17f7dfb39a7ae04d252625d507999
sub-NEPO01/ses-Nepopre/eeg/sub-NEPO01_ses-Nepopre_task-taskprenepo_eeg.edf bc0195c10cb4cd4e0060da2aa038a540
sub-NEPO01/ses-Nepopre/eeg/sub-NEPO01_ses-Nepopre_task-taskprenepo_eeg.json c98296e820b362c11aefc675f7f4655d
sub-NEPO01/ses-Nepopre/eeg/sub-NEPO01_ses-Nepopre_task-taskprenepo_channels.tsv f42d3d659f616806327448396e9f126d
sub-NEPO01/ses-Nepopre/eeg/sub-NEPO01_ses-Nepopre_task-taskprenepo_events.tsv 615c998fd0a5379290590210248aab43
EOF
- name: Save ds003194 cache
if: steps.ds003194-cache.outputs.cache-hit != 'true' && matrix.shard == 'heavy'
uses: actions/cache/save@v4
with:
path: openneuro/ds003194
key: openneuro-ds003194-1.0.3-nepo01

Suggested fix: add matrix.shard == 'core' to the restore and fetch steps, and save the cache from core instead of heavy. The heavy pattern makes sense for eeglab_tests because every shard needs it, but that isn't the case here.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed that only the core shard runs test_openneuro_edf_import_matches_matlab_pop_importbids, since that file is outside the named shard lists. On a cache miss the current steps still give core the files, and the checksums match the live OpenNeuro 1.0.3 objects. After a successful save from heavy, later runs just restore. Gating restore and fetch to core, and saving from core, is a reasonable follow-up, but it is not required for this fix.

@suraj-ranganath
suraj-ranganath merged commit 0bfdda9 into develop Nov 18, 2026
26 of 27 checks passed
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.

EEGLAB reference workflow does not fetch OpenNeuro ds003194

2 participants