-
Notifications
You must be signed in to change notification settings - Fork 530
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
ENH: Allow Nipype configuration directory to be specified with NIPYPE_CONFIG_DIR environment variable #3073
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3073 +/- ##
==========================================
+ Coverage 67.86% 68.05% +0.18%
==========================================
Files 295 295
Lines 39260 39747 +487
Branches 5171 5293 +122
==========================================
+ Hits 26644 27050 +406
- Misses 11911 11979 +68
- Partials 705 718 +13
Continue to review full report at Codecov.
|
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.
Could we test this updating the circleci jobs?
Sorry @oesteban , I'm not sure exactly what you mean. Do you want me to add some tests for this? |
I'm not sure what a good test would be. I guess you could mock the environment and validate that the expected contents are loaded when the variable is set or not set. In any event, you should add a note about the environment variable to, once this is merged: https://github.com/miykael/nipype_tutorial/blob/master/notebooks/basic_execution_configuration.ipynb |
Hi @stilley2, this PR is also affected by our recent merges. Could you re-apply these changes on the latest Please let me know if you need any help or clarifications. |
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.
There are two cases of NIPYPE*
environment variables:
Lines 21 to 22 in 1a86999
if plugin == "MultiProc": | |
plugin_args["n_procs"] = int(os.getenv("NIPYPE_NUMBER_OF_CPUS", cpu_count())) |
nipype/nipype/interfaces/spm/base.py
Lines 258 to 259 in 1a86999
if "NIPYPE_NO_MATLAB" in os.environ or Info.version() is None: | |
return True |
Both have the form with underscores separating words, so let's do something in that direction.
Thanks for your patience, btw.
Hi @stilley2, do you have a couple minutes to consider the above proposal? |
Co-Authored-By: Chris Markiewicz <[email protected]>
Sorry last week was pretty busy. Change looks good! |
Thanks for your patience. |
Summary
Allow overwriting default location of nipype.cfg (~/.nipype) with the environment variable NIPYPECONFDIR. This is potentially useful for containerized pipelines which require a default nipype.cfg.
Acknowledgment