From ea5042e56e0a05c6e055b94dd72d47fafbef56af Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Mon, 3 Feb 2025 09:16:21 -0500 Subject: [PATCH] Update utils.py --- cubids/utils.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cubids/utils.py b/cubids/utils.py index 03322303..c328b6ba 100644 --- a/cubids/utils.py +++ b/cubids/utils.py @@ -158,6 +158,9 @@ def _get_bidsuri(filename, dataset_root): -------- >>> _get_bidsuri("/path/to/bids/sub-01/ses-01/dataset_description.json", "/path/to/bids") 'bids::sub-01/ses-01/dataset_description.json' + >>> _get_bidsuri("/path/to/bids/sub-01/ses-01/dataset_description.json", "/path/to/other") + Traceback (most recent call last): + ValueError: Only local datasets are supported: ... """ if dataset_root in filename: return filename.replace(dataset_root, "bids::").replace("bids::/", "bids::")