Skip to content

FIX: Read BIDS config.json under grabbids or layout #2679

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

Merged
merged 1 commit into from
Aug 10, 2018

Conversation

effigies
Copy link
Member

Summary

PyBIDS just renamed bids.grabbids to bids.layout (bids-standard/pybids#230). Althrough grabbids links back to layout, we look for files through the filesystem, which didn't survive the change.

This change should handle the new layout without breaking backwards compatibility.

@adelavega @tyarkoni I would appreciate reviews from you.

Acknowledgment

  • (Mandatory) I acknowledge that this contribution will be available under the Apache 2 license.

@effigies effigies added this to the 1.1.2 milestone Aug 10, 2018
@adelavega
Copy link
Contributor

adelavega commented Aug 10, 2018

Looks good to me but I'm not sure why the syslink doesn't work for you? bidslayout.__file__ is incorrect?

@effigies
Copy link
Member Author

What link?

@effigies
Copy link
Member Author

bidslayout.__file__ works, but bids.grabbids.__file__ no longer does.

@adelavega
Copy link
Contributor

Right, but why can't you just import from bids import grabbids as bidslayout and then check bidslayout.__file__ Would that work after the update? If so that seems simpler.

Either way looks fine to me.

@effigies effigies force-pushed the fix/pybids_refactor branch from e480f40 to 490b7f6 Compare August 10, 2018 19:40
@effigies
Copy link
Member Author

from bids import grabbids as bidslayout Would that work after the update?

No, because then bidslayout.__file__ will be bids.grabbids.__file__, when what we need is bids.layout.__file__.

@effigies effigies force-pushed the fix/pybids_refactor branch from 490b7f6 to f09e125 Compare August 10, 2018 19:43
@adelavega
Copy link
Contributor

Ah I guess I was thinking you could do realpath which would resolve the symlink, but either way that adds complexity so the way you deal with it is fine.

@effigies
Copy link
Member Author

There is no symlink.

@effigies effigies changed the title FIX: bids.grabbids API is going away FIX: Read BIDS config.json under grabbids or layout Aug 10, 2018
@adelavega
Copy link
Contributor

Ah okay. Ignore me then!

@tyarkoni
Copy link

LGTM

@effigies effigies merged commit a2c2d79 into nipy:master Aug 10, 2018
@effigies effigies deleted the fix/pybids_refactor branch August 10, 2018 21:41
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

Successfully merging this pull request may close these issues.

3 participants