From 9933b6c0a19e0f32680cbde518e62478dba9a759 Mon Sep 17 00:00:00 2001 From: Remi Gau Date: Wed, 31 Jul 2024 13:21:41 +0200 Subject: [PATCH] fix set up --- .github/workflows/tests.yml | 1 + .github/workflows/tests_octave.yml | 7 +- .../tests_workflows/QA/test_bidsQA.m | 64 +++++++++---------- 3 files changed, 39 insertions(+), 33 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e36d265e..a6934940 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -118,6 +118,7 @@ jobs: mv moae_fmriprep fmriprep - name: Get data for testing QA + if: matrix.os == 'ubuntu-latest' run: | cd demos/openneuro/ make data_ds000114_mriqc diff --git a/.github/workflows/tests_octave.yml b/.github/workflows/tests_octave.yml index db53598b..93bd47e2 100644 --- a/.github/workflows/tests_octave.yml +++ b/.github/workflows/tests_octave.yml @@ -61,7 +61,7 @@ jobs: - name: Install dependencies run: | sudo apt-get -y -qq update - sudo apt-get -y install unzip wget + sudo apt-get -y install unzip wget git-annex - name: Install Node uses: actions/setup-node@v4 @@ -79,6 +79,11 @@ jobs: submodules: recursive fetch-depth: 0 + - name: Install datalad + run: | + python -m pip install --upgrade pip setuptools + pip install datalad + - name: Install validators run: make install diff --git a/tests/tests_slow/tests_workflows/QA/test_bidsQA.m b/tests/tests_slow/tests_workflows/QA/test_bidsQA.m index 7dabedc2..829a2494 100644 --- a/tests/tests_slow/tests_workflows/QA/test_bidsQA.m +++ b/tests/tests_slow/tests_workflows/QA/test_bidsQA.m @@ -11,50 +11,46 @@ function test_bidsQA_raw() - % markTestAs('slow'); - % - % opt = setOptions('vislocalizer'); - % - % expectedOutput = fullfile(opt.dir.output, ... - % 'reports', ... - % 'bidspm-raw_split_by-task.png'); - % - % if exist(expectedOutput, 'file') - % delete(expectedOutput) - % end - % - % bidsQA(opt) - % - % assertEqual(exist(expectedOutput, 'file'), 2) + markTestAs('slow'); -end + opt = setOptions('vislocalizer'); -function test_bidsQA_mriqc() + expectedOutput = fullfile(opt.dir.output, ... + 'reports', ... + 'bidspm-raw_split_by-task.png'); + + if exist(expectedOutput, 'file') + delete(expectedOutput); + end - % markTestAs('slow'); - % - % if ispc() - % moxunit_throw_test_skipped_exception('requires datalad setup'); - % end - % - % ds000114mriqc = spm_file(fullfile(getTestDir(), ... - % '..', 'demos', 'openneuro', ... - % 'inputs', 'ds000114-mriqc'), 'cpath'); - % - % opt.dir.input = ds000114mriqc; - % - % bidsQA(opt); + bidsQA(opt); + + assertEqual(exist(expectedOutput, 'file'), 2); end -function test_bidsQA_bidspm() +function test_bidsQA_mriqc() markTestAs('slow'); - if ispc() + if ispc() || ismac() moxunit_throw_test_skipped_exception('requires datalad setup'); end + ds000114mriqc = spm_file(fullfile(getTestDir(), ... + '..', 'demos', 'openneuro', ... + 'inputs', 'ds000114-mriqc'), 'cpath'); + + opt.dir.input = ds000114mriqc; + + bidsQA(opt); + +end + +function test_bidsQA_bidspm() + + markTestAs('slow'); + opt = setOptions('vislocalizer'); opt.dir.input = opt.dir.preproc; @@ -77,6 +73,10 @@ function test_bidsQA_fmriprep() markTestAs('slow'); + if ispc() || ismac() + moxunit_throw_test_skipped_exception('requires datalad setup'); + end + ds000114fmriprep = spm_file(fullfile(getTestDir(), ... '..', 'demos', 'openneuro', ... 'inputs', 'ds000114-fmriprep'), 'cpath');