From f8828e9785d7af9aab9ef341c01d83fc509f2de3 Mon Sep 17 00:00:00 2001 From: Stefan Appelhoff Date: Mon, 2 Sep 2024 18:58:40 +0200 Subject: [PATCH 1/5] CI: try schema BIDS validator --- .github/workflows/unit_tests.yml | 33 ++++++++++++++++++++++++++------ 1 file changed, 27 insertions(+), 6 deletions(-) diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index d20c4f9cd..fc9953eb4 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -119,10 +119,11 @@ jobs: # 3.10 / mne-stable / full / validator-stable # 3.12 / mne-stable / full / validator-stable # - # 3 additional checks with alternative MNE-Python and BIDS validator versions: - # ubuntu / 3.12 / mne-main / full / validator-main - # ubuntu / 3.10 / mne-prev / full / validator-stable - # ubuntu / 3.12 / mne-stable / minimal / validator-stable + # 4 additional checks with alternative MNE-Python and BIDS validator versions: + # ubuntu / 3.12 / mne-main / full / validator-main --> to test cutting edge of everything + # ubuntu / 3.10 / mne-prev / full / validator-stable --> to test last supported of everything + # ubuntu / 3.12 / mne-stable / minimal / validator-stable --> to test a minimal installation + # ubuntu / 3.12 / mne-stable / full / validator-main-schema --> to test next-gen BIDS validator timeout-minutes: 60 runs-on: ${{ matrix.os }} strategy: @@ -154,7 +155,12 @@ jobs: mne-version: mne-stable mne-bids-install: minimal bids-validator-version: validator-stable - + # Test minimal mne-bids install + - os: ubuntu-latest + python-version: "3.12" + mne-version: mne-stable + mne-bids-install: full + bids-validator-version: validator-main-schema env: TZ: Europe/Berlin @@ -162,11 +168,18 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Set up Node.js + - name: Set up Node.js (validator-stable and validator-main) + if: matrix.bids-validator-version == 'validator-stable' || matrix.bids-validator-version == 'validator-main' uses: actions/setup-node@v4 with: node-version: 20 + - name: Set up deno (validator-main-schema) + if: matrix.bids-validator-version == 'validator-main-schema' + uses: denoland/setup-deno@v1 + with: + deno-version: v1.x + - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: @@ -210,6 +223,14 @@ jobs: run: | npm install -g bids-validator@1.14.10 + - name: Install BIDS validator (main-schema) + if: matrix.bids-validator-version == 'validator-main-schema' + # If unmerged validator PRs are needed for testing, you can use + # https://github.com//bids-validator/raw//bids-validator/src/bids-validator.ts + run: | + deno install -Agf https://github.com/bids-standard/bids-validator/raw/deno-build/bids-validator.js + echo "BIDS_VALIDATOR_BRANCH=main-schema" >> $GITHUB_ENV + - name: Download BIDS validator (main) if: matrix.bids-validator-version == 'validator-main' run: | From 54cbea8c06fa361a76ca84864cc2894f92318522 Mon Sep 17 00:00:00 2001 From: Stefan Appelhoff Date: Mon, 2 Sep 2024 19:22:55 +0200 Subject: [PATCH 2/5] try log deno version --- .github/workflows/unit_tests.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index fc9953eb4..df1f8b94d 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -256,11 +256,12 @@ jobs: run: | echo $TZ date - echo "npm"; npm --version + echo "(npm version)"; npm --version echo "node"; node --version - echo "bids-validator"; bids-validator --version - echo "python"; python --version - which python + echo "(deno version)"; deno --version + echo "(bids-validator version)"; bids-validator --version + echo "(python version)"; python --version + echo "(which python)"; which python mne sys_info - name: Install MNE-BIDS (minimal) From 68e8bbc40f791e9c33dad83670e02b319e5f6feb Mon Sep 17 00:00:00 2001 From: Stefan Appelhoff Date: Mon, 2 Sep 2024 21:50:13 +0200 Subject: [PATCH 3/5] remove env var --- .github/workflows/unit_tests.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index df1f8b94d..074116a1a 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -229,7 +229,6 @@ jobs: # https://github.com//bids-validator/raw//bids-validator/src/bids-validator.ts run: | deno install -Agf https://github.com/bids-standard/bids-validator/raw/deno-build/bids-validator.js - echo "BIDS_VALIDATOR_BRANCH=main-schema" >> $GITHUB_ENV - name: Download BIDS validator (main) if: matrix.bids-validator-version == 'validator-main' From f42cf259df8d7577cfa6eb635adad10dbec2502b Mon Sep 17 00:00:00 2001 From: Stefan Appelhoff Date: Mon, 2 Sep 2024 21:59:01 +0200 Subject: [PATCH 4/5] deno may not be installed --- .github/workflows/unit_tests.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index 074116a1a..cb41f522c 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -225,8 +225,13 @@ jobs: - name: Install BIDS validator (main-schema) if: matrix.bids-validator-version == 'validator-main-schema' - # If unmerged validator PRs are needed for testing, you can use - # https://github.com//bids-validator/raw//bids-validator/src/bids-validator.ts + # Follow documentation here: + # - https://github.com/bids-standard/bids-validator/tree/master/bids-validator/src + # - https://github.com/bids-standard/bids-examples/blob/7c18d6840982518a0251cfeb59fe5c4610099ea1/.github/workflows/validate_datasets.yml#L69-L75 + # + # Note: in the future, we may want to make it easy to use: + # - a different version of the validator (stable, main) + # - a different version of the schema (stable, main) run: | deno install -Agf https://github.com/bids-standard/bids-validator/raw/deno-build/bids-validator.js @@ -257,7 +262,7 @@ jobs: date echo "(npm version)"; npm --version echo "node"; node --version - echo "(deno version)"; deno --version + echo "(deno version)"; deno --version || echo "" echo "(bids-validator version)"; bids-validator --version echo "(python version)"; python --version echo "(which python)"; which python From c50032cd543925ded300b1584e772a31ccce58b0 Mon Sep 17 00:00:00 2001 From: Stefan Appelhoff Date: Mon, 2 Sep 2024 23:38:26 +0200 Subject: [PATCH 5/5] fix shell for win --- .github/workflows/unit_tests.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index cb41f522c..2fc76e41a 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -155,7 +155,7 @@ jobs: mne-version: mne-stable mne-bids-install: minimal bids-validator-version: validator-stable - # Test minimal mne-bids install + # Test next gen BIDS schema validator - os: ubuntu-latest python-version: "3.12" mne-version: mne-stable @@ -257,6 +257,7 @@ jobs: popd - name: Display versions and environment information + shell: bash run: | echo $TZ date