Skip to content

Commit

Permalink
Update utils.py
Browse files Browse the repository at this point in the history
  • Loading branch information
tsalo committed Feb 3, 2025
1 parent 939faac commit ea5042e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cubids/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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::")
Expand Down

0 comments on commit ea5042e

Please sign in to comment.