Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

layout.get(scope=...) still uses PipelineDescription #864

Open
pvandyken opened this issue May 29, 2022 · 2 comments
Open

layout.get(scope=...) still uses PipelineDescription #864

pvandyken opened this issue May 29, 2022 · 2 comments

Comments

@pvandyken
Copy link
Contributor

Problem

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.

@pvandyken
Copy link
Contributor Author

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.

@effigies
Copy link
Collaborator

effigies commented Jul 6, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants