Skip to content

Commit

Permalink
FIX: More
Browse files Browse the repository at this point in the history
  • Loading branch information
larsoner committed Jan 26, 2024
1 parent cb8262e commit 9a8a4f0
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 20 deletions.
32 changes: 16 additions & 16 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -297,23 +297,23 @@ jobs:
paths:
- ~/mne_data/eeg_matchingpennies

cache_MNE-phantom-KIT-data:
cache_MNE_phantom_KIT_data:
<<: *imageconfig
steps:
- attach_workspace:
at: ~/
- restore_cache:
keys:
- data-cache-MNE-phantom-KIT-data-1
- data-cache-MNE_phantom_KIT_data-1
- bash_env
- gitconfig # email address is needed for datalad
- run:
name: Get MNE-phantom-KIT-data
name: Get MNE_phantom_KIT_data
command: |
$DOWNLOAD_DATA MNE-phantom-KIT-data
$DOWNLOAD_DATA MNE_phantom_KIT_data
- codecov/upload
- save_cache:
key: data-cache-MNE-phantom-KIT-data-1
key: data-cache-MNE_phantom_KIT_data-1
paths:
- ~/mne_data/MNE-phantom-KIT-data

Expand Down Expand Up @@ -785,31 +785,31 @@ jobs:
paths:
- mne_data/derivatives/mne-bids-pipeline/eeg_matchingpennies/*/*/*.html

test_MNE-phantom-KIT-data:
test_MNE_phantom_KIT_data:
<<: *imageconfig
steps:
- attach_workspace:
at: ~/
- bash_env
- restore_cache:
keys:
- data-cache-MNE-phantom-KIT-data-1
- data-cache-MNE_phantom_KIT_data-1
- run:
name: test MNE-phantom-KIT-data
command: $RUN_TESTS MNE-phantom-KIT-data
name: test MNE_phantom_KIT_data
command: $RUN_TESTS MNE_phantom_KIT_data
- codecov/upload
- store_test_results:
path: ./test-results
- store_artifacts:
path: ./test-results
destination: test-results
- store_artifacts:
path: /home/circleci/reports/MNE-phantom-KIT-data
destination: reports/MNE-phantom-KIT-data
path: /home/circleci/reports/MNE_phantom_KIT_data
destination: reports/MNE_phantom_KIT_data
- persist_to_workspace:
root: ~/
paths:
- mne_data/derivatives/mne-bids-pipeline/MNE-phantom-KIT-data/*/*/*.html
- mne_data/derivatives/mne-bids-pipeline/MNE_phantom_KIT_data/*/*/*.html

test_ERP_CORE_N400:
<<: *imageconfig
Expand Down Expand Up @@ -1237,13 +1237,13 @@ workflows:
- cache_eeg_matchingpennies
<<: *filter_tags

- cache_MNE-phantom-KIT-data:
- cache_MNE_phantom_KIT_data:
requires:
- setup_env
<<: *filter_tags
- test_MNE-phantom-KIT-data:
- test_MNE_phantom_KIT_data:
requires:
- cache_MNE-phantom-KIT-data
- cache_MNE_phantom_KIT_data
<<: *filter_tags

- cache_ERP_CORE:
Expand Down Expand Up @@ -1297,7 +1297,7 @@ workflows:
- test_ds003392
- test_ds004229
- test_eeg_matchingpennies
- test_MNE-phantom-KIT-data
- test_MNE_phantom_KIT_data
- test_ERP_CORE_N400
- test_ERP_CORE_ERN
- test_ERP_CORE_LRP
Expand Down
8 changes: 7 additions & 1 deletion docs/source/examples/gen_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ def _gen_demonstrated_funcs(example_config_path: Path) -> dict:
logger.warning(f"Dataset {dataset_name} has no HTML report.")
continue

assert dataset_options_key in DATASET_OPTIONS, dataset_options_key
options = DATASET_OPTIONS[dataset_options_key].copy() # we modify locally

report_str = "\n## Generated output\n\n"
Expand Down Expand Up @@ -200,13 +201,18 @@ def _gen_demonstrated_funcs(example_config_path: Path) -> dict:
f"{fname.name} :fontawesome-solid-square-poll-vertical:</a>\n\n"
)

assert sum(key in options for key in ("openneuro", "git", "web", "datalad")) == 1
assert (
sum(key in options for key in ("openneuro", "git", "web", "datalad", "mne"))
== 1
)
if "openneuro" in options:
url = f'https://openneuro.org/datasets/{options["openneuro"]}'
elif "git" in options:
url = options["git"]
elif "web" in options:
url = options["web"]
elif "mne" in options:
url = f"https://mne.tools/dev/generated/mne.datasets.{options['mne']}.data_path.html" # noqa: E501
else:
assert "datalad" in options # guaranteed above
url = ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

study_name = "MNE-phantom-KIT-data"
bids_root = "~/mne_data/MNE-phantom-KIT-data"
deriv_root = "~/mne_data/derivatives/mne-bids-pipeline/MNE-phantom-KIT-data"
deriv_root = "~/mne_data/derivatives/mne-bids-pipeline/MNE_phantom_KIT_data"
task = "phantom"
ch_types = ["meg"]

Expand Down
2 changes: 1 addition & 1 deletion mne_bids_pipeline/tests/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ class DATASET_OPTIONS_T(TypedDict, total=False):
"sub-emptyroom/ses-20000101",
],
},
"MNE-phantom-KIT-data": {
"MNE_phantom_KIT_data": {
"mne": "phantom_kit",
},
}
4 changes: 3 additions & 1 deletion mne_bids_pipeline/tests/test_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,9 @@ class _TestOptionsT(TypedDict, total=False):
"config": "config_ERP_CORE.py",
"task": "P3",
},
"MNE_phantom_KIT_data": {},
"MNE_phantom_KIT_data": {
"dataset": "MNE_phantom_KIT_data",
},
}


Expand Down

0 comments on commit 9a8a4f0

Please sign in to comment.