Skip to content

Commit 7548050

Browse files
authored
Merge branch 'master' into mv_site
2 parents 17fbacf + 45c98fa commit 7548050

File tree

4 files changed

+34
-14
lines changed

4 files changed

+34
-14
lines changed

.github/workflows/validate_datasets.yml

+25-8
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
fail-fast: false
2222
matrix:
2323
platform: [ubuntu-latest, macos-latest, windows-latest]
24-
bids-validator: [stable, dev, legacy]
24+
bids-validator: [stable, main, dev, legacy]
2525

2626
runs-on: ${{ matrix.platform }}
2727

@@ -49,14 +49,22 @@ jobs:
4949
deno install -Agf -n bids-validator jsr:@bids/validator
5050
shell: bash
5151

52-
- name: Install BIDS validator (dev)
53-
if: matrix.bids-validator == 'dev'
52+
- name: Install BIDS validator (main)
53+
if: matrix.bids-validator == 'main'
5454
run: |
5555
# If unmerged validator PRs are needed for testing, you can use
5656
# https://github.com/<FORK>/bids-validator/raw/<BRANCH>/bids-validator/src/bids-validator.ts
5757
deno install -Agf https://github.com/bids-standard/bids-validator/raw/deno-build/bids-validator.js
5858
shell: bash
5959

60+
- name: Install BIDS validator (dev)
61+
if: matrix.bids-validator == 'dev'
62+
run: |
63+
git clone -b dev https://github.com/bids-standard/bids-validator/ ../bids-validator
64+
cd ../bids-validator
65+
deno compile -A -o $HOME/.deno/bin/bids-validator src/bids-validator.ts
66+
shell: bash
67+
6068
- name: Install BIDS validator (legacy)
6169
if: "matrix.bids-validator == 'legacy'"
6270
run: |
@@ -87,17 +95,26 @@ jobs:
8795
fi
8896
shell: bash
8997

90-
- name: Skip MRS validation for legacy validator
98+
- name: Skip legacy validation for post-legacy datasets
9199
run: for DS in mrs_* dwi_deriv; do touch $DS/.SKIP_VALIDATION; done
92100
if: matrix.bids-validator == 'legacy'
93101
shell: bash
94102

103+
- name: Skip stable validation for datasets with unreleased features
104+
run: for DS in dwi_deriv; do touch $DS/.SKIP_VALIDATION; done
105+
if: matrix.bids-validator != 'dev'
106+
shell: bash
107+
108+
- name: Set BIDS_SCHEMA variable for dev version
109+
if: matrix.bids-validator == 'dev'
110+
# When proposing new features, schema changes may be necessary.
111+
# Update this URL to the schema.json from PRs to the spec, when needed.
112+
# If this variable is unset, dev will generally track the latest development
113+
# release of https://jsr.io/@bids/schema
114+
run: echo BIDS_SCHEMA=https://bids-specification.readthedocs.io/en/latest/schema.json >> $GITHUB_ENV
115+
95116
- name: Validate all BIDS datasets using bids-validator
96117
run: |
97118
cat ./run_tests.sh
98119
./run_tests.sh
99120
shell: bash
100-
env:
101-
# When proposing new features, schema changes may be necessary.
102-
# Update this URL to the schema.json from PRs to the spec, when needed.
103-
BIDS_SCHEMA: https://bids-specification.readthedocs.io/en/latest/schema.json

synthetic/code/create_synthethic_ds.sh

+9-6
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
# small bash script to create a synthethic BIDS data set
44

55
# defines where the BIDS data set will be created
6-
start_dir=$(pwd)
7-
raw_dir=${start_dir}/../
6+
code_dir=$( dirname $0 )
7+
raw_dir=$( dirname $code_dir )
88

99
subject_list='01 02 03 04 05'
1010
session_list='01'
@@ -23,10 +23,9 @@ create_raw_beh() {
2323
mkdir -p ${this_dir}
2424

2525
filename=${this_dir}/sub-${subject}_ses-${ses}_task-${task_name}${suffix}.tsv
26-
echo "trial\tresponse\treaction_time\tstim_file" >${filename}
27-
echo "congruent\tred\t1.435\timages/word-red_color-red.jpg" >>${filename}
28-
echo "incongruent\tred\t1.739\timages/word-red_color-blue.jpg" >>${filename}
29-
26+
echo -e "trial\tresponse\treaction_time\tstim_file" >${filename}
27+
echo -e "congruent\tred\t1.435\timages/word-red_color-red.jpg" >>${filename}
28+
echo -e "incongruent\tred\t1.739\timages/word-red_color-blue.jpg" >>${filename}
3029
}
3130

3231
# RAW DATASET
@@ -36,3 +35,7 @@ for subject in ${subject_list}; do
3635
done
3736

3837
done
38+
39+
mkdir -p ${raw_dir}/stimuli/images
40+
touch ${raw_dir}/stimuli/images/word-red_color-red.jpg
41+
touch ${raw_dir}/stimuli/images/word-red_color-blue.jpg

synthetic/stimuli/images/word-red_color-blue.jpg

Loading

synthetic/stimuli/images/word-red_color-red.jpg

Loading

0 commit comments

Comments
 (0)