Skip to content

Commit

Permalink
Add last test (not working).
Browse files Browse the repository at this point in the history
  • Loading branch information
tsalo committed Jun 10, 2024
1 parent 16d2700 commit 2b62af3
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 3 deletions.
18 changes: 15 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -380,13 +380,25 @@ jobs:
CIRCLE_CPUS: 4
steps:
- checkout
- restore_cache:
key: twoses-01
- run: *runinstall
- run:
name: Test the mri robust template for T1w images
no_output_timeout: 1h
command: |
cd .circleci
bash MultiT1w.sh
pytest -rP -o log_cli=true -m "multi_t1w" --cov-config=/src/qsiprep/pyproject.toml --cov-append --cov-report term-missing --cov=qsiprep --data_dir=/src/qsiprep/.circleci/data --output_dir=/src/qsiprep/.circleci/out --working_dir=/src/qsiprep/.circleci/work qsiprep
mkdir /src/coverage
mv /src/qsiprep/.coverage /src/coverage/.coverage.multi_t1w
# remove nifti files before uploading artifacts
find /src/qsiprep/.circleci/out/ -name "*.nii.gz" -type f -delete
find /src/qsiprep/.circleci/out/ -name "*.fib.gz" -type f -delete
- persist_to_workspace:
root: /src/coverage/
paths:
- .coverage.multi_t1w
- store_artifacts:
path: /src/qsiprep/.circleci/out/multi_t1w/

Recon_3Tissue_Singleshell_ACT:
<<: *dockersetup
Expand Down Expand Up @@ -857,7 +869,7 @@ workflows:

- MultiT1w:
requires:
- build
- download_twoses
filters:
branches:
ignore:
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ markers = [
"pyafq_recon_full: test 19",
"mrtrix3_recon: test 20",
"tortoise_recon: test 21",
"multi_t1w: test 22",
]
env = [
"RUNNING_PYTEST = 1",
Expand Down
Empty file.
36 changes: 36 additions & 0 deletions qsiprep/tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -743,6 +743,42 @@ def test_intramodal_template(data_dir, output_dir, working_dir):
_run_and_generate(TEST_NAME, parameters, test_main=True)


@pytest.mark.integration
@pytest.mark.multi_t1w
def test_multi_t1w(data_dir, output_dir, working_dir):
"""MultiT1w test
This tests the following features:
- freesurfer's robust template
Inputs
------
- DSDTI BIDS data (data/DSDTI)
"""
TEST_NAME = "multi_t1w"

dataset_dir = download_test_data("twoses", data_dir)
# XXX: Having to modify dataset_dirs is suboptimal.
dataset_dir = os.path.join(dataset_dir, "DSDTI")
out_dir = os.path.join(output_dir, TEST_NAME)
work_dir = os.path.join(working_dir, TEST_NAME)

parameters = [
dataset_dir,
out_dir,
"participant",
f"-w={work_dir}",
"--b1-biascorrect-stage=none",
"--hmc_model=none",
"--b0-motion-corr-to=first",
"--output-resolution=5",
"--intramodal-template-transform=BSplineSyN",
"--intramodal-template-iters=2",
]

_run_and_generate(TEST_NAME, parameters, test_main=True)


@pytest.mark.integration
@pytest.mark.scalar_mapper
def test_scalar_mapper(data_dir, output_dir, working_dir):
Expand Down

0 comments on commit 2b62af3

Please sign in to comment.