-
Notifications
You must be signed in to change notification settings - Fork 294
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
FIX: Initialize BIDS layout after cleaning working directory #2741
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what if we just move the clean_directory
logic to run before initializing the config?
Because the working directory could be set by passing a config file. |
ah yes - in that case, you probably just need to initialize the layout after this line as well fmriprep/fmriprep/cli/workflow.py Line 46 in ea03d25
|
185f17e
to
35d531d
Compare
Thanks for tracking that down. |
Tests passing. Any objections? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a big fan of having to call 2 initialization methods (load
/initialize_layout
) every time we establish the config. I think load
by default should call all initialization functions -perhaps what we should be able to handle is selective initialization each config section
But if you feel strongly against, config.execution.init
's docstring should be updated with this change in behavior
The config is kind of a house of cards... I'll see what I can do. |
b3b7762
to
dfbfd7f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - thanks for addressing that 😄
I saw three options.
--clean-workdir
. This complicates the cleaning code.config.execution.init
, which seems bad as I think initialization is supposed to be okay to do multiple times. Destructive filesystem operations certainly seem bad to hide in configuration init.Went for option 3.
Fixes #2721