Repository navigation
Add large-recording motor datasets: NeBULA2025, MIND, MOVING and Thapa - #1195
Merged
bruAristimunha merged 23 commits intoOct 4, 2026
Merged
Conversation
…>72.8%) Per-file coverage unchanged: garro2025 71%, mind2026 88%, moving2024 61%, thapa2025 71%. - Merge MIND/Thapa transport force=False/True params into single cached-then-forced sequences. - Merge the two complete-run MIND2026 TSV tests; drop the interval attribute restatement. - Deparametrise the overfull-without-restart fail-closed test (shared validator). - Fold the private _target_from_description probe into the events.tsv boundary test. - Drop reader call-shape asserts from the stale BrainVision header test.
- Garro2025: compact subject file-id table (values unchanged), BIDSPath list comprehension, shorter docstrings. - MIND2026/Thapa2025: module docstrings reduced to one line (references stay in the class docstring); MIND restart guard: one count formatter and one half-order check; Thapa events.tsv reader collapsed to one parse with a single fail-closed ValueError (same accepted rows and error type), run counter replaced by dict length, channel typing in one dict. - MOVING2024: channel list as one split string; Parameters boilerplate removed. - Tests: MIND and Thapa regression files merged into test_large_motor_regression.py; the two MIND fail-closed cases table-driven. Behaviour: loader fingerprint (Thapa events/assembly, MIND 9 event-stream scenarios incl. error types, MOVING both modes, Garro run keys/renames) and METADATA/summary/DOI fingerprint identical.
The balanced, subject-4 (sidecar restart) and subject-19 (marker restart) cases share one assertion: exact labels and onsets of the final 40 MI events. Fail-closed cases unchanged.
- resolve_montage_name (moabb.datasets._montage, re-exported by utils): MNE 1.13 renamed standard_1005/1020 (and the other standard_* templates) to colin27_*, warns on the old names and 1.14 removes them. Returns the spelling the installed MNE knows; electrode files are byte-identical (dig positions checked equal on MNE 1.10.2, 1.12.1 and 1.13.2). Every make_standard_montage/set_montage call in moabb now goes through it; METADATA montage labels are descriptive and unchanged. - download_and_extract_zip: download once, extract unless a marker exists, optional warn + forced re-download of a corrupted archive. - read_raw_brainvision_repaired: repair stale DataFile/MarkerFile references in a temporary header (strict mode raises on missing entries/siblings). - rename_stimulus_codes, edge_boundary_annotations; SetRawAnnotations keeps 'EDGE boundary' markers. - moabb.datasets._openneuro_mirror moved here verbatim (byte-identical copies in NeuroTechX#1186 and NeuroTechX#1189), with dataset-agnostic tests.
# Conflicts: # docs/source/whats_new.rst
…tage names Merges NeuroTechX#1200 (datasets/shared-loader-helpers): local zip/BrainVision/EDGE-boundary code replaced by moabb.datasets.utils helpers, montage calls spelled with the MNE 1.13 colin27_* names via resolve_montage_name, new classes without a public NEMAR mirror listed in NEMAR_ID_EXEMPT. Behaviour fingerprints unchanged.
MNE 1.13 renamed the standard_* templates to colin27_* (identical .elc files). With the floor at 1.13 the resolve_montage_name shim and the _montage module are not needed: every call site spells the new name.
- download_and_extract_zip -> extend download_and_extract_subject_zip with keyword-only fname and redownload_corrupted (defaults keep the 10 develop callers unchanged) - read_raw_brainvision_repaired -> mne.io.read_raw_brainvision(overrides=) at the call sites (MNE >= 1.13) - edge_boundary_annotations -> mne.Annotations(onsets, 0.0, 'EDGE boundary') - drop_native_stim / relabel_annotations / write_dataset_description -> drop_channels / annotations.rename / mne_bids.make_dataset_description - tests: no nested functions, Mock data_dl
# Conflicts: # docs/source/whats_new.rst
- read_raw_brainvision_repaired(strict=True) -> mne.io.read_raw_brainvision(overrides=) (Thapa2025) - Garro2025: nested local_or_download dropped; data_dl already caches each Figshare file under MNE-garro2025-data/files/<id> - MIND2026: nested count formatter hoisted to module level; sort key is operator.itemgetter(0) - colin27_* montage names spelled directly (mne>=1.13) - tests: Mock instead of nested transports and monkeypatched lambdas
… audit) Add ground=Fpz, gender and age from the data descriptor; docstring records the paper-vs-release subject count (40 designed, 39 released) and that the Figshare licence was not verified. Evidence: /Users/bruaristimunha/Projects/moabb/.paper-audit/reports/mi-large/Garro2025/report.md
…dit) The ScienceDB record is CC BY-NC 4.0, not CC BY 4.0. Evidence: /Users/bruaristimunha/Projects/moabb/.paper-audit/reports/mi-large/MIND2026/report.md
… audit) The paper states neither the participant count nor the raw rate; note the sources of 11 subjects (Zenodo) and 500 Hz (EDF headers). Evidence: /Users/bruaristimunha/Projects/moabb/.paper-audit/reports/mi-large/MOVING2024/report.md
… audit) Add the acquisition hardware (actiCHamp Plus + actiCAP snap, Brain Products) stated in the paper. Evidence: /Users/bruaristimunha/Projects/moabb/.paper-audit/reports/mi-large/Thapa2025/report.md
The authors present NeBULA as the dataset's name in prose: the primary paper, Garro et al., "An EEG-EMG dataset from a standardized reaching task for biomarker research in upper limb assessment" (Scientific Data 2025, 10.1038/s41597-025-05042-4), states "we introduce NeBULA (Neuromechanical Biomarkers for Upper Limb Assessment), a dataset designed to derive neuromechanical biomarkers into objective movement metrics." Rule 1 gives the official name with the primary-paper year: NeBULA2025. Renamed class, module, code, registry, api.rst, whats_new, summary CSV, tests and the NEMAR exemption list; no deprecated alias (the name was never released).
- mind2026.py: hoist the zipfile import to module level (was imported inline inside data_path). - moving2024.py: merge two adjacent single-statement warnings.catch_warnings() blocks in _get_single_subject_data into one. No change to METADATA, class names, events, interval, or _get_single_subject_data output.
bruAristimunha
marked this pull request as ready for review
October 4, 2026 17:34
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Scope
Four large-recording motor-task loaders: NeBULA2025 (was Garro2025), MIND2026, MOVING2024, Thapa2025. Based on develop
18e7d4c03; reconciledcodex/mi58-corrected-20260801against forkcodex/mi-dataset-expansion(4e7771cd). Only MIND differs among these loaders; the corrected acquisition-restart guard is retained, including balanced-suffix and task-half-order checks.DRAFT — not merge-ready. No real dataset downloads, computation jobs, rehosting, or publication were performed for this PR.
Scientific review and changes
max(abs(data)) > 1e-3), which is not a valid calibration. Requires authoritative unit evidence before porting; paper-branch results may be affected.Tgt10or arbitrary substrings. Preserve irregular optional TSV fields and temporary header-reference repair. Use standard montage and explicit execution metadata.Verification
Existing sibling interpreter lacked pytest and remotezip. Installed test-only dependencies into this worktree's untracked
.test-deps; no sibling environment modified. Explicit PYTHONPATH resolvedmoabb.__file__to this worktree. Isolated_MNE_FAKE_HOME_DIR, existing MNE_DATA, provider=auto.test_epochsreal BNCI data;test_dataset_acceptlicense/network access; mirror-ID gate run separately below. Existing suite skips retained. No permanent skips/exemptions added.git diff --checkpass.Required draft blockers
on004107is unrelated 2007 MEG (Weisend et al.), verified from dataset_description.json; other MIND matches are unrelated LEMON/mind-wandering/locomotion. Absence of search results is not proof that no deposit exists; administrators may supply real IDs.No merge requested. Expected mirror-test failures are visible intentionally, not hidden by exemptions.
Simplification (2026-09-29, head
fafc1b712)Depends on #1200. Merge #1200 (
mne>=1.13, shared download/marker helpers, OpenNeuro mirror mixin) first. This branch merges it (git merge --no-ff, no rebase).Pass 4 (ponytail): reuse existing code, no nested functions (head
d815f475a)058ae05e6, which now requiresmne>=1.13and drops the pass-3 helpers that re-implemented existing code.mne.io.read_raw_brainvision(..., overrides={"data_fname": ..., "marker_fname": ...}), which replacesread_raw_brainvision_repaired(strict=True). MNE itself raisesFileNotFoundErrorwhen a sibling file is missing.local_or_download. That function only skippeddata_dlwhenMNE-garro2025-data/files/<id>existed, and that path is alreadydata_dl's own cache for the Figshare URL, so the loader now callsdl.data_dldirectly._format_counts, and its sort key isoperator.itemgetter(0).colin27_1005/colin27_1020directly.data_dlrecorders and every monkeypatchedlambdawithMock.sorted(..., key=lambda s: (s is None, s)), which puts a missing session last. No non-lambda form of it is this short.download_and_extract_subject_zip.download_and_extract_subject_zipwould rename the extension-less Figshare cache filefiles/<id>to<id>.zip, which movesdata_dl's cache key.moabb/datasets/*.py1444 → 1440;moabb/tests/*.py(net) 277 → 275.data_pathscenarios for force, already extracted, and cached-zip-but-not-extracted.data_dl, which returns the cached file without downloading. The returned paths and the files on disk are identical.test_loader_utils.py,test_preprocessing.py,test_datasets.py,test_metadata.py,test_doi_validation.py) ran 2559 passed and 0 failed. ruff 0.15.20 andgit diff --checkare clean.Pass 3: shared helpers, NEMAR skip, new montage names (head
1d0fd2970)_read_brainvisionis replaced byread_raw_brainvision_repaired(..., strict=True), with the same errors for a missing entry or sibling. Its repair test moved to refactor(datasets): require mne>=1.13, spell colin27 montages, share loader code #1200.resolve_montage_name.NEMAR_ID_EXEMPT(# no public NEMAR mirror yet; tracked in #1195):Garro2025,MIND2026,MOVING2024,Thapa2025. No ids were invented,NEMAR_ID_PENDINGis untouched, andtest_all_datasets_have_valid_nemar_idpasses locally.moabb/datasets/*.py1487 → 1444 (-3%);moabb/tests/*.py(net) 301 → 277 (-8%; includes the NEMAR-exempt lines).test_loader_utils.py): garro2025 72→73, mind2026 89→89, moving2024 61→61, thapa2025 76→74. No touched file dropped by more than 2 pp.pytest <PR tests> test_loader_utils.py test_preprocessing.py test_datasets.py test_metadata.py test_doi_validation.py --cov=moabb/datasets(isolated MNE home, emptyMNE_DATA, no downloads;test_dataset_acceptandTestData::test_epochsdeselected): 0 failed. Also ruff 0.15.20 andgit diff --check.moabb/datasets/*.pymoabb/tests/*.py(net)PR tests collected (pass 2): 20 → 20. Coverage of touched dataset files (pass-1 before → now, offline suite): garro2025 71→72, mind2026 88→89, moving2024 61→61, thapa2025 71→76.
Pass 2 — loaders and tests
.split()events.tsvreader collapsed to one parse with a single fail-closedValueError, run counter → dict lengthtest_mind2026_regression.pyandtest_thapa2025_regression.pymerged intotest_large_motor_regression.py; MIND accepted-run (balanced / sub-04 sidecar restart / sub-19 marker restart) and fail-closed cases table-driven_read_brainvisionstale-header repair (cross-PR dedup with Vagaja2023 Add Leelakittisin2025, PerezBlanco2026 and Vagaja2023 archive datasets #1199 is a follow-up, not done here), MIND restart/half-order fail-closed semantics, one transport mock per download contract.pytest <PR tests> test_datasets.py test_metadata.py test_doi_validation.py --cov=moabb/datasets(isolated MNE home, no downloads;test_dataset_accept/TestData::test_epochsdeselected); behaviour fingerprint before/after on fake source data (per-run data hash, channels/types, sfreq, annotations, events, montage) and class fingerprint (subjects, sessions, event_id, interval, code, DOI, METADATA hash, summary-CSV row, docstring DOIs) identical exceptDataset summaryrendered once instead of twice; ruff 0.15.20,git diff --check.Test_Datasets::test_all_datasets_have_valid_nemar_id[<new classes>]fails (nonemar_id, not inNEMAR_ID_PENDING) — NEMAR-ID decision still open.Pass 1 — test audit
test_mind_transport_flags_and_cached_subject[False/True]andtest_thapa_transport_and_missing_sessions[False/True]each collapsed to one sequential test (cached → no transport; force → exact kwargs and re-download).test_target_parser_does_not_match_substringsfolded into the events.tsv test (target 4→Tgt4,Tgt10passthrough at the_annotations_from_eventsboundary);test_exact_balanced_run_does_not_require_restart_layoutmerged with the onset-anchoring test (same validator branch);test_overfull_run_without_code_1_restart_fails_closed[tsv]dropped (shared_validated_mi_events, TSV parsing covered elsewhere);interval == [0, 10]restatement andpreload/verbosecall-shape asserts removed.pytest <PR tests> moabb/tests/test_datasets.py moabb/tests/test_metadata.py moabb/tests/test_doi_validation.py --cov=moabb/datasets --cov-report=term-missing -p no:cacheprovider(isolated MNE home, no downloads;test_dataset_accept/TestData::test_epochsdeselected). Pre-existing on this branch, untouched:Test_Datasets::test_all_datasets_have_valid_nemar_id[<new classes>]fails (nonemar_id, not inNEMAR_ID_PENDING).