-
Notifications
You must be signed in to change notification settings - Fork 17
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
Domain root should default to directory containing config file #57
Comments
You're right, I'd file this under bug. PR is welcome, otherwise I'll get to it when I can. Thanks for catching that! |
I'll file a PR then! |
Actually I'm having to fix this in the process of fixing bids-standard/pybids#164, so you can probably hold off. My apologies if you've already started. |
Actually, scratch that--your fix is more sensible than mine. Assuming tests pass, I'll merge yours and then work from that. |
WIP: correct relative domain roots #57
I'm revisiting this due to some other issues that have come up, in the hopes of coming up with a better and more general solution. The way I see it, what's causing problems is the reliance on a project-wide As a separate but related issue, I would also like to allow @kleinschmidt, any thoughts on the above? Unless you have objections, I'll try to work this up today. |
I think yoking roots to domains seems pretty natural. It's what I was planning to do in my julia clone, although I haven't implemented that writeable functionality so haven't needed to look at that. I also considered making the directory structure a more strict constraint on how to domains/queries nest, whereby domains are strictly contained within a parent domain, in which case the root would have to be relative (except for the top-level domain), and entities/tags would match against directory or filenames, not whole paths; those choices seem somehow related to me but I haven't given it a ton of thought. |
It looks like if no root is specified in a directory-specific domain (or if
root == '.'
) then the root of that domain is set to the global (Layout
-level) root. I'm confused by this behavior. I'd have intuitively thought that the domain's root would be the directory it's config file is taken from by default, and that relative paths would be relative to that directory, rather than the layout root. In fact, it seems to go against the purpose of the domains mechanisms to have to specify the relative path of the domain from the layout root in the domain-specific config file, when that information should be taken from the location of that file (by default). Am I mis-understanding something?As an example, adapted from the examples notebook:
gives
while I would have expected
The text was updated successfully, but these errors were encountered: