Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH: Cache grand-average steps #765

Merged
merged 17 commits into from
Jul 19, 2023
20 changes: 10 additions & 10 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ jobs:
- data-cache-ds000248-4
- run:
name: test BEM from FLASH
command: $RUN_TESTS ds000248_FLASH_BEM
command: $RUN_TESTS -r ds000248_FLASH_BEM
- codecov/upload
- store_test_results:
path: ./test-results
Expand All @@ -556,7 +556,7 @@ jobs:
- run:
name: test BEM from T1 (watershed)
no_output_timeout: 20m
command: $RUN_TESTS ds000248_T1_BEM
command: $RUN_TESTS -r ds000248_T1_BEM
- codecov/upload
- store_test_results:
path: ./test-results
Expand All @@ -582,7 +582,7 @@ jobs:
- data-cache-ds000248-4
- run:
name: test head surface creation for MNE coregistration
command: $RUN_TESTS ds000248_coreg_surfaces ds000248_coreg_surfaces --no-copy
command: $RUN_TESTS -c -r ds000248_coreg_surfaces
- codecov/upload
- store_test_results:
path: ./test-results
Expand Down Expand Up @@ -772,7 +772,7 @@ jobs:
google-chrome --version
- run:
name: test ERP CORE N400
command: $RUN_TESTS ERP_CORE_N400 ERP_CORE
command: $RUN_TESTS ERP_CORE_N400
- codecov/upload
- store_test_results:
path: ./test-results
Expand Down Expand Up @@ -802,7 +802,7 @@ jobs:
command: mkdir -p /home/circleci/.local/share/pyvista
- run:
name: test ERP CORE ERN
command: $RUN_TESTS ERP_CORE_ERN ERP_CORE
command: $RUN_TESTS ERP_CORE_ERN
- codecov/upload
- store_test_results:
path: ./test-results
Expand Down Expand Up @@ -832,7 +832,7 @@ jobs:
command: mkdir -p /home/circleci/.local/share/pyvista
- run:
name: test ERP CORE LRP
command: $RUN_TESTS ERP_CORE_LRP ERP_CORE
command: $RUN_TESTS ERP_CORE_LRP
- codecov/upload
- store_test_results:
path: ./test-results
Expand Down Expand Up @@ -862,7 +862,7 @@ jobs:
command: mkdir -p /home/circleci/.local/share/pyvista
- run:
name: test ERP CORE MMN
command: $RUN_TESTS ERP_CORE_MMN ERP_CORE
command: $RUN_TESTS ERP_CORE_MMN
- codecov/upload
- store_test_results:
path: ./test-results
Expand Down Expand Up @@ -892,7 +892,7 @@ jobs:
command: mkdir -p /home/circleci/.local/share/pyvista
- run:
name: test ERP CORE N2pc
command: $RUN_TESTS ERP_CORE_N2pc ERP_CORE
command: $RUN_TESTS ERP_CORE_N2pc
- codecov/upload
- store_test_results:
path: ./test-results
Expand Down Expand Up @@ -922,7 +922,7 @@ jobs:
command: mkdir -p /home/circleci/.local/share/pyvista
- run:
name: test ERP CORE N170
command: $RUN_TESTS ERP_CORE_N170 ERP_CORE
command: $RUN_TESTS ERP_CORE_N170
- codecov/upload
- store_test_results:
path: ./test-results
Expand Down Expand Up @@ -952,7 +952,7 @@ jobs:
command: mkdir -p /home/circleci/.local/share/pyvista
- run:
name: test ERP CORE P3
command: $RUN_TESTS ERP_CORE_P3 ERP_CORE
command: $RUN_TESTS ERP_CORE_P3
- codecov/upload
- store_test_results:
path: ./test-results
Expand Down
41 changes: 34 additions & 7 deletions .circleci/run_dataset_and_copy_files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,48 @@

set -eo pipefail

COPY_FILES="true"
RERUN_TEST="true"
while getopts "cr" option; do
echo $option
case $option in
c)
COPY_FILES="false";;
r)
RERUN_TEST="false";;
esac
done
shift "$(($OPTIND -1))"

DS_RUN=$1
if [[ "$2" == "" ]]; then
DS="$DS_RUN"
else
DS="$2"
if [[ -z $1 ]]; then
echo "Missing dataset argument"
exit 1
fi
if [[ "$3" == "--no-copy" ]]; then
COPY_FILES="false"
if [[ "$DS_RUN" == "ERP_CORE_"* ]]; then
DS="ERP_CORE"
else
COPY_FILES="true"
DS="$1"
fi

SECONDS=0
pytest mne_bids_pipeline --junit-xml=test-results/junit-results.xml -k ${DS_RUN}
echo "Runtime: ${SECONDS} seconds"

# rerun test (check caching)!
SECONDS=0
if [[ "$RERUN_TEST" == "false" ]]; then
echo "Skipping rerun test"
RUN_TIME=0
else
pytest mne_bids_pipeline -k $DS_RUN
RUN_TIME=$SECONDS
echo "Runtime: ${RUN_TIME} seconds (should be < 20)"
fi
test $RUN_TIME -lt 20

if [[ "$COPY_FILES" == "false" ]]; then
echo "Not copying files"
exit 0
fi
mkdir -p ~/reports/${DS}
Expand Down
1 change: 1 addition & 0 deletions docs/source/v1.5.md.inc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

- Added support for annotating bad segments based on head movement velocity (#757 by @larsoner)
- Added examples of T1 and FLASH BEM to website (#758 by @larsoner)
- Added caching of sensor and source average steps (#765 by @larsoner)

[//]: # (### :warning: Behavior changes)

Expand Down
Loading
Loading