From e6140bda43124e1c95f05f867abe7c6b372b9617 Mon Sep 17 00:00:00 2001 From: Remi Gau Date: Fri, 20 Sep 2024 09:50:24 +0200 Subject: [PATCH] set pybids config --- giga_connectome/tests/test_utils.py | 20 ++++++++++++++++++++ giga_connectome/utils.py | 1 + 2 files changed, 21 insertions(+) diff --git a/giga_connectome/tests/test_utils.py b/giga_connectome/tests/test_utils.py index b8cef73..431ceef 100644 --- a/giga_connectome/tests/test_utils.py +++ b/giga_connectome/tests/test_utils.py @@ -4,6 +4,9 @@ from bids.tests import get_test_data_path from pkg_resources import resource_filename +from nilearn._utils.data_gen import create_fake_bids_dataset + + from giga_connectome import utils @@ -135,3 +138,20 @@ def test_output_filename_seg(source_file, atlas, atlas_desc, suffix, target): atlas_desc=atlas_desc, ) assert target == generated_target + + +def test_desc_entity_recognised(tmp_path): + + create_fake_bids_dataset(tmp_path, n_sub=1, n_ses=1, n_runs=[1, 1]) + + subjects = ["01"] + template = "MNI" + reindex_bids = True + + utils.get_bids_images( + subjects, + template, + tmp_path / "bids_dataset" / "derivatives", + reindex_bids, + bids_filters=None, + ) diff --git a/giga_connectome/utils.py b/giga_connectome/utils.py index 3055332..dd0e468 100644 --- a/giga_connectome/utils.py +++ b/giga_connectome/utils.py @@ -43,6 +43,7 @@ def get_bids_images( validate=False, derivatives=False, reset_database=reindex_bids, + config=["bids", "derivatives"], ) layout_get_kwargs = {