From a38a379276fe9007ef18bde4ebbf8f8e3480c4c9 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Fri, 19 Apr 2024 17:51:17 -0400 Subject: [PATCH] Use my fork of bids-examples, mark known to fail, run deno validator --- .github/workflows/validate_bids-examples.yml | 56 +++++++++----------- 1 file changed, 24 insertions(+), 32 deletions(-) diff --git a/.github/workflows/validate_bids-examples.yml b/.github/workflows/validate_bids-examples.yml index eae877e4de..0377cd8d7c 100644 --- a/.github/workflows/validate_bids-examples.yml +++ b/.github/workflows/validate_bids-examples.yml @@ -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/setup-deno@v1.1.2 + 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