Skip to content

Commit 72a6922

Browse files
authored
Merge branch 'master' into enh-project-datasettype
2 parents d368f35 + 45375d4 commit 72a6922

325 files changed

Lines changed: 16856 additions & 206 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.codespellrc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[codespell]
2-
skip = .git,env,venv,ds*,asl*,qmr*,genetics*,fnirs*,eeg*,meg*,pet*,ieeg*,motion*,synthetic*
2+
skip = .git,env,venv,ds*,asl*,qmr*,genetics*,fnirs*,eeg*,meg*,pet*,ieeg*,motion*,synthetic*,emg*
33
builtin = clear,rare
4-
ignore-words-list = nd,te
4+
ignore-words-list = nd,te,FLE,Sepulcre

.github/dependabot.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,7 @@ updates:
66
directory: "/"
77
schedule:
88
interval: "weekly"
9+
groups:
10+
actions-infrastructure:
11+
patterns:
12+
- "actions/*"

.github/pull_request_template.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<!-- New examples often relate to in-progress changes to the specification or validator. Link to the relevant PRs, if any. -->
2+
<!-- Accepted formats: PR number (e.g., 123), GitHub shorthand (e.g., bids-standard/bids-specification#123), or full URL -->
3+
4+
- BIDS Specification PR: NONE
5+
- BIDS Validator PR: NONE
6+
- TODOs:
7+
- [ ] ...
8+
9+
<!-- PLEASE READ AND DELETE THE TEXT BELOW BEFORE OPENING THE PULL REQUEST -->
10+
11+
See the [CONTRIBUTING](https://github.com/bids-standard/bids-examples/blob/master/CONTRIBUTING.md) guide. Specifically:
12+
13+
- Please keep the title of your Pull Request (PR) short but informative - it will appear in the changelog.
14+

.github/workflows/deploy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ jobs:
1616
runs-on: ubuntu-latest
1717
steps:
1818
- name: Checkout 🛎️
19-
uses: actions/checkout@v5
20-
- uses: actions/setup-python@v5
19+
uses: actions/checkout@v6
20+
- uses: actions/setup-python@v6
2121
with:
2222
python-version: "3.11"
2323
- name: Install and Build 🔧

.github/workflows/validate_datasets.yml

Lines changed: 77 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ name: validate_datasets
22

33
on:
44
push:
5-
branches: ['**']
5+
branches: [master, main]
6+
tags: ['*']
67
pull_request:
7-
branches: ['**']
8-
create:
9-
branches: [master]
10-
tags: ['**']
8+
types: [opened, synchronize, reopened, edited]
9+
branches: [master, main, 'bep*']
1110
schedule:
1211
- cron: "0 4 * * 1"
12+
workflow_dispatch:
1313

1414
concurrency:
1515
group: ${{ github.ref }}
@@ -20,25 +20,63 @@ defaults:
2020
shell: bash
2121

2222
jobs:
23+
# Prepare the matrix dynamically based on whether a bids-specification PR is referenced
24+
prepare-matrix:
25+
runs-on: ubuntu-latest
26+
outputs:
27+
matrix: ${{ steps.set-matrix.outputs.matrix }}
28+
spec_pr: ${{ steps.find-pr.outputs.spec_pr }}
29+
val_pr: ${{ steps.find-pr.outputs.val_pr }}
30+
steps:
31+
- uses: actions/checkout@v5
32+
with:
33+
fetch-depth: 0 # Get full history for commit message scanning
34+
35+
- name: Check for bids-specification PR reference
36+
id: find-pr
37+
run: |
38+
# Check PR description if this is a PR
39+
if [ "${{ github.event_name }}" == "pull_request" ]; then
40+
cat << 'EOF' > /tmp/pr_body.txt
41+
${{ github.event.pull_request.body }}
42+
EOF
43+
SPEC_PR=$(grep -oP 'BIDS Specification PR:\s*(https://github\.com/bids-standard/bids-specification/pulls?/|bids-standard/bids-specification#)*\K[0-9]+' /tmp/pr_body.txt | head -1 || true)
44+
[ -n "$SPEC_PR" ] && echo "spec_pr=$SPEC_PR" >> $GITHUB_OUTPUT || :
45+
VAL_PR=$(grep -oP 'BIDS Validator PR:\s*(https://github\.com/bids-standard/bids-validator/pulls?/|bids-standard/bids-validator#)*\K[0-9]+' /tmp/pr_body.txt | head -1 || true)
46+
[ -n "$VAL_PR" ] && echo "val_pr=$VAL_PR" >> $GITHUB_OUTPUT || :
47+
fi
48+
49+
- name: Set matrix
50+
id: set-matrix
51+
run: |
52+
EXTRA_ITEM=''
53+
if [ -n "${{ steps.find-pr.outputs.spec_pr }}${{ steps.find-pr.outputs.val_pr }}" ]; then
54+
EXTRA_ITEM=', "dev-prs"'
55+
fi
56+
echo "matrix=[\"stable\", \"main\", \"dev\", \"legacy\"${EXTRA_ITEM}]" >> $GITHUB_OUTPUT
57+
2358
build:
59+
needs: prepare-matrix
2460
strategy:
2561
fail-fast: false
2662
matrix:
2763
platform: [ubuntu-latest, macos-latest, windows-latest]
28-
bids-validator: [stable, main, dev, legacy]
64+
bids-validator: ${{ fromJson(needs.prepare-matrix.outputs.matrix) }}
2965

3066
runs-on: ${{ matrix.platform }}
3167

3268
env:
69+
SPEC_PR: ${{ needs.prepare-matrix.outputs.spec_pr }}
70+
VAL_PR: ${{ needs.prepare-matrix.outputs.val_pr }}
3371
TZ: Europe/Berlin
3472
FORCE_COLOR: 1
3573

3674
steps:
37-
- uses: actions/checkout@v5
75+
- uses: actions/checkout@v6
3876

3977
- name: Set up Node.js
4078
if: matrix.bids-validator == 'legacy'
41-
uses: actions/setup-node@v4
79+
uses: actions/setup-node@v6
4280
with:
4381
node-version: 22
4482

@@ -49,7 +87,7 @@ jobs:
4987

5088
- name: Load npm cache
5189
if: matrix.bids-validator == 'legacy'
52-
uses: actions/cache@v4
90+
uses: actions/cache@v5
5391
with:
5492
path: ~/.npm
5593
key: npm-${{ runner.os }}-${{ env.MONTH }}
@@ -72,7 +110,7 @@ jobs:
72110
deno install -Agf https://github.com/bids-standard/bids-validator/raw/deno-build/bids-validator.js
73111
74112
- name: Install BIDS validator (dev)
75-
if: matrix.bids-validator == 'dev'
113+
if: ( matrix.bids-validator == 'dev' ) || ( matrix.bids-validator == 'dev-prs' && env.VAL_PR == '' )
76114
run: |
77115
git clone -b dev https://github.com/bids-standard/bids-validator/ ../bids-validator
78116
cd ../bids-validator
@@ -83,6 +121,25 @@ jobs:
83121
run: |
84122
npm install -g bids-validator
85123
124+
- name: Install BIDS validator (dev-prs with VAL_PR)
125+
if: matrix.bids-validator == 'dev-prs' && env.VAL_PR != ''
126+
shell: bash
127+
env:
128+
GH_TOKEN: ${{ github.token }}
129+
run: |
130+
# Fetch PR info using gh cli (handles auth automatically)
131+
fork_url=$(gh api repos/bids-standard/bids-validator/pulls/${{ env.VAL_PR }} --jq '.head.repo.html_url')
132+
branch=$(gh api repos/bids-standard/bids-validator/pulls/${{ env.VAL_PR }} --jq '.head.ref')
133+
echo "I: Received fork_url=$fork_url branch=$branch"
134+
if [ "$fork_url" = "null" ] || [ -z "$fork_url" ]; then
135+
echo "E: Failed to get PR info for VAL_PR=${{ env.VAL_PR }}"
136+
exit 1
137+
fi
138+
# Perform the same installation as in "dev"
139+
git clone -b "$branch" "$fork_url" ../bids-validator
140+
cd ../bids-validator
141+
deno compile -A -o $HOME/.deno/bin/bids-validator src/bids-validator.ts
142+
86143
- name: Display versions and environment information
87144
run: |
88145
echo $TZ
@@ -96,7 +153,7 @@ jobs:
96153
if: "matrix.bids-validator == 'stable'"
97154
run: |
98155
echo "Checking for big files ..."
99-
found=`find . -not -path "./.git*" -type f -size +500k`
156+
found=`find . -not -path "./.git*" -type f -size +1M`
100157
if [ "$found" == "" ]
101158
then
102159
echo "No big files present, great!"
@@ -107,7 +164,7 @@ jobs:
107164
fi
108165
109166
- name: Skip legacy validation for post-legacy datasets
110-
run: for DS in mrs_* dwi_deriv pet006 pheno004 volume_timing; do touch $DS/.SKIP_VALIDATION; done
167+
run: for DS in mrs_* dwi_deriv pet006 pheno004 volume_timing atlas-*; do touch $DS/.SKIP_VALIDATION; done
111168
if: matrix.bids-validator == 'legacy'
112169

113170
- name: Skip stable validation for datasets with unreleased validator features
@@ -119,7 +176,7 @@ jobs:
119176
- name: Skip main validation for datasets with unreleased spec features
120177
# Replace ${EMPTY} with dataset patterns, when this is needed
121178
# Reset to "for DS in ${EMPTY}; ..." after a spec release
122-
run: for DS in dwi_deriv pheno004; do touch $DS/.SKIP_VALIDATION; done
179+
run: for DS in atlas-* emg_*; do touch $DS/.SKIP_VALIDATION; done
123180
if: matrix.bids-validator != 'dev'
124181

125182
- name: Set BIDS_SCHEMA variable for dev version
@@ -130,6 +187,13 @@ jobs:
130187
# release of https://jsr.io/@bids/schema
131188
run: echo BIDS_SCHEMA=https://bids-specification.readthedocs.io/en/latest/schema.json >> $GITHUB_ENV
132189

190+
- name: Set BIDS_SCHEMA variable for dev-prs version
191+
if: matrix.bids-validator == 'dev-prs' && env.SPEC_PR != ''
192+
# Use the readthedocs PR preview build for the schema
193+
run: |
194+
echo "Using schema from bids-specification PR #${{ env.SPEC_PR }}"
195+
echo BIDS_SCHEMA=https://bids-specification--${{ env.SPEC_PR }}.org.readthedocs.build/en/${{ env.SPEC_PR }}/schema.json >> $GITHUB_ENV
196+
133197
- name: Validate all BIDS datasets using bids-validator
134198
run: |
135199
cat ./run_tests.sh

.github/workflows/validation.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ jobs:
1616
codespell:
1717
runs-on: ubuntu-latest
1818
steps:
19-
- uses: actions/checkout@v5
19+
- uses: actions/checkout@v6
2020
- uses: codespell-project/actions-codespell@master

0 commit comments

Comments
 (0)