Skip to content

Add manual corrections for spinal canal (#182) #234

Add manual corrections for spinal canal (#182)

Add manual corrections for spinal canal (#182) #234

Workflow file for this run

name: Dataset Validator
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
Validate:
runs-on: ubuntu-latest
steps:
- name: Gain disk space by remapping temp disk (`/dev/sdb1`)
uses: easimon/maximize-build-space@master
# We use the above action instead of removing unwanted packages because it only takes about 2s;
# by comparison, removing lots of small file is very time-consuming.
with:
# After freeing up space we could have as much as 87GB available, which is overkill.
# So, we set root == 10GB to save room for installing dependencies (leaving us with ~77GB)
root-reserve-mb: 10240
swap-size-mb: 1024
- name: Checkout
uses: actions/checkout@v4
with:
# make sure to download directly from the PR's repo, whether that is this repo or a fork
# By default github generates a merge commit for each PR in this repo, but only for the one branch under test
# but `git-annex` needs access to *two* branches: the current branch and `git-annex`
# this might be subtly buggy since it is testing the remote version, not the merged version
#
# *if* this is not a pull request, this will fall back to its default behaviour.
repository: ${{github.event.pull_request.head.repo.full_name}}
ref: ${{github.event.pull_request.head.ref}}
- name: Install git-annex
run: |
sudo apt-get update
sudo apt-get --yes install git-annex
# the user name and email is needed by git-annex to write to
# the local git-annex branch
git config --global user.name "gh-actions"
git config --global user.email "gh-actions"
# save space by using hard links to annexed files
git config --global annex.thin true
# retry for transient failures when downloading annexed file contents
git config --global annex.retry 2
- name: Download dataset
run: |
git fetch --depth=1 origin git-annex:git-annex
git annex get --jobs 8
- name: Install Deno
uses: denoland/setup-deno@v2
- name: Install Python 3.13
uses: actions/setup-python@v5
with:
python-version: 3.13
- name: Install spine-generic
run: |
pip install spinegeneric@git+https://github.com/spine-generic/[email protected]
- name: Run bids-validator
# If the explicit whitelist of allowed environment variables gets too annoying to update,
# we can loosen it to just a blanket `--allow-env`. This will let bids-validator and all of its
# dependencies access any credentials that github CI exposes in environment variables, but at
# least we're not giving it any network access, so exfiltrating them would require more effort.
run: |
deno run --no-prompt --allow-env=BIDS_SCHEMA,FORCE_COLOR,IGNORE_TEST_WIN32 --allow-read=. jsr:@bids/validator . || echo '::warning title=bids-validator::Errors found by bids-validator'
- name: Run acquisition parameter validator
run: |
sg_params_checker -path-in . || echo '::warning title=bids-validator::Errors found by sg_params_checker'
- name: Run data consistency validator
run: |
sg_check_data_consistency -path-in . || echo '::warning title=bids-validator::Errors found by sg_check_data_consistency'