You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The scope parameter of BIDSLayout.get() is supposed to take a pipeline name, causing get to return only files generated by that particular pipeline. In the latest version of the code, the function that implements this behaviour, BIDSLayout._in_scope(), reads the PipelineDescription field in the dataset description. As far as I know, this is not a valid field according to the current bids spec, and pipeline information is to be stored under GeneratedBy.
Possible Solution
It would be helpful if _in_scope() read from the GeneratedBy field. One caveat is that, since GeneratedBy takes a list, a given dataset could have multiple "pipeline names". I don't think this represents a problem though, in fact, it should allow for even more powerful scoping.
Current workarounds
The best current workaround is to add a PipelineDescription to the dataset_description.json. I believe, however, this makes the file invalid according to strict bids parsing.
Notes
I noticed some PRs for a "BIDSLayout_v2", and I don't know if this issue will be addressed there or not. If it is, and if that version is staged to be the next pybids core, then fixing this issue may not be immediately relevant.
The text was updated successfully, but these errors were encountered:
For what it's worth, #812 would fix this issue, if you're interested in me further pursuing that refactor. It uses the first entry in the GeneratedBy field for scoping. But it does do many other things beyond the scope of this issue: a minimal fix would be quite trivial.
Hi, yes we should definitely get to this. I'm sorry for missing this. Please bug me on Monday if I haven't reviewed #812 by then. If you want to submit a minimal fix before then, that's also fine.
Problem
The scope parameter of
BIDSLayout.get()
is supposed to take a pipeline name, causingget
to return only files generated by that particular pipeline. In the latest version of the code, the function that implements this behaviour,BIDSLayout._in_scope()
, reads thePipelineDescription
field in the dataset description. As far as I know, this is not a valid field according to the current bids spec, and pipeline information is to be stored underGeneratedBy
.Possible Solution
It would be helpful if
_in_scope()
read from theGeneratedBy
field. One caveat is that, sinceGeneratedBy
takes a list, a given dataset could have multiple "pipeline names". I don't think this represents a problem though, in fact, it should allow for even more powerful scoping.Current workarounds
The best current workaround is to add a
PipelineDescription
to thedataset_description.json
. I believe, however, this makes the file invalid according to strict bids parsing.Notes
I noticed some PRs for a "BIDSLayout_v2", and I don't know if this issue will be addressed there or not. If it is, and if that version is staged to be the next pybids core, then fixing this issue may not be immediately relevant.
The text was updated successfully, but these errors were encountered: