Skip to content

Commit 9fed6cb

Browse files
committed
fix: updated config name, updated doc
1 parent 73e4327 commit 9fed6cb

File tree

4 files changed

+13
-6
lines changed

4 files changed

+13
-6
lines changed

doc/users/config_file.rst

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,15 @@ Execution
137137
schedulers the default is set to 2 seconds.
138138

139139
*xvfb_max_wait*
140-
Maximum time (in seconds) to wait for Xvfb to start, if the _redirect_x parameter of an Interface is True.
141-
140+
Maximum time (in seconds) to wait for Xvfb to start, if the _redirect_x
141+
parameter of an Interface is True.
142+
143+
*crashfile_format*
144+
This option controls the file type of any crashfile generated. Pklz
145+
crashfiles allow interactive debugging and rerunning of nodes, while text
146+
crashfiles allow portability across machines and shorter load time.
147+
(possible values: ``pklz`` and ``txt``; default value: ``pklz``)
148+
142149
Example
143150
~~~~~~~
144151

nipype/pipeline/plugins/base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,13 @@ def report_crash(node, traceback=None, hostname=None):
6868
if not os.path.exists(crashdir):
6969
os.makedirs(crashdir)
7070
crashfile = os.path.join(crashdir, crashfile)
71-
if str2bool(node.config['execution']['text_crashfiles']):
71+
if node.config['execution']['crashfile_format'].lower() in ['text', 'txt']:
7272
crashfile += '.txt'
7373
else:
7474
crashfile += '.pklz'
7575
logger.info('Saving crash info to %s' % crashfile)
7676
logger.info(''.join(traceback))
77-
if str2bool(node.config['execution']['text_crashfiles']):
77+
if node.config['execution']['crashfile_format'].lower() in ['text', 'txt']:
7878
crash2txt(crashfile, dict(node=node, traceback=traceback))
7979
else:
8080
savepkl(crashfile, dict(node=node, traceback=traceback))

nipype/pipeline/plugins/tests/test_base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def test_report_crash():
2727
mock_node.config = {
2828
'execution' : {
2929
'crashdump_dir' : '.',
30-
'text_crashfiles' : 'false',
30+
'crashfile_format' : 'pklz',
3131
}
3232
}
3333

nipype/utils/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
remove_unnecessary_outputs = true
5656
try_hard_link_datasink = true
5757
single_thread_matlab = true
58-
text_crashfiles = false
58+
crashfile_format = pklz
5959
stop_on_first_crash = false
6060
stop_on_first_rerun = false
6161
use_relative_paths = false

0 commit comments

Comments
 (0)