diff --git a/CHANGELOG.md b/CHANGELOG.md index ecc1b5dc9cd2760476322740f6282794ffe2da2a..0d64d88885c523829386435bfbcacf392574da52 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,12 +11,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed ### +* Required crawler version was invreased to 0.11.0 to allow for + inheritance in identifiables. + ### Deprecated ### ### Removed ### ### Fixed ### +* Regexp for T1WeightedImage + ### Security ### ### Documentation ### diff --git a/integrationtests/test_bids_folderstructure_cfood.py b/integrationtests/test_bids_folderstructure_cfood.py index a43d7f36eeebb253024d5ffe05a472af85348729..210a7e6c3bbac8e006fabb4e76f7ab88f8c82d02 100644 --- a/integrationtests/test_bids_folderstructure_cfood.py +++ b/integrationtests/test_bids_folderstructure_cfood.py @@ -74,7 +74,7 @@ def test_folders(clear_database, usemodel): crawler_definition, converter_registry ) - crawler.save_debug_data("prov.yml") + #crawler.save_debug_data("prov.yml") files = [fi for fi in records if isinstance(fi, db.File)] for fi in files: fi.file = __file__ @@ -84,11 +84,10 @@ def test_folders(clear_database, usemodel): assert len(datasets) == 1 assert len(subjects) == 5 assert len(sessions) == 10 - ins, ups = crawler.synchronize(commit_changes=False) + ins, ups = crawler.synchronize(crawled_data=records, commit_changes=True) funcs = [el for el in ins + ups if el.parents[0].name == "FunctionalImaging"] anats = [el for el in ins + ups if el.parents[0].name == "AnatomyImaging"] assert len(funcs) == 30 assert len(anats) == 10 - for el in funcs: - assert (len(el.get_property("FunctionalImagingDataFile").value) == 2 - or len(el.get_property("FunctionalImagingDataFile").value) == 3) + assert 30 == db.execute_query( + "count FunctionalImaging which references FunctionalImagingDataFile") diff --git a/src/bids-cfood/cfood.yml b/src/bids-cfood/cfood.yml index 41b210db9d665e94f55b06714a935269d29c3a60..b2a42e357263ad51f2cb780015a22ea8de8a1c4d 100644 --- a/src/bids-cfood/cfood.yml +++ b/src/bids-cfood/cfood.yml @@ -1,6 +1,6 @@ --- metadata: - crawler-version: 0.3.1 + crawler-version: 0.11.0 macros: - !defmacro name: FuncDataFile @@ -477,7 +477,7 @@ project_level: parent: "MagnetizationTransferSaturation" - suffix: T1w parent: "T1WeightedImage" - extension: "(nii(\.gz))?" + extension: "(nii(\\.gz)?)" - suffix: T1w parent: "JSONSidecar" extension: "json" diff --git a/unittests/test_dataset_description.py b/unittests/test_dataset_description.py index d7e26d28ce8b3b9916b9c128ddbe5328418498f6..95c6af6f3216ef27e96db6cf1f9010c80fe6f64f 100644 --- a/unittests/test_dataset_description.py +++ b/unittests/test_dataset_description.py @@ -63,8 +63,8 @@ def test_dataset(): converter_registry, restricted_path=["json_only", 'dataset_description.json'] ) - subd = crawler.debug_tree - subc = crawler.debug_metadata + #subd = crawler.debug_tree + #subc = crawler.debug_metadata # print(json.dumps(subc, indent=3)) # print(subd) # print(subc)