-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Labels
Description
I suspect this is due to a refactoring in which directories, and not domains, are the objects iterated over, but this warning is too-easily triggered:
Lines 446 to 450 in a4eb518
| if name in self.domains: | |
| msg = ("Domain with name '{}' already exists; returning existing " | |
| "Domain configuration.".format(name)) | |
| warnings.warn(msg) | |
| return self.domains[name] |
For example:
layout = gb.BIDSLayout([(bids_dir, 'bids'), (preproc_dir, ['bids', 'derivatives'])])Because the 'bids' domain appears twice, this is warning is displayed. However, I expect this to be very common among multi-root use cases, so we should reconsider this warning.
I see three possibilities:
- Re-think the potentially conflicting behavior, given the new invocation patterns, and trigger in that case.
- Do some work to predict whether an actual conflict may arise, and trigger only if that is the case.
- Remove the warning because there are not actual conflicts.