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::")