-
Notifications
You must be signed in to change notification settings - Fork 168
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use my fork of bids-examples, mark known to fail, run deno validator
- Loading branch information
1 parent
f40b526
commit a38a379
Showing
1 changed file
with
24 additions
and
32 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,7 @@ jobs: | |
fail-fast: false | ||
matrix: | ||
platform: [ubuntu-latest] # , macos-latest, windows-latest] | ||
bids-validator: [master, stable] | ||
bids-validator: [master-deno] | ||
python-version: ["3.11"] | ||
|
||
runs-on: ${{ matrix.platform }} | ||
|
@@ -48,33 +48,20 @@ jobs: | |
- name: "Produce dump of the schema as schema.json" | ||
run: bst -v export --output src/schema.json | ||
|
||
# Setup validator | ||
- name: Set up Node.js | ||
uses: actions/setup-node@v4 | ||
- uses: denoland/[email protected] | ||
if: "matrix.bids-validator == 'master-deno'" | ||
with: | ||
node-version: 18 | ||
deno-version: v1.x | ||
|
||
- name: Install BIDS validator (stable) | ||
if: "matrix.bids-validator == 'stable'" | ||
run: | | ||
npm install -g bids-validator | ||
- name: Install BIDS validator (master) | ||
if: "matrix.bids-validator == 'master'" | ||
- name: Install BIDS validator (master deno build) | ||
if: "matrix.bids-validator == 'master-deno'" | ||
run: | | ||
pushd .. | ||
# Get npm 7+ | ||
npm install -g npm | ||
git clone --depth 1 https://github.com/bids-standard/bids-validator | ||
cd bids-validator | ||
# Generate the full development node_modules | ||
npm clean-install | ||
# Build & bundle the bids-validator CLI package | ||
npm -w bids-validator run build | ||
# Generate a package to install globally | ||
npm -w bids-validator pack | ||
# Install the package globally | ||
bash -c "npm install -g bids-validator-*.tgz" | ||
echo -e '#!/bin/sh\n'"$PWD/bids-validator/bids-validator/bids-validator-deno \"\$@\"" >| /usr/local/bin/bids-validator | ||
chmod a+x /usr/local/bin/bids-validator | ||
which -a bids-validator | ||
bids-validator --help | ||
popd | ||
- name: Display versions and environment information | ||
|
@@ -89,18 +76,24 @@ jobs: | |
# Checkout bids-examples | ||
- uses: actions/checkout@v4 | ||
with: | ||
repository: bids-standard/bids-examples | ||
# repository: bids-standard/bids-examples | ||
# For now use the forked repository with support for deno validator | ||
# from https://github.com/bids-standard/bids-examples/pull/435 | ||
repository: yarikoptic/bids-examples | ||
branch: deno-validator | ||
path: bids-examples | ||
|
||
- name: Validate all BIDS datasets using bids-validator without migration | ||
run: | | ||
cat ./run_tests.sh | ||
bash ./run_tests.sh | ||
- name: Mark known not yet to be deno-legit BIDS datasets | ||
run: touch {ds000117,ds000248,eeg_ds003645s_hed_demo,ieeg_epilepsy,ieeg_epilepsy_ecog,ieeg_epilepsyNWB,ieeg_visual_multimodal}/.SKIP_VALIDATION | ||
shell: bash | ||
working-directory: bids-examples | ||
|
||
- name: Validate using bids-validator without migration | ||
run: ./run_tests.sh | ||
working-directory: bids-examples | ||
|
||
- name: Migrate all BIDS datasets | ||
run: | | ||
/bin/ls */dataset_description.json | sed -e 's,/.*,,g' | xargs bst migrate-datasets | ||
run: /bin/ls */dataset_description.json | sed -e 's,/.*,,g' | xargs bst migrate-datasets | ||
shell: bash | ||
working-directory: bids-examples | ||
|
||
|
@@ -109,6 +102,5 @@ jobs: | |
working-directory: bids-examples | ||
|
||
- name: Validate all BIDS datasets using bids-validator after migration | ||
run: | | ||
VALIDATOR_ARGS="-s local" bash ./run_tests.sh | ||
run: VALIDATOR_ARGS="-s local" bash ./run_tests.sh | ||
working-directory: bids-examples |