-
Notifications
You must be signed in to change notification settings - Fork 85
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
read_raw_bids cannot use inherited metadata information #804
Comments
Thanks for reporting this! The inheritance principle is really causing me headaches, I don't like it at all. But yes, seems we'll have to get this fixed. @sappelhoff any thoughts on how to approach this? This will be really painful to get right for all cases. Especially since we'll need to implement some sort of information merging between different levels of the BIDS hierarchy. cc @agramfort |
Yes, I don't particularly like the inheritance principle either. There have been several calls to formalize it "better" (or formalize in the first place), see e.g., bids-standard/bids-specification#102 For the sake of mne-bids, I agree with your assessment @hoechenberger ... getting started on this here will be bound to lead us towards having to formalize it within the bids spec. As an immediate action it may be good to explicitly say in the docs that the inheritance principle is currently not supported. |
Inheritance does seem quite messy after reading that issue. Some even propose removing it entirely in BIDS 2 (bids-standard/bids-2-devel#36). For now, what could be done is
This is similar to how bids-standard/pybids handles inheritance (using PyBIDS is also an option). |
@Aksoo it sounds like you've spent some time thinking about this. How much work would it be to start a pull request with a prototype? |
Depends on whether you are willing to add PyBIDS as dependency, but I am not sure I will have time until near the end of this month. |
I'd say ideally without PyBIDS dependency but @hoechenberger is in charge. Why is it easier with PyBIDS? Can you link to specific functions? |
|
I'd say @sappelhoff is in charge 😅 My personal opinion about dependencies is: if they make our life easier and they are well-maintained, I see no reason not to add and use them. Or actually, it would be a waste of our time not to use them. |
😅 Let's just continue our mixture of consensus-based decision making and do-ocracy, so far it seems to work.
I generally agree with that sentiment. It just means that instead of working a little harder for the feature ourselves (without adding a dependency), we are increasing the probability that at some point we'll have to make one or the other PR to pybids. For our specific case, I am not sure whether the inheritance functionality could not be implemented in an One more note on pybids: Tal Yarkoni, who initiated the package and wrote+rewrote large parts of it has just now changed jobs and will probably not be able to maintain it in the future. There is maybe going to be a discussion on this in the OHBM open science room. But that's just something to keep in mind when we think about adding it as a dependency. These are the secondary dependencies we'd be adding: |
I agree, let's try to do that and see how far we get without |
yes, the secondary dependencies are what I worry about most. Sometimes, well-maintained packages don't control their dependencies very well and it leads to issues. PyBIDS seems to have come a long way ... their documentation has improved quite a bit and the dependency on |
I'm running into the same issue, any update on this ? I am open to contributing. |
Describe the bug
The BIDS inheritance principle states that any metadata file can be defined at any directory level, and unless overwritten, lower levels inherit values from the top. However,
read_raw_bids
cannot read inherited metadata files.Steps to reproduce
read_raw_bids
on any subject EEG in the BIDS specification's first example EEG dataset, which has sidecartask-matchingpennies_eeg.json
at top level.Expected results
read_raw_bids
searches higher directories when metadata files are not found at current level.Actual results
The text was updated successfully, but these errors were encountered: