From ba97ef1c6818e5be94ff13cea0fd77351260a484 Mon Sep 17 00:00:00 2001 From: oesteban Date: Tue, 1 Mar 2016 13:34:57 -0800 Subject: [PATCH 001/643] [ENH] Added new fsl.WarpPointsFromStd interface --- .../freesurfer/tests/test_auto_MRIsConvert.py | 4 +- nipype/interfaces/fsl/__init__.py | 3 +- .../fsl/tests/test_auto_WarpPointsFromStd.py | 60 +++++++++++++++++++ nipype/interfaces/fsl/utils.py | 41 +++++++++++++ 4 files changed, 106 insertions(+), 2 deletions(-) create mode 100644 nipype/interfaces/fsl/tests/test_auto_WarpPointsFromStd.py diff --git a/nipype/interfaces/freesurfer/tests/test_auto_MRIsConvert.py b/nipype/interfaces/freesurfer/tests/test_auto_MRIsConvert.py index 86c949f645..c7ac846849 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_MRIsConvert.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_MRIsConvert.py @@ -30,10 +30,12 @@ def test_MRIsConvert_inputs(): ), origname=dict(argstr='-o %s', ), - out_datatype=dict(xor=['out_file'], + out_datatype=dict(mandatory=True, + xor=['out_file'], ), out_file=dict(argstr='%s', genfile=True, + mandatory=True, position=-1, xor=['out_datatype'], ), diff --git a/nipype/interfaces/fsl/__init__.py b/nipype/interfaces/fsl/__init__.py index 4f6b5c38fc..7603b265dd 100644 --- a/nipype/interfaces/fsl/__init__.py +++ b/nipype/interfaces/fsl/__init__.py @@ -17,7 +17,8 @@ PlotTimeSeries, PlotMotionParams, ConvertXFM, SwapDimensions, PowerSpectrum, Reorient2Std, Complex, InvWarp, WarpUtils, ConvertWarp, WarpPoints, - WarpPointsToStd, RobustFOV, CopyGeom, MotionOutliers) + WarpPointsToStd, WarpPointsFromStd, + RobustFOV, CopyGeom, MotionOutliers) from .epi import (PrepareFieldmap, TOPUP, ApplyTOPUP, Eddy, EPIDeWarp, SigLoss, EddyCorrect, EpiReg) diff --git a/nipype/interfaces/fsl/tests/test_auto_WarpPointsFromStd.py b/nipype/interfaces/fsl/tests/test_auto_WarpPointsFromStd.py new file mode 100644 index 0000000000..76aac9bc49 --- /dev/null +++ b/nipype/interfaces/fsl/tests/test_auto_WarpPointsFromStd.py @@ -0,0 +1,60 @@ +# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT +from ....testing import assert_equal +from ..utils import WarpPointsFromStd + + +def test_WarpPointsFromStd_inputs(): + input_map = dict(args=dict(argstr='%s', + ), + coord_mm=dict(argstr='-mm', + xor=['coord_vox'], + ), + coord_vox=dict(argstr='-vox', + xor=['coord_mm'], + ), + environ=dict(nohash=True, + usedefault=True, + ), + ignore_exception=dict(nohash=True, + usedefault=True, + ), + img_file=dict(argstr='-img %s', + mandatory=True, + ), + in_coords=dict(argstr='%s', + mandatory=True, + position=-1, + ), + out_file=dict(name_source='in_coords', + name_template='%s_warped', + output_name='out_file', + ), + std_file=dict(argstr='-std %s', + mandatory=True, + ), + terminal_output=dict(nohash=True, + ), + transform=dict(argstr='-xfm %s', + ), + warp_file=dict(argstr='-warp %s', + xor=['xfm_file'], + ), + xfm_file=dict(argstr='-xfm %s', + xor=['warp_file'], + ), + ) + inputs = WarpPointsFromStd.input_spec() + + for key, metadata in list(input_map.items()): + for metakey, value in list(metadata.items()): + yield assert_equal, getattr(inputs.traits()[key], metakey), value + + +def test_WarpPointsFromStd_outputs(): + output_map = dict(out_file=dict(), + ) + outputs = WarpPointsFromStd.output_spec() + + for key, metadata in list(output_map.items()): + for metakey, value in list(metadata.items()): + yield assert_equal, getattr(outputs.traits()[key], metakey), value diff --git a/nipype/interfaces/fsl/utils.py b/nipype/interfaces/fsl/utils.py index 8e58b0d8cf..0479ef23b8 100644 --- a/nipype/interfaces/fsl/utils.py +++ b/nipype/interfaces/fsl/utils.py @@ -2017,6 +2017,47 @@ class WarpPointsToStd(WarpPoints): _cmd = 'img2stdcoord' +class WarpPointsFromStdInputSpec(WarpPointsBaseInputSpec): + img_file = File(exists=True, argstr='-img %s', mandatory=True, + desc='filename of a destination image') + std_file = File(exists=True, argstr='-std %s', mandatory=True, + desc='filename of the image in standard space') + transform = File(exists=True, argstr='-xfm %s', + desc='filename of pre-warp affine transform ' + '(e.g. example_func2highres.mat)') + + +class WarpPointsFromStd(WarpPoints): + """ + Use FSL `std2imgcoord `_ + to transform point sets to standard space coordinates. Accepts plain text files and + vtk files. + + .. Note:: transformation of TrackVis trk files is not yet implemented + + + Examples + -------- + + >>> from nipype.interfaces.fsl import WarpPointsFromStd + >>> warppoints = WarpPointsFromStd() + >>> warppoints.inputs.in_coords = 'surf.txt' + >>> warppoints.inputs.img_file = 'T1.nii' + >>> warppoints.inputs.std_file = 'mni.nii' + >>> warppoints.inputs.warp_file = 'warpfield.nii' + >>> warppoints.inputs.coord_mm = True + >>> warppoints.cmdline # doctest: +ELLIPSIS + 'std2imgcoord -mm -img T1.nii -std mni.nii -warp warpfield.nii surf.txt' + >>> res = warppoints.run() # doctest: +SKIP + + + """ + + input_spec = WarpPointsFromStdInputSpec + output_spec = WarpPointsOutputSpec + _cmd = 'std2imgcoord' + + class MotionOutliersInputSpec(FSLCommandInputSpec): in_file = File( exists=True, mandatory=True, desc="unfiltered 4D image", argstr="-i %s") From 82e1ce754d5b755872c518561ef16c6cd460a4d7 Mon Sep 17 00:00:00 2001 From: oesteban Date: Fri, 4 Mar 2016 13:52:38 -0800 Subject: [PATCH 002/643] do not inherit from WarpPoints interfaces --- nipype/interfaces/fsl/utils.py | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/nipype/interfaces/fsl/utils.py b/nipype/interfaces/fsl/utils.py index 0479ef23b8..455c5bda89 100644 --- a/nipype/interfaces/fsl/utils.py +++ b/nipype/interfaces/fsl/utils.py @@ -2017,17 +2017,29 @@ class WarpPointsToStd(WarpPoints): _cmd = 'img2stdcoord' -class WarpPointsFromStdInputSpec(WarpPointsBaseInputSpec): +class WarpPointsFromStdInputSpec(CommandLineInputSpec): img_file = File(exists=True, argstr='-img %s', mandatory=True, desc='filename of a destination image') std_file = File(exists=True, argstr='-std %s', mandatory=True, desc='filename of the image in standard space') - transform = File(exists=True, argstr='-xfm %s', - desc='filename of pre-warp affine transform ' - '(e.g. example_func2highres.mat)') + in_coords = File(exists=True, position=-2, argstr='%s', mandatory=True, + desc='filename of file containing coordinates') + xfm_file = File(exists=True, argstr='-xfm %s', xor=['warp_file'], + desc='filename of affine transform (e.g. source2dest.mat)') + warp_file = File(exists=True, argstr='-warp %s', xor=['xfm_file'], + desc='filename of warpfield (e.g. ' + 'intermediate2dest_warp.nii.gz)') + coord_vox = traits.Bool(True, argstr='-vox', xor=['coord_mm'], + desc='all coordinates in voxels - default') + coord_mm = traits.Bool(False, argstr='-mm', xor=['coord_vox'], + desc='all coordinates in mm') + + out_file = File(name_source='in_coords', argstr='> %s', position=-1, + name_template='%s_warped', output_name='out_file', + desc='output file name') -class WarpPointsFromStd(WarpPoints): +class WarpPointsFromStd(CommandLine): """ Use FSL `std2imgcoord `_ to transform point sets to standard space coordinates. Accepts plain text files and From 91a7ac428117aedf86740210db97c08f7189d78b Mon Sep 17 00:00:00 2001 From: oesteban Date: Mon, 7 Mar 2016 09:54:44 -0800 Subject: [PATCH 003/643] update specs --- .../interfaces/fsl/tests/test_auto_WarpPointsFromStd.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nipype/interfaces/fsl/tests/test_auto_WarpPointsFromStd.py b/nipype/interfaces/fsl/tests/test_auto_WarpPointsFromStd.py index 76aac9bc49..a2ae7bf97a 100644 --- a/nipype/interfaces/fsl/tests/test_auto_WarpPointsFromStd.py +++ b/nipype/interfaces/fsl/tests/test_auto_WarpPointsFromStd.py @@ -23,19 +23,19 @@ def test_WarpPointsFromStd_inputs(): ), in_coords=dict(argstr='%s', mandatory=True, - position=-1, + position=-2, ), - out_file=dict(name_source='in_coords', + out_file=dict(argstr='> %s', + name_source='in_coords', name_template='%s_warped', output_name='out_file', + position=-1, ), std_file=dict(argstr='-std %s', mandatory=True, ), terminal_output=dict(nohash=True, ), - transform=dict(argstr='-xfm %s', - ), warp_file=dict(argstr='-warp %s', xor=['xfm_file'], ), From f5bae9fa7f951fbf17c44637f01f783550ae7fc3 Mon Sep 17 00:00:00 2001 From: oesteban Date: Mon, 7 Mar 2016 09:59:05 -0800 Subject: [PATCH 004/643] updated CHANGES, fixed docstring --- CHANGES | 1 + nipype/interfaces/fsl/utils.py | 5 +---- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/CHANGES b/CHANGES index f36491c694..8dd305dc4b 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,7 @@ Next release ============ +* ENH: Simple interface to FSL std2imgcoords (https://github.com/nipy/nipype/pull/1398) * FIX: Prevent crash when tvtk is loaded - ETS_TOOLKIT=null (https://github.com/nipy/nipype/pull/973) * ENH: New interfaces in dipy: RESTORE, EstimateResponseSH, CSD and StreamlineTractography (https://github.com/nipy/nipype/pull/1090) diff --git a/nipype/interfaces/fsl/utils.py b/nipype/interfaces/fsl/utils.py index 455c5bda89..e5f3f0009b 100644 --- a/nipype/interfaces/fsl/utils.py +++ b/nipype/interfaces/fsl/utils.py @@ -2042,10 +2042,7 @@ class WarpPointsFromStdInputSpec(CommandLineInputSpec): class WarpPointsFromStd(CommandLine): """ Use FSL `std2imgcoord `_ - to transform point sets to standard space coordinates. Accepts plain text files and - vtk files. - - .. Note:: transformation of TrackVis trk files is not yet implemented + to transform point sets to standard space coordinates. Accepts plain text . Examples From 4d9a08031180652c1e6d8ec7b8c888cde0f2e944 Mon Sep 17 00:00:00 2001 From: oesteban Date: Mon, 21 Mar 2016 10:17:32 -0700 Subject: [PATCH 005/643] use terminal_output --- nipype/interfaces/fsl/utils.py | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/nipype/interfaces/fsl/utils.py b/nipype/interfaces/fsl/utils.py index e5f3f0009b..b175598108 100644 --- a/nipype/interfaces/fsl/utils.py +++ b/nipype/interfaces/fsl/utils.py @@ -2015,6 +2015,7 @@ class WarpPointsToStd(WarpPoints): input_spec = WarpPointsToStdInputSpec output_spec = WarpPointsOutputSpec _cmd = 'img2stdcoord' + _terminal_output = 'file' class WarpPointsFromStdInputSpec(CommandLineInputSpec): @@ -2034,15 +2035,12 @@ class WarpPointsFromStdInputSpec(CommandLineInputSpec): coord_mm = traits.Bool(False, argstr='-mm', xor=['coord_vox'], desc='all coordinates in mm') - out_file = File(name_source='in_coords', argstr='> %s', position=-1, - name_template='%s_warped', output_name='out_file', - desc='output file name') - class WarpPointsFromStd(CommandLine): """ Use FSL `std2imgcoord `_ - to transform point sets to standard space coordinates. Accepts plain text . + to transform point sets to standard space coordinates. Accepts plain text coordinates + files. Examples @@ -2066,6 +2064,15 @@ class WarpPointsFromStd(CommandLine): output_spec = WarpPointsOutputSpec _cmd = 'std2imgcoord' + def _run_interface(self, runtime): + runtime = super(WarpPointsFromStd, self)._run_interface(runtime) + self._out_file = runtime.stdout + + def _list_outputs(self): + outputs = self.output_spec().get() + outputs['out_file'] = self._out_file + return outputs + class MotionOutliersInputSpec(FSLCommandInputSpec): in_file = File( From e7e4dcc027ff2303032d239c9c5e94303ff15fb7 Mon Sep 17 00:00:00 2001 From: oesteban Date: Thu, 8 Sep 2016 10:04:29 -0700 Subject: [PATCH 006/643] add +IGNORE_UNICODE to doctest, update specs --- .../fsl/tests/test_auto_WarpPointsFromStd.py | 14 ++++---------- nipype/interfaces/fsl/utils.py | 2 +- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/nipype/interfaces/fsl/tests/test_auto_WarpPointsFromStd.py b/nipype/interfaces/fsl/tests/test_auto_WarpPointsFromStd.py index a2ae7bf97a..bdb3f8e256 100644 --- a/nipype/interfaces/fsl/tests/test_auto_WarpPointsFromStd.py +++ b/nipype/interfaces/fsl/tests/test_auto_WarpPointsFromStd.py @@ -7,10 +7,10 @@ def test_WarpPointsFromStd_inputs(): input_map = dict(args=dict(argstr='%s', ), coord_mm=dict(argstr='-mm', - xor=['coord_vox'], + xor=[u'coord_vox'], ), coord_vox=dict(argstr='-vox', - xor=['coord_mm'], + xor=[u'coord_mm'], ), environ=dict(nohash=True, usedefault=True, @@ -25,22 +25,16 @@ def test_WarpPointsFromStd_inputs(): mandatory=True, position=-2, ), - out_file=dict(argstr='> %s', - name_source='in_coords', - name_template='%s_warped', - output_name='out_file', - position=-1, - ), std_file=dict(argstr='-std %s', mandatory=True, ), terminal_output=dict(nohash=True, ), warp_file=dict(argstr='-warp %s', - xor=['xfm_file'], + xor=[u'xfm_file'], ), xfm_file=dict(argstr='-xfm %s', - xor=['warp_file'], + xor=[u'warp_file'], ), ) inputs = WarpPointsFromStd.input_spec() diff --git a/nipype/interfaces/fsl/utils.py b/nipype/interfaces/fsl/utils.py index 5b32f72dca..c2e9c403e6 100644 --- a/nipype/interfaces/fsl/utils.py +++ b/nipype/interfaces/fsl/utils.py @@ -2073,7 +2073,7 @@ class WarpPointsFromStd(CommandLine): >>> warppoints.inputs.std_file = 'mni.nii' >>> warppoints.inputs.warp_file = 'warpfield.nii' >>> warppoints.inputs.coord_mm = True - >>> warppoints.cmdline # doctest: +ELLIPSIS + >>> warppoints.cmdline # doctest: +ELLIPSIS +IGNORE_UNICODE 'std2imgcoord -mm -img T1.nii -std mni.nii -warp warpfield.nii surf.txt' >>> res = warppoints.run() # doctest: +SKIP From 307fdde6996d6046e12df08690a8a8bf06d3c09e Mon Sep 17 00:00:00 2001 From: forwho Date: Tue, 20 Sep 2016 23:27:49 +0800 Subject: [PATCH 007/643] Update dti.py fix the bug of diffusion_toolkit interfaces --- nipype/interfaces/diffusion_toolkit/dti.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nipype/interfaces/diffusion_toolkit/dti.py b/nipype/interfaces/diffusion_toolkit/dti.py index 3ba0beeafc..ead0e222c6 100644 --- a/nipype/interfaces/diffusion_toolkit/dti.py +++ b/nipype/interfaces/diffusion_toolkit/dti.py @@ -129,7 +129,7 @@ class DTITrackerInputSpec(CommandLineInputSpec): angle_threshold_weight = traits.Float(desc="set angle threshold weighting factor. weighting will be be applied \ on top of the angle_threshold", argstr="-atw %f") random_seed = traits.Int(desc="use random location in a voxel instead of the center of the voxel \ - to seed. can also define number of seed per voxel. default is 1", argstr="-rseed") + to seed. can also define number of seed per voxel. default is 1", argstr="-rseed %d") invert_x = traits.Bool(desc="invert x component of the vector", argstr="-ix") invert_y = traits.Bool(desc="invert y component of the vector", argstr="-iy") invert_z = traits.Bool(desc="invert z component of the vector", argstr="-iz") From 12f90739cd78002aa8a1d48308372cd99d0a1654 Mon Sep 17 00:00:00 2001 From: oesteban Date: Sun, 30 Apr 2017 18:41:09 -0700 Subject: [PATCH 008/643] [ENH] Add "profiling" outputs to ants.Registration Adds a `profiling` flag that enables parsing of the standard output from ANTS. This first version only reads two values: the total elapsed time and the final value of the metric. --- nipype/interfaces/ants/registration.py | 25 +++++++++++++++++++ .../ants/tests/test_auto_Registration.py | 4 +++ 2 files changed, 29 insertions(+) diff --git a/nipype/interfaces/ants/registration.py b/nipype/interfaces/ants/registration.py index 65604a580a..3d1b11eb81 100644 --- a/nipype/interfaces/ants/registration.py +++ b/nipype/interfaces/ants/registration.py @@ -379,6 +379,8 @@ class RegistrationInputSpec(ANTSCommandInputSpec): low=0.0, high=1.0, value=0.0, argstr='%s', usedefault=True, desc="The Lower quantile to clip image ranges") verbose = traits.Bool(argstr='-v', default=False) + profiling = traits.Bool(True, usedefault=True, + desc='generate profiling output fields') class RegistrationOutputSpec(TraitedSpec): @@ -395,6 +397,8 @@ class RegistrationOutputSpec(TraitedSpec): warped_image = File(desc="Outputs warped image") inverse_warped_image = File(desc="Outputs the inverse of the warped image") save_state = File(desc="The saved registration state to be restored") + metric_value = traits.Float(desc='the final value of metric') + elapsed_time = traits.Float(desc='the total elapsed time as reported by ANTs') class Registration(ANTSCommand): @@ -648,6 +652,24 @@ class Registration(ANTSCommand): _quantilesDone = False _linear_transform_names = ['Rigid', 'Affine', 'Translation', 'CompositeAffine', 'Similarity'] + def _run_interface(self, runtime, correct_return_codes=(0,)): + runtime = super(Registration, self)._run_interface(runtime) + + # Parse some profiling info + if self.inputs.profiling: + lines = runtime.stdout.split('\n') + for l in lines[::-1]: + # This should be the last line + if l.strip().startswith('Total elapsed time:'): + setattr(self, '_elapsed_time', float( + l.strip().replace('Total elapsed time: ', ''))) + elif 'DIAGNOSTIC' in l: + setattr(self, '_metric_value', float( + l.split(',')[2])) + break + + return runtime + def _format_metric(self, index): """ Format the antsRegistration -m metric argument(s). @@ -981,4 +1003,7 @@ def _list_outputs(self): outputs['inverse_warped_image'] = os.path.abspath(inv_out_filename) if len(self.inputs.save_state): outputs['save_state'] = os.path.abspath(self.inputs.save_state) + if self.inputs.profiling: + outputs['metric_value'] = getattr(self, '_metric_value') + outputs['elapsed_time'] = getattr(self, '_elapsed_time') return outputs diff --git a/nipype/interfaces/ants/tests/test_auto_Registration.py b/nipype/interfaces/ants/tests/test_auto_Registration.py index b295ced54f..0a28f89e70 100644 --- a/nipype/interfaces/ants/tests/test_auto_Registration.py +++ b/nipype/interfaces/ants/tests/test_auto_Registration.py @@ -72,6 +72,8 @@ def test_Registration_inputs(): ), output_warped_image=dict(hash_files=False, ), + profiling=dict(usedefault=True, + ), radius_bins_item_trait=dict(), radius_bins_stage_trait=dict(), radius_or_number_of_bins=dict(requires=['metric_weight'], @@ -125,10 +127,12 @@ def test_Registration_inputs(): def test_Registration_outputs(): output_map = dict(composite_transform=dict(), + elapsed_time=dict(), forward_invert_flags=dict(), forward_transforms=dict(), inverse_composite_transform=dict(), inverse_warped_image=dict(), + metric_value=dict(), reverse_invert_flags=dict(), reverse_transforms=dict(), save_state=dict(), From 44a71bba4904478ce9aa5c707ab516d37badf870 Mon Sep 17 00:00:00 2001 From: oesteban Date: Sun, 30 Apr 2017 18:50:10 -0700 Subject: [PATCH 009/643] set False as default value for profiling --- nipype/interfaces/ants/registration.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nipype/interfaces/ants/registration.py b/nipype/interfaces/ants/registration.py index 3d1b11eb81..1361603623 100644 --- a/nipype/interfaces/ants/registration.py +++ b/nipype/interfaces/ants/registration.py @@ -379,7 +379,7 @@ class RegistrationInputSpec(ANTSCommandInputSpec): low=0.0, high=1.0, value=0.0, argstr='%s', usedefault=True, desc="The Lower quantile to clip image ranges") verbose = traits.Bool(argstr='-v', default=False) - profiling = traits.Bool(True, usedefault=True, + profiling = traits.Bool(False, usedefault=True, desc='generate profiling output fields') From e746d9406e5643900ffbb56d0d323ee5f5e46886 Mon Sep 17 00:00:00 2001 From: oesteban Date: Sun, 30 Apr 2017 18:54:53 -0700 Subject: [PATCH 010/643] initialize class properties (avoids test errors if profiling is True) --- nipype/interfaces/ants/registration.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/nipype/interfaces/ants/registration.py b/nipype/interfaces/ants/registration.py index 1361603623..2d124d0ec9 100644 --- a/nipype/interfaces/ants/registration.py +++ b/nipype/interfaces/ants/registration.py @@ -652,6 +652,11 @@ class Registration(ANTSCommand): _quantilesDone = False _linear_transform_names = ['Rigid', 'Affine', 'Translation', 'CompositeAffine', 'Similarity'] + def __init__(self, **inputs): + super(Registration, self).__init__(**inputs) + self._elapsed_time = 0.0 + self._metric_value = 0.0 + def _run_interface(self, runtime, correct_return_codes=(0,)): runtime = super(Registration, self)._run_interface(runtime) @@ -661,11 +666,10 @@ def _run_interface(self, runtime, correct_return_codes=(0,)): for l in lines[::-1]: # This should be the last line if l.strip().startswith('Total elapsed time:'): - setattr(self, '_elapsed_time', float( - l.strip().replace('Total elapsed time: ', ''))) + self._elapsed_time = float(l.strip().replace( + 'Total elapsed time: ', '')) elif 'DIAGNOSTIC' in l: - setattr(self, '_metric_value', float( - l.split(',')[2])) + self._metric_value = float(l.split(',')[2]) break return runtime @@ -1004,6 +1008,6 @@ def _list_outputs(self): if len(self.inputs.save_state): outputs['save_state'] = os.path.abspath(self.inputs.save_state) if self.inputs.profiling: - outputs['metric_value'] = getattr(self, '_metric_value') - outputs['elapsed_time'] = getattr(self, '_elapsed_time') + outputs['metric_value'] = self._metric_value + outputs['elapsed_time'] = self._elapsed_time return outputs From 031e0c3a683c832b349c2f97303246bddc319dc6 Mon Sep 17 00:00:00 2001 From: oesteban Date: Tue, 2 May 2017 16:52:55 -0700 Subject: [PATCH 011/643] fix doctests, update outputs hash in base --- nipype/interfaces/ants/registration.py | 4 ++++ nipype/interfaces/tests/test_base.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/nipype/interfaces/ants/registration.py b/nipype/interfaces/ants/registration.py index 2d124d0ec9..a9ac24cee0 100644 --- a/nipype/interfaces/ants/registration.py +++ b/nipype/interfaces/ants/registration.py @@ -518,10 +518,12 @@ class Registration(ANTSCommand): >>> outputs = reg4._list_outputs() >>> pprint.pprint(outputs) # doctest: +ELLIPSIS, +NORMALIZE_WHITESPACE +ALLOW_UNICODE {'composite_transform': '.../nipype/testing/data/output_Composite.h5', + 'elapsed_time': , 'forward_invert_flags': [], 'forward_transforms': [], 'inverse_composite_transform': '.../nipype/testing/data/output_InverseComposite.h5', 'inverse_warped_image': , + 'metric_value': , 'reverse_invert_flags': [], 'reverse_transforms': [], 'save_state': '.../nipype/testing/data/trans.mat', @@ -543,11 +545,13 @@ class Registration(ANTSCommand): >>> outputs = reg4b._list_outputs() >>> pprint.pprint(outputs) # doctest: +ELLIPSIS, +NORMALIZE_WHITESPACE +ALLOW_UNICODE {'composite_transform': , + 'metric_value': , 'forward_invert_flags': [False, False], 'forward_transforms': ['.../nipype/testing/data/output_0GenericAffine.mat', '.../nipype/testing/data/output_1Warp.nii.gz'], 'inverse_composite_transform': , 'inverse_warped_image': , + 'metric_value': , 'reverse_invert_flags': [True, False], 'reverse_transforms': ['.../nipype/testing/data/output_0GenericAffine.mat', \ '.../nipype/testing/data/output_1InverseWarp.nii.gz'], diff --git a/nipype/interfaces/tests/test_base.py b/nipype/interfaces/tests/test_base.py index e27779ce02..da1432e3ba 100644 --- a/nipype/interfaces/tests/test_base.py +++ b/nipype/interfaces/tests/test_base.py @@ -465,7 +465,7 @@ def __init__(self, **inputs): assert {} == check_dict(data_dict, tsthash2.inputs.get_traitsfree()) _, hashvalue = tsthash.inputs.get_hashval(hash_method='timestamp') - assert 'ec5755e07287e04a4b409e03b77a517c' == hashvalue + assert '6479ade7424f2c2920f0b4e3991259e9' == hashvalue def test_input_version(): From 410a825958222e7522bf526760b3d859952b5b05 Mon Sep 17 00:00:00 2001 From: Joke Durnez Date: Sat, 3 Jun 2017 18:00:46 -0700 Subject: [PATCH 012/643] Update model.py The base name tbss in randomise is very confusing, so I changed it to randomise (and removed the _, as FSL adds it too). Also, the cluster thresholds with 2 digits are not read. Not sure about the other thresholds, so I didn't touch those. --- nipype/interfaces/fsl/model.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nipype/interfaces/fsl/model.py b/nipype/interfaces/fsl/model.py index f45f6d62fb..d1a03a0879 100644 --- a/nipype/interfaces/fsl/model.py +++ b/nipype/interfaces/fsl/model.py @@ -1819,7 +1819,7 @@ class RandomiseInputSpec(FSLCommandInputSpec): in_file = File(exists=True, desc='4D input file', argstr='-i %s', position=0, mandatory=True) base_name = traits.Str( - 'tbss_', desc='the rootname that all generated files will have', + 'randomise', desc='the rootname that all generated files will have', argstr='-o "%s"', position=1, usedefault=True) design_mat = File( exists=True, desc='design matrix file', argstr='-d %s', position=2) @@ -1866,9 +1866,9 @@ class RandomiseInputSpec(FSLCommandInputSpec): var_smooth = traits.Int( argstr='-v %d', desc='use variance smoothing (std is in mm)') c_thresh = traits.Float( - argstr='-c %.2f', desc='carry out cluster-based thresholding') + argstr='-c %.1f', desc='carry out cluster-based thresholding') cm_thresh = traits.Float( - argstr='-C %.2f', desc='carry out cluster-mass-based thresholding') + argstr='-C %.1f', desc='carry out cluster-mass-based thresholding') f_c_thresh = traits.Float( argstr='-F %.2f', desc='carry out f cluster thresholding') f_cm_thresh = traits.Float( @@ -1912,7 +1912,7 @@ class Randomise(FSLCommand): >>> import nipype.interfaces.fsl as fsl >>> rand = fsl.Randomise(in_file='allFA.nii', mask = 'mask.nii', tcon='design.con', design_mat='design.mat') >>> rand.cmdline # doctest: +ALLOW_UNICODE - 'randomise -i allFA.nii -o "tbss_" -d design.mat -t design.con -m mask.nii' + 'randomise -i allFA.nii -o "randomise" -d design.mat -t design.con -m mask.nii' """ From 3e279851cc16f814a3e4e270f86c193617b05fcb Mon Sep 17 00:00:00 2001 From: Horea Christian Date: Sun, 28 May 2017 23:00:41 +0200 Subject: [PATCH 013/643] ENH: added interface for FSL's dual_Regression --- nipype/interfaces/fsl/model.py | 66 +++++++++++++++++++ .../fsl/tests/test_auto_DualRegression.py | 64 ++++++++++++++++++ 2 files changed, 130 insertions(+) create mode 100644 nipype/interfaces/fsl/tests/test_auto_DualRegression.py diff --git a/nipype/interfaces/fsl/model.py b/nipype/interfaces/fsl/model.py index f45f6d62fb..b4d3fb56f8 100644 --- a/nipype/interfaces/fsl/model.py +++ b/nipype/interfaces/fsl/model.py @@ -1815,6 +1815,72 @@ def _format_arg(self, name, spec, value): return super(Cluster, self)._format_arg(name, spec, value) +class DualRegressionInputSpec(FSLCommandInputSpec): + in_files = InputMultiPath(File(exists=True), argstr="%s", mandatory=True, + position=-1, sep=" ", + desc="List all subjects' preprocessed, standard-space 4D datasets",) + group_IC_maps_4D = File(exists=True, argstr="%s", mandatory=True, position=1, + desc="4D image containing spatial IC maps (melodic_IC) from the " + "whole-group ICA analysis") + des_norm = traits.Bool(True, argstr="%i", position=2, usedefault=True, + desc="Whether to variance-normalise the timecourses used as the " + "stage-2 regressors; True is default and recommended") + one_sample_group_mean = traits.Bool(argstr="-1", position=3, + desc="perform 1-sample group-mean test instead of generic " + "permutation test") + design_file = File(exists=True, argstr="%s", position=3, + desc="Design matrix for final cross-subject modelling with " + "randomise") + con_file = File(exists=True, argstr="%s", position=4, + desc="Design contrasts for final cross-subject modelling with " + "randomise") + n_perm = traits.Int(argstr="%i", mandatory=True, position=5, + desc="Number of permutations for randomise; set to 1 for just raw " + "tstat output, set to 0 to not run randomise at all.") + out_dir = Directory("output", argstr="%s", usedefault=True, position=6, + desc="This directory will be created to hold all output and logfiles", + genfile=True) + + +class DualRegressionOutputSpec(TraitedSpec): + out_dir = Directory(exists=True) + + +class DualRegression(FSLCommand): + """Wrapper Script for Dual Regression Workflow + + Examples + -------- + + >>> dual_regression = DualRegression() + >>> dual_regression.inputs.in_files = ["functional.nii", "functional2.nii", "functional3.nii"] + >>> dual_regression.inputs.group_IC_maps_4D = "allFA.nii" + >>> dual_regression.inputs.des_norm = False + >>> dual_regression.inputs.one_sample_group_mean = True + >>> dual_regression.inputs.n_perm = 10 + >>> dual_regression.inputs.out_dir = "my_output_directory" + >>> dual_regression.cmdline # doctest: +ALLOW_UNICODE + u'dual_regression allFA.nii 0 -1 10 my_output_directory functional.nii functional2.nii functional3.nii' + >>> dual_regression.run() # doctest: +SKIP + + """ + input_spec = DualRegressionInputSpec + output_spec = DualRegressionOutputSpec + _cmd = 'dual_regression' + + def _list_outputs(self): + outputs = self.output_spec().get() + if isdefined(self.inputs.out_dir): + outputs['out_dir'] = os.path.abspath(self.inputs.out_dir) + else: + outputs['out_dir'] = self._gen_filename("out_dir") + return outputs + + def _gen_filename(self, name): + if name == "out_dir": + return os.getcwd() + + class RandomiseInputSpec(FSLCommandInputSpec): in_file = File(exists=True, desc='4D input file', argstr='-i %s', position=0, mandatory=True) diff --git a/nipype/interfaces/fsl/tests/test_auto_DualRegression.py b/nipype/interfaces/fsl/tests/test_auto_DualRegression.py new file mode 100644 index 0000000000..02c68ebc24 --- /dev/null +++ b/nipype/interfaces/fsl/tests/test_auto_DualRegression.py @@ -0,0 +1,64 @@ +# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT +from __future__ import unicode_literals +from ..model import DualRegression + + +def test_DualRegression_inputs(): + input_map = dict(args=dict(argstr='%s', + ), + con_file=dict(argstr='%s', + position=4, + ), + des_norm=dict(argstr='%i', + position=2, + usedefault=True, + ), + design_file=dict(argstr='%s', + position=3, + ), + environ=dict(nohash=True, + usedefault=True, + ), + group_IC_maps_4D=dict(argstr='%s', + mandatory=True, + position=1, + ), + ignore_exception=dict(nohash=True, + usedefault=True, + ), + in_files=dict(argstr='%s', + mandatory=True, + position=-1, + sep=' ', + ), + n_perm=dict(argstr='%i', + mandatory=True, + position=5, + ), + one_sample_group_mean=dict(argstr='-1', + position=3, + ), + out_dir=dict(argstr='%s', + genfile=True, + position=6, + usedefault=True, + ), + output_type=dict(), + terminal_output=dict(nohash=True, + ), + ) + inputs = DualRegression.input_spec() + + for key, metadata in list(input_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(inputs.traits()[key], metakey) == value + + +def test_DualRegression_outputs(): + output_map = dict(out_dir=dict(), + ) + outputs = DualRegression.output_spec() + + for key, metadata in list(output_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(outputs.traits()[key], metakey) == value From 38bec095348f4c3c7825b63920360790185ec91c Mon Sep 17 00:00:00 2001 From: Julia Huntenburg Date: Fri, 13 May 2016 09:50:59 +0200 Subject: [PATCH 014/643] adapting mp2rage masking interface to new parameter names in cbstools 3 --- nipype/interfaces/mipav/developer.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nipype/interfaces/mipav/developer.py b/nipype/interfaces/mipav/developer.py index ac42f7c5a9..141a7de1cf 100644 --- a/nipype/interfaces/mipav/developer.py +++ b/nipype/interfaces/mipav/developer.py @@ -722,10 +722,10 @@ class JistIntensityMp2rageMaskingInputSpec(CommandLineInputSpec): inSkip = traits.Enum("true", "false", desc="Skip zero values", argstr="--inSkip %s") inMasking = traits.Enum("binary", "proba", desc="Whether to use a binary threshold or a weighted average based on the probability.", argstr="--inMasking %s") xPrefExt = traits.Enum("nrrd", desc="Output File Type", argstr="--xPrefExt %s") - outSignal = traits.Either(traits.Bool, File(), hash_files=False, desc="Signal Proba Image", argstr="--outSignal %s") - outSignal2 = traits.Either(traits.Bool, File(), hash_files=False, desc="Signal Mask Image", argstr="--outSignal2 %s") - outMasked = traits.Either(traits.Bool, File(), hash_files=False, desc="Masked T1 Map Image", argstr="--outMasked %s") - outMasked2 = traits.Either(traits.Bool, File(), hash_files=False, desc="Masked Iso Image", argstr="--outMasked2 %s") + outSignal = traits.Either(traits.Bool, File(), hash_files=False, desc="Signal Proba Image", argstr="--outSignal_Proba %s") + outSignal2 = traits.Either(traits.Bool, File(), hash_files=False, desc="Signal Mask Image", argstr="--outSignal_Mask %s") + outMasked = traits.Either(traits.Bool, File(), hash_files=False, desc="Masked T1 Map Image", argstr="--outMasked_T1_Map %s") + outMasked2 = traits.Either(traits.Bool, File(), hash_files=False, desc="Masked Iso Image", argstr="--outMasked_T1weighted %s") null = traits.Str(desc="Execution Time", argstr="--null %s") xDefaultMem = traits.Int(desc="Set default maximum heap size", argstr="-xDefaultMem %d") xMaxProcess = traits.Int(1, desc="Set default maximum number of processes.", argstr="-xMaxProcess %d", usedefault=True) From b5e43b8a653a2939659657f954e0617891233f90 Mon Sep 17 00:00:00 2001 From: jdkent Date: Mon, 5 Jun 2017 14:02:12 -0500 Subject: [PATCH 015/643] FIX: added isdefined module to ICA_AROMA.py --- nipype/interfaces/fsl/ICA_AROMA.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/nipype/interfaces/fsl/ICA_AROMA.py b/nipype/interfaces/fsl/ICA_AROMA.py index 7129602d65..9828a93cc3 100644 --- a/nipype/interfaces/fsl/ICA_AROMA.py +++ b/nipype/interfaces/fsl/ICA_AROMA.py @@ -13,7 +13,7 @@ from __future__ import print_function, division, unicode_literals, absolute_import from ..base import (TraitedSpec, CommandLineInputSpec, CommandLine, - File, Directory, traits) + File, Directory, traits, isdefined) import os @@ -109,7 +109,7 @@ def _list_outputs(self): else: outputs['out_dir'] = self._gen_filename('out_dir') out_dir = outputs['out_dir'] - + if self.inputs.denoise_type in ('aggr', 'both'): outputs['aggr_denoised_file'] = os.path.join(out_dir, 'denoised_func_data_aggr.nii.gz') if self.inputs.denoise_type in ('nonaggr', 'both'): @@ -119,5 +119,3 @@ def _list_outputs(self): def _gen_filename(self, name): if name == 'out_dir': return os.getcwd() - - From 0c57d74c5c0d5bb67bfc9369591cc52eae04afdd Mon Sep 17 00:00:00 2001 From: Satrajit Ghosh Date: Mon, 5 Jun 2017 18:33:44 -0400 Subject: [PATCH 016/643] fix: check before commit --- README.rst | 2 +- nipype/interfaces/fsl/ICA_AROMA.py | 4 ++-- .../mipav/tests/test_auto_JistIntensityMp2rageMasking.py | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.rst b/README.rst index aa41f34d66..5064198dd6 100644 --- a/README.rst +++ b/README.rst @@ -33,7 +33,7 @@ NIPYPE: Neuroimaging in Python: Pipelines and Interfaces .. image:: https://img.shields.io/badge/gitter-join%20chat%20%E2%86%92-brightgreen.svg?style=flat :target: http://gitter.im/nipy/nipype :alt: Chat - + .. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.581704.svg :target: https://doi.org/10.5281/zenodo.581704 diff --git a/nipype/interfaces/fsl/ICA_AROMA.py b/nipype/interfaces/fsl/ICA_AROMA.py index 7129602d65..8708bb5345 100644 --- a/nipype/interfaces/fsl/ICA_AROMA.py +++ b/nipype/interfaces/fsl/ICA_AROMA.py @@ -109,7 +109,7 @@ def _list_outputs(self): else: outputs['out_dir'] = self._gen_filename('out_dir') out_dir = outputs['out_dir'] - + if self.inputs.denoise_type in ('aggr', 'both'): outputs['aggr_denoised_file'] = os.path.join(out_dir, 'denoised_func_data_aggr.nii.gz') if self.inputs.denoise_type in ('nonaggr', 'both'): @@ -120,4 +120,4 @@ def _gen_filename(self, name): if name == 'out_dir': return os.getcwd() - + diff --git a/nipype/interfaces/mipav/tests/test_auto_JistIntensityMp2rageMasking.py b/nipype/interfaces/mipav/tests/test_auto_JistIntensityMp2rageMasking.py index 95700af1be..0fd3ed52e4 100644 --- a/nipype/interfaces/mipav/tests/test_auto_JistIntensityMp2rageMasking.py +++ b/nipype/interfaces/mipav/tests/test_auto_JistIntensityMp2rageMasking.py @@ -26,16 +26,16 @@ def test_JistIntensityMp2rageMasking_inputs(): ), null=dict(argstr='--null %s', ), - outMasked=dict(argstr='--outMasked %s', + outMasked=dict(argstr='--outMasked_T1_Map %s', hash_files=False, ), - outMasked2=dict(argstr='--outMasked2 %s', + outMasked2=dict(argstr='--outMasked_T1weighted %s', hash_files=False, ), - outSignal=dict(argstr='--outSignal %s', + outSignal=dict(argstr='--outSignal_Proba %s', hash_files=False, ), - outSignal2=dict(argstr='--outSignal2 %s', + outSignal2=dict(argstr='--outSignal_Mask %s', hash_files=False, ), terminal_output=dict(nohash=True, From 100bb8e37f9b4d68a42db6e89fe3e11932fdae11 Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Tue, 6 Jun 2017 16:25:53 -0400 Subject: [PATCH 017/643] ENH: Only write FLIRT log if not previously written --- nipype/interfaces/fsl/preprocess.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nipype/interfaces/fsl/preprocess.py b/nipype/interfaces/fsl/preprocess.py index 882611738e..096bc571bb 100644 --- a/nipype/interfaces/fsl/preprocess.py +++ b/nipype/interfaces/fsl/preprocess.py @@ -549,13 +549,15 @@ class FLIRT(FSLCommand): _cmd = 'flirt' input_spec = FLIRTInputSpec output_spec = FLIRTOutputSpec + _log_written = False def aggregate_outputs(self, runtime=None, needed_outputs=None): outputs = super(FLIRT, self).aggregate_outputs( runtime=runtime, needed_outputs=needed_outputs) - if isdefined(self.inputs.save_log) and self.inputs.save_log: + if self.inputs.save_log and not self._log_written: with open(outputs.out_log, "a") as text_file: text_file.write(runtime.stdout + '\n') + self._log_written = True return outputs def _parse_inputs(self, skip=None): From 6b08c271e6bbcdb68a500713402ad9765a9f917a Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Tue, 6 Jun 2017 16:26:52 -0400 Subject: [PATCH 018/643] STY: Clean up FLIRT._parse_inputs --- nipype/interfaces/fsl/preprocess.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/nipype/interfaces/fsl/preprocess.py b/nipype/interfaces/fsl/preprocess.py index 096bc571bb..bf9f169145 100644 --- a/nipype/interfaces/fsl/preprocess.py +++ b/nipype/interfaces/fsl/preprocess.py @@ -561,17 +561,18 @@ def aggregate_outputs(self, runtime=None, needed_outputs=None): return outputs def _parse_inputs(self, skip=None): - skip = [] - if isdefined(self.inputs.save_log) and self.inputs.save_log: - if not isdefined(self.inputs.verbose) or self.inputs.verbose == 0: - self.inputs.verbose = 1 - if isdefined(self.inputs.apply_xfm) and self.inputs.apply_xfm: - if not self.inputs.in_matrix_file and not self.inputs.uses_qform: - raise RuntimeError('Argument apply_xfm requires in_matrix_file ' - 'or uses_qform arguments to run') + if skip is None: + skip = [] + if self.inputs.save_log and not self.inputs.verbose: + self.inputs.verbose = 1 + if self.inputs.apply_xfm and not (self.inputs.in_matrix_file or + self.inputs.uses_qform): + raise RuntimeError('Argument apply_xfm requires in_matrix_file or ' + 'uses_qform arguments to run') skip.append('save_log') return super(FLIRT, self)._parse_inputs(skip=skip) + class ApplyXFMInputSpec(FLIRTInputSpec): apply_xfm = traits.Bool( True, argstr='-applyxfm', From 2e545a3a8a0d3905100d1684860bdb11c1023777 Mon Sep 17 00:00:00 2001 From: Oscar Esteban Date: Wed, 14 Jun 2017 00:29:26 -0700 Subject: [PATCH 019/643] change way Plugin is imported --- nipype/pipeline/engine/workflows.py | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/nipype/pipeline/engine/workflows.py b/nipype/pipeline/engine/workflows.py index 35bd575edd..3fddc0f037 100644 --- a/nipype/pipeline/engine/workflows.py +++ b/nipype/pipeline/engine/workflows.py @@ -57,6 +57,7 @@ from .base import EngineBase from .nodes import Node, MapNode +from .. import plugins package_check('networkx', '1.3') logger = logging.getLogger('workflow') @@ -557,16 +558,8 @@ def run(self, plugin=None, plugin_args=None, updatehash=False): if not isinstance(plugin, (str, bytes)): runner = plugin else: - name = 'nipype.pipeline.plugins' - try: - __import__(name) - except ImportError: - msg = 'Could not import plugin module: %s' % name - logger.error(msg) - raise ImportError(msg) - else: - plugin_mod = getattr(sys.modules[name], '%sPlugin' % plugin) - runner = plugin_mod(plugin_args=plugin_args) + SelectedPlugin = getattr(plugins, '%sPlugin' % plugin) + runner = SelectedPlugin(plugin_args=plugin_args) flatgraph = self._create_flat_graph() self.config = merge_dict(deepcopy(config._sections), self.config) if 'crashdump_dir' in self.config: From 63185c846c1df47c36f4bf7fa6ea3aab07fb2eab Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Wed, 14 Jun 2017 09:57:20 -0400 Subject: [PATCH 020/643] Generate module name dynamically --- nipype/pipeline/engine/workflows.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/nipype/pipeline/engine/workflows.py b/nipype/pipeline/engine/workflows.py index 3fddc0f037..f30ed50051 100644 --- a/nipype/pipeline/engine/workflows.py +++ b/nipype/pipeline/engine/workflows.py @@ -57,7 +57,6 @@ from .base import EngineBase from .nodes import Node, MapNode -from .. import plugins package_check('networkx', '1.3') logger = logging.getLogger('workflow') @@ -558,8 +557,16 @@ def run(self, plugin=None, plugin_args=None, updatehash=False): if not isinstance(plugin, (str, bytes)): runner = plugin else: - SelectedPlugin = getattr(plugins, '%sPlugin' % plugin) - runner = SelectedPlugin(plugin_args=plugin_args) + name = '.'.join(__name__.split('.')[:-2] + ['plugins']) + try: + __import__(name) + except ImportError: + msg = 'Could not import plugin module: %s' % name + logger.error(msg) + raise ImportError(msg) + else: + plugin_mod = getattr(sys.modules[name], '%sPlugin' % plugin) + runner = plugin_mod(plugin_args=plugin_args) flatgraph = self._create_flat_graph() self.config = merge_dict(deepcopy(config._sections), self.config) if 'crashdump_dir' in self.config: From 0b65585c4bc8c1bbbc33dccc47ab0df183d4bc25 Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Wed, 14 Jun 2017 10:28:40 -0400 Subject: [PATCH 021/643] Update AFNI pin to current NeuroDebian package --- docker/base.Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/base.Dockerfile b/docker/base.Dockerfile index 1c4b1c490f..60b7347cf6 100644 --- a/docker/base.Dockerfile +++ b/docker/base.Dockerfile @@ -76,7 +76,7 @@ RUN apt-get update && \ apt-get install -y --no-install-recommends \ fsl-core=5.0.9-1~nd+1+nd16.04+1 \ fsl-mni152-templates=5.0.7-2 \ - afni=16.2.07~dfsg.1-2~nd16.04+1 \ + afni=16.2.07~dfsg.1-5~nd16.04+1 \ bzip2 \ ca-certificates \ xvfb \ From 6f2917f0277364246cb39359d3089d3a6b9e8fb9 Mon Sep 17 00:00:00 2001 From: oesteban Date: Wed, 14 Jun 2017 08:24:05 -0700 Subject: [PATCH 022/643] update AFNI version pin --- docker/base.Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/base.Dockerfile b/docker/base.Dockerfile index 1c4b1c490f..60b7347cf6 100644 --- a/docker/base.Dockerfile +++ b/docker/base.Dockerfile @@ -76,7 +76,7 @@ RUN apt-get update && \ apt-get install -y --no-install-recommends \ fsl-core=5.0.9-1~nd+1+nd16.04+1 \ fsl-mni152-templates=5.0.7-2 \ - afni=16.2.07~dfsg.1-2~nd16.04+1 \ + afni=16.2.07~dfsg.1-5~nd16.04+1 \ bzip2 \ ca-certificates \ xvfb \ From 610af0e53fd21d51bc86db2e34c7c50074107a83 Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Wed, 14 Jun 2017 11:47:35 -0400 Subject: [PATCH 023/643] Remove APT version pins --- docker/base.Dockerfile | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/docker/base.Dockerfile b/docker/base.Dockerfile index 60b7347cf6..cc0d80f611 100644 --- a/docker/base.Dockerfile +++ b/docker/base.Dockerfile @@ -74,22 +74,21 @@ RUN curl -sSL http://neuro.debian.net/lists/xenial.us-ca.full >> /etc/apt/source # Installing general Debian utilities and Neurodebian packages (FSL, AFNI, git) RUN apt-get update && \ apt-get install -y --no-install-recommends \ - fsl-core=5.0.9-1~nd+1+nd16.04+1 \ - fsl-mni152-templates=5.0.7-2 \ - afni=16.2.07~dfsg.1-5~nd16.04+1 \ + fsl-core \ + fsl-mni152-templates \ + afni \ bzip2 \ - ca-certificates \ xvfb \ - git=1:2.7.4-0ubuntu1 \ - graphviz=2.38.0-12ubuntu2 \ + git \ + graphviz \ unzip \ apt-utils \ fusefat \ make \ file \ # Added g++ to compile dipy in py3.6 - g++=4:5.3.1-1ubuntu1 \ - ruby=1:2.3.0+1 && \ + g++ \ + ruby && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* From ad085ae86c9dbb97aedb316562ea31f79c5923fe Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Wed, 14 Jun 2017 11:52:12 -0400 Subject: [PATCH 024/643] CI: Push nipype/base:latest on release --- circle.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/circle.yml b/circle.yml index b122653b79..5624dbb7f8 100644 --- a/circle.yml +++ b/circle.yml @@ -74,6 +74,8 @@ deployment: tag: /.*/ commands: # Deploy to docker hub + - if [[ -n "$DOCKER_PASS" ]]; then docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS && docker push nipype/base:latest; fi : + timeout: 21600 - if [[ -n "$DOCKER_PASS" ]]; then docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS && docker push nipype/nipype:latest; fi : timeout: 21600 - if [[ -n "$DOCKER_PASS" ]]; then docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS && docker tag nipype/nipype nipype/nipype:$CIRCLE_TAG && docker push nipype/nipype:$CIRCLE_TAG; fi : From 0d3279d3910bb1ccfd8a7348cfae5058eb038988 Mon Sep 17 00:00:00 2001 From: Satrajit Ghosh Date: Wed, 14 Jun 2017 14:48:20 -0400 Subject: [PATCH 025/643] fix: do not create a nipype folder in the home directory by default --- nipype/utils/config.py | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/nipype/utils/config.py b/nipype/utils/config.py index 42998861e7..ebea9e5816 100644 --- a/nipype/utils/config.py +++ b/nipype/utils/config.py @@ -88,26 +88,11 @@ class NipypeConfig(object): def __init__(self, *args, **kwargs): self._config = configparser.ConfigParser() config_dir = os.path.expanduser('~/.nipype') - mkdir_p(config_dir) - old_config_file = os.path.expanduser('~/.nipype.cfg') - new_config_file = os.path.join(config_dir, 'nipype.cfg') - # To be deprecated in two releases - if os.path.exists(old_config_file): - if os.path.exists(new_config_file): - msg = ("Detected presence of both old (%s, used by versions " - "< 0.5.2) and new (%s) config files. This version will " - "proceed with the new one. We advise to merge settings " - "and remove old config file if you are not planning to " - "use previous releases of nipype.") % (old_config_file, - new_config_file) - warn(msg) - else: - warn("Moving old config file from: %s to %s" % (old_config_file, - new_config_file)) - shutil.move(old_config_file, new_config_file) + config_file = os.path.join(config_dir, 'nipype.cfg') self.data_file = os.path.join(config_dir, 'nipype.json') self._config.readfp(StringIO(default_cfg)) - self._config.read([new_config_file, old_config_file, 'nipype.cfg']) + if os.path.exists(config_dir): + self._config.read([config_file, 'nipype.cfg']) def set_default_config(self): self._config.readfp(StringIO(default_cfg)) @@ -164,6 +149,10 @@ def save_data(self, key, value): with open(self.data_file, 'rt') as file: portalocker.lock(file, portalocker.LOCK_EX) datadict = load(file) + else: + dirname = os.path.dirname(self.data_file) + if not os.path.exists(dirname): + mkdir_p(dirname) with open(self.data_file, 'wt') as file: portalocker.lock(file, portalocker.LOCK_EX) datadict[key] = value From e97caa44d6001b3c9f9edb8c88c72dbe8a288d35 Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Thu, 8 Jun 2017 14:21:23 -0400 Subject: [PATCH 026/643] ENH: Enable per-stage masking in ants.Registration --- nipype/interfaces/ants/registration.py | 32 ++++++++++++------- .../ants/tests/test_auto_Registration.py | 6 ++-- 2 files changed, 23 insertions(+), 15 deletions(-) diff --git a/nipype/interfaces/ants/registration.py b/nipype/interfaces/ants/registration.py index 27e3caa1cc..7ef3161792 100644 --- a/nipype/interfaces/ants/registration.py +++ b/nipype/interfaces/ants/registration.py @@ -219,12 +219,14 @@ class RegistrationInputSpec(ANTSCommandInputSpec): usedefault=True, desc='image dimension (2 or 3)') fixed_image = InputMultiPath(File(exists=True), mandatory=True, desc='image to apply transformation to (generally a coregistered functional)') - fixed_image_mask = File(argstr='%s', exists=True, - desc='mask used to limit metric sampling region of the fixed image') + fixed_image_mask = InputMultiPath( + traits.Either('NULL', File(exists=True)), + desc='mask used to limit metric sampling region of the fixed image') moving_image = InputMultiPath(File(exists=True), mandatory=True, desc='image to apply transformation to (generally a coregistered functional)') - moving_image_mask = File(requires=['fixed_image_mask'], - exists=True, desc='mask used to limit metric sampling region of the moving image') + moving_image_mask = InputMultiPath( + traits.Either('NULL', File(exists=True)), + desc='mask used to limit metric sampling region of the moving image') save_state = File(argstr='--save-state %s', exists=False, desc='Filename for saving the internal restorable state of the registration') @@ -783,6 +785,20 @@ def _format_registration(self): if isdefined(self.inputs.restrict_deformation): retval.append('--restrict-deformation %s' % self._format_xarray(self.inputs.restrict_deformation[ii])) + if any((isdefined(self.inputs.fixed_image_mask), + isdefined(self.inputs.moving_image_mask))): + if isdefined(self.inputs.fixed_image_mask): + fixed_masks = filename_to_list(self.inputs.fixed_image_mask) + fixed_mask = fixed_mask[ii if len(fixed_masks) > 1 else 0] + else: + fixed_mask = 'NULL' + + if isdefined(self.inputs.moving_image_mask): + moving_masks = filename_to_list(self.inputs.moving_image_mask) + moving_mask = moving_mask[ii if len(moving_masks) > 1 else 0] + else: + moving_mask = 'NULL' + retval.append('--masks [ %s, %s ]' % (fixed_mask, moving_mask)) return " ".join(retval) def _get_outputfilenames(self, inverse=False): @@ -827,13 +843,7 @@ def _format_winsorize_image_intensities(self): self.inputs.winsorize_upper_quantile) def _format_arg(self, opt, spec, val): - if opt == 'fixed_image_mask': - if isdefined(self.inputs.moving_image_mask): - return '--masks [ %s, %s ]' % (self.inputs.fixed_image_mask, - self.inputs.moving_image_mask) - else: - return '--masks %s' % self.inputs.fixed_image_mask - elif opt == 'transforms': + if opt == 'transforms': return self._format_registration() elif opt == 'initial_moving_transform': do_invert_transform = self.inputs.invert_initial_moving_transform \ diff --git a/nipype/interfaces/ants/tests/test_auto_Registration.py b/nipype/interfaces/ants/tests/test_auto_Registration.py index dc95deea19..2863b56db2 100644 --- a/nipype/interfaces/ants/tests/test_auto_Registration.py +++ b/nipype/interfaces/ants/tests/test_auto_Registration.py @@ -23,8 +23,7 @@ def test_Registration_inputs(): ), fixed_image=dict(mandatory=True, ), - fixed_image_mask=dict(argstr='%s', - ), + fixed_image_mask=dict(), float=dict(argstr='--float %d', ), ignore_exception=dict(nohash=True, @@ -58,8 +57,7 @@ def test_Registration_inputs(): metric_weight_stage_trait=dict(), moving_image=dict(mandatory=True, ), - moving_image_mask=dict(requires=['fixed_image_mask'], - ), + moving_image_mask=dict(), num_threads=dict(nohash=True, usedefault=True, ), From a73efae2b58000649de1726774d6fbbf3250ba6e Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Thu, 15 Jun 2017 11:11:24 -0400 Subject: [PATCH 027/643] DOC: Clarify use of "NULL" --- nipype/interfaces/ants/registration.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/nipype/interfaces/ants/registration.py b/nipype/interfaces/ants/registration.py index 7ef3161792..7d8ef03fce 100644 --- a/nipype/interfaces/ants/registration.py +++ b/nipype/interfaces/ants/registration.py @@ -221,12 +221,14 @@ class RegistrationInputSpec(ANTSCommandInputSpec): desc='image to apply transformation to (generally a coregistered functional)') fixed_image_mask = InputMultiPath( traits.Either('NULL', File(exists=True)), - desc='mask used to limit metric sampling region of the fixed image') + desc='mask used to limit metric sampling region of the fixed image ' + '(Use "NULL" to omit a mask at a given stage)') moving_image = InputMultiPath(File(exists=True), mandatory=True, desc='image to apply transformation to (generally a coregistered functional)') moving_image_mask = InputMultiPath( traits.Either('NULL', File(exists=True)), - desc='mask used to limit metric sampling region of the moving image') + desc='mask used to limit metric sampling region of the moving image ' + '(Use "NULL" to omit a mask at a given stage)') save_state = File(argstr='--save-state %s', exists=False, desc='Filename for saving the internal restorable state of the registration') From e813102adbfe5eba35a03ca8d72140a14a9dc25d Mon Sep 17 00:00:00 2001 From: Chris Markiewicz Date: Thu, 15 Jun 2017 16:30:32 -0400 Subject: [PATCH 028/643] Revert "ENH: Enable per-stage masking in ants.Registration" --- nipype/interfaces/ants/registration.py | 34 ++++++------------- .../ants/tests/test_auto_Registration.py | 6 ++-- 2 files changed, 15 insertions(+), 25 deletions(-) diff --git a/nipype/interfaces/ants/registration.py b/nipype/interfaces/ants/registration.py index 7d8ef03fce..27e3caa1cc 100644 --- a/nipype/interfaces/ants/registration.py +++ b/nipype/interfaces/ants/registration.py @@ -219,16 +219,12 @@ class RegistrationInputSpec(ANTSCommandInputSpec): usedefault=True, desc='image dimension (2 or 3)') fixed_image = InputMultiPath(File(exists=True), mandatory=True, desc='image to apply transformation to (generally a coregistered functional)') - fixed_image_mask = InputMultiPath( - traits.Either('NULL', File(exists=True)), - desc='mask used to limit metric sampling region of the fixed image ' - '(Use "NULL" to omit a mask at a given stage)') + fixed_image_mask = File(argstr='%s', exists=True, + desc='mask used to limit metric sampling region of the fixed image') moving_image = InputMultiPath(File(exists=True), mandatory=True, desc='image to apply transformation to (generally a coregistered functional)') - moving_image_mask = InputMultiPath( - traits.Either('NULL', File(exists=True)), - desc='mask used to limit metric sampling region of the moving image ' - '(Use "NULL" to omit a mask at a given stage)') + moving_image_mask = File(requires=['fixed_image_mask'], + exists=True, desc='mask used to limit metric sampling region of the moving image') save_state = File(argstr='--save-state %s', exists=False, desc='Filename for saving the internal restorable state of the registration') @@ -787,20 +783,6 @@ def _format_registration(self): if isdefined(self.inputs.restrict_deformation): retval.append('--restrict-deformation %s' % self._format_xarray(self.inputs.restrict_deformation[ii])) - if any((isdefined(self.inputs.fixed_image_mask), - isdefined(self.inputs.moving_image_mask))): - if isdefined(self.inputs.fixed_image_mask): - fixed_masks = filename_to_list(self.inputs.fixed_image_mask) - fixed_mask = fixed_mask[ii if len(fixed_masks) > 1 else 0] - else: - fixed_mask = 'NULL' - - if isdefined(self.inputs.moving_image_mask): - moving_masks = filename_to_list(self.inputs.moving_image_mask) - moving_mask = moving_mask[ii if len(moving_masks) > 1 else 0] - else: - moving_mask = 'NULL' - retval.append('--masks [ %s, %s ]' % (fixed_mask, moving_mask)) return " ".join(retval) def _get_outputfilenames(self, inverse=False): @@ -845,7 +827,13 @@ def _format_winsorize_image_intensities(self): self.inputs.winsorize_upper_quantile) def _format_arg(self, opt, spec, val): - if opt == 'transforms': + if opt == 'fixed_image_mask': + if isdefined(self.inputs.moving_image_mask): + return '--masks [ %s, %s ]' % (self.inputs.fixed_image_mask, + self.inputs.moving_image_mask) + else: + return '--masks %s' % self.inputs.fixed_image_mask + elif opt == 'transforms': return self._format_registration() elif opt == 'initial_moving_transform': do_invert_transform = self.inputs.invert_initial_moving_transform \ diff --git a/nipype/interfaces/ants/tests/test_auto_Registration.py b/nipype/interfaces/ants/tests/test_auto_Registration.py index 2863b56db2..dc95deea19 100644 --- a/nipype/interfaces/ants/tests/test_auto_Registration.py +++ b/nipype/interfaces/ants/tests/test_auto_Registration.py @@ -23,7 +23,8 @@ def test_Registration_inputs(): ), fixed_image=dict(mandatory=True, ), - fixed_image_mask=dict(), + fixed_image_mask=dict(argstr='%s', + ), float=dict(argstr='--float %d', ), ignore_exception=dict(nohash=True, @@ -57,7 +58,8 @@ def test_Registration_inputs(): metric_weight_stage_trait=dict(), moving_image=dict(mandatory=True, ), - moving_image_mask=dict(), + moving_image_mask=dict(requires=['fixed_image_mask'], + ), num_threads=dict(nohash=True, usedefault=True, ), From 90d1d358a4dedaad0cbe8856f0896f00b4076a27 Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Thu, 8 Jun 2017 14:21:23 -0400 Subject: [PATCH 029/643] ENH: Enable antsRegistration 2.2.0+ masking --- nipype/interfaces/ants/registration.py | 47 +++++++++++++++++-- .../ants/tests/test_auto_Registration.py | 12 ++++- 2 files changed, 54 insertions(+), 5 deletions(-) diff --git a/nipype/interfaces/ants/registration.py b/nipype/interfaces/ants/registration.py index 27e3caa1cc..cf5c18333e 100644 --- a/nipype/interfaces/ants/registration.py +++ b/nipype/interfaces/ants/registration.py @@ -11,6 +11,7 @@ from builtins import range, str import os +from ...utils.filemanip import filename_to_list from ..base import TraitedSpec, File, Str, traits, InputMultiPath, isdefined from .base import ANTSCommand, ANTSCommandInputSpec @@ -219,12 +220,22 @@ class RegistrationInputSpec(ANTSCommandInputSpec): usedefault=True, desc='image dimension (2 or 3)') fixed_image = InputMultiPath(File(exists=True), mandatory=True, desc='image to apply transformation to (generally a coregistered functional)') - fixed_image_mask = File(argstr='%s', exists=True, - desc='mask used to limit metric sampling region of the fixed image') + fixed_image_mask = File( + exists=True, argstr='%s', max_ver='2.1.0', xor=['fixed_image_masks'], + desc='mask used to limit metric sampling region of the fixed image') + fixed_image_masks = InputMultiPath( + traits.Either('NULL', File(exists=True)), min_ver='2.2.0', xor=['fixed_image_mask'], + desc='mask used to limit metric sampling region of the fixed image ' + '(Use "NULL" to omit a mask at a given stage)') moving_image = InputMultiPath(File(exists=True), mandatory=True, desc='image to apply transformation to (generally a coregistered functional)') - moving_image_mask = File(requires=['fixed_image_mask'], - exists=True, desc='mask used to limit metric sampling region of the moving image') + moving_image_mask = File( + exists=True, requires=['fixed_image_mask'], max_ver='2.1.0', xor=['moving_image_masks'], + desc='mask used to limit metric sampling region of the moving image') + moving_image_masks = InputMultiPath( + traits.Either('NULL', File(exists=True)), min_ver='2.2.0', xor=['moving_image_mask'], + desc='mask used to limit metric sampling region of the moving image ' + '(Use "NULL" to omit a mask at a given stage)') save_state = File(argstr='--save-state %s', exists=False, desc='Filename for saving the internal restorable state of the registration') @@ -648,6 +659,20 @@ class Registration(ANTSCommand): --metric Mattes[ fixed1.nii, moving1.nii, 1, 32 ] --convergence [ 100x50x30, 1e-09, 20 ] \ --smoothing-sigmas 2.0x1.0x0.0vox --shrink-factors 3x2x1 --use-estimate-learning-rate-once 1 \ --use-histogram-matching 1 --winsorize-image-intensities [ 0.0, 1.0 ] --write-composite-transform 1' + + >>> # Test masking + >>> reg9 = copy.deepcopy(reg) + >>> reg9.inputs.fixed_image_masks = ['NULL', 'fixed1.nii'] + >>> reg9.cmdline # doctest: +ALLOW_UNICODE + 'antsRegistration --collapse-output-transforms 0 --dimensionality 3 --initial-moving-transform [ trans.mat, 1 ] \ +--initialize-transforms-per-stage 0 --interpolation Linear --output [ output_, output_warped_image.nii.gz ] \ +--transform Affine[ 2.0 ] --metric Mattes[ fixed1.nii, moving1.nii, 1, 32, Random, 0.05 ] \ +--convergence [ 1500x200, 1e-08, 20 ] --smoothing-sigmas 1.0x0.0vox --shrink-factors 2x1 \ +--use-estimate-learning-rate-once 1 --use-histogram-matching 1 --masks [ NULL, NULL ] \ +--transform SyN[ 0.25, 3.0, 0.0 ] --metric Mattes[ fixed1.nii, moving1.nii, 1, 32 ] \ +--convergence [ 100x50x30, 1e-09, 20 ] --smoothing-sigmas 2.0x1.0x0.0vox --shrink-factors 3x2x1 \ +--use-estimate-learning-rate-once 1 --use-histogram-matching 1 --masks [ fixed1.nii, NULL ] \ +--winsorize-image-intensities [ 0.0, 1.0 ] --write-composite-transform 1' """ DEF_SAMPLING_STRATEGY = 'None' """The default sampling strategy argument.""" @@ -783,6 +808,20 @@ def _format_registration(self): if isdefined(self.inputs.restrict_deformation): retval.append('--restrict-deformation %s' % self._format_xarray(self.inputs.restrict_deformation[ii])) + if any((isdefined(self.inputs.fixed_image_masks), + isdefined(self.inputs.moving_image_masks))): + if isdefined(self.inputs.fixed_image_masks): + fixed_masks = filename_to_list(self.inputs.fixed_image_masks) + fixed_mask = fixed_masks[ii if len(fixed_masks) > 1 else 0] + else: + fixed_mask = 'NULL' + + if isdefined(self.inputs.moving_image_masks): + moving_masks = filename_to_list(self.inputs.moving_image_masks) + moving_mask = moving_masks[ii if len(moving_masks) > 1 else 0] + else: + moving_mask = 'NULL' + retval.append('--masks [ %s, %s ]' % (fixed_mask, moving_mask)) return " ".join(retval) def _get_outputfilenames(self, inverse=False): diff --git a/nipype/interfaces/ants/tests/test_auto_Registration.py b/nipype/interfaces/ants/tests/test_auto_Registration.py index dc95deea19..d437e437f3 100644 --- a/nipype/interfaces/ants/tests/test_auto_Registration.py +++ b/nipype/interfaces/ants/tests/test_auto_Registration.py @@ -24,6 +24,11 @@ def test_Registration_inputs(): fixed_image=dict(mandatory=True, ), fixed_image_mask=dict(argstr='%s', + max_ver='2.1.0', + xor=['fixed_image_masks'], + ), + fixed_image_masks=dict(min_ver='2.2.0', + xor=['fixed_image_mask'], ), float=dict(argstr='--float %d', ), @@ -58,7 +63,12 @@ def test_Registration_inputs(): metric_weight_stage_trait=dict(), moving_image=dict(mandatory=True, ), - moving_image_mask=dict(requires=['fixed_image_mask'], + moving_image_mask=dict(max_ver='2.1.0', + requires=['fixed_image_mask'], + xor=['moving_image_masks'], + ), + moving_image_masks=dict(min_ver='2.2.0', + xor=['moving_image_mask'], ), num_threads=dict(nohash=True, usedefault=True, From a244471a3031efae9c6f4b320abfef1fb65572da Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Thu, 15 Jun 2017 17:38:12 -0400 Subject: [PATCH 030/643] ENH: Add AntsCommand.version property --- nipype/interfaces/ants/base.py | 37 +++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/nipype/interfaces/ants/base.py b/nipype/interfaces/ants/base.py index 208cae8c25..ba7892a533 100644 --- a/nipype/interfaces/ants/base.py +++ b/nipype/interfaces/ants/base.py @@ -4,8 +4,12 @@ """The ants module provides basic functions for interfacing with ANTS tools.""" from __future__ import print_function, division, unicode_literals, absolute_import from builtins import str + +import os +import subprocess + # Local imports -from ... import logging +from ... import logging, LooseVersion from ..base import CommandLine, CommandLineInputSpec, traits, isdefined logger = logging.getLogger('interface') @@ -25,6 +29,33 @@ ALT_ITKv4_THREAD_LIMIT_VARIABLE = 'ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS' +class Info(object): + _version = None + + @property + def version(self): + if self._version is None: + try: + basedir = os.environ['ANTSPATH'] + except KeyError: + return None + + cmd = os.path.join(basedir, 'antsRegistration') + try: + res = subprocess.check_output([cmd, '--version']).decode('utf-8') + except OSError: + return None + + v_string = res.splitlines()[0].split(': ')[1] + # 2.2.0-equivalent version string + if LooseVersion(v_string) >= LooseVersion('2.1.0.post789-g0740f'): + self._version = '2.2.0' + else: + self._version = '.'.join(v_string.split('.')[:3]) + + return self._version + + class ANTSCommandInputSpec(CommandLineInputSpec): """Base Input Specification for all ANTS Commands """ @@ -84,3 +115,7 @@ def set_default_num_threads(cls, num_threads): .inputs.num_threads """ cls._num_threads = num_threads + + @property + def version(self): + return Info().version From 550059878c1bf7ed7e01fc0072e4ebf6633cfe4f Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Thu, 15 Jun 2017 19:34:08 -0400 Subject: [PATCH 031/643] More robust version string finding --- nipype/interfaces/ants/base.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/nipype/interfaces/ants/base.py b/nipype/interfaces/ants/base.py index ba7892a533..f92f84e586 100644 --- a/nipype/interfaces/ants/base.py +++ b/nipype/interfaces/ants/base.py @@ -46,7 +46,13 @@ def version(self): except OSError: return None - v_string = res.splitlines()[0].split(': ')[1] + for line in res.splitlines(): + if line.startswith('ANTs Version: '): + v_string = line.split()[2] + break + else: + return None + # 2.2.0-equivalent version string if LooseVersion(v_string) >= LooseVersion('2.1.0.post789-g0740f'): self._version = '2.2.0' From 61cc7a9af66f672473f376860c5273d53df646ea Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Thu, 15 Jun 2017 19:47:18 -0400 Subject: [PATCH 032/643] Update version check --- nipype/interfaces/ants/base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nipype/interfaces/ants/base.py b/nipype/interfaces/ants/base.py index f92f84e586..e2b68ecc38 100644 --- a/nipype/interfaces/ants/base.py +++ b/nipype/interfaces/ants/base.py @@ -48,13 +48,13 @@ def version(self): for line in res.splitlines(): if line.startswith('ANTs Version: '): - v_string = line.split()[2] + v_string, githash = line.split()[2].split('-') break else: return None # 2.2.0-equivalent version string - if LooseVersion(v_string) >= LooseVersion('2.1.0.post789-g0740f'): + if 'post' in v_string and LooseVersion(v_string) >= LooseVersion('2.1.0.post789'): self._version = '2.2.0' else: self._version = '.'.join(v_string.split('.')[:3]) From 2cf675fd2b17793ef0e75e1c4a206c8689b10245 Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Thu, 15 Jun 2017 20:05:25 -0400 Subject: [PATCH 033/643] Save full version string, derive on demand --- nipype/interfaces/ants/base.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/nipype/interfaces/ants/base.py b/nipype/interfaces/ants/base.py index e2b68ecc38..c83b3473bc 100644 --- a/nipype/interfaces/ants/base.py +++ b/nipype/interfaces/ants/base.py @@ -48,18 +48,18 @@ def version(self): for line in res.splitlines(): if line.startswith('ANTs Version: '): - v_string, githash = line.split()[2].split('-') + self._version = line.split()[2] break else: return None - # 2.2.0-equivalent version string - if 'post' in v_string and LooseVersion(v_string) >= LooseVersion('2.1.0.post789'): - self._version = '2.2.0' - else: - self._version = '.'.join(v_string.split('.')[:3]) + v_string, githash = self._version.split('-') - return self._version + # 2.2.0-equivalent version string + if 'post' in v_string and LooseVersion(v_string) >= LooseVersion('2.1.0.post789'): + return '2.2.0' + else: + return '.'.join(v_string.split('.')[:3]) class ANTSCommandInputSpec(CommandLineInputSpec): From b743f543a258a373317289461c58d0eb56d27559 Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Fri, 16 Jun 2017 09:50:52 -0400 Subject: [PATCH 034/643] Use Neurodebian ANTs package --- docker/base.Dockerfile | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/docker/base.Dockerfile b/docker/base.Dockerfile index cc0d80f611..a5b5134c2c 100644 --- a/docker/base.Dockerfile +++ b/docker/base.Dockerfile @@ -77,6 +77,7 @@ RUN apt-get update && \ fsl-core \ fsl-mni152-templates \ afni \ + ants \ bzip2 \ xvfb \ git \ @@ -103,23 +104,16 @@ ENV FSLDIR=/usr/share/fsl/5.0 \ AFNI_IMSAVE_WARNINGS=NO \ AFNI_TTATLAS_DATASET=/usr/share/afni/atlases \ AFNI_PLUGINPATH=/usr/lib/afni/plugins \ - PATH=/usr/lib/fsl/5.0:/usr/lib/afni/bin:$PATH - -# Installing and setting up ANTs -RUN mkdir -p /opt/ants && \ - curl -sSL "https://dl.dropbox.com/s/2f4sui1z6lcgyek/ANTs-Linux-centos5_x86_64-v2.2.0-0740f91.tar.gz?dl=0" \ - | tar -zx -C /opt - -ENV ANTSPATH=/opt/ants \ - PATH=$ANTSPATH:$PATH + ANTSPATH=/usr/lib/ants +ENV PATH=/usr/lib/fsl/5.0:/usr/lib/afni/bin:$ANTSPATH:$PATH # Installing and setting up c3d RUN mkdir -p /opt/c3d && \ curl -sSL "http://downloads.sourceforge.net/project/c3d/c3d/1.0.0/c3d-1.0.0-Linux-x86_64.tar.gz" \ | tar -xzC /opt/c3d --strip-components 1 -ENV C3DPATH=/opt/c3d/ \ - PATH=$C3DPATH/bin:$PATH +ENV C3DPATH=/opt/c3d/ +ENV PATH=$C3DPATH/bin:$PATH # Install fake-S3 ENV GEM_HOME /usr/lib/ruby/gems/2.3 From 0855161525027be31e20b3118e77f0a9253fb755 Mon Sep 17 00:00:00 2001 From: jdkent Date: Sun, 18 Jun 2017 12:05:11 -0500 Subject: [PATCH 035/643] FIX: typo in ICA_AROMA.py --- nipype/interfaces/fsl/ICA_AROMA.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nipype/interfaces/fsl/ICA_AROMA.py b/nipype/interfaces/fsl/ICA_AROMA.py index 9828a93cc3..a2a341b1ff 100644 --- a/nipype/interfaces/fsl/ICA_AROMA.py +++ b/nipype/interfaces/fsl/ICA_AROMA.py @@ -55,7 +55,7 @@ class ICA_AROMAInputSpec(CommandLineInputSpec): denoise_type = traits.Enum('nonaggr', 'aggr', 'both', 'no', usedefault=True, mandatory=True, argstr='-den %s', desc='Type of denoising strategy:\n' - '-none: only classification, no denoising\n' + '-no: only classification, no denoising\n' '-nonaggr (default): non-aggresssive denoising, i.e. partial component regression\n' '-aggr: aggressive denoising, i.e. full component regression\n' '-both: both aggressive and non-aggressive denoising (two outputs)') From d7ef91a62dfca068beff933eb8136ac69ec3f1cf Mon Sep 17 00:00:00 2001 From: Michael Waskom Date: Mon, 19 Jun 2017 14:14:45 -0400 Subject: [PATCH 036/643] Parse SelectFiles format keys to allow attribute access --- nipype/interfaces/io.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/nipype/interfaces/io.py b/nipype/interfaces/io.py index cfdedd8870..103af06952 100644 --- a/nipype/interfaces/io.py +++ b/nipype/interfaces/io.py @@ -1256,8 +1256,10 @@ def __init__(self, templates, **kwargs): infields = [] for name, template in list(templates.items()): for _, field_name, _, _ in string.Formatter().parse(template): - if field_name is not None and field_name not in infields: - infields.append(field_name) + if field_name is not None: + field_name = re.match("\w+", field_name).group() + if field_name not in infields: + infields.append(field_name) self._infields = infields self._outfields = list(templates) From eb524e52acf92cdc34d7ccbdd9d7d3b9050d7fc7 Mon Sep 17 00:00:00 2001 From: Michael Waskom Date: Wed, 21 Jun 2017 11:09:16 -0400 Subject: [PATCH 037/643] Include realignment matrices in TOPUP outputs --- nipype/interfaces/fsl/epi.py | 8 +++++++- nipype/interfaces/fsl/tests/test_auto_TOPUP.py | 4 ++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/nipype/interfaces/fsl/epi.py b/nipype/interfaces/fsl/epi.py index 1f4a7ded1a..2d41de0c94 100644 --- a/nipype/interfaces/fsl/epi.py +++ b/nipype/interfaces/fsl/epi.py @@ -143,6 +143,9 @@ class TOPUPInputSpec(FSLCommandInputSpec): out_warp_prefix = traits.Str("warpfield", argstr='--dfout=%s', hash_files=False, desc='prefix for the warpfield images (in mm)', usedefault=True) + out_mat_prefix = traits.Str("xfm", argstr='--rbmout=%s', hash_files=False, + desc='prefix for the realignment matrices', + usedefault=True) out_jac_prefix = traits.Str("jac", argstr='--jacout=%s', hash_files=False, desc='prefix for the warpfield images', @@ -247,7 +250,7 @@ class TOPUP(FSLCommand): 'topup --config=b02b0.cnf --datain=topup_encoding.txt \ --imain=b0_b0rev.nii --out=b0_b0rev_base --iout=b0_b0rev_corrected.nii.gz \ --fout=b0_b0rev_field.nii.gz --jacout=jac --logout=b0_b0rev_topup.log \ ---dfout=warpfield' +--rbmout=xfm --dfout=warpfield' >>> res = topup.run() # doctest: +SKIP """ @@ -289,6 +292,9 @@ def _list_outputs(self): outputs['out_jacs'] = [ fmt(prefix=self.inputs.out_jac_prefix, i=i, ext=ext) for i in range(1, n_vols + 1)] + output['out_mats'] = [ + fmt(prefix=self.inputs.out_mat_prefix, i=i, ext=".mat") + for i in range(1, n_vols + 1)] if isdefined(self.inputs.encoding_direction): outputs['out_enc_file'] = self._get_encfilename() diff --git a/nipype/interfaces/fsl/tests/test_auto_TOPUP.py b/nipype/interfaces/fsl/tests/test_auto_TOPUP.py index 28083c6dc0..88f11a77d5 100644 --- a/nipype/interfaces/fsl/tests/test_auto_TOPUP.py +++ b/nipype/interfaces/fsl/tests/test_auto_TOPUP.py @@ -64,6 +64,10 @@ def test_TOPUP_inputs(): name_source=['in_file'], name_template='%s_topup.log', ), + out_mat_prefix=dict(argstr='--rbmout=%s', + hash_files=False, + usedefault=True, + ), out_warp_prefix=dict(argstr='--dfout=%s', hash_files=False, usedefault=True, From bc48a04fd52a979e8f196c00a4c37143cd489b32 Mon Sep 17 00:00:00 2001 From: Michael Waskom Date: Wed, 21 Jun 2017 11:13:50 -0400 Subject: [PATCH 038/643] Update mailmap with new identity --- .mailmap | 1 + 1 file changed, 1 insertion(+) diff --git a/.mailmap b/.mailmap index af5a39bd66..f7d32274fb 100644 --- a/.mailmap +++ b/.mailmap @@ -83,6 +83,7 @@ Michael Waskom Michael Waskom Michael Waskom Michael Waskom Michael Waskom mwaskom Michael Waskom mwaskom +Michael Waskom mwaskom Oscar Esteban Oscar Esteban Oscar Esteban oesteban Russell Poldrack Russ Poldrack From a3a62343d97adfa11a1d48ddad461d126e6127aa Mon Sep 17 00:00:00 2001 From: Michael Waskom Date: Wed, 21 Jun 2017 11:18:23 -0400 Subject: [PATCH 039/643] Add realignment matrices to topup output spec --- nipype/interfaces/fsl/epi.py | 1 + 1 file changed, 1 insertion(+) diff --git a/nipype/interfaces/fsl/epi.py b/nipype/interfaces/fsl/epi.py index 2d41de0c94..ff60a5e6ec 100644 --- a/nipype/interfaces/fsl/epi.py +++ b/nipype/interfaces/fsl/epi.py @@ -224,6 +224,7 @@ class TOPUPOutputSpec(TraitedSpec): out_field = File(desc='name of image file with field (Hz)') out_warps = traits.List(File(exists=True), desc='warpfield images') out_jacs = traits.List(File(exists=True), desc='Jacobian images') + out_mats = traits.List(File(exists=True), desc='realignment matrices') out_corrected = File(desc='name of 4D image file with unwarped images') out_logfile = File(desc='name of log-file') From 27daccc7ff425949aac6056764cd31aad91be98d Mon Sep 17 00:00:00 2001 From: Michael Waskom Date: Wed, 21 Jun 2017 11:45:18 -0400 Subject: [PATCH 040/643] Fix typo --- nipype/interfaces/fsl/epi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nipype/interfaces/fsl/epi.py b/nipype/interfaces/fsl/epi.py index ff60a5e6ec..38c65efeea 100644 --- a/nipype/interfaces/fsl/epi.py +++ b/nipype/interfaces/fsl/epi.py @@ -293,7 +293,7 @@ def _list_outputs(self): outputs['out_jacs'] = [ fmt(prefix=self.inputs.out_jac_prefix, i=i, ext=ext) for i in range(1, n_vols + 1)] - output['out_mats'] = [ + outputs['out_mats'] = [ fmt(prefix=self.inputs.out_mat_prefix, i=i, ext=".mat") for i in range(1, n_vols + 1)] From da57c931f279656f2479dc39aa4a8a49e3b028cb Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Wed, 21 Jun 2017 12:59:25 -0400 Subject: [PATCH 041/643] FIX: Constrain environment dictionary to bytes in Windows --- nipype/interfaces/base.py | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/nipype/interfaces/base.py b/nipype/interfaces/base.py index 8d7c53cde1..2f8b1bf0ea 100644 --- a/nipype/interfaces/base.py +++ b/nipype/interfaces/base.py @@ -1381,6 +1381,35 @@ def _get_ram_mb(pid, pyfunc=False): return mem_mb +def _canonicalize_env(env): + """Windows requires that environment be dicts with bytes as keys and values + This function converts any unicode entries for Windows only, returning the + dictionary untouched in other environments. + + Parameters + ---------- + env : dict + environment dictionary with unicode or bytes keys and values + + Returns + ------- + env : dict + Windows: environment dictionary with bytes keys and values + Other: untouched input ``env`` + """ + if os.name != 'nt': + return env + + out_env = {} + for key, val in env: + if not isinstance(key, bytes): + key = key.encode('utf-8') + if not isinstance(val, bytes): + val = key.encode('utf-8') + out_env[key] = val + return out_env + + # Get max resources used for process def get_max_resources_used(pid, mem_mb, num_threads, pyfunc=False): """Function to get the RAM and threads usage of a process @@ -1435,6 +1464,8 @@ def run_command(runtime, output=None, timeout=0.01, redirect_x=False): raise RuntimeError('Xvfb was not found, X redirection aborted') cmdline = 'xvfb-run -a ' + cmdline + env = _canonicalize_env(runtime.environ) + default_encoding = locale.getdefaultlocale()[1] if default_encoding is None: default_encoding = 'UTF-8' @@ -1449,14 +1480,14 @@ def run_command(runtime, output=None, timeout=0.01, redirect_x=False): stderr=stderr, shell=True, cwd=runtime.cwd, - env=runtime.environ) + env=env) else: proc = subprocess.Popen(cmdline, stdout=PIPE, stderr=PIPE, shell=True, cwd=runtime.cwd, - env=runtime.environ) + env=env) result = {} errfile = os.path.join(runtime.cwd, 'stderr.nipype') outfile = os.path.join(runtime.cwd, 'stdout.nipype') From b3c71b069960f7ade9d425c0b86ee0a425e9cb88 Mon Sep 17 00:00:00 2001 From: emdupre Date: Thu, 22 Jun 2017 20:04:18 -0400 Subject: [PATCH 042/643] Add 3dZcat and 3dZeropad Create nipype wrappers for the AFNI commands 3dZcat and 3dZeropad. --- nipype/interfaces/afni/__init__.py | 2 +- .../afni/tests/test_auto_QwarpPlusMinus.py | 53 ++++++ .../afni/tests/test_auto_Unifize.py | 56 ++++++ nipype/interfaces/afni/utils.py | 162 ++++++++++++++++++ 4 files changed, 272 insertions(+), 1 deletion(-) create mode 100644 nipype/interfaces/afni/tests/test_auto_QwarpPlusMinus.py create mode 100644 nipype/interfaces/afni/tests/test_auto_Unifize.py diff --git a/nipype/interfaces/afni/__init__.py b/nipype/interfaces/afni/__init__.py index 60076eefc8..03e68abc03 100644 --- a/nipype/interfaces/afni/__init__.py +++ b/nipype/interfaces/afni/__init__.py @@ -20,4 +20,4 @@ from .utils import (AFNItoNIFTI, Autobox, BrickStat, Calc, Copy, Eval, FWHMx, MaskTool, Merge, Notes, Refit, Resample, TCat, TStat, To3D, - Unifize, ZCutUp, GCOR,) + Unifize, ZCutUp, GCOR, Zcat, Zeropad) diff --git a/nipype/interfaces/afni/tests/test_auto_QwarpPlusMinus.py b/nipype/interfaces/afni/tests/test_auto_QwarpPlusMinus.py new file mode 100644 index 0000000000..04f12426de --- /dev/null +++ b/nipype/interfaces/afni/tests/test_auto_QwarpPlusMinus.py @@ -0,0 +1,53 @@ +# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT +from __future__ import unicode_literals +from ..preprocess import QwarpPlusMinus + + +def test_QwarpPlusMinus_inputs(): + input_map = dict(args=dict(argstr='%s', + ), + base_file=dict(argstr='-base %s', + copyfile=False, + mandatory=True, + ), + blur=dict(argstr='-blur %s', + ), + environ=dict(nohash=True, + usedefault=True, + ), + ignore_exception=dict(nohash=True, + usedefault=True, + ), + minpatch=dict(argstr='-minpatch %d', + ), + nopadWARP=dict(argstr='-nopadWARP', + ), + noweight=dict(argstr='-noweight', + ), + pblur=dict(argstr='-pblur %s', + ), + source_file=dict(argstr='-source %s', + copyfile=False, + mandatory=True, + ), + terminal_output=dict(nohash=True, + ), + ) + inputs = QwarpPlusMinus.input_spec() + + for key, metadata in list(input_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(inputs.traits()[key], metakey) == value + + +def test_QwarpPlusMinus_outputs(): + output_map = dict(base_warp=dict(), + source_warp=dict(), + warped_base=dict(), + warped_source=dict(), + ) + outputs = QwarpPlusMinus.output_spec() + + for key, metadata in list(output_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(outputs.traits()[key], metakey) == value diff --git a/nipype/interfaces/afni/tests/test_auto_Unifize.py b/nipype/interfaces/afni/tests/test_auto_Unifize.py new file mode 100644 index 0000000000..2c37e13fb1 --- /dev/null +++ b/nipype/interfaces/afni/tests/test_auto_Unifize.py @@ -0,0 +1,56 @@ +# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT +from __future__ import unicode_literals +from ..utils import Unifize + + +def test_Unifize_inputs(): + input_map = dict(args=dict(argstr='%s', + ), + environ=dict(nohash=True, + usedefault=True, + ), + epi=dict(argstr='-EPI', + requires=['no_duplo', 't2'], + xor=['gm'], + ), + gm=dict(argstr='-GM', + ), + ignore_exception=dict(nohash=True, + usedefault=True, + ), + in_file=dict(argstr='-input %s', + copyfile=False, + mandatory=True, + position=-1, + ), + no_duplo=dict(argstr='-noduplo', + ), + out_file=dict(argstr='-prefix %s', + name_source='in_file', + ), + outputtype=dict(), + scale_file=dict(argstr='-ssave %s', + ), + t2=dict(argstr='-T2', + ), + terminal_output=dict(nohash=True, + ), + urad=dict(argstr='-Urad %s', + ), + ) + inputs = Unifize.input_spec() + + for key, metadata in list(input_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(inputs.traits()[key], metakey) == value + + +def test_Unifize_outputs(): + output_map = dict(out_file=dict(), + scale_file=dict(), + ) + outputs = Unifize.output_spec() + + for key, metadata in list(output_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(outputs.traits()[key], metakey) == value diff --git a/nipype/interfaces/afni/utils.py b/nipype/interfaces/afni/utils.py index 0e6455496c..46ecbf866f 100644 --- a/nipype/interfaces/afni/utils.py +++ b/nipype/interfaces/afni/utils.py @@ -1441,3 +1441,165 @@ def _run_interface(self, runtime): def _list_outputs(self): return {'out': getattr(self, '_gcor')} + +class ZcatInputSpec(AFNICommandInputSpec): + in_files = InputMultiPath( + File( + desc='input files to 3dZcat', + exists=True), + argstr='%s', + position=-1, + mandatory=True, + copyfile=False) + out_file = File( + name_template='zcat', + desc='output dataset prefix name (default \'zcat\')', + argstr='-prefix %s') + datum = traits.Enum( + 'byte','short','float', + argstr='-datum %s', + desc='specify data type for output. Valid types are \'byte\', ' + '\'short\' and \'float\'.') + verb = traits.Bool( + desc='print out some verbositiness as the program proceeds.', + argstr='-verb') + fscale = traits.Bool( + desc='Force scaling of the output to the maximum integer ' + 'range. This only has effect if the output datum is ' + 'byte or short (either forced or defaulted). This ' + 'option is sometimes necessary to eliminate ' + 'unpleasant truncation artifacts.', + argstr='-fscale', + xor=['nscale']) + nscale = traits.Bool( + desc='Don\'t do any scaling on output to byte or short ' + 'datasets. This may be especially useful when ' + 'operating on mask datasets whose output values ' + 'are only 0\'s and 1\'s.', + argstr='-nscale', + xor=['fscale']) + +class Zcat(AFNICommand): + """Copies an image of one type to an image of the same + or different type using 3dZcat command + + For complete details, see the `3dZcat Documentation. + `_ + + Examples + ======== + + >>> from nipype.interfaces import afni + >>> zcat = afni.Zcat() + >>> zcat.inputs.in_files = ['functional2.nii', 'functional3.nii'] + >>> zcat.inputs.out_file = 'cat_functional.nii' + >>> zcat.cmdline # doctest: +ALLOW_UNICODE + '3dZcat -prefix cat_functional.nii functional2.nii functional3.nii' + >>> res = zcat.run() # doctest: +SKIP + """ + + _cmd = '3dZcat' + input_spec = ZcatInputSpec + output_spec = AFNICommandOutputSpec + +class ZeropadInputSpec(AFNICommandInputSpec): + in_files = File( + desc='input dataset', + argstr='%s', + position=-1, + mandatory=True, + exists=True, + copyfile=False) + out_file = File( + name_template='zeropad', + desc='output dataset prefix name (default \'zeropad\')', + argstr='-prefix %s') + I = traits.Int( + desc='adds \'n\' planes of zero at the Inferior edge', + argstr='-I %i', + xor=['master']) + S = traits.Int( + desc='adds \'n\' planes of zero at the Superior edge', + argstr='-S %i', + xor=['master']) + A = traits.Int( + desc='adds \'n\' planes of zero at the Anterior edge', + argstr='-A %i', + xor=['master']) + P = traits.Int( + desc='adds \'n\' planes of zero at the Posterior edge', + argstr='-P %i', + xor=['master']) + L = traits.Int( + desc='adds \'n\' planes of zero at the Left edge', + argstr='-L %i', + xor=['master']) + R = traits.Int( + desc='adds \'n\' planes of zero at the Right edge', + argstr='-R %i', + xor=['master']) + z = traits.Int( + desc='adds \'n\' planes of zero on EACH of the ' + 'dataset z-axis (slice-direction) faces', + argstr='-z %i', + xor=['master']) + RL = traits.Int(desc='specify that planes should be added or cut ' + 'symmetrically to make the resulting volume have' + 'N slices in the right-left direction', + argstr='-RL %i', + xor=['master']) + AP = traits.Int(desc='specify that planes should be added or cut ' + 'symmetrically to make the resulting volume have' + 'N slices in the anterior-posterior direction', + argstr='-AP %i', + xor=['master']) + IS = traits.Int(desc='specify that planes should be added or cut ' + 'symmetrically to make the resulting volume have' + 'N slices in the inferior-superior direction', + argstr='-IS %i', + xor=['master']) + mm = traits.Bool(desc='pad counts \'n\' are in mm instead of slices, ' + 'where each \'n\' is an integer and at least \'n\' ' + 'mm of slices will be added/removed; e.g., n = 3 ' + 'and slice thickness = 2.5 mm ==> 2 slices added', + argstr='-mm', + xor=['master']) + master = traits.File(desc='match the volume described in dataset ' + '\'mset\', where mset must have the same ' + 'orientation and grid spacing as dataset to be ' + 'padded. the goal of -master is to make the ' + 'output dataset from 3dZeropad match the ' + 'spatial \'extents\' of mset by adding or ' + 'subtracting slices as needed. You can\'t use ' + '-I,-S,..., or -mm with -master', + argstr='-master %s', + xor=['I', 'S', 'A', 'P', 'L', 'R', 'z', + 'RL', 'AP', 'IS', 'mm']) + +class Zeropad(AFNICommand): + """Adds planes of zeros to a dataset (i.e., pads it out). + + For complete details, see the `3dZeropad Documentation. + `_ + + Examples + ======== + + >>> from nipype.interfaces import afni + >>> zeropad = afni.Zeropad() + >>> zeropad.inputs.in_files = 'functional.nii' + >>> zeropad.inputs.out_file = 'pad_functional.nii' + >>> zeropad.inputs.I = 10 + >>> zeropad.inputs.S = 10 + >>> zeropad.inputs.A = 10 + >>> zeropad.inputs.P = 10 + >>> zeropad.inputs.R = 10 + >>> zeropad.inputs.L = 10 + >>> zeropad.cmdline # doctest: +ALLOW_UNICODE + '3dZeropad -A 10 -I 10 -L 10 -P 10 -R 10 -S 10 -prefix pad_functional.nii functional.nii' + >>> res = zeropad.run() # doctest: +SKIP + """ + + _cmd = '3dZeropad' + input_spec = ZeropadInputSpec + output_spec = AFNICommandOutputSpec From f09d854ffe0891c68ae96569134347e8e7041b5f Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Thu, 22 Jun 2017 21:16:36 -0700 Subject: [PATCH 043/643] Add 3dEdge3. --- nipype/interfaces/afni/__init__.py | 2 +- nipype/interfaces/afni/utils.py | 93 ++++++++++++++++++++++++++++++ 2 files changed, 94 insertions(+), 1 deletion(-) diff --git a/nipype/interfaces/afni/__init__.py b/nipype/interfaces/afni/__init__.py index 60076eefc8..6fb20abf42 100644 --- a/nipype/interfaces/afni/__init__.py +++ b/nipype/interfaces/afni/__init__.py @@ -17,7 +17,7 @@ Seg, SkullStrip, TCorr1D, TCorrMap, TCorrelate, TShift, Volreg, Warp, QwarpPlusMinus) from .svm import (SVMTest, SVMTrain) -from .utils import (AFNItoNIFTI, Autobox, BrickStat, Calc, Copy, +from .utils import (AFNItoNIFTI, Autobox, BrickStat, Calc, Copy, Edge3, Eval, FWHMx, MaskTool, Merge, Notes, Refit, Resample, TCat, TStat, To3D, Unifize, ZCutUp, GCOR,) diff --git a/nipype/interfaces/afni/utils.py b/nipype/interfaces/afni/utils.py index 0e6455496c..8500f998db 100644 --- a/nipype/interfaces/afni/utils.py +++ b/nipype/interfaces/afni/utils.py @@ -394,6 +394,99 @@ class Copy(AFNICommand): output_spec = AFNICommandOutputSpec +class Edge3InputSpec(AFNICommandInputSpec): + in_file = File( + desc='input file to 3dedge3', + argstr='-input %s', + position=0, + mandatory=True, + exists=True, + copyfile=False) + out_file = File( + desc='output image file name', + position=-1, + argstr='-prefix %s') + datum = traits.Enum( + 'byte','short','float', + argstr='-datum %s', + desc='specify data type for output. Valid types are \'byte\', ' + '\'short\' and \'float\'.') + fscale = traits.Bool( + desc='Force scaling of the output to the maximum integer range.', + argstr='-fscale', + xor=['gscale', 'nscale', 'scale_floats']) + gscale = traits.Bool( + desc='Same as \'-fscale\', but also forces each output sub-brick to ' + 'to get the same scaling factor.', + argstr='-gscale', + xor=['fscale', 'nscale', 'scale_floats']) + nscale = traits.Bool( + desc='Don\'t do any scaling on output to byte or short datasets.', + argstr='-nscale', + xor=['fscale', 'gscale', 'scale_floats']) + scale_floats = traits.Float( + desc='Multiply input by VAL, but only if the input datum is ' + 'float. This is needed when the input dataset ' + 'has a small range, like 0 to 2.0 for instance. ' + 'With such a range, very few edges are detected due to ' + 'what I suspect to be truncation problems. ' + 'Multiplying such a dataset by 10000 fixes the problem ' + 'and the scaling is undone at the output.', + argstr='-scale_floats %f', + xor=['fscale', 'gscale', 'nscale']) + verbose = traits.Bool( + desc='Print out some information along the way.', + argstr='-verbose') + + +class Edge3(AFNICommand): + """Does 3D Edge detection using the library 3DEdge + by Gregoire Malandain (gregoire.malandain@sophia.inria.fr). + + For complete details, see the `3dedge3 Documentation. + `_ + + references_ = [{'entry': BibTeX('@article{Deriche1987,' + 'author={R. Deriche},' + 'title={Optimal edge detection using recursive filtering},' + 'journal={International Journal of Computer Vision},' + 'volume={2},', + 'pages={167-187},' + 'year={1987},' + '}'), + 'tags': ['method'], + }, + {'entry': BibTeX('@article{MongaDericheMalandainCocquerez1991,' + 'author={O. Monga, R. Deriche, G. Malandain, J.P. Cocquerez},' + 'title={Recursive filtering and edge tracking: two primary tools for 3D edge detection},' + 'journal={Image and vision computing},' + 'volume={9},', + 'pages={203-214},' + 'year={1991},' + '}'), + 'tags': ['method'], + }, + ] + + Examples + ======== + + >>> from nipype.interfaces import afni + >>> edge3 = afni.Edge3() + >>> edge3.inputs.in_file = 'functional.nii' + >>> edge3.inputs.out_file = 'edges.nii' + >>> edge3.inputs.datum = 'byte' + >>> edge3.cmdline # doctest: +ALLOW_UNICODE + '3dedge3 -input functional.nii -datum byte -prefix edges.nii' + >>> res = edge3.run() # doctest: +SKIP + + """ + + _cmd = '3dedge3' + input_spec = Edge3InputSpec + output_spec = AFNICommandOutputSpec + + class EvalInputSpec(AFNICommandInputSpec): in_file_a = File( desc='input file to 1deval', From a0a506ea42fdfd2877ea8b6bb4e5f3170dbd64e0 Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Thu, 22 Jun 2017 21:30:21 -0700 Subject: [PATCH 044/643] Add auto test. --- .../interfaces/afni/tests/test_auto_Edge3.py | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 nipype/interfaces/afni/tests/test_auto_Edge3.py diff --git a/nipype/interfaces/afni/tests/test_auto_Edge3.py b/nipype/interfaces/afni/tests/test_auto_Edge3.py new file mode 100644 index 0000000000..51a4dc865d --- /dev/null +++ b/nipype/interfaces/afni/tests/test_auto_Edge3.py @@ -0,0 +1,57 @@ +# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT +from __future__ import unicode_literals +from ..utils import Edge3 + + +def test_Edge3_inputs(): + input_map = dict(args=dict(argstr='%s', + ), + datum=dict(argstr='-datum %s', + ), + environ=dict(nohash=True, + usedefault=True, + ), + fscale=dict(argstr='-fscale', + xor=['gscale', 'nscale', 'scale_floats'], + ), + gscale=dict(argstr='-gscale', + xor=['fscale', 'nscale', 'scale_floats'], + ), + ignore_exception=dict(nohash=True, + usedefault=True, + ), + in_file=dict(argstr='-input %s', + copyfile=False, + mandatory=True, + position=0, + ), + nscale=dict(argstr='-nscale', + xor=['fscale', 'gscale', 'scale_floats'], + ), + out_file=dict(argstr='-prefix %s', + position=-1, + ), + outputtype=dict(), + scale_floats=dict(argstr='-scale_floats %f', + xor=['fscale', 'gscale', 'nscale'], + ), + terminal_output=dict(nohash=True, + ), + verbose=dict(argstr='-verbose', + ), + ) + inputs = Edge3.input_spec() + + for key, metadata in list(input_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(inputs.traits()[key], metakey) == value + + +def test_Edge3_outputs(): + output_map = dict(out_file=dict(), + ) + outputs = Edge3.output_spec() + + for key, metadata in list(output_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(outputs.traits()[key], metakey) == value From fd24535492c4fc1e74d5cbce94848f1b64bfa78e Mon Sep 17 00:00:00 2001 From: Michael Waskom Date: Fri, 23 Jun 2017 13:58:11 -0400 Subject: [PATCH 045/643] Add test for SelectFiles field parsing --- nipype/interfaces/tests/test_io.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/nipype/interfaces/tests/test_io.py b/nipype/interfaces/tests/test_io.py index 75eb323c4b..4fade26800 100644 --- a/nipype/interfaces/tests/test_io.py +++ b/nipype/interfaces/tests/test_io.py @@ -11,6 +11,7 @@ import os.path as op from subprocess import Popen import hashlib +from collections import namedtuple import pytest import nipype @@ -62,6 +63,7 @@ def test_s3datagrabber(): templates1 = {"model": "interfaces/{package}/model.py", "preprocess": "interfaces/{package}/pre*.py"} templates2 = {"converter": "interfaces/dcm{to!s}nii.py"} +templates3 = {"model": "interfaces/{package.name}/model.py"} @pytest.mark.parametrize("SF_args, inputs_att, expected", [ ({"templates":templates1}, {"package":"fsl"}, @@ -75,6 +77,11 @@ def test_s3datagrabber(): ({"templates":templates2}, {"to":2}, {"infields":["to"], "outfields":["converter"], "run_output":{"converter":op.join(op.dirname(nipype.__file__), "interfaces/dcm2nii.py")}, "node_output":["converter"]}), + + ({"templates": templates3}, {"package": namedtuple("package", ["name"])("fsl")}, + {"infields": ["package"], "outfields": ["model"], + "run_output": {"model": op.join(op.dirname(nipype.__file__), "interfaces/fsl/model.py")}, + "node_output": ["model"]}), ]) def test_selectfiles(SF_args, inputs_att, expected): base_dir = op.dirname(nipype.__file__) From e6c1735a8db5c6c66ed57b4295357fd34934c6ee Mon Sep 17 00:00:00 2001 From: Michael Waskom Date: Fri, 23 Jun 2017 14:24:59 -0400 Subject: [PATCH 046/643] Fix string-based error inspection on Python 3 --- nipype/interfaces/io.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nipype/interfaces/io.py b/nipype/interfaces/io.py index cfdedd8870..7a1cda6102 100644 --- a/nipype/interfaces/io.py +++ b/nipype/interfaces/io.py @@ -71,7 +71,7 @@ def copytree(src, dst, use_hardlink=False): try: os.makedirs(dst) except OSError as why: - if 'File exists' in why: + if 'File exists' in str(why): pass else: raise why @@ -687,7 +687,7 @@ def _list_outputs(self): try: os.makedirs(outdir) except OSError as inst: - if 'File exists' in inst: + if 'File exists' in str(inst): pass else: raise(inst) @@ -738,7 +738,7 @@ def _list_outputs(self): try: os.makedirs(path) except OSError as inst: - if 'File exists' in inst: + if 'File exists' in str(inst): pass else: raise(inst) From c90b84e3b5357c5352132031f956fdbbf311adbb Mon Sep 17 00:00:00 2001 From: mathiasg Date: Fri, 23 Jun 2017 17:39:49 -0400 Subject: [PATCH 047/643] fix: do not use new print statement --- nipype/utils/misc.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/nipype/utils/misc.py b/nipype/utils/misc.py index 552e24c435..3b08b49e0f 100644 --- a/nipype/utils/misc.py +++ b/nipype/utils/misc.py @@ -3,7 +3,7 @@ # vi: set ft=python sts=4 ts=4 sw=4 et: """Miscellaneous utility functions """ -from __future__ import print_function, division, unicode_literals, absolute_import +from __future__ import division, unicode_literals, absolute_import from future import standard_library standard_library.install_aliases() from builtins import next, str @@ -91,7 +91,6 @@ def create_function_from_source(function_source, imports=None): exec(statement, ns) import_keys = list(ns.keys()) exec(function_source, ns) - except Exception as e: msg = '\nError executing function:\n %s\n' % function_source msg += '\n'.join(["Functions in connection strings have to be standalone.", From 25f749032213f756ec2a3bfc998101b30a24abe0 Mon Sep 17 00:00:00 2001 From: Ross Markello Date: Thu, 22 Jun 2017 15:23:03 -0400 Subject: [PATCH 048/643] Outline for AFNI 3dDeconvolve interface Added outline of classes for AFNI's 3dDeconvolve (inputspec, outputspec, and command). Nothing is there yet, but it's something to build off of. --- nipype/interfaces/afni/model.py | 177 ++++++++++++++++++++++++++++++++ 1 file changed, 177 insertions(+) create mode 100644 nipype/interfaces/afni/model.py diff --git a/nipype/interfaces/afni/model.py b/nipype/interfaces/afni/model.py new file mode 100644 index 0000000000..284eee12ef --- /dev/null +++ b/nipype/interfaces/afni/model.py @@ -0,0 +1,177 @@ +# -*- coding: utf-8 -*- +# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- +# vi: set ft = python sts = 4 ts = 4 sw = 4 et: +"""AFNI modeling interfaces + +Examples +-------- +See the docstrings of the individual classes for examples. + .. testsetup:: + # Change directory to provide relative paths for doctests + >>> filepath = os.path.dirname( os.path.realpath( __file__ ) ) + >>> datadir = os.path.realpath(os.path.join(filepath, '../../testing/data')) + >>> os.chdir(datadir) +""" +from __future__ import print_function, division, unicode_literals, absolute_import +from builtins import str, bytes + +import os +import os.path as op +import re +import numpy as np + +from ...utils.filemanip import (load_json, save_json, split_filename) +from ..base import ( + CommandLineInputSpec, CommandLine, Directory, TraitedSpec, + traits, isdefined, File, InputMultiPath, Undefined, Str) +from ...external.due import BibTeX + +from .base import ( + AFNICommandBase, AFNICommand, AFNICommandInputSpec, AFNICommandOutputSpec) + +class DeconvolveInputSpec(AFNICommandInputSpec): + in_files = InputMultiPath( + File( + exists=True), + desc='fname = filename of 3D+time input dataset ' + ' [more than one filename can be given] ' + ' here, and these datasets will be] ' + ' [auto-catenated in time; if you do this,] ' + ' [\'-concat\' is not needed and is ignored.] ' + '** You can input a 1D time series file here, ' + ' but the time axis should run along the ' + ' ROW direction, not the COLUMN direction as ' + ' in the -input1D option. You can automatically ' + ' transpose a 1D file on input using the \\\' ' + ' operator at the end of the filename, as in ' + ' -input fred.1D\\\' ' + ' * This is the only way to use 3dDeconvolve ' + ' with a multi-column 1D time series file.', + argstr='-input %s', + mandatory=True, + copyfile=False) + mask = File( + desc='filename of 3D mask dataset; ' + 'Only data time series from within the mask ' + 'will be analyzed; results for voxels outside ' + 'the mask will be set to zero.', + argstr='-mask %s', + exists=True) + automask = traits.Bool( + usedefault=True, + argstr='-automask', + desc='Build a mask automatically from input data ' + '(will be slow for long time series datasets)') + censor = File( + desc=' cname = filename of censor .1D time series ' + '* This is a file of 1s and 0s, indicating which ' + ' time points are to be included (1) and which are ' + ' to be excluded (0). ' + '* Option \'-censor\' can only be used once!', + argstr='-censor %s', + exists=True) + polort = traits.Int( + desc='pnum = degree of polynomial corresponding to the ' + ' null hypothesis [default: pnum = 1]', + argstr='-polort %d') + ortvec = traits.Tuple( + File( + desc='filename', + exists=True), + Str( + desc='label'), + desc='This option lets you input a rectangular array ' + 'of 1 or more baseline vectors from file \'fff\', ' + 'which will get the label \'lll\'. Functionally, ' + 'it is the same as using \'-stim_file\' on each ' + 'column of \'fff\' separately (plus \'-stim_base\'). ' + 'This method is just a faster and simpler way to ' + 'include a lot of baseline regressors in one step. ', + argstr='ortvec %s') + x1d = File( + desc='save out X matrix', + argstr='-x1D %s') + x1d_stop = traits.Bool( + desc='stop running after writing .xmat.1D file', + argstr='-x1D_stop') + bucket = File( + desc='output statistics file', + argstr='-bucket %s') + jobs = traits.Int( + desc='run the program with given number of sub-processes', + argstr='-jobs %d') + stim_times_subtract = traits.Float( + desc='This option means to subtract \'SS\' seconds from each time ' + 'encountered in any \'-stim_times*\' option. The purpose of this ' + 'option is to make it simple to adjust timing files for the ' + 'removal of images from the start of each imaging run.', + argstr='-stim_times_subtract %f') + num_stimts = traits.Int( + desc='number of stimulus timing files', + argstr='-num_stimts %d') + num_glt = traits.Int( + desc='number of general linear tests (i.e., contrasts)', + argstr='-num_glt %d') + global_times = traits.Bool( + desc='use global timing for stimulus timing files', + argstr='-global_times', + xor=['local_times']) + local_times = traits.Bool( + desc='use local timing for stimulus timing files', + argstr='-local_times', + xor=['global_times']) + fout = traits.Bool( + desc='output F-statistic for each stimulus', + argstr='-fout') + rout = traits.Bool( + desc='output the R^2 statistic for each stimulus', + argstr='-rout') + tout = traits.Bool( + desc='output the T-statistic for each stimulus', + argstr='-tout') + vout = traits.Bool( + desc='output the sample variance (MSE) for each stimulus', + argstr='-vout') + stim_times = traits.List( + traits.Tuple(traits.Int(desc='k-th response model'), + File(desc='stimulus timing file',exists=True), + Str(desc='model')), + desc='Generate the k-th response model from a set of stimulus times' + ' given in file \'tname\'.', + argstr='-stim_times %d %s %s') + stim_label = traits.List( + traits.Tuple(traits.Int(desc='k-th input stimulus'), + Str(desc='stimulus label')), + desc='label for kth input stimulus', + argstr='-stim_label %d %s', + requires=['stim_times']) + gltsym = traits.List( + Str(desc='symbolic general linear test'), + desc='general linear tests (i.e., contrasts) using symbolic ' + 'conventions', + argstr='-gltsym %s') + glt_labels = traits.List( + traits.Tuple(traits.Int(desc='k-th general linear test'), + Str(desc='GLT label')), + desc='general linear test (i.e., contrast) labels', + argstr='-glt_label %d %s', + requires=['glt_sym']) + + +class DeconvolveOutputSpec(TraitedSpec): + pass + + +class Deconvolve(AFNICommand): + """Performs OLS regression given a 4D neuroimage file and stimulus timings + + For complete details, see the `3dDeconvolve Documentation. + `_ + + Examples + ======== + + >>> from nipype.interfaces import afni + >>> deconvolve = afni.Deconvolve() + """ + pass From 453b391822db59ea43441df6c27fea3bc4709851 Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Thu, 22 Jun 2017 13:59:22 -0700 Subject: [PATCH 049/643] Add main Deconvolve command. --- nipype/interfaces/afni/model.py | 36 ++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/nipype/interfaces/afni/model.py b/nipype/interfaces/afni/model.py index 284eee12ef..a1a770fe0d 100644 --- a/nipype/interfaces/afni/model.py +++ b/nipype/interfaces/afni/model.py @@ -158,6 +158,7 @@ class DeconvolveInputSpec(AFNICommandInputSpec): requires=['glt_sym']) + class DeconvolveOutputSpec(TraitedSpec): pass @@ -173,5 +174,38 @@ class Deconvolve(AFNICommand): >>> from nipype.interfaces import afni >>> deconvolve = afni.Deconvolve() + >>> deconvolve.inputs.in_file = 'functional.nii' + >>> deconvolve.inputs.bucket = 'output.nii' + >>> deconvolve.inputs.x1D = 'output.1D' + >>> stim_times = [(1, 'stims1.txt', 'SPMG1(4)'), (2, 'stims2.txt', 'SPMG2(4)')] + >>> deconvolve.inputs.stim_times = stim_times + >>> deconvolve.cmdline # doctest: +ALLOW_UNICODE + '3dDeconvolve -input functional.nii -bucket output.nii -x1D output.1D -stim_times 1 stims1.txt SPMG1(4) 2 stims2.txt SPMG2(4)' + >>> res = deconvolve.run() # doctest: +SKIP """ - pass + + _cmd = '3dDeconvolve' + input_spec = DeconvolveInputSpec + output_spec = DeconvolveOutputSpec + + def _list_outputs(self): + outputs = self.output_spec().get() + if isdefined(self.inputs.x1D): + if not self.inputs.x1D.endswith('.xmat.1D'): + outputs['x1D'] = outputs['x1D'] + '.xmat.1D' + return outputs + + def _format_arg(self, name, trait_spec, value): + """ + Argument num_glt is defined automatically from the number of contrasts + desired (defined by the length of glt_sym). No effort has been made to + make this compatible with glt. + """ + if name in ['stim_times', 'stim_labels']: + arg = '' + for st in value: + arg += trait_spec.argstr % value + arg = arg.rstrip() + return arg + elif name == 'glt_sym': + self.inputs.num_glt = len(value) From e23d72db075e3a0b1fce20b2b0b41c1dbbeba0e6 Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Thu, 22 Jun 2017 14:34:28 -0700 Subject: [PATCH 050/643] Drop output spec and map outputs in list_outputs. --- nipype/interfaces/afni/model.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/nipype/interfaces/afni/model.py b/nipype/interfaces/afni/model.py index a1a770fe0d..698cccb422 100644 --- a/nipype/interfaces/afni/model.py +++ b/nipype/interfaces/afni/model.py @@ -158,7 +158,6 @@ class DeconvolveInputSpec(AFNICommandInputSpec): requires=['glt_sym']) - class DeconvolveOutputSpec(TraitedSpec): pass @@ -180,19 +179,23 @@ class Deconvolve(AFNICommand): >>> stim_times = [(1, 'stims1.txt', 'SPMG1(4)'), (2, 'stims2.txt', 'SPMG2(4)')] >>> deconvolve.inputs.stim_times = stim_times >>> deconvolve.cmdline # doctest: +ALLOW_UNICODE - '3dDeconvolve -input functional.nii -bucket output.nii -x1D output.1D -stim_times 1 stims1.txt SPMG1(4) 2 stims2.txt SPMG2(4)' + '3dDeconvolve -input functional.nii -bucket output.nii -x1D output -stim_times 1 stims1.txt SPMG1(4) 2 stims2.txt SPMG2(4)' >>> res = deconvolve.run() # doctest: +SKIP """ _cmd = '3dDeconvolve' input_spec = DeconvolveInputSpec - output_spec = DeconvolveOutputSpec + output_spec = AFNICommandOutputSpec def _list_outputs(self): outputs = self.output_spec().get() if isdefined(self.inputs.x1D): if not self.inputs.x1D.endswith('.xmat.1D'): - outputs['x1D'] = outputs['x1D'] + '.xmat.1D' + outputs['x1D'] = self.inputs.x1D + '.xmat.1D' + else: + outputs['x1D'] = self.inputs.x1D + + outputs['bucket'] = self.inputs.bucket return outputs def _format_arg(self, name, trait_spec, value): @@ -207,5 +210,8 @@ def _format_arg(self, name, trait_spec, value): arg += trait_spec.argstr % value arg = arg.rstrip() return arg + + if name == 'stim_times': + self.inputs.num_stimts = len(value) elif name == 'glt_sym': self.inputs.num_glt = len(value) From e78852fccbd0d75fbddfb407377d31f3cb707534 Mon Sep 17 00:00:00 2001 From: Ross Markello Date: Thu, 22 Jun 2017 17:57:49 -0400 Subject: [PATCH 051/643] Updated Deconvolve InputSpec Added options to Deconvolve InputSpec, updated __init__.py with Deconvolve, and fixed doctests. --- nipype/interfaces/afni/__init__.py | 1 + nipype/interfaces/afni/model.py | 235 ++++++++++++++++------------- 2 files changed, 127 insertions(+), 109 deletions(-) diff --git a/nipype/interfaces/afni/__init__.py b/nipype/interfaces/afni/__init__.py index 6fb20abf42..d59af05c7b 100644 --- a/nipype/interfaces/afni/__init__.py +++ b/nipype/interfaces/afni/__init__.py @@ -21,3 +21,4 @@ Eval, FWHMx, MaskTool, Merge, Notes, Refit, Resample, TCat, TStat, To3D, Unifize, ZCutUp, GCOR,) +from .model import(Deconvolve) diff --git a/nipype/interfaces/afni/model.py b/nipype/interfaces/afni/model.py index 698cccb422..3e39d26124 100644 --- a/nipype/interfaces/afni/model.py +++ b/nipype/interfaces/afni/model.py @@ -13,14 +13,9 @@ >>> os.chdir(datadir) """ from __future__ import print_function, division, unicode_literals, absolute_import -from builtins import str, bytes import os -import os.path as op -import re -import numpy as np -from ...utils.filemanip import (load_json, save_json, split_filename) from ..base import ( CommandLineInputSpec, CommandLine, Directory, TraitedSpec, traits, isdefined, File, InputMultiPath, Undefined, Str) @@ -33,46 +28,74 @@ class DeconvolveInputSpec(AFNICommandInputSpec): in_files = InputMultiPath( File( exists=True), - desc='fname = filename of 3D+time input dataset ' - ' [more than one filename can be given] ' - ' here, and these datasets will be] ' - ' [auto-catenated in time; if you do this,] ' - ' [\'-concat\' is not needed and is ignored.] ' - '** You can input a 1D time series file here, ' - ' but the time axis should run along the ' - ' ROW direction, not the COLUMN direction as ' - ' in the -input1D option. You can automatically ' - ' transpose a 1D file on input using the \\\' ' - ' operator at the end of the filename, as in ' - ' -input fred.1D\\\' ' - ' * This is the only way to use 3dDeconvolve ' - ' with a multi-column 1D time series file.', + desc='Filenames of 3D+time input datasets. More than one filename can ' + 'be given and the datasets will be auto-catenated in time. ' + 'You can input a 1D time series file here, but the time axis ' + 'should run along the ROW direction, not the COLUMN direction as ' + 'in the \'input1D\' option.', argstr='-input %s', mandatory=True, - copyfile=False) + copyfile=False, + sep=" ") + sat = traits.Bool( + desc='Check the dataset time series for initial saturation transients,' + ' which should normally have been excised before data analysis.', + argstr='-sat', + xor=['trans']) + trans = traits.Bool( + desc='Check the dataset time series for initial saturation transients,' + ' which should normally have been excised before data analysis.', + argstr='-trans', + xor=['sat']) + noblock = traits.Bool( + desc='Normally, if you input multiple datasets with \'input\', then ' + 'the separate datasets are taken to be separate image runs that ' + 'get separate baseline models. Use this options if you want to ' + 'have the program consider these to be all one big run.' + '* If any of the input dataset has only 1 sub-brick, then this ' + 'option is automatically invoked!' + '* If the auto-catenation feature isn\'t used, then this option ' + 'has no effect, no how, no way.', + argstr='-noblock') + force_TR = traits.Int( + desc='Use this value of TR instead of the one in the \'input\' ' + 'dataset. (It\'s better to fix the input using 3drefit.)', + argstr='-force_TR %d') + input1D = File( + desc='Filename of single (fMRI) .1D time series where time runs down ' + 'the column.', + argstr='-input1D %s', + exists=True) + TR_1D = traits.Float( + desc='TR to use with \'input1D\'. This option has no effect if you do ' + 'not also use \'input1D\'.', + argstr='-TR_1D %f') + legendre = traits.Bool( + desc='Use Legendre polynomials for null hypothesis (baseline model)', + argstr='-legendre') + nolegendre = traits.Bool( + desc='Use power polynomials for null hypotheses. Don\'t do this ' + 'unless you are crazy!', + argstr='-nolegendre') mask = File( - desc='filename of 3D mask dataset; ' - 'Only data time series from within the mask ' - 'will be analyzed; results for voxels outside ' - 'the mask will be set to zero.', + desc='Filename of 3D mask dataset; only data time series from within ' + 'the mask will be analyzed; results for voxels outside the mask ' + 'will be set to zero.', argstr='-mask %s', exists=True) automask = traits.Bool( - usedefault=True, - argstr='-automask', - desc='Build a mask automatically from input data ' - '(will be slow for long time series datasets)') + desc='Build a mask automatically from input data (will be slow for ' + 'long time series datasets)', + argstr='-automask') censor = File( - desc=' cname = filename of censor .1D time series ' - '* This is a file of 1s and 0s, indicating which ' - ' time points are to be included (1) and which are ' - ' to be excluded (0). ' - '* Option \'-censor\' can only be used once!', + desc='Filename of censor .1D time series. This is a file of 1s and 0s, ' + 'indicating which time points are to be included (1) and which ' + 'are to be excluded (0).', argstr='-censor %s', exists=True) polort = traits.Int( - desc='pnum = degree of polynomial corresponding to the ' - ' null hypothesis [default: pnum = 1]', + desc='Degree of polynomial corresponding to the null hypothesis ' + '[default: 1]', argstr='-polort %d') ortvec = traits.Tuple( File( @@ -80,86 +103,86 @@ class DeconvolveInputSpec(AFNICommandInputSpec): exists=True), Str( desc='label'), - desc='This option lets you input a rectangular array ' - 'of 1 or more baseline vectors from file \'fff\', ' - 'which will get the label \'lll\'. Functionally, ' - 'it is the same as using \'-stim_file\' on each ' - 'column of \'fff\' separately (plus \'-stim_base\'). ' - 'This method is just a faster and simpler way to ' + desc='This option lets you input a rectangular array of 1 or more ' + 'baseline vectors from a file. This method is a fast way to ' 'include a lot of baseline regressors in one step. ', argstr='ortvec %s') - x1d = File( - desc='save out X matrix', + x1D = File( + desc='Save out X matrix', argstr='-x1D %s') - x1d_stop = traits.Bool( - desc='stop running after writing .xmat.1D file', + x1D_stop = traits.Bool( + desc='Stop running after writing .xmat.1D file', argstr='-x1D_stop') - bucket = File( - desc='output statistics file', + out_file = File( + 'bucket.nii', + desc='Output statistics file', argstr='-bucket %s') jobs = traits.Int( - desc='run the program with given number of sub-processes', + desc='Run the program with provided number of sub-processes', argstr='-jobs %d') - stim_times_subtract = traits.Float( - desc='This option means to subtract \'SS\' seconds from each time ' - 'encountered in any \'-stim_times*\' option. The purpose of this ' - 'option is to make it simple to adjust timing files for the ' - 'removal of images from the start of each imaging run.', - argstr='-stim_times_subtract %f') - num_stimts = traits.Int( - desc='number of stimulus timing files', - argstr='-num_stimts %d') - num_glt = traits.Int( - desc='number of general linear tests (i.e., contrasts)', - argstr='-num_glt %d') - global_times = traits.Bool( - desc='use global timing for stimulus timing files', - argstr='-global_times', - xor=['local_times']) - local_times = traits.Bool( - desc='use local timing for stimulus timing files', - argstr='-local_times', - xor=['global_times']) fout = traits.Bool( - desc='output F-statistic for each stimulus', + desc='Output F-statistic for each stimulus', argstr='-fout') rout = traits.Bool( - desc='output the R^2 statistic for each stimulus', + desc='Output the R^2 statistic for each stimulus', argstr='-rout') tout = traits.Bool( - desc='output the T-statistic for each stimulus', + desc='Output the T-statistic for each stimulus', argstr='-tout') vout = traits.Bool( - desc='output the sample variance (MSE) for each stimulus', + desc='Output the sample variance (MSE) for each stimulus', argstr='-vout') + global_times = traits.Bool( + desc='Use global timing for stimulus timing files', + argstr='-global_times', + xor=['local_times']) + local_times = traits.Bool( + desc='Use local timing for stimulus timing files', + argstr='-local_times', + xor=['global_times']) + num_stimts = traits.Int( + desc='Number of stimulus timing files', + argstr='-num_stimts %d', + position=0) stim_times = traits.List( traits.Tuple(traits.Int(desc='k-th response model'), File(desc='stimulus timing file',exists=True), Str(desc='model')), - desc='Generate the k-th response model from a set of stimulus times' - ' given in file \'tname\'.', - argstr='-stim_times %d %s %s') + desc='Generate a response model from a set of stimulus times' + ' given in file.', + argstr='-stim_times %d %s %s...') stim_label = traits.List( traits.Tuple(traits.Int(desc='k-th input stimulus'), Str(desc='stimulus label')), - desc='label for kth input stimulus', - argstr='-stim_label %d %s', + desc='Label for kth input stimulus', + argstr='-stim_label %d %s...', requires=['stim_times']) + stim_times_subtract = traits.Float( + desc='This option means to subtract specified seconds from each time ' + 'encountered in any \'stim_times\' option. The purpose of this ' + 'option is to make it simple to adjust timing files for the ' + 'removal of images from the start of each imaging run.', + argstr='-stim_times_subtract %f') + num_glt = traits.Int( + desc='Number of general linear tests (i.e., contrasts)', + argstr='-num_glt %d', + position=1) gltsym = traits.List( Str(desc='symbolic general linear test'), - desc='general linear tests (i.e., contrasts) using symbolic ' - 'conventions', - argstr='-gltsym %s') - glt_labels = traits.List( + desc='General linear tests (i.e., contrasts) using symbolic ' + 'conventions (e.g., \'+Label1 -Label2\')', + argstr='-gltsym SYM: %s...') + glt_label = traits.List( traits.Tuple(traits.Int(desc='k-th general linear test'), Str(desc='GLT label')), - desc='general linear test (i.e., contrast) labels', - argstr='-glt_label %d %s', - requires=['glt_sym']) + desc='General linear test (i.e., contrast) labels', + argstr='-glt_label %d %s...', + requires=['gltsym']) -class DeconvolveOutputSpec(TraitedSpec): - pass +class DeconvolveOutputSpec(AFNICommandOutputSpec): + out_file = File(desc='output statistics file', + exists=True) class Deconvolve(AFNICommand): @@ -173,13 +196,16 @@ class Deconvolve(AFNICommand): >>> from nipype.interfaces import afni >>> deconvolve = afni.Deconvolve() - >>> deconvolve.inputs.in_file = 'functional.nii' - >>> deconvolve.inputs.bucket = 'output.nii' + >>> deconvolve.inputs.in_files = ['functional.nii', 'functional2.nii'] + >>> deconvolve.inputs.out_file = 'output.nii' >>> deconvolve.inputs.x1D = 'output.1D' - >>> stim_times = [(1, 'stims1.txt', 'SPMG1(4)'), (2, 'stims2.txt', 'SPMG2(4)')] + >>> stim_times = [(1, 'timeseries.txt', 'SPMG1(4)'), (2, 'timeseries.txt', 'SPMG2(4)')] >>> deconvolve.inputs.stim_times = stim_times + >>> deconvolve.inputs.stim_label = [(1, 'Houses'), (2, 'Apartments')] + >>> deconvolve.inputs.gltsym = [('SYM: +Houses -Apartments')] + >>> deconvolve.inputs.glt_label = [(1, 'Houses-Apartments')] >>> deconvolve.cmdline # doctest: +ALLOW_UNICODE - '3dDeconvolve -input functional.nii -bucket output.nii -x1D output -stim_times 1 stims1.txt SPMG1(4) 2 stims2.txt SPMG2(4)' + '3dDeconvolve -num_stimts 2 -num_glt 1 -glt_label 1 Houses_Apartments -gltsym SYM: +Houses -Apartments -input functional.nii functional2.nii -bucket output.nii -stim_label 1 Houses -stim_label 2 Apartments -stim_times 1 timeseries.txt SPMG1(4) -stim_times 2 timeseries.txt SPMG2(4) -x1D output.1D' >>> res = deconvolve.run() # doctest: +SKIP """ @@ -187,6 +213,15 @@ class Deconvolve(AFNICommand): input_spec = DeconvolveInputSpec output_spec = AFNICommandOutputSpec + def _parse_inputs(self, skip=None): + if skip is None: + skip = [] + if len(self.inputs.stim_times) and not isdefined(self.inputs.num_stimts): + self.inputs.num_stimts = len(self.inputs.stim_times) + if len(self.inputs.gltsym) and not isdefined(self.inputs.num_glt): + self.inputs.num_glt = len(self.inputs.gltsym) + return super(Deconvolve, self)._parse_inputs(skip) + def _list_outputs(self): outputs = self.output_spec().get() if isdefined(self.inputs.x1D): @@ -195,23 +230,5 @@ def _list_outputs(self): else: outputs['x1D'] = self.inputs.x1D - outputs['bucket'] = self.inputs.bucket + outputs['out_file'] = self.inputs.out_file return outputs - - def _format_arg(self, name, trait_spec, value): - """ - Argument num_glt is defined automatically from the number of contrasts - desired (defined by the length of glt_sym). No effort has been made to - make this compatible with glt. - """ - if name in ['stim_times', 'stim_labels']: - arg = '' - for st in value: - arg += trait_spec.argstr % value - arg = arg.rstrip() - return arg - - if name == 'stim_times': - self.inputs.num_stimts = len(value) - elif name == 'glt_sym': - self.inputs.num_glt = len(value) From d9eec1de9edf57e46df8d04765fb288e0e8ee658 Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Thu, 22 Jun 2017 17:52:25 -0700 Subject: [PATCH 052/643] Add outputspec and reml_script. --- nipype/interfaces/afni/model.py | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/nipype/interfaces/afni/model.py b/nipype/interfaces/afni/model.py index 3e39d26124..3e161b6011 100644 --- a/nipype/interfaces/afni/model.py +++ b/nipype/interfaces/afni/model.py @@ -87,10 +87,17 @@ class DeconvolveInputSpec(AFNICommandInputSpec): desc='Build a mask automatically from input data (will be slow for ' 'long time series datasets)', argstr='-automask') + STATmask = File( + desc='Build a mask from input file, and use this mask for the purpose ' + 'of reporting truncation-to float issues AND for computing the ' + 'FDR curves. The actual results ARE not masked with this option ' + '(only with \'mask\' or \'automask\' options).', + argstr='-STATmask %s', + exists=True) censor = File( - desc='Filename of censor .1D time series. This is a file of 1s and 0s, ' - 'indicating which time points are to be included (1) and which ' - 'are to be excluded (0).', + desc='Filename of censor .1D time series. This is a file of 1s and ' + '0s, indicating which time points are to be included (1) and ' + 'which are to be excluded (0).', argstr='-censor %s', exists=True) polort = traits.Int( @@ -181,8 +188,9 @@ class DeconvolveInputSpec(AFNICommandInputSpec): class DeconvolveOutputSpec(AFNICommandOutputSpec): - out_file = File(desc='output statistics file', - exists=True) + out_file = File(desc='output statistics file') + reml_script = File(desc='Autogenerated script for 3dREML') + x1D = File(desc='save out X matrix') class Deconvolve(AFNICommand): @@ -202,8 +210,8 @@ class Deconvolve(AFNICommand): >>> stim_times = [(1, 'timeseries.txt', 'SPMG1(4)'), (2, 'timeseries.txt', 'SPMG2(4)')] >>> deconvolve.inputs.stim_times = stim_times >>> deconvolve.inputs.stim_label = [(1, 'Houses'), (2, 'Apartments')] - >>> deconvolve.inputs.gltsym = [('SYM: +Houses -Apartments')] - >>> deconvolve.inputs.glt_label = [(1, 'Houses-Apartments')] + >>> deconvolve.inputs.gltsym = [('+Houses -Apartments')] + >>> deconvolve.inputs.glt_label = [(1, 'Houses_Apartments')] >>> deconvolve.cmdline # doctest: +ALLOW_UNICODE '3dDeconvolve -num_stimts 2 -num_glt 1 -glt_label 1 Houses_Apartments -gltsym SYM: +Houses -Apartments -input functional.nii functional2.nii -bucket output.nii -stim_label 1 Houses -stim_label 2 Apartments -stim_times 1 timeseries.txt SPMG1(4) -stim_times 2 timeseries.txt SPMG2(4) -x1D output.1D' >>> res = deconvolve.run() # doctest: +SKIP @@ -211,7 +219,7 @@ class Deconvolve(AFNICommand): _cmd = '3dDeconvolve' input_spec = DeconvolveInputSpec - output_spec = AFNICommandOutputSpec + output_spec = DeconvolveOutputSpec def _parse_inputs(self, skip=None): if skip is None: @@ -230,5 +238,10 @@ def _list_outputs(self): else: outputs['x1D'] = self.inputs.x1D + _gen_fname_opts = {} + _gen_fname_opts['basename'] = self.inputs.out_file + _gen_fname_opts['cwd'] = os.getcwd() + + outputs['reml_script'] = self._gen_fname(suffix='.REML_cmd', **_gen_fname_opts) outputs['out_file'] = self.inputs.out_file return outputs From 61eb2fef5c2eec4ec9af64636a9d3abd1df39c49 Mon Sep 17 00:00:00 2001 From: Matteo Visconti dOC Date: Thu, 22 Jun 2017 17:49:46 -0700 Subject: [PATCH 053/643] NF: add 3dREMLfit interfaces --- nipype/interfaces/afni/__init__.py | 2 +- nipype/interfaces/afni/model.py | 106 +++++++++++++++++++++++++++++ 2 files changed, 107 insertions(+), 1 deletion(-) diff --git a/nipype/interfaces/afni/__init__.py b/nipype/interfaces/afni/__init__.py index d59af05c7b..d846b8c58c 100644 --- a/nipype/interfaces/afni/__init__.py +++ b/nipype/interfaces/afni/__init__.py @@ -21,4 +21,4 @@ Eval, FWHMx, MaskTool, Merge, Notes, Refit, Resample, TCat, TStat, To3D, Unifize, ZCutUp, GCOR,) -from .model import(Deconvolve) +from .model import (Deconvolve, Remlfit) diff --git a/nipype/interfaces/afni/model.py b/nipype/interfaces/afni/model.py index 3e161b6011..7418db21a5 100644 --- a/nipype/interfaces/afni/model.py +++ b/nipype/interfaces/afni/model.py @@ -245,3 +245,109 @@ def _list_outputs(self): outputs['reml_script'] = self._gen_fname(suffix='.REML_cmd', **_gen_fname_opts) outputs['out_file'] = self.inputs.out_file return outputs + + +class RemlfitInputSpec(AFNICommandInputSpec): + # mandatory files + in_files = InputMultiPath( + File( + exists=True), + desc='Read time series dataset', + argstr='-input %s', + mandatory=True, + copyfile=False, + sep=" ") + matrix = File( + desc='Read the design matrix, which should have been output from ' + '3dDeconvolve via the \'-x1D\' option', + argstr='-matrix %s', + mandatory=True) + # "Semi-Hidden Alternative Ways to Define the Matrix" + polort = traits.Int( + desc='If no -matrix option is given, AND no -matim option, ' + 'create a matrix with Legendre polynomial regressors' + 'up to order P. The default value is P=0, which' + 'produces a matrix with a single column of all ones', + argstr='-polort %d', + xor=['matrix']) + matim = traits.File( + desc='Read a standard .1D file as the matrix.' + '** N.B.: You can use only Col as a name in GLTs' + 'with these nonstandard matrix input methods,' + 'since the other names come from the -matrix file.' + ' ** These mutually exclusive options are ignored if -matrix' + 'is used.', + argstr='-matim %s', + xor=['matrix']) + # Other arguments + mask = File( + desc='filename of 3D mask dataset; ' + 'Only data time series from within the mask ' + 'will be analyzed; results for voxels outside ' + 'the mask will be set to zero.', + argstr='-mask %s', + exists=True) + automask = traits.Bool( + usedefault=True, + argstr='-automask', + desc='Build a mask automatically from input data ' + '(will be slow for long time series datasets)') + fout = traits.Bool( + desc='output F-statistic for each stimulus', + argstr='-fout') + rout = traits.Bool( + desc='output the R^2 statistic for each stimulus', + argstr='-rout') + tout = traits.Bool( + desc='output the T-statistic for each stimulus' + '[if you use -Rbuck and do not give any of -fout, -tout,]' + 'or -rout, then the program assumes -fout is activated.]', + argstr='-tout') + nofdr = traits.Bool( + desc='do NOT add FDR curve data to bucket datasets ' + '[FDR curves can take a long time if -tout is used]', + argstr='-noFDR') + out_file = File( + desc='output statistics file', + argstr='-Rbuck %s') + + +class Remlfit(AFNICommand): + """Performs Generalized least squares time series fit with Restricted + Maximum Likelihood (REML) estimation of the temporal auto-correlation + structure. + + For complete details, see the `3dREMLfit Documentation. + `_ + + Examples + ======== + + >>> from nipype.interfaces import afni + >>> remlfit = afni.Remlfit() + >>> remlfit.inputs.in_files = ['functional.nii', 'functional2.nii'] + >>> remlfit.inputs.out_file = 'output.nii' + >>> remlfit.inputs.matrix = 'output.1D' + >>> remlfit.cmdline # doctest: +ALLOW_UNICODE + '3dREMLfit -input "functional.nii functional2.nii" -matrix output.1D -Rbuck output.nii' + >>> res = remlfit.run() # doctest: +SKIP + """ + + _cmd = '3dREMLfit' + input_spec = RemlfitInputSpec + output_spec = AFNICommandOutputSpec + + def _parse_inputs(self, skip=None): + if skip is None: + skip = [] + skip += ['in_files'] + # we'll have to deal with input ourselves because AFNI might want + # everything into double quotes + inputs = super(Remlfit, self)._parse_inputs(skip) + inputs = [u'-input "{0}"'.format(' '.join(self.inputs.in_files))] + inputs + return inputs + + def _list_outputs(self): + outputs = self.output_spec().get() + outputs['out_file'] = self.inputs.out_file + return outputs From 419cb4a90a3b65b975af7b658e1db2234a87291f Mon Sep 17 00:00:00 2001 From: Matteo Visconti dOC Date: Thu, 22 Jun 2017 18:23:09 -0700 Subject: [PATCH 054/643] Simplify input file formatting --- nipype/interfaces/afni/model.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/nipype/interfaces/afni/model.py b/nipype/interfaces/afni/model.py index 7418db21a5..ba80db6d49 100644 --- a/nipype/interfaces/afni/model.py +++ b/nipype/interfaces/afni/model.py @@ -253,7 +253,7 @@ class RemlfitInputSpec(AFNICommandInputSpec): File( exists=True), desc='Read time series dataset', - argstr='-input %s', + argstr='-input "%s"', mandatory=True, copyfile=False, sep=" ") @@ -340,12 +340,7 @@ class Remlfit(AFNICommand): def _parse_inputs(self, skip=None): if skip is None: skip = [] - skip += ['in_files'] - # we'll have to deal with input ourselves because AFNI might want - # everything into double quotes - inputs = super(Remlfit, self)._parse_inputs(skip) - inputs = [u'-input "{0}"'.format(' '.join(self.inputs.in_files))] + inputs - return inputs + return super(Remlfit, self)._parse_inputs(skip) def _list_outputs(self): outputs = self.output_spec().get() From 028ede6a346f544d34425b5872ceb6e391788f52 Mon Sep 17 00:00:00 2001 From: Ross Markello Date: Fri, 23 Jun 2017 13:12:43 -0400 Subject: [PATCH 055/643] Ran make spec on Deconvolve/Remlfit Added auto_test files from make spec for AFNI interface model.py --- .../afni/tests/test_auto_Deconvolve.py | 110 ++++++++++++++++++ .../afni/tests/test_auto_Remlfit.py | 62 ++++++++++ 2 files changed, 172 insertions(+) create mode 100644 nipype/interfaces/afni/tests/test_auto_Deconvolve.py create mode 100644 nipype/interfaces/afni/tests/test_auto_Remlfit.py diff --git a/nipype/interfaces/afni/tests/test_auto_Deconvolve.py b/nipype/interfaces/afni/tests/test_auto_Deconvolve.py new file mode 100644 index 0000000000..a4f6e52670 --- /dev/null +++ b/nipype/interfaces/afni/tests/test_auto_Deconvolve.py @@ -0,0 +1,110 @@ +# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT +from __future__ import unicode_literals +from ..model import Deconvolve + + +def test_Deconvolve_inputs(): + input_map = dict(STATmask=dict(argstr='-STATmask %s', + ), + TR_1D=dict(argstr='-TR_1D %f', + ), + args=dict(argstr='%s', + ), + automask=dict(argstr='-automask', + ), + censor=dict(argstr='-censor %s', + ), + environ=dict(nohash=True, + usedefault=True, + ), + force_TR=dict(argstr='-force_TR %d', + ), + fout=dict(argstr='-fout', + ), + global_times=dict(argstr='-global_times', + xor=['local_times'], + ), + glt_label=dict(argstr='-glt_label %d %s...', + requires=['gltsym'], + ), + gltsym=dict(argstr='-gltsym SYM: %s...', + ), + ignore_exception=dict(nohash=True, + usedefault=True, + ), + in_files=dict(argstr='-input %s', + copyfile=False, + mandatory=True, + sep=' ', + ), + input1D=dict(argstr='-input1D %s', + ), + jobs=dict(argstr='-jobs %d', + ), + legendre=dict(argstr='-legendre', + ), + local_times=dict(argstr='-local_times', + xor=['global_times'], + ), + mask=dict(argstr='-mask %s', + ), + noblock=dict(argstr='-noblock', + ), + nolegendre=dict(argstr='-nolegendre', + ), + num_glt=dict(argstr='-num_glt %d', + position=1, + ), + num_stimts=dict(argstr='-num_stimts %d', + position=0, + ), + ortvec=dict(argstr='ortvec %s', + ), + out_file=dict(argstr='-bucket %s', + ), + outputtype=dict(), + polort=dict(argstr='-polort %d', + ), + rout=dict(argstr='-rout', + ), + sat=dict(argstr='-sat', + xor=['trans'], + ), + stim_label=dict(argstr='-stim_label %d %s...', + requires=['stim_times'], + ), + stim_times=dict(argstr='-stim_times %d %s %s...', + ), + stim_times_subtract=dict(argstr='-stim_times_subtract %f', + ), + terminal_output=dict(nohash=True, + ), + tout=dict(argstr='-tout', + ), + trans=dict(argstr='-trans', + xor=['sat'], + ), + vout=dict(argstr='-vout', + ), + x1D=dict(argstr='-x1D %s', + ), + x1D_stop=dict(argstr='-x1D_stop', + ), + ) + inputs = Deconvolve.input_spec() + + for key, metadata in list(input_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(inputs.traits()[key], metakey) == value + + +def test_Deconvolve_outputs(): + output_map = dict(out_file=dict(), + reml_script=dict(), + x1D=dict(), + ) + outputs = Deconvolve.output_spec() + + for key, metadata in list(output_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(outputs.traits()[key], metakey) == value diff --git a/nipype/interfaces/afni/tests/test_auto_Remlfit.py b/nipype/interfaces/afni/tests/test_auto_Remlfit.py new file mode 100644 index 0000000000..9d561762a8 --- /dev/null +++ b/nipype/interfaces/afni/tests/test_auto_Remlfit.py @@ -0,0 +1,62 @@ +# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT +from __future__ import unicode_literals +from ..model import Remlfit + + +def test_Remlfit_inputs(): + input_map = dict(args=dict(argstr='%s', + ), + automask=dict(argstr='-automask', + usedefault=True, + ), + environ=dict(nohash=True, + usedefault=True, + ), + fout=dict(argstr='-fout', + ), + ignore_exception=dict(nohash=True, + usedefault=True, + ), + in_files=dict(argstr='-input "%s"', + copyfile=False, + mandatory=True, + sep=' ', + ), + mask=dict(argstr='-mask %s', + ), + matim=dict(argstr='-matim %s', + xor=['matrix'], + ), + matrix=dict(argstr='-matrix %s', + mandatory=True, + ), + nofdr=dict(argstr='-noFDR', + ), + out_file=dict(argstr='-Rbuck %s', + ), + outputtype=dict(), + polort=dict(argstr='-polort %d', + xor=['matrix'], + ), + rout=dict(argstr='-rout', + ), + terminal_output=dict(nohash=True, + ), + tout=dict(argstr='-tout', + ), + ) + inputs = Remlfit.input_spec() + + for key, metadata in list(input_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(inputs.traits()[key], metakey) == value + + +def test_Remlfit_outputs(): + output_map = dict(out_file=dict(), + ) + outputs = Remlfit.output_spec() + + for key, metadata in list(output_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(outputs.traits()[key], metakey) == value From 452aa547b894ff8b29b49304e8c8de66f627ee9a Mon Sep 17 00:00:00 2001 From: Ross Markello Date: Fri, 23 Jun 2017 14:44:47 -0400 Subject: [PATCH 056/643] Fixed Deconvolve output mapping Beefed up AFNICommand Base to include _gen_fname() method (lifted from FSLCommand Base class). Minor bug edits in Deconvolve cmdline code. --- nipype/interfaces/afni/base.py | 52 +++++++++++++++++++++++++++++++-- nipype/interfaces/afni/model.py | 27 ++++++++++------- 2 files changed, 65 insertions(+), 14 deletions(-) diff --git a/nipype/interfaces/afni/base.py b/nipype/interfaces/afni/base.py index 9fc3696f9a..5926d99a0d 100644 --- a/nipype/interfaces/afni/base.py +++ b/nipype/interfaces/afni/base.py @@ -10,7 +10,8 @@ from sys import platform from ... import logging -from ...utils.filemanip import split_filename +from ...utils.filemanip import split_filename, fname_presuffix + from ..base import ( CommandLine, traits, CommandLineInputSpec, isdefined, File, TraitedSpec) from ...external.due import BibTeX @@ -70,7 +71,7 @@ def version(): return tuple(v) @classmethod - def outputtype_to_ext(cls, outputtype): + def output_type_to_ext(cls, outputtype): """Get the file extension for the given output type. Parameters @@ -217,7 +218,7 @@ def set_default_output_type(cls, outputtype): def _overload_extension(self, value, name=None): path, base, _ = split_filename(value) - return os.path.join(path, base + Info.outputtype_to_ext(self.inputs.outputtype)) + return os.path.join(path, base + Info.output_type_to_ext(self.inputs.outputtype)) def _list_outputs(self): outputs = super(AFNICommand, self)._list_outputs() @@ -231,6 +232,51 @@ def _list_outputs(self): outputs[name] = outputs[name] + "+orig.BRIK" return outputs + def _gen_fname(self, basename, cwd=None, suffix=None, change_ext=True, + ext=None): + """Generate a filename based on the given parameters. + + The filename will take the form: cwd/basename. + If change_ext is True, it will use the extentions specified in + intputs.output_type. + + Parameters + ---------- + basename : str + Filename to base the new filename on. + cwd : str + Path to prefix to the new filename. (default is os.getcwd()) + suffix : str + Suffix to add to the `basename`. (defaults is '' ) + change_ext : bool + Flag to change the filename extension to the FSL output type. + (default True) + + Returns + ------- + fname : str + New filename based on given parameters. + + """ + + if basename == '': + msg = 'Unable to generate filename for command %s. ' % self.cmd + msg += 'basename is not set!' + raise ValueError(msg) + if cwd is None: + cwd = os.getcwd() + if ext is None: + ext = Info.output_type_to_ext(self.inputs.outputtype) + if change_ext: + if suffix: + suffix = ''.join((suffix, ext)) + else: + suffix = ext + if suffix is None: + suffix = '' + fname = fname_presuffix(basename, suffix=suffix, + use_ext=False, newpath=cwd) + return fname def no_afni(): """ Checks if AFNI is available """ diff --git a/nipype/interfaces/afni/model.py b/nipype/interfaces/afni/model.py index ba80db6d49..5a9a42b84b 100644 --- a/nipype/interfaces/afni/model.py +++ b/nipype/interfaces/afni/model.py @@ -121,7 +121,7 @@ class DeconvolveInputSpec(AFNICommandInputSpec): desc='Stop running after writing .xmat.1D file', argstr='-x1D_stop') out_file = File( - 'bucket.nii', + 'Decon.nii', desc='Output statistics file', argstr='-bucket %s') jobs = traits.Int( @@ -157,7 +157,7 @@ class DeconvolveInputSpec(AFNICommandInputSpec): Str(desc='model')), desc='Generate a response model from a set of stimulus times' ' given in file.', - argstr='-stim_times %d %s %s...') + argstr='-stim_times %d %s \'%s\'...') stim_label = traits.List( traits.Tuple(traits.Int(desc='k-th input stimulus'), Str(desc='stimulus label')), @@ -178,7 +178,7 @@ class DeconvolveInputSpec(AFNICommandInputSpec): Str(desc='symbolic general linear test'), desc='General linear tests (i.e., contrasts) using symbolic ' 'conventions (e.g., \'+Label1 -Label2\')', - argstr='-gltsym SYM: %s...') + argstr='-gltsym \'SYM: %s\'...') glt_label = traits.List( traits.Tuple(traits.Int(desc='k-th general linear test'), Str(desc='GLT label')), @@ -187,10 +187,14 @@ class DeconvolveInputSpec(AFNICommandInputSpec): requires=['gltsym']) -class DeconvolveOutputSpec(AFNICommandOutputSpec): - out_file = File(desc='output statistics file') - reml_script = File(desc='Autogenerated script for 3dREML') - x1D = File(desc='save out X matrix') +class DeconvolveOutputSpec(TraitedSpec): + out_file = File( + desc='output statistics file', + exists=True) + reml_script = File( + desc='Autogenerated script for 3dREML') + x1D = File( + desc='save out X matrix') class Deconvolve(AFNICommand): @@ -234,16 +238,17 @@ def _list_outputs(self): outputs = self.output_spec().get() if isdefined(self.inputs.x1D): if not self.inputs.x1D.endswith('.xmat.1D'): - outputs['x1D'] = self.inputs.x1D + '.xmat.1D' + outputs['x1D'] = os.path.abspath(self.inputs.x1D + '.xmat.1D') else: - outputs['x1D'] = self.inputs.x1D + outputs['x1D'] = os.path.abspath(self.inputs.x1D) _gen_fname_opts = {} _gen_fname_opts['basename'] = self.inputs.out_file _gen_fname_opts['cwd'] = os.getcwd() + _gen_fname_opts['suffix'] = '.REML_cmd' - outputs['reml_script'] = self._gen_fname(suffix='.REML_cmd', **_gen_fname_opts) - outputs['out_file'] = self.inputs.out_file + outputs['reml_script'] = self._gen_fname(**_gen_fname_opts) + outputs['out_file'] = os.path.abspath(self.inputs.out_file) return outputs From 0a892115ae2f8381bccee6cc63135c3336a04db7 Mon Sep 17 00:00:00 2001 From: Ross Markello Date: Fri, 23 Jun 2017 23:30:21 -0400 Subject: [PATCH 057/643] Fixed issue with Deconvolve doctest Issue with single quotes around Deconvolve doctest --- nipype/interfaces/afni/model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nipype/interfaces/afni/model.py b/nipype/interfaces/afni/model.py index 5a9a42b84b..ec54118d78 100644 --- a/nipype/interfaces/afni/model.py +++ b/nipype/interfaces/afni/model.py @@ -217,7 +217,7 @@ class Deconvolve(AFNICommand): >>> deconvolve.inputs.gltsym = [('+Houses -Apartments')] >>> deconvolve.inputs.glt_label = [(1, 'Houses_Apartments')] >>> deconvolve.cmdline # doctest: +ALLOW_UNICODE - '3dDeconvolve -num_stimts 2 -num_glt 1 -glt_label 1 Houses_Apartments -gltsym SYM: +Houses -Apartments -input functional.nii functional2.nii -bucket output.nii -stim_label 1 Houses -stim_label 2 Apartments -stim_times 1 timeseries.txt SPMG1(4) -stim_times 2 timeseries.txt SPMG2(4) -x1D output.1D' + "3dDeconvolve -num_stimts 2 -num_glt 1 -glt_label 1 Houses_Apartments -gltsym 'SYM: +Houses -Apartments' -input functional.nii functional2.nii -bucket output.nii -stim_label 1 Houses -stim_label 2 Apartments -stim_times 1 timeseries.txt 'SPMG1(4)' -stim_times 2 timeseries.txt 'SPMG2(4)' -x1D output.1D" >>> res = deconvolve.run() # doctest: +SKIP """ From 18edf55b257ed4c41985a723521f28da222fb6d7 Mon Sep 17 00:00:00 2001 From: Mathias Goncalves Date: Sat, 24 Jun 2017 00:39:32 -0400 Subject: [PATCH 058/643] fix: remove unicode literals import unicode in python 2 functions is a nono --- nipype/utils/misc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nipype/utils/misc.py b/nipype/utils/misc.py index 3b08b49e0f..8b1fd09248 100644 --- a/nipype/utils/misc.py +++ b/nipype/utils/misc.py @@ -3,7 +3,7 @@ # vi: set ft=python sts=4 ts=4 sw=4 et: """Miscellaneous utility functions """ -from __future__ import division, unicode_literals, absolute_import +from __future__ import division, absolute_import from future import standard_library standard_library.install_aliases() from builtins import next, str From 44c4dd127333ca13dddf837524e82584b38dbfc1 Mon Sep 17 00:00:00 2001 From: Ross Markello Date: Sat, 24 Jun 2017 01:33:30 -0400 Subject: [PATCH 059/643] Re-ran make spec after Deconvolve doctest Forgot to re-run make spec after Deconvolve doctest update --- nipype/interfaces/afni/tests/test_auto_Deconvolve.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nipype/interfaces/afni/tests/test_auto_Deconvolve.py b/nipype/interfaces/afni/tests/test_auto_Deconvolve.py index a4f6e52670..635c0359a4 100644 --- a/nipype/interfaces/afni/tests/test_auto_Deconvolve.py +++ b/nipype/interfaces/afni/tests/test_auto_Deconvolve.py @@ -27,7 +27,7 @@ def test_Deconvolve_inputs(): glt_label=dict(argstr='-glt_label %d %s...', requires=['gltsym'], ), - gltsym=dict(argstr='-gltsym SYM: %s...', + gltsym=dict(argstr="-gltsym 'SYM: %s'...", ), ignore_exception=dict(nohash=True, usedefault=True, @@ -73,7 +73,7 @@ def test_Deconvolve_inputs(): stim_label=dict(argstr='-stim_label %d %s...', requires=['stim_times'], ), - stim_times=dict(argstr='-stim_times %d %s %s...', + stim_times=dict(argstr="-stim_times %d %s '%s'...", ), stim_times_subtract=dict(argstr='-stim_times_subtract %f', ), From f7fde19d7be318e7a71d8b1e04d082d0ceec98d0 Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Sat, 24 Jun 2017 08:47:02 -0700 Subject: [PATCH 060/643] Improve FSL documentation class skip pattern. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Pattern ‘FSL’ skips class FSL2Scheme. Pattern ‘FSLCommand’ should skip all of the base classes, but not interface classes like FSL2Scheme. --- tools/build_interface_docs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/build_interface_docs.py b/tools/build_interface_docs.py index 1e2227fadf..a798910dcb 100755 --- a/tools/build_interface_docs.py +++ b/tools/build_interface_docs.py @@ -42,7 +42,7 @@ ] docwriter.class_skip_patterns += ['AFNICommand', 'ANTS', - 'FSL', + 'FSLCommand', 'FS', 'Info', '^SPM', From 0b292a1c6611eb7d74360fb3b8f2659cf0d670a9 Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Sat, 24 Jun 2017 09:07:08 -0700 Subject: [PATCH 061/643] Fix #1615. --- doc/images/nipype_architecture_overview2.png | Bin 256418 -> 103068 bytes doc/images/nipype_architecture_overview2.svg | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/images/nipype_architecture_overview2.png b/doc/images/nipype_architecture_overview2.png index b89ace5c57ad4d99c08c7cc72066af601835b7a1..51bad491bd417e069aaaa38481ab5246df84651f 100644 GIT binary patch literal 103068 zcmb@ucRZY36fUX@B9aIagy@VeLG(`a!HghU^e%|rC5Ya88-0wHjOab0Cq%U9z4zX^ z@5uLk=bm%!J@=pci=TPtwcoY(UVH7epY^QuCIqY^M~F|3kA{XuDE~@Y9SscwiiU=@ z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zGqj$lm^4>OviwiX!JZIw()KfGU|Q?^=c(853E8E3T!_6+s6< znhEBo&QfvG&{KpOpFZ*ax3#i^S6Yo)>7eiFo(GE?Bh4(-#qpxj)J1kjo9fR_Uh4l> zkVRd%DonC51FwyNS-k?e7o=6 diwcsTf69AmDu>lG9*}@P107TCGEMu4{|9G{M@s+z diff --git a/doc/images/nipype_architecture_overview2.svg b/doc/images/nipype_architecture_overview2.svg index 4f0833371f..c9265bb293 100644 --- a/doc/images/nipype_architecture_overview2.svg +++ b/doc/images/nipype_architecture_overview2.svg @@ -1362,7 +1362,7 @@ id="tspan4980" x="152.89586" y="-28.912685" - style="font-size:20.79999924px">Idiosynchratic, Heterogeneous APIs + style="font-size:20.79999924px">Idiosyncratic, Heterogeneous APIs Date: Sat, 24 Jun 2017 14:43:17 -0400 Subject: [PATCH 062/643] [FIX]: AFNI Allineate Errors in OutputSpec mapping for Allineate, where out_file name was not successfully generated or mapped. Added xor options for some input options that are mutually exclusive. Included new "overwrite" feature to overwrite output if it already exists. --- nipype/interfaces/afni/preprocess.py | 37 ++++++++++++------- .../afni/tests/test_auto_Allineate.py | 13 +++++-- 2 files changed, 33 insertions(+), 17 deletions(-) diff --git a/nipype/interfaces/afni/preprocess.py b/nipype/interfaces/afni/preprocess.py index 5fd1ab0f21..4b08a4c794 100644 --- a/nipype/interfaces/afni/preprocess.py +++ b/nipype/interfaces/afni/preprocess.py @@ -64,24 +64,29 @@ class AllineateInputSpec(AFNICommandInputSpec): desc='output file from 3dAllineate', argstr='-prefix %s', position=-2, - name_source='%s_allineate', genfile=True) out_param_file = File( argstr='-1Dparam_save %s', - desc='Save the warp parameters in ASCII (.1D) format.') + desc='Save the warp parameters in ASCII (.1D) format.', + xor=['in_param_file']) in_param_file = File( exists=True, argstr='-1Dparam_apply %s', desc='Read warp parameters from file and apply them to ' - 'the source dataset, and produce a new dataset') + 'the source dataset, and produce a new dataset', + xor=['out_param_file']) out_matrix = File( argstr='-1Dmatrix_save %s', - desc='Save the transformation matrix for each volume.') + desc='Save the transformation matrix for each volume.', + xor=['in_matrix']) in_matrix = File( desc='matrix to align input file', argstr='-1Dmatrix_apply %s', - position=-3) - + position=-3, + xor=['out_matrix']) + overwrite = traits.Bool( + desc='overwrite output file if it already exists', + argstr='-overwrite') _cost_funcs = [ 'leastsq', 'ls', 'mutualinfo', 'mi', @@ -250,8 +255,10 @@ class AllineateInputSpec(AFNICommandInputSpec): class AllineateOutputSpec(TraitedSpec): - out_file = File(desc='output image file name') - matrix = File(desc='matrix to align input file') + out_file = File(exists=True, desc='output image file name') + out_matrix = File(exists=True, desc='matrix to align input file') + out_param_file = File(exists=True, desc='warp parameters') + out_weight_file = File(exists=True, desc='weight volume') class Allineate(AFNICommand): @@ -271,7 +278,6 @@ class Allineate(AFNICommand): >>> allineate.cmdline # doctest: +ALLOW_UNICODE '3dAllineate -1Dmatrix_apply cmatrix.mat -prefix functional_allineate.nii -source functional.nii' >>> res = allineate.run() # doctest: +SKIP - """ _cmd = '3dAllineate' @@ -285,21 +291,23 @@ def _format_arg(self, name, trait_spec, value): return super(Allineate, self)._format_arg(name, trait_spec, value) def _list_outputs(self): - outputs = self.output_spec().get() + outputs = self._outputs().get() if not isdefined(self.inputs.out_file): - outputs['out_file'] = self._gen_filename(self.inputs.in_file, - suffix=self.inputs.suffix) + outputs['out_file'] = self._gen_fname(self.inputs.in_file, + suffix='_allineate.nii') else: outputs['out_file'] = os.path.abspath(self.inputs.out_file) if isdefined(self.inputs.out_matrix): - outputs['matrix'] = os.path.abspath(os.path.join(os.getcwd(),\ - self.inputs.out_matrix +'.aff12.1D')) + outputs['out_matrix'] = os.path.abspath(os.path.join(os.getcwd(), + self.inputs.out_matrix + + '.aff12.1D')) return outputs def _gen_filename(self, name): if name == 'out_file': return self._list_outputs()[name] + return None class AutoTcorrelateInputSpec(AFNICommandInputSpec): @@ -358,6 +366,7 @@ class AutoTcorrelate(AFNICommand): '3dAutoTcorrelate -eta2 -mask mask.nii -mask_only_targets -prefix functional_similarity_matrix.1D -polort -1 functional.nii' >>> res = corr.run() # doctest: +SKIP """ + input_spec = AutoTcorrelateInputSpec output_spec = AFNICommandOutputSpec _cmd = '3dAutoTcorrelate' diff --git a/nipype/interfaces/afni/tests/test_auto_Allineate.py b/nipype/interfaces/afni/tests/test_auto_Allineate.py index 0bf37ea8cd..a7a79ee749 100644 --- a/nipype/interfaces/afni/tests/test_auto_Allineate.py +++ b/nipype/interfaces/afni/tests/test_auto_Allineate.py @@ -39,8 +39,10 @@ def test_Allineate_inputs(): ), in_matrix=dict(argstr='-1Dmatrix_apply %s', position=-3, + xor=['out_matrix'], ), in_param_file=dict(argstr='-1Dparam_apply %s', + xor=['out_param_file'], ), interpolation=dict(argstr='-interp %s', ), @@ -64,16 +66,19 @@ def test_Allineate_inputs(): ), out_file=dict(argstr='-prefix %s', genfile=True, - name_source='%s_allineate', position=-2, ), out_matrix=dict(argstr='-1Dmatrix_save %s', + xor=['in_matrix'], ), out_param_file=dict(argstr='-1Dparam_save %s', + xor=['in_param_file'], ), out_weight_file=dict(argstr='-wtprefix %s', ), outputtype=dict(), + overwrite=dict(argstr='-overwrite', + ), reference=dict(argstr='-base %s', ), replacebase=dict(argstr='-replacebase', @@ -113,8 +118,10 @@ def test_Allineate_inputs(): def test_Allineate_outputs(): - output_map = dict(matrix=dict(), - out_file=dict(), + output_map = dict(out_file=dict(), + out_matrix=dict(), + out_param_file=dict(), + out_weight_file=dict(), ) outputs = Allineate.output_spec() From 02fa84f10ab02f02d6e8404c9ce6c0d41813f7c6 Mon Sep 17 00:00:00 2001 From: Dylan Date: Sat, 24 Jun 2017 15:01:58 -0700 Subject: [PATCH 063/643] Add 3dqwarp, and axialize interfaces --- nipype/interfaces/afni/__init__.py | 4 +- nipype/interfaces/afni/preprocess.py | 691 ++++++++++++++++++++++++- nipype/interfaces/afni/utils.py | 63 +++ nipype/testing/data/Q25_warp+tlrc.HEAD | 0 4 files changed, 732 insertions(+), 26 deletions(-) create mode 100644 nipype/testing/data/Q25_warp+tlrc.HEAD diff --git a/nipype/interfaces/afni/__init__.py b/nipype/interfaces/afni/__init__.py index d846b8c58c..f568d88e1f 100644 --- a/nipype/interfaces/afni/__init__.py +++ b/nipype/interfaces/afni/__init__.py @@ -15,10 +15,10 @@ Maskave, Means, OutlierCount, QualityIndex, ROIStats, Retroicor, Seg, SkullStrip, TCorr1D, TCorrMap, TCorrelate, - TShift, Volreg, Warp, QwarpPlusMinus) + TShift, Volreg, Warp, QwarpPlusMinus, Qwarp) from .svm import (SVMTest, SVMTrain) from .utils import (AFNItoNIFTI, Autobox, BrickStat, Calc, Copy, Edge3, Eval, FWHMx, MaskTool, Merge, Notes, Refit, Resample, TCat, TStat, To3D, - Unifize, ZCutUp, GCOR,) + Unifize, ZCutUp, GCOR, Axialize,) from .model import (Deconvolve, Remlfit) diff --git a/nipype/interfaces/afni/preprocess.py b/nipype/interfaces/afni/preprocess.py index 5fd1ab0f21..2c6274ed30 100644 --- a/nipype/interfaces/afni/preprocess.py +++ b/nipype/interfaces/afni/preprocess.py @@ -2362,30 +2362,32 @@ class QwarpPlusMinusInputSpec(CommandLineInputSpec): mandatory=True, exists=True, copyfile=False) - pblur = traits.List(traits.Float(), - desc='The fraction of the patch size that' - 'is used for the progressive blur by providing a ' - 'value between 0 and 0.25. If you provide TWO ' - 'values, the first fraction is used for ' - 'progressively blurring the base image and the ' - 'second for the source image.', - argstr='-pblur %s', - minlen=1, - maxlen=2) - blur = traits.List(traits.Float(), - desc="Gaussian blur the input images by (FWHM) voxels " - "before doing the alignment (the output dataset " - "will not be blurred). The default is 2.345 (for " - "no good reason). Optionally, you can provide 2 " - "values, and then the first one is applied to the " - "base volume, the second to the source volume. A " - "negative blur radius means to use 3D median " - "filtering, rather than Gaussian blurring. This " - "type of filtering will better preserve edges, " - "which can be important in alignment.", - argstr='-blur %s', - minlen=1, - maxlen=2) + pblur = traits.List( + traits.Float(), + desc='The fraction of the patch size that' + 'is used for the progressive blur by providing a ' + 'value between 0 and 0.25. If you provide TWO ' + 'values, the first fraction is used for ' + 'progressively blurring the base image and the ' + 'second for the source image.', + argstr='-pblur %s', + minlen=1, + maxlen=2) + blur = traits.List( + traits.Float(), + desc="Gaussian blur the input images by (FWHM) voxels " + "before doing the alignment (the output dataset " + "will not be blurred). The default is 2.345 (for " + "no good reason). Optionally, you can provide 2 " + "values, and then the first one is applied to the " + "base volume, the second to the source volume. A " + "negative blur radius means to use 3D median " + "filtering, rather than Gaussian blurring. This " + "type of filtering will better preserve edges, " + "which can be important in alignment.", + argstr='-blur %s', + minlen=1, + maxlen=2) noweight = traits.Bool( desc='If you want a binary weight (the old default), use this option.' 'That is, each voxel in the base volume automask will be' @@ -2448,3 +2450,644 @@ def _list_outputs(self): outputs['base_warp'] = os.path.abspath("Qwarp_MINUS_WARP.nii.gz") return outputs + + +class QwarpInputSpec(AFNICommandInputSpec): + in_file = File( + desc='Source image (opposite phase encoding direction than base image).', + argstr='-source %s', + mandatory=True, + exists=True, + copyfile=False) + base_file = File( + desc='Base image (opposite phase encoding direction than source image).', + argstr='-base %s', + mandatory=True, + exists=True, + copyfile=False) + out_file = File(argstr='-prefix %s', + name_template='%s_QW', + name_source=['in_file'], + genfile=True, + desc='out_file ppp' + 'Sets the prefix for the output datasets.' + '* The source dataset is warped to match the base' + 'and gets prefix \'ppp\'. (Except if \'-plusminus\' is used.)' + '* The final interpolation to this output dataset is' + 'done using the \'wsinc5\' method. See the output of' + ' 3dAllineate -HELP' + '(in the "Modifying \'-final wsinc5\'" section) for' + 'the lengthy technical details.' + '* The 3D warp used is saved in a dataset with' + 'prefix \'ppp_WARP\' -- this dataset can be used' + 'with 3dNwarpApply and 3dNwarpCat, for example.' + '* To be clear, this is the warp from source dataset' + ' coordinates to base dataset coordinates, where the' + ' values at each base grid point are the xyz displacments' + ' needed to move that grid point\'s xyz values to the' + ' corresponding xyz values in the source dataset:' + ' base( (x,y,z) + WARP(x,y,z) ) matches source(x,y,z)' + ' Another way to think of this warp is that it \'pulls\'' + ' values back from source space to base space.' + '* 3dNwarpApply would use \'ppp_WARP\' to transform datasets' + 'aligned with the source dataset to be aligned with the' + 'base dataset.' + '** If you do NOT want this warp saved, use the option \'-nowarp\'.' + '-->> (However, this warp is usually the most valuable possible output!)' + '* If you want to calculate and save the inverse 3D warp,' + 'use the option \'-iwarp\'. This inverse warp will then be' + 'saved in a dataset with prefix \'ppp_WARPINV\'.' + '* This inverse warp could be used to transform data from base' + 'space to source space, if you need to do such an operation.' + '* You can easily compute the inverse later, say by a command like' + ' 3dNwarpCat -prefix Z_WARPINV \'INV(Z_WARP+tlrc)\'' + 'or the inverse can be computed as needed in 3dNwarpApply, like' + ' 3dNwarpApply -nwarp \'INV(Z_WARP+tlrc)\' -source Dataset.nii ...') + resample = traits.Bool( + desc='This option simply resamples the source dataset to match the' + 'base dataset grid. You can use this if the two datasets' + 'overlap well (as seen in the AFNI GUI), but are not on the' + 'same 3D grid.' + '* If they don\'t overlap well, allineate them first' + '* The reampling here is done with the' + '\'wsinc5\' method, which has very little blurring artifact.' + '* If the base and source datasets ARE on the same 3D grid,' + 'then the -resample option will be ignored.' + '* You CAN use -resample with these 3dQwarp options:' + '-plusminus -inilev -iniwarp -duplo', + argstr='-resample') + nowarp = traits.Bool( + desc='Do not save the _WARP file.', + argstr='-nowarp') + iwarp = traits.Bool( + desc='Do compute and save the _WARPINV file.', + argstr='-iwarp', + xor=['plusminus']) + pear = traits.Bool( + desc='Use strict Pearson correlation for matching.' + '* Not usually recommended, since the \'clipped Pearson\' method' + 'used by default will reduce the impact of outlier values.', + argstr='-pear') + noneg = traits.Bool( + desc='Replace negative values in either input volume with 0.' + '* If there ARE negative input values, and you do NOT use -noneg,' + 'then strict Pearson correlation will be used, since the \'clipped\'' + 'method only is implemented for non-negative volumes.' + '* \'-noneg\' is not the default, since there might be situations where' + 'you want to align datasets with positive and negative values mixed.' + '* But, in many cases, the negative values in a dataset are just the' + 'result of interpolation artifacts (or other peculiarities), and so' + 'they should be ignored. That is what \'-noneg\' is for.', + argstr='-noneg') + nopenalty = traits.Bool( + desc='Replace negative values in either input volume with 0.' + '* If there ARE negative input values, and you do NOT use -noneg,' + 'then strict Pearson correlation will be used, since the \'clipped\'' + 'method only is implemented for non-negative volumes.' + '* \'-noneg\' is not the default, since there might be situations where' + 'you want to align datasets with positive and negative values mixed.' + '* But, in many cases, the negative values in a dataset are just the' + 'result of interpolation artifacts (or other peculiarities), and so' + 'they should be ignored. That is what \'-noneg\' is for.', + argstr='-nopenalty') + penfac = traits.Float( + desc='Use this value to weight the penalty.' + 'The default value is 1.Larger values mean the' + 'penalty counts more, reducing grid distortions,' + 'insha\'Allah; \'-nopenalty\' is the same as \'-penfac 0\'.' + ' -->>* [23 Sep 2013] -- Zhark increased the default value of' + ' the penalty by a factor of 5, and also made it get' + ' progressively larger with each level of refinement.' + ' Thus, warping results will vary from earlier instances' + ' of 3dQwarp.' + ' * The progressive increase in the penalty at higher levels' + ' means that the \'cost function\' can actually look like the' + ' alignment is getting worse when the levels change.' + ' * IF you wish to turn off this progression, for whatever' + ' reason (e.g., to keep compatibility with older results),' + ' use the option \'-penold\'.To be completely compatible with' + ' the older 3dQwarp, you\'ll also have to use \'-penfac 0.2\'.', + argstr='-penfac %f') + noweight = traits.Bool( + desc='If you want a binary weight (the old default), use this option.' + 'That is, each voxel in the base volume automask will be' + 'weighted the same in the computation of the cost functional.', + argstr='-noweight') + weight = File( + desc='Instead of computing the weight from the base dataset,' + 'directly input the weight volume from dataset \'www\'.' + '* Useful if you know what over parts of the base image you' + 'want to emphasize or de-emphasize the matching functional.', + argstr='-weight %s', + exists=True) + wball = traits.List( + traits.Int(), + desc='-wball x y z r f' + 'Enhance automatic weight from \'-useweight\' by a factor' + 'of 1+f*Gaussian(FWHM=r) centered in the base image at' + 'DICOM coordinates (x,y,z) and with radius \'r\'. The' + 'goal of this option is to try and make the alignment' + 'better in a specific part of the brain.' + '* Example: -wball 0 14 6 30 40' + 'to emphasize the thalamic area (in MNI/Talairach space).' + '* The \'r\' parameter must be positive!' + '* The \'f\' parameter must be between 1 and 100 (inclusive).' + '* \'-wball\' does nothing if you input your own weight' + 'with the \'-weight\' option.' + '* \'-wball\' does change the binary weight created by' + 'the \'-noweight\' option.' + '* You can only use \'-wball\' once in a run of 3dQwarp.' + '*** The effect of \'-wball\' is not dramatic. The example' + 'above makes the average brain image across a collection' + 'of subjects a little sharper in the thalamic area, which' + 'might have some small value. If you care enough about' + 'alignment to use \'-wball\', then you should examine the' + 'results from 3dQwarp for each subject, to see if the' + 'alignments are good enough for your purposes.', + argstr='-wball %s', + minlen=5, + maxlen=5) + traits.Tuple( + (traits.Float(), traits.Float()), + argstr='-bpass %f %f') + wmask = traits.Tuple( + (File(exists=True), traits.Float()), + desc='-wmask ws f' + 'Similar to \'-wball\', but here, you provide a dataset \'ws\'' + 'that indicates where to increase the weight.' + '* The \'ws\' dataset must be on the same 3D grid as the base dataset.' + '* \'ws\' is treated as a mask -- it only matters where it' + 'is nonzero -- otherwise, the values inside are not used.' + '* After \'ws\' comes the factor \'f\' by which to increase the' + 'automatically computed weight. Where \'ws\' is nonzero,' + 'the weighting will be multiplied by (1+f).' + '* As with \'-wball\', the factor \'f\' should be between 1 and 100.' + '* You cannot use \'-wball\' and \'-wmask\' together!', + argstr='-wpass %s %f') + out_weight_file = traits.File( + argstr='-wtprefix %s', + desc='Write the weight volume to disk as a dataset') + blur = traits.List( + traits.Float(), + desc='Gaussian blur the input images by \'bb\' (FWHM) voxels before' + 'doing the alignment (the output dataset will not be blurred).' + 'The default is 2.345 (for no good reason).' + '* Optionally, you can provide 2 values for \'bb\', and then' + 'the first one is applied to the base volume, the second' + 'to the source volume.' + '-->>* e.g., \'-blur 0 3\' to skip blurring the base image' + '(if the base is a blurry template, for example).' + '* A negative blur radius means to use 3D median filtering,' + 'rather than Gaussian blurring. This type of filtering will' + 'better preserve edges, which can be important in alignment.' + '* If the base is a template volume that is already blurry,' + 'you probably don\'t want to blur it again, but blurring' + 'the source volume a little is probably a good idea, to' + 'help the program avoid trying to match tiny features.' + '* Note that -duplo will blur the volumes some extra' + 'amount for the initial small-scale warping, to make' + 'that phase of the program converge more rapidly.', + argstr='-blur %s', + minlen=1, + maxlen=2) + pblur = traits.List( + traits.Float(), + desc='Use progressive blurring; that is, for larger patch sizes,' + 'the amount of blurring is larger. The general idea is to' + 'avoid trying to match finer details when the patch size' + 'and incremental warps are coarse. When \'-blur\' is used' + 'as well, it sets a minimum amount of blurring that will' + 'be used. [06 Aug 2014 -- \'-pblur\' may become the default someday].' + '* You can optionally give the fraction of the patch size that' + 'is used for the progressive blur by providing a value between' + '0 and 0.25 after \'-pblur\'. If you provide TWO values, the' + 'the first fraction is used for progressively blurring the' + 'base image and the second for the source image. The default' + 'parameters when just \'-pblur\' is given is the same as giving' + 'the options as \'-pblur 0.09 0.09\'.' + '* \'-pblur\' is useful when trying to match 2 volumes with high' + 'amounts of detail; e.g, warping one subject\'s brain image to' + 'match another\'s, or trying to warp to match a detailed template.' + '* Note that using negative values with \'-blur\' means that the' + 'progressive blurring will be done with median filters, rather' + 'than Gaussian linear blurring.' + '-->>*** The combination of the -allineate and -pblur options will make' + 'the results of using 3dQwarp to align to a template somewhat' + 'less sensitive to initial head position and scaling.', + argstr='-pblur %s', + minlen=1, + maxlen=2) + emask = File( + desc='Here, \'ee\' is a dataset to specify a mask of voxels' + 'to EXCLUDE from the analysis -- all voxels in \'ee\'' + 'that are NONZERO will not be used in the alignment.' + '* The base image always automasked -- the emask is' + 'extra, to indicate voxels you definitely DON\'T want' + 'included in the matching process, even if they are' + 'inside the brain.', + argstr='-emask %s', + exists=True, + copyfile=False) + noXdis = traits.Bool( + desc='Warp will not displace in x directoin', + argstr='-noXdis') + noYdis = traits.Bool( + desc='Warp will not displace in y directoin', + argstr='-noYdis') + noZdis = traits.Bool( + desc='Warp will not displace in z directoin', + argstr='-noZdis') + iniwarp = traits.List( + File(exists=True, copyfile=False), + desc='A dataset with an initial nonlinear warp to use.' + '* If this option is not used, the initial warp is the identity.' + '* You can specify a catenation of warps (in quotes) here, as in' + 'program 3dNwarpApply.' + '* As a special case, if you just input an affine matrix in a .1D' + 'file, that will work also -- it is treated as giving the initial' + 'warp via the string "IDENT(base_dataset) matrix_file.aff12.1D".' + '* You CANNOT use this option with -duplo !!' + '* -iniwarp is usually used with -inilev to re-start 3dQwarp from' + 'a previous stopping point.', + argstr='-iniwarp %s', + xor=['duplo']) + inilev = traits.Int( + desc='The initial refinement \'level\' at which to start.' + '* Usually used with -iniwarp; CANNOT be used with -duplo.' + '* The combination of -inilev and -iniwarp lets you take the' + 'results of a previous 3dQwarp run and refine them further:' + 'Note that the source dataset in the second run is the SAME as' + 'in the first run. If you don\'t see why this is necessary,' + 'then you probably need to seek help from an AFNI guru.', + argstr='-inlev %d', + xor=['duplo']) + minpatch = traits.Int( + desc='* The value of mm should be an odd integer.' + '* The default value of mm is 25.' + '* For more accurate results than mm=25, try 19 or 13.' + '* The smallest allowed patch size is 5.' + '* You may want stop at a larger patch size (say 7 or 9) and use' + 'the -Qfinal option to run that final level with quintic warps,' + 'which might run faster and provide the same degree of warp detail.' + '* Trying to make two different brain volumes match in fine detail' + 'is usually a waste of time, especially in humans. There is too' + 'much variability in anatomy to match gyrus to gyrus accurately.' + 'For this reason, the default minimum patch size is 25 voxels.' + 'Using a smaller \'-minpatch\' might try to force the warp to' + 'match features that do not match, and the result can be useless' + 'image distortions -- another reason to LOOK AT THE RESULTS.', + argstr='-minpatch %d') + maxlev = traits.Int( + desc='The initial refinement \'level\' at which to start.' + '* Usually used with -iniwarp; CANNOT be used with -duplo.' + '* The combination of -inilev and -iniwarp lets you take the' + 'results of a previous 3dQwarp run and refine them further:' + 'Note that the source dataset in the second run is the SAME as' + 'in the first run. If you don\'t see why this is necessary,' + 'then you probably need to seek help from an AFNI guru.', + argstr='-maxlev %d', + xor=['duplo'], + position=-1) + gridlist = File( + desc='This option provides an alternate way to specify the patch' + 'grid sizes used in the warp optimization process. \'gl\' is' + 'a 1D file with a list of patches to use -- in most cases,' + 'you will want to use it in the following form:' + '-gridlist \'1D: 0 151 101 75 51\'' + '* Here, a 0 patch size means the global domain. Patch sizes' + 'otherwise should be odd integers >= 5.' + '* If you use the \'0\' patch size again after the first position,' + 'you will actually get an iteration at the size of the' + 'default patch level 1, where the patch sizes are 75% of' + 'the volume dimension. There is no way to force the program' + 'to literally repeat the sui generis step of lev=0.' + '* You cannot use -gridlist with -duplo or -plusminus!', + argstr='-gridlist %s', + exists=True, + copyfile=False, + xor=['duplo', 'plusminus']) + allsave = traits.Bool( + desc='This option lets you save the output warps from each level' + 'of the refinement process. Mostly used for experimenting.' + '* Cannot be used with -nopadWARP, -duplo, or -plusminus.' + '* Will only save all the outputs if the program terminates' + 'normally -- if it crashes, or freezes, then all these' + 'warps are lost.', + argstr='-allsave', + xor=['nopadWARP', 'duplo', 'plusminus']) + duplo = traits.Bool( + desc='Start off with 1/2 scale versions of the volumes,' + 'for getting a speedy coarse first alignment.' + '* Then scales back up to register the full volumes.' + 'The goal is greater speed, and it seems to help this' + 'positively piggish program to be more expeditious.' + '* However, accuracy is somewhat lower with \'-duplo\',' + 'for reasons that currenly elude Zhark; for this reason,' + 'the Emperor does not usually use \'-duplo\'.', + argstr='-duplo', + xor=['gridlist', 'maxlev', 'inilev', 'iniwarp', 'plusminus', 'allsave']) + workhard = traits.Bool( + desc='Iterate more times, which can help when the volumes are' + 'hard to align at all, or when you hope to get a more precise' + 'alignment.' + '* Slows the program down (possibly a lot), of course.' + '* When you combine \'-workhard\' with \'-duplo\', only the' + 'full size volumes get the extra iterations.' + '* For finer control over which refinement levels work hard,' + 'you can use this option in the form (for example)' + ' -workhard:4:7' + 'which implies the extra iterations will be done at levels' + '4, 5, 6, and 7, but not otherwise.' + '* You can also use \'-superhard\' to iterate even more, but' + 'this extra option will REALLY slow things down.' + '-->>* Under most circumstances, you should not need to use either' + '-workhard or -superhard.' + '-->>* The fastest way to register to a template image is via the' + '-duplo option, and without the -workhard or -superhard options.' + '-->>* If you use this option in the form \'-Workhard\' (first letter' + 'in upper case), then the second iteration at each level is' + 'done with quintic polynomial warps.', + argstr='-workhard', + xor=['boxopt', 'ballopt']) + Qfinal = traits.Bool( + desc='At the finest patch size (the final level), use Hermite' + 'quintic polynomials for the warp instead of cubic polynomials.' + '* In a 3D \'patch\', there are 2x2x2x3=24 cubic polynomial basis' + 'function parameters over which to optimize (2 polynomials' + 'dependent on each of the x,y,z directions, and 3 different' + 'directions of displacement).' + '* There are 3x3x3x3=81 quintic polynomial parameters per patch.' + '* With -Qfinal, the final level will have more detail in' + 'the allowed warps, at the cost of yet more CPU time.' + '* However, no patch below 7x7x7 in size will be done with quintic' + 'polynomials.' + '* This option is also not usually needed, and is experimental.', + argstr='-Qfinal') + Qonly = traits.Bool( + desc='Use Hermite quintic polynomials at all levels.' + '* Very slow (about 4 times longer). Also experimental.' + '* Will produce a (discrete representation of a) C2 warp.', + argstr='-Qonly') + plusminus = traits.Bool( + desc='Normally, the warp displacements dis(x) are defined to match' + 'base(x) to source(x+dis(x)). With this option, the match' + 'is between base(x-dis(x)) and source(x+dis(x)) -- the two' + 'images \'meet in the middle\'.' + '* One goal is to mimic the warping done to MRI EPI data by' + 'field inhomogeneities, when registering between a \'blip up\'' + 'and a \'blip down\' down volume, which will have opposite' + 'distortions.' + '* Define Wp(x) = x+dis(x) and Wm(x) = x-dis(x). Then since' + 'base(Wm(x)) matches source(Wp(x)), by substituting INV(Wm(x))' + 'wherever we see x, we have base(x) matches source(Wp(INV(Wm(x))));' + 'that is, the warp V(x) that one would get from the \'usual\' way' + 'of running 3dQwarp is V(x) = Wp(INV(Wm(x))).' + '* Conversely, we can calculate Wp(x) in terms of V(x) as follows:' + 'If V(x) = x + dv(x), define Vh(x) = x + dv(x)/2;' + 'then Wp(x) = V(INV(Vh(x)))' + '* With the above formulas, it is possible to compute Wp(x) from' + 'V(x) and vice-versa, using program 3dNwarpCalc. The requisite' + 'commands are left as an exercise for the aspiring AFNI Jedi Master.' + '* You can use the semi-secret \'-pmBASE\' option to get the V(x)' + 'warp and the source dataset warped to base space, in addition to' + 'the Wp(x) \'_PLUS\' and Wm(x) \'_MINUS\' warps.' + '-->>* Alas: -plusminus does not work with -duplo or -allineate :-(' + '* However, you can use -iniwarp with -plusminus :-)' + '-->>* The outputs have _PLUS (from the source dataset) and _MINUS' + '(from the base dataset) in their filenames, in addition to' + 'the prefix. The -iwarp option, if present, will be ignored.', + argstr='-plusminus', + xor=['duplo', 'allsave', 'iwarp']) + nopad = traits.Bool( + desc='Do NOT use zero-padding on the 3D base and source images.' + '[Default == zero-pad, if needed]' + '* The underlying model for deformations goes to zero at the' + 'edge of the volume being warped. However, if there is' + 'significant data near an edge of the volume, then it won\'t' + 'get displaced much, and so the results might not be good.' + '* Zero padding is designed as a way to work around this potential' + 'problem. You should NOT need the \'-nopad\' option for any' + 'reason that Zhark can think of, but it is here to be symmetrical' + 'with 3dAllineate.' + '* Note that the output (warped from source) dataset will be on the' + 'base dataset grid whether or not zero-padding is allowed. However,' + 'unless you use the following option, allowing zero-padding (i.e.,' + 'the default operation) will make the output WARP dataset(s) be' + 'on a larger grid (also see \'-expad\' below).', + argstr='-nopad') + nopadWARP = traits.Bool( + desc='If for some reason you require the warp volume to' + 'match the base volume, then use this option to have the output' + 'WARP dataset(s) truncated.', + argstr='-nopadWARP', + xor=['allsave', 'expad']) + expad = traits.Int( + desc='This option instructs the program to pad the warp by an extra' + '\'EE\' voxels (and then 3dQwarp starts optimizing it).' + '* This option is seldom needed, but can be useful if you' + 'might later catenate the nonlinear warp -- via 3dNwarpCat --' + 'with an affine transformation that contains a large shift.' + 'Under that circumstance, the nonlinear warp might be shifted' + 'partially outside its original grid, so expanding that grid' + 'can avoid this problem.' + '* Note that this option perforce turns off \'-nopadWARP\'.', + argstr='-expad %d', + xor=['nopadWARP']) + ballopt = traits.Bool( + desc='Normally, the incremental warp parameters are optimized inside' + 'a rectangular \'box\' (24 dimensional for cubic patches, 81 for' + 'quintic patches), whose limits define the amount of distortion' + 'allowed at each step. Using \'-ballopt\' switches these limits' + 'to be applied to a \'ball\' (interior of a hypersphere), which' + 'can allow for larger incremental displacements. Use this' + 'option if you think things need to be able to move farther.', + argstr='-ballopt', + xor=['workhard', 'boxopt']) + baxopt = traits.Bool( + desc='Use the \'box\' optimization limits instead of the \'ball\'' + '[this is the default at present].' + '* Note that if \'-workhard\' is used, then ball and box optimization' + 'are alternated in the different iterations at each level, so' + 'these two options have no effect in that case.', + argstr='-boxopt', + xor=['workhard', 'ballopt']) + verb = traits.Bool( + desc='more detailed description of the process', + argstr='-verb', + xor=['quiet']) + quiet = traits.Bool( + desc='Cut out most of the fun fun fun progress messages :-(', + argstr='-quiet', + xor=['verb']) + # Hidden and semi-hidden options + overwrite = traits.Bool( + desc='Overwrite outputs', + argstr='-overwrite') + lpc = traits.Bool( + desc='Local Pearson minimization (i.e., EPI-T1 registration)' + 'This option has not be extensively tested' + 'If you use \'-lpc\', then \'-maxlev 0\' is automatically set.' + 'If you want to go to more refined levels, you can set \'-maxlev\'' + 'This should be set up to have lpc as the second to last argument' + 'and maxlev as the second to last argument, as needed by AFNI' + 'Using maxlev > 1 is not recommended for EPI-T1 alignment.', + argstr='-lpc', + xor=['nmi', 'mi', 'hel', 'lpa', 'pear'], + position=-2) + lpa = traits.Bool( + desc='Local Pearson maximization' + 'This option has not be extensively tested', + argstr='-lpa', + xor=['nmi', 'mi', 'lpc', 'hel', 'pear']) + hel = traits.Bool( + desc='Hellinger distance: a matching function for the adventurous' + 'This option has NOT be extensively tested for usefullness' + 'and should be considered experimental at this infundibulum.', + argstr='-hel', + xor=['nmi', 'mi', 'lpc', 'lpa', 'pear']) + mi = traits.Bool( + desc='Mutual Information: a matching function for the adventurous' + 'This option has NOT be extensively tested for usefullness' + 'and should be considered experimental at this infundibulum.', + argstr='-mi', + xor=['mi', 'hel', 'lpc', 'lpa', 'pear']) + nmi = traits.Bool( + desc='Normalized Mutual Information: a matching function for the adventurous' + 'This option has NOT be extensively tested for usefullness' + 'and should be considered experimental at this infundibulum.', + argstr='-nmi', + xor=['nmi', 'hel', 'lpc', 'lpa', 'pear']) + + + +class QwarpOutputSpec(TraitedSpec): + warped_source = File( + desc='Warped source file. If plusminus is used, this is the undistorted' + 'source file.') + warped_base = File(desc='Undistorted base file.') + source_warp = File( + desc="Displacement in mm for the source image." + "If plusminus is used this is the field suceptibility correction" + "warp (in 'mm') for source image.") + base_warp = File( + desc="Displacement in mm for the base image." + "If plus minus is used, this is the field suceptibility correction" + "warp (in 'mm') for base image. This is only output if plusminus" + "or iwarp options are passed") + weights = File( + desc="Auto-computed weight volume.") + + +class Qwarp(AFNICommand): + """A version of 3dQwarp + Allineate your images prior to passing them to this workflow. + + For complete details, see the `3dQwarp Documentation. + `_ + + Examples + ======== + + >>> from nipype.interfaces import afni + >>> qwarp = afni.Qwarp() + >>> qwarp.inputs.in_file = 'sub-01_dir-LR_epi.nii.gz' + >>> qwarp.inputs.nopadWARP = True + >>> qwarp.inputs.base_file = 'sub-01_dir-RL_epi.nii.gz' + >>> qwarp.inputs.plusminus = True + >>> qwarp.cmdline # doctest: +ALLOW_UNICODE + '3dQwarp -base sub-01_dir-RL_epi.nii.gz -source sub-01_dir-LR_epi.nii.gz -nopadWARP -prefix sub-01_dir-LR_epi_QW -plusminus' + >>> res = qwarp.run() # doctest: +SKIP + + >>> from nipype.interfaces import afni + >>> qwarp = afni.Qwarp() + >>> qwarp.inputs.in_file = 'structural.nii' + >>> qwarp.inputs.base_file = 'mni.nii' + >>> qwarp.inputs.resample = True + >>> qwarp.cmdline # doctest: +ALLOW_UNICODE + '3dQwarp -base mni.nii -source structural.nii -prefix structural_QW -resample' + >>> res = qwarp.run() # doctest: +SKIP + + >>> from nipype.interfaces import afni + >>> qwarp = afni.Qwarp() + >>> qwarp.inputs.in_file = 'structural.nii' + >>> qwarp.inputs.base_file = 'epi.nii' + >>> qwarp.inputs.out_file = 'anatSSQ.nii.gz' + >>> qwarp.inputs.resample = True + >>> qwarp.inputs.lpc = True + >>> qwarp.inputs.verb = True + >>> qwarp.inputs.iwarp = True + >>> qwarp.inputs.blur = [0,3] + >>> qwarp.cmdline # doctest: +ALLOW_UNICODE + '3dQwarp -base epi.nii -blur 0.0 3.0 -source structural.nii -iwarp -prefix anatSSQ.nii.gz -resample -verb -lpc' + >>> res = qwarp.run() # doctest: +SKIP + + >>> from nipype.interfaces import afni + >>> qwarp = afni.Qwarp() + >>> qwarp.inputs.in_file = 'structural.nii' + >>> qwarp.inputs.base_file = 'mni.nii' + >>> qwarp.inputs.duplo = True + >>> qwarp.inputs.blur = [0,3] + >>> qwarp.cmdline # doctest: +ALLOW_UNICODE + '3dQwarp -base mni.nii -blur 0.0 3.0 -duplo -source structural.nii -prefix structural_QW' + >>> res = qwarp.run() # doctest: +SKIP + + >>> from nipype.interfaces import afni + >>> qwarp = afni.Qwarp() + >>> qwarp.inputs.in_file = 'structural.nii' + >>> qwarp.inputs.base_file = 'mni.nii' + >>> qwarp.inputs.duplo = True + >>> qwarp.inputs.minpatch = 25 + >>> qwarp.inputs.blur = [0,3] + >>> qwarp.inputs.out_file = 'Q25' + >>> qwarp.cmdline # doctest: +ALLOW_UNICODE + '3dQwarp -base mni.nii -blur 0.0 3.0 -duplo -source structural.nii -minpatch 25 -prefix Q25' + >>> res = qwarp.run() # doctest: +SKIP + >>> qwarp2 = afni.Qwarp() + >>> qwarp2.inputs.in_file = 'structural.nii' + >>> qwarp2.inputs.base_file = 'mni.nii' + >>> qwarp2.inputs.blur = [0,2] + >>> qwarp2.inputs.out_file = 'Q11' + >>> qwarp2.inputs.inilev = 7 + >>> qwarp2.inputs.iniwarp = ['Q25_warp+tlrc.HEAD'] + >>> qwarp2.cmdline # doctest: +ALLOW_UNICODE + '3dQwarp -base mni.nii -blur 0.0 2.0 -source structural.nii -inlev 7 -iniwarp Q25_warp+tlrc.HEAD -prefix Q11' + >>> res2 = qwarp2.run() # doctest: +SKIP + """ + _cmd = '3dQwarp' + input_spec = QwarpInputSpec + output_spec = QwarpOutputSpec + + def _list_outputs(self): + outputs = self.output_spec().get() + + if not isdefined(self.inputs.out_file): + prefix = self._gen_fname(self.inputs.in_file, suffix='_QW') + ext = '.HEAD' + else: + prefix = self.inputs.out_file + ext_ind = max([prefix.lower().rfind('.nii.gz'), + prefix.lower().rfind('.nii.')]) + if ext_ind == -1: + ext = '.HEAD' + else: + ext = prefix[ext_ind:] + print(ext,"ext") + outputs['warped_source'] = os.path.abspath(self._gen_fname(prefix, suffix='+tlrc')+ext) + if not self.inputs.nowarp: + outputs['source_warp'] = os.path.abspath(self._gen_fname(prefix, suffix='_WARP+tlrc')+ext) + if self.inputs.iwarp: + outputs['base_warp'] = os.path.abspath(self._gen_fname(prefix, suffix='_WARPINV+tlrc')+ext) + if isdefined(self.inputs.out_weight_file): + outputs['weights'] = os.path.abspath(self.inputs.out_weight_file) + + if self.inputs.plusminus: + outputs['warped_source'] = os.path.abspath(self._gen_fname(prefix, suffix='_PLUS+tlrc')+ext) + outputs['warped_base'] = os.path.abspath(self._gen_fname(prefix, suffix='_MINUS+tlrc')+ext) + outputs['source_warp'] = os.path.abspath(self._gen_fname(prefix, suffix='_PLUS_WARP+tlrc')+ext) + outputs['base_warp'] = os.path.abspath(self._gen_fname(prefix, suffix='_MINUS_WARP+tlrc',)+ext) + + return outputs + + def _gen_filename(self, name): + if name == 'out_file': + return self._gen_fname(self.inputs.source_file, suffix='_QW') diff --git a/nipype/interfaces/afni/utils.py b/nipype/interfaces/afni/utils.py index 8500f998db..293a52b01f 100644 --- a/nipype/interfaces/afni/utils.py +++ b/nipype/interfaces/afni/utils.py @@ -1534,3 +1534,66 @@ def _run_interface(self, runtime): def _list_outputs(self): return {'out': getattr(self, '_gcor')} + + +class AxializeInputSpec(AFNICommandInputSpec): + in_file = File( + desc='input file to 3daxialize', + argstr='%s', + position=-2, + mandatory=True, + exists=True, + copyfile=False) + out_file = File( + name_template='%s_axialize', + desc='output image file name', + argstr='-prefix %s', + name_source='in_file') + verb = traits.Bool( + desc='Print out a progerss report', + argstr='-verb') + sagittal = traits.Bool( + desc='Do sagittal slice order [-orient ASL]', + argstr='-sagittal', + xor=['coronal', 'axial']) + coronal = traits.Bool( + desc='Do coronal slice order [-orient RSA]', + argstr='-coronal', + xor=['sagittal', 'axial']) + axial = traits.Bool( + desc='Do axial slice order [-orient RAI]' + 'This is the default AFNI axial order, and' + 'is the one currently required by the' + 'volume rendering plugin; this is also' + 'the default orientation output by this' + "program (hence the program's name).", + argstr='-axial', + xor=['coronal', 'sagittal']) + orientation = Str( + desc='new orientation code', + argstr='-orient %s') + + +class Axialize(AFNICommand): + """Read in a dataset and write it out as a new dataset + with the data brick oriented as axial slices. + + For complete details, see the `3dcopy Documentation. + `_ + + Examples + ======== + + >>> from nipype.interfaces import afni + >>> axial3d = afni.Axialize() + >>> axial3d.inputs.in_file = 'functional.nii' + >>> axial3d.inputs.out_file = 'axialized.nii' + >>> axial3d.cmdline # doctest: +ALLOW_UNICODE + '3daxialize -prefix axialized.nii functional.nii' + >>> res = axial3d.run() # doctest: +SKIP + + """ + + _cmd = '3daxialize' + input_spec = AxializeInputSpec + output_spec = AFNICommandOutputSpec diff --git a/nipype/testing/data/Q25_warp+tlrc.HEAD b/nipype/testing/data/Q25_warp+tlrc.HEAD new file mode 100644 index 0000000000..e69de29bb2 From 86581c5da79960f3b736be692636dff15490c0ab Mon Sep 17 00:00:00 2001 From: Michael Waskom Date: Sun, 25 Jun 2017 14:36:30 -0400 Subject: [PATCH 064/643] Use .strerror attribute instead of str() coercion --- nipype/interfaces/io.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nipype/interfaces/io.py b/nipype/interfaces/io.py index 7a1cda6102..6498421ce6 100644 --- a/nipype/interfaces/io.py +++ b/nipype/interfaces/io.py @@ -71,7 +71,7 @@ def copytree(src, dst, use_hardlink=False): try: os.makedirs(dst) except OSError as why: - if 'File exists' in str(why): + if 'File exists' in why.strerror: pass else: raise why @@ -86,7 +86,7 @@ def copytree(src, dst, use_hardlink=False): copyfile(srcname, dstname, True, hashmethod='content', use_hardlink=use_hardlink) except (IOError, os.error) as why: - errors.append((srcname, dstname, str(why))) + errors.append((srcname, dstname, why.strerror)) # catch the Error from the recursive copytree so that we can # continue with other files except Exception as err: @@ -687,7 +687,7 @@ def _list_outputs(self): try: os.makedirs(outdir) except OSError as inst: - if 'File exists' in str(inst): + if 'File exists' in inst.strerror: pass else: raise(inst) @@ -738,7 +738,7 @@ def _list_outputs(self): try: os.makedirs(path) except OSError as inst: - if 'File exists' in str(inst): + if 'File exists' in inst.strerror: pass else: raise(inst) From 7d717986c5d9bb1a9674c408d6a367cf9f71e01b Mon Sep 17 00:00:00 2001 From: Michael Waskom Date: Mon, 26 Jun 2017 15:08:15 -0400 Subject: [PATCH 065/643] Don't use strerror on IOError object --- nipype/interfaces/io.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nipype/interfaces/io.py b/nipype/interfaces/io.py index 6498421ce6..902bd51f7a 100644 --- a/nipype/interfaces/io.py +++ b/nipype/interfaces/io.py @@ -86,7 +86,7 @@ def copytree(src, dst, use_hardlink=False): copyfile(srcname, dstname, True, hashmethod='content', use_hardlink=use_hardlink) except (IOError, os.error) as why: - errors.append((srcname, dstname, why.strerror)) + errors.append((srcname, dstname, str(why))) # catch the Error from the recursive copytree so that we can # continue with other files except Exception as err: From a9a99ecbc26c29e7ad540d60f7fd2ac5d5a8e7f5 Mon Sep 17 00:00:00 2001 From: Ross Markello Date: Tue, 27 Jun 2017 12:29:46 -0400 Subject: [PATCH 066/643] [ENH]: Updated Deconvolve and Remlfit Added variety of new options to AFNI's Deconolve and Remlfit interfaces. --- nipype/interfaces/afni/model.py | 406 ++++++++++++++---- .../afni/tests/test_auto_Deconvolve.py | 30 +- .../afni/tests/test_auto_Remlfit.py | 70 ++- 3 files changed, 418 insertions(+), 88 deletions(-) diff --git a/nipype/interfaces/afni/model.py b/nipype/interfaces/afni/model.py index ec54118d78..e6413d7883 100644 --- a/nipype/interfaces/afni/model.py +++ b/nipype/interfaces/afni/model.py @@ -28,27 +28,27 @@ class DeconvolveInputSpec(AFNICommandInputSpec): in_files = InputMultiPath( File( exists=True), - desc='Filenames of 3D+time input datasets. More than one filename can ' + desc='filenames of 3D+time input datasets. More than one filename can ' 'be given and the datasets will be auto-catenated in time. ' 'You can input a 1D time series file here, but the time axis ' 'should run along the ROW direction, not the COLUMN direction as ' 'in the \'input1D\' option.', argstr='-input %s', - mandatory=True, copyfile=False, - sep=" ") + sep=" ", + position=0) sat = traits.Bool( - desc='Check the dataset time series for initial saturation transients,' + desc='check the dataset time series for initial saturation transients,' ' which should normally have been excised before data analysis.', argstr='-sat', xor=['trans']) trans = traits.Bool( - desc='Check the dataset time series for initial saturation transients,' + desc='check the dataset time series for initial saturation transients,' ' which should normally have been excised before data analysis.', argstr='-trans', xor=['sat']) noblock = traits.Bool( - desc='Normally, if you input multiple datasets with \'input\', then ' + desc='normally, if you input multiple datasets with \'input\', then ' 'the separate datasets are taken to be separate image runs that ' 'get separate baseline models. Use this options if you want to ' 'have the program consider these to be all one big run.' @@ -58,11 +58,11 @@ class DeconvolveInputSpec(AFNICommandInputSpec): 'has no effect, no how, no way.', argstr='-noblock') force_TR = traits.Int( - desc='Use this value of TR instead of the one in the \'input\' ' - 'dataset. (It\'s better to fix the input using 3drefit.)', + desc='use this value instead of the TR in the \'input\' ' + 'dataset. (It\'s better to fix the input using Refit.)', argstr='-force_TR %d') input1D = File( - desc='Filename of single (fMRI) .1D time series where time runs down ' + desc='filename of single (fMRI) .1D time series where time runs down ' 'the column.', argstr='-input1D %s', exists=True) @@ -71,37 +71,71 @@ class DeconvolveInputSpec(AFNICommandInputSpec): 'not also use \'input1D\'.', argstr='-TR_1D %f') legendre = traits.Bool( - desc='Use Legendre polynomials for null hypothesis (baseline model)', + desc='use Legendre polynomials for null hypothesis (baseline model)', argstr='-legendre') nolegendre = traits.Bool( - desc='Use power polynomials for null hypotheses. Don\'t do this ' + desc='use power polynomials for null hypotheses. Don\'t do this ' 'unless you are crazy!', argstr='-nolegendre') + nodmbase = traits.Bool( + desc='don\'t de-mean baseline time series', + argstr='-nodmbase') + dmbase = traits.Bool( + desc='de-mean baseline time series (default if \'polort\' >= 0)', + argstr='-dmbase') + svd = traits.Bool( + desc='use SVD instead of Gaussian elimination (default)', + argstr='-svd') + nosvd = traits.Bool( + desc='use Gaussian elimination instead of SVD', + argstr='-nosvd') + rmsmin = traits.Float( + desc='minimum rms error to reject reduced model (default = 0; don\'t ' + 'use this option normally!)', + argstr='-rmsmin %f') + nocond = traits.Bool( + desc='DON\'T calculate matrix condition number', + argstr='-nocond') + singvals = traits.Bool( + desc='print out the matrix singular values', + argstr='-singvals') + goforit = traits.Int( + desc='use this to proceed even if the matrix has bad problems (e.g., ' + 'duplicate columns, large condition number, etc.).', + argstr='-GOFORIT %i') + allzero_OK = traits.Bool( + desc='don\'t consider all zero matrix columns to be the type of error ' + 'that \'gotforit\' is needed to ignore.', + argstr='-allzero_OK') + dname = traits.Tuple( + Str, Str, + desc='set environmental variable to provided value', + argstr='-D%s=%s') mask = File( - desc='Filename of 3D mask dataset; only data time series from within ' + desc='filename of 3D mask dataset; only data time series from within ' 'the mask will be analyzed; results for voxels outside the mask ' 'will be set to zero.', argstr='-mask %s', exists=True) automask = traits.Bool( - desc='Build a mask automatically from input data (will be slow for ' + desc='build a mask automatically from input data (will be slow for ' 'long time series datasets)', argstr='-automask') STATmask = File( - desc='Build a mask from input file, and use this mask for the purpose ' - 'of reporting truncation-to float issues AND for computing the ' - 'FDR curves. The actual results ARE not masked with this option ' - '(only with \'mask\' or \'automask\' options).', + desc='build a mask from provided file, and use this mask for the ' + 'purpose of reporting truncation-to float issues AND for ' + 'computing the FDR curves. The actual results ARE not masked ' + 'with this option (only with \'mask\' or \'automask\' options).', argstr='-STATmask %s', exists=True) censor = File( - desc='Filename of censor .1D time series. This is a file of 1s and ' + desc='filename of censor .1D time series. This is a file of 1s and ' '0s, indicating which time points are to be included (1) and ' 'which are to be excluded (0).', argstr='-censor %s', exists=True) polort = traits.Int( - desc='Degree of polynomial corresponding to the null hypothesis ' + desc='degree of polynomial corresponding to the null hypothesis ' '[default: 1]', argstr='-polort %d') ortvec = traits.Tuple( @@ -110,91 +144,93 @@ class DeconvolveInputSpec(AFNICommandInputSpec): exists=True), Str( desc='label'), - desc='This option lets you input a rectangular array of 1 or more ' + desc='this option lets you input a rectangular array of 1 or more ' 'baseline vectors from a file. This method is a fast way to ' 'include a lot of baseline regressors in one step. ', argstr='ortvec %s') x1D = File( - desc='Save out X matrix', + desc='specify name for saved X matrix', argstr='-x1D %s') x1D_stop = traits.Bool( - desc='Stop running after writing .xmat.1D file', + desc='stop running after writing .xmat.1D file', argstr='-x1D_stop') out_file = File( - 'Decon.nii', - desc='Output statistics file', + desc='output statistics file', argstr='-bucket %s') jobs = traits.Int( - desc='Run the program with provided number of sub-processes', + desc='run the program with provided number of sub-processes', argstr='-jobs %d') fout = traits.Bool( - desc='Output F-statistic for each stimulus', + desc='output F-statistic for each stimulus', argstr='-fout') rout = traits.Bool( - desc='Output the R^2 statistic for each stimulus', + desc='output the R^2 statistic for each stimulus', argstr='-rout') tout = traits.Bool( - desc='Output the T-statistic for each stimulus', + desc='output the T-statistic for each stimulus', argstr='-tout') vout = traits.Bool( - desc='Output the sample variance (MSE) for each stimulus', + desc='output the sample variance (MSE) for each stimulus', argstr='-vout') global_times = traits.Bool( - desc='Use global timing for stimulus timing files', + desc='use global timing for stimulus timing files', argstr='-global_times', xor=['local_times']) local_times = traits.Bool( - desc='Use local timing for stimulus timing files', + desc='use local timing for stimulus timing files', argstr='-local_times', xor=['global_times']) num_stimts = traits.Int( - desc='Number of stimulus timing files', + desc='number of stimulus timing files', argstr='-num_stimts %d', - position=0) + position=-6) stim_times = traits.List( traits.Tuple(traits.Int(desc='k-th response model'), File(desc='stimulus timing file',exists=True), Str(desc='model')), - desc='Generate a response model from a set of stimulus times' + desc='generate a response model from a set of stimulus times' ' given in file.', - argstr='-stim_times %d %s \'%s\'...') + argstr='-stim_times %d %s \'%s\'...', + position=-5) stim_label = traits.List( traits.Tuple(traits.Int(desc='k-th input stimulus'), Str(desc='stimulus label')), - desc='Label for kth input stimulus', + desc='label for kth input stimulus (e.g., Label1)', argstr='-stim_label %d %s...', - requires=['stim_times']) + requires=['stim_times'], + position=-4) stim_times_subtract = traits.Float( - desc='This option means to subtract specified seconds from each time ' + desc='this option means to subtract specified seconds from each time ' 'encountered in any \'stim_times\' option. The purpose of this ' 'option is to make it simple to adjust timing files for the ' 'removal of images from the start of each imaging run.', argstr='-stim_times_subtract %f') num_glt = traits.Int( - desc='Number of general linear tests (i.e., contrasts)', + desc='number of general linear tests (i.e., contrasts)', argstr='-num_glt %d', - position=1) + position=-3) gltsym = traits.List( Str(desc='symbolic general linear test'), - desc='General linear tests (i.e., contrasts) using symbolic ' + desc='general linear tests (i.e., contrasts) using symbolic ' 'conventions (e.g., \'+Label1 -Label2\')', - argstr='-gltsym \'SYM: %s\'...') + argstr='-gltsym \'SYM: %s\'...', + position=-2) glt_label = traits.List( traits.Tuple(traits.Int(desc='k-th general linear test'), Str(desc='GLT label')), - desc='General linear test (i.e., contrast) labels', + desc='general linear test (i.e., contrast) labels', argstr='-glt_label %d %s...', - requires=['gltsym']) + requires=['gltsym'], + position=-1) class DeconvolveOutputSpec(TraitedSpec): out_file = File( - desc='output statistics file', - exists=True) + desc='output statistics file', exists=True) reml_script = File( - desc='Autogenerated script for 3dREML') + desc='automatical generated script to run 3dREMLfit', exists=True) x1D = File( - desc='save out X matrix') + desc='save out X matrix', exists=True) class Deconvolve(AFNICommand): @@ -211,13 +247,13 @@ class Deconvolve(AFNICommand): >>> deconvolve.inputs.in_files = ['functional.nii', 'functional2.nii'] >>> deconvolve.inputs.out_file = 'output.nii' >>> deconvolve.inputs.x1D = 'output.1D' - >>> stim_times = [(1, 'timeseries.txt', 'SPMG1(4)'), (2, 'timeseries.txt', 'SPMG2(4)')] + >>> stim_times = [(1, 'timeseries.txt', 'SPMG1(4)')] >>> deconvolve.inputs.stim_times = stim_times - >>> deconvolve.inputs.stim_label = [(1, 'Houses'), (2, 'Apartments')] - >>> deconvolve.inputs.gltsym = [('+Houses -Apartments')] - >>> deconvolve.inputs.glt_label = [(1, 'Houses_Apartments')] + >>> deconvolve.inputs.stim_label = [(1, 'Houses')] + >>> deconvolve.inputs.gltsym = ['SYM: +Houses'] + >>> deconvolve.inputs.glt_label = [(1, 'Houses')] >>> deconvolve.cmdline # doctest: +ALLOW_UNICODE - "3dDeconvolve -num_stimts 2 -num_glt 1 -glt_label 1 Houses_Apartments -gltsym 'SYM: +Houses -Apartments' -input functional.nii functional2.nii -bucket output.nii -stim_label 1 Houses -stim_label 2 Apartments -stim_times 1 timeseries.txt 'SPMG1(4)' -stim_times 2 timeseries.txt 'SPMG2(4)' -x1D output.1D" + "3dDeconvolve -input functional.nii functional2.nii -bucket output.nii -x1D output.1D -num_stimts 1 -stim_times 1 timeseries.txt 'SPMG1(4)' -stim_label 1 Houses -num_glt 1 -gltsym 'SYM: +Houses' -glt_label 1 Houses" >>> res = deconvolve.run() # doctest: +SKIP """ @@ -225,6 +261,14 @@ class Deconvolve(AFNICommand): input_spec = DeconvolveInputSpec output_spec = DeconvolveOutputSpec + def _format_arg(self, name, trait_spec, value): + if name == 'gltsym': + for n, val in enumerate(value): + if val.startswith('SYM: '): + value[n] = val.lstrip('SYM: ') + + return super(Deconvolve,self)._format_arg(name, trait_spec, value) + def _parse_inputs(self, skip=None): if skip is None: skip = [] @@ -232,23 +276,31 @@ def _parse_inputs(self, skip=None): self.inputs.num_stimts = len(self.inputs.stim_times) if len(self.inputs.gltsym) and not isdefined(self.inputs.num_glt): self.inputs.num_glt = len(self.inputs.gltsym) + if not isdefined(self.inputs.out_file): + self.inputs.out_file = 'Decon.nii' + return super(Deconvolve, self)._parse_inputs(skip) def _list_outputs(self): outputs = self.output_spec().get() + + _gen_fname_opts = {} + _gen_fname_opts['basename'] = self.inputs.out_file + _gen_fname_opts['cwd'] = os.getcwd() + if isdefined(self.inputs.x1D): if not self.inputs.x1D.endswith('.xmat.1D'): outputs['x1D'] = os.path.abspath(self.inputs.x1D + '.xmat.1D') else: outputs['x1D'] = os.path.abspath(self.inputs.x1D) + else: + outputs['x1D'] = self._gen_fname(**_gen_fname_opts, + suffix='.xmat.1D') - _gen_fname_opts = {} - _gen_fname_opts['basename'] = self.inputs.out_file - _gen_fname_opts['cwd'] = os.getcwd() - _gen_fname_opts['suffix'] = '.REML_cmd' - - outputs['reml_script'] = self._gen_fname(**_gen_fname_opts) + outputs['reml_script'] = self._gen_fname(**_gen_fname_opts, + suffix='.REML_cmd') outputs['out_file'] = os.path.abspath(self.inputs.out_file) + return outputs @@ -263,40 +315,110 @@ class RemlfitInputSpec(AFNICommandInputSpec): copyfile=False, sep=" ") matrix = File( - desc='Read the design matrix, which should have been output from ' - '3dDeconvolve via the \'-x1D\' option', + desc='the design matrix file, which should have been output from ' + 'Deconvolve via the \'x1D\' option', argstr='-matrix %s', mandatory=True) # "Semi-Hidden Alternative Ways to Define the Matrix" polort = traits.Int( - desc='If no -matrix option is given, AND no -matim option, ' + desc='if no \'matrix\' option is given, AND no \'matim\' option, ' 'create a matrix with Legendre polynomial regressors' - 'up to order P. The default value is P=0, which' + 'up to the specified order. The default value is 0, which' 'produces a matrix with a single column of all ones', argstr='-polort %d', xor=['matrix']) matim = traits.File( - desc='Read a standard .1D file as the matrix.' - '** N.B.: You can use only Col as a name in GLTs' - 'with these nonstandard matrix input methods,' - 'since the other names come from the -matrix file.' - ' ** These mutually exclusive options are ignored if -matrix' + desc='read a standard file as the matrix. You can use only Col as ' + 'a name in GLTs with these nonstandard matrix input methods, ' + 'since the other names come from the \'matrix\' file. ' + 'These mutually exclusive options are ignored if \'matrix\' ' 'is used.', argstr='-matim %s', xor=['matrix']) # Other arguments mask = File( - desc='filename of 3D mask dataset; ' - 'Only data time series from within the mask ' - 'will be analyzed; results for voxels outside ' - 'the mask will be set to zero.', + desc='filename of 3D mask dataset; only data time series from within ' + 'the mask will be analyzed; results for voxels outside the mask ' + 'will be set to zero.', argstr='-mask %s', exists=True) automask = traits.Bool( usedefault=True, argstr='-automask', - desc='Build a mask automatically from input data ' - '(will be slow for long time series datasets)') + desc='build a mask automatically from input data (will be slow for ' + 'long time series datasets)') + STATmask = File( + desc='filename of 3D mask dataset to be used for the purpose ' + 'of reporting truncation-to float issues AND for computing the ' + 'FDR curves. The actual results ARE not masked with this option ' + '(only with \'mask\' or \'automask\' options).', + argstr='-STATmask %s', + exists=True) + addbase = InputMultiPath( + File( + exists=True, + desc='file containing columns to add to regression matrix'), + desc='file(s) to add baseline model columns to the matrix with this ' + 'option. Each column in the specified file(s) will be appended ' + 'to the matrix. File(s) must have at least as many rows as the ' + 'matrix does.', + exists=True, + copyfile=False, + sep=" ", + argstr='-addbase %s') + slibase = InputMultiPath( + File( + exists=True, + desc='file containing columns to add to regression matrix'), + desc='similar to \'addbase\' in concept, BUT each specified file ' + 'must have an integer multiple of the number of slices ' + 'in the input dataset(s); then, separate regression ' + 'matrices are generated for each slice, with the ' + 'first column of the file appended to the matrix for ' + 'the first slice of the dataset, the second column of the file ' + 'appended to the matrix for the first slice of the dataset, ' + 'and so on. Intended to help model physiological noise in FMRI, ' + 'or other effects you want to regress out that might ' + 'change significantly in the inter-slice time intervals. This ' + 'will slow the program down, and make it use a lot more memory ' + '(to hold all the matrix stuff).', + argstr='-slibase %s') + slibase_sm = InputMultiPath( + File( + exists=True, + desc='file containing columns to add to regression matrix'), + desc='similar to \'slibase\', BUT each file much be in slice major ' + 'order (i.e. all slice0 columns come first, then all slice1 ' + 'columns, etc).', + argstr='-slibase_sm %s') + usetemp = traits.Bool( + desc='write intermediate stuff to disk, to economize on RAM. ' + 'Using this option might be necessary to run with ' + '\'slibase\' and with \'Grid\' values above the default, ' + 'since the program has to store a large number of ' + 'matrices for such a problem: two for every slice and ' + 'for every (a,b) pair in the ARMA parameter grid. Temporary ' + 'files are written to the directory given in environment ' + 'variable TMPDIR, or in /tmp, or in ./ (preference is in that ' + 'order)', + argstr='-usetemp') + nodmbase = traits.Bool( + desc='by default, baseline columns added to the matrix via ' + '\'addbase\' or \'slibase\' or \'dsort\' will each have their ' + 'mean removed (as is done in Deconvolve); this option turns this ' + 'centering off', + argstr='-nodmbase', + requires=['addbase','dsort']) + dsort = File( + desc='4D dataset to be used as voxelwise baseline regressor', + exists=True, + copyfile=False, + argstr='-dsort %s') + dsort_nods = traits.Bool( + desc='if \'dsort\' option is used, this command will output ' + 'additional results files excluding the \'dsort\' file', + argstr='-dsort_nods', + requires=['dsort']) fout = traits.Bool( desc='output F-statistic for each stimulus', argstr='-fout') @@ -304,17 +426,130 @@ class RemlfitInputSpec(AFNICommandInputSpec): desc='output the R^2 statistic for each stimulus', argstr='-rout') tout = traits.Bool( - desc='output the T-statistic for each stimulus' - '[if you use -Rbuck and do not give any of -fout, -tout,]' - 'or -rout, then the program assumes -fout is activated.]', + desc='output the T-statistic for each stimulus; if you use ' + '\'out_file\' and do not give any of \'fout\', \'tout\',' + 'or \'rout\', then the program assumes \'fout\' is activated.', argstr='-tout') nofdr = traits.Bool( - desc='do NOT add FDR curve data to bucket datasets ' - '[FDR curves can take a long time if -tout is used]', + desc='do NOT add FDR curve data to bucket datasets; FDR curves can ' + 'take a long time if \'tout\' is used', argstr='-noFDR') + nobout = traits.Bool( + desc='do NOT add baseline (null hypothesis) regressor betas ' + 'to the \'rbeta_file\' and/or \'obeta_file\' output datasets.', + argstr='-nobout') + gltsym = traits.List( + traits.Either(traits.Tuple(File(exists=True), Str()), + traits.Tuple(Str(), Str())), + desc='read a symbolic GLT from input file and associate it with a ' + 'label. As in Deconvolve, you can also use the \'SYM:\' method ' + 'to provide the definition of the GLT directly as a string ' + '(e.g., with \'SYM: +Label1 -Label2\'). Unlike Deconvolve, you ' + 'MUST specify \'SYM: \' if providing the GLT directly as a ' + 'string instead of from a file', + argstr='-gltsym "%s" %s...') out_file = File( - desc='output statistics file', + desc='output dataset for beta + statistics from the REML estimation; ' + 'also contains the results of any GLT analysis requested ' + 'in the Deconvolve setup, similar to the \'bucket\' output ' + 'from Deconvolve. This dataset does NOT get the betas ' + '(or statistics) of those regressors marked as \'baseline\' ' + 'in the matrix file.', argstr='-Rbuck %s') + var_file = File( + desc='output dataset for REML variance parameters', + argstr='-Rvar %s') + rbeta_file = File( + desc='output dataset for beta weights from the REML estimation, ' + 'similar to the \'cbucket\' output from Deconvolve. This dataset ' + 'will contain all the beta weights, for baseline and stimulus ' + 'regressors alike, unless the \'-nobout\' option is given -- ' + 'in that case, this dataset will only get the betas for the ' + 'stimulus regressors.', + argstr='-Rbeta %s') + glt_file = File( + desc='output dataset for beta + statistics from the REML estimation, ' + 'but ONLY for the GLTs added on the REMLfit command line itself ' + 'via \'gltsym\'; GLTs from Deconvolve\'s command line will NOT ' + 'be included.', + argstr='-Rglt %s') + fitts_file = File( + desc='ouput dataset for REML fitted model', + argstr='-Rfitts %s') + errts_file = File( + desc='output dataset for REML residuals = data - fitted model', + argstr='-Rerrts %s') + wherr_file = File( + desc='dataset for REML residual, whitened using the estimated ' + 'ARMA(1,1) correlation matrix of the noise', + argstr='-Rwherr %s') + quiet = traits.Bool( + desc='turn off most progress messages', + argstr='-quiet') + verb = traits.Bool( + desc='turns on more progress messages, including memory usage ' + 'progress reports at various stages', + argstr='-verb') + ovar = File( + desc='dataset for OLSQ st.dev. parameter (kind of boring)', + argstr='-Ovar %s') + obeta = File( + desc='dataset for beta weights from the OLSQ estimation', + argstr='-Obeta %s') + obuck = File( + desc='dataset for beta + statistics from the OLSQ estimation', + argstr='-Obuck %s') + oglt = File( + desc='dataset for beta + statistics from \'gltsym\' options', + argstr='-Oglt %s') + ofitts = File( + desc='dataset for OLSQ fitted model', + argstr='-Ofitts %s') + oerrts = File( + desc='dataset for OLSQ residuals (data - fitted model)', + argstr='-Oerrts %s') + + +class RemlfitOutputSpec(AFNICommandOutputSpec): + out_file = File( + desc='dataset for beta + statistics from the REML estimation (if ' + 'generated') + var_file = File( + desc='dataset for REML variance parameters (if generated)') + rbeta_file = File( + desc='dataset for beta weights from the REML estimation (if ' + 'generated)') + rbeta_file = File( + desc='output dataset for beta weights from the REML estimation (if ' + 'generated') + glt_file = File( + desc='output dataset for beta + statistics from the REML estimation, ' + 'but ONLY for the GLTs added on the REMLfit command ' + 'line itself via \'gltsym\' (if generated)') + fitts_file = File( + desc='ouput dataset for REML fitted model (if generated)') + errts_file = File( + desc='output dataset for REML residuals = data - fitted model (if ' + 'generated') + wherr_file = File( + desc='dataset for REML residual, whitened using the estimated ' + 'ARMA(1,1) correlation matrix of the noise (if generated)') + ovar = File( + desc='dataset for OLSQ st.dev. parameter (if generated)') + obeta = File( + desc='dataset for beta weights from the OLSQ estimation (if ' + 'generated)') + obuck = File( + desc='dataset for beta + statistics from the OLSQ estimation (if ' + 'generated)') + oglt = File( + desc='dataset for beta + statistics from \'gltsym\' options (if ' + 'generated') + ofitts = File( + desc='dataset for OLSQ fitted model (if generated)') + oerrts = File( + desc='dataset for OLSQ residuals = data - fitted model (if ' + 'generated') class Remlfit(AFNICommand): @@ -333,14 +568,15 @@ class Remlfit(AFNICommand): >>> remlfit.inputs.in_files = ['functional.nii', 'functional2.nii'] >>> remlfit.inputs.out_file = 'output.nii' >>> remlfit.inputs.matrix = 'output.1D' + >>> remlfit.inputs.gltsym = [('SYM: +Lab1 -Lab2', 'TestSYM'), ('timeseries.txt', 'TestFile')] >>> remlfit.cmdline # doctest: +ALLOW_UNICODE - '3dREMLfit -input "functional.nii functional2.nii" -matrix output.1D -Rbuck output.nii' + '3dREMLfit -gltsym "SYM: +Lab1 -Lab2" TestSYM -gltsym "timeseries.txt" TestFile -input "functional.nii functional2.nii" -matrix output.1D -Rbuck output.nii' >>> res = remlfit.run() # doctest: +SKIP """ _cmd = '3dREMLfit' input_spec = RemlfitInputSpec - output_spec = AFNICommandOutputSpec + output_spec = RemlfitOutputSpec def _parse_inputs(self, skip=None): if skip is None: @@ -349,5 +585,9 @@ def _parse_inputs(self, skip=None): def _list_outputs(self): outputs = self.output_spec().get() - outputs['out_file'] = self.inputs.out_file + + for key in outputs.keys(): + if isdefined(self.inputs.get()[key]): + outputs[key] = os.path.abspath(self.inputs.get()[key]) + return outputs diff --git a/nipype/interfaces/afni/tests/test_auto_Deconvolve.py b/nipype/interfaces/afni/tests/test_auto_Deconvolve.py index 635c0359a4..0dfbec8deb 100644 --- a/nipype/interfaces/afni/tests/test_auto_Deconvolve.py +++ b/nipype/interfaces/afni/tests/test_auto_Deconvolve.py @@ -8,12 +8,18 @@ def test_Deconvolve_inputs(): ), TR_1D=dict(argstr='-TR_1D %f', ), + allzero_OK=dict(argstr='-allzero_OK', + ), args=dict(argstr='%s', ), automask=dict(argstr='-automask', ), censor=dict(argstr='-censor %s', ), + dmbase=dict(argstr='-dmbase', + ), + dname=dict(argstr='-D%s=%s', + ), environ=dict(nohash=True, usedefault=True, ), @@ -25,16 +31,20 @@ def test_Deconvolve_inputs(): xor=['local_times'], ), glt_label=dict(argstr='-glt_label %d %s...', + position=-1, requires=['gltsym'], ), gltsym=dict(argstr="-gltsym 'SYM: %s'...", + position=-2, + ), + goforit=dict(argstr='-GOFORIT %i', ), ignore_exception=dict(nohash=True, usedefault=True, ), in_files=dict(argstr='-input %s', copyfile=False, - mandatory=True, + position=0, sep=' ', ), input1D=dict(argstr='-input1D %s', @@ -50,13 +60,19 @@ def test_Deconvolve_inputs(): ), noblock=dict(argstr='-noblock', ), + nocond=dict(argstr='-nocond', + ), + nodmbase=dict(argstr='-nodmbase', + ), nolegendre=dict(argstr='-nolegendre', ), + nosvd=dict(argstr='-nosvd', + ), num_glt=dict(argstr='-num_glt %d', - position=1, + position=-3, ), num_stimts=dict(argstr='-num_stimts %d', - position=0, + position=-6, ), ortvec=dict(argstr='ortvec %s', ), @@ -65,18 +81,26 @@ def test_Deconvolve_inputs(): outputtype=dict(), polort=dict(argstr='-polort %d', ), + rmsmin=dict(argstr='-rmsmin %f', + ), rout=dict(argstr='-rout', ), sat=dict(argstr='-sat', xor=['trans'], ), + singvals=dict(argstr='-singvals', + ), stim_label=dict(argstr='-stim_label %d %s...', + position=-4, requires=['stim_times'], ), stim_times=dict(argstr="-stim_times %d %s '%s'...", + position=-5, ), stim_times_subtract=dict(argstr='-stim_times_subtract %f', ), + svd=dict(argstr='-svd', + ), terminal_output=dict(nohash=True, ), tout=dict(argstr='-tout', diff --git a/nipype/interfaces/afni/tests/test_auto_Remlfit.py b/nipype/interfaces/afni/tests/test_auto_Remlfit.py index 9d561762a8..8e216aa01d 100644 --- a/nipype/interfaces/afni/tests/test_auto_Remlfit.py +++ b/nipype/interfaces/afni/tests/test_auto_Remlfit.py @@ -4,16 +4,37 @@ def test_Remlfit_inputs(): - input_map = dict(args=dict(argstr='%s', + input_map = dict(STATmask=dict(argstr='-STATmask %s', + ), + addbase=dict(argstr='-addbase %s', + copyfile=False, + exists=True, + sep=' ', + ), + args=dict(argstr='%s', ), automask=dict(argstr='-automask', usedefault=True, ), + dsort=dict(argstr='-dsort %s', + copyfile=False, + ), + dsort_nods=dict(argstr='-dsort_nods', + requires=['dsort'], + ), environ=dict(nohash=True, usedefault=True, ), + errts_file=dict(argstr='-Rerrts %s', + ), + fitts_file=dict(argstr='-Rfitts %s', + ), fout=dict(argstr='-fout', ), + glt_file=dict(argstr='-Rglt %s', + ), + gltsym=dict(argstr='-gltsym "%s" %s...', + ), ignore_exception=dict(nohash=True, usedefault=True, ), @@ -30,20 +51,53 @@ def test_Remlfit_inputs(): matrix=dict(argstr='-matrix %s', mandatory=True, ), + nobout=dict(argstr='-nobout', + ), + nodmbase=dict(argstr='-nodmbase', + requires=['addbase', 'dsort'], + ), nofdr=dict(argstr='-noFDR', ), + obeta=dict(argstr='-Obeta %s', + ), + obuck=dict(argstr='-Obuck %s', + ), + oerrts=dict(argstr='-Oerrts %s', + ), + ofitts=dict(argstr='-Ofitts %s', + ), + oglt=dict(argstr='-Oglt %s', + ), out_file=dict(argstr='-Rbuck %s', ), outputtype=dict(), + ovar=dict(argstr='-Ovar %s', + ), polort=dict(argstr='-polort %d', xor=['matrix'], ), + quiet=dict(argstr='-quiet', + ), + rbeta_file=dict(argstr='-Rbeta %s', + ), rout=dict(argstr='-rout', ), + slibase=dict(argstr='-slibase %s', + ), + slibase_sm=dict(argstr='-slibase_sm %s', + ), terminal_output=dict(nohash=True, ), tout=dict(argstr='-tout', ), + usetemp=dict(argstr='-usetemp', + ), + var_file=dict(argstr='-Rvar %s', + ), + verb=dict(argstr='-verb', + ), + wherr_file=dict(argstr='-Rwherr %s', + ), ) inputs = Remlfit.input_spec() @@ -53,7 +107,19 @@ def test_Remlfit_inputs(): def test_Remlfit_outputs(): - output_map = dict(out_file=dict(), + output_map = dict(errts_file=dict(), + fitts_file=dict(), + glt_file=dict(), + obeta=dict(), + obuck=dict(), + oerrts=dict(), + ofitts=dict(), + oglt=dict(), + out_file=dict(), + ovar=dict(), + rbeta_file=dict(), + var_file=dict(), + wherr_file=dict(), ) outputs = Remlfit.output_spec() From a18aba0fe8f2953c0fd5634936e800421cd08d5e Mon Sep 17 00:00:00 2001 From: jdkent Date: Wed, 28 Jun 2017 10:38:18 -0500 Subject: [PATCH 067/643] FIX: adding ICA_AROMA to fsl __init__.py --- nipype/interfaces/fsl/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/nipype/interfaces/fsl/__init__.py b/nipype/interfaces/fsl/__init__.py index 29b99ecb1b..db2d3b6556 100644 --- a/nipype/interfaces/fsl/__init__.py +++ b/nipype/interfaces/fsl/__init__.py @@ -33,3 +33,4 @@ from .possum import B0Calc from .fix import (AccuracyTester, Classifier, Cleaner, FeatureExtractor, Training, TrainingSetCreator) +from .ICA_AROMA import ICA_AROMA From 14f2d8aa9e0cb1169434d335c0a94dd9220c9fd7 Mon Sep 17 00:00:00 2001 From: Ross Markello Date: Wed, 28 Jun 2017 20:13:22 -0400 Subject: [PATCH 068/643] [FIX] Deconvolve py27 and py34 compat Fixed syntax error in Deconvolve interface for py2.7 and py3.4 compatibility. --- nipype/interfaces/afni/model.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/nipype/interfaces/afni/model.py b/nipype/interfaces/afni/model.py index e6413d7883..2929531b62 100644 --- a/nipype/interfaces/afni/model.py +++ b/nipype/interfaces/afni/model.py @@ -294,11 +294,9 @@ def _list_outputs(self): else: outputs['x1D'] = os.path.abspath(self.inputs.x1D) else: - outputs['x1D'] = self._gen_fname(**_gen_fname_opts, - suffix='.xmat.1D') + outputs['x1D'] = self._gen_fname(suffix='.xmat.1D', **_gen_fname_opts) - outputs['reml_script'] = self._gen_fname(**_gen_fname_opts, - suffix='.REML_cmd') + outputs['reml_script'] = self._gen_fname(suffix='.REML_cmd', **_gen_fname_opts) outputs['out_file'] = os.path.abspath(self.inputs.out_file) return outputs From 98f73519b742f17bd57ef1db65ccb5dfc04ca1a7 Mon Sep 17 00:00:00 2001 From: byvernault Date: Thu, 29 Jun 2017 14:18:05 +0100 Subject: [PATCH 069/643] Fixing StatsCommand (wrong class name) and removing print statement --- nipype/interfaces/niftyseg/stats.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/nipype/interfaces/niftyseg/stats.py b/nipype/interfaces/niftyseg/stats.py index 5591a5888e..e2e7781aa6 100644 --- a/nipype/interfaces/niftyseg/stats.py +++ b/nipype/interfaces/niftyseg/stats.py @@ -66,7 +66,6 @@ class StatsCommand(NiftySegCommand): def _parse_stdout(self, stdout): out = [] for string_line in stdout.split("\n"): - print('parsing line {0}'.format(string_line)) if string_line.startswith('#'): continue if len(string_line) <= 1: @@ -76,8 +75,7 @@ def _parse_stdout(self, stdout): return np.array(out).squeeze() def _run_interface(self, runtime): - print('parsing output in run_interface') - new_runtime = super(UnaryStats, self)._run_interface(runtime) + new_runtime = super(StatsCommand, self)._run_interface(runtime) self.output = self._parse_stdout(new_runtime.stdout) return new_runtime From 07ab68ea8fe6a5ed67b6821badd48607c95434d1 Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Thu, 29 Jun 2017 13:26:32 -0400 Subject: [PATCH 070/643] ENH: Add cosine-basis HPF to CompCor --- nipype/algorithms/confounds.py | 64 ++++++++++++++++++++++++++++++---- 1 file changed, 57 insertions(+), 7 deletions(-) diff --git a/nipype/algorithms/confounds.py b/nipype/algorithms/confounds.py index 64d95767db..1e5bb18709 100644 --- a/nipype/algorithms/confounds.py +++ b/nipype/algorithms/confounds.py @@ -323,7 +323,7 @@ class CompCorInputSpec(BaseInterfaceInputSpec): desc=('Position of mask in `mask_files` to use - ' 'first is the default.')) components_file = traits.Str('components_file.txt', usedefault=True, - desc='Filename to store physiological components') + desc='Filename to store physiological components') num_components = traits.Int(6, usedefault=True) # 6 for BOLD, 4 for ASL use_regress_poly = traits.Bool(True, usedefault=True, desc=('use polynomial regression ' @@ -333,11 +333,19 @@ class CompCorInputSpec(BaseInterfaceInputSpec): header_prefix = traits.Str(desc=('the desired header for the output tsv ' 'file (one column). If undefined, will ' 'default to "CompCor"')) + high_pass_filter = traits.Bool( + False, usedefault=True, + desc='Use cosine basis to remove low-frequency trends pre-component ' + 'extraction') + save_hpf_basis = traits.Either( + traits.Bool, File, requires=['high_pass_filter'], + desc='Save high pass filter basis as text file') class CompCorOutputSpec(TraitedSpec): components_file = File(exists=True, desc='text file containing the noise components') + hpf_basis_file = File(desc='text file containing high-pass filter basis') class CompCor(BaseInterface): @@ -403,13 +411,18 @@ def _run_interface(self, runtime): mask_images = self._process_masks(mask_images, imgseries.get_data()) - components = compute_noise_components(imgseries.get_data(), - mask_images, degree, - self.inputs.num_components) + components, hpf_basis = compute_noise_components( + imgseries.get_data(), mask_images, degree, + self.inputs.num_components, self.inputs.high_pass_filter) components_file = os.path.join(os.getcwd(), self.inputs.components_file) np.savetxt(components_file, components, fmt=b"%.10f", delimiter='\t', header=self._make_headers(components.shape[1]), comments='') + + if self.inputs.save_hpf_basis: + hpf_basis_file = self._list_outputs()['hpf_basis_file'] + np.savetxt(hpf_basis_file, hpf_basis, fmt=b'%.10f', delimiter='\t') + return runtime def _process_masks(self, mask_images, timeseries=None): @@ -418,6 +431,13 @@ def _process_masks(self, mask_images, timeseries=None): def _list_outputs(self): outputs = self._outputs().get() outputs['components_file'] = os.path.abspath(self.inputs.components_file) + + save_hpf_basis = self.inputs.save_hpf_basis + if save_hpf_basis: + if isinstance(save_hpf_basis, bool): + save_hpf_basis = os.path.abspath('hpf_basis.txt') + outputs['save_hpf_basis'] = save_hpf_basis + return outputs def _make_headers(self, num_col): @@ -794,6 +814,27 @@ def is_outlier(points, thresh=3.5): return timepoints_to_discard +def cosine_filter(data, timestep, remove_mean=False, axis=-1): + datashape = data.shape + timepoints = datashape[axis] + + data = data.reshape((-1, timepoints)) + + design_matrix = dmtx_light(timestep * np.arange(timepoints)) + + X = np.hstack(np.ones((timepoints, 1)), design_matrix) + betas = np.linalg.lstsq(X, data)[0] + + if not remove_mean: + X = X[:, 1:] + betas = betas[1:] + + residuals = data - X.dot(betas) + + return residuals, design_matrix + + + def regress_poly(degree, data, remove_mean=True, axis=-1): """ Returns data with degree polynomial regressed out. @@ -886,13 +927,15 @@ def combine_mask_files(mask_files, mask_method=None, mask_index=None): return [img] -def compute_noise_components(imgseries, mask_images, degree, num_components): +def compute_noise_components(imgseries, mask_images, degree, num_components, + high_pass_filter=False): """Compute the noise components from the imgseries for each mask imgseries: a nibabel img mask_images: a list of nibabel images degree: order of polynomial used to remove trends from the timeseries num_components: number of noise components to return + high_pass_filter: returns: @@ -900,6 +943,7 @@ def compute_noise_components(imgseries, mask_images, degree, num_components): """ components = None + hpf_basis = None for img in mask_images: mask = img.get_data().astype(np.bool) if imgseries.shape[:3] != mask.shape: @@ -913,10 +957,16 @@ def compute_noise_components(imgseries, mask_images, degree, num_components): # Zero-out any bad values voxel_timecourses[np.isnan(np.sum(voxel_timecourses, axis=1)), :] = 0 + if high_pass_filter: + # If degree == 0, remove mean in same pass + voxel_timecourses, hpf_basis = cosine_filter( + voxel_timecourses, 2.5, remove_mean=(degree == 0)) + # from paper: # "The constant and linear trends of the columns in the matrix M were # removed [prior to ...]" - voxel_timecourses = regress_poly(degree, voxel_timecourses) + if degree > 0 or not high_pass_filter: + voxel_timecourses = regress_poly(degree, voxel_timecourses) # "Voxel time series from the noise ROI (either anatomical or tSTD) were # placed in a matrix M of size Nxm, with time along the row dimension @@ -936,7 +986,7 @@ def compute_noise_components(imgseries, mask_images, degree, num_components): u[:, :num_components])) if components is None and num_components > 0: raise ValueError('No components found') - return components + return components, hpf_basis def _compute_tSTD(M, x, axis=0): From 882739217c5795de216956ba6aa74a6fd7862f24 Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Thu, 29 Jun 2017 13:55:47 -0400 Subject: [PATCH 071/643] ENH: Detect or manually set repetition time --- nipype/algorithms/confounds.py | 36 +++++++++++++++++++++++++++------- 1 file changed, 29 insertions(+), 7 deletions(-) diff --git a/nipype/algorithms/confounds.py b/nipype/algorithms/confounds.py index 1e5bb18709..5c2d8817fd 100644 --- a/nipype/algorithms/confounds.py +++ b/nipype/algorithms/confounds.py @@ -337,6 +337,9 @@ class CompCorInputSpec(BaseInterfaceInputSpec): False, usedefault=True, desc='Use cosine basis to remove low-frequency trends pre-component ' 'extraction') + repetition_time = traits.Float( + desc='Repetition time (TR) of series - derived from image header if ' + 'unspecified') save_hpf_basis = traits.Either( traits.Bool, File, requires=['high_pass_filter'], desc='Save high pass filter basis as text file') @@ -398,10 +401,10 @@ def _run_interface(self, runtime): mmap=NUMPY_MMAP) if len(imgseries.shape) != 4: - raise ValueError('tCompCor expected a 4-D nifti file. Input {} has ' - '{} dimensions (shape {})'.format( - self.inputs.realigned_file, len(imgseries.shape), - imgseries.shape)) + raise ValueError('{} expected a 4-D nifti file. Input {} has ' + '{} dimensions (shape {})'.format( + self._header, self.inputs.realigned_file, + len(imgseries.shape), imgseries.shape)) if len(mask_images) == 0: img = nb.Nifti1Image(np.ones(imgseries.shape[:3], dtype=np.bool), @@ -411,9 +414,27 @@ def _run_interface(self, runtime): mask_images = self._process_masks(mask_images, imgseries.get_data()) + TR = 0 + if self.inputs.high_pass_filter: + if isdefined(self.inputs.repetition_time): + TR = self.inputs.repetition_time + else: + # Derive TR from NIfTI header, if possible + try: + TR = imgseries.header.get_zooms()[3] + if self.inputs.get_xyzt_units()[1] == 'msec': + TR /= 1000 + except AttributeError, IndexError: + pass + + if TR == 0: + raise ValueError( + '{} cannot detect repetition time from image - ' + 'Set the repetition_time input'.format(self._header)) + components, hpf_basis = compute_noise_components( imgseries.get_data(), mask_images, degree, - self.inputs.num_components, self.inputs.high_pass_filter) + self.inputs.num_components, self.inputs.high_pass_filter, TR) components_file = os.path.join(os.getcwd(), self.inputs.components_file) np.savetxt(components_file, components, fmt=b"%.10f", delimiter='\t', @@ -928,7 +949,7 @@ def combine_mask_files(mask_files, mask_method=None, mask_index=None): def compute_noise_components(imgseries, mask_images, degree, num_components, - high_pass_filter=False): + high_pass_filter=False, repetition_time=0): """Compute the noise components from the imgseries for each mask imgseries: a nibabel img @@ -960,7 +981,8 @@ def compute_noise_components(imgseries, mask_images, degree, num_components, if high_pass_filter: # If degree == 0, remove mean in same pass voxel_timecourses, hpf_basis = cosine_filter( - voxel_timecourses, 2.5, remove_mean=(degree == 0)) + voxel_timecourses, repetition_time, + remove_mean=(degree == 0)) # from paper: # "The constant and linear trends of the columns in the matrix M were From 42f5c46ef0658bc737140dbf17bff0be50f81f58 Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Thu, 29 Jun 2017 15:23:10 -0400 Subject: [PATCH 072/643] FIX: Typos --- nipype/algorithms/confounds.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nipype/algorithms/confounds.py b/nipype/algorithms/confounds.py index 5c2d8817fd..a196259fbf 100644 --- a/nipype/algorithms/confounds.py +++ b/nipype/algorithms/confounds.py @@ -422,10 +422,10 @@ def _run_interface(self, runtime): # Derive TR from NIfTI header, if possible try: TR = imgseries.header.get_zooms()[3] - if self.inputs.get_xyzt_units()[1] == 'msec': + if imgseries.get_xyzt_units()[1] == 'msec': TR /= 1000 - except AttributeError, IndexError: - pass + except (AttributeError, IndexError): + TR = 0 if TR == 0: raise ValueError( From 66652a8153f5921836d6cde8d0d0eb382ec5d64d Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Thu, 29 Jun 2017 15:58:44 -0400 Subject: [PATCH 073/643] Copy in nipy functions, transpose correctly --- nipype/algorithms/confounds.py | 84 ++++++++++++++++++++++++++++++---- 1 file changed, 76 insertions(+), 8 deletions(-) diff --git a/nipype/algorithms/confounds.py b/nipype/algorithms/confounds.py index a196259fbf..1b995b1fb3 100644 --- a/nipype/algorithms/confounds.py +++ b/nipype/algorithms/confounds.py @@ -841,18 +841,19 @@ def cosine_filter(data, timestep, remove_mean=False, axis=-1): data = data.reshape((-1, timepoints)) - design_matrix = dmtx_light(timestep * np.arange(timepoints)) + frametimes = timestep * np.arange(timepoints) + design_matrix = _full_rank(_cosine_drift(128, frametimes))[0] - X = np.hstack(np.ones((timepoints, 1)), design_matrix) - betas = np.linalg.lstsq(X, data)[0] + betas = np.linalg.lstsq(design_matrix, data.T)[0] if not remove_mean: - X = X[:, 1:] - betas = betas[1:] + X = design_matrix[:, :-1] + betas = betas[:-1] - residuals = data - X.dot(betas) + residuals = data - X.dot(betas).T - return residuals, design_matrix + # Return non-constant regressors + return residuals.reshape(datashape), design_matrix[:, :-1] @@ -956,7 +957,9 @@ def compute_noise_components(imgseries, mask_images, degree, num_components, mask_images: a list of nibabel images degree: order of polynomial used to remove trends from the timeseries num_components: number of noise components to return - high_pass_filter: + high_pass_filter: high-pass-filter data with discrete cosine basis + (run before polynomial detrend) + repetition_time: time (in sec) between volume acquisitions returns: @@ -1017,3 +1020,68 @@ def _compute_tSTD(M, x, axis=0): stdM[stdM == 0] = x stdM[np.isnan(stdM)] = x return stdM + + +# _cosine_drift and _full_rank copied from nipy/modalities/fmri/design_matrix +# +# Nipy release: 0.4.1 + +def _cosine_drift(period_cut, frametimes): + """Create a cosine drift matrix with periods greater or equals to period_cut + + Parameters + ---------- + period_cut: float + Cut period of the low-pass filter (in sec) + frametimes: array of shape(nscans) + The sampling times (in sec) + + Returns + ------- + cdrift: array of shape(n_scans, n_drifts) + cosin drifts plus a constant regressor at cdrift[:,0] + + Ref: http://en.wikipedia.org/wiki/Discrete_cosine_transform DCT-II + """ + len_tim = len(frametimes) + n_times = np.arange(len_tim) + hfcut = 1./ period_cut # input parameter is the period + + dt = frametimes[1] - frametimes[0] # frametimes.max() should be (len_tim-1)*dt + order = int(np.floor(2*len_tim*hfcut*dt)) # s.t. hfcut = 1/(2*dt) yields len_tim + cdrift = np.zeros((len_tim, order)) + nfct = np.sqrt(2.0/len_tim) + + for k in range(1, order): + cdrift[:,k-1] = nfct * np.cos((np.pi/len_tim)*(n_times + .5)*k) + + cdrift[:,order-1] = 1. # or 1./sqrt(len_tim) to normalize + return cdrift + + + +def _full_rank(X, cmax=1e15): + """ + This function possibly adds a scalar matrix to X + to guarantee that the condition number is smaller than a given threshold. + + Parameters + ---------- + X: array of shape(nrows, ncols) + cmax=1.e-15, float tolerance for condition number + + Returns + ------- + X: array of shape(nrows, ncols) after regularization + cmax=1.e-15, float tolerance for condition number + """ + U, s, V = np.linalg.svd(X, 0) + smax, smin = s.max(), s.min() + c = smax / smin + if c < cmax: + return X, c + warn('Matrix is singular at working precision, regularizing...') + lda = (smax - cmax * smin) / (cmax - 1) + s = s + lda + X = np.dot(U, np.dot(np.diag(s), V)) + return X, cmax From aed10c8f843c14773b1ceaf4845d23f68fc83cc4 Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Fri, 30 Jun 2017 10:17:48 -0400 Subject: [PATCH 074/643] ENH: Accomodate too-short time series --- nipype/algorithms/confounds.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nipype/algorithms/confounds.py b/nipype/algorithms/confounds.py index 1b995b1fb3..55983fc589 100644 --- a/nipype/algorithms/confounds.py +++ b/nipype/algorithms/confounds.py @@ -1048,7 +1048,8 @@ def _cosine_drift(period_cut, frametimes): hfcut = 1./ period_cut # input parameter is the period dt = frametimes[1] - frametimes[0] # frametimes.max() should be (len_tim-1)*dt - order = int(np.floor(2*len_tim*hfcut*dt)) # s.t. hfcut = 1/(2*dt) yields len_tim + # If series is too short, return constant regressor + order = max(int(np.floor(2*len_tim*hfcut*dt)), 1) # s.t. hfcut = 1/(2*dt) yields len_tim cdrift = np.zeros((len_tim, order)) nfct = np.sqrt(2.0/len_tim) From 226fc8a01793fb4e9dbe591f9530b62410ea7585 Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Fri, 30 Jun 2017 10:18:59 -0400 Subject: [PATCH 075/643] make specs --- nipype/algorithms/tests/test_auto_ACompCor.py | 6 ++++++ nipype/algorithms/tests/test_auto_TCompCor.py | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/nipype/algorithms/tests/test_auto_ACompCor.py b/nipype/algorithms/tests/test_auto_ACompCor.py index 7867b259ed..aa94f98b1b 100644 --- a/nipype/algorithms/tests/test_auto_ACompCor.py +++ b/nipype/algorithms/tests/test_auto_ACompCor.py @@ -7,6 +7,8 @@ def test_ACompCor_inputs(): input_map = dict(components_file=dict(usedefault=True, ), header_prefix=dict(), + high_pass_filter=dict(usedefault=True, + ), ignore_exception=dict(nohash=True, usedefault=True, ), @@ -23,6 +25,9 @@ def test_ACompCor_inputs(): ), regress_poly_degree=dict(usedefault=True, ), + repetition_time=dict(), + save_hpf_basis=dict(requires=['high_pass_filter'], + ), use_regress_poly=dict(usedefault=True, ), ) @@ -35,6 +40,7 @@ def test_ACompCor_inputs(): def test_ACompCor_outputs(): output_map = dict(components_file=dict(), + hpf_basis_file=dict(), ) outputs = ACompCor.output_spec() diff --git a/nipype/algorithms/tests/test_auto_TCompCor.py b/nipype/algorithms/tests/test_auto_TCompCor.py index 47bb550da3..c9d45bb2a8 100644 --- a/nipype/algorithms/tests/test_auto_TCompCor.py +++ b/nipype/algorithms/tests/test_auto_TCompCor.py @@ -7,6 +7,8 @@ def test_TCompCor_inputs(): input_map = dict(components_file=dict(usedefault=True, ), header_prefix=dict(), + high_pass_filter=dict(usedefault=True, + ), ignore_exception=dict(nohash=True, usedefault=True, ), @@ -25,6 +27,9 @@ def test_TCompCor_inputs(): ), regress_poly_degree=dict(usedefault=True, ), + repetition_time=dict(), + save_hpf_basis=dict(requires=['high_pass_filter'], + ), use_regress_poly=dict(usedefault=True, ), ) @@ -38,6 +43,7 @@ def test_TCompCor_inputs(): def test_TCompCor_outputs(): output_map = dict(components_file=dict(), high_variance_masks=dict(), + hpf_basis_file=dict(), ) outputs = TCompCor.output_spec() From 435f34c895031415264eba23f291d2179c8ffeb7 Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Fri, 30 Jun 2017 15:41:59 -0400 Subject: [PATCH 076/643] FIX: Define variables in all cases --- nipype/algorithms/confounds.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/nipype/algorithms/confounds.py b/nipype/algorithms/confounds.py index 55983fc589..86a6bb974f 100644 --- a/nipype/algorithms/confounds.py +++ b/nipype/algorithms/confounds.py @@ -842,19 +842,18 @@ def cosine_filter(data, timestep, remove_mean=False, axis=-1): data = data.reshape((-1, timepoints)) frametimes = timestep * np.arange(timepoints) - design_matrix = _full_rank(_cosine_drift(128, frametimes))[0] + X = _full_rank(_cosine_drift(128, frametimes))[0] + non_constant_regressors = X[:, :-1] - betas = np.linalg.lstsq(design_matrix, data.T)[0] + betas = np.linalg.lstsq(X, data.T)[0] if not remove_mean: - X = design_matrix[:, :-1] + X = X[:, :-1] betas = betas[:-1] residuals = data - X.dot(betas).T - # Return non-constant regressors - return residuals.reshape(datashape), design_matrix[:, :-1] - + return residuals.reshape(datashape), non_constant_regressors def regress_poly(degree, data, remove_mean=True, axis=-1): From b5dd10a3f48c2fea61023246c8a35573125edae0 Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Sun, 2 Jul 2017 13:52:41 -0400 Subject: [PATCH 077/643] Fix output --- nipype/algorithms/confounds.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nipype/algorithms/confounds.py b/nipype/algorithms/confounds.py index 86a6bb974f..ceac1ea131 100644 --- a/nipype/algorithms/confounds.py +++ b/nipype/algorithms/confounds.py @@ -457,7 +457,7 @@ def _list_outputs(self): if save_hpf_basis: if isinstance(save_hpf_basis, bool): save_hpf_basis = os.path.abspath('hpf_basis.txt') - outputs['save_hpf_basis'] = save_hpf_basis + outputs['hpf_basis_file'] = save_hpf_basis return outputs From 3d64acef7efd514940bb2522b53ecf505f6914ab Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Mon, 3 Jul 2017 10:35:49 -0400 Subject: [PATCH 078/643] ENH: Add column headers, rename basis file --- nipype/algorithms/confounds.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/nipype/algorithms/confounds.py b/nipype/algorithms/confounds.py index ceac1ea131..3dba4b2c31 100644 --- a/nipype/algorithms/confounds.py +++ b/nipype/algorithms/confounds.py @@ -442,7 +442,9 @@ def _run_interface(self, runtime): if self.inputs.save_hpf_basis: hpf_basis_file = self._list_outputs()['hpf_basis_file'] - np.savetxt(hpf_basis_file, hpf_basis, fmt=b'%.10f', delimiter='\t') + header = ['cos{:02d}'.format(i) for i in range(hpf_basis.shape[1])] + np.savetxt(hpf_basis_file, hpf_basis, fmt=b'%.10f', delimiter='\t', + header='\t'.join(header), comments='') return runtime @@ -456,7 +458,7 @@ def _list_outputs(self): save_hpf_basis = self.inputs.save_hpf_basis if save_hpf_basis: if isinstance(save_hpf_basis, bool): - save_hpf_basis = os.path.abspath('hpf_basis.txt') + save_hpf_basis = os.path.abspath('hpf_basis.tsv') outputs['hpf_basis_file'] = save_hpf_basis return outputs From 2f55a70b826fa0595797380537f3c9cf526fe7da Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Mon, 3 Jul 2017 10:58:48 -0400 Subject: [PATCH 079/643] RF: Use list comprehension --- nipype/algorithms/confounds.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/nipype/algorithms/confounds.py b/nipype/algorithms/confounds.py index 3dba4b2c31..5d01c8e11e 100644 --- a/nipype/algorithms/confounds.py +++ b/nipype/algorithms/confounds.py @@ -464,11 +464,9 @@ def _list_outputs(self): return outputs def _make_headers(self, num_col): - headers = [] header = self.inputs.header_prefix if \ isdefined(self.inputs.header_prefix) else self._header - for i in range(num_col): - headers.append(header + '{:02d}'.format(i)) + headers = ['{}{:02d}'.format(header, i) for i in range(num_col)] return '\t'.join(headers) From 88b42a1200064e0ea652dcfd4bda40943bc4f575 Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Mon, 3 Jul 2017 13:16:26 -0400 Subject: [PATCH 080/643] ENH: Allow specification of high_pass_cutoff --- nipype/algorithms/confounds.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/nipype/algorithms/confounds.py b/nipype/algorithms/confounds.py index 5d01c8e11e..ca2c8f014d 100644 --- a/nipype/algorithms/confounds.py +++ b/nipype/algorithms/confounds.py @@ -337,6 +337,9 @@ class CompCorInputSpec(BaseInterfaceInputSpec): False, usedefault=True, desc='Use cosine basis to remove low-frequency trends pre-component ' 'extraction') + high_pass_cutoff = traits.Float( + 128, usedefault=True, requires=['high_pass_filter'], + desc='Cutoff (in seconds) for high-pass filter') repetition_time = traits.Float( desc='Repetition time (TR) of series - derived from image header if ' 'unspecified') @@ -835,14 +838,14 @@ def is_outlier(points, thresh=3.5): return timepoints_to_discard -def cosine_filter(data, timestep, remove_mean=False, axis=-1): +def cosine_filter(data, timestep, period_cut, remove_mean=False, axis=-1): datashape = data.shape timepoints = datashape[axis] data = data.reshape((-1, timepoints)) frametimes = timestep * np.arange(timepoints) - X = _full_rank(_cosine_drift(128, frametimes))[0] + X = _full_rank(_cosine_drift(period_cut, frametimes))[0] non_constant_regressors = X[:, :-1] betas = np.linalg.lstsq(X, data.T)[0] @@ -984,7 +987,7 @@ def compute_noise_components(imgseries, mask_images, degree, num_components, # If degree == 0, remove mean in same pass voxel_timecourses, hpf_basis = cosine_filter( voxel_timecourses, repetition_time, - remove_mean=(degree == 0)) + self.inputs.high_pass_cutoff, remove_mean=(degree == 0)) # from paper: # "The constant and linear trends of the columns in the matrix M were From c737435e0713ecdc3cda270cb15ff57562314fd2 Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Wed, 5 Jul 2017 13:51:17 -0400 Subject: [PATCH 081/643] ENH: Avoid Nx0 arrays --- nipype/algorithms/confounds.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nipype/algorithms/confounds.py b/nipype/algorithms/confounds.py index ca2c8f014d..4df4efdab0 100644 --- a/nipype/algorithms/confounds.py +++ b/nipype/algorithms/confounds.py @@ -846,7 +846,7 @@ def cosine_filter(data, timestep, period_cut, remove_mean=False, axis=-1): frametimes = timestep * np.arange(timepoints) X = _full_rank(_cosine_drift(period_cut, frametimes))[0] - non_constant_regressors = X[:, :-1] + non_constant_regressors = X[:, :-1] if X.shape[1] > 1 else np.array([]) betas = np.linalg.lstsq(X, data.T)[0] From 76ea740033ab09f2276d013bf01e436ac153db3c Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Wed, 5 Jul 2017 14:41:21 -0400 Subject: [PATCH 082/643] ENH: DCT xor Legendre; FIX: pass cutoff properly --- nipype/algorithms/confounds.py | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/nipype/algorithms/confounds.py b/nipype/algorithms/confounds.py index 4df4efdab0..79e99595ab 100644 --- a/nipype/algorithms/confounds.py +++ b/nipype/algorithms/confounds.py @@ -325,7 +325,7 @@ class CompCorInputSpec(BaseInterfaceInputSpec): components_file = traits.Str('components_file.txt', usedefault=True, desc='Filename to store physiological components') num_components = traits.Int(6, usedefault=True) # 6 for BOLD, 4 for ASL - use_regress_poly = traits.Bool(True, usedefault=True, + use_regress_poly = traits.Bool(True, usedefault=True, xor=['high_pass_filter'], desc=('use polynomial regression ' 'pre-component extraction')) regress_poly_degree = traits.Range(low=1, default=1, usedefault=True, @@ -334,7 +334,7 @@ class CompCorInputSpec(BaseInterfaceInputSpec): 'file (one column). If undefined, will ' 'default to "CompCor"')) high_pass_filter = traits.Bool( - False, usedefault=True, + False, xor=['use_regress_poly'], desc='Use cosine basis to remove low-frequency trends pre-component ' 'extraction') high_pass_cutoff = traits.Float( @@ -437,7 +437,8 @@ def _run_interface(self, runtime): components, hpf_basis = compute_noise_components( imgseries.get_data(), mask_images, degree, - self.inputs.num_components, self.inputs.high_pass_filter, TR) + self.inputs.num_components, self.inputs.high_pass_filter, + self.inputs.high_pass_cutoff, TR) components_file = os.path.join(os.getcwd(), self.inputs.components_file) np.savetxt(components_file, components, fmt=b"%.10f", delimiter='\t', @@ -838,7 +839,7 @@ def is_outlier(points, thresh=3.5): return timepoints_to_discard -def cosine_filter(data, timestep, period_cut, remove_mean=False, axis=-1): +def cosine_filter(data, timestep, period_cut, remove_mean=True, axis=-1): datashape = data.shape timepoints = datashape[axis] @@ -952,7 +953,8 @@ def combine_mask_files(mask_files, mask_method=None, mask_index=None): def compute_noise_components(imgseries, mask_images, degree, num_components, - high_pass_filter=False, repetition_time=0): + high_pass_filter=False, period_cut=128, + repetition_time=0): """Compute the noise components from the imgseries for each mask imgseries: a nibabel img @@ -966,6 +968,7 @@ def compute_noise_components(imgseries, mask_images, degree, num_components, returns: components: a numpy array + hpf_basis: a numpy array, if high_pass_filter is True, else None """ components = None @@ -983,16 +986,14 @@ def compute_noise_components(imgseries, mask_images, degree, num_components, # Zero-out any bad values voxel_timecourses[np.isnan(np.sum(voxel_timecourses, axis=1)), :] = 0 + # Use either cosine or Legendre-polynomial detrending if high_pass_filter: - # If degree == 0, remove mean in same pass voxel_timecourses, hpf_basis = cosine_filter( - voxel_timecourses, repetition_time, - self.inputs.high_pass_cutoff, remove_mean=(degree == 0)) - - # from paper: - # "The constant and linear trends of the columns in the matrix M were - # removed [prior to ...]" - if degree > 0 or not high_pass_filter: + voxel_timecourses, repetition_time, period_cut) + else: + # from paper: + # "The constant and linear trends of the columns in the matrix M were + # removed [prior to ...]" voxel_timecourses = regress_poly(degree, voxel_timecourses) # "Voxel time series from the noise ROI (either anatomical or tSTD) were From 6f758a2904875148364e667bda3fb09f1ec46b68 Mon Sep 17 00:00:00 2001 From: john anthony lee Date: Wed, 5 Jul 2017 17:11:02 -0400 Subject: [PATCH 083/643] fix for missed DTIs in issue #2109 --- nipype/interfaces/dcm2nii.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nipype/interfaces/dcm2nii.py b/nipype/interfaces/dcm2nii.py index 62e62b6672..8379834b81 100644 --- a/nipype/interfaces/dcm2nii.py +++ b/nipype/interfaces/dcm2nii.py @@ -304,7 +304,7 @@ def _parse_stdout(self, stdout): bvals.append(out_file + ".bval") find_b = False # next scan will have bvals/bvecs - elif 'DTI gradients' in line or 'DTI gradient directions' in line: + elif 'DTI gradients' in line or 'DTI gradient directions' in line or 'DTI vectors' in line: find_b = True else: pass From 8d19137854f4dfcfe3efdd0e57431643eaa22fb2 Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Wed, 5 Jul 2017 16:23:35 -0400 Subject: [PATCH 084/643] Move to pre_filter approach --- nipype/algorithms/confounds.py | 87 ++++++++++++++++++---------------- 1 file changed, 47 insertions(+), 40 deletions(-) diff --git a/nipype/algorithms/confounds.py b/nipype/algorithms/confounds.py index 79e99595ab..3eb033d035 100644 --- a/nipype/algorithms/confounds.py +++ b/nipype/algorithms/confounds.py @@ -325,7 +325,11 @@ class CompCorInputSpec(BaseInterfaceInputSpec): components_file = traits.Str('components_file.txt', usedefault=True, desc='Filename to store physiological components') num_components = traits.Int(6, usedefault=True) # 6 for BOLD, 4 for ASL - use_regress_poly = traits.Bool(True, usedefault=True, xor=['high_pass_filter'], + pre_filter = traits.Enum('polynomial', 'cosine', False, usedefault=True, + desc='Detrend time series prior to component ' + 'extraction') + use_regress_poly = traits.Bool(True, + deprecated='0.15.0', new_name='pre_filter', desc=('use polynomial regression ' 'pre-component extraction')) regress_poly_degree = traits.Range(low=1, default=1, usedefault=True, @@ -333,25 +337,20 @@ class CompCorInputSpec(BaseInterfaceInputSpec): header_prefix = traits.Str(desc=('the desired header for the output tsv ' 'file (one column). If undefined, will ' 'default to "CompCor"')) - high_pass_filter = traits.Bool( - False, xor=['use_regress_poly'], - desc='Use cosine basis to remove low-frequency trends pre-component ' - 'extraction') high_pass_cutoff = traits.Float( - 128, usedefault=True, requires=['high_pass_filter'], - desc='Cutoff (in seconds) for high-pass filter') + 128, usedefault=True, + desc='Cutoff (in seconds) for "cosine" pre-filter') repetition_time = traits.Float( desc='Repetition time (TR) of series - derived from image header if ' 'unspecified') - save_hpf_basis = traits.Either( - traits.Bool, File, requires=['high_pass_filter'], - desc='Save high pass filter basis as text file') + save_pre_filter = traits.Either( + traits.Bool, File, desc='Save pre-filter basis as text file') class CompCorOutputSpec(TraitedSpec): components_file = File(exists=True, desc='text file containing the noise components') - hpf_basis_file = File(desc='text file containing high-pass filter basis') + pre_filter_file = File(desc='text file containing high-pass filter basis') class CompCor(BaseInterface): @@ -397,11 +396,14 @@ def _run_interface(self, runtime): self.inputs.merge_method, self.inputs.mask_index) + if self.inputs.use_regress_poly: + self.inputs.pre_filter = 'polynomial' + + # Degree 0 == remove mean; see compute_noise_components degree = (self.inputs.regress_poly_degree if - self.inputs.use_regress_poly else 0) + self.inputs.pre_filter == 'polynomial' else 0) - imgseries = nb.load(self.inputs.realigned_file, - mmap=NUMPY_MMAP) + imgseries = nb.load(self.inputs.realigned_file, mmap=NUMPY_MMAP) if len(imgseries.shape) != 4: raise ValueError('{} expected a 4-D nifti file. Input {} has ' @@ -435,20 +437,22 @@ def _run_interface(self, runtime): '{} cannot detect repetition time from image - ' 'Set the repetition_time input'.format(self._header)) - components, hpf_basis = compute_noise_components( - imgseries.get_data(), mask_images, degree, - self.inputs.num_components, self.inputs.high_pass_filter, - self.inputs.high_pass_cutoff, TR) + components, filter_basis = compute_noise_components( + imgseries.get_data(), mask_images, self.inputs.num_components, + self.inputs.pre_filter, degree, self.inputs.high_pass_cutoff, TR) components_file = os.path.join(os.getcwd(), self.inputs.components_file) np.savetxt(components_file, components, fmt=b"%.10f", delimiter='\t', header=self._make_headers(components.shape[1]), comments='') - if self.inputs.save_hpf_basis: - hpf_basis_file = self._list_outputs()['hpf_basis_file'] - header = ['cos{:02d}'.format(i) for i in range(hpf_basis.shape[1])] - np.savetxt(hpf_basis_file, hpf_basis, fmt=b'%.10f', delimiter='\t', - header='\t'.join(header), comments='') + if self.inputs.pre_filter and self.inputs.save_pre_filter: + pre_filter_file = self._list_outputs()['pre_filter_file'] + ftype = {'polynomial': 'poly', + 'cosine': 'cos'}[self.inputs.pre_filter] + header = ['{}{:02d}'.format(ftype, i) + for i in range(filter_basis.shape[1])] + np.savetxt(pre_filter_file, filter_basis, fmt=b'%.10f', + delimiter='\t', header='\t'.join(header), comments='') return runtime @@ -459,11 +463,11 @@ def _list_outputs(self): outputs = self._outputs().get() outputs['components_file'] = os.path.abspath(self.inputs.components_file) - save_hpf_basis = self.inputs.save_hpf_basis - if save_hpf_basis: - if isinstance(save_hpf_basis, bool): - save_hpf_basis = os.path.abspath('hpf_basis.tsv') - outputs['hpf_basis_file'] = save_hpf_basis + save_pre_filter = self.inputs.save_pre_filter + if save_pre_filter: + if isinstance(save_pre_filter, bool): + save_pre_filter = os.path.abspath('pre_filter.tsv') + outputs['pre_filter_file'] = save_pre_filter return outputs @@ -518,7 +522,7 @@ class TCompCor(CompCor): >>> ccinterface.inputs.realigned_file = 'functional.nii' >>> ccinterface.inputs.mask_files = 'mask.nii' >>> ccinterface.inputs.num_components = 1 - >>> ccinterface.inputs.use_regress_poly = True + >>> ccinterface.inputs.pre_filter = 'polynomial' >>> ccinterface.inputs.regress_poly_degree = 2 >>> ccinterface.inputs.percentile_threshold = .03 @@ -883,6 +887,8 @@ def regress_poly(degree, data, remove_mean=True, axis=-1): value_array = np.linspace(-1, 1, timepoints) X = np.hstack((X, polynomial_func(value_array)[:, np.newaxis])) + non_constant_regressors = X[:, :-1] if X.shape[1] > 1 else np.array([]) + # Calculate coefficients betas = np.linalg.pinv(X).dot(data.T) @@ -894,7 +900,7 @@ def regress_poly(degree, data, remove_mean=True, axis=-1): regressed_data = data - datahat # Back to original shape - return regressed_data.reshape(datashape) + return regressed_data.reshape(datashape), non_constant_regressors def combine_mask_files(mask_files, mask_method=None, mask_index=None): @@ -952,9 +958,9 @@ def combine_mask_files(mask_files, mask_method=None, mask_index=None): return [img] -def compute_noise_components(imgseries, mask_images, degree, num_components, - high_pass_filter=False, period_cut=128, - repetition_time=0): +def compute_noise_components(imgseries, mask_images, num_components, + filter_type, degree, period_cut, + repetition_time): """Compute the noise components from the imgseries for each mask imgseries: a nibabel img @@ -972,7 +978,7 @@ def compute_noise_components(imgseries, mask_images, degree, num_components, """ components = None - hpf_basis = None + basis = None for img in mask_images: mask = img.get_data().astype(np.bool) if imgseries.shape[:3] != mask.shape: @@ -986,15 +992,16 @@ def compute_noise_components(imgseries, mask_images, degree, num_components, # Zero-out any bad values voxel_timecourses[np.isnan(np.sum(voxel_timecourses, axis=1)), :] = 0 - # Use either cosine or Legendre-polynomial detrending - if high_pass_filter: - voxel_timecourses, hpf_basis = cosine_filter( + # Currently support Legendre-polynomial or cosine or detrending + # With no filter, the mean is nonetheless removed (poly w/ degree 0) + if filter_type == 'cosine': + voxel_timecourses, basis = cosine_filter( voxel_timecourses, repetition_time, period_cut) - else: + elif filter_type in ('polynomial', False): # from paper: # "The constant and linear trends of the columns in the matrix M were # removed [prior to ...]" - voxel_timecourses = regress_poly(degree, voxel_timecourses) + voxel_timecourses, basis = regress_poly(degree, voxel_timecourses) # "Voxel time series from the noise ROI (either anatomical or tSTD) were # placed in a matrix M of size Nxm, with time along the row dimension @@ -1014,7 +1021,7 @@ def compute_noise_components(imgseries, mask_images, degree, num_components, u[:, :num_components])) if components is None and num_components > 0: raise ValueError('No components found') - return components, hpf_basis + return components, basis def _compute_tSTD(M, x, axis=0): From 71dff5153758841724d6b1a121abedb861210853 Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Wed, 5 Jul 2017 16:24:55 -0400 Subject: [PATCH 085/643] make specs --- nipype/algorithms/tests/test_auto_ACompCor.py | 12 +++++++----- nipype/algorithms/tests/test_auto_TCompCor.py | 12 +++++++----- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/nipype/algorithms/tests/test_auto_ACompCor.py b/nipype/algorithms/tests/test_auto_ACompCor.py index aa94f98b1b..f0679bafc9 100644 --- a/nipype/algorithms/tests/test_auto_ACompCor.py +++ b/nipype/algorithms/tests/test_auto_ACompCor.py @@ -7,7 +7,7 @@ def test_ACompCor_inputs(): input_map = dict(components_file=dict(usedefault=True, ), header_prefix=dict(), - high_pass_filter=dict(usedefault=True, + high_pass_cutoff=dict(usedefault=True, ), ignore_exception=dict(nohash=True, usedefault=True, @@ -21,14 +21,16 @@ def test_ACompCor_inputs(): ), num_components=dict(usedefault=True, ), + pre_filter=dict(usedefault=True, + ), realigned_file=dict(mandatory=True, ), regress_poly_degree=dict(usedefault=True, ), repetition_time=dict(), - save_hpf_basis=dict(requires=['high_pass_filter'], - ), - use_regress_poly=dict(usedefault=True, + save_pre_filter=dict(), + use_regress_poly=dict(deprecated='0.15.0', + new_name='pre_filter', ), ) inputs = ACompCor.input_spec() @@ -40,7 +42,7 @@ def test_ACompCor_inputs(): def test_ACompCor_outputs(): output_map = dict(components_file=dict(), - hpf_basis_file=dict(), + pre_filter_file=dict(), ) outputs = ACompCor.output_spec() diff --git a/nipype/algorithms/tests/test_auto_TCompCor.py b/nipype/algorithms/tests/test_auto_TCompCor.py index c9d45bb2a8..0b426f826a 100644 --- a/nipype/algorithms/tests/test_auto_TCompCor.py +++ b/nipype/algorithms/tests/test_auto_TCompCor.py @@ -7,7 +7,7 @@ def test_TCompCor_inputs(): input_map = dict(components_file=dict(usedefault=True, ), header_prefix=dict(), - high_pass_filter=dict(usedefault=True, + high_pass_cutoff=dict(usedefault=True, ), ignore_exception=dict(nohash=True, usedefault=True, @@ -23,14 +23,16 @@ def test_TCompCor_inputs(): ), percentile_threshold=dict(usedefault=True, ), + pre_filter=dict(usedefault=True, + ), realigned_file=dict(mandatory=True, ), regress_poly_degree=dict(usedefault=True, ), repetition_time=dict(), - save_hpf_basis=dict(requires=['high_pass_filter'], - ), - use_regress_poly=dict(usedefault=True, + save_pre_filter=dict(), + use_regress_poly=dict(deprecated='0.15.0', + new_name='pre_filter', ), ) inputs = TCompCor.input_spec() @@ -43,7 +45,7 @@ def test_TCompCor_inputs(): def test_TCompCor_outputs(): output_map = dict(components_file=dict(), high_variance_masks=dict(), - hpf_basis_file=dict(), + pre_filter_file=dict(), ) outputs = TCompCor.output_spec() From 0cdc9712d83cae8f81980b3103aa6797ee55c455 Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Thu, 6 Jul 2017 09:43:01 -0400 Subject: [PATCH 086/643] FIX: Incomplete conversion, update docs --- nipype/algorithms/confounds.py | 43 ++++++++++++++++++++-------------- 1 file changed, 26 insertions(+), 17 deletions(-) diff --git a/nipype/algorithms/confounds.py b/nipype/algorithms/confounds.py index 3eb033d035..49d4c17200 100644 --- a/nipype/algorithms/confounds.py +++ b/nipype/algorithms/confounds.py @@ -420,7 +420,7 @@ def _run_interface(self, runtime): mask_images = self._process_masks(mask_images, imgseries.get_data()) TR = 0 - if self.inputs.high_pass_filter: + if self.inputs.pre_filter == 'cosine': if isdefined(self.inputs.repetition_time): TR = self.inputs.repetition_time else: @@ -965,27 +965,34 @@ def compute_noise_components(imgseries, mask_images, num_components, imgseries: a nibabel img mask_images: a list of nibabel images - degree: order of polynomial used to remove trends from the timeseries num_components: number of noise components to return - high_pass_filter: high-pass-filter data with discrete cosine basis - (run before polynomial detrend) + filter_type: type off filter to apply to time series before computing + noise components. + 'polynomial' - Legendre polynomial basis + 'cosine' - Discrete cosine (DCT) basis + False - None (mean-removal only) + + Filter options: + + degree: order of polynomial used to remove trends from the timeseries + period_cut: minimum period (in sec) for DCT high-pass filter repetition_time: time (in sec) between volume acquisitions returns: components: a numpy array - hpf_basis: a numpy array, if high_pass_filter is True, else None + basis: a numpy array containing the (non-constant) filter regressors """ components = None - basis = None + basis = np.array([]) for img in mask_images: mask = img.get_data().astype(np.bool) if imgseries.shape[:3] != mask.shape: - raise ValueError('Inputs for CompCor, timeseries and mask, ' - 'do not have matching spatial dimensions ' - '({} and {}, respectively)'.format( - imgseries.shape[:3], mask.shape)) + raise ValueError( + 'Inputs for CompCor, timeseries and mask, do not have ' + 'matching spatial dimensions ({} and {}, respectively)'.format( + imgseries.shape[:3], mask.shape)) voxel_timecourses = imgseries[mask, :] @@ -1035,6 +1042,7 @@ def _compute_tSTD(M, x, axis=0): # _cosine_drift and _full_rank copied from nipy/modalities/fmri/design_matrix # # Nipy release: 0.4.1 +# Modified for smooth integration in CompCor classes def _cosine_drift(period_cut, frametimes): """Create a cosine drift matrix with periods greater or equals to period_cut @@ -1055,22 +1063,23 @@ def _cosine_drift(period_cut, frametimes): """ len_tim = len(frametimes) n_times = np.arange(len_tim) - hfcut = 1./ period_cut # input parameter is the period + hfcut = 1. / period_cut # input parameter is the period - dt = frametimes[1] - frametimes[0] # frametimes.max() should be (len_tim-1)*dt + # frametimes.max() should be (len_tim-1)*dt + dt = frametimes[1] - frametimes[0] + # hfcut = 1/(2*dt) yields len_time # If series is too short, return constant regressor - order = max(int(np.floor(2*len_tim*hfcut*dt)), 1) # s.t. hfcut = 1/(2*dt) yields len_tim + order = max(int(np.floor(2*len_tim*hfcut*dt)), 1) cdrift = np.zeros((len_tim, order)) nfct = np.sqrt(2.0/len_tim) for k in range(1, order): - cdrift[:,k-1] = nfct * np.cos((np.pi/len_tim)*(n_times + .5)*k) + cdrift[:, k-1] = nfct * np.cos((np.pi / len_tim) * (n_times + .5) * k) - cdrift[:,order-1] = 1. # or 1./sqrt(len_tim) to normalize + cdrift[:, order-1] = 1. # or 1./sqrt(len_tim) to normalize return cdrift - def _full_rank(X, cmax=1e15): """ This function possibly adds a scalar matrix to X @@ -1091,7 +1100,7 @@ def _full_rank(X, cmax=1e15): c = smax / smin if c < cmax: return X, c - warn('Matrix is singular at working precision, regularizing...') + IFLOG.warn('Matrix is singular at working precision, regularizing...') lda = (smax - cmax * smin) / (cmax - 1) s = s + lda X = np.dot(U, np.dot(np.diag(s), V)) From 3a69a4761803ae66e301935249f7a242f450d214 Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Thu, 6 Jul 2017 09:43:24 -0400 Subject: [PATCH 087/643] FIX: Typo in function name --- nipype/algorithms/confounds.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nipype/algorithms/confounds.py b/nipype/algorithms/confounds.py index 49d4c17200..a3f092721b 100644 --- a/nipype/algorithms/confounds.py +++ b/nipype/algorithms/confounds.py @@ -667,7 +667,7 @@ def _run_interface(self, runtime): global_signal = in_nii.get_data()[:,:,:,:50].mean(axis=0).mean(axis=0).mean(axis=0) self._results = { - 'n_volumes_to_discard': _is_outlier(global_signal) + 'n_volumes_to_discard': is_outlier(global_signal) } return runtime From 15772205835de82214efd176605b10790e0df659 Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Thu, 6 Jul 2017 09:59:00 -0400 Subject: [PATCH 088/643] Remove use_regress_poly --- nipype/algorithms/tests/test_compcor.py | 2 +- nipype/workflows/rsfmri/fsl/resting.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nipype/algorithms/tests/test_compcor.py b/nipype/algorithms/tests/test_compcor.py index adb495f90f..a458e8a0a6 100644 --- a/nipype/algorithms/tests/test_compcor.py +++ b/nipype/algorithms/tests/test_compcor.py @@ -80,7 +80,7 @@ def test_compcor_no_regress_poly(self): self.run_cc(CompCor(realigned_file=self.realigned_file, mask_files=self.mask_files, mask_index=0, - use_regress_poly=False), + pre_filter=False), [['0.4451946442', '-0.7683311482'], ['-0.4285129505', '-0.0926034137'], ['0.5721540256', '0.5608764842'], diff --git a/nipype/workflows/rsfmri/fsl/resting.py b/nipype/workflows/rsfmri/fsl/resting.py index 01da5014df..a4dc1db5af 100644 --- a/nipype/workflows/rsfmri/fsl/resting.py +++ b/nipype/workflows/rsfmri/fsl/resting.py @@ -120,7 +120,7 @@ def create_resting_preproc(name='restpreproc', base_dir=None): name='getthreshold') threshold_stddev = pe.Node(fsl.Threshold(), name='threshold') compcor = pe.Node(confounds.ACompCor(components_file="noise_components.txt", - use_regress_poly=False), + pre_filter=False), name='compcor') remove_noise = pe.Node(fsl.FilterRegressor(filter_all=True), name='remove_noise') From d6ae63d9010c6f2548a1dac01f6ab4f0cb7e5035 Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Thu, 6 Jul 2017 11:52:54 -0400 Subject: [PATCH 089/643] FIX: Select regress_poly output --- nipype/algorithms/confounds.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/nipype/algorithms/confounds.py b/nipype/algorithms/confounds.py index a3f092721b..c93deaaeb0 100644 --- a/nipype/algorithms/confounds.py +++ b/nipype/algorithms/confounds.py @@ -543,7 +543,7 @@ def _process_masks(self, mask_images, timeseries=None): for i, img in enumerate(mask_images): mask = img.get_data().astype(np.bool) imgseries = timeseries[mask, :] - imgseries = regress_poly(2, imgseries) + imgseries = regress_poly(2, imgseries)[0] tSTD = _compute_tSTD(imgseries, 0, axis=-1) threshold_std = np.percentile(tSTD, np.round(100. * (1. - self.inputs.percentile_threshold)).astype(int)) @@ -618,7 +618,7 @@ def _run_interface(self, runtime): data = data.astype(np.float32) if isdefined(self.inputs.regress_poly): - data = regress_poly(self.inputs.regress_poly, data, remove_mean=False) + data = regress_poly(self.inputs.regress_poly, data, remove_mean=False)[0] img = nb.Nifti1Image(data, img.affine, header) nb.save(img, op.abspath(self.inputs.detrended_file)) @@ -734,9 +734,10 @@ def compute_dvars(in_file, in_mask, remove_zerovariance=False, func_sd = func_sd[func_sd != 0] # Compute (non-robust) estimate of lag-1 autocorrelation - ar1 = np.apply_along_axis(AR_est_YW, 1, - regress_poly(0, mfunc, remove_mean=True).astype( - np.float32), 1)[:, 0] + ar1 = np.apply_along_axis( + AR_est_YW, 1, + regress_poly(0, mfunc, remove_mean=True)[0].astype(np.float32), + 1)[:, 0] # Compute (predicted) standard deviation of temporal difference time series diff_sdhat = np.squeeze(np.sqrt(((1 - ar1) * 2).tolist())) * func_sd From 7ba99dcf270e2943e651b0810955ef95d4db00f9 Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Thu, 6 Jul 2017 14:51:34 -0400 Subject: [PATCH 090/643] FIX: Check for multi-dim array before adding headers --- nipype/algorithms/confounds.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nipype/algorithms/confounds.py b/nipype/algorithms/confounds.py index c93deaaeb0..333eb5e530 100644 --- a/nipype/algorithms/confounds.py +++ b/nipype/algorithms/confounds.py @@ -449,8 +449,8 @@ def _run_interface(self, runtime): pre_filter_file = self._list_outputs()['pre_filter_file'] ftype = {'polynomial': 'poly', 'cosine': 'cos'}[self.inputs.pre_filter] - header = ['{}{:02d}'.format(ftype, i) - for i in range(filter_basis.shape[1])] + ncols = filter_basis.shape[1] if filter_basis.size > 0 else 0 + header = ['{}{:02d}'.format(ftype, i) for i in range(ncols)] np.savetxt(pre_filter_file, filter_basis, fmt=b'%.10f', delimiter='\t', header='\t'.join(header), comments='') From e03cb13cb22e94594556096da025979395b7d80d Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Thu, 6 Jul 2017 16:14:27 -0400 Subject: [PATCH 091/643] Remove deprecated use_regress_poly --- nipype/algorithms/confounds.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nipype/algorithms/confounds.py b/nipype/algorithms/confounds.py index 333eb5e530..2e7fc2af9a 100644 --- a/nipype/algorithms/confounds.py +++ b/nipype/algorithms/confounds.py @@ -364,7 +364,7 @@ class CompCor(BaseInterface): >>> ccinterface.inputs.realigned_file = 'functional.nii' >>> ccinterface.inputs.mask_files = 'mask.nii' >>> ccinterface.inputs.num_components = 1 - >>> ccinterface.inputs.use_regress_poly = True + >>> ccinterface.inputs.pre_filter = 'polynomial' >>> ccinterface.inputs.regress_poly_degree = 2 """ From 2169d3fb3d057147c15b5078368b92232b7e1124 Mon Sep 17 00:00:00 2001 From: 62442katieb Date: Mon, 17 Jul 2017 15:15:16 -0400 Subject: [PATCH 092/643] Add 1dCat, 3dNwarpApply, and expand BrickStat. --- nipype/interfaces/afni/__init__.py | 8 +- nipype/interfaces/afni/utils.py | 175 ++++++++++++++++++++++++++++- 2 files changed, 177 insertions(+), 6 deletions(-) diff --git a/nipype/interfaces/afni/__init__.py b/nipype/interfaces/afni/__init__.py index 96ba268241..791b8b25f6 100644 --- a/nipype/interfaces/afni/__init__.py +++ b/nipype/interfaces/afni/__init__.py @@ -17,8 +17,8 @@ Seg, SkullStrip, TCorr1D, TCorrMap, TCorrelate, TShift, Volreg, Warp, QwarpPlusMinus, Qwarp) from .svm import (SVMTest, SVMTrain) -from .utils import (AFNItoNIFTI, Autobox,Axialize, BrickStat, Calc, Copy, Edge3, - Eval, FWHMx, - MaskTool, Merge, Notes, Refit, Resample, TCat, TStat, To3D, - Unifize, ZCutUp, GCOR,Zcat, Zeropad) +from .utils import (AFNItoNIFTI, Autobox, Axialize, BrickStat, Calc, Cat, Copy, + Edge3, Eval, FWHMx, MaskTool, Merge, Notes, NwarpApply, + Refit, Resample, TCat, TStat, To3D, Unifize, ZCutUp, GCOR, + Zcat, Zeropad) from .model import (Deconvolve, Remlfit) diff --git a/nipype/interfaces/afni/utils.py b/nipype/interfaces/afni/utils.py index 96b34ffba4..3f663b8e77 100644 --- a/nipype/interfaces/afni/utils.py +++ b/nipype/interfaces/afni/utils.py @@ -191,6 +191,26 @@ class BrickStatInputSpec(CommandLineInputSpec): desc='print the minimum value in dataset', argstr='-min', position=1) + slow = traits.Bool( + desc='read the whole dataset to find the min and max values', + argstr='-slow') + max = traits.Bool( + desc='print the maximum value in the dataset', + argstr='-max') + mean = traits.Bool( + desc='print the mean value in the dataset', + argstr='-mean') + sum = traits.Bool( + desc='print the sum of values in the dataset', + argstr='-sum') + var = traits.Bool( + desc='print the variance in the dataset', + argstr='-var') + percentile = traits.Tuple(traits.Float, traits.Float, traits.Float, + desc='p0 ps p1 write the percentile values starting ' + 'at p0% and ending at p1% at a step of ps%. ' + 'only one sub-brick is accepted.', + argstr='-percentile %.3f %.3f %.3f') class BrickStatOutputSpec(TraitedSpec): @@ -335,6 +355,84 @@ def _parse_inputs(self, skip=None): skip=('start_idx', 'stop_idx', 'other')) +class CatInputSpec(AFNICommandInputSpec): + in_files = traits.List(File(exists=True), argstr="%s", + mandatory=True, position=-2) + out_file = File( + argstr='> %s', + default='catout.1d', + desc='output (concatenated) file name', + position=-1, + mandatory=True) + omitconst = traits.Bool( + desc='Omit columns that are identically constant from output.', + argstr='-nonconst') + keepfree = traits.Bool( + desc='Keep only columns that are marked as \'free\' in the ' + '3dAllineate header from \'-1Dparam_save\'. ' + 'If there is no such header, all columns are kept.', + argst='-nonfixed') + out_format = traits.Enum( + 'int','nice','double','fint','cint', + argstr='-form %s', + desc='specify data type for output. Valid types are \'int\', ' + '\'nice\', \'double\', \'fint\', and \'cint\'.', + xor=['out_int','out_nice','out_double','out_fint','out_cint']) + stack = traits.Bool( + desc='Stack the columns of the resultant matrix in the output.', + argstr='-stack') + sel = traits.Str( + desc='Apply the same column/row selection string to all filenames ' + 'on the command line.', + argstr='-sel %s') + out_int = traits.Bool( + desc='specifiy int data type for output', + argstr='-i', + xor=['out_format','out_nice','out_double','out_fint','out_cint']) + out_nice = traits.Bool( + desc='specifiy nice data type for output', + argstr='-n', + xor=['out_format','out_int','out_double','out_fint','out_cint']) + out_double = traits.Bool( + desc='specifiy double data type for output', + argstr='-d', + xor=['out_format','out_nice','out_int','out_fint','out_cint']) + out_fint = traits.Bool( + desc='specifiy int, rounded down, data type for output', + argstr='-f', + xor=['out_format','out_nice','out_double','out_int','out_cint']) + out_cint = traits.Bool( + desc='specifiy int, rounded up, data type for output', + xor=['out_format','out_nice','out_double','out_fint','out_int']) + + +class Cat(AFNICommand): + """1dcat takes as input one or more 1D files, and writes out a 1D file + containing the side-by-side concatenation of all or a subset of the + columns from the input files. + + For complete details, see the `1dcat Documentation. + `_ + + Examples + ======== + + >>> from nipype.interfaces import afni + >>> cat1d = afni.Cat() + >>> cat1d.inputs.sel = "'[0,2]'" + >>> cat1d.inputs.in_files = ['f1.1D', 'f2.1D'] + >>> cat1d.inputs.out_file = 'catout.1d' + >>> cat1d.cmdline # doctest: +ALLOW_UNICODE + "1dcat -sel '[0,2]' f1.1D f2.1D > catout.1d" + >>> res = cat1d.run() # doctest: +SKIP + + """ + + _cmd = '1dcat' + input_spec = CatInputSpec + output_spec = AFNICommandOutputSpec + + class CopyInputSpec(AFNICommandInputSpec): in_file = File( desc='input file to 3dcopy', @@ -1044,6 +1142,79 @@ def _list_outputs(self): return outputs +class NwarpApplyInputSpec(CommandLineInputSpec): + in_file = traits.Either(File(exists=True), traits.List(File(exists=True)), + mandatory=True, + argstr='-source %s', + desc='the name of the dataset to be warped ' + 'can be multiple datasets') + warp = traits.String( + desc='the name of the warp dataset. ' + 'multiple warps can be concatenated (make sure they exist)', + argstr='-nwarp %s', + mandatory=True) + inv_warp = traits.Bool( + desc='After the warp specified in \'-nwarp\' is computed, invert it', + argstr='-iwarp') + master = traits.File(exists=True, + desc='the name of the master dataset, which defines the output grid', + argstr='-master %s') + interp = traits.Enum('NN','nearestneighbour','nearestneighbor','linear', + 'trilinear','cubic','tricubic','quintic','triquintic','wsinc5', + desc='defines interpolation method to use during warp', + argstr='-interp %s', + default='wsinc5') + ainterp = traits.Enum('NN','nearestneighbour','nearestneighbor','linear', + 'trilinear','cubic','tricubic','quintic','triquintic','wsinc5', + desc='specify a different interpolation method than might ' + 'be used for the warp', + argstr='-ainterp %s', + default='wsinc5') + out_file = File( + name_template='%s_Nwarp', + desc='output image file name', + argstr='-prefix %s', + name_source='in_file') + short = traits.Bool( + desc='Write output dataset using 16-bit short integers, rather than ' + 'the usual 32-bit floats.', + argstr='-short') + quiet = traits.Bool( + desc='don\'t be verbose :(', + argstr='-quiet', + xor=['verb']) + verb = traits.Bool( + desc='be extra verbose :)', + argstr='-verb', + xor=['quiet']) + + +class NwarpApply(AFNICommandBase): + """Program to apply a nonlinear 3D warp saved from 3dQwarp + (or 3dNwarpCat, etc.) to a 3D dataset, to produce a warped + version of the source dataset. + + For complete details, see the `3dNwarpApply Documentation. + `_ + + Examples + ======== + + >>> from nipype.interfaces import afni + >>> nwarp = afni.NwarpApply() + >>> nwarp.inputs.in_file = 'Fred+orig' + >>> nwarp.inputs.master = 'NWARP' + >>> nwarp.inputs.warp = "'Fred_WARP+tlrc Fred.Xaff12.1D'" + >>> nwarp.cmdline # doctest: +ALLOW_UNICODE + "3dNwarpApply -source Fred+orig -master NWARP -prefix Fred+orig_Nwarp -nwarp \'Fred_WARP+tlrc Fred.Xaff12.1D\'" + >>> res = nwarp.run() # doctest: +SKIP + + """ + _cmd = '3dNwarpApply' + input_spec = NwarpApplyInputSpec + output_spec = AFNICommandOutputSpec + + class RefitInputSpec(CommandLineInputSpec): in_file = File( desc='input file to 3drefit', @@ -1571,7 +1742,7 @@ class AxializeInputSpec(AFNICommandInputSpec): orientation = Str( desc='new orientation code', argstr='-orient %s') - + class Axialize(AFNICommand): """Read in a dataset and write it out as a new dataset @@ -1595,7 +1766,7 @@ class Axialize(AFNICommand): _cmd = '3daxialize' input_spec = AxializeInputSpec output_spec = AFNICommandOutputSpec - + class ZcatInputSpec(AFNICommandInputSpec): in_files = InputMultiPath( From 82007bc2ea361a05271861296805c532c79b4381 Mon Sep 17 00:00:00 2001 From: 62442katieb Date: Mon, 17 Jul 2017 15:46:18 -0400 Subject: [PATCH 093/643] added test data --- nipype/testing/data/Fred+orig | 0 nipype/testing/data/NWARP | 0 nipype/testing/data/f1.1D | 0 nipype/testing/data/f2.1D | 0 4 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 nipype/testing/data/Fred+orig create mode 100644 nipype/testing/data/NWARP create mode 100644 nipype/testing/data/f1.1D create mode 100644 nipype/testing/data/f2.1D diff --git a/nipype/testing/data/Fred+orig b/nipype/testing/data/Fred+orig new file mode 100644 index 0000000000..e69de29bb2 diff --git a/nipype/testing/data/NWARP b/nipype/testing/data/NWARP new file mode 100644 index 0000000000..e69de29bb2 diff --git a/nipype/testing/data/f1.1D b/nipype/testing/data/f1.1D new file mode 100644 index 0000000000..e69de29bb2 diff --git a/nipype/testing/data/f2.1D b/nipype/testing/data/f2.1D new file mode 100644 index 0000000000..e69de29bb2 From da639a690c1a00de75ee78a67a8b98ab1a5ef445 Mon Sep 17 00:00:00 2001 From: Satrajit Ghosh Date: Mon, 17 Jul 2017 23:17:55 -0400 Subject: [PATCH 094/643] fix: retrieve aseg and wmparc stats properly --- nipype/interfaces/io.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nipype/interfaces/io.py b/nipype/interfaces/io.py index 6b00764e93..18e8047e1a 100644 --- a/nipype/interfaces/io.py +++ b/nipype/interfaces/io.py @@ -1615,13 +1615,13 @@ def _get_files(self, path, key, dirval, altkey=None): globprefix = self.inputs.hemi + '.' else: globprefix = '?h.' + if key in ('aseg_stats', 'wmparc_stats'): + globprefix = '' elif key == 'ribbon': if self.inputs.hemi != 'both': globprefix = self.inputs.hemi + '.' else: globprefix = '*' - elif key in ('aseg_stats', 'wmparc_stats'): - globprefix = '' keys = filename_to_list(altkey) if altkey else [key] globfmt = os.path.join(path, dirval, ''.join((globprefix, '{}', globsuffix))) From 34eab672c81f56c201b3f585b1d100c83cbcbd81 Mon Sep 17 00:00:00 2001 From: Satrajit Ghosh Date: Tue, 18 Jul 2017 08:21:37 -0400 Subject: [PATCH 095/643] fix: auto tests --- nipype/interfaces/afni/model.py | 1 - .../afni/tests/test_auto_Axialize.py | 55 ++++++ .../afni/tests/test_auto_BrickStat.py | 12 ++ nipype/interfaces/afni/tests/test_auto_Cat.py | 66 ++++++++ .../afni/tests/test_auto_NwarpApply.py | 58 +++++++ .../interfaces/afni/tests/test_auto_Qwarp.py | 158 ++++++++++++++++++ .../afni/tests/test_auto_Remlfit.py | 1 - .../interfaces/afni/tests/test_auto_Zcat.py | 51 ++++++ .../afni/tests/test_auto_Zeropad.py | 77 +++++++++ nipype/interfaces/afni/utils.py | 2 +- .../ants/tests/test_auto_KellyKapowski.py | 82 +++++++++ .../fsl/tests/test_auto_AccuracyTester.py | 47 ++++++ .../fsl/tests/test_auto_Classifier.py | 46 +++++ .../interfaces/fsl/tests/test_auto_Cleaner.py | 55 ++++++ .../fsl/tests/test_auto_FeatureExtractor.py | 39 +++++ .../interfaces/fsl/tests/test_auto_TOPUP.py | 1 + .../fsl/tests/test_auto_Training.py | 42 +++++ .../fsl/tests/test_auto_TrainingSetCreator.py | 32 ++++ 18 files changed, 822 insertions(+), 3 deletions(-) create mode 100644 nipype/interfaces/afni/tests/test_auto_Axialize.py create mode 100644 nipype/interfaces/afni/tests/test_auto_Cat.py create mode 100644 nipype/interfaces/afni/tests/test_auto_NwarpApply.py create mode 100644 nipype/interfaces/afni/tests/test_auto_Qwarp.py create mode 100644 nipype/interfaces/afni/tests/test_auto_Zcat.py create mode 100644 nipype/interfaces/afni/tests/test_auto_Zeropad.py create mode 100644 nipype/interfaces/ants/tests/test_auto_KellyKapowski.py create mode 100644 nipype/interfaces/fsl/tests/test_auto_AccuracyTester.py create mode 100644 nipype/interfaces/fsl/tests/test_auto_Classifier.py create mode 100644 nipype/interfaces/fsl/tests/test_auto_Cleaner.py create mode 100644 nipype/interfaces/fsl/tests/test_auto_FeatureExtractor.py create mode 100644 nipype/interfaces/fsl/tests/test_auto_Training.py create mode 100644 nipype/interfaces/fsl/tests/test_auto_TrainingSetCreator.py diff --git a/nipype/interfaces/afni/model.py b/nipype/interfaces/afni/model.py index 2929531b62..475e2c9d73 100644 --- a/nipype/interfaces/afni/model.py +++ b/nipype/interfaces/afni/model.py @@ -360,7 +360,6 @@ class RemlfitInputSpec(AFNICommandInputSpec): 'option. Each column in the specified file(s) will be appended ' 'to the matrix. File(s) must have at least as many rows as the ' 'matrix does.', - exists=True, copyfile=False, sep=" ", argstr='-addbase %s') diff --git a/nipype/interfaces/afni/tests/test_auto_Axialize.py b/nipype/interfaces/afni/tests/test_auto_Axialize.py new file mode 100644 index 0000000000..6d04decdaa --- /dev/null +++ b/nipype/interfaces/afni/tests/test_auto_Axialize.py @@ -0,0 +1,55 @@ +# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT +from __future__ import unicode_literals +from ..utils import Axialize + + +def test_Axialize_inputs(): + input_map = dict(args=dict(argstr='%s', + ), + axial=dict(argstr='-axial', + xor=['coronal', 'sagittal'], + ), + coronal=dict(argstr='-coronal', + xor=['sagittal', 'axial'], + ), + environ=dict(nohash=True, + usedefault=True, + ), + ignore_exception=dict(nohash=True, + usedefault=True, + ), + in_file=dict(argstr='%s', + copyfile=False, + mandatory=True, + position=-2, + ), + orientation=dict(argstr='-orient %s', + ), + out_file=dict(argstr='-prefix %s', + name_source='in_file', + name_template='%s_axialize', + ), + outputtype=dict(), + sagittal=dict(argstr='-sagittal', + xor=['coronal', 'axial'], + ), + terminal_output=dict(nohash=True, + ), + verb=dict(argstr='-verb', + ), + ) + inputs = Axialize.input_spec() + + for key, metadata in list(input_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(inputs.traits()[key], metakey) == value + + +def test_Axialize_outputs(): + output_map = dict(out_file=dict(), + ) + outputs = Axialize.output_spec() + + for key, metadata in list(output_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(outputs.traits()[key], metakey) == value diff --git a/nipype/interfaces/afni/tests/test_auto_BrickStat.py b/nipype/interfaces/afni/tests/test_auto_BrickStat.py index fc095e5fa3..f15a8d972d 100644 --- a/nipype/interfaces/afni/tests/test_auto_BrickStat.py +++ b/nipype/interfaces/afni/tests/test_auto_BrickStat.py @@ -19,11 +19,23 @@ def test_BrickStat_inputs(): mask=dict(argstr='-mask %s', position=2, ), + max=dict(argstr='-max', + ), + mean=dict(argstr='-mean', + ), min=dict(argstr='-min', position=1, ), + percentile=dict(argstr='-percentile %.3f %.3f %.3f', + ), + slow=dict(argstr='-slow', + ), + sum=dict(argstr='-sum', + ), terminal_output=dict(nohash=True, ), + var=dict(argstr='-var', + ), ) inputs = BrickStat.input_spec() diff --git a/nipype/interfaces/afni/tests/test_auto_Cat.py b/nipype/interfaces/afni/tests/test_auto_Cat.py new file mode 100644 index 0000000000..c35c3e86b9 --- /dev/null +++ b/nipype/interfaces/afni/tests/test_auto_Cat.py @@ -0,0 +1,66 @@ +# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT +from __future__ import unicode_literals +from ..utils import Cat + + +def test_Cat_inputs(): + input_map = dict(args=dict(argstr='%s', + ), + environ=dict(nohash=True, + usedefault=True, + ), + ignore_exception=dict(nohash=True, + usedefault=True, + ), + in_files=dict(argstr='%s', + mandatory=True, + position=-2, + ), + keepfree=dict(argstr='-nonfixed', + ), + omitconst=dict(argstr='-nonconst', + ), + out_cint=dict(xor=['out_format', 'out_nice', 'out_double', 'out_fint', 'out_int'], + ), + out_double=dict(argstr='-d', + xor=['out_format', 'out_nice', 'out_int', 'out_fint', 'out_cint'], + ), + out_file=dict(argstr='> %s', + mandatory=True, + position=-1, + ), + out_fint=dict(argstr='-f', + xor=['out_format', 'out_nice', 'out_double', 'out_int', 'out_cint'], + ), + out_format=dict(argstr='-form %s', + xor=['out_int', 'out_nice', 'out_double', 'out_fint', 'out_cint'], + ), + out_int=dict(argstr='-i', + xor=['out_format', 'out_nice', 'out_double', 'out_fint', 'out_cint'], + ), + out_nice=dict(argstr='-n', + xor=['out_format', 'out_int', 'out_double', 'out_fint', 'out_cint'], + ), + outputtype=dict(), + sel=dict(argstr='-sel %s', + ), + stack=dict(argstr='-stack', + ), + terminal_output=dict(nohash=True, + ), + ) + inputs = Cat.input_spec() + + for key, metadata in list(input_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(inputs.traits()[key], metakey) == value + + +def test_Cat_outputs(): + output_map = dict(out_file=dict(), + ) + outputs = Cat.output_spec() + + for key, metadata in list(output_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(outputs.traits()[key], metakey) == value diff --git a/nipype/interfaces/afni/tests/test_auto_NwarpApply.py b/nipype/interfaces/afni/tests/test_auto_NwarpApply.py new file mode 100644 index 0000000000..273d0fed47 --- /dev/null +++ b/nipype/interfaces/afni/tests/test_auto_NwarpApply.py @@ -0,0 +1,58 @@ +# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT +from __future__ import unicode_literals +from ..utils import NwarpApply + + +def test_NwarpApply_inputs(): + input_map = dict(ainterp=dict(argstr='-ainterp %s', + ), + args=dict(argstr='%s', + ), + environ=dict(nohash=True, + usedefault=True, + ), + ignore_exception=dict(nohash=True, + usedefault=True, + ), + in_file=dict(argstr='-source %s', + mandatory=True, + ), + interp=dict(argstr='-interp %s', + ), + inv_warp=dict(argstr='-iwarp', + ), + master=dict(argstr='-master %s', + ), + out_file=dict(argstr='-prefix %s', + name_source='in_file', + name_template='%s_Nwarp', + ), + quiet=dict(argstr='-quiet', + xor=['verb'], + ), + short=dict(argstr='-short', + ), + terminal_output=dict(nohash=True, + ), + verb=dict(argstr='-verb', + xor=['quiet'], + ), + warp=dict(argstr='-nwarp %s', + mandatory=True, + ), + ) + inputs = NwarpApply.input_spec() + + for key, metadata in list(input_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(inputs.traits()[key], metakey) == value + + +def test_NwarpApply_outputs(): + output_map = dict(out_file=dict(), + ) + outputs = NwarpApply.output_spec() + + for key, metadata in list(output_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(outputs.traits()[key], metakey) == value diff --git a/nipype/interfaces/afni/tests/test_auto_Qwarp.py b/nipype/interfaces/afni/tests/test_auto_Qwarp.py new file mode 100644 index 0000000000..2848fe97f8 --- /dev/null +++ b/nipype/interfaces/afni/tests/test_auto_Qwarp.py @@ -0,0 +1,158 @@ +# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT +from __future__ import unicode_literals +from ..preprocess import Qwarp + + +def test_Qwarp_inputs(): + input_map = dict(Qfinal=dict(argstr='-Qfinal', + ), + Qonly=dict(argstr='-Qonly', + ), + allsave=dict(argstr='-allsave', + xor=['nopadWARP', 'duplo', 'plusminus'], + ), + args=dict(argstr='%s', + ), + ballopt=dict(argstr='-ballopt', + xor=['workhard', 'boxopt'], + ), + base_file=dict(argstr='-base %s', + copyfile=False, + mandatory=True, + ), + baxopt=dict(argstr='-boxopt', + xor=['workhard', 'ballopt'], + ), + blur=dict(argstr='-blur %s', + ), + duplo=dict(argstr='-duplo', + xor=['gridlist', 'maxlev', 'inilev', 'iniwarp', 'plusminus', 'allsave'], + ), + emask=dict(argstr='-emask %s', + copyfile=False, + ), + environ=dict(nohash=True, + usedefault=True, + ), + expad=dict(argstr='-expad %d', + xor=['nopadWARP'], + ), + gridlist=dict(argstr='-gridlist %s', + copyfile=False, + xor=['duplo', 'plusminus'], + ), + hel=dict(argstr='-hel', + xor=['nmi', 'mi', 'lpc', 'lpa', 'pear'], + ), + ignore_exception=dict(nohash=True, + usedefault=True, + ), + in_file=dict(argstr='-source %s', + copyfile=False, + mandatory=True, + ), + inilev=dict(argstr='-inlev %d', + xor=['duplo'], + ), + iniwarp=dict(argstr='-iniwarp %s', + xor=['duplo'], + ), + iwarp=dict(argstr='-iwarp', + xor=['plusminus'], + ), + lpa=dict(argstr='-lpa', + xor=['nmi', 'mi', 'lpc', 'hel', 'pear'], + ), + lpc=dict(argstr='-lpc', + position=-2, + xor=['nmi', 'mi', 'hel', 'lpa', 'pear'], + ), + maxlev=dict(argstr='-maxlev %d', + position=-1, + xor=['duplo'], + ), + mi=dict(argstr='-mi', + xor=['mi', 'hel', 'lpc', 'lpa', 'pear'], + ), + minpatch=dict(argstr='-minpatch %d', + ), + nmi=dict(argstr='-nmi', + xor=['nmi', 'hel', 'lpc', 'lpa', 'pear'], + ), + noXdis=dict(argstr='-noXdis', + ), + noYdis=dict(argstr='-noYdis', + ), + noZdis=dict(argstr='-noZdis', + ), + noneg=dict(argstr='-noneg', + ), + nopad=dict(argstr='-nopad', + ), + nopadWARP=dict(argstr='-nopadWARP', + xor=['allsave', 'expad'], + ), + nopenalty=dict(argstr='-nopenalty', + ), + nowarp=dict(argstr='-nowarp', + ), + noweight=dict(argstr='-noweight', + ), + out_file=dict(argstr='-prefix %s', + genfile=True, + name_source=['in_file'], + name_template='%s_QW', + ), + out_weight_file=dict(argstr='-wtprefix %s', + ), + outputtype=dict(), + overwrite=dict(argstr='-overwrite', + ), + pblur=dict(argstr='-pblur %s', + ), + pear=dict(argstr='-pear', + ), + penfac=dict(argstr='-penfac %f', + ), + plusminus=dict(argstr='-plusminus', + xor=['duplo', 'allsave', 'iwarp'], + ), + quiet=dict(argstr='-quiet', + xor=['verb'], + ), + resample=dict(argstr='-resample', + ), + terminal_output=dict(nohash=True, + ), + verb=dict(argstr='-verb', + xor=['quiet'], + ), + wball=dict(argstr='-wball %s', + ), + weight=dict(argstr='-weight %s', + ), + wmask=dict(argstr='-wpass %s %f', + ), + workhard=dict(argstr='-workhard', + xor=['boxopt', 'ballopt'], + ), + ) + inputs = Qwarp.input_spec() + + for key, metadata in list(input_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(inputs.traits()[key], metakey) == value + + +def test_Qwarp_outputs(): + output_map = dict(base_warp=dict(), + source_warp=dict(), + warped_base=dict(), + warped_source=dict(), + weights=dict(), + ) + outputs = Qwarp.output_spec() + + for key, metadata in list(output_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(outputs.traits()[key], metakey) == value diff --git a/nipype/interfaces/afni/tests/test_auto_Remlfit.py b/nipype/interfaces/afni/tests/test_auto_Remlfit.py index 8e216aa01d..a061a01449 100644 --- a/nipype/interfaces/afni/tests/test_auto_Remlfit.py +++ b/nipype/interfaces/afni/tests/test_auto_Remlfit.py @@ -8,7 +8,6 @@ def test_Remlfit_inputs(): ), addbase=dict(argstr='-addbase %s', copyfile=False, - exists=True, sep=' ', ), args=dict(argstr='%s', diff --git a/nipype/interfaces/afni/tests/test_auto_Zcat.py b/nipype/interfaces/afni/tests/test_auto_Zcat.py new file mode 100644 index 0000000000..48f742df5e --- /dev/null +++ b/nipype/interfaces/afni/tests/test_auto_Zcat.py @@ -0,0 +1,51 @@ +# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT +from __future__ import unicode_literals +from ..utils import Zcat + + +def test_Zcat_inputs(): + input_map = dict(args=dict(argstr='%s', + ), + datum=dict(argstr='-datum %s', + ), + environ=dict(nohash=True, + usedefault=True, + ), + fscale=dict(argstr='-fscale', + xor=['nscale'], + ), + ignore_exception=dict(nohash=True, + usedefault=True, + ), + in_files=dict(argstr='%s', + copyfile=False, + mandatory=True, + position=-1, + ), + nscale=dict(argstr='-nscale', + xor=['fscale'], + ), + out_file=dict(argstr='-prefix %s', + name_template='zcat', + ), + outputtype=dict(), + terminal_output=dict(nohash=True, + ), + verb=dict(argstr='-verb', + ), + ) + inputs = Zcat.input_spec() + + for key, metadata in list(input_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(inputs.traits()[key], metakey) == value + + +def test_Zcat_outputs(): + output_map = dict(out_file=dict(), + ) + outputs = Zcat.output_spec() + + for key, metadata in list(output_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(outputs.traits()[key], metakey) == value diff --git a/nipype/interfaces/afni/tests/test_auto_Zeropad.py b/nipype/interfaces/afni/tests/test_auto_Zeropad.py new file mode 100644 index 0000000000..551498e1ab --- /dev/null +++ b/nipype/interfaces/afni/tests/test_auto_Zeropad.py @@ -0,0 +1,77 @@ +# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT +from __future__ import unicode_literals +from ..utils import Zeropad + + +def test_Zeropad_inputs(): + input_map = dict(A=dict(argstr='-A %i', + xor=['master'], + ), + AP=dict(argstr='-AP %i', + xor=['master'], + ), + I=dict(argstr='-I %i', + xor=['master'], + ), + IS=dict(argstr='-IS %i', + xor=['master'], + ), + L=dict(argstr='-L %i', + xor=['master'], + ), + P=dict(argstr='-P %i', + xor=['master'], + ), + R=dict(argstr='-R %i', + xor=['master'], + ), + RL=dict(argstr='-RL %i', + xor=['master'], + ), + S=dict(argstr='-S %i', + xor=['master'], + ), + args=dict(argstr='%s', + ), + environ=dict(nohash=True, + usedefault=True, + ), + ignore_exception=dict(nohash=True, + usedefault=True, + ), + in_files=dict(argstr='%s', + copyfile=False, + mandatory=True, + position=-1, + ), + master=dict(argstr='-master %s', + xor=['I', 'S', 'A', 'P', 'L', 'R', 'z', 'RL', 'AP', 'IS', 'mm'], + ), + mm=dict(argstr='-mm', + xor=['master'], + ), + out_file=dict(argstr='-prefix %s', + name_template='zeropad', + ), + outputtype=dict(), + terminal_output=dict(nohash=True, + ), + z=dict(argstr='-z %i', + xor=['master'], + ), + ) + inputs = Zeropad.input_spec() + + for key, metadata in list(input_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(inputs.traits()[key], metakey) == value + + +def test_Zeropad_outputs(): + output_map = dict(out_file=dict(), + ) + outputs = Zeropad.output_spec() + + for key, metadata in list(output_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(outputs.traits()[key], metakey) == value diff --git a/nipype/interfaces/afni/utils.py b/nipype/interfaces/afni/utils.py index 3f663b8e77..c7a9382578 100644 --- a/nipype/interfaces/afni/utils.py +++ b/nipype/interfaces/afni/utils.py @@ -371,7 +371,7 @@ class CatInputSpec(AFNICommandInputSpec): desc='Keep only columns that are marked as \'free\' in the ' '3dAllineate header from \'-1Dparam_save\'. ' 'If there is no such header, all columns are kept.', - argst='-nonfixed') + argstr='-nonfixed') out_format = traits.Enum( 'int','nice','double','fint','cint', argstr='-form %s', diff --git a/nipype/interfaces/ants/tests/test_auto_KellyKapowski.py b/nipype/interfaces/ants/tests/test_auto_KellyKapowski.py new file mode 100644 index 0000000000..046d31d158 --- /dev/null +++ b/nipype/interfaces/ants/tests/test_auto_KellyKapowski.py @@ -0,0 +1,82 @@ +# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT +from __future__ import unicode_literals +from ..segmentation import KellyKapowski + + +def test_KellyKapowski_inputs(): + input_map = dict(args=dict(argstr='%s', + ), + convergence=dict(argstr='--convergence "%s"', + usedefault=True, + ), + cortical_thickness=dict(argstr='--output "%s"', + hash_files=False, + keep_extension=True, + name_source=['segmentation_image'], + name_template='%s_cortical_thickness', + ), + dimension=dict(argstr='--image-dimensionality %d', + usedefault=True, + ), + environ=dict(nohash=True, + usedefault=True, + ), + gradient_step=dict(argstr='--gradient-step %f', + usedefault=True, + ), + gray_matter_label=dict(usedefault=True, + ), + gray_matter_prob_image=dict(argstr='--gray-matter-probability-image "%s"', + ), + ignore_exception=dict(nohash=True, + usedefault=True, + ), + max_invert_displacement_field_iters=dict(argstr='--maximum-number-of-invert-displacement-field-iterations %d', + ), + num_threads=dict(nohash=True, + usedefault=True, + ), + number_integration_points=dict(argstr='--number-of-integration-points %d', + ), + segmentation_image=dict(argstr='--segmentation-image "%s"', + mandatory=True, + ), + smoothing_variance=dict(argstr='--smoothing-variance %f', + ), + smoothing_velocity_field=dict(argstr='--smoothing-velocity-field-parameter %f', + ), + terminal_output=dict(nohash=True, + ), + thickness_prior_estimate=dict(argstr='--thickness-prior-estimate %f', + usedefault=True, + ), + thickness_prior_image=dict(argstr='--thickness-prior-image "%s"', + ), + use_bspline_smoothing=dict(argstr='--use-bspline-smoothing 1', + ), + warped_white_matter=dict(hash_files=False, + keep_extension=True, + name_source=['segmentation_image'], + name_template='%s_warped_white_matter', + ), + white_matter_label=dict(usedefault=True, + ), + white_matter_prob_image=dict(argstr='--white-matter-probability-image "%s"', + ), + ) + inputs = KellyKapowski.input_spec() + + for key, metadata in list(input_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(inputs.traits()[key], metakey) == value + + +def test_KellyKapowski_outputs(): + output_map = dict(cortical_thickness=dict(), + warped_white_matter=dict(), + ) + outputs = KellyKapowski.output_spec() + + for key, metadata in list(output_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(outputs.traits()[key], metakey) == value diff --git a/nipype/interfaces/fsl/tests/test_auto_AccuracyTester.py b/nipype/interfaces/fsl/tests/test_auto_AccuracyTester.py new file mode 100644 index 0000000000..1e4fb9406c --- /dev/null +++ b/nipype/interfaces/fsl/tests/test_auto_AccuracyTester.py @@ -0,0 +1,47 @@ +# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT +from __future__ import unicode_literals +from ..fix import AccuracyTester + + +def test_AccuracyTester_inputs(): + input_map = dict(args=dict(argstr='%s', + ), + environ=dict(nohash=True, + usedefault=True, + ), + ignore_exception=dict(nohash=True, + usedefault=True, + ), + mel_icas=dict(argstr='%s', + copyfile=False, + mandatory=True, + position=3, + ), + output_directory=dict(argstr='%s', + mandatory=True, + position=2, + ), + terminal_output=dict(nohash=True, + ), + trained_wts_file=dict(argstr='%s', + mandatory=True, + position=1, + ), + ) + inputs = AccuracyTester.input_spec() + + for key, metadata in list(input_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(inputs.traits()[key], metakey) == value + + +def test_AccuracyTester_outputs(): + output_map = dict(output_directory=dict(argstr='%s', + position=1, + ), + ) + outputs = AccuracyTester.output_spec() + + for key, metadata in list(output_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(outputs.traits()[key], metakey) == value diff --git a/nipype/interfaces/fsl/tests/test_auto_Classifier.py b/nipype/interfaces/fsl/tests/test_auto_Classifier.py new file mode 100644 index 0000000000..713666b754 --- /dev/null +++ b/nipype/interfaces/fsl/tests/test_auto_Classifier.py @@ -0,0 +1,46 @@ +# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT +from __future__ import unicode_literals +from ..fix import Classifier + + +def test_Classifier_inputs(): + input_map = dict(args=dict(argstr='%s', + ), + artifacts_list_file=dict(), + environ=dict(nohash=True, + usedefault=True, + ), + ignore_exception=dict(nohash=True, + usedefault=True, + ), + mel_ica=dict(argstr='%s', + copyfile=False, + position=1, + ), + terminal_output=dict(nohash=True, + ), + thresh=dict(argstr='%d', + mandatory=True, + position=-1, + ), + trained_wts_file=dict(argstr='%s', + copyfile=False, + mandatory=True, + position=2, + ), + ) + inputs = Classifier.input_spec() + + for key, metadata in list(input_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(inputs.traits()[key], metakey) == value + + +def test_Classifier_outputs(): + output_map = dict(artifacts_list_file=dict(), + ) + outputs = Classifier.output_spec() + + for key, metadata in list(output_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(outputs.traits()[key], metakey) == value diff --git a/nipype/interfaces/fsl/tests/test_auto_Cleaner.py b/nipype/interfaces/fsl/tests/test_auto_Cleaner.py new file mode 100644 index 0000000000..76487d6adc --- /dev/null +++ b/nipype/interfaces/fsl/tests/test_auto_Cleaner.py @@ -0,0 +1,55 @@ +# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT +from __future__ import unicode_literals +from ..fix import Cleaner + + +def test_Cleaner_inputs(): + input_map = dict(aggressive=dict(argstr='-A', + position=3, + ), + args=dict(argstr='%s', + ), + artifacts_list_file=dict(argstr='%s', + mandatory=True, + position=1, + ), + cleanup_motion=dict(argstr='-m', + position=2, + ), + confound_file=dict(argstr='-x %s', + position=4, + ), + confound_file_1=dict(argstr='-x %s', + position=5, + ), + confound_file_2=dict(argstr='-x %s', + position=6, + ), + environ=dict(nohash=True, + usedefault=True, + ), + highpass=dict(argstr='-m -h %f', + position=2, + usedefault=True, + ), + ignore_exception=dict(nohash=True, + usedefault=True, + ), + terminal_output=dict(nohash=True, + ), + ) + inputs = Cleaner.input_spec() + + for key, metadata in list(input_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(inputs.traits()[key], metakey) == value + + +def test_Cleaner_outputs(): + output_map = dict(cleaned_functional_file=dict(), + ) + outputs = Cleaner.output_spec() + + for key, metadata in list(output_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(outputs.traits()[key], metakey) == value diff --git a/nipype/interfaces/fsl/tests/test_auto_FeatureExtractor.py b/nipype/interfaces/fsl/tests/test_auto_FeatureExtractor.py new file mode 100644 index 0000000000..c0e763640c --- /dev/null +++ b/nipype/interfaces/fsl/tests/test_auto_FeatureExtractor.py @@ -0,0 +1,39 @@ +# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT +from __future__ import unicode_literals +from ..fix import FeatureExtractor + + +def test_FeatureExtractor_inputs(): + input_map = dict(args=dict(argstr='%s', + ), + environ=dict(nohash=True, + usedefault=True, + ), + ignore_exception=dict(nohash=True, + usedefault=True, + ), + mel_ica=dict(argstr='%s', + copyfile=False, + position=-1, + ), + terminal_output=dict(nohash=True, + ), + ) + inputs = FeatureExtractor.input_spec() + + for key, metadata in list(input_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(inputs.traits()[key], metakey) == value + + +def test_FeatureExtractor_outputs(): + output_map = dict(mel_ica=dict(argstr='%s', + copyfile=False, + position=-1, + ), + ) + outputs = FeatureExtractor.output_spec() + + for key, metadata in list(output_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(outputs.traits()[key], metakey) == value diff --git a/nipype/interfaces/fsl/tests/test_auto_TOPUP.py b/nipype/interfaces/fsl/tests/test_auto_TOPUP.py index 88f11a77d5..8223b5dac4 100644 --- a/nipype/interfaces/fsl/tests/test_auto_TOPUP.py +++ b/nipype/interfaces/fsl/tests/test_auto_TOPUP.py @@ -110,6 +110,7 @@ def test_TOPUP_outputs(): out_fieldcoef=dict(), out_jacs=dict(), out_logfile=dict(), + out_mats=dict(), out_movpar=dict(), out_warps=dict(), ) diff --git a/nipype/interfaces/fsl/tests/test_auto_Training.py b/nipype/interfaces/fsl/tests/test_auto_Training.py new file mode 100644 index 0000000000..c5b1f12874 --- /dev/null +++ b/nipype/interfaces/fsl/tests/test_auto_Training.py @@ -0,0 +1,42 @@ +# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT +from __future__ import unicode_literals +from ..fix import Training + + +def test_Training_inputs(): + input_map = dict(args=dict(argstr='%s', + ), + environ=dict(nohash=True, + usedefault=True, + ), + ignore_exception=dict(nohash=True, + usedefault=True, + ), + loo=dict(argstr='-l', + position=2, + ), + mel_icas=dict(argstr='%s', + copyfile=False, + position=-1, + ), + terminal_output=dict(nohash=True, + ), + trained_wts_filestem=dict(argstr='%s', + position=1, + ), + ) + inputs = Training.input_spec() + + for key, metadata in list(input_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(inputs.traits()[key], metakey) == value + + +def test_Training_outputs(): + output_map = dict(trained_wts_file=dict(), + ) + outputs = Training.output_spec() + + for key, metadata in list(output_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(outputs.traits()[key], metakey) == value diff --git a/nipype/interfaces/fsl/tests/test_auto_TrainingSetCreator.py b/nipype/interfaces/fsl/tests/test_auto_TrainingSetCreator.py new file mode 100644 index 0000000000..abe2237832 --- /dev/null +++ b/nipype/interfaces/fsl/tests/test_auto_TrainingSetCreator.py @@ -0,0 +1,32 @@ +# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT +from __future__ import unicode_literals +from ..fix import TrainingSetCreator + + +def test_TrainingSetCreator_inputs(): + input_map = dict(ignore_exception=dict(nohash=True, + usedefault=True, + ), + mel_icas_in=dict(argstr='%s', + copyfile=False, + position=-1, + ), + ) + inputs = TrainingSetCreator.input_spec() + + for key, metadata in list(input_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(inputs.traits()[key], metakey) == value + + +def test_TrainingSetCreator_outputs(): + output_map = dict(mel_icas_out=dict(argstr='%s', + copyfile=False, + position=-1, + ), + ) + outputs = TrainingSetCreator.output_spec() + + for key, metadata in list(output_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(outputs.traits()[key], metakey) == value From 85751f055600d86633dec6a3efed2811b78bafd4 Mon Sep 17 00:00:00 2001 From: mathiasg Date: Wed, 19 Jul 2017 11:04:36 -0400 Subject: [PATCH 096/643] fix: ensure hash-check for all steps --- nipype/workflows/dmri/fsl/artifacts.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/nipype/workflows/dmri/fsl/artifacts.py b/nipype/workflows/dmri/fsl/artifacts.py index cad1e43563..30c6776303 100644 --- a/nipype/workflows/dmri/fsl/artifacts.py +++ b/nipype/workflows/dmri/fsl/artifacts.py @@ -232,7 +232,7 @@ def all_fsl_pipeline(name='fsl_all_correct', outputnode = pe.Node(niu.IdentityInterface( fields=['out_file', 'out_mask', 'out_bvec']), name='outputnode') - def _gen_index(in_file): + def gen_index(in_file): import numpy as np import nibabel as nb import os @@ -242,6 +242,9 @@ def _gen_index(in_file): np.savetxt(out_file, np.ones((vols,)).T) return out_file + gen_idx = pe.Node(niu.Function( + input_names=['in_file'], output_names=['out_file'], + function=gen_index), name='gen_index') avg_b0_0 = pe.Node(niu.Function( input_names=['in_dwi', 'in_bval'], output_names=['out_file'], function=b0_average), name='b0_avg_pre') @@ -272,10 +275,11 @@ def _gen_index(in_file): ('topup.out_fieldcoef', 'in_topup_fieldcoef'), ('topup.out_movpar', 'in_topup_movpar')]), (bet_dwi0, ecc, [('mask_file', 'in_mask')]), + (inputnode, gen_idx, ['in_file', 'in_file']), (inputnode, ecc, [('in_file', 'in_file'), - (('in_file', _gen_index), 'in_index'), ('in_bval', 'in_bval'), ('in_bvec', 'in_bvec')]), + (gen_idx, ecc, ['out_file', 'in_index']), (inputnode, rot_bvec, [('in_bvec', 'in_bvec')]), (ecc, rot_bvec, [('out_parameter', 'eddy_params')]), (ecc, avg_b0_1, [('out_corrected', 'in_dwi')]), From e96d555c24693292e6314778b2b23cd34e263356 Mon Sep 17 00:00:00 2001 From: mathiasg Date: Wed, 19 Jul 2017 11:09:17 -0400 Subject: [PATCH 097/643] removed separate change --- nipype/utils/misc.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nipype/utils/misc.py b/nipype/utils/misc.py index 3b08b49e0f..552e24c435 100644 --- a/nipype/utils/misc.py +++ b/nipype/utils/misc.py @@ -3,7 +3,7 @@ # vi: set ft=python sts=4 ts=4 sw=4 et: """Miscellaneous utility functions """ -from __future__ import division, unicode_literals, absolute_import +from __future__ import print_function, division, unicode_literals, absolute_import from future import standard_library standard_library.install_aliases() from builtins import next, str @@ -91,6 +91,7 @@ def create_function_from_source(function_source, imports=None): exec(statement, ns) import_keys = list(ns.keys()) exec(function_source, ns) + except Exception as e: msg = '\nError executing function:\n %s\n' % function_source msg += '\n'.join(["Functions in connection strings have to be standalone.", From 7a6e21aab67ccb9e5c093f0e3cc5246db7ef778f Mon Sep 17 00:00:00 2001 From: mathiasg Date: Wed, 19 Jul 2017 11:11:12 -0400 Subject: [PATCH 098/643] fix: missing parentheses --- nipype/workflows/dmri/fsl/artifacts.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nipype/workflows/dmri/fsl/artifacts.py b/nipype/workflows/dmri/fsl/artifacts.py index 30c6776303..c74cbc18b4 100644 --- a/nipype/workflows/dmri/fsl/artifacts.py +++ b/nipype/workflows/dmri/fsl/artifacts.py @@ -275,11 +275,11 @@ def gen_index(in_file): ('topup.out_fieldcoef', 'in_topup_fieldcoef'), ('topup.out_movpar', 'in_topup_movpar')]), (bet_dwi0, ecc, [('mask_file', 'in_mask')]), - (inputnode, gen_idx, ['in_file', 'in_file']), + (inputnode, gen_idx, [('in_file', 'in_file')]), (inputnode, ecc, [('in_file', 'in_file'), ('in_bval', 'in_bval'), ('in_bvec', 'in_bvec')]), - (gen_idx, ecc, ['out_file', 'in_index']), + (gen_idx, ecc, [('out_file', 'in_index')]), (inputnode, rot_bvec, [('in_bvec', 'in_bvec')]), (ecc, rot_bvec, [('out_parameter', 'eddy_params')]), (ecc, avg_b0_1, [('out_corrected', 'in_dwi')]), From bb9665268dbbdda652b7e9f5803795c362979328 Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Wed, 19 Jul 2017 14:12:42 -0400 Subject: [PATCH 099/643] ENH: Allow CompCor to skip initial volumes --- nipype/algorithms/confounds.py | 17 +++++++++++++++++ nipype/algorithms/tests/test_auto_ACompCor.py | 2 ++ nipype/algorithms/tests/test_auto_TCompCor.py | 2 ++ 3 files changed, 21 insertions(+) diff --git a/nipype/algorithms/confounds.py b/nipype/algorithms/confounds.py index 2e7fc2af9a..7622c44f7f 100644 --- a/nipype/algorithms/confounds.py +++ b/nipype/algorithms/confounds.py @@ -345,6 +345,9 @@ class CompCorInputSpec(BaseInterfaceInputSpec): 'unspecified') save_pre_filter = traits.Either( traits.Bool, File, desc='Save pre-filter basis as text file') + ignore_initial_volumes = traits.Range( + low=0, usedefault=True, + desc='Number of volumes at start of series to ignore') class CompCorOutputSpec(TraitedSpec): @@ -417,6 +420,12 @@ def _run_interface(self, runtime): header=imgseries.header) mask_images = [img] + nvols = self.inputs.ignore_initial_volumes + if nvols: + imgseries = imgseries.__class__( + img.series.get_data()[..., nvols:], imgseries.affine, + imgseries.header) + mask_images = self._process_masks(mask_images, imgseries.get_data()) TR = 0 @@ -451,6 +460,14 @@ def _run_interface(self, runtime): 'cosine': 'cos'}[self.inputs.pre_filter] ncols = filter_basis.shape[1] if filter_basis.size > 0 else 0 header = ['{}{:02d}'.format(ftype, i) for i in range(ncols)] + if nvols: + nrows = filter_basis.shape[0] if filter_basis.size > 0 else 0 + old_basis = filter_basis + filter_basis = np.zeros((nrows + nvols, ncols + 1), + dtype=filter_basis.dtype) + filter_basis[nvols:, :-1] = old_basis + filter_basis[:nvols, -1] = 1 + header.append('SteadyState') np.savetxt(pre_filter_file, filter_basis, fmt=b'%.10f', delimiter='\t', header='\t'.join(header), comments='') diff --git a/nipype/algorithms/tests/test_auto_ACompCor.py b/nipype/algorithms/tests/test_auto_ACompCor.py index f0679bafc9..5c44844cf9 100644 --- a/nipype/algorithms/tests/test_auto_ACompCor.py +++ b/nipype/algorithms/tests/test_auto_ACompCor.py @@ -12,6 +12,8 @@ def test_ACompCor_inputs(): ignore_exception=dict(nohash=True, usedefault=True, ), + ignore_initial_volumes=dict(usedefault=True, + ), mask_files=dict(), mask_index=dict(requires=['mask_files'], xor=['merge_method'], diff --git a/nipype/algorithms/tests/test_auto_TCompCor.py b/nipype/algorithms/tests/test_auto_TCompCor.py index 0b426f826a..b39c946d9d 100644 --- a/nipype/algorithms/tests/test_auto_TCompCor.py +++ b/nipype/algorithms/tests/test_auto_TCompCor.py @@ -12,6 +12,8 @@ def test_TCompCor_inputs(): ignore_exception=dict(nohash=True, usedefault=True, ), + ignore_initial_volumes=dict(usedefault=True, + ), mask_files=dict(), mask_index=dict(requires=['mask_files'], xor=['merge_method'], From 4ce600ef7ad684438690e0e7468e0eee3868100c Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Wed, 19 Jul 2017 14:47:46 -0400 Subject: [PATCH 100/643] ENH: Prepend zeros to components as well --- nipype/algorithms/confounds.py | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/nipype/algorithms/confounds.py b/nipype/algorithms/confounds.py index 7622c44f7f..914f3505d5 100644 --- a/nipype/algorithms/confounds.py +++ b/nipype/algorithms/confounds.py @@ -450,6 +450,16 @@ def _run_interface(self, runtime): imgseries.get_data(), mask_images, self.inputs.num_components, self.inputs.pre_filter, degree, self.inputs.high_pass_cutoff, TR) + if nvols: + old_comp, old_basis = components, filter_basis + nrows = nvols + components.shape[0] + components = np.zeros((nrows, components.shape[1]), + dtype=components.dtype) + components[nvols:] = old_comp + filter_basis = np.zeros((nrows, filter_basis.shape[1]), + dtype=filter_basis.dtype) + filter_basis[nvols:] = old_basis + components_file = os.path.join(os.getcwd(), self.inputs.components_file) np.savetxt(components_file, components, fmt=b"%.10f", delimiter='\t', header=self._make_headers(components.shape[1]), comments='') @@ -461,12 +471,10 @@ def _run_interface(self, runtime): ncols = filter_basis.shape[1] if filter_basis.size > 0 else 0 header = ['{}{:02d}'.format(ftype, i) for i in range(ncols)] if nvols: - nrows = filter_basis.shape[0] if filter_basis.size > 0 else 0 - old_basis = filter_basis - filter_basis = np.zeros((nrows + nvols, ncols + 1), - dtype=filter_basis.dtype) - filter_basis[nvols:, :-1] = old_basis - filter_basis[:nvols, -1] = 1 + ss_col = np.zeros((components.shape[0], 1), + dtype=filter_basis.dtype) + ss_col[:nvols] = 1 + filter_basis = np.hstack((filter_basis, ss_col)) header.append('SteadyState') np.savetxt(pre_filter_file, filter_basis, fmt=b'%.10f', delimiter='\t', header='\t'.join(header), comments='') From ccbce0f6ccb84393885b5a0d3b6689ed1fb6aaf6 Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Wed, 19 Jul 2017 15:29:53 -0400 Subject: [PATCH 101/643] FIX: One column per skipped volume --- nipype/algorithms/confounds.py | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/nipype/algorithms/confounds.py b/nipype/algorithms/confounds.py index 914f3505d5..aeaf590887 100644 --- a/nipype/algorithms/confounds.py +++ b/nipype/algorithms/confounds.py @@ -420,10 +420,10 @@ def _run_interface(self, runtime): header=imgseries.header) mask_images = [img] - nvols = self.inputs.ignore_initial_volumes - if nvols: + skip_vols = self.inputs.ignore_initial_volumes + if skip_vols: imgseries = imgseries.__class__( - img.series.get_data()[..., nvols:], imgseries.affine, + img.series.get_data()[..., skip_vols:], imgseries.affine, imgseries.header) mask_images = self._process_masks(mask_images, imgseries.get_data()) @@ -450,15 +450,15 @@ def _run_interface(self, runtime): imgseries.get_data(), mask_images, self.inputs.num_components, self.inputs.pre_filter, degree, self.inputs.high_pass_cutoff, TR) - if nvols: + if skip_vols: old_comp, old_basis = components, filter_basis - nrows = nvols + components.shape[0] + nrows = skip_vols + components.shape[0] components = np.zeros((nrows, components.shape[1]), dtype=components.dtype) - components[nvols:] = old_comp + components[skip_vols:] = old_comp filter_basis = np.zeros((nrows, filter_basis.shape[1]), dtype=filter_basis.dtype) - filter_basis[nvols:] = old_basis + filter_basis[skip_vols:] = old_basis components_file = os.path.join(os.getcwd(), self.inputs.components_file) np.savetxt(components_file, components, fmt=b"%.10f", delimiter='\t', @@ -470,12 +470,12 @@ def _run_interface(self, runtime): 'cosine': 'cos'}[self.inputs.pre_filter] ncols = filter_basis.shape[1] if filter_basis.size > 0 else 0 header = ['{}{:02d}'.format(ftype, i) for i in range(ncols)] - if nvols: - ss_col = np.zeros((components.shape[0], 1), - dtype=filter_basis.dtype) - ss_col[:nvols] = 1 - filter_basis = np.hstack((filter_basis, ss_col)) - header.append('SteadyState') + if skip_vols: + ss_cols = np.eye(components.shape[0], skip_vols, + dtype=filter_basis.dtype) + filter_basis = np.hstack((filter_basis, ss_cols)) + header.extend(['SteadyState{:02d}'.format(i) + for i in range(skip_vols)]) np.savetxt(pre_filter_file, filter_basis, fmt=b'%.10f', delimiter='\t', header='\t'.join(header), comments='') From 0388485175c4c2a4df259cbe7e09c9f0552ab0a6 Mon Sep 17 00:00:00 2001 From: Dorota Jarecka Date: Mon, 24 Jul 2017 10:21:52 -0400 Subject: [PATCH 102/643] adding the missing coma in fnirt --- nipype/interfaces/fsl/preprocess.py | 2 +- nipype/interfaces/fsl/tests/test_preprocess.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/nipype/interfaces/fsl/preprocess.py b/nipype/interfaces/fsl/preprocess.py index bf9f169145..b96c0b6acd 100644 --- a/nipype/interfaces/fsl/preprocess.py +++ b/nipype/interfaces/fsl/preprocess.py @@ -877,7 +877,7 @@ class FNIRTInputSpec(FSLCommandInputSpec): desc=('If true, ref image is used to calculate derivatives. ' 'Default false')) intensity_mapping_model = traits.Enum( - 'none', 'global_linear', 'global_non_linear' + 'none', 'global_linear', 'global_non_linear', 'local_linear', 'global_non_linear_with_bias', 'local_non_linear', argstr='--intmod=%s', desc='Model for intensity-mapping') diff --git a/nipype/interfaces/fsl/tests/test_preprocess.py b/nipype/interfaces/fsl/tests/test_preprocess.py index a4c8f2640f..7d3d6a9dce 100644 --- a/nipype/interfaces/fsl/tests/test_preprocess.py +++ b/nipype/interfaces/fsl/tests/test_preprocess.py @@ -393,7 +393,8 @@ def test_fnirt(setup_flirt): ('in_fwhm', '--infwhm', [4, 2, 2, 0], '4,2,2,0'), ('apply_refmask', '--applyrefmask', [0, 0, 1, 1], '0,0,1,1'), ('apply_inmask', '--applyinmask', [0, 0, 0, 1], '0,0,0,1'), - ('regularization_lambda', '--lambda', [0.5, 0.75], '0.5,0.75')] + ('regularization_lambda', '--lambda', [0.5, 0.75], '0.5,0.75'), + ('intensity_mapping_model', '--intmod', 'global_non_linear', 'global_non_linear')] for item, flag, val, strval in params: fnirt = fsl.FNIRT(in_file=infile, ref_file=reffile, @@ -406,7 +407,7 @@ def test_fnirt(setup_flirt): ' %s=%s --ref=%s'\ ' --iout=%s' % (infile, log, flag, strval, reffile, iout) - elif item in ('in_fwhm'): + elif item in ('in_fwhm', 'intensity_mapping_model'): cmd = 'fnirt --in=%s %s=%s --logout=%s '\ '--ref=%s --iout=%s' % (infile, flag, strval, log, reffile, iout) From 44da4d8ca5656c2f55743abb6e434c0d9d8e0d03 Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Mon, 24 Jul 2017 11:41:44 -0400 Subject: [PATCH 103/643] RF: Rename ICA_AROMA.py -> aroma.py --- nipype/interfaces/fsl/__init__.py | 2 +- nipype/interfaces/fsl/{ICA_AROMA.py => aroma.py} | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename nipype/interfaces/fsl/{ICA_AROMA.py => aroma.py} (99%) diff --git a/nipype/interfaces/fsl/__init__.py b/nipype/interfaces/fsl/__init__.py index db2d3b6556..c01f65fb04 100644 --- a/nipype/interfaces/fsl/__init__.py +++ b/nipype/interfaces/fsl/__init__.py @@ -33,4 +33,4 @@ from .possum import B0Calc from .fix import (AccuracyTester, Classifier, Cleaner, FeatureExtractor, Training, TrainingSetCreator) -from .ICA_AROMA import ICA_AROMA +from .aroma import ICA_AROMA diff --git a/nipype/interfaces/fsl/ICA_AROMA.py b/nipype/interfaces/fsl/aroma.py similarity index 99% rename from nipype/interfaces/fsl/ICA_AROMA.py rename to nipype/interfaces/fsl/aroma.py index a2a341b1ff..02df37d9a2 100644 --- a/nipype/interfaces/fsl/ICA_AROMA.py +++ b/nipype/interfaces/fsl/aroma.py @@ -87,7 +87,7 @@ class ICA_AROMA(CommandLine): >>> from nipype.interfaces.fsl import ICA_AROMA >>> from nipype.testing import example_data - >>> AROMA_obj = ICA_AROMA.ICA_AROMA() + >>> AROMA_obj = ICA_AROMA() >>> AROMA_obj.inputs.in_file = 'functional.nii' >>> AROMA_obj.inputs.mat_file = 'func_to_struct.mat' >>> AROMA_obj.inputs.fnirt_warp_file = 'warpfield.nii' From 67ef9217b6b37c6227b81d09f51321c393a3a19f Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Mon, 24 Jul 2017 11:42:42 -0400 Subject: [PATCH 104/643] make specs --- nipype/interfaces/fsl/tests/test_auto_ICA_AROMA.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nipype/interfaces/fsl/tests/test_auto_ICA_AROMA.py b/nipype/interfaces/fsl/tests/test_auto_ICA_AROMA.py index 0e28417b05..9102d667b3 100644 --- a/nipype/interfaces/fsl/tests/test_auto_ICA_AROMA.py +++ b/nipype/interfaces/fsl/tests/test_auto_ICA_AROMA.py @@ -1,6 +1,6 @@ # AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT from __future__ import unicode_literals -from ..ICA_AROMA import ICA_AROMA +from ..aroma import ICA_AROMA def test_ICA_AROMA_inputs(): From 1a14a1336571f997a39f45be319d9cc024bc51f3 Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Tue, 25 Jul 2017 12:59:16 -0400 Subject: [PATCH 105/643] DOC: Update CompCor docs to explain new filters --- nipype/algorithms/confounds.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/nipype/algorithms/confounds.py b/nipype/algorithms/confounds.py index aeaf590887..932eb57cf9 100644 --- a/nipype/algorithms/confounds.py +++ b/nipype/algorithms/confounds.py @@ -360,6 +360,26 @@ class CompCor(BaseInterface): """ Interface with core CompCor computation, used in aCompCor and tCompCor + CompCor provides three pre-filter options, all of which include per-voxel + mean removal: + - polynomial: Legendre polynomial basis + - cosine: Discrete cosine basis + - False: mean-removal only + + In the case of ``polynomial`` and ``cosine`` filters, a pre-filter file may + be saved with a row for each volume/timepoint, and a column for each + non-constant regressor. + If no non-constant (mean-removal) columns are used, this file may be empty. + + If ``ignore_initial_volumes`` is set, then the specified number of initial + volumes are excluded both from pre-filtering and CompCor component + extraction. + Each column in the components and pre-filter files are prefixe with zeros + for each excluded volume so that the number of rows continues to match the + number of volumes in the input file. + In addition, for each excluded volume, a column is added to the pre-filter + file with a 1 in the corresponding row. + Example ------- From a8867294ac67b9ca477e0b587fe1eec9202160bd Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Tue, 25 Jul 2017 15:35:20 -0400 Subject: [PATCH 106/643] FIX: Typo --- nipype/algorithms/confounds.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nipype/algorithms/confounds.py b/nipype/algorithms/confounds.py index 932eb57cf9..45df9c4337 100644 --- a/nipype/algorithms/confounds.py +++ b/nipype/algorithms/confounds.py @@ -443,7 +443,7 @@ def _run_interface(self, runtime): skip_vols = self.inputs.ignore_initial_volumes if skip_vols: imgseries = imgseries.__class__( - img.series.get_data()[..., skip_vols:], imgseries.affine, + imgseries.get_data()[..., skip_vols:], imgseries.affine, imgseries.header) mask_images = self._process_masks(mask_images, imgseries.get_data()) From eecdc5c84d581f1f9ecc5062b9bd589f915cf144 Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Wed, 26 Jul 2017 12:47:36 -0400 Subject: [PATCH 107/643] FIX: Do not assume githash in ANTs version --- nipype/interfaces/ants/base.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nipype/interfaces/ants/base.py b/nipype/interfaces/ants/base.py index c83b3473bc..3ab50a24f5 100644 --- a/nipype/interfaces/ants/base.py +++ b/nipype/interfaces/ants/base.py @@ -53,7 +53,8 @@ def version(self): else: return None - v_string, githash = self._version.split('-') + # -githash may or may not be appended + v_string = self._version.split('-')[0] # 2.2.0-equivalent version string if 'post' in v_string and LooseVersion(v_string) >= LooseVersion('2.1.0.post789'): From 16ec368b01dda879e61a1623fd639ad2d981e323 Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Wed, 26 Jul 2017 15:12:46 -0400 Subject: [PATCH 108/643] ENH: Handle empty filter basis correctly --- nipype/algorithms/confounds.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/nipype/algorithms/confounds.py b/nipype/algorithms/confounds.py index 45df9c4337..b7c7215188 100644 --- a/nipype/algorithms/confounds.py +++ b/nipype/algorithms/confounds.py @@ -471,14 +471,11 @@ def _run_interface(self, runtime): self.inputs.pre_filter, degree, self.inputs.high_pass_cutoff, TR) if skip_vols: - old_comp, old_basis = components, filter_basis + old_comp = components nrows = skip_vols + components.shape[0] components = np.zeros((nrows, components.shape[1]), dtype=components.dtype) components[skip_vols:] = old_comp - filter_basis = np.zeros((nrows, filter_basis.shape[1]), - dtype=filter_basis.dtype) - filter_basis[skip_vols:] = old_basis components_file = os.path.join(os.getcwd(), self.inputs.components_file) np.savetxt(components_file, components, fmt=b"%.10f", delimiter='\t', @@ -491,9 +488,12 @@ def _run_interface(self, runtime): ncols = filter_basis.shape[1] if filter_basis.size > 0 else 0 header = ['{}{:02d}'.format(ftype, i) for i in range(ncols)] if skip_vols: - ss_cols = np.eye(components.shape[0], skip_vols, - dtype=filter_basis.dtype) - filter_basis = np.hstack((filter_basis, ss_cols)) + old_basis = filter_basis + nrows = filter_basis.shape[0] if filter_basis.size > 0 else 0 + filter_basis = np.zeros((nrows + skip_vols, ncols + skip_vols), + dtype=filter_basis.dtype) + filter_basis[skip_vols:, :ncols] = old_basis + filter_basis[:skip_vols, -skip_vols:] = np.eye(skip_vols) header.extend(['SteadyState{:02d}'.format(i) for i in range(skip_vols)]) np.savetxt(pre_filter_file, filter_basis, fmt=b'%.10f', From 954f3b39769ecc5291d7b75042c927333fa6bf22 Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Wed, 26 Jul 2017 16:04:33 -0400 Subject: [PATCH 109/643] ENH: Subclass RobustTemplate from FSCommandOpenMP --- nipype/interfaces/freesurfer/longitudinal.py | 7 ++++--- .../freesurfer/tests/test_auto_RobustTemplate.py | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/nipype/interfaces/freesurfer/longitudinal.py b/nipype/interfaces/freesurfer/longitudinal.py index 4b18602ff7..9ae424e41b 100644 --- a/nipype/interfaces/freesurfer/longitudinal.py +++ b/nipype/interfaces/freesurfer/longitudinal.py @@ -18,13 +18,14 @@ from ... import logging from ..base import (TraitedSpec, File, traits, InputMultiPath, OutputMultiPath, isdefined) -from .base import FSCommand, FSTraitedSpec +from .base import (FSCommand, FSTraitedSpec, FSCommandOpenMP, + FSTraitedSpecOpenMP) __docformat__ = 'restructuredtext' iflogger = logging.getLogger('interface') -class RobustTemplateInputSpec(FSTraitedSpec): +class RobustTemplateInputSpec(FSTraitedSpecOpenMP): # required in_files = InputMultiPath(File(exists=True), mandatory=True, argstr='--mov %s', desc='input movable volumes to be aligned to common mean/median template') @@ -72,7 +73,7 @@ class RobustTemplateOutputSpec(TraitedSpec): File(exists=True), desc="output final intensity scales") -class RobustTemplate(FSCommand): +class RobustTemplate(FSCommandOpenMP): """ construct an unbiased robust template for longitudinal volumes Examples diff --git a/nipype/interfaces/freesurfer/tests/test_auto_RobustTemplate.py b/nipype/interfaces/freesurfer/tests/test_auto_RobustTemplate.py index 579e3a8007..d2b89e3235 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_RobustTemplate.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_RobustTemplate.py @@ -33,6 +33,7 @@ def test_RobustTemplate_inputs(): ), no_iteration=dict(argstr='--noit', ), + num_threads=dict(), out_file=dict(argstr='--template %s', mandatory=True, usedefault=True, From 7df150fb10425b9d1ebf45ef250ed79d3a0f80bd Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Wed, 26 Jul 2017 16:13:50 -0400 Subject: [PATCH 110/643] STY: Style cleanup --- nipype/interfaces/freesurfer/longitudinal.py | 84 ++++++++++++-------- 1 file changed, 49 insertions(+), 35 deletions(-) diff --git a/nipype/interfaces/freesurfer/longitudinal.py b/nipype/interfaces/freesurfer/longitudinal.py index 9ae424e41b..8fa5299be8 100644 --- a/nipype/interfaces/freesurfer/longitudinal.py +++ b/nipype/interfaces/freesurfer/longitudinal.py @@ -13,7 +13,6 @@ from __future__ import print_function, division, unicode_literals, absolute_import import os -#import itertools from ... import logging from ..base import (TraitedSpec, File, traits, @@ -27,42 +26,53 @@ class RobustTemplateInputSpec(FSTraitedSpecOpenMP): # required - in_files = InputMultiPath(File(exists=True), mandatory=True, argstr='--mov %s', - desc='input movable volumes to be aligned to common mean/median template') + in_files = InputMultiPath( + File(exists=True), mandatory=True, argstr='--mov %s', + desc='input movable volumes to be aligned to common mean/median ' + 'template') out_file = File('mri_robust_template_out.mgz', mandatory=True, usedefault=True, argstr='--template %s', desc='output template volume (final mean/median image)') - auto_detect_sensitivity = traits.Bool(argstr='--satit', xor=['outlier_sensitivity'], mandatory=True, - desc='auto-detect good sensitivity (recommended for head or full brain scans)') - outlier_sensitivity = traits.Float(argstr='--sat %.4f', xor=['auto_detect_sensitivity'], mandatory=True, - desc='set outlier sensitivity manually (e.g. "--sat 4.685" ). Higher values mean ' + - 'less sensitivity.') + auto_detect_sensitivity = traits.Bool( + argstr='--satit', xor=['outlier_sensitivity'], mandatory=True, + desc='auto-detect good sensitivity (recommended for head or full ' + 'brain scans)') + outlier_sensitivity = traits.Float( + argstr='--sat %.4f', xor=['auto_detect_sensitivity'], mandatory=True, + desc='set outlier sensitivity manually (e.g. "--sat 4.685" ). Higher ' + 'values mean less sensitivity.') # optional - transform_outputs = InputMultiPath(File(exists=False), - argstr='--lta %s', - desc='output xforms to template (for each input)') - intensity_scaling = traits.Bool(default_value=False, - argstr='--iscale', - desc='allow also intensity scaling (default off)') - scaled_intensity_outputs = InputMultiPath(File(exists=False), - argstr='--iscaleout %s', - desc='final intensity scales (will activate --iscale)') - subsample_threshold = traits.Int(argstr='--subsample %d', - desc='subsample if dim > # on all axes (default no subs.)') - average_metric = traits.Enum('median', 'mean', argstr='--average %d', - desc='construct template from: 0 Mean, 1 Median (default)') - initial_timepoint = traits.Int(argstr='--inittp %d', - desc='use TP# for spacial init (default random), 0: no init') - fixed_timepoint = traits.Bool(default_value=False, argstr='--fixtp', - desc='map everthing to init TP# (init TP is not resampled)') - no_iteration = traits.Bool(default_value=False, argstr='--noit', - desc='do not iterate, just create first template') - initial_transforms = InputMultiPath(File(exists=True), - argstr='--ixforms %s', - desc='use initial transforms (lta) on source') - in_intensity_scales = InputMultiPath(File(exists=True), - argstr='--iscalein %s', - desc='use initial intensity scales') + transform_outputs = InputMultiPath( + File(exists=False), argstr='--lta %s', + desc='output xforms to template (for each input)') + intensity_scaling = traits.Bool( + default_value=False, argstr='--iscale', + desc='allow also intensity scaling (default off)') + scaled_intensity_outputs = InputMultiPath( + File(exists=False), argstr='--iscaleout %s', + desc='final intensity scales (will activate --iscale)') + subsample_threshold = traits.Int( + argstr='--subsample %d', + desc='subsample if dim > # on all axes (default no subs.)') + average_metric = traits.Enum( + 'median', 'mean', argstr='--average %d', + desc='construct template from: 0 Mean, 1 Median (default)') + initial_timepoint = traits.Int( + argstr='--inittp %d', + desc='use TP# for spacial init (default random), 0: no init') + fixed_timepoint = traits.Bool( + default_value=False, argstr='--fixtp', + desc='map everthing to init TP# (init TP is not resampled)') + no_iteration = traits.Bool( + default_value=False, argstr='--noit', + desc='do not iterate, just create first template') + initial_transforms = InputMultiPath( + File(exists=True), argstr='--ixforms %s', + desc='use initial transforms (lta) on source') + in_intensity_scales = InputMultiPath( + File(exists=True), argstr='--iscalein %s', + desc='use initial intensity scales') + class RobustTemplateOutputSpec(TraitedSpec): out_file = File( @@ -93,8 +103,10 @@ class RobustTemplate(FSCommandOpenMP): >>> template.cmdline #doctest: +NORMALIZE_WHITESPACE +ALLOW_UNICODE 'mri_robust_template --satit --average 0 --fixtp --mov structural.nii functional.nii --inittp 1 --noit --template T1.nii --subsample 200' - >>> template.inputs.transform_outputs = ['structural.lta', 'functional.lta'] - >>> template.inputs.scaled_intensity_outputs = ['structural-iscale.txt', 'functional-iscale.txt'] + >>> template.inputs.transform_outputs = ['structural.lta', + ... 'functional.lta'] + >>> template.inputs.scaled_intensity_outputs = ['structural-iscale.txt', + ... 'functional-iscale.txt'] >>> template.cmdline #doctest: +NORMALIZE_WHITESPACE +ALLOW_UNICODE 'mri_robust_template --satit --average 0 --fixtp --mov structural.nii functional.nii --inittp 1 --noit --template T1.nii --iscaleout structural-iscale.txt functional-iscale.txt --subsample 200 --lta structural.lta functional.lta' @@ -152,9 +164,11 @@ class FuseSegmentationsInputSpec(FSTraitedSpec): must include the corresponding norm file for all given timepoints \ as well as for the current subject") + class FuseSegmentationsOutputSpec(TraitedSpec): out_file = File(exists=False, desc="output fused segmentation file") + class FuseSegmentations(FSCommand): """ fuse segmentations together from multiple timepoints From 3afea0c62952199f03f75fdb63d78e73baacf3f9 Mon Sep 17 00:00:00 2001 From: mathiasg Date: Thu, 27 Jul 2017 14:57:09 -0400 Subject: [PATCH 111/643] enh: selectdirs too --- nipype/interfaces/io.py | 22 ++++++++++++------- .../interfaces/tests/test_auto_SelectFiles.py | 2 ++ 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/nipype/interfaces/io.py b/nipype/interfaces/io.py index 18e8047e1a..5dca91bdb0 100644 --- a/nipype/interfaces/io.py +++ b/nipype/interfaces/io.py @@ -1186,17 +1186,19 @@ def _list_outputs(self): class SelectFilesInputSpec(DynamicTraitedSpec, BaseInterfaceInputSpec): base_directory = Directory(exists=True, - desc="Root path common to templates.") + desc="Root path common to templates.") sort_filelist = traits.Bool(True, usedefault=True, - desc="When matching mutliple files, return them in sorted order.") + desc="When matching mutliple files, return them in sorted order.") raise_on_empty = traits.Bool(True, usedefault=True, - desc="Raise an exception if a template pattern matches no files.") + desc="Raise an exception if a template pattern matches no files.") force_lists = traits.Either(traits.Bool(), traits.List(Str()), - default=False, usedefault=True, - desc=("Whether to return outputs as a list even when only one file " - "matches the template. Either a boolean that applies to all " - "output fields or a list of output field names to coerce to " - " a list")) + default=False, usedefault=True, + desc=("Whether to return outputs as a list even when only one file " + "matches the template. Either a boolean that applies to all " + "output fields or a list of output field names to coerce to " + " a list")) + directory_mode = traits.Bool(False, usedefault=True, + desc="Return only directories.") class SelectFiles(IOBase): @@ -1303,6 +1305,10 @@ def _list_outputs(self): else: template = op.abspath(template) + if self.inputs.directory_mode: + # return only directories + template += os.sep + # Fill in the template and glob for files filled_template = template.format(**info) filelist = glob.glob(filled_template) diff --git a/nipype/interfaces/tests/test_auto_SelectFiles.py b/nipype/interfaces/tests/test_auto_SelectFiles.py index da119bfcf6..4b7aeb0fe3 100644 --- a/nipype/interfaces/tests/test_auto_SelectFiles.py +++ b/nipype/interfaces/tests/test_auto_SelectFiles.py @@ -5,6 +5,8 @@ def test_SelectFiles_inputs(): input_map = dict(base_directory=dict(), + directory_mode=dict(usedefault=True, + ), force_lists=dict(usedefault=True, ), ignore_exception=dict(nohash=True, From 0d21a92d8853aa074f0c1442aec8692be3ae5be1 Mon Sep 17 00:00:00 2001 From: Ross Markello Date: Fri, 28 Jul 2017 17:00:33 -0400 Subject: [PATCH 112/643] [FIX]: AFNI Allineate _list_output Fixed output mapping in Allineate. Ensures suffixes are in line with AFNI standards. --- nipype/interfaces/afni/preprocess.py | 33 +++++++++++++++++++--------- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/nipype/interfaces/afni/preprocess.py b/nipype/interfaces/afni/preprocess.py index 7180953c28..6742ec4f05 100644 --- a/nipype/interfaces/afni/preprocess.py +++ b/nipype/interfaces/afni/preprocess.py @@ -291,17 +291,30 @@ def _format_arg(self, name, trait_spec, value): return super(Allineate, self)._format_arg(name, trait_spec, value) def _list_outputs(self): - outputs = self._outputs().get() - if not isdefined(self.inputs.out_file): - outputs['out_file'] = self._gen_fname(self.inputs.in_file, - suffix='_allineate.nii') - else: - outputs['out_file'] = os.path.abspath(self.inputs.out_file) + outputs = self.output_spec().get() + + if self.inputs.out_file: + outputs['out_file'] = op.abspath(self.inputs.out_file) + + if self.inputs.out_weight_file: + outputs['out_weight_file'] = op.abspath(self.inputs.out_weight_file) + + if self.inputs.out_matrix: + path, base, ext = split_filename(self.inputs.out_matrix) + if ext.lower() not in ['.1d', '.1D']: + outputs['out_matrix'] = self._gen_fname(self.inputs.out_matrix, + suffix='.aff12.1D') + else: + outputs['out_matrix'] = op.abspath(self.inputs.out_matrix) + + if self.inputs.out_param_file: + path, base, ext = split_filename(self.inputs.out_param_file) + if ext.lower() not in ['.1d', '.1D']: + outputs['out_param_file'] = self._gen_fname(self.inputs.out_param_file, + suffix='.param.1D') + else: + outputs['out_param_file'] = op.abspath(self.inputs.out_param_file) - if isdefined(self.inputs.out_matrix): - outputs['out_matrix'] = os.path.abspath(os.path.join(os.getcwd(), - self.inputs.out_matrix + - '.aff12.1D')) return outputs def _gen_filename(self, name): From d7385c8270a8125656736c6c27c702355e974960 Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Mon, 31 Jul 2017 18:20:49 -0400 Subject: [PATCH 113/643] ENH: Improve pre-filter column header names --- nipype/algorithms/confounds.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nipype/algorithms/confounds.py b/nipype/algorithms/confounds.py index b7c7215188..d382637bf0 100644 --- a/nipype/algorithms/confounds.py +++ b/nipype/algorithms/confounds.py @@ -483,8 +483,8 @@ def _run_interface(self, runtime): if self.inputs.pre_filter and self.inputs.save_pre_filter: pre_filter_file = self._list_outputs()['pre_filter_file'] - ftype = {'polynomial': 'poly', - 'cosine': 'cos'}[self.inputs.pre_filter] + ftype = {'polynomial': 'Legendre', + 'cosine': 'Cosine'}[self.inputs.pre_filter] ncols = filter_basis.shape[1] if filter_basis.size > 0 else 0 header = ['{}{:02d}'.format(ftype, i) for i in range(ncols)] if skip_vols: @@ -494,7 +494,7 @@ def _run_interface(self, runtime): dtype=filter_basis.dtype) filter_basis[skip_vols:, :ncols] = old_basis filter_basis[:skip_vols, -skip_vols:] = np.eye(skip_vols) - header.extend(['SteadyState{:02d}'.format(i) + header.extend(['NonSteadyStateOutlier{:02d}'.format(i) for i in range(skip_vols)]) np.savetxt(pre_filter_file, filter_basis, fmt=b'%.10f', delimiter='\t', header='\t'.join(header), comments='') From 9915615581c4412b79fa19eb53fa502978cfcd27 Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Tue, 1 Aug 2017 09:43:13 -0400 Subject: [PATCH 114/643] PIN: prov==1.5.0 --- nipype/info.py | 4 ++-- requirements.txt | 2 +- rtd_requirements.txt | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/nipype/info.py b/nipype/info.py index bbf2e8b157..9db9a02abd 100644 --- a/nipype/info.py +++ b/nipype/info.py @@ -105,7 +105,7 @@ def get_nipype_gitversion(): PYTEST_MIN_VERSION = '3.0' FUTURE_MIN_VERSION = '0.16.0' SIMPLEJSON_MIN_VERSION = '3.8.0' -PROV_MIN_VERSION = '1.5.0' +PROV_VERSION = '1.5.0' CLICK_MIN_VERSION = '6.6.0' NAME = 'nipype' @@ -136,7 +136,7 @@ def get_nipype_gitversion(): 'traits>=%s' % TRAITS_MIN_VERSION, 'future>=%s' % FUTURE_MIN_VERSION, 'simplejson>=%s' % SIMPLEJSON_MIN_VERSION, - 'prov>=%s' % PROV_MIN_VERSION, + 'prov==%s' % PROV_VERSION, 'click>=%s' % CLICK_MIN_VERSION, 'funcsigs', 'pytest>=%s' % PYTEST_MIN_VERSION, diff --git a/requirements.txt b/requirements.txt index ce2adf9d09..bcd3ab2fef 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,7 +6,7 @@ python-dateutil>=1.5 nibabel>=2.1.0 future>=0.16.0 simplejson>=3.8.0 -prov>=1.5.0 +prov==1.5.0 click>=6.6.0 funcsigs configparser diff --git a/rtd_requirements.txt b/rtd_requirements.txt index 1ee6c766ac..a002562f3e 100644 --- a/rtd_requirements.txt +++ b/rtd_requirements.txt @@ -6,7 +6,7 @@ python-dateutil>=1.5 nibabel>=2.1.0 future>=0.16.0 simplejson>=3.8.0 -prov>=1.5.0 +prov==1.5.0 funcsigs configparser pytest>=3.0 From b1335ade4132a6ff36ec75480d50971fe832ec0d Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Tue, 1 Aug 2017 15:37:06 -0400 Subject: [PATCH 115/643] FIX: Build filter_basis of correct size --- nipype/algorithms/confounds.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/nipype/algorithms/confounds.py b/nipype/algorithms/confounds.py index d382637bf0..1d31f2ab6c 100644 --- a/nipype/algorithms/confounds.py +++ b/nipype/algorithms/confounds.py @@ -489,10 +489,11 @@ def _run_interface(self, runtime): header = ['{}{:02d}'.format(ftype, i) for i in range(ncols)] if skip_vols: old_basis = filter_basis - nrows = filter_basis.shape[0] if filter_basis.size > 0 else 0 - filter_basis = np.zeros((nrows + skip_vols, ncols + skip_vols), + # nrows defined above + filter_basis = np.zeros((nrows, ncols + skip_vols), dtype=filter_basis.dtype) - filter_basis[skip_vols:, :ncols] = old_basis + if old_basis.size > 0: + filter_basis[skip_vols:, :ncols] = old_basis filter_basis[:skip_vols, -skip_vols:] = np.eye(skip_vols) header.extend(['NonSteadyStateOutlier{:02d}'.format(i) for i in range(skip_vols)]) From 6b949b00b20050a18ebe4c976941ca3d970a55ef Mon Sep 17 00:00:00 2001 From: Dorota Jarecka Date: Tue, 1 Aug 2017 15:37:28 -0400 Subject: [PATCH 116/643] changing MultiPath class: if value type is range it will be turn into a list --- nipype/interfaces/base.py | 5 ++++- nipype/pipeline/engine/tests/test_engine.py | 16 ++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/nipype/interfaces/base.py b/nipype/interfaces/base.py index 2f8b1bf0ea..b5402d183a 100644 --- a/nipype/interfaces/base.py +++ b/nipype/interfaces/base.py @@ -2072,7 +2072,10 @@ def validate(self, object, name, value): isinstance(value, list) and value and not isinstance(value[0], list)): - newvalue = [value] + if isinstance(value, range): + newvalue = list(value) + else: + newvalue = [value] value = super(MultiPath, self).validate(object, name, newvalue) if len(value) > 0: diff --git a/nipype/pipeline/engine/tests/test_engine.py b/nipype/pipeline/engine/tests/test_engine.py index e2624d03c8..017cb180be 100644 --- a/nipype/pipeline/engine/tests/test_engine.py +++ b/nipype/pipeline/engine/tests/test_engine.py @@ -456,6 +456,22 @@ def test_mapnode_iterfield_check(): with pytest.raises(ValueError): mod1._check_iterfield() +@pytest.mark.parametrize("x_inp, f_exp", [ + (3, [9]), ([2, 3], [4, 9]), (range(3), [0, 1, 4]) + ]) +def test_mapnode_iterfield_type(x_inp, f_exp): + from nipype import MapNode, Function + def square_func(x): + return x ** 2 + square = Function(["x"], ["f_x"], square_func) + + square_node = MapNode(square, name="square", iterfield=["x"]) + square_node.inputs.x = x_inp + + res = square_node.run() + assert res.outputs.f_x == f_exp + + def test_mapnode_nested(tmpdir): os.chdir(str(tmpdir)) from nipype import MapNode, Function From 053d1ca502a0525b07e1b1439eaff2237e309ee9 Mon Sep 17 00:00:00 2001 From: Horea Christian Date: Wed, 26 Jul 2017 17:15:03 +0200 Subject: [PATCH 117/643] added interface for MeasureImageSimilarity --- nipype/interfaces/ants/__init__.py | 2 +- nipype/interfaces/ants/registration.py | 122 ++++++++++++++++++ .../tests/test_auto_MeasureImageSimilarity.py | 61 +++++++++ 3 files changed, 184 insertions(+), 1 deletion(-) create mode 100644 nipype/interfaces/ants/tests/test_auto_MeasureImageSimilarity.py diff --git a/nipype/interfaces/ants/__init__.py b/nipype/interfaces/ants/__init__.py index 11c7ae724a..01591c8817 100644 --- a/nipype/interfaces/ants/__init__.py +++ b/nipype/interfaces/ants/__init__.py @@ -5,7 +5,7 @@ """Top-level namespace for ants.""" # Registraiton programs -from .registration import ANTS, Registration +from .registration import ANTS, Registration, MeasureImageSimilarity # Resampling Programs from .resampling import (ApplyTransforms, ApplyTransformsToPoints, WarpImageMultiTransform, diff --git a/nipype/interfaces/ants/registration.py b/nipype/interfaces/ants/registration.py index cf5c18333e..6ee12c263d 100644 --- a/nipype/interfaces/ants/registration.py +++ b/nipype/interfaces/ants/registration.py @@ -1034,3 +1034,125 @@ def _list_outputs(self): if len(self.inputs.save_state): outputs['save_state'] = os.path.abspath(self.inputs.save_state) return outputs + + +class MeasureImageSimilarityInputSpec(ANTSCommandInputSpec): + dimension = traits.Enum( + 2, 3, 4, + argstr='--dimensionality %d', position=1, + desc='Dimensionality of the fixed/moving image pair', + ) + fixed_image = File( + exists=True, mandatory=True, + desc='Image to which the moving image is warped', + ) + moving_image = File( + exists=True, mandatory=True, + desc='Image to apply transformation to (generally a coregistered functional)', + ) + metric = traits.Enum( + "CC", "MI", "Mattes", "MeanSquares", "Demons", "GC", + argstr="%s", mandatory=True, + ) + metric_weight = traits.Float( + requires=['metric'], default=1.0, usedefault=True, + desc='The "metricWeight" variable is not used.', + ) + radius_or_number_of_bins = traits.Int( + requires=['metric'], mandatory=True, + desc='The number of bins in each stage for the MI and Mattes metric, ' + 'or the radius for other metrics', + ) + sampling_strategy = traits.Enum( + "None", "Regular", "Random", + requires=['metric'], default="None", usedefault=True, + desc='Manner of choosing point set over which to optimize the metric. ' + 'Defaults to "None" (i.e. a dense sampling of one sample per voxel).' + ) + sampling_percentage = traits.Either( + traits.Range(low=0.0, high=1.0), + requires=['metric'], mandatory=True, + desc='Percentage of points accessible to the sampling strategy over which ' + 'to optimize the metric.' + ) + fixed_image_mask = File( + exists=True, argstr='%s', + desc='mask used to limit metric sampling region of the fixed image', + ) + moving_image_mask = File( + exists=True, requires=['fixed_image_mask'], + desc='mask used to limit metric sampling region of the moving image', + ) + + +class MeasureImageSimilarityOutputSpec(TraitedSpec): + similarity = traits.Float() + + +class MeasureImageSimilarity(ANTSCommand): + """ + + + Examples + -------- + + >>> from nipype.interfaces.ants import MeasureImageSimilarity + >>> sim = MeasureImageSimilarity() + >>> sim.inputs.dimension = 3 + >>> sim.inputs.metric = 'MI' + >>> sim.inputs.fixed_image = 'T1.nii' + >>> sim.inputs.moving_image = 'resting.nii' + >>> sim.inputs.metric_weight = 1.0 + >>> sim.inputs.radius_or_number_of_bins = 5 + >>> sim.inputs.sampling_strategy = 'Regular' + >>> sim.inputs.sampling_percentage = 1.0 + >>> sim.inputs.fixed_image_mask = 'mask.nii' + >>> sim.inputs.moving_image_mask = 'mask.nii.gz' + >>> sim.cmdline # doctest: +ALLOW_UNICODE + u'MeasureImageSimilarity --dimensionality 3 --masks ["mask.nii","mask.nii.gz"] \ +--metric MI["T1.nii","resting.nii",1.0,5,Regular,1.0]' + """ + _cmd = 'MeasureImageSimilarity' + input_spec = MeasureImageSimilarityInputSpec + output_spec = MeasureImageSimilarityOutputSpec + + def _metric_constructor(self): + retval = '--metric {metric}["{fixed_image}","{moving_image}",{metric_weight},'\ + '{radius_or_number_of_bins},{sampling_strategy},{sampling_percentage}]'\ + .format( + metric=self.inputs.metric, + fixed_image=self.inputs.fixed_image, + moving_image=self.inputs.moving_image, + metric_weight=self.inputs.metric_weight, + radius_or_number_of_bins=self.inputs.radius_or_number_of_bins, + sampling_strategy=self.inputs.sampling_strategy, + sampling_percentage=self.inputs.sampling_percentage, + ) + return retval + + def _mask_constructor(self): + if self.inputs.moving_image_mask: + retval = '--masks ["{fixed_image_mask}","{moving_image_mask}"]'\ + .format( + fixed_image_mask=self.inputs.fixed_image_mask, + moving_image_mask=self.inputs.moving_image_mask, + ) + else: + retval = '--masks "{fixed_image_mask}"'\ + .format( + fixed_image_mask=self.inputs.fixed_image_mask, + ) + return retval + + def _format_arg(self, opt, spec, val): + if opt == 'metric': + return self._metric_constructor() + elif opt == 'fixed_image_mask': + return self._mask_constructor() + return super(MeasureImageSimilarity, self)._format_arg(opt, spec, val) + + def aggregate_outputs(self, runtime=None, needed_outputs=None): + outputs = self._outputs() + stdout = runtime.stdout.split('\n') + outputs.similarity = float(stdout[0]) + return outputs diff --git a/nipype/interfaces/ants/tests/test_auto_MeasureImageSimilarity.py b/nipype/interfaces/ants/tests/test_auto_MeasureImageSimilarity.py new file mode 100644 index 0000000000..3dba65d8bb --- /dev/null +++ b/nipype/interfaces/ants/tests/test_auto_MeasureImageSimilarity.py @@ -0,0 +1,61 @@ +# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT +from __future__ import unicode_literals +from ..registration import MeasureImageSimilarity + + +def test_MeasureImageSimilarity_inputs(): + input_map = dict(args=dict(argstr='%s', + ), + dimension=dict(argstr='--dimensionality %d', + position=1, + ), + environ=dict(nohash=True, + usedefault=True, + ), + fixed_image=dict(mandatory=True, + ), + fixed_image_mask=dict(argstr='%s', + ), + ignore_exception=dict(nohash=True, + usedefault=True, + ), + metric=dict(argstr='%s', + mandatory=True, + ), + metric_weight=dict(requires=['metric'], + usedefault=True, + ), + moving_image=dict(mandatory=True, + ), + moving_image_mask=dict(requires=['fixed_image_mask'], + ), + num_threads=dict(nohash=True, + usedefault=True, + ), + radius_or_number_of_bins=dict(mandatory=True, + requires=['metric'], + ), + sampling_percentage=dict(mandatory=True, + requires=['metric'], + ), + sampling_strategy=dict(requires=['metric'], + usedefault=True, + ), + terminal_output=dict(nohash=True, + ), + ) + inputs = MeasureImageSimilarity.input_spec() + + for key, metadata in list(input_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(inputs.traits()[key], metakey) == value + + +def test_MeasureImageSimilarity_outputs(): + output_map = dict(similarity=dict(), + ) + outputs = MeasureImageSimilarity.output_spec() + + for key, metadata in list(output_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(outputs.traits()[key], metakey) == value From 69a59a92250fccda81c0ac621e462c034cbdfe22 Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Wed, 2 Aug 2017 14:28:12 -0400 Subject: [PATCH 118/643] ENH: Add interface for FreeSurfer's lta_convert --- .../freesurfer/tests/test_auto_LTAConvert.py | 74 +++++++++++++++++++ nipype/interfaces/freesurfer/utils.py | 73 ++++++++++++++++++ 2 files changed, 147 insertions(+) create mode 100644 nipype/interfaces/freesurfer/tests/test_auto_LTAConvert.py diff --git a/nipype/interfaces/freesurfer/tests/test_auto_LTAConvert.py b/nipype/interfaces/freesurfer/tests/test_auto_LTAConvert.py new file mode 100644 index 0000000000..95e2c21eb7 --- /dev/null +++ b/nipype/interfaces/freesurfer/tests/test_auto_LTAConvert.py @@ -0,0 +1,74 @@ +# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT +from __future__ import unicode_literals +from ..utils import LTAConvert + + +def test_LTAConvert_inputs(): + input_map = dict(args=dict(argstr='%s', + ), + environ=dict(nohash=True, + usedefault=True, + ), + ignore_exception=dict(nohash=True, + usedefault=True, + ), + in_fsl=dict(argstr='--infsl %s', + mandatory=True, + xor=('in_lta', 'in_fsl', 'in_mni', 'in_reg', 'in_niftyreg'), + ), + in_lta=dict(argstr='--inlta %s', + mandatory=True, + xor=('in_lta', 'in_fsl', 'in_mni', 'in_reg', 'in_niftyreg'), + ), + in_mni=dict(argstr='--inmni %s', + mandatory=True, + xor=('in_lta', 'in_fsl', 'in_mni', 'in_reg', 'in_niftyreg'), + ), + in_niftyreg=dict(argstr='--inniftyreg %s', + mandatory=True, + xor=('in_lta', 'in_fsl', 'in_mni', 'in_reg', 'in_niftyreg'), + ), + in_reg=dict(argstr='--inreg %s', + mandatory=True, + xor=('in_lta', 'in_fsl', 'in_mni', 'in_reg', 'in_niftyreg'), + ), + invert=dict(argstr='--invert', + ), + ltavox2vox=dict(argstr='--ltavox2vox', + requires=['out_lta'], + ), + out_fsl=dict(argstr='--outfsl %s', + ), + out_lta=dict(argstr='--outlta %s', + ), + out_mni=dict(argstr='--outmni %s', + ), + out_reg=dict(argstr='--outreg %s', + ), + source_file=dict(argstr='--src %s', + ), + target_conform=dict(argstr='--trgconform', + ), + target_file=dict(argstr='--trg %s', + ), + terminal_output=dict(nohash=True, + ), + ) + inputs = LTAConvert.input_spec() + + for key, metadata in list(input_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(inputs.traits()[key], metakey) == value + + +def test_LTAConvert_outputs(): + output_map = dict(out_fsl=dict(), + out_lta=dict(), + out_mni=dict(), + out_reg=dict(), + ) + outputs = LTAConvert.output_spec() + + for key, metadata in list(output_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(outputs.traits()[key], metakey) == value diff --git a/nipype/interfaces/freesurfer/utils.py b/nipype/interfaces/freesurfer/utils.py index 85c2bf6779..38c0fbf2f8 100644 --- a/nipype/interfaces/freesurfer/utils.py +++ b/nipype/interfaces/freesurfer/utils.py @@ -3080,3 +3080,76 @@ def _normalize_filenames(self): thickness_name) self.inputs.sphere = self._associated_file(in_file, self.inputs.sphere) + + +class LTAConvertInputSpec(CommandLineInputSpec): + # Inputs + _in_xor = ('in_lta', 'in_fsl', 'in_mni', 'in_reg', 'in_niftyreg') + in_lta = traits.Either( + File(exists=True), 'identity.nofile', argstr='--inlta %s', + mandatory=True, xor=_in_xor, desc='input transform of LTA type') + in_fsl = File( + exists=True, argstr='--infsl %s', mandatory=True, xor=_in_xor, + desc='input transform of FSL type') + in_mni = File( + exists=True, argstr='--inmni %s', mandatory=True, xor=_in_xor, + desc='input transform of MNI/XFM type') + in_reg = File( + exists=True, argstr='--inreg %s', mandatory=True, xor=_in_xor, + desc='input transform of TK REG type (deprecated format)') + in_niftyreg = File( + exists=True, argstr='--inniftyreg %s', mandatory=True, xor=_in_xor, + desc='input transform of Nifty Reg type (inverse RAS2RAS)') + # Outputs + out_lta = traits.Either( + traits.Bool, File, argstr='--outlta %s', + desc='output linear transform (LTA Freesurfer format)') + out_fsl = traits.Either(traits.Bool, File, argstr='--outfsl %s', + desc='output transform in FSL format') + out_mni = traits.Either(traits.Bool, File, argstr='--outmni %s', + desc='output transform in MNI/XFM format') + out_reg = traits.Either(traits.Bool, File, argstr='--outreg %s', + desc='output transform in reg dat format') + # Optional flags + invert = traits.Bool(argstr='--invert') + ltavox2vox = traits.Bool(argstr='--ltavox2vox', requires=['out_lta']) + source_file = File(exists=True, argstr='--src %s') + target_file = File(exists=True, argstr='--trg %s') + target_conform = traits.Bool(argstr='--trgconform') + + +class LTAConvertOutputSpec(TraitedSpec): + out_lta = File(exists=True, + desc='output linear transform (LTA Freesurfer format)') + out_fsl = File(exists=True, desc='output transform in FSL format') + out_mni = File(exists=True, desc='output transform in MNI/XFM format') + out_reg = File(exists=True, desc='output transform in reg dat format') + + +class LTAConvert(CommandLine): + """Convert different transformation formats. + Some formats may require you to pass an image if the geometry information + is missing form the transform file format. + + For complete details, see the `lta_convert documentation. + `_ + """ + input_spec = LTAConvertInputSpec + output_spec = LTAConvertOutputSpec + _cmd = 'lta_convert' + + def _format_arg(self, name, spec, value): + if name.startswith('out_') and value is True: + value = self._list_outputs()[name] + return super(LTAConvert, self)._format_arg(name, spec, value) + + def _list_outputs(self): + outputs = self.output_spec().get() + for name, default in (('out_lta', 'out.lta'), ('out_fsl', 'out.mat'), + ('out_mni', 'out.xfm'), ('out_reg', 'out.dat')): + attr = getattr(self.inputs, name) + if attr: + fname = default if attr is True else attr + outputs[name] = os.path.abspath(fname) + + return outputs From 68d692a2dff9402a7296f617724f4b8cd397a971 Mon Sep 17 00:00:00 2001 From: Dorota Jarecka Date: Thu, 3 Aug 2017 13:02:12 -0400 Subject: [PATCH 119/643] checking if iterfield is collections.sequence (not range only) --- nipype/interfaces/base.py | 11 ++++++----- nipype/pipeline/engine/tests/test_engine.py | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/nipype/interfaces/base.py b/nipype/interfaces/base.py index b5402d183a..ff68e76787 100644 --- a/nipype/interfaces/base.py +++ b/nipype/interfaces/base.py @@ -32,6 +32,7 @@ import simplejson as json from dateutil.parser import parse as parseutc from packaging.version import Version +import collections from .. import config, logging, LooseVersion, __version__ from ..utils.provenance import write_provenance @@ -2063,7 +2064,10 @@ def validate(self, object, name, value): return Undefined newvalue = value - if not isinstance(value, list) \ + if isinstance(value, collections.Sequence): + newvalue = list(value) + + if not isinstance(value, collections.Sequence) \ or (self.inner_traits() and isinstance(self.inner_traits()[0].trait_type, traits.List) and not @@ -2072,10 +2076,7 @@ def validate(self, object, name, value): isinstance(value, list) and value and not isinstance(value[0], list)): - if isinstance(value, range): - newvalue = list(value) - else: - newvalue = [value] + newvalue = [value] value = super(MultiPath, self).validate(object, name, newvalue) if len(value) > 0: diff --git a/nipype/pipeline/engine/tests/test_engine.py b/nipype/pipeline/engine/tests/test_engine.py index 017cb180be..aa52791bab 100644 --- a/nipype/pipeline/engine/tests/test_engine.py +++ b/nipype/pipeline/engine/tests/test_engine.py @@ -457,7 +457,7 @@ def test_mapnode_iterfield_check(): @pytest.mark.parametrize("x_inp, f_exp", [ - (3, [9]), ([2, 3], [4, 9]), (range(3), [0, 1, 4]) + (3, [9]), ([2, 3], [4, 9]), ((2,3), [4,9]), (range(3), [0, 1, 4]) ]) def test_mapnode_iterfield_type(x_inp, f_exp): from nipype import MapNode, Function From a7cdc6bed375ea49ec42b1097ea45bcef5230872 Mon Sep 17 00:00:00 2001 From: Dorota Jarecka Date: Thu, 3 Aug 2017 13:55:29 -0400 Subject: [PATCH 120/643] removing str from sequences; checking this type at the evry beginning --- nipype/interfaces/base.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/nipype/interfaces/base.py b/nipype/interfaces/base.py index ff68e76787..45896fec3e 100644 --- a/nipype/interfaces/base.py +++ b/nipype/interfaces/base.py @@ -2059,15 +2059,18 @@ class MultiPath(traits.List): """ def validate(self, object, name, value): + + # want to treat range and other sequences (except str) as list + if not isinstance(value, str) and isinstance(value, collections.Sequence): + value = list(value) + if not isdefined(value) or \ (isinstance(value, list) and len(value) == 0): return Undefined - newvalue = value - if isinstance(value, collections.Sequence): - newvalue = list(value) + newvalue = value - if not isinstance(value, collections.Sequence) \ + if not isinstance(value, list) \ or (self.inner_traits() and isinstance(self.inner_traits()[0].trait_type, traits.List) and not From 91dd1d29e049dc57346fc9f88c96d71f94ddf6f0 Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Wed, 2 Aug 2017 14:40:28 -0400 Subject: [PATCH 121/643] ENH: Add default transform, intensity scaling files --- nipype/interfaces/freesurfer/longitudinal.py | 29 +++++++++++++------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/nipype/interfaces/freesurfer/longitudinal.py b/nipype/interfaces/freesurfer/longitudinal.py index 8fa5299be8..1d642bfe97 100644 --- a/nipype/interfaces/freesurfer/longitudinal.py +++ b/nipype/interfaces/freesurfer/longitudinal.py @@ -42,14 +42,15 @@ class RobustTemplateInputSpec(FSTraitedSpecOpenMP): desc='set outlier sensitivity manually (e.g. "--sat 4.685" ). Higher ' 'values mean less sensitivity.') # optional - transform_outputs = InputMultiPath( - File(exists=False), argstr='--lta %s', + transform_outputs = traits.Either( + InputMultiPath(File(exists=False)), traits.Bool, argstr='--lta %s', desc='output xforms to template (for each input)') intensity_scaling = traits.Bool( default_value=False, argstr='--iscale', desc='allow also intensity scaling (default off)') - scaled_intensity_outputs = InputMultiPath( - File(exists=False), argstr='--iscaleout %s', + scaled_intensity_outputs = traits.Either( + InputMultiPath(File(exists=False)), traits.Bool, + argstr='--iscaleout %s', desc='final intensity scales (will activate --iscale)') subsample_threshold = traits.Int( argstr='--subsample %d', @@ -126,18 +127,26 @@ def _format_arg(self, name, spec, value): if name == 'average_metric': # return enumeration value return spec.argstr % {"mean": 0, "median": 1}[value] + if name in ('transform_outputs', 'scaled_intensity_outputs'): + value = self._list_outputs()[name] return super(RobustTemplate, self)._format_arg(name, spec, value) def _list_outputs(self): outputs = self.output_spec().get() - outputs['out_file'] = os.path.abspath( - self.inputs.out_file) + outputs['out_file'] = os.path.abspath(self.inputs.out_file) + n_files = len(self.inputs.in_files) + fmt = '{}{:02d}.{}' if n_files > 9 else '{}{:d}.{}' if isdefined(self.inputs.transform_outputs): - outputs['transform_outputs'] = [os.path.abspath( - x) for x in self.inputs.transform_outputs] + fnames = self.inputs.transform_outputs + if fnames is True: + fnames = [fmt.format('tp', i, 'lta') for i in range(n_files)] + outputs['transform_outputs'] = [os.path.abspath(x) for x in fnames] if isdefined(self.inputs.scaled_intensity_outputs): - outputs['scaled_intensity_outputs'] = [os.path.abspath( - x) for x in self.inputs.scaled_intensity_outputs] + fnames = self.inputs.scaled_intensity_outputs + if fnames is True: + fnames = [fmt.format('is', i, 'txt') for i in range(n_files)] + outputs['scaled_intensity_outputs'] = [os.path.abspath(x) + for x in fnames] return outputs From a56c0bbd1ace5b6edc3ef49e0b7473458778d34b Mon Sep 17 00:00:00 2001 From: Dorota Jarecka Date: Thu, 3 Aug 2017 14:21:52 -0400 Subject: [PATCH 122/643] adding bytes to isinstance(val, str) --- nipype/interfaces/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nipype/interfaces/base.py b/nipype/interfaces/base.py index 45896fec3e..19cf9ccaa6 100644 --- a/nipype/interfaces/base.py +++ b/nipype/interfaces/base.py @@ -2061,7 +2061,7 @@ class MultiPath(traits.List): def validate(self, object, name, value): # want to treat range and other sequences (except str) as list - if not isinstance(value, str) and isinstance(value, collections.Sequence): + if not isinstance(value, (str, bytes)) and isinstance(value, collections.Sequence): value = list(value) if not isdefined(value) or \ From 41233f850e8313a62795b4f882ea7ad645e421bc Mon Sep 17 00:00:00 2001 From: Dorota Jarecka Date: Thu, 3 Aug 2017 15:21:44 -0400 Subject: [PATCH 123/643] changing the new test mapnode_iterfield_check, so its more general --- nipype/pipeline/engine/tests/test_engine.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/nipype/pipeline/engine/tests/test_engine.py b/nipype/pipeline/engine/tests/test_engine.py index aa52791bab..cece44444b 100644 --- a/nipype/pipeline/engine/tests/test_engine.py +++ b/nipype/pipeline/engine/tests/test_engine.py @@ -457,18 +457,20 @@ def test_mapnode_iterfield_check(): @pytest.mark.parametrize("x_inp, f_exp", [ - (3, [9]), ([2, 3], [4, 9]), ((2,3), [4,9]), (range(3), [0, 1, 4]) + (3, [6]), ([2, 3], [4, 6]), ((2, 3), [4, 6]), + (range(3), [0, 2, 4]), + ("Str", ["StrStr"]), (["Str1", "Str2"], ["Str1Str1", "Str2Str2"]) ]) def test_mapnode_iterfield_type(x_inp, f_exp): from nipype import MapNode, Function - def square_func(x): - return x ** 2 - square = Function(["x"], ["f_x"], square_func) + def double_func(x): + return 2 * x + double = Function(["x"], ["f_x"], double_func) - square_node = MapNode(square, name="square", iterfield=["x"]) - square_node.inputs.x = x_inp + double_node = MapNode(double, name="double", iterfield=["x"]) + double_node.inputs.x = x_inp - res = square_node.run() + res = double_node.run() assert res.outputs.f_x == f_exp From 4cfc6c9d92ccd32738cbdc348f80076644a4b944 Mon Sep 17 00:00:00 2001 From: Lukas Snoek Date: Fri, 4 Aug 2017 13:59:36 +0200 Subject: [PATCH 124/643] ENH: Speed up S3DataGrabber using prefix arg --- nipype/interfaces/io.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nipype/interfaces/io.py b/nipype/interfaces/io.py index 18e8047e1a..5a56008e77 100644 --- a/nipype/interfaces/io.py +++ b/nipype/interfaces/io.py @@ -866,10 +866,11 @@ def _list_outputs(self): raise ValueError(msg) outputs = {} + # get list of all files in s3 bucket conn = boto.connect_s3(anon=self.inputs.anon) bkt = conn.get_bucket(self.inputs.bucket) - bkt_files = list(k.key for k in bkt.list()) + bkt_files = list(k.key for k in bkt.list(prefix=self.inputs.bucket_path)) # keys are outfields, args are template args for the outfield for key, args in list(self.inputs.template_args.items()): From e762c3b3a7de8943c9ff9b88b02e60273808f42a Mon Sep 17 00:00:00 2001 From: Lukas Snoek Date: Fri, 4 Aug 2017 14:16:14 +0200 Subject: [PATCH 125/643] Add name to zenodo --- .zenodo.json | 5 +++++ nipype/interfaces/io.py | 1 - 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.zenodo.json b/.zenodo.json index bdded23dfd..b76c0e6313 100644 --- a/.zenodo.json +++ b/.zenodo.json @@ -518,6 +518,11 @@ "affiliation": "MIT, HMS", "name": "Ghosh, Satrajit", "orcid": "0000-0002-5312-6729" + }, + { + "affiliation": "University of Amsterdam", + "name": "Lukas Snoek", + "orcid": "0000-0001-8972-204X" } ], "keywords": [ diff --git a/nipype/interfaces/io.py b/nipype/interfaces/io.py index 5a56008e77..9612645126 100644 --- a/nipype/interfaces/io.py +++ b/nipype/interfaces/io.py @@ -866,7 +866,6 @@ def _list_outputs(self): raise ValueError(msg) outputs = {} - # get list of all files in s3 bucket conn = boto.connect_s3(anon=self.inputs.anon) bkt = conn.get_bucket(self.inputs.bucket) From d6a93be35a5fdd4ac419f30e0e6ceb573a57adab Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Fri, 4 Aug 2017 09:51:03 -0400 Subject: [PATCH 126/643] TEST: Add/fix doctests --- nipype/interfaces/freesurfer/longitudinal.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/nipype/interfaces/freesurfer/longitudinal.py b/nipype/interfaces/freesurfer/longitudinal.py index 1d642bfe97..118ccbd54b 100644 --- a/nipype/interfaces/freesurfer/longitudinal.py +++ b/nipype/interfaces/freesurfer/longitudinal.py @@ -108,8 +108,13 @@ class RobustTemplate(FSCommandOpenMP): ... 'functional.lta'] >>> template.inputs.scaled_intensity_outputs = ['structural-iscale.txt', ... 'functional-iscale.txt'] - >>> template.cmdline #doctest: +NORMALIZE_WHITESPACE +ALLOW_UNICODE - 'mri_robust_template --satit --average 0 --fixtp --mov structural.nii functional.nii --inittp 1 --noit --template T1.nii --iscaleout structural-iscale.txt functional-iscale.txt --subsample 200 --lta structural.lta functional.lta' + >>> template.cmdline #doctest: +NORMALIZE_WHITESPACE +ALLOW_UNICODE +ELLIPSIS + 'mri_robust_template --satit --average 0 --fixtp --mov structural.nii functional.nii --inittp 1 --noit --template T1.nii --iscaleout .../structural-iscale.txt .../functional-iscale.txt --subsample 200 --lta .../structural.lta .../functional.lta' + + >>> template.inputs.transform_outputs = True + >>> template.inputs.scaled_intensity_outputs = True + >>> template.cmdline #doctest: +NORMALIZE_WHITESPACE +ALLOW_UNICODE +ELLIPSIS + 'mri_robust_template --satit --average 0 --fixtp --mov structural.nii functional.nii --inittp 1 --noit --template T1.nii --iscaleout .../is1.txt .../is2.txt --subsample 200 --lta .../tp1.lta .../tp2.lta' >>> template.run() #doctest: +SKIP From 7d271a814d289dd1d6e22b7ed8bdfaa4223bff60 Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Fri, 4 Aug 2017 10:28:23 -0400 Subject: [PATCH 127/643] STY: Use 1 indexing for default files --- nipype/interfaces/freesurfer/longitudinal.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/nipype/interfaces/freesurfer/longitudinal.py b/nipype/interfaces/freesurfer/longitudinal.py index 118ccbd54b..1292109060 100644 --- a/nipype/interfaces/freesurfer/longitudinal.py +++ b/nipype/interfaces/freesurfer/longitudinal.py @@ -144,12 +144,14 @@ def _list_outputs(self): if isdefined(self.inputs.transform_outputs): fnames = self.inputs.transform_outputs if fnames is True: - fnames = [fmt.format('tp', i, 'lta') for i in range(n_files)] + fnames = [fmt.format('tp', i + 1, 'lta') + for i in range(n_files)] outputs['transform_outputs'] = [os.path.abspath(x) for x in fnames] if isdefined(self.inputs.scaled_intensity_outputs): fnames = self.inputs.scaled_intensity_outputs if fnames is True: - fnames = [fmt.format('is', i, 'txt') for i in range(n_files)] + fnames = [fmt.format('is', i + 1, 'txt') + for i in range(n_files)] outputs['scaled_intensity_outputs'] = [os.path.abspath(x) for x in fnames] return outputs From ea74b63a9d2b0afc114d6a4ea9d6cdb5d9d076c7 Mon Sep 17 00:00:00 2001 From: Dylan Nielson Date: Wed, 26 Jul 2017 20:43:26 +0000 Subject: [PATCH 128/643] [ENH] add minimal auto_TLRC interface --- nipype/interfaces/afni/__init__.py | 1 + nipype/interfaces/afni/preprocess.py | 97 ++++++++++++++++++++++++++++ 2 files changed, 98 insertions(+) diff --git a/nipype/interfaces/afni/__init__.py b/nipype/interfaces/afni/__init__.py index 791b8b25f6..642f3b5cac 100644 --- a/nipype/interfaces/afni/__init__.py +++ b/nipype/interfaces/afni/__init__.py @@ -9,6 +9,7 @@ from .base import Info from .preprocess import (Allineate, Automask, AutoTcorrelate, + AutoTLRC, Bandpass, BlurInMask, BlurToFWHM, ClipLevel, DegreeCentrality, Despike, Detrend, ECM, Fim, Fourier, Hist, LFCD, diff --git a/nipype/interfaces/afni/preprocess.py b/nipype/interfaces/afni/preprocess.py index 2c6274ed30..7df09f1f21 100644 --- a/nipype/interfaces/afni/preprocess.py +++ b/nipype/interfaces/afni/preprocess.py @@ -432,7 +432,104 @@ class Automask(AFNICommand): input_spec = AutomaskInputSpec output_spec = AutomaskOutputSpec +class AutoTLRCInputSpec(CommandLineInputSpec): + outputtype = traits.Enum('AFNI', list(Info.ftypes.keys()), + desc='AFNI output filetype') + in_file = File( + desc='Original anatomical volume (+orig).' + 'The skull is removed by this script' + 'unless instructed otherwise (-no_ss).', + argstr='-input %s', + mandatory=True, + exists=True, + copyfile=False) + base = traits.Str( + desc = ' Reference anatomical volume' + ' Usually this volume is in some standard space like' + ' TLRC or MNI space and with afni dataset view of' + ' (+tlrc).' + ' Preferably, this reference volume should have had' + ' the skull removed but that is not mandatory.' + ' AFNI\'s distribution contains several templates.' + ' For a longer list, use "whereami -show_templates"' + 'TT_N27+tlrc --> Single subject, skull stripped volume.' + ' This volume is also known as ' + ' N27_SurfVol_NoSkull+tlrc elsewhere in ' + ' AFNI and SUMA land.' + ' (www.loni.ucla.edu, www.bic.mni.mcgill.ca)' + ' This template has a full set of FreeSurfer' + ' (surfer.nmr.mgh.harvard.edu)' + ' surface models that can be used in SUMA. ' + ' For details, see Talairach-related link:' + ' https://afni.nimh.nih.gov/afni/suma' + 'TT_icbm452+tlrc --> Average volume of 452 normal brains.' + ' Skull Stripped. (www.loni.ucla.edu)' + 'TT_avg152T1+tlrc --> Average volume of 152 normal brains.' + ' Skull Stripped.(www.bic.mni.mcgill.ca)' + 'TT_EPI+tlrc --> EPI template from spm2, masked as TT_avg152T1' + ' TT_avg152 and TT_EPI volume sources are from' + ' SPM\'s distribution. (www.fil.ion.ucl.ac.uk/spm/)' + 'If you do not specify a path for the template, the script' + 'will attempt to locate the template AFNI\'s binaries directory.' + 'NOTE: These datasets have been slightly modified from' + ' their original size to match the standard TLRC' + ' dimensions (Jean Talairach and Pierre Tournoux' + ' Co-Planar Stereotaxic Atlas of the Human Brain' + ' Thieme Medical Publishers, New York, 1988). ' + ' That was done for internal consistency in AFNI.' + ' You may use the original form of these' + ' volumes if you choose but your TLRC coordinates' + ' will not be consistent with AFNI\'s TLRC database' + ' (San Antonio Talairach Daemon database), for example.', + mandatory = True, + argstr='-base %s') + no_ss = traits.Bool( + desc='Do not strip skull of input data set' + '(because skull has already been removed' + 'or because template still has the skull)' + 'NOTE: The -no_ss option is not all that optional.' + ' Here is a table of when you should and should not use -no_ss' + ' Template Template' + ' WITH skull WITHOUT skull' + ' Dset.' + ' WITH skull -no_ss xxx ' + ' ' + ' WITHOUT skull No Cigar -no_ss' + ' ' + ' Template means: Your template of choice' + ' Dset. means: Your anatomical dataset' + ' -no_ss means: Skull stripping should not be attempted on Dset' + ' xxx means: Don\'t put anything, the script will strip Dset' + ' No Cigar means: Don\'t try that combination, it makes no sense.', + argstr='-no_ss') + +class AutoTLRC(AFNICommand): + """A minmal wrapper for the AutoTLRC script + The only option currently supported is no_ss. + For complete details, see the `3dQwarp Documentation. + `_ + Examples + ======== + >>> from nipype.interfaces import afni + >>> autoTLRC = afni.AutoTLRC() + >>> autoTLRC.inputs.in_file = 'structural.nii' + >>> autoTLRC.inputs.no_ss = True + >>> autoTLRC.inputs.base = "TT_N27+tlrc" + >>> autoTLRC.cmdline # doctest: +ALLOW_UNICODE + '@auto_tlrc -base TT_N27+tlrc -input structural.nii -no_ss' + >>> res = autoTLRC.run() # doctest: +SKIP + + """ + _cmd = '@auto_tlrc' + input_spec = AutoTLRCInputSpec + output_spec = AFNICommandOutputSpec + def _list_outputs(self): + outputs = self.output_spec().get() + ext = '.HEAD' + outputs['out_file'] = os.path.abspath(self._gen_fname(self.inputs.in_file, suffix='+tlrc')+ext) + return outputs + class BandpassInputSpec(AFNICommandInputSpec): in_file = File( desc='input file to 3dBandpass', From ff97f6a2bd4e9b52c9fa930933defe65dac2a42e Mon Sep 17 00:00:00 2001 From: Dylan Nielson Date: Wed, 26 Jul 2017 21:53:05 +0000 Subject: [PATCH 129/643] [ENH] Add minimal 3dbucket interface --- nipype/interfaces/afni/__init__.py | 3 +- nipype/interfaces/afni/utils.py | 85 ++++++++++++++++++++++++++++++ 2 files changed, 87 insertions(+), 1 deletion(-) diff --git a/nipype/interfaces/afni/__init__.py b/nipype/interfaces/afni/__init__.py index 642f3b5cac..939b887ab2 100644 --- a/nipype/interfaces/afni/__init__.py +++ b/nipype/interfaces/afni/__init__.py @@ -18,7 +18,8 @@ Seg, SkullStrip, TCorr1D, TCorrMap, TCorrelate, TShift, Volreg, Warp, QwarpPlusMinus, Qwarp) from .svm import (SVMTest, SVMTrain) -from .utils import (AFNItoNIFTI, Autobox, Axialize, BrickStat, Calc, Cat, Copy, +from .utils import (AFNItoNIFTI, Autobox, Axialize, BrickStat, Bucket, + Calc, Cat, Copy, Edge3, Eval, FWHMx, MaskTool, Merge, Notes, NwarpApply, Refit, Resample, TCat, TStat, To3D, Unifize, ZCutUp, GCOR, Zcat, Zeropad) diff --git a/nipype/interfaces/afni/utils.py b/nipype/interfaces/afni/utils.py index c7a9382578..4ec112f4ab 100644 --- a/nipype/interfaces/afni/utils.py +++ b/nipype/interfaces/afni/utils.py @@ -270,6 +270,91 @@ def aggregate_outputs(self, runtime=None, needed_outputs=None): return outputs +class BucketInputSpec(AFNICommandInputSpec): + in_file = traits.List( + traits.Tuple( + (File( + exists=True, + desc='input file', + copyfile=False), + traits.Str(argstr="'%s'")), + artstr="%s%s"), + position=-1, + mandatory=True, + argstr="%s", + desc='List of tuples of input datasets and subbrick selection strings' + 'as described in more detail in the following afni help string' + 'Input dataset specified using one of these forms:' + ' \'prefix+view\', \'prefix+view.HEAD\', or \'prefix+view.BRIK\'.' + 'You can also add a sub-brick selection list after the end of the' + 'dataset name. This allows only a subset of the sub-bricks to be' + 'included into the output (by default, all of the input dataset' + 'is copied into the output). A sub-brick selection list looks like' + 'one of the following forms:' + ' fred+orig[5] ==> use only sub-brick #5' + ' fred+orig[5,9,17] ==> use #5, #9, and #17' + ' fred+orig[5..8] or [5-8] ==> use #5, #6, #7, and #8' + ' fred+orig[5..13(2)] or [5-13(2)] ==> use #5, #7, #9, #11, and #13' + 'Sub-brick indexes start at 0. You can use the character \'$\'' + 'to indicate the last sub-brick in a dataset; for example, you' + 'can select every third sub-brick by using the selection list' + ' fred+orig[0..$(3)]' + 'N.B.: The sub-bricks are output in the order specified, which may' + ' not be the order in the original datasets. For example, using' + ' fred+orig[0..$(2),1..$(2)]' + ' will cause the sub-bricks in fred+orig to be output into the' + ' new dataset in an interleaved fashion. Using' + ' fred+orig[$..0]' + ' will reverse the order of the sub-bricks in the output.' + 'N.B.: Bucket datasets have multiple sub-bricks, but do NOT have' + ' a time dimension. You can input sub-bricks from a 3D+time dataset' + ' into a bucket dataset. You can use the \'3dinfo\' program to see' + ' how many sub-bricks a 3D+time or a bucket dataset contains.' + 'N.B.: In non-bucket functional datasets (like the \'fico\' datasets' + ' output by FIM, or the \'fitt\' datasets output by 3dttest), sub-brick' + ' [0] is the \'intensity\' and sub-brick [1] is the statistical parameter' + ' used as a threshold. Thus, to create a bucket dataset using the' + ' intensity from dataset A and the threshold from dataset B, and' + ' calling the output dataset C, you would type' + ' 3dbucket -prefix C -fbuc \'A+orig[0]\' -fbuc \'B+orig[1]\'' + 'WARNING: using this program, it is possible to create a dataset that' + ' has different basic datum types for different sub-bricks' + ' (e.g., shorts for brick 0, floats for brick 1).' + ' Do NOT do this! Very few AFNI programs will work correctly' + ' with such datasets!') + out_file = File( + argstr='-prefix %s', + name_template='buck') + + +class Bucket(AFNICommand): + """Concatenate sub-bricks from input datasets into one big + 'bucket' dataset. + + For complete details, see the `3dbucket Documentation. + `_ + + Examples + ======== + + >>> from nipype.interfaces import afni + >>> bucket = afni.Bucket() + >>> bucket.inputs.in_file = [('functional.nii',"{2..$}"), ('functional.nii',"{1}")] + >>> bucket.inputs.out_file = 'vr_base' + >>> bucket.cmdline # doctest: +ALLOW_UNICODE + "3dbucket -prefix vr_base functional.nii'{2..$}' functional.nii'{1}'" + >>> res = bucket.run() # doctest: +SKIP + + """ + + _cmd = '3dbucket' + input_spec = BucketInputSpec + output_spec = AFNICommandOutputSpec + + def _format_arg(self, name, spec, value): + if name == 'in_file': + return spec.argstr%(' '.join([i[0]+"'"+i[1]+"'" for i in value])) + return super(Bucket, self)._format_arg(name, spec, value) class CalcInputSpec(AFNICommandInputSpec): in_file_a = File( From eed080e91718a53b1e626c4ac65610e6d5f33a3b Mon Sep 17 00:00:00 2001 From: Dylan Nielson Date: Thu, 27 Jul 2017 06:09:50 +0000 Subject: [PATCH 130/643] [ENH] add align_epi_anat.py interface --- nipype/interfaces/afni/__init__.py | 4 +- nipype/interfaces/afni/preprocess.py | 162 +++++++++++++++++++++++++++ 2 files changed, 164 insertions(+), 2 deletions(-) diff --git a/nipype/interfaces/afni/__init__.py b/nipype/interfaces/afni/__init__.py index 939b887ab2..d1f08bb9d1 100644 --- a/nipype/interfaces/afni/__init__.py +++ b/nipype/interfaces/afni/__init__.py @@ -8,8 +8,8 @@ """ from .base import Info -from .preprocess import (Allineate, Automask, AutoTcorrelate, - AutoTLRC, +from .preprocess import (AlignEpiAnatPy,Allineate, Automask, + AutoTcorrelate,AutoTLRC, Bandpass, BlurInMask, BlurToFWHM, ClipLevel, DegreeCentrality, Despike, Detrend, ECM, Fim, Fourier, Hist, LFCD, diff --git a/nipype/interfaces/afni/preprocess.py b/nipype/interfaces/afni/preprocess.py index 7df09f1f21..2ed6d3805e 100644 --- a/nipype/interfaces/afni/preprocess.py +++ b/nipype/interfaces/afni/preprocess.py @@ -14,6 +14,7 @@ import os import os.path as op +from distutils import spawn from ...utils.filemanip import (load_json, save_json, split_filename) from ..base import ( @@ -46,6 +47,167 @@ class CentralityInputSpec(AFNICommandInputSpec): desc='Mask the dataset to target brain-only voxels', argstr='-automask') +class AlignEpiAnatPyInputSpec(CommandLineInputSpec): + outputtype = traits.Enum('AFNI', list(Info.ftypes.keys()), + desc='AFNI output filetype') + py27_path = File( + desc='Path to Python 2.7 executable for running afni python scripts', + argstr='%s '+spawn.find_executable('align_epi_anat.py'), + exists=True, + #default='/opt/miniconda/envs/py27/bin/python', + mandatory=True, + position=0 + ) + in_file = File( + desc='EPI dataset to align', + argstr='-epi %s', + mandatory=True, + exists=True, + copyfile=False) + anat = File( + desc='name of structural dataset', + argstr='-anat %s', + mandatory=True, + exists=True, + copyfile=False) + epi_base = traits.Str( + desc='the epi base used in alignment' + 'should be one of (0/mean/median/max/subbrick#)', + mandatory=True, + argstr='-epi_base %s') + anat2epi = traits.Bool( + default = True, + desc='align anatomical to EPI dataset (default)', + argstr='-anat2epi') + epi2anat = traits.Bool( + desc='align EPI to anatomical dataset', + argstr='-epi2anat') + save_skullstrip = traits.Bool( + desc='save skull-stripped (not aligned)', + argstr='-save_skullstrip') + suffix = traits.Str( + desc='append suffix to the original anat/epi dataset to use' + 'in the resulting dataset names (default is "_al")', + argstr='-suffix %s') + epi_strip = traits.Enum(('3dSkullStrip','3dAutomask','None'), + desc='method to mask brain in EPI data' + 'should be one of[3dSkullStrip]/3dAutomask/None)', + argstr='-epi_strip %s') + volreg = traits.Enum(('on','off'), + desc='do volume registration on EPI dataset before alignment' + 'should be \'on\' or \'off\', defaults to \'on\'', + default='on', + argstr='-volreg %s') + tshift = traits.Enum(('on','off'), + desc='do time shifting of EPI dataset before alignment' + 'should be \'on\' or \'off\', defaults to \'on\'', + default='on', + argstr='-tshift %s') + +class AlignEpiAnatPyOutputSpec(TraitedSpec): + anat_al_orig = File( + desc="A version of the anatomy that is aligned to the EPI") + epi_al_orig = File( + desc="A version of the EPI dataset aligned to the anatomy") + epi_tlrc_al = File( + desc="A version of the EPI dataset aligned to a standard template") + anat_al_mat = File( + desc="matrix to align anatomy to the EPI") + epi_al_mat = File( + desc="matrix to align EPI to anatomy") + epi_vr_al_mat = File( + desc="matrix to volume register EPI") + epi_reg_al_mat = File( + desc="matrix to volume register and align epi to anatomy") + epi_al_tlrc_mat = File( + desc="matrix to volume register and align epi" + "to anatomy and put into standard space") + epi_vr_motion = File( + desc="motion parameters from EPI time-series" + "registration (tsh included in name if slice" + "timing correction is also included).") + skullstrip = File( + desc="skull-stripped (not aligned) volume") + +class AlignEpiAnatPy(AFNICommand): + """align EPI to anatomical datasets or vice versa + This Python script computes the alignment between two datasets, typically + an EPI and an anatomical structural dataset, and applies the resulting + transformation to one or the other to bring them into alignment. + + This script computes the transforms needed to align EPI and + anatomical datasets using a cost function designed for this purpose. The + script combines multiple transformations, thereby minimizing the amount of + interpolation applied to the data. + + Basic Usage: + align_epi_anat.py -anat anat+orig -epi epi+orig -epi_base 5 + + The user must provide EPI and anatomical datasets and specify the EPI + sub-brick to use as a base in the alignment. + + Internally, the script always aligns the anatomical to the EPI dataset, + and the resulting transformation is saved to a 1D file. + As a user option, the inverse of this transformation may be applied to the + EPI dataset in order to align it to the anatomical data instead. + + This program generates several kinds of output in the form of datasets + and transformation matrices which can be applied to other datasets if + needed. Time-series volume registration, oblique data transformations and + Talairach (standard template) transformations will be combined as needed + and requested (with options to turn on and off each of the steps) in + order to create the aligned datasets. + + For complete details, see the `align_epi_anat.py' Documentation. + `_ + + Examples + ======== + >>> from nipype.interfaces import afni + >>> al_ea = afni.AlignEpiAnatPy() + >>> al_ea.inputs.py27_path = "/opt/miniconda/envs/py27/bin/python" + >>> al_ea.inputs.anat = "structural.nii" + >>> al_ea.inputs.in_file = "functional.nii" + >>> al_ea.inputs.epi_base = '0' + >>> al_ea.inputs.epi_strip = '3dAutomask' + >>> al_ea.inputs.volreg = 'off' + >>> al_ea.inputs.tshift = 'off' + >>> al_ea.inputs.save_skullstrip = True + >>> al_ea.cmdline # doctest: +ALLOW_UNICODE + 'echo "" && /opt/miniconda/envs/py27/bin/python /root/abin/align_epi_anat.py -anat structural.nii -epi_base 0 -epi_strip 3dAutomask -epi functional.nii -save_skullstrip -tshift off -volreg off' + >>> res = allineate.run() # doctest: +SKIP + """ + _cmd = 'echo "" && ' + input_spec = AlignEpiAnatPyInputSpec + output_spec = AlignEpiAnatPyOutputSpec + + def _list_outputs(self): + outputs = self.output_spec().get() + anat_prefix = ''.join(self._gen_fname(self.inputs.anat).split('+')[:-1]) + epi_prefix = ''.join(self._gen_fname(self.inputs.in_file).split('+')[:-1]) + ext = '.HEAD' + matext='.1D' + if not isdefined(self.inputs.suffix): + suffix = '_al' + else: + suffix = '_'+self.inputs.suffix + if self.inputs.anat2epi: + outputs['anat_al_orig'] = os.path.abspath(self._gen_fname(anat_prefix, suffix=suffix+'+orig')+ext) + outputs['anat_al_mat'] = os.path.abspath(self._gen_fname(anat_prefix, suffix=suffix+'_mat.aff12')+matext) + if self.inputs.epi2anat: + outputs['epi_al_orig'] = os.path.abspath(self._gen_fname(epi_prefix, suffix=suffix+'+orig')+ext) + outputs['epi_al_mat'] = os.path.abspath(self._gen_fname(epi_prefix, suffix=suffix+'_mat.aff12')+matext) + if self.inputs.volreg == 'on': + outputs['epi_vr_al_mat'] = os.path.abspath(self._gen_fname(epi_prefix, suffix='_vr'+suffix+'_mat.aff12')+matext) + if self.inputs.tshift == 'on': + outputs['epi_vr_motion'] = os.path.abspath(self._gen_fname(epi_prefix, suffix='tsh_vr_motion')+matext) + elif self.inputs.tshift == 'off': + outputs['epi_vr_motion'] = os.path.abspath(self._gen_fname(epi_prefix, suffix='vr_motion')+matext) + if self.inputs.volreg == 'on' and self.inputs.epi2anat: + outputs['epi_reg_al_mat']= os.path.abspath(self._gen_fname(epi_prefix, suffix='_reg'+suffix+'_mat.aff12')+matext) + if self.inputs.save_skullstrip: + outputs.skullstrip = os.path.abspath(self._gen_fname(anat_prefix, suffix='_ns'+'+orig')+ext) + return outputs class AllineateInputSpec(AFNICommandInputSpec): in_file = File( From 7e0bbfe26c610104326d184b5fa2693977774885 Mon Sep 17 00:00:00 2001 From: Dylan Nielson Date: Thu, 27 Jul 2017 06:40:39 +0000 Subject: [PATCH 131/643] [ENH] add cat_matvec afni interface --- nipype/interfaces/afni/__init__.py | 2 +- nipype/interfaces/afni/utils.py | 58 ++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+), 1 deletion(-) diff --git a/nipype/interfaces/afni/__init__.py b/nipype/interfaces/afni/__init__.py index d1f08bb9d1..8eaa5e1bfa 100644 --- a/nipype/interfaces/afni/__init__.py +++ b/nipype/interfaces/afni/__init__.py @@ -19,7 +19,7 @@ TShift, Volreg, Warp, QwarpPlusMinus, Qwarp) from .svm import (SVMTest, SVMTrain) from .utils import (AFNItoNIFTI, Autobox, Axialize, BrickStat, Bucket, - Calc, Cat, Copy, + Calc, Cat, CatMatvec, Copy, Edge3, Eval, FWHMx, MaskTool, Merge, Notes, NwarpApply, Refit, Resample, TCat, TStat, To3D, Unifize, ZCutUp, GCOR, Zcat, Zeropad) diff --git a/nipype/interfaces/afni/utils.py b/nipype/interfaces/afni/utils.py index 4ec112f4ab..bd2c91f823 100644 --- a/nipype/interfaces/afni/utils.py +++ b/nipype/interfaces/afni/utils.py @@ -517,6 +517,64 @@ class Cat(AFNICommand): input_spec = CatInputSpec output_spec = AFNICommandOutputSpec +class CatMatvecInputSpec(AFNICommandInputSpec): + in_file = traits.List( + traits.Tuple(traits.Str(), traits.Str()), + descr="list of tuples of mfiles and associated opkeys", + mandatory=True, + argstr="%s", + position=-2) + out_file = File( + descr="File to write concattenated matvecs to", + argstr=" > %s", + position=-1, + mandatory=True) + matrix = traits.Bool( + descr="indicates that the resulting matrix will" + "be written to outfile in the 'MATRIX(...)' format (FORM 3)." + "This feature could be used, with clever scripting, to input" + "a matrix directly on the command line to program 3dWarp.", + argstr="-MATRIX", + xor=['oneline','fourXfour']) + oneline = traits.Bool( + descr="indicates that the resulting matrix" + "will simply be written as 12 numbers on one line.", + argstr="-ONELINE", + xor=['matrix','fourXfour']) + fourxfour = traits.Bool( + descr="Output matrix in augmented form (last row is 0 0 0 1)" + "This option does not work with -MATRIX or -ONELINE", + argstr="-4x4", + xor=['matrix','oneline']) + +class CatMatvec(AFNICommand): + """Catenates 3D rotation+shift matrix+vector transformations. + + For complete details, see the `cat_matvec Documentation. + `_ + + Examples + ======== + + >>> from nipype.interfaces import afni + >>> cmv = afni.CatMatvec() + >>> cmv.inputs.in_file = [('structural.BRIK::WARP_DATA','I')] + >>> cmv.inputs.out_file = 'warp.anat.Xat.1D' + >>> cmv.cmdline # doctest: +ALLOW_UNICODE + 'cat_matvec structural.BRIK::WARP_DATA -I > warp.anat.Xat.1D' + >>> res = cmv.run() # doctest: +SKIP + + + """ + + _cmd = 'cat_matvec' + input_spec = CatMatvecInputSpec + output_spec = AFNICommandOutputSpec + + def _format_arg(self, name, spec, value): + if name == 'in_file': + return spec.argstr%(' '.join([i[0]+' -'+i[1] for i in value])) + return super(CatMatvec, self)._format_arg(name, spec, value) class CopyInputSpec(AFNICommandInputSpec): in_file = File( From ec85fc0edc1c56c6cedd4310c3a6420b259c0831 Mon Sep 17 00:00:00 2001 From: Dylan Nielson Date: Thu, 27 Jul 2017 14:15:25 +0000 Subject: [PATCH 132/643] [FIX] delete empty line in CatMatvec docstring --- nipype/interfaces/afni/utils.py | 1 - 1 file changed, 1 deletion(-) diff --git a/nipype/interfaces/afni/utils.py b/nipype/interfaces/afni/utils.py index bd2c91f823..c68ba9479a 100644 --- a/nipype/interfaces/afni/utils.py +++ b/nipype/interfaces/afni/utils.py @@ -564,7 +564,6 @@ class CatMatvec(AFNICommand): 'cat_matvec structural.BRIK::WARP_DATA -I > warp.anat.Xat.1D' >>> res = cmv.run() # doctest: +SKIP - """ _cmd = 'cat_matvec' From 7b55585a62a3af4f813689b00d65679b3de7db18 Mon Sep 17 00:00:00 2001 From: Dylan Nielson Date: Thu, 27 Jul 2017 16:09:41 +0000 Subject: [PATCH 133/643] [ENH] Add interpolation options to Volreg interface --- nipype/interfaces/afni/preprocess.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/nipype/interfaces/afni/preprocess.py b/nipype/interfaces/afni/preprocess.py index 2ed6d3805e..3b71deb69f 100644 --- a/nipype/interfaces/afni/preprocess.py +++ b/nipype/interfaces/afni/preprocess.py @@ -2491,6 +2491,10 @@ class VolregInputSpec(AFNICommandInputSpec): argstr='-1Dmatrix_save %s', keep_extension=True, name_source='in_file') + interp = traits.Enum( + ('Fourier', 'cubic', 'heptic', 'quintic','linear'), + desc='spatial interpolation methods [default = heptic]', + argstr='-%s') class VolregOutputSpec(TraitedSpec): @@ -2527,6 +2531,20 @@ class Volreg(AFNICommand): '3dvolreg -Fourier -twopass -1Dfile functional.1D -1Dmatrix_save functional.aff12.1D -prefix functional_volreg.nii -zpad 4 -maxdisp1D functional_md.1D functional.nii' >>> res = volreg.run() # doctest: +SKIP + >>> from nipype.interfaces import afni + >>> volreg = afni.Volreg() + >>> volreg.inputs.in_file = 'functional.nii' + >>> volreg.inputs.interp = 'cubic' + >>> volreg.inputs.verbose = True + >>> volreg.inputs.zpad = 1 + >>> volreg.inputs.basefile = 'functional.nii' + >>> volreg.inputs.out_file = 'rm.epi.volreg.r1' + >>> volreg.inputs.oned_file = 'dfile.r1.1D' + >>> volreg.inputs.oned_matrix_save = 'mat.r1.tshift+orig.1D' + >>> volreg.cmdline + '3dvolreg -cubic -1Dfile dfile.r1.1D -1Dmatrix_save mat.r1.tshift+orig.1D -prefix rm.epi.volreg.r1 -verbose -base functional.nii -zpad 1 -maxdisp1D functional_md.1D functional.nii' + >>> res = volreg.run() # doctest: +SKIP + """ _cmd = '3dvolreg' From 1c845f66bbaf506199ce153fab9b250ed6427eb9 Mon Sep 17 00:00:00 2001 From: Dylan Nielson Date: Thu, 27 Jul 2017 16:18:23 +0000 Subject: [PATCH 134/643] [ENH] add overwite option to Calc interface --- nipype/interfaces/afni/utils.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/nipype/interfaces/afni/utils.py b/nipype/interfaces/afni/utils.py index c68ba9479a..c33f1c3b69 100644 --- a/nipype/interfaces/afni/utils.py +++ b/nipype/interfaces/afni/utils.py @@ -391,6 +391,9 @@ class CalcInputSpec(AFNICommandInputSpec): requires=['start_idx']) single_idx = traits.Int( desc='volume index for in_file_a') + overwrite = traits.Bool( + desc='overwrite output', + argstr='-overwrite') other = File( desc='other options', argstr='') @@ -416,6 +419,16 @@ class Calc(AFNICommand): '3dcalc -a functional.nii -b functional2.nii -expr "a*b" -prefix functional_calc.nii.gz' >>> res = calc.run() # doctest: +SKIP + >>> from nipype.interfaces import afni + >>> calc = afni.Calc() + >>> calc.inputs.in_file_a = 'functional.nii' + >>> calc.inputs.expr = '1' + >>> calc.inputs.out_file = 'rm.epi.all1' + >>> calc.inputs.overwrite = True + >>> calc.cmdline # doctest: +ALLOW_UNICODE + '3dcalc -a functional.nii -expr "1" -prefix rm.epi.all1 -overwrite' + >>> res = calc.run() # doctest: +SKIP + """ _cmd = '3dcalc' From 813617292cce16f2ce83d9320701034df6b9f51b Mon Sep 17 00:00:00 2001 From: Dylan Nielson Date: Thu, 27 Jul 2017 18:15:17 +0000 Subject: [PATCH 135/643] [ENH] Add options to Allineate and Means --- nipype/interfaces/afni/preprocess.py | 51 ++++++++++++++++++++++------ 1 file changed, 41 insertions(+), 10 deletions(-) diff --git a/nipype/interfaces/afni/preprocess.py b/nipype/interfaces/afni/preprocess.py index 3b71deb69f..bd2ac19d9b 100644 --- a/nipype/interfaces/afni/preprocess.py +++ b/nipype/interfaces/afni/preprocess.py @@ -213,7 +213,6 @@ class AllineateInputSpec(AFNICommandInputSpec): in_file = File( desc='input file to 3dAllineate', argstr='-source %s', - position=-1, mandatory=True, exists=True, copyfile=False) @@ -225,9 +224,10 @@ class AllineateInputSpec(AFNICommandInputSpec): out_file = File( desc='output file from 3dAllineate', argstr='-prefix %s', - position=-2, - name_source='%s_allineate', - genfile=True) + name_source='in_file', + name_template='%s_allineate', + genfile=True, + xors=['allcostx']) out_param_file = File( argstr='-1Dparam_save %s', desc='Save the warp parameters in ASCII (.1D) format.') @@ -241,8 +241,14 @@ class AllineateInputSpec(AFNICommandInputSpec): desc='Save the transformation matrix for each volume.') in_matrix = File( desc='matrix to align input file', - argstr='-1Dmatrix_apply %s', - position=-3) + argstr='-1Dmatrix_apply %s') + # TODO: implement sensible xors for allcostx and suppres prefix in command when allcosx is used + allcostx= File( + desc='Compute and print ALL available cost functionals for the un-warped inputs' + 'AND THEN QUIT. If you use this option none of the other expected outputs will be produced', + argstr='-allcostx |& tee %s', + position=-1, + xors=['out_file']) _cost_funcs = [ 'leastsq', 'ls', @@ -414,6 +420,7 @@ class AllineateInputSpec(AFNICommandInputSpec): class AllineateOutputSpec(TraitedSpec): out_file = File(desc='output image file name') matrix = File(desc='matrix to align input file') + allcostx = File(desc='Compute and print ALL available cost functionals for the un-warped inputs') class Allineate(AFNICommand): @@ -431,9 +438,17 @@ class Allineate(AFNICommand): >>> allineate.inputs.out_file = 'functional_allineate.nii' >>> allineate.inputs.in_matrix = 'cmatrix.mat' >>> allineate.cmdline # doctest: +ALLOW_UNICODE - '3dAllineate -1Dmatrix_apply cmatrix.mat -prefix functional_allineate.nii -source functional.nii' + '3dAllineate -source functional.nii -1Dmatrix_apply cmatrix.mat -prefix functional_allineate.nii' >>> res = allineate.run() # doctest: +SKIP + >>> from nipype.interfaces import afni + >>> allineate = afni.Allineate() + >>> allineate.inputs.in_file = 'functional.nii' + >>> allineate.inputs.reference = 'structural.nii' + >>> allineate.inputs.allcostx = 'out.allcostX.txt' + >>> allineate.cmdline # doctest: +ALLOW_UNICODE + '3dAllineate -source functional.nii -prefix functional_allineate -base structural.nii -allcostx |& tee out.allcostX.txt' + >>> res = allineate.run() # doctest: +SKIP """ _cmd = '3dAllineate' @@ -457,6 +472,10 @@ def _list_outputs(self): if isdefined(self.inputs.out_matrix): outputs['matrix'] = os.path.abspath(os.path.join(os.getcwd(),\ self.inputs.out_matrix +'.aff12.1D')) + + if isdefined(self.inputs.allcostX): + outputs['allcostX'] = os.path.abspath(os.path.join(os.getcwd(),\ + self.inputs.allcostx)) return outputs def _gen_filename(self, name): @@ -1520,14 +1539,17 @@ class MeansInputSpec(AFNICommandInputSpec): in_file_a = File( desc='input file to 3dMean', argstr='%s', - position=0, + position=-2, mandatory=True, exists=True) in_file_b = File( desc='another input file to 3dMean', argstr='%s', - position=1, + position=-1, exists=True) + datum = traits.Str( + desc='Sets the data type of the output dataset', + argstr='-datum %s') out_file = File( name_template='%s_mean', desc='output image file name', @@ -1574,7 +1596,16 @@ class Means(AFNICommand): >>> means.inputs.in_file_b = 'im2.nii' >>> means.inputs.out_file = 'output.nii' >>> means.cmdline # doctest: +ALLOW_UNICODE - '3dMean im1.nii im2.nii -prefix output.nii' + '3dMean -prefix output.nii im1.nii im2.nii' + >>> res = means.run() # doctest: +SKIP + + >>> from nipype.interfaces import afni + >>> means = afni.Means() + >>> means.inputs.in_file_a = 'im1.nii' + >>> means.inputs.out_file = 'output.nii' + >>> means.inputs.datum = 'short' + >>> means.cmdline # doctest: +ALLOW_UNICODE + '3dMean -datum short -prefix output.nii im1.nii' >>> res = means.run() # doctest: +SKIP """ From 37335d9c7524d67db6960d2dda0d472a1655dc0f Mon Sep 17 00:00:00 2001 From: Dylan Nielson Date: Thu, 27 Jul 2017 18:45:18 +0000 Subject: [PATCH 136/643] [ENH] add 3dDot and 3dABoverlap interfaces --- nipype/interfaces/afni/__init__.py | 4 +- nipype/interfaces/afni/utils.py | 125 +++++++++++++++++++++++++++++ 2 files changed, 127 insertions(+), 2 deletions(-) diff --git a/nipype/interfaces/afni/__init__.py b/nipype/interfaces/afni/__init__.py index 8eaa5e1bfa..ea06015988 100644 --- a/nipype/interfaces/afni/__init__.py +++ b/nipype/interfaces/afni/__init__.py @@ -18,8 +18,8 @@ Seg, SkullStrip, TCorr1D, TCorrMap, TCorrelate, TShift, Volreg, Warp, QwarpPlusMinus, Qwarp) from .svm import (SVMTest, SVMTrain) -from .utils import (AFNItoNIFTI, Autobox, Axialize, BrickStat, Bucket, - Calc, Cat, CatMatvec, Copy, +from .utils import (ABoverlap, AFNItoNIFTI, Autobox, Axialize, BrickStat, Bucket, + Calc, Cat, CatMatvec, Copy, Dot, Edge3, Eval, FWHMx, MaskTool, Merge, Notes, NwarpApply, Refit, Resample, TCat, TStat, To3D, Unifize, ZCutUp, GCOR, Zcat, Zeropad) diff --git a/nipype/interfaces/afni/utils.py b/nipype/interfaces/afni/utils.py index c33f1c3b69..b9d16890cc 100644 --- a/nipype/interfaces/afni/utils.py +++ b/nipype/interfaces/afni/utils.py @@ -29,6 +29,61 @@ from .base import ( AFNICommandBase, AFNICommand, AFNICommandInputSpec, AFNICommandOutputSpec) +class ABoverlapInputSpec(AFNICommandInputSpec): + in_file_a = File( + desc='input file A', + argstr='%s', + position=-3, + mandatory=True, + exists=True, + copyfile=False) + in_file_b = File( + desc='input file B', + argstr='%s', + position=-2, + mandatory=True, + exists=True, + copyfile=False) + out_file = File( + desc='collect output to a file', + argstr=' |& tee %s', + position=-1) + no_automask = traits.Bool( + desc='consider input datasets as masks', + argstr='-no_automask') + quiet = traits.Bool( + desc='be as quiet as possible (without being entirely mute)', + argstr='-quiet') + verb = traits.Bool( + desc='print out some progress reports (to stderr)', + argstr='-verb') + + +class ABoverlap(AFNICommand): + """Output (to screen) is a count of various things about how + the automasks of datasets A and B overlap or don't overlap. + + For complete details, see the `3dABoverlap Documentation. + `_ + + Examples + ======== + + >>> from nipype.interfaces import afni + >>> aboverlap = afni.ABoverlap() + >>> aboverlap.inputs.in_file_a = 'functional.nii' + >>> aboverlap.inputs.in_file_b = 'structural.nii' + >>> aboverlap.inputs.out_file = 'out.mask_ae_overlap.txt' + >>> aboverlap.cmdline # doctest: +ALLOW_UNICODE + '3dABoverlap functional.nii structural.nii |& tee out.mask_ae_overlap.txt' + >>> res = aboverlap.run() # doctest: +SKIP + + """ + + _cmd = '3dABoverlap' + input_spec = ABoverlapInputSpec + output_spec = AFNICommandOutputSpec + class AFNItoNIFTIInputSpec(AFNICommandInputSpec): in_file = File( @@ -646,6 +701,76 @@ class Copy(AFNICommand): input_spec = CopyInputSpec output_spec = AFNICommandOutputSpec +class DotInputSpec(AFNICommandInputSpec): + in_files = traits.List( + (File()), + desc="list of input files, possibly with subbrick selectors", + argstr="%s ...", + position=-2) + out_file = File( + desc='collect output to a file', + argstr=' |& tee %s', + position=-1) + mask = File( + desc='Use this dataset as a mask', + argstr='-mask %s') + mrange = traits.Tuple((traits.Float(),traits.Float()), + desc='Means to further restrict the voxels from \'mset\' so that' + 'only those mask values within this range (inclusive) willbe used.', + argstr='-mrange %s %s') + demean = traits.Bool( + desc='Remove the mean from each volume prior to computing the correlation', + argstr='-demean') + docor = traits.Bool( + desc='Return the correlation coefficient (default).', + argstr='-docor') + dodot = traits.Bool( + desc='Return the dot product (unscaled).', + argstr='-dodot') + docoef = traits.Bool( + desc='Return the least square fit coefficients {{a,b}} so that dset2 is approximately a + b*dset1', + argstr='-docoef') + dosums = traits.Bool( + desc='Return the 6 numbers xbar= ybar= <(x-xbar)^2> <(y-ybar)^2> <(x-xbar)(y-ybar)> and the correlation coefficient.', + argstr='-dosums') + dodice = traits.Bool( + desc='Return the Dice coefficient (the Sorensen-Dice index).', + argstr='-dodice') + doeta2 = traits.Bool( + desc='Return eta-squared (Cohen, NeuroImage 2008).', + argstr='-doeta2') + full = traits.Bool( + desc='Compute the whole matrix. A waste of time, but handy for parsing.', + argstr='-full') + show_labels = traits.Bool( + desc='Print sub-brick labels to help identify what is being correlated. This option is useful when' + 'you have more than 2 sub-bricks at input.', + argstr='-show_labels') + upper = traits.Bool( + desc='Compute upper triangular matrix', + argstr='-upper') + +class Dot(AFNICommand): + """Correlation coefficient between sub-brick pairs. + All datasets in in_files list will be concatenated. + You can use sub-brick selectors in the file specification. + Note: This program is not efficient when more than two subbricks are input. + For complete details, see the `3ddot Documentation. + `_ + + >>> from nipype.interfaces import afni + >>> dot = afni.Dot() + >>> dot.inputs.in_files = ['functional.nii[0]', 'structural.nii'] + >>> dot.inputs.dodice = True + >>> dot.inputs.out_file = 'out.mask_ae_dice.txt' + >>> dot.cmdline # doctest: +ALLOW_UNICODE + '3dDot -dodice functional.nii[0] structural.nii |& tee out.mask_ae_dice.txt' + >>> res = copy3d.run() # doctest: +SKIP + + """ + _cmd='3dDot' + input_spec = DotInputSpec + output_spec = AFNICommandOutputSpec class Edge3InputSpec(AFNICommandInputSpec): in_file = File( From 298f4a2a89f074e639c1246d36602047e53a00c9 Mon Sep 17 00:00:00 2001 From: Dylan Nielson Date: Thu, 27 Jul 2017 19:47:49 +0000 Subject: [PATCH 137/643] [ENH] Add interface for 1d_tool.py --- nipype/interfaces/afni/__init__.py | 1 + nipype/interfaces/afni/preprocess.py | 4 +- nipype/interfaces/afni/utils.py | 90 +++++++++++++++++++++++++++- 3 files changed, 92 insertions(+), 3 deletions(-) diff --git a/nipype/interfaces/afni/__init__.py b/nipype/interfaces/afni/__init__.py index ea06015988..3e12f88763 100644 --- a/nipype/interfaces/afni/__init__.py +++ b/nipype/interfaces/afni/__init__.py @@ -21,6 +21,7 @@ from .utils import (ABoverlap, AFNItoNIFTI, Autobox, Axialize, BrickStat, Bucket, Calc, Cat, CatMatvec, Copy, Dot, Edge3, Eval, FWHMx, MaskTool, Merge, Notes, NwarpApply, + OneDToolPy, Refit, Resample, TCat, TStat, To3D, Unifize, ZCutUp, GCOR, Zcat, Zeropad) from .model import (Deconvolve, Remlfit) diff --git a/nipype/interfaces/afni/preprocess.py b/nipype/interfaces/afni/preprocess.py index bd2ac19d9b..c23dc7101a 100644 --- a/nipype/interfaces/afni/preprocess.py +++ b/nipype/interfaces/afni/preprocess.py @@ -227,7 +227,7 @@ class AllineateInputSpec(AFNICommandInputSpec): name_source='in_file', name_template='%s_allineate', genfile=True, - xors=['allcostx']) + xor=['allcostx']) out_param_file = File( argstr='-1Dparam_save %s', desc='Save the warp parameters in ASCII (.1D) format.') @@ -248,7 +248,7 @@ class AllineateInputSpec(AFNICommandInputSpec): 'AND THEN QUIT. If you use this option none of the other expected outputs will be produced', argstr='-allcostx |& tee %s', position=-1, - xors=['out_file']) + xor=['out_file']) _cost_funcs = [ 'leastsq', 'ls', diff --git a/nipype/interfaces/afni/utils.py b/nipype/interfaces/afni/utils.py index b9d16890cc..02f2c9829c 100644 --- a/nipype/interfaces/afni/utils.py +++ b/nipype/interfaces/afni/utils.py @@ -25,7 +25,7 @@ CommandLineInputSpec, CommandLine, Directory, TraitedSpec, traits, isdefined, File, InputMultiPath, Undefined, Str) from ...external.due import BibTeX - +from distutils import spawn from .base import ( AFNICommandBase, AFNICommand, AFNICommandInputSpec, AFNICommandOutputSpec) @@ -1494,6 +1494,94 @@ class NwarpApply(AFNICommandBase): input_spec = NwarpApplyInputSpec output_spec = AFNICommandOutputSpec +class OneDToolPyInputSpec(AFNICommandInputSpec): + in_file = File( + desc='input file to OneDTool', + argstr='-infile %s', + mandatory=True, + exists=True) + py27_path = File( + desc='Path to Python 2.7 executable for running afni python scripts', + argstr='%s '+spawn.find_executable('1d_tool.py'), + exists=True, + default='/opt/miniconda/envs/py27/bin/python', + usedefault=True, + position=0 + ) + set_nruns = traits.Int( + desc='treat the input data as if it has nruns', + argstr='-set_nruns %d') + derivative = traits.Bool( + desc='take the temporal derivative of each vector (done as first backward difference)', + argstr='-derivative') + demean = traits.Bool( + desc='demean each run (new mean of each run = 0.0)', + argstr='-demean') + out_file = File( + desc='write the current 1D data to FILE', + argstr='-write %s', + xor=['show_cormat_warnings']) + show_censor_count = traits.Bool( + desc='display the total number of censored TRs Note : if input is a valid xmat.1D dataset,' + 'then the count will come from the header. Otherwise the input is assumed to be a binary censor' + 'file, and zeros are simply counted.', + argstr="-show_censor_count") + censor_motion = traits.Tuple( + (traits.Float(),File()), + desc='Tuple of motion limit and outfile prefix. need to also set set_nruns -r set_run_lengths', + argstr="-censor_motion %f %s") + censor_prev_TR = traits.Bool( + desc='for each censored TR, also censor previous', + argstr='-censor_prev_TR') + show_trs_uncensored = traits.Enum('comma','space','encoded','verbose', + desc='display a list of TRs which were not censored in the specified style', + argstr='-show_trs_uncensored %s') + show_cormat_warnings = traits.File( + desc='Write cormat warnings to a file', + argstr="-show_cormat_warnings |& tee %s", + default="out.cormat_warn.txt", + usedefault=False, + position=-1, + xor=['out_file']) + show_indices_interest = traits.Bool( + desc="display column indices for regs of interest", + argstr="-show_indices_interest") + show_trs_run = traits.Int( + desc="restrict -show_trs_[un]censored to the given 1-based run", + argstr="-show_trs_run %d") + +class OneDToolPyOutputSpec(AFNICommandOutputSpec): + out_file = File(desc='output of 1D_tool.py') + +class OneDToolPy(AFNICommandBase): + """This program is meant to read/manipulate/write/diagnose 1D datasets. + Input can be specified using AFNI sub-brick[]/time{} selectors. + + >>> from nipype.interfaces import afni + >>> odt = afni.OneDToolPy() + >>> odt.inputs.in_file = 'f1.1D' + >>> odt.inputs.py27_path = "/opt/miniconda/envs/py27/bin/python" + >>> odt.inputs.set_nruns = 3 + >>> odt.inputs.demean = True + >>> odt.inputs.out_file = 'motion_dmean.1D' + >>> odt.cmdline # doctest: +ALLOW_UNICODE + 'echo "" && /opt/miniconda/envs/py27/bin/python /root/abin/1d_tool.py -demean -infile f1.1D -write motion_dmean.1D -set_nruns 3' + >>> res = odt.run() # doctest: +SKIP +""" + + _cmd = 'echo "" && ' + + input_spec = OneDToolPyInputSpec + output_spec = OneDToolPyOutputSpec + + def _list_outputs(self): + outputs = self.output_spec().get() + + if isdefined(self.inputs.out_file): + outputs['out_file']=os.path.join(os.getcwd(), self.inputs.out_file) + if isdefined(self.inputs.show_cormat_warnings): + outputs['out_file']=os.path.join(os.getcwd(), self.inputs.show_cormat_warnings) + return outputs class RefitInputSpec(CommandLineInputSpec): in_file = File( From 53cc8ddc2b19f52ccfe4fee7b279841b4bf024a5 Mon Sep 17 00:00:00 2001 From: Dylan Nielson Date: Fri, 4 Aug 2017 15:59:00 +0000 Subject: [PATCH 138/643] tweak OneDToolPy --- nipype/interfaces/afni/utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nipype/interfaces/afni/utils.py b/nipype/interfaces/afni/utils.py index 02f2c9829c..1495224236 100644 --- a/nipype/interfaces/afni/utils.py +++ b/nipype/interfaces/afni/utils.py @@ -1581,6 +1581,8 @@ def _list_outputs(self): outputs['out_file']=os.path.join(os.getcwd(), self.inputs.out_file) if isdefined(self.inputs.show_cormat_warnings): outputs['out_file']=os.path.join(os.getcwd(), self.inputs.show_cormat_warnings) + if isdefined(self.inputs.censor_motion): + outputs['out_file']=os.path.join(os.getcwd(), self.inputs.censor_motion[1]) return outputs class RefitInputSpec(CommandLineInputSpec): From 27ba7361361b64d378c08863d419645e1d0c1955 Mon Sep 17 00:00:00 2001 From: Dylan Nielson Date: Fri, 4 Aug 2017 16:11:58 +0000 Subject: [PATCH 139/643] [ENH] Add 3dTnorm interface --- nipype/interfaces/afni/__init__.py | 1 + nipype/interfaces/afni/preprocess.py | 61 ++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+) diff --git a/nipype/interfaces/afni/__init__.py b/nipype/interfaces/afni/__init__.py index 3e12f88763..d71021e158 100644 --- a/nipype/interfaces/afni/__init__.py +++ b/nipype/interfaces/afni/__init__.py @@ -16,6 +16,7 @@ Maskave, Means, OutlierCount, QualityIndex, ROIStats, Retroicor, Seg, SkullStrip, TCorr1D, TCorrMap, TCorrelate, + TNorm, TShift, Volreg, Warp, QwarpPlusMinus, Qwarp) from .svm import (SVMTest, SVMTrain) from .utils import (ABoverlap, AFNItoNIFTI, Autobox, Axialize, BrickStat, Bucket, diff --git a/nipype/interfaces/afni/preprocess.py b/nipype/interfaces/afni/preprocess.py index c23dc7101a..e91d285e5f 100644 --- a/nipype/interfaces/afni/preprocess.py +++ b/nipype/interfaces/afni/preprocess.py @@ -2402,6 +2402,67 @@ class TCorrelate(AFNICommand): output_spec = AFNICommandOutputSpec +class TNormInputSpec(AFNICommandInputSpec): + in_file = File( + desc='input file to 3dTNorm', + argstr='%s', + position=-1, + mandatory=True, + exists=True, + copyfile=False) + out_file = File( + name_template='%s_tnorm', + desc='output image file name', + argstr='-prefix %s', + name_source='in_file') + norm2 = traits.Bool( + desc='L2 normalize (sum of squares = 1) [DEFAULT]', + argstr='-norm2') + normR = traits.Bool( + desc='normalize so sum of squares = number of time points * e.g., so RMS = 1.', + argstr='-normR') + norm1 = traits.Bool( + desc='L1 normalize (sum of absolute values = 1)', + argstr='-norm1') + normx = traits.Bool( + desc='Scale so max absolute value = 1 (L_infinity norm)', + argstr='-normx') + polort = traits.Int( + desc="""Detrend with polynomials of order p before normalizing + [DEFAULT = don't do this] + * Use '-polort 0' to remove the mean, for example""", + argstr='-polort %s') + L1fit = traits.Bool( + desc="""Detrend with L1 regression (L2 is the default) + * This option is here just for the hell of it""", + argstr='-L1fit') + + +class TNorm(AFNICommand): + """Shifts voxel time series from input so that seperate slices are aligned + to the same temporal origin. + + For complete details, see the `3dTshift Documentation. + `_ + + Examples + ======== + + >>> from nipype.interfaces import afni + >>> tnorm = afni.TNorm() + >>> tnorm.inputs.in_file = 'functional.nii' + >>> tnorm.inputs.norm2 = True + >>> tnorm.inputs.out_file = 'rm.errts.unit errts+tlrc' + >>> tnorm.cmdline # doctest: +ALLOW_UNICODE + '3dTnorm -norm2 -prefix rm.errts.unit errts+tlrc functional.nii' + >>> res = tshift.run() # doctest: +SKIP + + """ + _cmd = '3dTnorm' + input_spec = TNormInputSpec + output_spec = AFNICommandOutputSpec + + class TShiftInputSpec(AFNICommandInputSpec): in_file = File( desc='input file to 3dTShift', From a8243aadad085fce774c6a85136d232cbfad4e63 Mon Sep 17 00:00:00 2001 From: Dylan Nielson Date: Mon, 7 Aug 2017 17:10:55 +0000 Subject: [PATCH 140/643] [FIX] Address review comments --- nipype/interfaces/afni/__init__.py | 8 +-- nipype/interfaces/afni/base.py | 19 ++++++- nipype/interfaces/afni/preprocess.py | 78 +++++++++++++--------------- nipype/interfaces/afni/utils.py | 26 +++------- 4 files changed, 67 insertions(+), 64 deletions(-) diff --git a/nipype/interfaces/afni/__init__.py b/nipype/interfaces/afni/__init__.py index d71021e158..044449fed1 100644 --- a/nipype/interfaces/afni/__init__.py +++ b/nipype/interfaces/afni/__init__.py @@ -8,8 +8,8 @@ """ from .base import Info -from .preprocess import (AlignEpiAnatPy,Allineate, Automask, - AutoTcorrelate,AutoTLRC, +from .preprocess import (AlignEpiAnatPy, Allineate, Automask, + AutoTcorrelate, AutoTLRC, Bandpass, BlurInMask, BlurToFWHM, ClipLevel, DegreeCentrality, Despike, Detrend, ECM, Fim, Fourier, Hist, LFCD, @@ -19,8 +19,8 @@ TNorm, TShift, Volreg, Warp, QwarpPlusMinus, Qwarp) from .svm import (SVMTest, SVMTrain) -from .utils import (ABoverlap, AFNItoNIFTI, Autobox, Axialize, BrickStat, Bucket, - Calc, Cat, CatMatvec, Copy, Dot, +from .utils import (ABoverlap, AFNItoNIFTI, Autobox, Axialize, BrickStat, + Bucket, Calc, Cat, CatMatvec, Copy, Dot, Edge3, Eval, FWHMx, MaskTool, Merge, Notes, NwarpApply, OneDToolPy, Refit, Resample, TCat, TStat, To3D, Unifize, ZCutUp, GCOR, diff --git a/nipype/interfaces/afni/base.py b/nipype/interfaces/afni/base.py index 5926d99a0d..7c92f267b8 100644 --- a/nipype/interfaces/afni/base.py +++ b/nipype/interfaces/afni/base.py @@ -8,6 +8,7 @@ import os from sys import platform +from distutils import spawn from ... import logging from ...utils.filemanip import split_filename, fname_presuffix @@ -144,7 +145,6 @@ class AFNICommandOutputSpec(TraitedSpec): out_file = File(desc='output file', exists=True) - class AFNICommand(AFNICommandBase): """Shared options for several AFNI commands """ input_spec = AFNICommandInputSpec @@ -283,3 +283,20 @@ def no_afni(): if Info.version() is None: return True return False + + +class AFNIPythonCommandInputSpec(CommandLineInputSpec): + outputtype = traits.Enum('AFNI', list(Info.ftypes.keys()), + desc='AFNI output filetype') + py27_path = traits.Either('python2', File(exists=True), + usedefault=True, + default='python2') + +class AFNIPythonCommand(AFNICommand): + @property + def cmd(self): + return spawn.find_executable(super(AFNIPythonCommand, self).cmd) + + @property + def cmdline(self): + return "{} {}".format(self.inputs.py27_path, super(AFNIPythonCommand, self).cmdline) \ No newline at end of file diff --git a/nipype/interfaces/afni/preprocess.py b/nipype/interfaces/afni/preprocess.py index e91d285e5f..5efe416cee 100644 --- a/nipype/interfaces/afni/preprocess.py +++ b/nipype/interfaces/afni/preprocess.py @@ -14,7 +14,6 @@ import os import os.path as op -from distutils import spawn from ...utils.filemanip import (load_json, save_json, split_filename) from ..base import ( @@ -23,7 +22,7 @@ from .base import ( AFNICommandBase, AFNICommand, AFNICommandInputSpec, AFNICommandOutputSpec, - Info, no_afni) + AFNIPythonCommandInputSpec, AFNIPythonCommand, Info, no_afni) class CentralityInputSpec(AFNICommandInputSpec): @@ -47,17 +46,7 @@ class CentralityInputSpec(AFNICommandInputSpec): desc='Mask the dataset to target brain-only voxels', argstr='-automask') -class AlignEpiAnatPyInputSpec(CommandLineInputSpec): - outputtype = traits.Enum('AFNI', list(Info.ftypes.keys()), - desc='AFNI output filetype') - py27_path = File( - desc='Path to Python 2.7 executable for running afni python scripts', - argstr='%s '+spawn.find_executable('align_epi_anat.py'), - exists=True, - #default='/opt/miniconda/envs/py27/bin/python', - mandatory=True, - position=0 - ) +class AlignEpiAnatPyInputSpec(AFNIPythonCommandInputSpec): in_file = File( desc='EPI dataset to align', argstr='-epi %s', @@ -70,13 +59,14 @@ class AlignEpiAnatPyInputSpec(CommandLineInputSpec): mandatory=True, exists=True, copyfile=False) - epi_base = traits.Str( + epi_base = traits.Either( + traits.Range(low=0), + traits.Enum('mean', 'median', 'max'), desc='the epi base used in alignment' 'should be one of (0/mean/median/max/subbrick#)', mandatory=True, argstr='-epi_base %s') anat2epi = traits.Bool( - default = True, desc='align anatomical to EPI dataset (default)', argstr='-anat2epi') epi2anat = traits.Bool( @@ -86,24 +76,30 @@ class AlignEpiAnatPyInputSpec(CommandLineInputSpec): desc='save skull-stripped (not aligned)', argstr='-save_skullstrip') suffix = traits.Str( + '_al', desc='append suffix to the original anat/epi dataset to use' 'in the resulting dataset names (default is "_al")', + usedefault=True, argstr='-suffix %s') - epi_strip = traits.Enum(('3dSkullStrip','3dAutomask','None'), - desc='method to mask brain in EPI data' + epi_strip = traits.Enum( + ('3dSkullStrip', '3dAutomask', 'None'), + desc='method to mask brain in EPI data' 'should be one of[3dSkullStrip]/3dAutomask/None)', argstr='-epi_strip %s') - volreg = traits.Enum(('on','off'), + volreg = traits.Enum( + 'on', 'off', + usedefault=True, desc='do volume registration on EPI dataset before alignment' 'should be \'on\' or \'off\', defaults to \'on\'', - default='on', argstr='-volreg %s') - tshift = traits.Enum(('on','off'), + tshift = traits.Enum( + 'on', 'off', + usedefault=True, desc='do time shifting of EPI dataset before alignment' 'should be \'on\' or \'off\', defaults to \'on\'', - default='on', argstr='-tshift %s') + class AlignEpiAnatPyOutputSpec(TraitedSpec): anat_al_orig = File( desc="A version of the anatomy that is aligned to the EPI") @@ -129,8 +125,8 @@ class AlignEpiAnatPyOutputSpec(TraitedSpec): skullstrip = File( desc="skull-stripped (not aligned) volume") -class AlignEpiAnatPy(AFNICommand): - """align EPI to anatomical datasets or vice versa +class AlignEpiAnatPy(AFNIPythonCommand): + """Align EPI to anatomical datasets or vice versa This Python script computes the alignment between two datasets, typically an EPI and an anatomical structural dataset, and applies the resulting transformation to one or the other to bring them into alignment. @@ -165,19 +161,18 @@ class AlignEpiAnatPy(AFNICommand): ======== >>> from nipype.interfaces import afni >>> al_ea = afni.AlignEpiAnatPy() - >>> al_ea.inputs.py27_path = "/opt/miniconda/envs/py27/bin/python" >>> al_ea.inputs.anat = "structural.nii" >>> al_ea.inputs.in_file = "functional.nii" - >>> al_ea.inputs.epi_base = '0' + >>> al_ea.inputs.epi_base = 0 >>> al_ea.inputs.epi_strip = '3dAutomask' >>> al_ea.inputs.volreg = 'off' >>> al_ea.inputs.tshift = 'off' >>> al_ea.inputs.save_skullstrip = True >>> al_ea.cmdline # doctest: +ALLOW_UNICODE - 'echo "" && /opt/miniconda/envs/py27/bin/python /root/abin/align_epi_anat.py -anat structural.nii -epi_base 0 -epi_strip 3dAutomask -epi functional.nii -save_skullstrip -tshift off -volreg off' + 'python2 /usr/lib/afni/bin/align_epi_anat.py -anat structural.nii -epi_base 0 -epi_strip 3dAutomask -epi functional.nii -save_skullstrip -suffix _al -tshift off -volreg off' >>> res = allineate.run() # doctest: +SKIP """ - _cmd = 'echo "" && ' + _cmd = 'align_epi_anat.py' input_spec = AlignEpiAnatPyInputSpec output_spec = AlignEpiAnatPyOutputSpec @@ -185,28 +180,29 @@ def _list_outputs(self): outputs = self.output_spec().get() anat_prefix = ''.join(self._gen_fname(self.inputs.anat).split('+')[:-1]) epi_prefix = ''.join(self._gen_fname(self.inputs.in_file).split('+')[:-1]) - ext = '.HEAD' - matext='.1D' - if not isdefined(self.inputs.suffix): - suffix = '_al' + outputtype = self.inputs.outputtype + if outputtype == 'AFNI': + ext = '.HEAD' else: - suffix = '_'+self.inputs.suffix + Info.output_type_to_ext(outputtype) + matext = '.1D' + suffix = self.inputs.suffix if self.inputs.anat2epi: - outputs['anat_al_orig'] = os.path.abspath(self._gen_fname(anat_prefix, suffix=suffix+'+orig')+ext) - outputs['anat_al_mat'] = os.path.abspath(self._gen_fname(anat_prefix, suffix=suffix+'_mat.aff12')+matext) + outputs['anat_al_orig'] = self._gen_fname(anat_prefix, suffix=suffix+'+orig', ext=ext) + outputs['anat_al_mat'] = self._gen_fname(anat_prefix, suffix=suffix+'_mat.aff12', ext=matext) if self.inputs.epi2anat: - outputs['epi_al_orig'] = os.path.abspath(self._gen_fname(epi_prefix, suffix=suffix+'+orig')+ext) - outputs['epi_al_mat'] = os.path.abspath(self._gen_fname(epi_prefix, suffix=suffix+'_mat.aff12')+matext) + outputs['epi_al_orig'] = self._gen_fname(epi_prefix, suffix=suffix+'+orig', ext=ext) + outputs['epi_al_mat'] = self._gen_fname(epi_prefix, suffix=suffix+'_mat.aff12', ext=matext) if self.inputs.volreg == 'on': - outputs['epi_vr_al_mat'] = os.path.abspath(self._gen_fname(epi_prefix, suffix='_vr'+suffix+'_mat.aff12')+matext) + outputs['epi_vr_al_mat'] = self._gen_fname(epi_prefix, suffix='_vr'+suffix+'_mat.aff12', ext=matext) if self.inputs.tshift == 'on': - outputs['epi_vr_motion'] = os.path.abspath(self._gen_fname(epi_prefix, suffix='tsh_vr_motion')+matext) + outputs['epi_vr_motion'] = self._gen_fname(epi_prefix, suffix='tsh_vr_motion', ext=matext) elif self.inputs.tshift == 'off': - outputs['epi_vr_motion'] = os.path.abspath(self._gen_fname(epi_prefix, suffix='vr_motion')+matext) + outputs['epi_vr_motion'] = self._gen_fname(epi_prefix, suffix='vr_motion', ext=matext) if self.inputs.volreg == 'on' and self.inputs.epi2anat: - outputs['epi_reg_al_mat']= os.path.abspath(self._gen_fname(epi_prefix, suffix='_reg'+suffix+'_mat.aff12')+matext) + outputs['epi_reg_al_mat'] = self._gen_fname(epi_prefix, suffix='_reg'+suffix+'_mat.aff12', ext=matext) if self.inputs.save_skullstrip: - outputs.skullstrip = os.path.abspath(self._gen_fname(anat_prefix, suffix='_ns'+'+orig')+ext) + outputs.skullstrip = self._gen_fname(anat_prefix, suffix='_ns'+'+orig', ext=ext) return outputs class AllineateInputSpec(AFNICommandInputSpec): diff --git a/nipype/interfaces/afni/utils.py b/nipype/interfaces/afni/utils.py index 1495224236..24be4a7337 100644 --- a/nipype/interfaces/afni/utils.py +++ b/nipype/interfaces/afni/utils.py @@ -25,9 +25,9 @@ CommandLineInputSpec, CommandLine, Directory, TraitedSpec, traits, isdefined, File, InputMultiPath, Undefined, Str) from ...external.due import BibTeX -from distutils import spawn from .base import ( - AFNICommandBase, AFNICommand, AFNICommandInputSpec, AFNICommandOutputSpec) + AFNICommandBase, AFNICommand, AFNICommandInputSpec, AFNICommandOutputSpec, + AFNIPythonCommandInputSpec, AFNIPythonCommand) class ABoverlapInputSpec(AFNICommandInputSpec): in_file_a = File( @@ -330,7 +330,6 @@ class BucketInputSpec(AFNICommandInputSpec): traits.Tuple( (File( exists=True, - desc='input file', copyfile=False), traits.Str(argstr="'%s'")), artstr="%s%s"), @@ -768,7 +767,7 @@ class Dot(AFNICommand): >>> res = copy3d.run() # doctest: +SKIP """ - _cmd='3dDot' + _cmd = '3dDot' input_spec = DotInputSpec output_spec = AFNICommandOutputSpec @@ -785,7 +784,7 @@ class Edge3InputSpec(AFNICommandInputSpec): position=-1, argstr='-prefix %s') datum = traits.Enum( - 'byte','short','float', + 'byte', 'short', 'float', argstr='-datum %s', desc='specify data type for output. Valid types are \'byte\', ' '\'short\' and \'float\'.') @@ -1494,20 +1493,12 @@ class NwarpApply(AFNICommandBase): input_spec = NwarpApplyInputSpec output_spec = AFNICommandOutputSpec -class OneDToolPyInputSpec(AFNICommandInputSpec): +class OneDToolPyInputSpec(AFNIPythonCommandInputSpec): in_file = File( desc='input file to OneDTool', argstr='-infile %s', mandatory=True, exists=True) - py27_path = File( - desc='Path to Python 2.7 executable for running afni python scripts', - argstr='%s '+spawn.find_executable('1d_tool.py'), - exists=True, - default='/opt/miniconda/envs/py27/bin/python', - usedefault=True, - position=0 - ) set_nruns = traits.Int( desc='treat the input data as if it has nruns', argstr='-set_nruns %d') @@ -1553,23 +1544,22 @@ class OneDToolPyInputSpec(AFNICommandInputSpec): class OneDToolPyOutputSpec(AFNICommandOutputSpec): out_file = File(desc='output of 1D_tool.py') -class OneDToolPy(AFNICommandBase): +class OneDToolPy(AFNIPythonCommand): """This program is meant to read/manipulate/write/diagnose 1D datasets. Input can be specified using AFNI sub-brick[]/time{} selectors. >>> from nipype.interfaces import afni >>> odt = afni.OneDToolPy() >>> odt.inputs.in_file = 'f1.1D' - >>> odt.inputs.py27_path = "/opt/miniconda/envs/py27/bin/python" >>> odt.inputs.set_nruns = 3 >>> odt.inputs.demean = True >>> odt.inputs.out_file = 'motion_dmean.1D' >>> odt.cmdline # doctest: +ALLOW_UNICODE - 'echo "" && /opt/miniconda/envs/py27/bin/python /root/abin/1d_tool.py -demean -infile f1.1D -write motion_dmean.1D -set_nruns 3' + 'python2 /usr/lib/afni/bin/1d_tool.py -demean -infile f1.1D -write motion_dmean.1D -set_nruns 3' >>> res = odt.run() # doctest: +SKIP """ - _cmd = 'echo "" && ' + _cmd = '1d_tool.py' input_spec = OneDToolPyInputSpec output_spec = OneDToolPyOutputSpec From 1dd9e7e4ebe7b6ccf13adcdd1ff4f780bddbd8cc Mon Sep 17 00:00:00 2001 From: Dylan Date: Mon, 7 Aug 2017 13:49:35 -0400 Subject: [PATCH 141/643] [FIX] Auto tests --- .../afni/tests/test_auto_ABoverlap.py | 52 ++++++++++++++ .../afni/tests/test_auto_AFNIPythonCommand.py | 28 ++++++++ .../afni/tests/test_auto_AlignEpiAnatPy.py | 72 +++++++++++++++++++ .../afni/tests/test_auto_Allineate.py | 16 +++-- .../afni/tests/test_auto_AutoTLRC.py | 42 +++++++++++ .../interfaces/afni/tests/test_auto_Bucket.py | 40 +++++++++++ .../interfaces/afni/tests/test_auto_Calc.py | 2 + .../afni/tests/test_auto_CatMatvec.py | 55 ++++++++++++++ nipype/interfaces/afni/tests/test_auto_Dot.py | 63 ++++++++++++++++ .../interfaces/afni/tests/test_auto_Means.py | 6 +- .../afni/tests/test_auto_OneDToolPy.py | 64 +++++++++++++++++ .../interfaces/afni/tests/test_auto_TNorm.py | 54 ++++++++++++++ .../interfaces/afni/tests/test_auto_Volreg.py | 2 + 13 files changed, 488 insertions(+), 8 deletions(-) create mode 100644 nipype/interfaces/afni/tests/test_auto_ABoverlap.py create mode 100644 nipype/interfaces/afni/tests/test_auto_AFNIPythonCommand.py create mode 100644 nipype/interfaces/afni/tests/test_auto_AlignEpiAnatPy.py create mode 100644 nipype/interfaces/afni/tests/test_auto_AutoTLRC.py create mode 100644 nipype/interfaces/afni/tests/test_auto_Bucket.py create mode 100644 nipype/interfaces/afni/tests/test_auto_CatMatvec.py create mode 100644 nipype/interfaces/afni/tests/test_auto_Dot.py create mode 100644 nipype/interfaces/afni/tests/test_auto_OneDToolPy.py create mode 100644 nipype/interfaces/afni/tests/test_auto_TNorm.py diff --git a/nipype/interfaces/afni/tests/test_auto_ABoverlap.py b/nipype/interfaces/afni/tests/test_auto_ABoverlap.py new file mode 100644 index 0000000000..93219fe3dc --- /dev/null +++ b/nipype/interfaces/afni/tests/test_auto_ABoverlap.py @@ -0,0 +1,52 @@ +# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT +from __future__ import unicode_literals +from ..utils import ABoverlap + + +def test_ABoverlap_inputs(): + input_map = dict(args=dict(argstr='%s', + ), + environ=dict(nohash=True, + usedefault=True, + ), + ignore_exception=dict(nohash=True, + usedefault=True, + ), + in_file_a=dict(argstr='%s', + copyfile=False, + mandatory=True, + position=-3, + ), + in_file_b=dict(argstr='%s', + copyfile=False, + mandatory=True, + position=-2, + ), + no_automask=dict(argstr='-no_automask', + ), + out_file=dict(argstr=' |& tee %s', + position=-1, + ), + outputtype=dict(), + quiet=dict(argstr='-quiet', + ), + terminal_output=dict(nohash=True, + ), + verb=dict(argstr='-verb', + ), + ) + inputs = ABoverlap.input_spec() + + for key, metadata in list(input_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(inputs.traits()[key], metakey) == value + + +def test_ABoverlap_outputs(): + output_map = dict(out_file=dict(), + ) + outputs = ABoverlap.output_spec() + + for key, metadata in list(output_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(outputs.traits()[key], metakey) == value diff --git a/nipype/interfaces/afni/tests/test_auto_AFNIPythonCommand.py b/nipype/interfaces/afni/tests/test_auto_AFNIPythonCommand.py new file mode 100644 index 0000000000..e8efb62f5d --- /dev/null +++ b/nipype/interfaces/afni/tests/test_auto_AFNIPythonCommand.py @@ -0,0 +1,28 @@ +# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT +from __future__ import unicode_literals +from ..base import AFNIPythonCommand + + +def test_AFNIPythonCommand_inputs(): + input_map = dict(args=dict(argstr='%s', + ), + environ=dict(nohash=True, + usedefault=True, + ), + ignore_exception=dict(nohash=True, + usedefault=True, + ), + out_file=dict(argstr='-prefix %s', + name_source=['in_file'], + name_template='%s_afni', + ), + outputtype=dict(), + terminal_output=dict(nohash=True, + ), + ) + inputs = AFNIPythonCommand.input_spec() + + for key, metadata in list(input_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(inputs.traits()[key], metakey) == value + diff --git a/nipype/interfaces/afni/tests/test_auto_AlignEpiAnatPy.py b/nipype/interfaces/afni/tests/test_auto_AlignEpiAnatPy.py new file mode 100644 index 0000000000..8193270c5d --- /dev/null +++ b/nipype/interfaces/afni/tests/test_auto_AlignEpiAnatPy.py @@ -0,0 +1,72 @@ +# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT +from __future__ import unicode_literals +from ..preprocess import AlignEpiAnatPy + + +def test_AlignEpiAnatPy_inputs(): + input_map = dict(anat=dict(argstr='-anat %s', + copyfile=False, + mandatory=True, + ), + anat2epi=dict(argstr='-anat2epi', + ), + args=dict(argstr='%s', + ), + environ=dict(nohash=True, + usedefault=True, + ), + epi2anat=dict(argstr='-epi2anat', + ), + epi_base=dict(argstr='-epi_base %s', + mandatory=True, + ), + epi_strip=dict(argstr='-epi_strip %s', + ), + ignore_exception=dict(nohash=True, + usedefault=True, + ), + in_file=dict(argstr='-epi %s', + copyfile=False, + mandatory=True, + ), + outputtype=dict(), + py27_path=dict(usedefault=True, + ), + save_skullstrip=dict(argstr='-save_skullstrip', + ), + suffix=dict(argstr='-suffix %s', + usedefault=True, + ), + terminal_output=dict(nohash=True, + ), + tshift=dict(argstr='-tshift %s', + usedefault=True, + ), + volreg=dict(argstr='-volreg %s', + usedefault=True, + ), + ) + inputs = AlignEpiAnatPy.input_spec() + + for key, metadata in list(input_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(inputs.traits()[key], metakey) == value + + +def test_AlignEpiAnatPy_outputs(): + output_map = dict(anat_al_mat=dict(), + anat_al_orig=dict(), + epi_al_mat=dict(), + epi_al_orig=dict(), + epi_al_tlrc_mat=dict(), + epi_reg_al_mat=dict(), + epi_tlrc_al=dict(), + epi_vr_al_mat=dict(), + epi_vr_motion=dict(), + skullstrip=dict(), + ) + outputs = AlignEpiAnatPy.output_spec() + + for key, metadata in list(output_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(outputs.traits()[key], metakey) == value diff --git a/nipype/interfaces/afni/tests/test_auto_Allineate.py b/nipype/interfaces/afni/tests/test_auto_Allineate.py index 0bf37ea8cd..95ec4f20ad 100644 --- a/nipype/interfaces/afni/tests/test_auto_Allineate.py +++ b/nipype/interfaces/afni/tests/test_auto_Allineate.py @@ -4,7 +4,11 @@ def test_Allineate_inputs(): - input_map = dict(args=dict(argstr='%s', + input_map = dict(allcostx=dict(argstr='-allcostx |& tee %s', + position=-1, + xor=['out_file'], + ), + args=dict(argstr='%s', ), autobox=dict(argstr='-autobox', ), @@ -35,10 +39,8 @@ def test_Allineate_inputs(): in_file=dict(argstr='-source %s', copyfile=False, mandatory=True, - position=-1, ), in_matrix=dict(argstr='-1Dmatrix_apply %s', - position=-3, ), in_param_file=dict(argstr='-1Dparam_apply %s', ), @@ -64,8 +66,9 @@ def test_Allineate_inputs(): ), out_file=dict(argstr='-prefix %s', genfile=True, - name_source='%s_allineate', - position=-2, + name_source='in_file', + name_template='%s_allineate', + xor=['allcostx'], ), out_matrix=dict(argstr='-1Dmatrix_save %s', ), @@ -113,7 +116,8 @@ def test_Allineate_inputs(): def test_Allineate_outputs(): - output_map = dict(matrix=dict(), + output_map = dict(allcostx=dict(), + matrix=dict(), out_file=dict(), ) outputs = Allineate.output_spec() diff --git a/nipype/interfaces/afni/tests/test_auto_AutoTLRC.py b/nipype/interfaces/afni/tests/test_auto_AutoTLRC.py new file mode 100644 index 0000000000..3c95374697 --- /dev/null +++ b/nipype/interfaces/afni/tests/test_auto_AutoTLRC.py @@ -0,0 +1,42 @@ +# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT +from __future__ import unicode_literals +from ..preprocess import AutoTLRC + + +def test_AutoTLRC_inputs(): + input_map = dict(args=dict(argstr='%s', + ), + base=dict(argstr='-base %s', + mandatory=True, + ), + environ=dict(nohash=True, + usedefault=True, + ), + ignore_exception=dict(nohash=True, + usedefault=True, + ), + in_file=dict(argstr='-input %s', + copyfile=False, + mandatory=True, + ), + no_ss=dict(argstr='-no_ss', + ), + outputtype=dict(), + terminal_output=dict(nohash=True, + ), + ) + inputs = AutoTLRC.input_spec() + + for key, metadata in list(input_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(inputs.traits()[key], metakey) == value + + +def test_AutoTLRC_outputs(): + output_map = dict(out_file=dict(), + ) + outputs = AutoTLRC.output_spec() + + for key, metadata in list(output_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(outputs.traits()[key], metakey) == value diff --git a/nipype/interfaces/afni/tests/test_auto_Bucket.py b/nipype/interfaces/afni/tests/test_auto_Bucket.py new file mode 100644 index 0000000000..1cf812fd73 --- /dev/null +++ b/nipype/interfaces/afni/tests/test_auto_Bucket.py @@ -0,0 +1,40 @@ +# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT +from __future__ import unicode_literals +from ..utils import Bucket + + +def test_Bucket_inputs(): + input_map = dict(args=dict(argstr='%s', + ), + environ=dict(nohash=True, + usedefault=True, + ), + ignore_exception=dict(nohash=True, + usedefault=True, + ), + in_file=dict(argstr='%s', + mandatory=True, + position=-1, + ), + out_file=dict(argstr='-prefix %s', + name_template='buck', + ), + outputtype=dict(), + terminal_output=dict(nohash=True, + ), + ) + inputs = Bucket.input_spec() + + for key, metadata in list(input_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(inputs.traits()[key], metakey) == value + + +def test_Bucket_outputs(): + output_map = dict(out_file=dict(), + ) + outputs = Bucket.output_spec() + + for key, metadata in list(output_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(outputs.traits()[key], metakey) == value diff --git a/nipype/interfaces/afni/tests/test_auto_Calc.py b/nipype/interfaces/afni/tests/test_auto_Calc.py index af790bd5d2..aa9d1222b7 100644 --- a/nipype/interfaces/afni/tests/test_auto_Calc.py +++ b/nipype/interfaces/afni/tests/test_auto_Calc.py @@ -33,6 +33,8 @@ def test_Calc_inputs(): name_template='%s_calc', ), outputtype=dict(), + overwrite=dict(argstr='-overwrite', + ), single_idx=dict(), start_idx=dict(requires=['stop_idx'], ), diff --git a/nipype/interfaces/afni/tests/test_auto_CatMatvec.py b/nipype/interfaces/afni/tests/test_auto_CatMatvec.py new file mode 100644 index 0000000000..4b79cd91d8 --- /dev/null +++ b/nipype/interfaces/afni/tests/test_auto_CatMatvec.py @@ -0,0 +1,55 @@ +# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT +from __future__ import unicode_literals +from ..utils import CatMatvec + + +def test_CatMatvec_inputs(): + input_map = dict(args=dict(argstr='%s', + ), + environ=dict(nohash=True, + usedefault=True, + ), + fourxfour=dict(argstr='-4x4', + descr='Output matrix in augmented form (last row is 0 0 0 1)This option does not work with -MATRIX or -ONELINE', + xor=['matrix', 'oneline'], + ), + ignore_exception=dict(nohash=True, + usedefault=True, + ), + in_file=dict(argstr='%s', + descr='list of tuples of mfiles and associated opkeys', + mandatory=True, + position=-2, + ), + matrix=dict(argstr='-MATRIX', + descr="indicates that the resulting matrix willbe written to outfile in the 'MATRIX(...)' format (FORM 3).This feature could be used, with clever scripting, to inputa matrix directly on the command line to program 3dWarp.", + xor=['oneline', 'fourXfour'], + ), + oneline=dict(argstr='-ONELINE', + descr='indicates that the resulting matrixwill simply be written as 12 numbers on one line.', + xor=['matrix', 'fourXfour'], + ), + out_file=dict(argstr=' > %s', + descr='File to write concattenated matvecs to', + mandatory=True, + position=-1, + ), + outputtype=dict(), + terminal_output=dict(nohash=True, + ), + ) + inputs = CatMatvec.input_spec() + + for key, metadata in list(input_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(inputs.traits()[key], metakey) == value + + +def test_CatMatvec_outputs(): + output_map = dict(out_file=dict(), + ) + outputs = CatMatvec.output_spec() + + for key, metadata in list(output_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(outputs.traits()[key], metakey) == value diff --git a/nipype/interfaces/afni/tests/test_auto_Dot.py b/nipype/interfaces/afni/tests/test_auto_Dot.py new file mode 100644 index 0000000000..21cebb28fe --- /dev/null +++ b/nipype/interfaces/afni/tests/test_auto_Dot.py @@ -0,0 +1,63 @@ +# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT +from __future__ import unicode_literals +from ..utils import Dot + + +def test_Dot_inputs(): + input_map = dict(args=dict(argstr='%s', + ), + demean=dict(argstr='-demean', + ), + docoef=dict(argstr='-docoef', + ), + docor=dict(argstr='-docor', + ), + dodice=dict(argstr='-dodice', + ), + dodot=dict(argstr='-dodot', + ), + doeta2=dict(argstr='-doeta2', + ), + dosums=dict(argstr='-dosums', + ), + environ=dict(nohash=True, + usedefault=True, + ), + full=dict(argstr='-full', + ), + ignore_exception=dict(nohash=True, + usedefault=True, + ), + in_files=dict(argstr='%s ...', + position=-2, + ), + mask=dict(argstr='-mask %s', + ), + mrange=dict(argstr='-mrange %s %s', + ), + out_file=dict(argstr=' |& tee %s', + position=-1, + ), + outputtype=dict(), + show_labels=dict(argstr='-show_labels', + ), + terminal_output=dict(nohash=True, + ), + upper=dict(argstr='-upper', + ), + ) + inputs = Dot.input_spec() + + for key, metadata in list(input_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(inputs.traits()[key], metakey) == value + + +def test_Dot_outputs(): + output_map = dict(out_file=dict(), + ) + outputs = Dot.output_spec() + + for key, metadata in list(output_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(outputs.traits()[key], metakey) == value diff --git a/nipype/interfaces/afni/tests/test_auto_Means.py b/nipype/interfaces/afni/tests/test_auto_Means.py index 5bbbde8c94..03bab07dcc 100644 --- a/nipype/interfaces/afni/tests/test_auto_Means.py +++ b/nipype/interfaces/afni/tests/test_auto_Means.py @@ -8,6 +8,8 @@ def test_Means_inputs(): ), count=dict(argstr='-count', ), + datum=dict(argstr='-datum %s', + ), environ=dict(nohash=True, usedefault=True, ), @@ -16,10 +18,10 @@ def test_Means_inputs(): ), in_file_a=dict(argstr='%s', mandatory=True, - position=0, + position=-2, ), in_file_b=dict(argstr='%s', - position=1, + position=-1, ), mask_inter=dict(argstr='-mask_inter', ), diff --git a/nipype/interfaces/afni/tests/test_auto_OneDToolPy.py b/nipype/interfaces/afni/tests/test_auto_OneDToolPy.py new file mode 100644 index 0000000000..fd6aed4b12 --- /dev/null +++ b/nipype/interfaces/afni/tests/test_auto_OneDToolPy.py @@ -0,0 +1,64 @@ +# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT +from __future__ import unicode_literals +from ..utils import OneDToolPy + + +def test_OneDToolPy_inputs(): + input_map = dict(args=dict(argstr='%s', + ), + censor_motion=dict(argstr='-censor_motion %f %s', + ), + censor_prev_TR=dict(argstr='-censor_prev_TR', + ), + demean=dict(argstr='-demean', + ), + derivative=dict(argstr='-derivative', + ), + environ=dict(nohash=True, + usedefault=True, + ), + ignore_exception=dict(nohash=True, + usedefault=True, + ), + in_file=dict(argstr='-infile %s', + mandatory=True, + ), + out_file=dict(argstr='-write %s', + xor=['show_cormat_warnings'], + ), + outputtype=dict(), + py27_path=dict(usedefault=True, + ), + set_nruns=dict(argstr='-set_nruns %d', + ), + show_censor_count=dict(argstr='-show_censor_count', + ), + show_cormat_warnings=dict(argstr='-show_cormat_warnings |& tee %s', + position=-1, + usedefault=False, + xor=['out_file'], + ), + show_indices_interest=dict(argstr='-show_indices_interest', + ), + show_trs_run=dict(argstr='-show_trs_run %d', + ), + show_trs_uncensored=dict(argstr='-show_trs_uncensored %s', + ), + terminal_output=dict(nohash=True, + ), + ) + inputs = OneDToolPy.input_spec() + + for key, metadata in list(input_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(inputs.traits()[key], metakey) == value + + +def test_OneDToolPy_outputs(): + output_map = dict(out_file=dict(), + ) + outputs = OneDToolPy.output_spec() + + for key, metadata in list(output_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(outputs.traits()[key], metakey) == value diff --git a/nipype/interfaces/afni/tests/test_auto_TNorm.py b/nipype/interfaces/afni/tests/test_auto_TNorm.py new file mode 100644 index 0000000000..3b9fac4b98 --- /dev/null +++ b/nipype/interfaces/afni/tests/test_auto_TNorm.py @@ -0,0 +1,54 @@ +# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT +from __future__ import unicode_literals +from ..preprocess import TNorm + + +def test_TNorm_inputs(): + input_map = dict(L1fit=dict(argstr='-L1fit', + ), + args=dict(argstr='%s', + ), + environ=dict(nohash=True, + usedefault=True, + ), + ignore_exception=dict(nohash=True, + usedefault=True, + ), + in_file=dict(argstr='%s', + copyfile=False, + mandatory=True, + position=-1, + ), + norm1=dict(argstr='-norm1', + ), + norm2=dict(argstr='-norm2', + ), + normR=dict(argstr='-normR', + ), + normx=dict(argstr='-normx', + ), + out_file=dict(argstr='-prefix %s', + name_source='in_file', + name_template='%s_tnorm', + ), + outputtype=dict(), + polort=dict(argstr='-polort %s', + ), + terminal_output=dict(nohash=True, + ), + ) + inputs = TNorm.input_spec() + + for key, metadata in list(input_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(inputs.traits()[key], metakey) == value + + +def test_TNorm_outputs(): + output_map = dict(out_file=dict(), + ) + outputs = TNorm.output_spec() + + for key, metadata in list(output_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(outputs.traits()[key], metakey) == value diff --git a/nipype/interfaces/afni/tests/test_auto_Volreg.py b/nipype/interfaces/afni/tests/test_auto_Volreg.py index 915000e5b1..314ac04743 100644 --- a/nipype/interfaces/afni/tests/test_auto_Volreg.py +++ b/nipype/interfaces/afni/tests/test_auto_Volreg.py @@ -22,6 +22,8 @@ def test_Volreg_inputs(): mandatory=True, position=-1, ), + interp=dict(argstr='-%s', + ), md1d_file=dict(argstr='-maxdisp1D %s', keep_extension=True, name_source='in_file', From 12e6988ad415cb2fe9703c186d6896a5b16c2b1b Mon Sep 17 00:00:00 2001 From: Dylan Date: Mon, 7 Aug 2017 14:17:55 -0400 Subject: [PATCH 142/643] [FIX] Volreg doctest allow unicode --- nipype/interfaces/afni/preprocess.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nipype/interfaces/afni/preprocess.py b/nipype/interfaces/afni/preprocess.py index 5efe416cee..e648acc2b7 100644 --- a/nipype/interfaces/afni/preprocess.py +++ b/nipype/interfaces/afni/preprocess.py @@ -2629,7 +2629,7 @@ class Volreg(AFNICommand): >>> volreg.inputs.out_file = 'rm.epi.volreg.r1' >>> volreg.inputs.oned_file = 'dfile.r1.1D' >>> volreg.inputs.oned_matrix_save = 'mat.r1.tshift+orig.1D' - >>> volreg.cmdline + >>> volreg.cmdline # doctest: +ALLOW_UNICODE '3dvolreg -cubic -1Dfile dfile.r1.1D -1Dmatrix_save mat.r1.tshift+orig.1D -prefix rm.epi.volreg.r1 -verbose -base functional.nii -zpad 1 -maxdisp1D functional_md.1D functional.nii' >>> res = volreg.run() # doctest: +SKIP From 1575d2dab8d94edbbb481836aa5a97c7c0d60a27 Mon Sep 17 00:00:00 2001 From: Dylan Date: Mon, 7 Aug 2017 16:48:00 -0400 Subject: [PATCH 143/643] [FIX] Tnorm docstring --- nipype/interfaces/afni/preprocess.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nipype/interfaces/afni/preprocess.py b/nipype/interfaces/afni/preprocess.py index e648acc2b7..db2d2d61e9 100644 --- a/nipype/interfaces/afni/preprocess.py +++ b/nipype/interfaces/afni/preprocess.py @@ -2438,8 +2438,8 @@ class TNorm(AFNICommand): """Shifts voxel time series from input so that seperate slices are aligned to the same temporal origin. - For complete details, see the `3dTshift Documentation. - `_ + For complete details, see the `3dTnorm Documentation. + `_ Examples ======== From 8776b5550ade6a0c2d65919d9e61852042b5e0d4 Mon Sep 17 00:00:00 2001 From: Dylan Date: Tue, 8 Aug 2017 10:09:28 -0400 Subject: [PATCH 144/643] [FIX] Add ellipsis to doctests. CMD if path not found --- nipype/interfaces/afni/base.py | 5 ++++- nipype/interfaces/afni/preprocess.py | 4 ++-- nipype/interfaces/afni/utils.py | 4 ++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/nipype/interfaces/afni/base.py b/nipype/interfaces/afni/base.py index 7c92f267b8..ca30dbf2bf 100644 --- a/nipype/interfaces/afni/base.py +++ b/nipype/interfaces/afni/base.py @@ -295,7 +295,10 @@ class AFNIPythonCommandInputSpec(CommandLineInputSpec): class AFNIPythonCommand(AFNICommand): @property def cmd(self): - return spawn.find_executable(super(AFNIPythonCommand, self).cmd) + if spawn.find_executable(super(AFNIPythonCommand, self).cmd) != '': + return spawn.find_executable(super(AFNIPythonCommand, self).cmd) + else: + return super(AFNIPythonCommand, self).cmd @property def cmdline(self): diff --git a/nipype/interfaces/afni/preprocess.py b/nipype/interfaces/afni/preprocess.py index db2d2d61e9..e0e2518ef1 100644 --- a/nipype/interfaces/afni/preprocess.py +++ b/nipype/interfaces/afni/preprocess.py @@ -168,8 +168,8 @@ class AlignEpiAnatPy(AFNIPythonCommand): >>> al_ea.inputs.volreg = 'off' >>> al_ea.inputs.tshift = 'off' >>> al_ea.inputs.save_skullstrip = True - >>> al_ea.cmdline # doctest: +ALLOW_UNICODE - 'python2 /usr/lib/afni/bin/align_epi_anat.py -anat structural.nii -epi_base 0 -epi_strip 3dAutomask -epi functional.nii -save_skullstrip -suffix _al -tshift off -volreg off' + >>> al_ea.cmdline # doctest: +ALLOW_UNICODE +ELLIPSIS + 'python2 ...align_epi_anat.py -anat structural.nii -epi_base 0 -epi_strip 3dAutomask -epi functional.nii -save_skullstrip -suffix _al -tshift off -volreg off' >>> res = allineate.run() # doctest: +SKIP """ _cmd = 'align_epi_anat.py' diff --git a/nipype/interfaces/afni/utils.py b/nipype/interfaces/afni/utils.py index 24be4a7337..e49f4164df 100644 --- a/nipype/interfaces/afni/utils.py +++ b/nipype/interfaces/afni/utils.py @@ -1554,8 +1554,8 @@ class OneDToolPy(AFNIPythonCommand): >>> odt.inputs.set_nruns = 3 >>> odt.inputs.demean = True >>> odt.inputs.out_file = 'motion_dmean.1D' - >>> odt.cmdline # doctest: +ALLOW_UNICODE - 'python2 /usr/lib/afni/bin/1d_tool.py -demean -infile f1.1D -write motion_dmean.1D -set_nruns 3' + >>> odt.cmdline # doctest: +ALLOW_UNICODE +ELLIPSIS + 'python2 ...1d_tool.py -demean -infile f1.1D -write motion_dmean.1D -set_nruns 3' >>> res = odt.run() # doctest: +SKIP """ From 0cb9e45c4c0a5eba56bf574a6fe4721abf2823a3 Mon Sep 17 00:00:00 2001 From: Dylan Date: Tue, 8 Aug 2017 10:39:47 -0400 Subject: [PATCH 145/643] [FIX] Don't return empty command --- nipype/interfaces/afni/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nipype/interfaces/afni/base.py b/nipype/interfaces/afni/base.py index ca30dbf2bf..82c695b55b 100644 --- a/nipype/interfaces/afni/base.py +++ b/nipype/interfaces/afni/base.py @@ -295,7 +295,7 @@ class AFNIPythonCommandInputSpec(CommandLineInputSpec): class AFNIPythonCommand(AFNICommand): @property def cmd(self): - if spawn.find_executable(super(AFNIPythonCommand, self).cmd) != '': + if spawn.find_executable(super(AFNIPythonCommand, self).cmd) is not None: return spawn.find_executable(super(AFNIPythonCommand, self).cmd) else: return super(AFNIPythonCommand, self).cmd From 1254589a05d0519b17982759ec9c4bee219e6198 Mon Sep 17 00:00:00 2001 From: Dylan Date: Tue, 8 Aug 2017 12:26:21 -0400 Subject: [PATCH 146/643] [ENH] Add tcat interface that accepts subbrick selectors --- nipype/interfaces/afni/__init__.py | 2 +- nipype/interfaces/afni/utils.py | 54 ++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+), 1 deletion(-) diff --git a/nipype/interfaces/afni/__init__.py b/nipype/interfaces/afni/__init__.py index 044449fed1..e62ae79a93 100644 --- a/nipype/interfaces/afni/__init__.py +++ b/nipype/interfaces/afni/__init__.py @@ -23,6 +23,6 @@ Bucket, Calc, Cat, CatMatvec, Copy, Dot, Edge3, Eval, FWHMx, MaskTool, Merge, Notes, NwarpApply, OneDToolPy, - Refit, Resample, TCat, TStat, To3D, Unifize, ZCutUp, GCOR, + Refit, Resample, TCat, TCatSubBrick, TStat, To3D, Unifize, ZCutUp, GCOR, Zcat, Zeropad) from .model import (Deconvolve, Remlfit) diff --git a/nipype/interfaces/afni/utils.py b/nipype/interfaces/afni/utils.py index e49f4164df..e20fe1d5ff 100644 --- a/nipype/interfaces/afni/utils.py +++ b/nipype/interfaces/afni/utils.py @@ -1748,6 +1748,60 @@ class TCat(AFNICommand): input_spec = TCatInputSpec output_spec = AFNICommandOutputSpec +class TCatSBInputSpec(AFNICommandInputSpec): + in_files = traits.List( + traits.Tuple(File(exists=True),Str()), + desc='List of tuples of file names and subbrick selectors as strings.' + 'Don\'t forget to protect the single quotes in the subbrick selector' + 'so the contents are protected from the command line interpreter.', + argstr='%s%s ...', + position=-1, + mandatory=True, + copyfile=False) + out_file = File( + desc='output image file name', + argstr='-prefix %s', + genfile=True) + rlt = traits.Enum( + '', '+', '++', + argstr='-rlt%s', + desc='Remove linear trends in each voxel time series loaded from each ' + 'input dataset, SEPARATELY. Option -rlt removes the least squares ' + 'fit of \'a+b*t\' to each voxel time series. Option -rlt+ adds ' + 'dataset mean back in. Option -rlt++ adds overall mean of all ' + 'dataset timeseries back in.', + position=1) + + +class TCatSubBrick(AFNICommand): + """Hopefully a temporary function to allow sub-brick selection until + afni file managment is improved. + + For complete details, see the `3dTcat Documentation. + `_ + + Examples + ======== + + >>> from nipype.interfaces import afni + >>> tcsb = afni.TCatSubBrick() + >>> tcsb.inputs.in_files = [('functional.nii', "'{2..$}'"), ('functional2.nii', "'{2..$}'")] + >>> tcsb.inputs.out_file= 'functional_tcat.nii' + >>> tcsb.inputs.rlt = '+' + >>> tcsb.cmdline # doctest: +ALLOW_UNICODE +NORMALIZE_WHITESPACE + "3dTcat -rlt+ -prefix functional_tcat.nii functional.nii'{2..$}' functional2.nii'{2..$}' " + >>> res = tcsb.run() # doctest: +SKIP + + """ + + _cmd = '3dTcat' + input_spec = TCatSBInputSpec + output_spec = AFNICommandOutputSpec + + def _gen_filename(self, name): + if name == 'out_file': + return self._gen_fname(self.inputs.in_files[0][0], suffix='_tcat') + class TStatInputSpec(AFNICommandInputSpec): in_file = File( From 72e8fd263f09faf61ee3361433cb3003de8243de Mon Sep 17 00:00:00 2001 From: Lukas Snoek Date: Wed, 9 Aug 2017 16:20:20 +0200 Subject: [PATCH 147/643] FIX: allow grabbing a single file (fix bug assuming string is not iterable) --- nipype/interfaces/io.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/nipype/interfaces/io.py b/nipype/interfaces/io.py index 9612645126..516c92c804 100644 --- a/nipype/interfaces/io.py +++ b/nipype/interfaces/io.py @@ -948,12 +948,11 @@ def _list_outputs(self): # We must convert to the local location specified # and download the files. for key,val in outputs.items(): - #This will basically be either list-like or string-like: - #if it has the __iter__ attribute, it's list-like (list, - #tuple, numpy array) and we iterate through each of its - #values. If it doesn't, it's string-like (string, - #unicode), and we convert that value directly. - if hasattr(val,'__iter__'): + # This will basically be either list-like or string-like: + # if it's an instance of a list, we'll iterate through it. + # If it isn't, it's string-like (string, unicode), we + # convert that value directly. + if isinstance(val, (list, tuple, set)): for i,path in enumerate(val): outputs[key][i] = self.s3tolocal(path, bkt) else: From 2602952deedf7b147b7f4a231c4395a9ac93fd12 Mon Sep 17 00:00:00 2001 From: mathiasg Date: Wed, 9 Aug 2017 10:40:13 -0400 Subject: [PATCH 148/643] fix: re-add py3 printing --- nipype/utils/misc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nipype/utils/misc.py b/nipype/utils/misc.py index 552e24c435..80c44e0ad2 100644 --- a/nipype/utils/misc.py +++ b/nipype/utils/misc.py @@ -3,7 +3,7 @@ # vi: set ft=python sts=4 ts=4 sw=4 et: """Miscellaneous utility functions """ -from __future__ import print_function, division, unicode_literals, absolute_import +from __future__ import print_function, division, absolute_import from future import standard_library standard_library.install_aliases() from builtins import next, str From 18edfe3fa16265f3b3b2309e37f5bb6f20d2ef1d Mon Sep 17 00:00:00 2001 From: mathiasg Date: Wed, 9 Aug 2017 13:54:49 -0400 Subject: [PATCH 149/643] tst: ensure strings remain strings --- nipype/utils/tests/test_misc.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/nipype/utils/tests/test_misc.py b/nipype/utils/tests/test_misc.py index f2780a584f..f5f84f48bf 100644 --- a/nipype/utils/tests/test_misc.py +++ b/nipype/utils/tests/test_misc.py @@ -7,6 +7,7 @@ from builtins import next import pytest +import sys from nipype.utils.misc import (container_to_string, getsource, create_function_from_source, str2bool, flatten, @@ -81,3 +82,11 @@ def test_flatten(): back = unflatten([], []) assert back == [] + +@pytest.mark.skipif(sys.version_info[0] > 2, reason="test unicode in functions") +def test_func_py2(): + def is_string(): + return isinstance('string', str) + + wrapped_func = create_function_from_source(getsource(is_string)) + assert is_string() == wrapped_func() From 16992d8d37f591febdfa57a9c56948d252098cc4 Mon Sep 17 00:00:00 2001 From: mathiasg Date: Wed, 9 Aug 2017 17:04:24 -0400 Subject: [PATCH 150/643] ref: isolate working with functions to avoid __future__ conflicts --- doc/users/saving_workflows.rst | 2 +- nipype/interfaces/utility/wrappers.py | 2 +- nipype/pipeline/engine/utils.py | 5 +-- nipype/pipeline/engine/workflows.py | 4 +-- nipype/utils/functions.py | 47 +++++++++++++++++++++++++++ nipype/utils/misc.py | 43 +----------------------- nipype/utils/tests/test_functions.py | 37 +++++++++++++++++++++ nipype/utils/tests/test_misc.py | 34 ++----------------- 8 files changed, 94 insertions(+), 80 deletions(-) create mode 100644 nipype/utils/functions.py create mode 100644 nipype/utils/tests/test_functions.py diff --git a/doc/users/saving_workflows.rst b/doc/users/saving_workflows.rst index c97751eead..33d1e8a118 100644 --- a/doc/users/saving_workflows.rst +++ b/doc/users/saving_workflows.rst @@ -55,7 +55,7 @@ This will create a file "outputtestsave.py" with the following content: from nipype.pipeline.engine import Workflow, Node, MapNode from nipype.interfaces.utility import IdentityInterface from nipype.interfaces.utility import Function - from nipype.utils.misc import getsource + from nipype.utils.functions import getsource from nipype.interfaces.fsl.preprocess import BET from nipype.interfaces.fsl.utils import ImageMaths # Functions diff --git a/nipype/interfaces/utility/wrappers.py b/nipype/interfaces/utility/wrappers.py index 4de11d7ea8..6885d7218e 100644 --- a/nipype/interfaces/utility/wrappers.py +++ b/nipype/interfaces/utility/wrappers.py @@ -24,7 +24,7 @@ BaseInterfaceInputSpec, get_max_resources_used) from ..io import IOBase, add_traits from ...utils.filemanip import filename_to_list -from ...utils.misc import getsource, create_function_from_source +from ...utils.functions import getsource, create_function_from_source logger = logging.getLogger('interface') if runtime_profile: diff --git a/nipype/pipeline/engine/utils.py b/nipype/pipeline/engine/utils.py index 25b12ab607..fe8228c8ac 100644 --- a/nipype/pipeline/engine/utils.py +++ b/nipype/pipeline/engine/utils.py @@ -31,7 +31,8 @@ from ...utils.filemanip import (fname_presuffix, FileNotFoundError, to_str, filename_to_list, get_related_files) -from ...utils.misc import create_function_from_source, str2bool +from ...utils.misc import str2bool +from ...utils.functions import create_function_from_source from ...interfaces.base import (CommandLine, isdefined, Undefined, InterfaceResult) from ...interfaces.utility import IdentityInterface @@ -100,7 +101,7 @@ def _write_inputs(node): lines[-1] = lines[-1].replace(' %s(' % funcname, ' %s_1(' % funcname) funcname = '%s_1' % funcname - lines.append('from nipype.utils.misc import getsource') + lines.append('from nipype.utils.functions import getsource') lines.append("%s.inputs.%s = getsource(%s)" % (nodename, key, funcname)) diff --git a/nipype/pipeline/engine/workflows.py b/nipype/pipeline/engine/workflows.py index f30ed50051..14c4920a72 100644 --- a/nipype/pipeline/engine/workflows.py +++ b/nipype/pipeline/engine/workflows.py @@ -36,8 +36,8 @@ from ... import config, logging -from ...utils.misc import (unflatten, package_check, str2bool, - getsource, create_function_from_source) +from ...utils.misc import (unflatten, package_check, str2bool) +from ...utils.functions import (getsource, create_function_from_source) from ...interfaces.base import (traits, InputMultiPath, CommandLine, Undefined, TraitedSpec, DynamicTraitedSpec, Bunch, InterfaceResult, md5, Interface, diff --git a/nipype/utils/functions.py b/nipype/utils/functions.py new file mode 100644 index 0000000000..aa72d85009 --- /dev/null +++ b/nipype/utils/functions.py @@ -0,0 +1,47 @@ +# -*- coding: utf-8 -*- +""" +Handles custom functions used in Function interface. Future imports +are avoided to keep namespace as clear as possible. +""" +from builtins import next, str +from future.utils import raise_from +import inspect +from textwrap import dedent + +def getsource(function): + """Returns the source code of a function""" + return dedent(inspect.getsource(function)) + + +def create_function_from_source(function_source, imports=None): + """Return a function object from a function source + + Parameters + ---------- + function_source : unicode string + unicode string defining a function + imports : list of strings + list of import statements in string form that allow the function + to be executed in an otherwise empty namespace + """ + ns = {} + import_keys = [] + + try: + if imports is not None: + for statement in imports: + exec(statement, ns) + import_keys = list(ns.keys()) + exec(function_source, ns) + + except Exception as e: + msg = 'Error executing function\n{}\n'.format(function_source) + msg += ("Functions in connection strings have to be standalone. " + "They cannot be declared either interactively or inside " + "another function or inline in the connect string. Any " + "imports should be done inside the function.") + raise_from(RuntimeError(msg), e) + ns_funcs = list(set(ns) - set(import_keys + ['__builtins__'])) + assert len(ns_funcs) == 1, "Function or inputs are ill-defined" + func = ns[ns_funcs[0]] + return func diff --git a/nipype/utils/misc.py b/nipype/utils/misc.py index 80c44e0ad2..095e6b88f3 100644 --- a/nipype/utils/misc.py +++ b/nipype/utils/misc.py @@ -3,7 +3,7 @@ # vi: set ft=python sts=4 ts=4 sw=4 et: """Miscellaneous utility functions """ -from __future__ import print_function, division, absolute_import +from __future__ import print_function, unicode_literals, division, absolute_import from future import standard_library standard_library.install_aliases() from builtins import next, str @@ -66,47 +66,6 @@ def trim(docstring, marker=None): return '\n'.join(trimmed) -def getsource(function): - """Returns the source code of a function""" - src = dedent(inspect.getsource(function)) - return src - - -def create_function_from_source(function_source, imports=None): - """Return a function object from a function source - - Parameters - ---------- - function_source : pickled string - string in pickled form defining a function - imports : list of strings - list of import statements in string form that allow the function - to be executed in an otherwise empty namespace - """ - ns = {} - import_keys = [] - try: - if imports is not None: - for statement in imports: - exec(statement, ns) - import_keys = list(ns.keys()) - exec(function_source, ns) - - except Exception as e: - msg = '\nError executing function:\n %s\n' % function_source - msg += '\n'.join(["Functions in connection strings have to be standalone.", - "They cannot be declared either interactively or inside", - "another function or inline in the connect string. Any", - "imports should be done inside the function" - ]) - raise_from(RuntimeError(msg), e) - ns_funcs = list(set(ns) - set(import_keys + ['__builtins__'])) - assert len(ns_funcs) == 1, "Function or inputs are ill-defined" - funcname = ns_funcs[0] - func = ns[funcname] - return func - - def find_indices(condition): "Return the indices where ravel(condition) is true" res, = np.nonzero(np.ravel(condition)) diff --git a/nipype/utils/tests/test_functions.py b/nipype/utils/tests/test_functions.py new file mode 100644 index 0000000000..bcedcc9924 --- /dev/null +++ b/nipype/utils/tests/test_functions.py @@ -0,0 +1,37 @@ +# -*- coding: utf-8 -*- +import sys +import pytest +from nipype.utils.functions import (getsource, create_function_from_source) + +def _func1(x): + return x**3 + +def test_func_to_str(): + + def func1(x): + return x**2 + + # Should be ok with both functions! + for f in _func1, func1: + f_src = getsource(f) + f_recreated = create_function_from_source(f_src) + assert f(2.3) == f_recreated(2.3) + +def test_func_to_str_err(): + bad_src = "obbledygobbledygook" + with pytest.raises(RuntimeError): create_function_from_source(bad_src) + +@pytest.mark.skipif(sys.version_info[0] > 2, reason="breaks python 3") +def test_func_py2(): + def is_string(): + return isinstance('string', str) + + def print_statement(): + # test python 2 compatibility + exec('print ""') + + wrapped_func = create_function_from_source(getsource(is_string)) + assert is_string() == wrapped_func() + + wrapped_func2 = create_function_from_source(getsource(print_statement)) + wrapped_func2() diff --git a/nipype/utils/tests/test_misc.py b/nipype/utils/tests/test_misc.py index f5f84f48bf..1685fd645e 100644 --- a/nipype/utils/tests/test_misc.py +++ b/nipype/utils/tests/test_misc.py @@ -7,11 +7,9 @@ from builtins import next import pytest -import sys -from nipype.utils.misc import (container_to_string, getsource, - create_function_from_source, str2bool, flatten, - unflatten) +from nipype.utils.misc import (container_to_string, str2bool, + flatten, unflatten) def test_cont_to_str(): @@ -36,26 +34,6 @@ def test_cont_to_str(): assert (container_to_string(123) == '123') -def _func1(x): - return x**3 - - -def test_func_to_str(): - - def func1(x): - return x**2 - - # Should be ok with both functions! - for f in _func1, func1: - f_src = getsource(f) - f_recreated = create_function_from_source(f_src) - assert f(2.3) == f_recreated(2.3) - -def test_func_to_str_err(): - bad_src = "obbledygobbledygook" - with pytest.raises(RuntimeError): create_function_from_source(bad_src) - - @pytest.mark.parametrize("string, expected", [ ("yes", True), ("true", True), ("t", True), ("1", True), ("no", False), ("false", False), ("n", False), ("f", False), ("0", False) @@ -82,11 +60,3 @@ def test_flatten(): back = unflatten([], []) assert back == [] - -@pytest.mark.skipif(sys.version_info[0] > 2, reason="test unicode in functions") -def test_func_py2(): - def is_string(): - return isinstance('string', str) - - wrapped_func = create_function_from_source(getsource(is_string)) - assert is_string() == wrapped_func() From 1d54a0b8c021fb99d6ea0da520cb9a7ccfeedbe1 Mon Sep 17 00:00:00 2001 From: mathiasg Date: Wed, 9 Aug 2017 17:30:57 -0400 Subject: [PATCH 151/643] fix: assert print_statement test --- nipype/utils/tests/test_functions.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/nipype/utils/tests/test_functions.py b/nipype/utils/tests/test_functions.py index bcedcc9924..af46f77f9d 100644 --- a/nipype/utils/tests/test_functions.py +++ b/nipype/utils/tests/test_functions.py @@ -26,12 +26,16 @@ def test_func_py2(): def is_string(): return isinstance('string', str) - def print_statement(): - # test python 2 compatibility +def print_statement(): + # test python 2 compatibility + try: exec('print ""') + return True + except SyntaxError: + return False wrapped_func = create_function_from_source(getsource(is_string)) assert is_string() == wrapped_func() wrapped_func2 = create_function_from_source(getsource(print_statement)) - wrapped_func2() + assert wrapped_func2() From f493bbdb5626e7cf96fa75690e68690a9e7878c5 Mon Sep 17 00:00:00 2001 From: mathiasg Date: Wed, 9 Aug 2017 17:32:18 -0400 Subject: [PATCH 152/643] fix: indentation --- nipype/utils/tests/test_functions.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/nipype/utils/tests/test_functions.py b/nipype/utils/tests/test_functions.py index af46f77f9d..cb36b83770 100644 --- a/nipype/utils/tests/test_functions.py +++ b/nipype/utils/tests/test_functions.py @@ -26,13 +26,13 @@ def test_func_py2(): def is_string(): return isinstance('string', str) -def print_statement(): + def print_statement(): # test python 2 compatibility - try: - exec('print ""') - return True - except SyntaxError: - return False + try: + exec('print ""') + return True + except SyntaxError: + return False wrapped_func = create_function_from_source(getsource(is_string)) assert is_string() == wrapped_func() From 8fd24eababec5ad1331cd766199e3432ac49e631 Mon Sep 17 00:00:00 2001 From: mathiasg Date: Wed, 9 Aug 2017 23:38:00 -0400 Subject: [PATCH 153/643] fix: nested exec call --- nipype/utils/tests/test_functions.py | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/nipype/utils/tests/test_functions.py b/nipype/utils/tests/test_functions.py index cb36b83770..60334dd8c1 100644 --- a/nipype/utils/tests/test_functions.py +++ b/nipype/utils/tests/test_functions.py @@ -21,21 +21,20 @@ def test_func_to_str_err(): bad_src = "obbledygobbledygook" with pytest.raises(RuntimeError): create_function_from_source(bad_src) +def _print_statement(): + try: + exec('print ""') + return True + except SyntaxError: + return False + @pytest.mark.skipif(sys.version_info[0] > 2, reason="breaks python 3") def test_func_py2(): def is_string(): return isinstance('string', str) - def print_statement(): - # test python 2 compatibility - try: - exec('print ""') - return True - except SyntaxError: - return False - wrapped_func = create_function_from_source(getsource(is_string)) assert is_string() == wrapped_func() - wrapped_func2 = create_function_from_source(getsource(print_statement)) + wrapped_func2 = create_function_from_source(getsource(_print_statement)) assert wrapped_func2() From d3ff65263eb16b14db66ebb1e09102d1c8891ab7 Mon Sep 17 00:00:00 2001 From: mathiasg Date: Fri, 11 Aug 2017 17:30:14 -0400 Subject: [PATCH 154/643] fix: cover some py3 in function tests --- nipype/utils/tests/test_functions.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/nipype/utils/tests/test_functions.py b/nipype/utils/tests/test_functions.py index 60334dd8c1..1d9b9dac7a 100644 --- a/nipype/utils/tests/test_functions.py +++ b/nipype/utils/tests/test_functions.py @@ -28,13 +28,14 @@ def _print_statement(): except SyntaxError: return False -@pytest.mark.skipif(sys.version_info[0] > 2, reason="breaks python 3") -def test_func_py2(): +def test_func_string(): def is_string(): return isinstance('string', str) wrapped_func = create_function_from_source(getsource(is_string)) assert is_string() == wrapped_func() - wrapped_func2 = create_function_from_source(getsource(_print_statement)) - assert wrapped_func2() +@pytest.mark.skipif(sys.version_info[0] > 2, reason="breaks python 3") +def test_func_print_py2(): + wrapped_func = create_function_from_source(getsource(_print_statement)) + assert wrapped_func() From fa2b5c95a720a060915a026ba727005c206d6910 Mon Sep 17 00:00:00 2001 From: Satrajit Ghosh Date: Sun, 13 Aug 2017 14:59:48 -0400 Subject: [PATCH 155/643] Revert "fix: python 2 Function interfaces recompatibility" --- doc/users/saving_workflows.rst | 2 +- nipype/interfaces/utility/wrappers.py | 2 +- nipype/pipeline/engine/utils.py | 5 ++- nipype/pipeline/engine/workflows.py | 4 +-- nipype/utils/functions.py | 47 --------------------------- nipype/utils/misc.py | 43 +++++++++++++++++++++++- nipype/utils/tests/test_functions.py | 41 ----------------------- nipype/utils/tests/test_misc.py | 25 ++++++++++++-- 8 files changed, 71 insertions(+), 98 deletions(-) delete mode 100644 nipype/utils/functions.py delete mode 100644 nipype/utils/tests/test_functions.py diff --git a/doc/users/saving_workflows.rst b/doc/users/saving_workflows.rst index 33d1e8a118..c97751eead 100644 --- a/doc/users/saving_workflows.rst +++ b/doc/users/saving_workflows.rst @@ -55,7 +55,7 @@ This will create a file "outputtestsave.py" with the following content: from nipype.pipeline.engine import Workflow, Node, MapNode from nipype.interfaces.utility import IdentityInterface from nipype.interfaces.utility import Function - from nipype.utils.functions import getsource + from nipype.utils.misc import getsource from nipype.interfaces.fsl.preprocess import BET from nipype.interfaces.fsl.utils import ImageMaths # Functions diff --git a/nipype/interfaces/utility/wrappers.py b/nipype/interfaces/utility/wrappers.py index 6885d7218e..4de11d7ea8 100644 --- a/nipype/interfaces/utility/wrappers.py +++ b/nipype/interfaces/utility/wrappers.py @@ -24,7 +24,7 @@ BaseInterfaceInputSpec, get_max_resources_used) from ..io import IOBase, add_traits from ...utils.filemanip import filename_to_list -from ...utils.functions import getsource, create_function_from_source +from ...utils.misc import getsource, create_function_from_source logger = logging.getLogger('interface') if runtime_profile: diff --git a/nipype/pipeline/engine/utils.py b/nipype/pipeline/engine/utils.py index fe8228c8ac..25b12ab607 100644 --- a/nipype/pipeline/engine/utils.py +++ b/nipype/pipeline/engine/utils.py @@ -31,8 +31,7 @@ from ...utils.filemanip import (fname_presuffix, FileNotFoundError, to_str, filename_to_list, get_related_files) -from ...utils.misc import str2bool -from ...utils.functions import create_function_from_source +from ...utils.misc import create_function_from_source, str2bool from ...interfaces.base import (CommandLine, isdefined, Undefined, InterfaceResult) from ...interfaces.utility import IdentityInterface @@ -101,7 +100,7 @@ def _write_inputs(node): lines[-1] = lines[-1].replace(' %s(' % funcname, ' %s_1(' % funcname) funcname = '%s_1' % funcname - lines.append('from nipype.utils.functions import getsource') + lines.append('from nipype.utils.misc import getsource') lines.append("%s.inputs.%s = getsource(%s)" % (nodename, key, funcname)) diff --git a/nipype/pipeline/engine/workflows.py b/nipype/pipeline/engine/workflows.py index 14c4920a72..f30ed50051 100644 --- a/nipype/pipeline/engine/workflows.py +++ b/nipype/pipeline/engine/workflows.py @@ -36,8 +36,8 @@ from ... import config, logging -from ...utils.misc import (unflatten, package_check, str2bool) -from ...utils.functions import (getsource, create_function_from_source) +from ...utils.misc import (unflatten, package_check, str2bool, + getsource, create_function_from_source) from ...interfaces.base import (traits, InputMultiPath, CommandLine, Undefined, TraitedSpec, DynamicTraitedSpec, Bunch, InterfaceResult, md5, Interface, diff --git a/nipype/utils/functions.py b/nipype/utils/functions.py deleted file mode 100644 index aa72d85009..0000000000 --- a/nipype/utils/functions.py +++ /dev/null @@ -1,47 +0,0 @@ -# -*- coding: utf-8 -*- -""" -Handles custom functions used in Function interface. Future imports -are avoided to keep namespace as clear as possible. -""" -from builtins import next, str -from future.utils import raise_from -import inspect -from textwrap import dedent - -def getsource(function): - """Returns the source code of a function""" - return dedent(inspect.getsource(function)) - - -def create_function_from_source(function_source, imports=None): - """Return a function object from a function source - - Parameters - ---------- - function_source : unicode string - unicode string defining a function - imports : list of strings - list of import statements in string form that allow the function - to be executed in an otherwise empty namespace - """ - ns = {} - import_keys = [] - - try: - if imports is not None: - for statement in imports: - exec(statement, ns) - import_keys = list(ns.keys()) - exec(function_source, ns) - - except Exception as e: - msg = 'Error executing function\n{}\n'.format(function_source) - msg += ("Functions in connection strings have to be standalone. " - "They cannot be declared either interactively or inside " - "another function or inline in the connect string. Any " - "imports should be done inside the function.") - raise_from(RuntimeError(msg), e) - ns_funcs = list(set(ns) - set(import_keys + ['__builtins__'])) - assert len(ns_funcs) == 1, "Function or inputs are ill-defined" - func = ns[ns_funcs[0]] - return func diff --git a/nipype/utils/misc.py b/nipype/utils/misc.py index 095e6b88f3..552e24c435 100644 --- a/nipype/utils/misc.py +++ b/nipype/utils/misc.py @@ -3,7 +3,7 @@ # vi: set ft=python sts=4 ts=4 sw=4 et: """Miscellaneous utility functions """ -from __future__ import print_function, unicode_literals, division, absolute_import +from __future__ import print_function, division, unicode_literals, absolute_import from future import standard_library standard_library.install_aliases() from builtins import next, str @@ -66,6 +66,47 @@ def trim(docstring, marker=None): return '\n'.join(trimmed) +def getsource(function): + """Returns the source code of a function""" + src = dedent(inspect.getsource(function)) + return src + + +def create_function_from_source(function_source, imports=None): + """Return a function object from a function source + + Parameters + ---------- + function_source : pickled string + string in pickled form defining a function + imports : list of strings + list of import statements in string form that allow the function + to be executed in an otherwise empty namespace + """ + ns = {} + import_keys = [] + try: + if imports is not None: + for statement in imports: + exec(statement, ns) + import_keys = list(ns.keys()) + exec(function_source, ns) + + except Exception as e: + msg = '\nError executing function:\n %s\n' % function_source + msg += '\n'.join(["Functions in connection strings have to be standalone.", + "They cannot be declared either interactively or inside", + "another function or inline in the connect string. Any", + "imports should be done inside the function" + ]) + raise_from(RuntimeError(msg), e) + ns_funcs = list(set(ns) - set(import_keys + ['__builtins__'])) + assert len(ns_funcs) == 1, "Function or inputs are ill-defined" + funcname = ns_funcs[0] + func = ns[funcname] + return func + + def find_indices(condition): "Return the indices where ravel(condition) is true" res, = np.nonzero(np.ravel(condition)) diff --git a/nipype/utils/tests/test_functions.py b/nipype/utils/tests/test_functions.py deleted file mode 100644 index 1d9b9dac7a..0000000000 --- a/nipype/utils/tests/test_functions.py +++ /dev/null @@ -1,41 +0,0 @@ -# -*- coding: utf-8 -*- -import sys -import pytest -from nipype.utils.functions import (getsource, create_function_from_source) - -def _func1(x): - return x**3 - -def test_func_to_str(): - - def func1(x): - return x**2 - - # Should be ok with both functions! - for f in _func1, func1: - f_src = getsource(f) - f_recreated = create_function_from_source(f_src) - assert f(2.3) == f_recreated(2.3) - -def test_func_to_str_err(): - bad_src = "obbledygobbledygook" - with pytest.raises(RuntimeError): create_function_from_source(bad_src) - -def _print_statement(): - try: - exec('print ""') - return True - except SyntaxError: - return False - -def test_func_string(): - def is_string(): - return isinstance('string', str) - - wrapped_func = create_function_from_source(getsource(is_string)) - assert is_string() == wrapped_func() - -@pytest.mark.skipif(sys.version_info[0] > 2, reason="breaks python 3") -def test_func_print_py2(): - wrapped_func = create_function_from_source(getsource(_print_statement)) - assert wrapped_func() diff --git a/nipype/utils/tests/test_misc.py b/nipype/utils/tests/test_misc.py index 1685fd645e..f2780a584f 100644 --- a/nipype/utils/tests/test_misc.py +++ b/nipype/utils/tests/test_misc.py @@ -8,8 +8,9 @@ import pytest -from nipype.utils.misc import (container_to_string, str2bool, - flatten, unflatten) +from nipype.utils.misc import (container_to_string, getsource, + create_function_from_source, str2bool, flatten, + unflatten) def test_cont_to_str(): @@ -34,6 +35,26 @@ def test_cont_to_str(): assert (container_to_string(123) == '123') +def _func1(x): + return x**3 + + +def test_func_to_str(): + + def func1(x): + return x**2 + + # Should be ok with both functions! + for f in _func1, func1: + f_src = getsource(f) + f_recreated = create_function_from_source(f_src) + assert f(2.3) == f_recreated(2.3) + +def test_func_to_str_err(): + bad_src = "obbledygobbledygook" + with pytest.raises(RuntimeError): create_function_from_source(bad_src) + + @pytest.mark.parametrize("string, expected", [ ("yes", True), ("true", True), ("t", True), ("1", True), ("no", False), ("false", False), ("n", False), ("f", False), ("0", False) From 78c356827184f2f4003c38d03dfc0a38f0a5115b Mon Sep 17 00:00:00 2001 From: salma1601 Date: Sun, 13 Aug 2017 23:56:03 +0200 Subject: [PATCH 156/643] add more inputs --- nipype/interfaces/afni/preprocess.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/nipype/interfaces/afni/preprocess.py b/nipype/interfaces/afni/preprocess.py index 2c6274ed30..1cc4fd6c5e 100644 --- a/nipype/interfaces/afni/preprocess.py +++ b/nipype/interfaces/afni/preprocess.py @@ -144,7 +144,7 @@ class AllineateInputSpec(AFNICommandInputSpec): desc='Use a two pass alignment strategy for all volumes, searching ' 'for a large rotation+shift and then refining the alignment.') two_blur = traits.Float( - argstr='-twoblur', + argstr='-twoblur %f', desc='Set the blurring radius for the first pass in mm.') two_first = traits.Bool( argstr='-twofirst', @@ -222,6 +222,18 @@ class AllineateInputSpec(AFNICommandInputSpec): 'EPI slices, and the base as comprising anatomically ' '\'true\' images. Only phase-encoding direction image ' 'shearing and scaling will be allowed with this option.') + maxrot = traits.Float( + argstr='-maxrot %f', + desc='Maximum allowed rotation in degrees.') + maxshf = traits.Float( + argstr='-maxshf %f', + desc='Maximum allowed shift in mm.') + maxscl = traits.Float( + argstr='-maxscl %f', + desc='Maximum allowed scaling factor.') + maxshr = traits.Float( + argstr='-maxshr %f', + desc='Maximum allowed shearing factor.') master = File( exists=True, argstr='-master %s', From ab34ab9e107545787df2c1de487d8412be1a1377 Mon Sep 17 00:00:00 2001 From: mathiasg Date: Mon, 14 Aug 2017 21:34:30 -0400 Subject: [PATCH 157/643] ref: isolate function handling from __future__ imports --- doc/users/saving_workflows.rst | 2 +- nipype/interfaces/utility/wrappers.py | 2 +- nipype/pipeline/engine/utils.py | 5 +-- nipype/pipeline/engine/workflows.py | 4 +-- nipype/utils/functions.py | 47 +++++++++++++++++++++++++++ nipype/utils/misc.py | 43 +----------------------- nipype/utils/tests/test_functions.py | 41 +++++++++++++++++++++++ nipype/utils/tests/test_misc.py | 25 ++------------ 8 files changed, 98 insertions(+), 71 deletions(-) create mode 100644 nipype/utils/functions.py create mode 100644 nipype/utils/tests/test_functions.py diff --git a/doc/users/saving_workflows.rst b/doc/users/saving_workflows.rst index c97751eead..33d1e8a118 100644 --- a/doc/users/saving_workflows.rst +++ b/doc/users/saving_workflows.rst @@ -55,7 +55,7 @@ This will create a file "outputtestsave.py" with the following content: from nipype.pipeline.engine import Workflow, Node, MapNode from nipype.interfaces.utility import IdentityInterface from nipype.interfaces.utility import Function - from nipype.utils.misc import getsource + from nipype.utils.functions import getsource from nipype.interfaces.fsl.preprocess import BET from nipype.interfaces.fsl.utils import ImageMaths # Functions diff --git a/nipype/interfaces/utility/wrappers.py b/nipype/interfaces/utility/wrappers.py index 4de11d7ea8..6885d7218e 100644 --- a/nipype/interfaces/utility/wrappers.py +++ b/nipype/interfaces/utility/wrappers.py @@ -24,7 +24,7 @@ BaseInterfaceInputSpec, get_max_resources_used) from ..io import IOBase, add_traits from ...utils.filemanip import filename_to_list -from ...utils.misc import getsource, create_function_from_source +from ...utils.functions import getsource, create_function_from_source logger = logging.getLogger('interface') if runtime_profile: diff --git a/nipype/pipeline/engine/utils.py b/nipype/pipeline/engine/utils.py index 25b12ab607..fe8228c8ac 100644 --- a/nipype/pipeline/engine/utils.py +++ b/nipype/pipeline/engine/utils.py @@ -31,7 +31,8 @@ from ...utils.filemanip import (fname_presuffix, FileNotFoundError, to_str, filename_to_list, get_related_files) -from ...utils.misc import create_function_from_source, str2bool +from ...utils.misc import str2bool +from ...utils.functions import create_function_from_source from ...interfaces.base import (CommandLine, isdefined, Undefined, InterfaceResult) from ...interfaces.utility import IdentityInterface @@ -100,7 +101,7 @@ def _write_inputs(node): lines[-1] = lines[-1].replace(' %s(' % funcname, ' %s_1(' % funcname) funcname = '%s_1' % funcname - lines.append('from nipype.utils.misc import getsource') + lines.append('from nipype.utils.functions import getsource') lines.append("%s.inputs.%s = getsource(%s)" % (nodename, key, funcname)) diff --git a/nipype/pipeline/engine/workflows.py b/nipype/pipeline/engine/workflows.py index f30ed50051..14c4920a72 100644 --- a/nipype/pipeline/engine/workflows.py +++ b/nipype/pipeline/engine/workflows.py @@ -36,8 +36,8 @@ from ... import config, logging -from ...utils.misc import (unflatten, package_check, str2bool, - getsource, create_function_from_source) +from ...utils.misc import (unflatten, package_check, str2bool) +from ...utils.functions import (getsource, create_function_from_source) from ...interfaces.base import (traits, InputMultiPath, CommandLine, Undefined, TraitedSpec, DynamicTraitedSpec, Bunch, InterfaceResult, md5, Interface, diff --git a/nipype/utils/functions.py b/nipype/utils/functions.py new file mode 100644 index 0000000000..aa72d85009 --- /dev/null +++ b/nipype/utils/functions.py @@ -0,0 +1,47 @@ +# -*- coding: utf-8 -*- +""" +Handles custom functions used in Function interface. Future imports +are avoided to keep namespace as clear as possible. +""" +from builtins import next, str +from future.utils import raise_from +import inspect +from textwrap import dedent + +def getsource(function): + """Returns the source code of a function""" + return dedent(inspect.getsource(function)) + + +def create_function_from_source(function_source, imports=None): + """Return a function object from a function source + + Parameters + ---------- + function_source : unicode string + unicode string defining a function + imports : list of strings + list of import statements in string form that allow the function + to be executed in an otherwise empty namespace + """ + ns = {} + import_keys = [] + + try: + if imports is not None: + for statement in imports: + exec(statement, ns) + import_keys = list(ns.keys()) + exec(function_source, ns) + + except Exception as e: + msg = 'Error executing function\n{}\n'.format(function_source) + msg += ("Functions in connection strings have to be standalone. " + "They cannot be declared either interactively or inside " + "another function or inline in the connect string. Any " + "imports should be done inside the function.") + raise_from(RuntimeError(msg), e) + ns_funcs = list(set(ns) - set(import_keys + ['__builtins__'])) + assert len(ns_funcs) == 1, "Function or inputs are ill-defined" + func = ns[ns_funcs[0]] + return func diff --git a/nipype/utils/misc.py b/nipype/utils/misc.py index 552e24c435..095e6b88f3 100644 --- a/nipype/utils/misc.py +++ b/nipype/utils/misc.py @@ -3,7 +3,7 @@ # vi: set ft=python sts=4 ts=4 sw=4 et: """Miscellaneous utility functions """ -from __future__ import print_function, division, unicode_literals, absolute_import +from __future__ import print_function, unicode_literals, division, absolute_import from future import standard_library standard_library.install_aliases() from builtins import next, str @@ -66,47 +66,6 @@ def trim(docstring, marker=None): return '\n'.join(trimmed) -def getsource(function): - """Returns the source code of a function""" - src = dedent(inspect.getsource(function)) - return src - - -def create_function_from_source(function_source, imports=None): - """Return a function object from a function source - - Parameters - ---------- - function_source : pickled string - string in pickled form defining a function - imports : list of strings - list of import statements in string form that allow the function - to be executed in an otherwise empty namespace - """ - ns = {} - import_keys = [] - try: - if imports is not None: - for statement in imports: - exec(statement, ns) - import_keys = list(ns.keys()) - exec(function_source, ns) - - except Exception as e: - msg = '\nError executing function:\n %s\n' % function_source - msg += '\n'.join(["Functions in connection strings have to be standalone.", - "They cannot be declared either interactively or inside", - "another function or inline in the connect string. Any", - "imports should be done inside the function" - ]) - raise_from(RuntimeError(msg), e) - ns_funcs = list(set(ns) - set(import_keys + ['__builtins__'])) - assert len(ns_funcs) == 1, "Function or inputs are ill-defined" - funcname = ns_funcs[0] - func = ns[funcname] - return func - - def find_indices(condition): "Return the indices where ravel(condition) is true" res, = np.nonzero(np.ravel(condition)) diff --git a/nipype/utils/tests/test_functions.py b/nipype/utils/tests/test_functions.py new file mode 100644 index 0000000000..1d9b9dac7a --- /dev/null +++ b/nipype/utils/tests/test_functions.py @@ -0,0 +1,41 @@ +# -*- coding: utf-8 -*- +import sys +import pytest +from nipype.utils.functions import (getsource, create_function_from_source) + +def _func1(x): + return x**3 + +def test_func_to_str(): + + def func1(x): + return x**2 + + # Should be ok with both functions! + for f in _func1, func1: + f_src = getsource(f) + f_recreated = create_function_from_source(f_src) + assert f(2.3) == f_recreated(2.3) + +def test_func_to_str_err(): + bad_src = "obbledygobbledygook" + with pytest.raises(RuntimeError): create_function_from_source(bad_src) + +def _print_statement(): + try: + exec('print ""') + return True + except SyntaxError: + return False + +def test_func_string(): + def is_string(): + return isinstance('string', str) + + wrapped_func = create_function_from_source(getsource(is_string)) + assert is_string() == wrapped_func() + +@pytest.mark.skipif(sys.version_info[0] > 2, reason="breaks python 3") +def test_func_print_py2(): + wrapped_func = create_function_from_source(getsource(_print_statement)) + assert wrapped_func() diff --git a/nipype/utils/tests/test_misc.py b/nipype/utils/tests/test_misc.py index f2780a584f..1685fd645e 100644 --- a/nipype/utils/tests/test_misc.py +++ b/nipype/utils/tests/test_misc.py @@ -8,9 +8,8 @@ import pytest -from nipype.utils.misc import (container_to_string, getsource, - create_function_from_source, str2bool, flatten, - unflatten) +from nipype.utils.misc import (container_to_string, str2bool, + flatten, unflatten) def test_cont_to_str(): @@ -35,26 +34,6 @@ def test_cont_to_str(): assert (container_to_string(123) == '123') -def _func1(x): - return x**3 - - -def test_func_to_str(): - - def func1(x): - return x**2 - - # Should be ok with both functions! - for f in _func1, func1: - f_src = getsource(f) - f_recreated = create_function_from_source(f_src) - assert f(2.3) == f_recreated(2.3) - -def test_func_to_str_err(): - bad_src = "obbledygobbledygook" - with pytest.raises(RuntimeError): create_function_from_source(bad_src) - - @pytest.mark.parametrize("string, expected", [ ("yes", True), ("true", True), ("t", True), ("1", True), ("no", False), ("false", False), ("n", False), ("f", False), ("0", False) From 397b5459040570323dd62cb4e5f3072d1c151e2d Mon Sep 17 00:00:00 2001 From: miykael Date: Tue, 15 Aug 2017 10:20:41 +0200 Subject: [PATCH 158/643] FIX: updates input spec to allow 4D images --- nipype/interfaces/ants/legacy.py | 4 ++-- nipype/interfaces/ants/segmentation.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/nipype/interfaces/ants/legacy.py b/nipype/interfaces/ants/legacy.py index 3019f27c22..f545f3ed08 100644 --- a/nipype/interfaces/ants/legacy.py +++ b/nipype/interfaces/ants/legacy.py @@ -129,8 +129,8 @@ class GenWarpFields(antsIntroduction): class buildtemplateparallelInputSpec(ANTSCommandInputSpec): - dimension = traits.Enum(3, 2, argstr='-d %d', usedefault=True, - desc='image dimension (2 or 3)', position=1) + dimension = traits.Enum(3, 2, 4, argstr='-d %d', usedefault=True, + desc='image dimension (2, 3 or 4)', position=1) out_prefix = traits.Str('antsTMPL_', argstr='-o %s', usedefault=True, desc=('Prefix that is prepended to all output ' 'files (default = antsTMPL_)')) diff --git a/nipype/interfaces/ants/segmentation.py b/nipype/interfaces/ants/segmentation.py index aff6f2c6c0..042303227a 100644 --- a/nipype/interfaces/ants/segmentation.py +++ b/nipype/interfaces/ants/segmentation.py @@ -238,9 +238,9 @@ def _list_outputs(self): class N4BiasFieldCorrectionInputSpec(ANTSCommandInputSpec): - dimension = traits.Enum(3, 2, argstr='-d %d', + dimension = traits.Enum(3, 2, 4, argstr='-d %d', usedefault=True, - desc='image dimension (2 or 3)') + desc='image dimension (2, 3 or 4)') input_image = File(argstr='--input-image %s', mandatory=True, desc=('image to apply transformation to (generally a ' 'coregistered functional)')) From 25e9b577652221422ead7a625d8225d8c49f391a Mon Sep 17 00:00:00 2001 From: salma1601 Date: Tue, 15 Aug 2017 14:11:42 +0200 Subject: [PATCH 159/643] update autotest --- nipype/interfaces/afni/tests/test_auto_Allineate.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/nipype/interfaces/afni/tests/test_auto_Allineate.py b/nipype/interfaces/afni/tests/test_auto_Allineate.py index 0bf37ea8cd..bfa2317311 100644 --- a/nipype/interfaces/afni/tests/test_auto_Allineate.py +++ b/nipype/interfaces/afni/tests/test_auto_Allineate.py @@ -46,6 +46,14 @@ def test_Allineate_inputs(): ), master=dict(argstr='-master %s', ), + maxrot=dict(argstr='-maxrot %f', + ), + maxscl=dict(argstr='-maxscl %f', + ), + maxshf=dict(argstr='-maxshf %f', + ), + maxshr=dict(argstr='-maxshr %f', + ), newgrid=dict(argstr='-newgrid %f', ), nmatch=dict(argstr='-nmatch %d', @@ -88,7 +96,7 @@ def test_Allineate_inputs(): ), two_best=dict(argstr='-twobest %d', ), - two_blur=dict(argstr='-twoblur', + two_blur=dict(argstr='-twoblur %f', ), two_first=dict(argstr='-twofirst', ), From 4ba48c46b770da56217d72fa0e9c9e12802a7c94 Mon Sep 17 00:00:00 2001 From: oliver-contier Date: Sat, 19 Aug 2017 14:04:10 -0400 Subject: [PATCH 160/643] added functionality to pick run for reference volume to release 0.11.0 --- nipype/workflows/fmri/fsl/preprocess.py | 30 +++++++++++++++---- .../fmri/fsl/tests/test_preprocess.py | 16 ++++++++++ 2 files changed, 41 insertions(+), 5 deletions(-) create mode 100644 nipype/workflows/fmri/fsl/tests/test_preprocess.py diff --git a/nipype/workflows/fmri/fsl/preprocess.py b/nipype/workflows/fmri/fsl/preprocess.py index 7a08670919..07c79b736b 100644 --- a/nipype/workflows/fmri/fsl/preprocess.py +++ b/nipype/workflows/fmri/fsl/preprocess.py @@ -15,6 +15,25 @@ def getthreshop(thresh): return ['-thr %.10f -Tmin -bin'%(0.1*val[1]) for val in thresh] + +def pickrun(files, whichrun): + """pick file from list of files""" + + filemap = {'first': 0, 'last': -1, 'middle' :len(files) // 2} + + if isinstance(whichrun, str): + if whichrun not in filemap.keys(): + raise(KeyError, 'Sorry, whichrun must be either integer index' + 'or string in form of "first", "last" or "middle') + else: + return files[filemap[whichrun]] + + if isinstance(files, list): + return files[whichrun] + else: + return files + + def pickfirst(files): if isinstance(files, list): return files[0] @@ -373,7 +392,7 @@ def create_parallelfeat_preproc(name='featpreproc', highpass=True): return featpreproc -def create_featreg_preproc(name='featpreproc', highpass=True, whichvol='middle'): +def create_featreg_preproc(name='featpreproc', highpass=True, whichvol='middle', whichrun=0): """Create a FEAT preprocessing workflow with registration to one volume of the first run Parameters @@ -384,6 +403,7 @@ def create_featreg_preproc(name='featpreproc', highpass=True, whichvol='middle') name : name of workflow (default: featpreproc) highpass : boolean (default: True) whichvol : which volume of the first run to register to ('first', 'middle', 'last', 'mean') + whichrun : which run to draw reference volume from (integer index or 'first', 'middle', 'last') Inputs:: @@ -485,7 +505,7 @@ def create_featreg_preproc(name='featpreproc', highpass=True, whichvol='middle') extract_ref = pe.Node(interface=fsl.ExtractROI(t_size=1), iterfield=['in_file'], name = 'extractref') - featpreproc.connect(img2float, ('out_file', pickfirst), extract_ref, 'in_file') + featpreproc.connect(img2float, ('out_file', pickrun, whichrun), extract_ref, 'in_file') featpreproc.connect(img2float, ('out_file', pickvol, 0, whichvol), extract_ref, 't_min') featpreproc.connect(extract_ref, 'roi_file', outputnode, 'reference') @@ -504,7 +524,7 @@ def create_featreg_preproc(name='featpreproc', highpass=True, whichvol='middle') featpreproc.connect(extract_ref, 'roi_file', motion_correct, 'ref_file') else: motion_correct.inputs.mean_vol = True - featpreproc.connect(motion_correct, ('mean_img', pickfirst), outputnode, 'reference') + featpreproc.connect(motion_correct, ('mean_img', pickrun, whichrun), outputnode, 'reference') featpreproc.connect(motion_correct, 'par_file', outputnode, 'motion_parameters') featpreproc.connect(motion_correct, 'out_file', outputnode, 'realigned_files') @@ -527,7 +547,7 @@ def create_featreg_preproc(name='featpreproc', highpass=True, whichvol='middle') meanfunc = pe.Node(interface=fsl.ImageMaths(op_string = '-Tmean', suffix='_mean'), name='meanfunc') - featpreproc.connect(motion_correct, ('out_file', pickfirst), meanfunc, 'in_file') + featpreproc.connect(motion_correct, ('out_file', pickrun, whichrun), meanfunc, 'in_file') """ Strip the skull from the mean functional to generate a mask @@ -678,7 +698,7 @@ def create_featreg_preproc(name='featpreproc', highpass=True, whichvol='middle') iterfield=['in_file'], name='meanfunc3') - featpreproc.connect(meanscale, ('out_file', pickfirst), meanfunc3, 'in_file') + featpreproc.connect(meanscale, ('out_file', pickrun, whichrun), meanfunc3, 'in_file') featpreproc.connect(meanfunc3, 'out_file', outputnode, 'mean') """ diff --git a/nipype/workflows/fmri/fsl/tests/test_preprocess.py b/nipype/workflows/fmri/fsl/tests/test_preprocess.py new file mode 100644 index 0000000000..847d948def --- /dev/null +++ b/nipype/workflows/fmri/fsl/tests/test_preprocess.py @@ -0,0 +1,16 @@ +__author__ = 'oliver' + +from ..preprocess import create_featreg_preproc, pickrun + + +def test_pickrun(): + files = ['1', '2', '3'] + assert pickrun(files, 0) == '1' + assert pickrun(files, -1) == '3' + + +def test_create_featreg_preproc(): + # smoke test + wf = create_featreg_preproc(whichrun=0) + wf.get_node('extractref') + assert wf._get_dot() From ca11c5292d03083a589898046db8c8743ad5ec41 Mon Sep 17 00:00:00 2001 From: Horea Christian Date: Tue, 22 Aug 2017 21:24:16 +0200 Subject: [PATCH 161/643] Removed trailing whitespace --- nipype/interfaces/afni/preprocess.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/nipype/interfaces/afni/preprocess.py b/nipype/interfaces/afni/preprocess.py index e0e2518ef1..91a68bd97b 100644 --- a/nipype/interfaces/afni/preprocess.py +++ b/nipype/interfaces/afni/preprocess.py @@ -119,7 +119,7 @@ class AlignEpiAnatPyOutputSpec(TraitedSpec): desc="matrix to volume register and align epi" "to anatomy and put into standard space") epi_vr_motion = File( - desc="motion parameters from EPI time-series" + desc="motion parameters from EPI time-series" "registration (tsh included in name if slice" "timing correction is also included).") skullstrip = File( @@ -131,20 +131,20 @@ class AlignEpiAnatPy(AFNIPythonCommand): an EPI and an anatomical structural dataset, and applies the resulting transformation to one or the other to bring them into alignment. - This script computes the transforms needed to align EPI and - anatomical datasets using a cost function designed for this purpose. The - script combines multiple transformations, thereby minimizing the amount of + This script computes the transforms needed to align EPI and + anatomical datasets using a cost function designed for this purpose. The + script combines multiple transformations, thereby minimizing the amount of interpolation applied to the data. - + Basic Usage: align_epi_anat.py -anat anat+orig -epi epi+orig -epi_base 5 - + The user must provide EPI and anatomical datasets and specify the EPI - sub-brick to use as a base in the alignment. + sub-brick to use as a base in the alignment. Internally, the script always aligns the anatomical to the EPI dataset, - and the resulting transformation is saved to a 1D file. - As a user option, the inverse of this transformation may be applied to the + and the resulting transformation is saved to a 1D file. + As a user option, the inverse of this transformation may be applied to the EPI dataset in order to align it to the anatomical data instead. This program generates several kinds of output in the form of datasets @@ -182,7 +182,7 @@ def _list_outputs(self): epi_prefix = ''.join(self._gen_fname(self.inputs.in_file).split('+')[:-1]) outputtype = self.inputs.outputtype if outputtype == 'AFNI': - ext = '.HEAD' + ext = '.HEAD' else: Info.output_type_to_ext(outputtype) matext = '.1D' @@ -620,7 +620,7 @@ class AutoTLRCInputSpec(CommandLineInputSpec): mandatory=True, exists=True, copyfile=False) - base = traits.Str( + base = traits.Str( desc = ' Reference anatomical volume' ' Usually this volume is in some standard space like' ' TLRC or MNI space and with afni dataset view of' @@ -706,7 +706,7 @@ def _list_outputs(self): ext = '.HEAD' outputs['out_file'] = os.path.abspath(self._gen_fname(self.inputs.in_file, suffix='+tlrc')+ext) return outputs - + class BandpassInputSpec(AFNICommandInputSpec): in_file = File( desc='input file to 3dBandpass', From 9b71e7163486a90817d4d48ae81ac5aea19795cd Mon Sep 17 00:00:00 2001 From: Ross Markello Date: Wed, 23 Aug 2017 13:09:57 -0400 Subject: [PATCH 162/643] [FIX]: AFNI Allineate conflicts with master Edited AFNI Allineate interface to accommodate updated master branch. Updated xor options for allcostx. --- nipype/interfaces/afni/preprocess.py | 21 ++++++++----------- .../afni/tests/test_auto_Allineate.py | 9 ++++---- 2 files changed, 13 insertions(+), 17 deletions(-) diff --git a/nipype/interfaces/afni/preprocess.py b/nipype/interfaces/afni/preprocess.py index f75922aefe..d17e0313f2 100644 --- a/nipype/interfaces/afni/preprocess.py +++ b/nipype/interfaces/afni/preprocess.py @@ -220,14 +220,12 @@ class AllineateInputSpec(AFNICommandInputSpec): out_file = File( desc='output file from 3dAllineate', argstr='-prefix %s', - name_source='in_file', - name_template='%s_allineate', genfile=True, xor=['allcostx']) out_param_file = File( argstr='-1Dparam_save %s', desc='Save the warp parameters in ASCII (.1D) format.', - xor=['in_param_file']) + xor=['in_param_file','allcostx']) in_param_file = File( exists=True, argstr='-1Dparam_apply %s', @@ -237,7 +235,7 @@ class AllineateInputSpec(AFNICommandInputSpec): out_matrix = File( argstr='-1Dmatrix_save %s', desc='Save the transformation matrix for each volume.', - xor=['in_matrix']) + xor=['in_matrix','allcostx']) in_matrix = File( desc='matrix to align input file', argstr='-1Dmatrix_apply %s', @@ -247,14 +245,12 @@ class AllineateInputSpec(AFNICommandInputSpec): desc='overwrite output file if it already exists', argstr='-overwrite') - # TODO: implement sensible xors for allcostx and suppres prefix in command when allcosx is used allcostx= File( desc='Compute and print ALL available cost functionals for the un-warped inputs' 'AND THEN QUIT. If you use this option none of the other expected outputs will be produced', argstr='-allcostx |& tee %s', position=-1, - xor=['out_file']) - + xor=['out_file', 'out_matrix', 'out_param_file', 'out_weight_file']) _cost_funcs = [ 'leastsq', 'ls', 'mutualinfo', 'mi', @@ -365,7 +361,8 @@ class AllineateInputSpec(AFNICommandInputSpec): 'Must be defined on the same grid as the base dataset') out_weight_file = traits.File( argstr='-wtprefix %s', - desc='Write the weight volume to disk as a dataset') + desc='Write the weight volume to disk as a dataset', + xor=['allcostx']) source_mask = File( exists=True, argstr='-source_mask %s', @@ -445,7 +442,7 @@ class Allineate(AFNICommand): >>> allineate.inputs.out_file = 'functional_allineate.nii' >>> allineate.inputs.in_matrix = 'cmatrix.mat' >>> allineate.cmdline # doctest: +ALLOW_UNICODE - '3dAllineate -source functional.nii -1Dmatrix_apply cmatrix.mat -prefix functional_allineate.nii' + '3dAllineate -source functional.nii -prefix functional_allineate.nii -1Dmatrix_apply cmatrix.mat' >>> res = allineate.run() # doctest: +SKIP >>> from nipype.interfaces import afni @@ -454,7 +451,7 @@ class Allineate(AFNICommand): >>> allineate.inputs.reference = 'structural.nii' >>> allineate.inputs.allcostx = 'out.allcostX.txt' >>> allineate.cmdline # doctest: +ALLOW_UNICODE - '3dAllineate -source functional.nii -prefix functional_allineate -base structural.nii -allcostx |& tee out.allcostX.txt' + '3dAllineate -source functional.nii -base structural.nii -allcostx |& tee out.allcostX.txt' >>> res = allineate.run() # doctest: +SKIP """ @@ -493,8 +490,8 @@ def _list_outputs(self): else: outputs['out_param_file'] = op.abspath(self.inputs.out_param_file) - if isdefined(self.inputs.allcostX): - outputs['allcostX'] = os.path.abspath(os.path.join(os.getcwd(),\ + if isdefined(self.inputs.allcostx): + outputs['allcostX'] = os.path.abspath(os.path.join(os.getcwd(), self.inputs.allcostx)) return outputs diff --git a/nipype/interfaces/afni/tests/test_auto_Allineate.py b/nipype/interfaces/afni/tests/test_auto_Allineate.py index ee2a41011b..cc75f973cc 100644 --- a/nipype/interfaces/afni/tests/test_auto_Allineate.py +++ b/nipype/interfaces/afni/tests/test_auto_Allineate.py @@ -6,7 +6,7 @@ def test_Allineate_inputs(): input_map = dict(allcostx=dict(argstr='-allcostx |& tee %s', position=-1, - xor=['out_file'], + xor=['out_file', 'out_matrix', 'out_param_file', 'out_weight_file'], ), args=dict(argstr='%s', ), @@ -69,17 +69,16 @@ def test_Allineate_inputs(): ), out_file=dict(argstr='-prefix %s', genfile=True, - name_source='in_file', - name_template='%s_allineate', xor=['allcostx'], ), out_matrix=dict(argstr='-1Dmatrix_save %s', - xor=['in_matrix'], + xor=['in_matrix', 'allcostx'], ), out_param_file=dict(argstr='-1Dparam_save %s', - xor=['in_param_file'], + xor=['in_param_file', 'allcostx'], ), out_weight_file=dict(argstr='-wtprefix %s', + xor=['allcostx'], ), outputtype=dict(), overwrite=dict(argstr='-overwrite', From 7f5fd9761c76851d5913a09adbadac38e4ec7c36 Mon Sep 17 00:00:00 2001 From: mathiasg Date: Wed, 23 Aug 2017 17:09:48 -0400 Subject: [PATCH 163/643] enh: calcmedian interface --- nipype/algorithms/misc.py | 47 +++++++++++++++++++++++++++- nipype/algorithms/tests/test_misc.py | 17 +++++++++- 2 files changed, 62 insertions(+), 2 deletions(-) diff --git a/nipype/algorithms/misc.py b/nipype/algorithms/misc.py index 8b0bce02a9..6cc4b9fab2 100644 --- a/nipype/algorithms/misc.py +++ b/nipype/algorithms/misc.py @@ -33,7 +33,7 @@ InputMultiPath, OutputMultiPath, BaseInterfaceInputSpec, isdefined, DynamicTraitedSpec, Undefined) -from ..utils.filemanip import fname_presuffix, split_filename +from ..utils.filemanip import fname_presuffix, split_filename, filename_to_list from ..utils import NUMPY_MMAP from . import confounds @@ -1380,6 +1380,51 @@ def merge_rois(in_files, in_idxs, in_ref, return out_file +class CalculateMedianInputSpec(BaseInterfaceInputSpec): + in_file = InputMultiPath(File(exists=True, mandatory=True, + desc="One or more realigned Nifti 4D timeseries")) + median_file = traits.Str('median.nii.gz', usedefault=True, + desc="Filename to store median image") + +class CalculateMedianOutputSpec(TraitedSpec): + median_file = File(exists=True) + +class CalculateMedian(BaseInterface): + """ + Computes an average of the median across one or more 4D Nifti timeseries + + Example + ------- + + >>> from nipype.algorithms.misc import CalculateMedian + >>> mean = CalculateMedian() + >>> mean.inputs.in_file = 'functional.nii' + >>> mean.run() # doctest: +SKIP + + """ + input_spec = CalculateMedianInputSpec + output_spec = CalculateMedianOutputSpec + + def _run_interface(self, runtime): + total = None + for idx, fname in enumerate(filename_to_list(self.inputs.in_file)): + img = nb.load(fname, mmap=NUMPY_MMAP) + data = np.median(img.get_data(), axis=3) + if total is None: + total = data + else: + total += data + median_img = nb.Nifti1Image(total/(idx + 1), img.affine, img.header) + filename = os.path.join(os.getcwd(), self.inputs.median_file) + median_img.to_filename(filename) + return runtime + + def _list_outputs(self): + outputs = self._outputs().get() + outputs['median_file'] = os.path.abspath(self.inputs.median_file) + return outputs + + # Deprecated interfaces ------------------------------------------------------ class Distance(nam.Distance): diff --git a/nipype/algorithms/tests/test_misc.py b/nipype/algorithms/tests/test_misc.py index eda249c88b..e7eaa88443 100644 --- a/nipype/algorithms/tests/test_misc.py +++ b/nipype/algorithms/tests/test_misc.py @@ -9,6 +9,7 @@ from nipype.algorithms import misc from nipype.utils.filemanip import fname_presuffix from nipype.testing.fixtures import create_analyze_pair_file_in_directory +from nipype.utils import NUMPY_MMAP def test_CreateNifti(create_analyze_pair_file_in_directory): @@ -31,4 +32,18 @@ def test_CreateNifti(create_analyze_pair_file_in_directory): result = create_nifti.run() assert os.path.exists(result.outputs.nifti_file) - assert nb.load(result.outputs.nifti_file) + assert nb.load(result.outputs.nifti_file, mmap=NUMPY_MMAP) + +def test_CalculateMedian(create_analyze_pair_file_in_directory): + + filelist, outdir = create_analyze_pair_file_in_directory + + mean = misc.CalculateMedian() + + with pytest.raises(TypeError): mean.run() + + mean.inputs.in_file = filelist[0] + eg = mean.run() + + assert os.path.exists(eg.outputs.median_file) + assert nb.load(eg.outputs.median_file, mmap=NUMPY_MMAP) From 5b06c8ef0b72bc0f9be47942b02deb68c1479ffc Mon Sep 17 00:00:00 2001 From: mathiasg Date: Wed, 23 Aug 2017 17:17:19 -0400 Subject: [PATCH 164/643] enh: update examples with new interface --- examples/fmri_ants_openfmri.py | 35 ++----------------- examples/rsfmri_vol_surface_preprocessing.py | 8 ++--- .../rsfmri_vol_surface_preprocessing_nipy.py | 8 ++--- 3 files changed, 6 insertions(+), 45 deletions(-) diff --git a/examples/fmri_ants_openfmri.py b/examples/fmri_ants_openfmri.py index ba5ce3ce0c..3cb772d78c 100755 --- a/examples/fmri_ants_openfmri.py +++ b/examples/fmri_ants_openfmri.py @@ -26,7 +26,7 @@ import nipype.pipeline.engine as pe import nipype.algorithms.modelgen as model import nipype.algorithms.rapidart as ra -from nipype.algorithms.misc import TSNR +from nipype.algorithms.misc import TSNR, CalculateMedian from nipype.interfaces.c3 import C3dAffineTool from nipype.interfaces import fsl, Function, ants, freesurfer as fs import nipype.interfaces.io as nio @@ -55,33 +55,6 @@ 'from scipy.special import legendre' ] -def median(in_files): - """Computes an average of the median of each realigned timeseries - - Parameters - ---------- - - in_files: one or more realigned Nifti 4D time series - - Returns - ------- - - out_file: a 3D Nifti file - """ - average = None - for idx, filename in enumerate(filename_to_list(in_files)): - img = nb.load(filename, mmap=NUMPY_MMAP) - data = np.median(img.get_data(), axis=3) - if average is None: - average = data - else: - average = average + data - median_img = nb.Nifti1Image(average / float(idx + 1), img.affine, - img.header) - filename = os.path.join(os.getcwd(), 'median.nii.gz') - median_img.to_filename(filename) - return filename - def create_reg_workflow(name='registration'): """Create a FEAT preprocessing workflow together with freesurfer @@ -818,11 +791,7 @@ def check_behav_list(behav, run_id, conds): wf.connect(preproc, "outputspec.realigned_files", tsnr, "in_file") # Compute the median image across runs - calc_median = Node(Function(input_names=['in_files'], - output_names=['median_file'], - function=median, - imports=imports), - name='median') + calc_median = Node(CalculateMedian(), name='median') wf.connect(tsnr, 'detrended_file', calc_median, 'in_files') """ diff --git a/examples/rsfmri_vol_surface_preprocessing.py b/examples/rsfmri_vol_surface_preprocessing.py index 77c7598f84..38c745fdfd 100644 --- a/examples/rsfmri_vol_surface_preprocessing.py +++ b/examples/rsfmri_vol_surface_preprocessing.py @@ -67,7 +67,7 @@ # mlab.MatlabCommand.set_default_paths('/software/matlab/spm12') from nipype.algorithms.rapidart import ArtifactDetect -from nipype.algorithms.misc import TSNR +from nipype.algorithms.misc import TSNR, CalculateMedian from nipype.interfaces.utility import Rename, Merge, IdentityInterface from nipype.utils.filemanip import filename_to_list from nipype.interfaces.io import DataSink, FreeSurferSource @@ -623,11 +623,7 @@ def create_workflow(files, wf.connect(slice_timing, 'timecorrected_files', tsnr, 'in_file') # Compute the median image across runs - calc_median = Node(Function(input_names=['in_files'], - output_names=['median_file'], - function=median, - imports=imports), - name='median') + calc_median = Node(CalculateMedian(), name='median') wf.connect(tsnr, 'detrended_file', calc_median, 'in_files') """Segment and Register diff --git a/examples/rsfmri_vol_surface_preprocessing_nipy.py b/examples/rsfmri_vol_surface_preprocessing_nipy.py index a624326537..5f52aac4b2 100644 --- a/examples/rsfmri_vol_surface_preprocessing_nipy.py +++ b/examples/rsfmri_vol_surface_preprocessing_nipy.py @@ -65,7 +65,7 @@ from nipype import Workflow, Node, MapNode from nipype.algorithms.rapidart import ArtifactDetect -from nipype.algorithms.misc import TSNR +from nipype.algorithms.misc import TSNR, CalculateMedian from nipype.algorithms.confounds import ACompCor from nipype.interfaces.utility import Rename, Merge, IdentityInterface from nipype.utils.filemanip import filename_to_list @@ -556,11 +556,7 @@ def create_workflow(files, wf.connect(realign, "out_file", tsnr, "in_file") # Compute the median image across runs - calc_median = Node(Function(input_names=['in_files'], - output_names=['median_file'], - function=median, - imports=imports), - name='median') + calc_median = Node(CalculateMedian(), name='median') wf.connect(tsnr, 'detrended_file', calc_median, 'in_files') """Segment and Register From e7b9a10c7ae3f3635fbdf58f7ddd8295a2d1acdd Mon Sep 17 00:00:00 2001 From: Horea Christian Date: Tue, 22 Aug 2017 20:44:17 +0200 Subject: [PATCH 165/643] Detecting and appropriately warning about unconnected duplicate nodes --- .../pipeline/engine/tests/test_workflows.py | 36 +++++++++++++++++++ nipype/pipeline/engine/workflows.py | 9 +++-- 2 files changed, 43 insertions(+), 2 deletions(-) create mode 100644 nipype/pipeline/engine/tests/test_workflows.py diff --git a/nipype/pipeline/engine/tests/test_workflows.py b/nipype/pipeline/engine/tests/test_workflows.py new file mode 100644 index 0000000000..32b2fa3505 --- /dev/null +++ b/nipype/pipeline/engine/tests/test_workflows.py @@ -0,0 +1,36 @@ +# -*- coding: utf-8 -*- +# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- +# vi: set ft=python sts=4 ts=4 sw=4 et: +"""Tests for the engine workflows module +""" +import pytest + +from ... import engine as pe +from ....interfaces import utility as niu + + +def test_duplicate_node_check(): + + wf = pe.Workflow(name="testidentity") + + original_list = [0,1,2,3,4,5,6,7,8,9] + + selector1 = pe.Node(niu.Select(), name="selector1") + selector1.inputs.index = original_list[:-1] + selector1.inputs.inlist = original_list + selector2 = pe.Node(niu.Select(), name="selector2") + selector2.inputs.index = original_list[:-2] + selector3 = pe.Node(niu.Select(), name="selector3") + selector3.inputs.index = original_list[:-3] + selector4 = pe.Node(niu.Select(), name="selector3") + selector4.inputs.index = original_list[:-4] + + wf_connections = [ + (selector1, selector2, [("out","inlist")]), + (selector2, selector3, [("out","inlist")]), + (selector3, selector4, [("out","inlist")]), + ] + + with pytest.raises(IOError) as excinfo: + wf.connect(wf_connections) + assert 'Duplicate node name "selector3" found.' == str(excinfo.value) diff --git a/nipype/pipeline/engine/workflows.py b/nipype/pipeline/engine/workflows.py index f30ed50051..e1535b4cf9 100644 --- a/nipype/pipeline/engine/workflows.py +++ b/nipype/pipeline/engine/workflows.py @@ -700,8 +700,13 @@ def _check_nodes(self, nodes): for node in nodes: if node.name in node_names: idx = node_names.index(node.name) - if node_lineage[idx] in [node._hierarchy, self.name]: - raise IOError('Duplicate node name %s found.' % node.name) + try: + this_node_lineage = node_lineage[idx] + except IndexError: + raise IOError('Duplicate node name "%s" found.' % node.name) + else: + if this_node_lineage in [node._hierarchy, self.name]: + raise IOError('Duplicate node name "%s" found.' % node.name) else: node_names.append(node.name) From ba12725247c90dff16300bfd4920bd9c5474a06e Mon Sep 17 00:00:00 2001 From: sitek Date: Thu, 24 Aug 2017 15:55:00 -0400 Subject: [PATCH 166/643] updated target file for probtrackx2 outputs['network_matrix'] --- nipype/interfaces/fsl/dti.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nipype/interfaces/fsl/dti.py b/nipype/interfaces/fsl/dti.py index c514bd95f0..a9d00f52cd 100644 --- a/nipype/interfaces/fsl/dti.py +++ b/nipype/interfaces/fsl/dti.py @@ -797,7 +797,7 @@ def _list_outputs(self): if isdefined(self.inputs.omatrix1): outputs['network_matrix'] = os.path.abspath( - os.path.join(out_dir, 'fdt_network_matrix')) + os.path.join(out_dir, 'matrix_seeds_to_all_targets')) outputs['matrix1_dot'] = os.path.abspath( os.path.join(out_dir, 'fdt_matrix1.dot')) From 461720ace37761e7182b24edc81484a65a001a56 Mon Sep 17 00:00:00 2001 From: sitek Date: Thu, 24 Aug 2017 15:56:10 -0400 Subject: [PATCH 167/643] added probtrackx2 outputs['way_total'] --- nipype/interfaces/fsl/dti.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nipype/interfaces/fsl/dti.py b/nipype/interfaces/fsl/dti.py index a9d00f52cd..9d74a3fafe 100644 --- a/nipype/interfaces/fsl/dti.py +++ b/nipype/interfaces/fsl/dti.py @@ -795,6 +795,8 @@ def _list_outputs(self): else: out_dir = self.inputs.out_dir + outputs['way_total'] = os.path.abspath(os.path.join(out_dir, 'waytotal')) + if isdefined(self.inputs.omatrix1): outputs['network_matrix'] = os.path.abspath( os.path.join(out_dir, 'matrix_seeds_to_all_targets')) From 9ebee75ad6d3b3a70a166ba396305097fb8227ae Mon Sep 17 00:00:00 2001 From: mathiasg Date: Fri, 25 Aug 2017 16:56:21 -0400 Subject: [PATCH 168/643] enh+ref: allow generation of multiple median files --- nipype/algorithms/misc.py | 69 ++++++++++++++++++++++------ nipype/algorithms/tests/test_misc.py | 9 ++-- 2 files changed, 60 insertions(+), 18 deletions(-) diff --git a/nipype/algorithms/misc.py b/nipype/algorithms/misc.py index 6cc4b9fab2..f1cd8179fa 100644 --- a/nipype/algorithms/misc.py +++ b/nipype/algorithms/misc.py @@ -1381,13 +1381,15 @@ def merge_rois(in_files, in_idxs, in_ref, class CalculateMedianInputSpec(BaseInterfaceInputSpec): - in_file = InputMultiPath(File(exists=True, mandatory=True, + in_files = InputMultiPath(File(exists=True, mandatory=True, desc="One or more realigned Nifti 4D timeseries")) - median_file = traits.Str('median.nii.gz', usedefault=True, - desc="Filename to store median image") + median_file = traits.Str(desc="Filename prefix to store median images") + median_per_file = traits.Bool(False, usedefault=True, + desc="Calculate a median file for each Nifti") class CalculateMedianOutputSpec(TraitedSpec): - median_file = File(exists=True) + median_files = OutputMultiPath(File(exists=True), + desc="One or more median images") class CalculateMedian(BaseInterface): """ @@ -1398,32 +1400,73 @@ class CalculateMedian(BaseInterface): >>> from nipype.algorithms.misc import CalculateMedian >>> mean = CalculateMedian() - >>> mean.inputs.in_file = 'functional.nii' + >>> mean.inputs.in_files = 'functional.nii' >>> mean.run() # doctest: +SKIP """ input_spec = CalculateMedianInputSpec output_spec = CalculateMedianOutputSpec + def __init__(self, *args, **kwargs): + super(CalculateMedian, self).__init__(*args, **kwargs) + self._median_files = [] + + def _gen_fname(self, suffix, idx=None, ext=None): + if idx: + in_file = self.inputs.in_files[idx] + else: + if isinstance(self.inputs.in_files, list): + in_file = self.inputs.in_files[0] + else: + in_file = self.inputs.in_files + fname, in_ext = op.splitext(op.basename(in_file)) + if in_ext == '.gz': + fname, in_ext2 = op.splitext(fname) + in_ext = in_ext2 + in_ext + if ext is None: + ext = in_ext + if ext.startswith('.'): + ext = ext[1:] + if self.inputs.median_file: + outname = self.inputs.median_file + else: + outname = '{}_{}'.format(fname, suffix) + if idx: + outname += str(idx) + return op.abspath('{}.{}'.format(outname, ext)) + def _run_interface(self, runtime): total = None - for idx, fname in enumerate(filename_to_list(self.inputs.in_file)): + self._median_files = [] + for idx, fname in enumerate(filename_to_list(self.inputs.in_files)): img = nb.load(fname, mmap=NUMPY_MMAP) data = np.median(img.get_data(), axis=3) - if total is None: - total = data + if self.inputs.median_per_file: + self._median_files.append(self._write_nifti(img, data, idx)) else: - total += data - median_img = nb.Nifti1Image(total/(idx + 1), img.affine, img.header) - filename = os.path.join(os.getcwd(), self.inputs.median_file) - median_img.to_filename(filename) + if total is None: + total = data + else: + total += data + if not self.inputs.median_per_file: + self._median_files.append(self._write_nifti(img, total, idx)) return runtime def _list_outputs(self): outputs = self._outputs().get() - outputs['median_file'] = os.path.abspath(self.inputs.median_file) + outputs['median_files'] = self._median_files return outputs + def _write_nifti(self, img, data, idx, suffix='median'): + if self.inputs.median_per_file: + median_img = nb.Nifti1Image(data, img.affine, img.header) + filename = self._gen_fname(suffix, idx=idx) + else: + median_img = nb.Nifti1Image(data/(idx+1), img.affine, img.header) + filename = self._gen_fname(suffix) + median_img.to_filename(filename) + return filename + # Deprecated interfaces ------------------------------------------------------ diff --git a/nipype/algorithms/tests/test_misc.py b/nipype/algorithms/tests/test_misc.py index e7eaa88443..d148ee8ca1 100644 --- a/nipype/algorithms/tests/test_misc.py +++ b/nipype/algorithms/tests/test_misc.py @@ -10,6 +10,7 @@ from nipype.utils.filemanip import fname_presuffix from nipype.testing.fixtures import create_analyze_pair_file_in_directory from nipype.utils import NUMPY_MMAP +from nipype.testing import example_data def test_CreateNifti(create_analyze_pair_file_in_directory): @@ -36,14 +37,12 @@ def test_CreateNifti(create_analyze_pair_file_in_directory): def test_CalculateMedian(create_analyze_pair_file_in_directory): - filelist, outdir = create_analyze_pair_file_in_directory - mean = misc.CalculateMedian() with pytest.raises(TypeError): mean.run() - mean.inputs.in_file = filelist[0] + mean.inputs.in_files = example_data('ds003_sub-01_mc.nii.gz') eg = mean.run() - assert os.path.exists(eg.outputs.median_file) - assert nb.load(eg.outputs.median_file, mmap=NUMPY_MMAP) + assert os.path.exists(eg.outputs.median_files) + assert nb.load(eg.outputs.median_files, mmap=NUMPY_MMAP) From 13018737b7b5c4032496851502204f64c4b32174 Mon Sep 17 00:00:00 2001 From: mathiasg Date: Wed, 30 Aug 2017 15:08:57 -0400 Subject: [PATCH 169/643] fix: allow translation thresholding --- nipype/algorithms/rapidart.py | 19 +++++++++---------- .../tests/test_auto_ArtifactDetect.py | 1 - 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/nipype/algorithms/rapidart.py b/nipype/algorithms/rapidart.py index b0511c0fc6..59bbb211fd 100644 --- a/nipype/algorithms/rapidart.py +++ b/nipype/algorithms/rapidart.py @@ -165,10 +165,9 @@ class ArtifactDetectInputSpec(BaseInterfaceInputSpec): desc=("Use differences between successive motion (first element)" "and intensity paramter (second element) estimates in order" "to determine outliers. (default is [True, False])")) - use_norm = traits.Bool(True, requires=['norm_threshold'], + use_norm = traits.Bool(requires=['norm_threshold'], desc=("Uses a composite of the motion parameters in " - "order to determine outliers."), - usedefault=True) + "order to determine outliers.")) norm_threshold = traits.Float(desc=("Threshold to use to detect motion-rela" "ted outliers when composite motion is " "being used"), mandatory=True, @@ -307,7 +306,7 @@ def _list_outputs(self): outputs['intensity_files'] = [] outputs['statistic_files'] = [] outputs['mask_files'] = [] - if isdefined(self.inputs.use_norm) and self.inputs.use_norm: + if isdefined(self.inputs.norm_threshold): outputs['norm_files'] = [] if self.inputs.bound_by_brainmask: outputs['displacement_files'] = [] @@ -321,7 +320,7 @@ def _list_outputs(self): outputs['intensity_files'].insert(i, intensityfile) outputs['statistic_files'].insert(i, statsfile) outputs['mask_files'].insert(i, maskfile) - if isdefined(self.inputs.use_norm) and self.inputs.use_norm: + if isdefined(self.inputs.norm_threshold): outputs['norm_files'].insert(i, normfile) if self.inputs.bound_by_brainmask: outputs['displacement_files'].insert(i, displacementfile) @@ -427,7 +426,7 @@ def _detect_outliers_core(self, imgfile, motionfile, runidx, cwd=None): mask_img = Nifti1Image(mask.astype(np.uint8), affine) mask_img.to_filename(maskfile) - if self.inputs.use_norm: + if isdefined(self.inputs.norm_threshold): brain_pts = None if self.inputs.bound_by_brainmask: voxel_coords = np.nonzero(mask) @@ -470,7 +469,7 @@ def _detect_outliers_core(self, imgfile, motionfile, runidx, cwd=None): # write output to outputfile np.savetxt(artifactfile, outliers, fmt=b'%d', delimiter=' ') np.savetxt(intensityfile, g, fmt=b'%.2f', delimiter=' ') - if self.inputs.use_norm: + if isdefined(self.inputs.norm_threshold): np.savetxt(normfile, normval, fmt=b'%.4f', delimiter=' ') if isdefined(self.inputs.save_plot) and self.inputs.save_plot: @@ -478,12 +477,12 @@ def _detect_outliers_core(self, imgfile, motionfile, runidx, cwd=None): matplotlib.use(config.get("execution", "matplotlib_backend")) import matplotlib.pyplot as plt fig = plt.figure() - if isdefined(self.inputs.use_norm) and self.inputs.use_norm: + if isdefined(self.inputs.norm_threshold): plt.subplot(211) else: plt.subplot(311) self._plot_outliers_with_wave(gz, iidx, 'Intensity') - if isdefined(self.inputs.use_norm) and self.inputs.use_norm: + if isdefined(self.inputs.norm_threshold): plt.subplot(212) self._plot_outliers_with_wave(normval, np.union1d(tidx, ridx), 'Norm (mm)') @@ -521,7 +520,7 @@ def _detect_outliers_core(self, imgfile, motionfile, runidx, cwd=None): 'std': np.std(gz, axis=0).tolist()}, ]}, ] - if self.inputs.use_norm: + if isdefined(self.inputs.norm_threshold): stats.insert(3, {'motion_norm': {'mean': np.mean(normval, axis=0).tolist(), 'min': np.min(normval, axis=0).tolist(), diff --git a/nipype/algorithms/tests/test_auto_ArtifactDetect.py b/nipype/algorithms/tests/test_auto_ArtifactDetect.py index 054bc1da99..1f2b731b02 100644 --- a/nipype/algorithms/tests/test_auto_ArtifactDetect.py +++ b/nipype/algorithms/tests/test_auto_ArtifactDetect.py @@ -40,7 +40,6 @@ def test_ArtifactDetect_inputs(): usedefault=True, ), use_norm=dict(requires=['norm_threshold'], - usedefault=True, ), zintensity_threshold=dict(mandatory=True, ), From 7055313c91de52bf65518284b42df446466fe581 Mon Sep 17 00:00:00 2001 From: mathiasg Date: Wed, 30 Aug 2017 15:13:21 -0400 Subject: [PATCH 170/643] enh: autotest --- .../tests/test_auto_CalculateMedian.py | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 nipype/algorithms/tests/test_auto_CalculateMedian.py diff --git a/nipype/algorithms/tests/test_auto_CalculateMedian.py b/nipype/algorithms/tests/test_auto_CalculateMedian.py new file mode 100644 index 0000000000..88888d5bbe --- /dev/null +++ b/nipype/algorithms/tests/test_auto_CalculateMedian.py @@ -0,0 +1,29 @@ +# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT +from __future__ import unicode_literals +from ..misc import CalculateMedian + + +def test_CalculateMedian_inputs(): + input_map = dict(ignore_exception=dict(nohash=True, + usedefault=True, + ), + in_files=dict(), + median_file=dict(), + median_per_file=dict(usedefault=True, + ), + ) + inputs = CalculateMedian.input_spec() + + for key, metadata in list(input_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(inputs.traits()[key], metakey) == value + + +def test_CalculateMedian_outputs(): + output_map = dict(median_files=dict(), + ) + outputs = CalculateMedian.output_spec() + + for key, metadata in list(output_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(outputs.traits()[key], metakey) == value From a1b903c6009d07a6c8e922f86745f2f536e52df5 Mon Sep 17 00:00:00 2001 From: adelavega Date: Fri, 1 Sep 2017 11:15:49 -0700 Subject: [PATCH 171/643] Added BIDSDataGrabber, test data and tests --- nipype/interfaces/bids.py | 147 ++++++++++++++++++++++++++++++++++++++ requirements.txt | 1 + 2 files changed, 148 insertions(+) create mode 100644 nipype/interfaces/bids.py diff --git a/nipype/interfaces/bids.py b/nipype/interfaces/bids.py new file mode 100644 index 0000000000..343542aa09 --- /dev/null +++ b/nipype/interfaces/bids.py @@ -0,0 +1,147 @@ +# -*- coding: utf-8 -*- +# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- +# vi: set ft=python sts=4 ts=4 sw=4 et: +""" Set of interfaces that allow interaction with BIDS data. Currently + available interfaces are: + + BIDSDataGrabber: Query data from BIDS dataset using pybids grabbids. + + Change directory to provide relative paths for doctests + >>> import os + >>> filepath = os.path.dirname( os.path.realpath( __file__ ) ) + >>> datadir = os.path.realpath(os.path.join(filepath, '../testing/data')) + >>> os.chdir(datadir) + +""" + +from .base import (traits, + DynamicTraitedSpec, + BaseInterface, + isdefined, + Str, + Undefined) + +from bids.grabbids import BIDSLayout + + +class BIDSDataGrabberInputSpec(DynamicTraitedSpec): + base_dir = traits.Directory(exists=True, + desc='Path to BIDS Directory.', + mandatory=True) + output_query = traits.Dict(key_trait=Str, + value_trait=traits.Dict, + desc='Queries for outfield outputs') + return_type = traits.Enum('filename', 'namedtuple', usedefault=True) + + +class BIDSDataGrabber(BaseInterface): + + """ BIDS datagrabber module that wraps around pybids to allow arbitrary + querying of BIDS datasets. + + Examples + -------- + + >>> from nipype.interfaces.bids import BIDSDataGrabber + >>> from os.path import basename + >>> import pprint + + Select all files from a BIDS project + + >>> bg = BIDSDataGrabber() + >>> bg.inputs.base_dir = 'ds005/' + >>> results = bg.run() + >>> pprint.pprint(len(results.outputs.outfield)) # doctest: +ALLOW_UNICODE + 116 + + Using dynamically created, user-defined input fields, + filter files based on BIDS entities. + + >>> bg = BIDSDataGrabber(infields = ['subject', 'run']) + >>> bg.inputs.base_dir = 'ds005/' + >>> bg.inputs.subject = '01' + >>> bg.inputs.run = '01' + >>> results = bg.run() + >>> basename(results.outputs.outfield[0]) # doctest: +ALLOW_UNICODE + 'sub-01_task-mixedgamblestask_run-01_bold.nii.gz' + + Using user-defined output fields, return different types of outputs, + filtered on common entities + filter files based on BIDS entities. + + >>> bg = BIDSDataGrabber(infields = ['subject'], outfields = ['func', 'anat']) + >>> bg.inputs.base_dir = 'ds005/' + >>> bg.inputs.subject = '01' + >>> bg.inputs.output_query['func'] = dict(modality='func') + >>> bg.inputs.output_query['anat'] = dict(modality='anat') + >>> results = bg.run() + >>> basename(results.outputs.func[0]) # doctest: +ALLOW_UNICODE + 'sub-01_task-mixedgamblestask_run-01_bold.nii.gz' + + >>> basename(results.outputs.anat[0]) # doctest: +ALLOW_UNICODE + 'sub-01_T1w.nii.gz' + """ + input_spec = BIDSDataGrabberInputSpec + output_spec = DynamicTraitedSpec + _always_run = True + + def __init__(self, infields=None, outfields=None, **kwargs): + """ + Parameters + ---------- + infields : list of str + Indicates the input fields to be dynamically created + + outfields: list of str + Indicates output fields to be dynamically created + + """ + if not outfields: + outfields = [] + if not infields: + infields = [] + + super(BIDSDataGrabber, self).__init__(**kwargs) + undefined_traits = {} + # used for mandatory inputs check + self._infields = infields + self._outfields = outfields + for key in infields: + self.inputs.add_trait(key, traits.Any) + undefined_traits[key] = Undefined + + if not isdefined(self.inputs.output_query): + self.inputs.output_query = {} + + self.inputs.trait_set(trait_change_notify=False, **undefined_traits) + + def _run_interface(self, runtime): + return runtime + + def _list_outputs(self): + if not self._outfields: + self._outfields = ['outfield'] + self.inputs.output_query = {'outfield' : {}} + else: + for key in self._outfields: + if key not in self.inputs.output_query: + raise ValueError("Define query for all outputs") + + for key in self._infields: + value = getattr(self.inputs, key) + if not isdefined(value): + msg = "%s requires a value for input '%s' because" \ + " it was listed in 'infields'" % \ + (self.__class__.__name__, key) + raise ValueError(msg) + + layout = BIDSLayout(self.inputs.base_dir) + + filters = {i: getattr(self.inputs, i) for i in self._infields} + + outputs = {} + for key, query in self.inputs.output_query.items(): + outputs[key] = layout.get( + **dict(query.items() | filters.items()), + return_type='file') + return outputs diff --git a/requirements.txt b/requirements.txt index bcd3ab2fef..3e9009a21a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -13,4 +13,5 @@ configparser pytest>=3.0 mock pydotplus +pybids==0.3 packaging From da44acf74365dfe49668abb39406860a1d4805b1 Mon Sep 17 00:00:00 2001 From: adelavega Date: Fri, 1 Sep 2017 11:50:38 -0700 Subject: [PATCH 172/643] Edited contributors --- .zenodo.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.zenodo.json b/.zenodo.json index b76c0e6313..ad164e2795 100644 --- a/.zenodo.json +++ b/.zenodo.json @@ -523,7 +523,12 @@ "affiliation": "University of Amsterdam", "name": "Lukas Snoek", "orcid": "0000-0001-8972-204X" - } + }, + { + "affiliation": "University of Texas at Austin", + "name": "De La Vega, Alejandro", + "orcid": "0000-0001-9062-3778" + }, ], "keywords": [ "neuroimaging", From 1e0831c7848a9c7f8c5a70eca54fe5a893ee51f7 Mon Sep 17 00:00:00 2001 From: Gilles de Hollander Date: Mon, 4 Sep 2017 13:34:28 +0200 Subject: [PATCH 173/643] ConvertLTA can export to ITK-format --- nipype/interfaces/freesurfer/utils.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/nipype/interfaces/freesurfer/utils.py b/nipype/interfaces/freesurfer/utils.py index 38c0fbf2f8..89be7e74aa 100644 --- a/nipype/interfaces/freesurfer/utils.py +++ b/nipype/interfaces/freesurfer/utils.py @@ -3110,6 +3110,8 @@ class LTAConvertInputSpec(CommandLineInputSpec): desc='output transform in MNI/XFM format') out_reg = traits.Either(traits.Bool, File, argstr='--outreg %s', desc='output transform in reg dat format') + out_itk = traits.Either(traits.Bool, File, argstr='--outitk %s', + desc='output transform in ITK format') # Optional flags invert = traits.Bool(argstr='--invert') ltavox2vox = traits.Bool(argstr='--ltavox2vox', requires=['out_lta']) @@ -3124,6 +3126,7 @@ class LTAConvertOutputSpec(TraitedSpec): out_fsl = File(exists=True, desc='output transform in FSL format') out_mni = File(exists=True, desc='output transform in MNI/XFM format') out_reg = File(exists=True, desc='output transform in reg dat format') + out_itk = File(exists=True, desc='output transform in ITK format') class LTAConvert(CommandLine): @@ -3146,7 +3149,8 @@ def _format_arg(self, name, spec, value): def _list_outputs(self): outputs = self.output_spec().get() for name, default in (('out_lta', 'out.lta'), ('out_fsl', 'out.mat'), - ('out_mni', 'out.xfm'), ('out_reg', 'out.dat')): + ('out_mni', 'out.xfm'), ('out_reg', 'out.dat'), + ('out_itk', 'out.txt')): attr = getattr(self.inputs, name) if attr: fname = default if attr is True else attr From 5327a65965b1c7e0e3923fbbf2aa2a2e71591f3c Mon Sep 17 00:00:00 2001 From: Gilles de Hollander Date: Mon, 4 Sep 2017 14:01:58 +0200 Subject: [PATCH 174/643] Added test for lta_convert with out_itk --- nipype/interfaces/freesurfer/tests/test_auto_LTAConvert.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nipype/interfaces/freesurfer/tests/test_auto_LTAConvert.py b/nipype/interfaces/freesurfer/tests/test_auto_LTAConvert.py index 95e2c21eb7..77899ccf25 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_LTAConvert.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_LTAConvert.py @@ -45,6 +45,8 @@ def test_LTAConvert_inputs(): ), out_reg=dict(argstr='--outreg %s', ), + out_itk=dict(argstr='--outitk %s', + ), source_file=dict(argstr='--src %s', ), target_conform=dict(argstr='--trgconform', From 6f5a7a144184f63d68a4503b8c35c36e44a1ab68 Mon Sep 17 00:00:00 2001 From: Gilles de Hollander Date: Mon, 4 Sep 2017 14:05:56 +0200 Subject: [PATCH 175/643] Added myself to .zenodo (although maybe bit much for 3 lines of code so far?) --- .zenodo.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.zenodo.json b/.zenodo.json index b76c0e6313..f4778b8a92 100644 --- a/.zenodo.json +++ b/.zenodo.json @@ -524,6 +524,11 @@ "name": "Lukas Snoek", "orcid": "0000-0001-8972-204X" } + { + "affiliation": "Vrije Universiteit, Amsterdam", + "name": "Gilles de Hollander", + "orcid": "0000-0003-1988-5091" + } ], "keywords": [ "neuroimaging", From 8ed1c44ea23884b6d2a597d30b87c31a10452402 Mon Sep 17 00:00:00 2001 From: adelavega Date: Mon, 4 Sep 2017 15:42:06 -0700 Subject: [PATCH 176/643] Removed data, using test data from pybids package --- nipype/interfaces/bids.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/nipype/interfaces/bids.py b/nipype/interfaces/bids.py index 343542aa09..317c871468 100644 --- a/nipype/interfaces/bids.py +++ b/nipype/interfaces/bids.py @@ -8,8 +8,9 @@ Change directory to provide relative paths for doctests >>> import os - >>> filepath = os.path.dirname( os.path.realpath( __file__ ) ) - >>> datadir = os.path.realpath(os.path.join(filepath, '../testing/data')) + >>> import bids + >>> filepath = os.path.realpath(os.path.dirname(bids.__file__)) + >>> datadir = os.path.realpath(os.path.join(filepath, 'grabbids/tests/data/')) >>> os.chdir(datadir) """ @@ -51,7 +52,7 @@ class BIDSDataGrabber(BaseInterface): >>> bg = BIDSDataGrabber() >>> bg.inputs.base_dir = 'ds005/' >>> results = bg.run() - >>> pprint.pprint(len(results.outputs.outfield)) # doctest: +ALLOW_UNICODE + >>> len(results.outputs.outfield) # doctest: +ALLOW_UNICODE 116 Using dynamically created, user-defined input fields, From 52cf9e4977d3b4371d26222562b2ae0c03233caf Mon Sep 17 00:00:00 2001 From: adelavega Date: Mon, 4 Sep 2017 16:14:03 -0700 Subject: [PATCH 177/643] Check if pybids is installed when importing --- nipype/interfaces/bids.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/nipype/interfaces/bids.py b/nipype/interfaces/bids.py index 317c871468..5e772569b2 100644 --- a/nipype/interfaces/bids.py +++ b/nipype/interfaces/bids.py @@ -22,7 +22,12 @@ Str, Undefined) -from bids.grabbids import BIDSLayout +try: + from bids.grabbids import BIDSLayout +except ImportError: + have_pybids = False +else: + have_pybids = True class BIDSDataGrabberInputSpec(DynamicTraitedSpec): @@ -117,6 +122,9 @@ def __init__(self, infields=None, outfields=None, **kwargs): self.inputs.trait_set(trait_change_notify=False, **undefined_traits) def _run_interface(self, runtime): + if not have_pybids: + raise ImportError("The BIDSEventsGrabber interface requires pybids." + " Please make sure it is installed.") return runtime def _list_outputs(self): From 6a4ce640570c2fdecfd87dce14998d4744fb0fba Mon Sep 17 00:00:00 2001 From: adelavega Date: Mon, 4 Sep 2017 18:56:03 -0700 Subject: [PATCH 178/643] Tried to fix reqs and travis --- .travis.yml | 6 +++--- nipype/info.py | 1 + requirements.txt | 1 - 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index f97f48dddb..4cd6d7bb7f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,9 +8,9 @@ python: - 3.5 - 3.6 env: -- INSTALL_DEB_DEPENDECIES=true NIPYPE_EXTRAS="doc,tests,fmri,profiler" -- INSTALL_DEB_DEPENDECIES=false NIPYPE_EXTRAS="doc,tests,fmri,profiler" -- INSTALL_DEB_DEPENDECIES=true NIPYPE_EXTRAS="doc,tests,fmri,profiler,duecredit" +- INSTALL_DEB_DEPENDECIES=true NIPYPE_EXTRAS="doc,tests,fmri,profiler,pybids" +- INSTALL_DEB_DEPENDECIES=false NIPYPE_EXTRAS="doc,tests,fmri,profiler,pybids" +- INSTALL_DEB_DEPENDECIES=true NIPYPE_EXTRAS="doc,tests,fmri,profiler,duecredit,pybids" before_install: - function apt_inst { if $INSTALL_DEB_DEPENDECIES; then sudo rm -rf /dev/shm; fi && diff --git a/nipype/info.py b/nipype/info.py index 9db9a02abd..d1a6501252 100644 --- a/nipype/info.py +++ b/nipype/info.py @@ -160,6 +160,7 @@ def get_nipype_gitversion(): 'profiler': ['psutil'], 'duecredit': ['duecredit'], 'xvfbwrapper': ['xvfbwrapper'], + 'pybids' : ['pybids'] # 'mesh': ['mayavi'] # Enable when it works } diff --git a/requirements.txt b/requirements.txt index 3e9009a21a..bcd3ab2fef 100644 --- a/requirements.txt +++ b/requirements.txt @@ -13,5 +13,4 @@ configparser pytest>=3.0 mock pydotplus -pybids==0.3 packaging From 73237afaf4caa89e778e636fcfd30cd266567c57 Mon Sep 17 00:00:00 2001 From: Gilles de Hollander Date: Thu, 7 Sep 2017 17:01:40 +0200 Subject: [PATCH 179/643] Added out_itk to tes_LTAConvert_outputs() --- nipype/interfaces/freesurfer/tests/test_auto_LTAConvert.py | 1 + 1 file changed, 1 insertion(+) diff --git a/nipype/interfaces/freesurfer/tests/test_auto_LTAConvert.py b/nipype/interfaces/freesurfer/tests/test_auto_LTAConvert.py index 77899ccf25..9ebadea3a9 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_LTAConvert.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_LTAConvert.py @@ -68,6 +68,7 @@ def test_LTAConvert_outputs(): out_lta=dict(), out_mni=dict(), out_reg=dict(), + out_itk=dict(), ) outputs = LTAConvert.output_spec() From 2403a9801d968a5d4ac95d23883938bf340b2618 Mon Sep 17 00:00:00 2001 From: Gilles de Hollander Date: Thu, 7 Sep 2017 17:02:41 +0200 Subject: [PATCH 180/643] Added option for --in_itk to LTAConvert --- .../freesurfer/tests/test_auto_LTAConvert.py | 14 +++++++++----- nipype/interfaces/freesurfer/utils.py | 5 ++++- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/nipype/interfaces/freesurfer/tests/test_auto_LTAConvert.py b/nipype/interfaces/freesurfer/tests/test_auto_LTAConvert.py index 9ebadea3a9..f82c59762d 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_LTAConvert.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_LTAConvert.py @@ -14,23 +14,27 @@ def test_LTAConvert_inputs(): ), in_fsl=dict(argstr='--infsl %s', mandatory=True, - xor=('in_lta', 'in_fsl', 'in_mni', 'in_reg', 'in_niftyreg'), + xor=('in_lta', 'in_fsl', 'in_mni', 'in_reg', 'in_niftyreg', 'in_itk'), ), in_lta=dict(argstr='--inlta %s', mandatory=True, - xor=('in_lta', 'in_fsl', 'in_mni', 'in_reg', 'in_niftyreg'), + xor=('in_lta', 'in_fsl', 'in_mni', 'in_reg', 'in_niftyreg', 'in_itk'), ), in_mni=dict(argstr='--inmni %s', mandatory=True, - xor=('in_lta', 'in_fsl', 'in_mni', 'in_reg', 'in_niftyreg'), + xor=('in_lta', 'in_fsl', 'in_mni', 'in_reg', 'in_niftyreg', 'in_itk'), ), in_niftyreg=dict(argstr='--inniftyreg %s', mandatory=True, - xor=('in_lta', 'in_fsl', 'in_mni', 'in_reg', 'in_niftyreg'), + xor=('in_lta', 'in_fsl', 'in_mni', 'in_reg', 'in_niftyreg', 'in_itk'), ), in_reg=dict(argstr='--inreg %s', mandatory=True, - xor=('in_lta', 'in_fsl', 'in_mni', 'in_reg', 'in_niftyreg'), + xor=('in_lta', 'in_fsl', 'in_mni', 'in_reg', 'in_niftyreg', 'in_itk'), + ), + in_reg=dict(argstr='--initk %s', + mandatory=True, + xor=('in_lta', 'in_fsl', 'in_mni', 'in_reg', 'in_niftyreg', 'in_itk'), ), invert=dict(argstr='--invert', ), diff --git a/nipype/interfaces/freesurfer/utils.py b/nipype/interfaces/freesurfer/utils.py index 89be7e74aa..720b294eeb 100644 --- a/nipype/interfaces/freesurfer/utils.py +++ b/nipype/interfaces/freesurfer/utils.py @@ -3084,7 +3084,7 @@ def _normalize_filenames(self): class LTAConvertInputSpec(CommandLineInputSpec): # Inputs - _in_xor = ('in_lta', 'in_fsl', 'in_mni', 'in_reg', 'in_niftyreg') + _in_xor = ('in_lta', 'in_fsl', 'in_mni', 'in_reg', 'in_niftyreg', 'in_itk') in_lta = traits.Either( File(exists=True), 'identity.nofile', argstr='--inlta %s', mandatory=True, xor=_in_xor, desc='input transform of LTA type') @@ -3100,6 +3100,9 @@ class LTAConvertInputSpec(CommandLineInputSpec): in_niftyreg = File( exists=True, argstr='--inniftyreg %s', mandatory=True, xor=_in_xor, desc='input transform of Nifty Reg type (inverse RAS2RAS)') + in_itk = File( + exists=True, argstr='--initk %s', mandatory=True, xor=_in_xor, + desc='input transform of ITK type') # Outputs out_lta = traits.Either( traits.Bool, File, argstr='--outlta %s', From c7e2a33cdd8682f4ecf4a872350cab509c248313 Mon Sep 17 00:00:00 2001 From: Gilles de Hollander Date: Thu, 7 Sep 2017 17:32:02 +0200 Subject: [PATCH 181/643] Fixed test_auto_LTAConvert.py using 'make specs' --- .../freesurfer/tests/test_auto_LTAConvert.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/nipype/interfaces/freesurfer/tests/test_auto_LTAConvert.py b/nipype/interfaces/freesurfer/tests/test_auto_LTAConvert.py index f82c59762d..a7e4a121af 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_LTAConvert.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_LTAConvert.py @@ -16,6 +16,10 @@ def test_LTAConvert_inputs(): mandatory=True, xor=('in_lta', 'in_fsl', 'in_mni', 'in_reg', 'in_niftyreg', 'in_itk'), ), + in_itk=dict(argstr='--initk %s', + mandatory=True, + xor=('in_lta', 'in_fsl', 'in_mni', 'in_reg', 'in_niftyreg', 'in_itk'), + ), in_lta=dict(argstr='--inlta %s', mandatory=True, xor=('in_lta', 'in_fsl', 'in_mni', 'in_reg', 'in_niftyreg', 'in_itk'), @@ -32,10 +36,6 @@ def test_LTAConvert_inputs(): mandatory=True, xor=('in_lta', 'in_fsl', 'in_mni', 'in_reg', 'in_niftyreg', 'in_itk'), ), - in_reg=dict(argstr='--initk %s', - mandatory=True, - xor=('in_lta', 'in_fsl', 'in_mni', 'in_reg', 'in_niftyreg', 'in_itk'), - ), invert=dict(argstr='--invert', ), ltavox2vox=dict(argstr='--ltavox2vox', @@ -43,14 +43,14 @@ def test_LTAConvert_inputs(): ), out_fsl=dict(argstr='--outfsl %s', ), + out_itk=dict(argstr='--outitk %s', + ), out_lta=dict(argstr='--outlta %s', ), out_mni=dict(argstr='--outmni %s', ), out_reg=dict(argstr='--outreg %s', ), - out_itk=dict(argstr='--outitk %s', - ), source_file=dict(argstr='--src %s', ), target_conform=dict(argstr='--trgconform', @@ -69,10 +69,10 @@ def test_LTAConvert_inputs(): def test_LTAConvert_outputs(): output_map = dict(out_fsl=dict(), + out_itk=dict(), out_lta=dict(), out_mni=dict(), out_reg=dict(), - out_itk=dict(), ) outputs = LTAConvert.output_spec() From 8495a879adf1a61004aa0fcb64b13b0ffd4cd4d7 Mon Sep 17 00:00:00 2001 From: Chris Markiewicz Date: Thu, 7 Sep 2017 15:09:16 -0400 Subject: [PATCH 182/643] DOC: Add comma to zenodo.json --- .zenodo.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.zenodo.json b/.zenodo.json index f4778b8a92..ca2f0543f5 100644 --- a/.zenodo.json +++ b/.zenodo.json @@ -523,7 +523,7 @@ "affiliation": "University of Amsterdam", "name": "Lukas Snoek", "orcid": "0000-0001-8972-204X" - } + }, { "affiliation": "Vrije Universiteit, Amsterdam", "name": "Gilles de Hollander", From 1f7b96b9ffadfd1dab105a6c745ef583de99b861 Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Tue, 29 Aug 2017 15:16:03 -0700 Subject: [PATCH 183/643] ENH: Add mri_coreg interface --- nipype/interfaces/freesurfer/__init__.py | 2 +- nipype/interfaces/freesurfer/registration.py | 142 ++++++++++++++++++ .../freesurfer/tests/test_auto_MRICoreg.py | 101 +++++++++++++ 3 files changed, 244 insertions(+), 1 deletion(-) create mode 100644 nipype/interfaces/freesurfer/tests/test_auto_MRICoreg.py diff --git a/nipype/interfaces/freesurfer/__init__.py b/nipype/interfaces/freesurfer/__init__.py index 7f72ff3f6c..46e2dc9c0d 100644 --- a/nipype/interfaces/freesurfer/__init__.py +++ b/nipype/interfaces/freesurfer/__init__.py @@ -24,4 +24,4 @@ RelabelHypointensities, Aparc2Aseg, Apas2Aseg, MRIsExpand, MRIsCombine) from .longitudinal import (RobustTemplate, FuseSegmentations) from .registration import (MPRtoMNI305, RegisterAVItoTalairach, EMRegister, Register, - Paint) + Paint, MRICoreg) diff --git a/nipype/interfaces/freesurfer/registration.py b/nipype/interfaces/freesurfer/registration.py index d3cba1749c..106bd456ef 100644 --- a/nipype/interfaces/freesurfer/registration.py +++ b/nipype/interfaces/freesurfer/registration.py @@ -338,3 +338,145 @@ def _list_outputs(self): outputs = self.output_spec().get() outputs['out_file'] = os.path.abspath(self.inputs.out_file) return outputs + + +class MRICoregInputSpec(FSTraitedSpec): + source_file = File(argstr='--mov %s', desc='source file to be registered', + mandatory=True, copyfile=False) + reference_file = File(argstr='--ref %s', desc='reference (target) file', + mandatory=True, copyfile=False) + out_lta_file = traits.Either(True, File, argstr='--lta %s', default=True, + usedefault=True, + desc='output registration file (LTA format)') + out_reg_file = traits.Either(True, File, argstr='--regdat %s', + desc='output registration file (REG format)') + out_params_file = traits.Either(True, File, argstr='--params %s', + desc='output parameters file') + + subjects_dir = Directory(exists=True, argstr='--sd %s', + desc='FreeSurfer SUBJECTS_DIR') + subject_id = traits.Str( + argstr='--s %s', position=1, + desc='freesurfer subject ID (implies ``reference_mask == ' + 'aparc+aseg.mgz`` unless otherwise specified)') + dof = traits.Enum(6, 9, 12, argstr='--dof %d', + desc='number of transform degrees of freedom') + reference_mask = traits.Either( + False, traits.Str, argstr='--ref-mask %s', position=2, + desc='mask reference volume with given mask, or None if ``False``') + source_mask = traits.Str(argstr='--mov-mask', + desc='mask source file with given mask') + num_threads = traits.Int(argstr='--threads %d', + desc='number of OpenMP threads') + no_coord_dithering = traits.Bool(argstr='--no-coord-dither', + desc='turn off coordinate dithering') + no_intensity_dithering = traits.Bool(argstr='--no-intensity-dither', + desc='turn off intensity dithering') + # Skipping: --sep + initial_translation = traits.Tuple( + traits.Float, traits.Float, traits.Float, argstr='--trans %g %g %g', + desc='initial translation in mm (implies no_cras0)') + initial_rotation = traits.Tuple( + traits.Float, traits.Float, traits.Float, argstr='--rot %g %g %g', + desc='initial rotation in degrees') + initial_scale = traits.Tuple( + traits.Float, traits.Float, traits.Float, argstr='--scale %g %g %g', + desc='initial scale') + initial_shear = traits.Tuple( + traits.Float, traits.Float, traits.Float, argstr='--shear %g %g %g', + desc='initial shear (Hxy, Hxz, Hyz)') + no_cras0 = traits.Bool(argstr='--no-cras0', + desc='do not set translation parameters to align ' + 'centers of source and reference files') + max_iters = traits.Range(low=1, argstr='--nitersmax %d', + desc='maximum iterations (default: 4)') + ftol = traits.Float(argstr='--ftol %e', + desc='floating-point tolerance (default=1e-7)') + linmintol = traits.Float(argstr='--linmintol %e') + saturation_threshold = traits.Range( + low=0.0, high=100.0, argstr='--sat %g', + desc='saturation threshold (default=9.999)') + conform_reference = traits.Bool(argstr='--conf-ref', + desc='conform reference without rescaling') + no_brute_force = traits.Bool(argstr='--no-bf', + desc='do not brute force search') + brute_force_limit = traits.Float( + argstr='--bf-lim %g', xor=['no_brute_force'], + desc='constrain brute force search to +/- lim') + brute_force_samples = traits.Int( + argstr='--bf-nsamp %d', xor=['no_brute_force'], + desc='number of samples in brute force search') + no_smooth = traits.Bool( + argstr='--no-smooth', + desc='do not apply smoothing to either reference or source file') + ref_fwhm = traits.Float(argstr='--ref-fwhm', + desc='apply smoothing to reference file') + source_oob = traits.Bool( + argstr='--mov-oob', + desc='count source voxels that are out-of-bounds as 0') + # Skipping mat2par + + +class MRICoregOutputSpec(TraitedSpec): + out_reg_file = File(exists=True, desc='output registration file') + out_lta_file = File(exists=True, desc='output LTA-style registration file') + out_params_file = File(exists=True, desc='output parameters file') + + +class MRICoreg(FSCommand): + """ This program registers one volume to another + + mri_coreg is a C reimplementation of spm_coreg in FreeSurfer + + Examples + ======== + >>> from nipype.interfaces.freesurfer import MRICoreg + >>> coreg = MRICoreg() + >>> coreg.inputs.source_file = 'moving1.nii' + >>> coreg.inputs.reference_file = 'fixed1.nii' + >>> coreg.inputs.subjects_dir = '.' + >>> coreg.cmdline # doctest: +ALLOW_UNICODE +ELLIPSIS + 'mri_coreg --lta .../registration.lta --ref fixed1.nii --mov moving1.nii --sd .' + + If passing a subject ID, the reference mask may be disabled: + + >>> coreg.inputs.subject_id = 'fsaverage' + >>> coreg.inputs.reference_mask = False + >>> coreg.cmdline # doctest: +ALLOW_UNICODE +ELLIPSIS + 'mri_coreg --s fsaverage --no-ref-mask --lta .../registration.lta --ref fixed1.nii --mov moving1.nii --sd .' + """ + + _cmd = 'mri_coreg' + input_spec = MRICoregInputSpec + output_spec = MRICoregOutputSpec + + def _format_arg(self, opt, spec, val): + if opt in ('out_reg_file', 'out_lta_file', + 'out_params_file') and val is True: + val = self._list_outputs()[opt] + elif opt == 'reference_mask' and val is False: + return '--no-ref-mask' + return super(MRICoreg, self)._format_arg(opt, spec, val) + + def _list_outputs(self): + outputs = self.output_spec().get() + + out_lta_file = self.inputs.out_lta_file + if isdefined(out_lta_file): + if out_lta_file is True: + out_lta_file = 'registration.lta' + outputs['out_lta_file'] = os.path.abspath(out_lta_file) + + out_reg_file = self.inputs.out_reg_file + if isdefined(out_reg_file): + if out_reg_file is True: + out_reg_file = 'registration.dat' + outputs['out_reg_file'] = os.path.abspath(out_reg_file) + + out_params_file = self.inputs.out_params_file + if isdefined(out_params_file): + if out_params_file is True: + out_params_file = 'registration.par' + outputs['out_params_file'] = os.path.abspath(out_params_file) + + return outputs diff --git a/nipype/interfaces/freesurfer/tests/test_auto_MRICoreg.py b/nipype/interfaces/freesurfer/tests/test_auto_MRICoreg.py new file mode 100644 index 0000000000..691ee221c0 --- /dev/null +++ b/nipype/interfaces/freesurfer/tests/test_auto_MRICoreg.py @@ -0,0 +1,101 @@ +# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT +from __future__ import unicode_literals +from ..registration import MRICoreg + + +def test_MRICoreg_inputs(): + input_map = dict(args=dict(argstr='%s', + ), + brute_force_limit=dict(argstr='--bf-lim %g', + xor=['no_brute_force'], + ), + brute_force_samples=dict(argstr='--bf-nsamp %d', + xor=['no_brute_force'], + ), + conform_reference=dict(argstr='--conf-ref', + ), + dof=dict(argstr='--dof %d', + ), + environ=dict(nohash=True, + usedefault=True, + ), + ftol=dict(argstr='--ftol %e', + ), + ignore_exception=dict(nohash=True, + usedefault=True, + ), + initial_rotation=dict(argstr='--rot %g %g %g', + ), + initial_scale=dict(argstr='--scale %g %g %g', + ), + initial_shear=dict(argstr='--shear %g %g %g', + ), + initial_translation=dict(argstr='--trans %g %g %g', + ), + linmintol=dict(argstr='--linmintol %e', + ), + max_iters=dict(argstr='--nitersmax %d', + ), + no_brute_force=dict(argstr='--no-bf', + ), + no_coord_dithering=dict(argstr='--no-coord-dither', + ), + no_cras0=dict(argstr='--no-cras0', + ), + no_intensity_dithering=dict(argstr='--no-intensity-dither', + ), + no_smooth=dict(argstr='--no-smooth', + ), + num_threads=dict(argstr='--threads %d', + ), + out_lta_file=dict(argstr='--lta %s', + usedefault=True, + ), + out_params_file=dict(argstr='--params %s', + ), + out_reg_file=dict(argstr='--regdat %s', + ), + ref_fwhm=dict(argstr='--ref-fwhm', + ), + reference_file=dict(argstr='--ref %s', + copyfile=False, + mandatory=True, + ), + reference_mask=dict(argstr='--ref-mask %s', + position=2, + ), + saturation_threshold=dict(argstr='--sat %g', + ), + source_file=dict(argstr='--mov %s', + copyfile=False, + mandatory=True, + ), + source_mask=dict(argstr='--mov-mask', + ), + source_oob=dict(argstr='--mov-oob', + ), + subject_id=dict(argstr='--s %s', + position=1, + ), + subjects_dir=dict(argstr='--sd %s', + ), + terminal_output=dict(nohash=True, + ), + ) + inputs = MRICoreg.input_spec() + + for key, metadata in list(input_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(inputs.traits()[key], metakey) == value + + +def test_MRICoreg_outputs(): + output_map = dict(out_lta_file=dict(), + out_params_file=dict(), + out_reg_file=dict(), + ) + outputs = MRICoreg.output_spec() + + for key, metadata in list(output_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(outputs.traits()[key], metakey) == value From a3028a1ef25e02a692a9d57c389a5fe7a7c639a4 Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Wed, 30 Aug 2017 10:48:54 -0700 Subject: [PATCH 184/643] ENH: Add more registration options to mri_vol2vol --- nipype/interfaces/freesurfer/preprocess.py | 15 ++++++++++--- .../tests/test_auto_ApplyVolTransform.py | 22 ++++++++++++++----- 2 files changed, 29 insertions(+), 8 deletions(-) diff --git a/nipype/interfaces/freesurfer/preprocess.py b/nipype/interfaces/freesurfer/preprocess.py index 4e164c342d..32bd2c4da7 100644 --- a/nipype/interfaces/freesurfer/preprocess.py +++ b/nipype/interfaces/freesurfer/preprocess.py @@ -1277,7 +1277,15 @@ class ApplyVolTransformInputSpec(FSTraitedSpec): fs_target = traits.Bool(argstr='--fstarg', xor=_targ_xor, mandatory=True, requires=['reg_file'], desc='use orig.mgz from subject in regfile as target') - _reg_xor = ('reg_file', 'fsl_reg_file', 'xfm_reg_file', 'reg_header', 'subject') + _reg_xor = ('reg_file', 'lta_file', 'lta_inv_file', 'fsl_reg_file', 'xfm_reg_file', + 'reg_header', 'mni_152_reg', 'subject') + reg_file = File(exists=True, xor=_reg_xor, argstr='--reg %s', + mandatory=True, + desc='tkRAS-to-tkRAS matrix (tkregister2 format)') + lta_file = File(exists=True, xor=_reg_xor, argstr='--lta %s', + mandatory=True, desc='Linear Transform Array file') + lta_inv_file = File(exists=True, xor=_reg_xor, argstr='--lta-inv %s', + mandatory=True, desc='LTA, invert') reg_file = File(exists=True, xor=_reg_xor, argstr='--reg %s', mandatory=True, desc='tkRAS-to-tkRAS matrix (tkregister2 format)') @@ -1290,8 +1298,9 @@ class ApplyVolTransformInputSpec(FSTraitedSpec): reg_header = traits.Bool(xor=_reg_xor, argstr='--regheader', mandatory=True, desc='ScannerRAS-to-ScannerRAS matrix = identity') - subject = traits.Str(xor=_reg_xor, argstr='--s %s', - mandatory=True, + mni_152_reg = traits.Bool(xor=_reg_xor, argstr='--regheader', mandatory=True, + desc='target MNI152 space') + subject = traits.Str(xor=_reg_xor, argstr='--s %s', mandatory=True, desc='set matrix = identity and use subject for any templates') inverse = traits.Bool(desc='sample from target to source', argstr='--inv') diff --git a/nipype/interfaces/freesurfer/tests/test_auto_ApplyVolTransform.py b/nipype/interfaces/freesurfer/tests/test_auto_ApplyVolTransform.py index 6142ae84f1..e4f93a1ce2 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_ApplyVolTransform.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_ApplyVolTransform.py @@ -16,7 +16,7 @@ def test_ApplyVolTransform_inputs(): ), fsl_reg_file=dict(argstr='--fsl %s', mandatory=True, - xor=('reg_file', 'fsl_reg_file', 'xfm_reg_file', 'reg_header', 'subject'), + xor=('reg_file', 'lta_file', 'lta_inv_file', 'fsl_reg_file', 'xfm_reg_file', 'reg_header', 'mni_152_reg', 'subject'), ), ignore_exception=dict(nohash=True, usedefault=True, @@ -28,8 +28,20 @@ def test_ApplyVolTransform_inputs(): invert_morph=dict(argstr='--inv-morph', requires=['m3z_file'], ), + lta_file=dict(argstr='--lta %s', + mandatory=True, + xor=('reg_file', 'lta_file', 'lta_inv_file', 'fsl_reg_file', 'xfm_reg_file', 'reg_header', 'mni_152_reg', 'subject'), + ), + lta_inv_file=dict(argstr='--lta-inv %s', + mandatory=True, + xor=('reg_file', 'lta_file', 'lta_inv_file', 'fsl_reg_file', 'xfm_reg_file', 'reg_header', 'mni_152_reg', 'subject'), + ), m3z_file=dict(argstr='--m3z %s', ), + mni_152_reg=dict(argstr='--regheader', + mandatory=True, + xor=('reg_file', 'lta_file', 'lta_inv_file', 'fsl_reg_file', 'xfm_reg_file', 'reg_header', 'mni_152_reg', 'subject'), + ), no_ded_m3z_path=dict(argstr='--noDefM3zPath', requires=['m3z_file'], ), @@ -37,11 +49,11 @@ def test_ApplyVolTransform_inputs(): ), reg_file=dict(argstr='--reg %s', mandatory=True, - xor=('reg_file', 'fsl_reg_file', 'xfm_reg_file', 'reg_header', 'subject'), + xor=('reg_file', 'lta_file', 'lta_inv_file', 'fsl_reg_file', 'xfm_reg_file', 'reg_header', 'mni_152_reg', 'subject'), ), reg_header=dict(argstr='--regheader', mandatory=True, - xor=('reg_file', 'fsl_reg_file', 'xfm_reg_file', 'reg_header', 'subject'), + xor=('reg_file', 'lta_file', 'lta_inv_file', 'fsl_reg_file', 'xfm_reg_file', 'reg_header', 'mni_152_reg', 'subject'), ), source_file=dict(argstr='--mov %s', copyfile=False, @@ -49,7 +61,7 @@ def test_ApplyVolTransform_inputs(): ), subject=dict(argstr='--s %s', mandatory=True, - xor=('reg_file', 'fsl_reg_file', 'xfm_reg_file', 'reg_header', 'subject'), + xor=('reg_file', 'lta_file', 'lta_inv_file', 'fsl_reg_file', 'xfm_reg_file', 'reg_header', 'mni_152_reg', 'subject'), ), subjects_dir=dict(), tal=dict(argstr='--tal', @@ -69,7 +81,7 @@ def test_ApplyVolTransform_inputs(): ), xfm_reg_file=dict(argstr='--xfm %s', mandatory=True, - xor=('reg_file', 'fsl_reg_file', 'xfm_reg_file', 'reg_header', 'subject'), + xor=('reg_file', 'lta_file', 'lta_inv_file', 'fsl_reg_file', 'xfm_reg_file', 'reg_header', 'mni_152_reg', 'subject'), ), ) inputs = ApplyVolTransform.input_spec() From f2f18eda52b16180c6ce334cee0d9188bdf625b7 Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Fri, 1 Sep 2017 10:15:07 -0700 Subject: [PATCH 185/643] ENH: Add --sep option to mri_coreg --- nipype/interfaces/freesurfer/registration.py | 13 ++++++++++++- .../freesurfer/tests/test_auto_MRICoreg.py | 2 ++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/nipype/interfaces/freesurfer/registration.py b/nipype/interfaces/freesurfer/registration.py index 106bd456ef..1b76ab168e 100644 --- a/nipype/interfaces/freesurfer/registration.py +++ b/nipype/interfaces/freesurfer/registration.py @@ -372,7 +372,8 @@ class MRICoregInputSpec(FSTraitedSpec): desc='turn off coordinate dithering') no_intensity_dithering = traits.Bool(argstr='--no-intensity-dither', desc='turn off intensity dithering') - # Skipping: --sep + sep = traits.List(argstr='--sep %s...', minlen=1, maxlen=2, + desc='set spatial scales, in voxels (default [2, 4])') initial_translation = traits.Tuple( traits.Float, traits.Float, traits.Float, argstr='--trans %g %g %g', desc='initial translation in mm (implies no_cras0)') @@ -444,6 +445,16 @@ class MRICoreg(FSCommand): >>> coreg.inputs.reference_mask = False >>> coreg.cmdline # doctest: +ALLOW_UNICODE +ELLIPSIS 'mri_coreg --s fsaverage --no-ref-mask --lta .../registration.lta --ref fixed1.nii --mov moving1.nii --sd .' + + Spatial scales may be specified as a list of one or two separations: + + >>> coreg.inputs.sep = [4] + >>> coreg.cmdline # doctest: +ALLOW_UNICODE +ELLIPSIS + 'mri_coreg --s fsaverage --no-ref-mask --lta .../registration.lta --ref fixed1.nii --sep 4 --mov moving1.nii --sd .' + + >>> coreg.inputs.sep = [4, 5] + >>> coreg.cmdline # doctest: +ALLOW_UNICODE +ELLIPSIS + 'mri_coreg --s fsaverage --no-ref-mask --lta .../registration.lta --ref fixed1.nii --sep 4 --sep 5 --mov moving1.nii --sd .' """ _cmd = 'mri_coreg' diff --git a/nipype/interfaces/freesurfer/tests/test_auto_MRICoreg.py b/nipype/interfaces/freesurfer/tests/test_auto_MRICoreg.py index 691ee221c0..2c135305cb 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_MRICoreg.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_MRICoreg.py @@ -66,6 +66,8 @@ def test_MRICoreg_inputs(): ), saturation_threshold=dict(argstr='--sat %g', ), + sep=dict(argstr='--sep %s...', + ), source_file=dict(argstr='--mov %s', copyfile=False, mandatory=True, From 1a991b9072cd5c0e1845bbc158b1afa78bb68f03 Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Fri, 1 Sep 2017 14:52:15 -0700 Subject: [PATCH 186/643] ENH: Set subject_id xor reference_file --- nipype/interfaces/freesurfer/registration.py | 5 +++-- nipype/interfaces/freesurfer/tests/test_auto_MRICoreg.py | 4 ++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/nipype/interfaces/freesurfer/registration.py b/nipype/interfaces/freesurfer/registration.py index 1b76ab168e..db9c6570ca 100644 --- a/nipype/interfaces/freesurfer/registration.py +++ b/nipype/interfaces/freesurfer/registration.py @@ -344,7 +344,7 @@ class MRICoregInputSpec(FSTraitedSpec): source_file = File(argstr='--mov %s', desc='source file to be registered', mandatory=True, copyfile=False) reference_file = File(argstr='--ref %s', desc='reference (target) file', - mandatory=True, copyfile=False) + mandatory=True, copyfile=False, xor=['subject_id']) out_lta_file = traits.Either(True, File, argstr='--lta %s', default=True, usedefault=True, desc='output registration file (LTA format)') @@ -356,7 +356,8 @@ class MRICoregInputSpec(FSTraitedSpec): subjects_dir = Directory(exists=True, argstr='--sd %s', desc='FreeSurfer SUBJECTS_DIR') subject_id = traits.Str( - argstr='--s %s', position=1, + argstr='--s %s', position=1, mandatory=True, xor=['reference_file'], + requires=['subjects_dir'], desc='freesurfer subject ID (implies ``reference_mask == ' 'aparc+aseg.mgz`` unless otherwise specified)') dof = traits.Enum(6, 9, 12, argstr='--dof %d', diff --git a/nipype/interfaces/freesurfer/tests/test_auto_MRICoreg.py b/nipype/interfaces/freesurfer/tests/test_auto_MRICoreg.py index 2c135305cb..5ba95570c8 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_MRICoreg.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_MRICoreg.py @@ -60,6 +60,7 @@ def test_MRICoreg_inputs(): reference_file=dict(argstr='--ref %s', copyfile=False, mandatory=True, + xor=['subject_id'], ), reference_mask=dict(argstr='--ref-mask %s', position=2, @@ -77,7 +78,10 @@ def test_MRICoreg_inputs(): source_oob=dict(argstr='--mov-oob', ), subject_id=dict(argstr='--s %s', + mandatory=True, position=1, + requires=['subjects_dir'], + xor=['reference_file'], ), subjects_dir=dict(argstr='--sd %s', ), From a6f521879f18f870ce5224c1160ec3ecce18203e Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Tue, 5 Sep 2017 11:02:26 -0400 Subject: [PATCH 187/643] DOC/TEST: Fix MRICoreg doctests --- nipype/interfaces/freesurfer/registration.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/nipype/interfaces/freesurfer/registration.py b/nipype/interfaces/freesurfer/registration.py index db9c6570ca..72a3fdb0ee 100644 --- a/nipype/interfaces/freesurfer/registration.py +++ b/nipype/interfaces/freesurfer/registration.py @@ -442,20 +442,23 @@ class MRICoreg(FSCommand): If passing a subject ID, the reference mask may be disabled: + >>> coreg = MRICoreg() + >>> coreg.inputs.source_file = 'moving1.nii' + >>> coreg.inputs.subjects_dir = '.' >>> coreg.inputs.subject_id = 'fsaverage' >>> coreg.inputs.reference_mask = False >>> coreg.cmdline # doctest: +ALLOW_UNICODE +ELLIPSIS - 'mri_coreg --s fsaverage --no-ref-mask --lta .../registration.lta --ref fixed1.nii --mov moving1.nii --sd .' + 'mri_coreg --s fsaverage --no-ref-mask --lta .../registration.lta --mov moving1.nii --sd .' Spatial scales may be specified as a list of one or two separations: >>> coreg.inputs.sep = [4] >>> coreg.cmdline # doctest: +ALLOW_UNICODE +ELLIPSIS - 'mri_coreg --s fsaverage --no-ref-mask --lta .../registration.lta --ref fixed1.nii --sep 4 --mov moving1.nii --sd .' + 'mri_coreg --s fsaverage --no-ref-mask --lta .../registration.lta --sep 4 --mov moving1.nii --sd .' >>> coreg.inputs.sep = [4, 5] >>> coreg.cmdline # doctest: +ALLOW_UNICODE +ELLIPSIS - 'mri_coreg --s fsaverage --no-ref-mask --lta .../registration.lta --ref fixed1.nii --sep 4 --sep 5 --mov moving1.nii --sd .' + 'mri_coreg --s fsaverage --no-ref-mask --lta .../registration.lta --sep 4 --sep 5 --mov moving1.nii --sd .' """ _cmd = 'mri_coreg' From 054e9bb1a4115774b33a00c146927996e2b7ebbe Mon Sep 17 00:00:00 2001 From: Gilles de Hollander Date: Fri, 8 Sep 2017 13:59:29 +0000 Subject: [PATCH 188/643] Added ComposeMultiTransform to ants.utils --- nipype/interfaces/ants/__init__.py | 3 +- .../tests/test_auto_ComposeMultiTransform.py | 52 +++++++++++++++++++ nipype/interfaces/ants/utils.py | 43 +++++++++++++++ 3 files changed, 97 insertions(+), 1 deletion(-) create mode 100644 nipype/interfaces/ants/tests/test_auto_ComposeMultiTransform.py diff --git a/nipype/interfaces/ants/__init__.py b/nipype/interfaces/ants/__init__.py index 01591c8817..e8096cc8e0 100644 --- a/nipype/interfaces/ants/__init__.py +++ b/nipype/interfaces/ants/__init__.py @@ -20,4 +20,5 @@ # Utility Programs from .utils import (AverageAffineTransform, AverageImages, MultiplyImages, - CreateJacobianDeterminantImage, AffineInitializer) + CreateJacobianDeterminantImage, AffineInitializer, + ComposeMultiTransform) diff --git a/nipype/interfaces/ants/tests/test_auto_ComposeMultiTransform.py b/nipype/interfaces/ants/tests/test_auto_ComposeMultiTransform.py new file mode 100644 index 0000000000..b82a4f5d9a --- /dev/null +++ b/nipype/interfaces/ants/tests/test_auto_ComposeMultiTransform.py @@ -0,0 +1,52 @@ +# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT +from __future__ import unicode_literals +from ..utils import ComposeMultiTransform + + +def test_ComposeMultiTransform_inputs(): + input_map = dict(args=dict(argstr='%s', + ), + dimension=dict(argstr='%d', + mandatory=True, + position=0, + usedefault=True, + ), + environ=dict(nohash=True, + usedefault=True, + ), + ignore_exception=dict(nohash=True, + usedefault=True, + ), + num_threads=dict(nohash=True, + usedefault=True, + ), + output_transform=dict(argstr='%s', + mandatory=True, + position=1, + ), + reference_image=dict(argstr='%s', + mandatory=False, + position=2, + ), + terminal_output=dict(nohash=True, + ), + transforms=dict(argstr='%s', + mandatory=True, + position=3, + ), + ) + inputs = ComposeMultiTransform.input_spec() + + for key, metadata in list(input_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(inputs.traits()[key], metakey) == value + + +def test_ComposeMultiTransform_outputs(): + output_map = dict(output_transform=dict(), + ) + outputs = ComposeMultiTransform.output_spec() + + for key, metadata in list(output_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(outputs.traits()[key], metakey) == value diff --git a/nipype/interfaces/ants/utils.py b/nipype/interfaces/ants/utils.py index d356f727dd..9c4484c248 100644 --- a/nipype/interfaces/ants/utils.py +++ b/nipype/interfaces/ants/utils.py @@ -225,3 +225,46 @@ class AffineInitializer(ANTSCommand): def _list_outputs(self): return {'out_file': os.path.abspath(self.inputs.out_file)} + + +class ComposeMultiTransformInputSpec(ANTSCommandInputSpec): + dimension = traits.Enum(3, 2, argstr='%d', usedefault=True, mandatory=True, + position=0, desc='image dimension (2 or 3)') + output_transform = File(argstr='%s', mandatory=True, position=1, + desc='Outputfname.txt: the name of the resulting transform.') + reference_image = File(argstr='%s', mandatory=False, position=2, + desc='Reference image (only necessary when output is warpfield)') + transforms = InputMultiPath(File(exists=True), argstr='%s', mandatory=True, + position=3, desc='transforms to average') + + +class ComposeMultiTransformOutputSpec(TraitedSpec): + output_transform = File(exists=True, desc='Composed transform file') + + +class ComposeMultiTransform(ANTSCommand): + """ + Examples + -------- + >>> from nipype.interfaces.ants import ComposeMultiTransform + >>> compose = ComposeMultiTransform() + >>> compose_transform.inputs.dimension = 3 + >>> compose_transform.inputs.transforms = ['struct_to_template.mat', 'func_to_struct.mat'] + >>> compose_transform.inputs.output_transform = 'func_to_template.mat' + >>> compose_transform.cmdline # doctest: +ALLOW_UNICODE + 'TODO TODO TODO' + """ + _cmd = 'ComposeMultiTransform' + input_spec = ComposeMultiTransformInputSpec + output_spec = ComposeMultiTransformOutputSpec + + def _format_arg(self, opt, spec, val): + return super(ComposeMultiTransform, self)._format_arg(opt, spec, val) + + def _list_outputs(self): + outputs = self._outputs().get() + outputs['output_transform'] = os.path.abspath( + self.inputs.output_transform) + return outputs + + From 757cf51e6ad0b56c42893aecce41c1f8aea1794f Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Fri, 8 Sep 2017 09:55:07 -0400 Subject: [PATCH 189/643] ENH: Add --initcost option to BBRegister --- nipype/interfaces/freesurfer/preprocess.py | 25 +++++++++++-------- .../freesurfer/tests/test_BBRegister.py | 5 +++- 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/nipype/interfaces/freesurfer/preprocess.py b/nipype/interfaces/freesurfer/preprocess.py index 32bd2c4da7..13bd2d86bf 100644 --- a/nipype/interfaces/freesurfer/preprocess.py +++ b/nipype/interfaces/freesurfer/preprocess.py @@ -1159,6 +1159,8 @@ class BBRegisterInputSpec(FSTraitedSpec): desc="write the transformation matrix in LTA format") registered_file = traits.Either(traits.Bool, File, argstr='--o %s', desc='output warped sourcefile either True or filename') + init_cost_file = traits.Either(traits.Bool, File, argstr='--initcost %s', + desc='output initial registration cost file') class BBRegisterInputSpec6(BBRegisterInputSpec): @@ -1172,10 +1174,11 @@ class BBRegisterInputSpec6(BBRegisterInputSpec): class BBRegisterOutputSpec(TraitedSpec): out_reg_file = File(exists=True, desc='Output registration file') - out_fsl_file = File(desc='Output FLIRT-style registration file') - out_lta_file = File(desc='Output LTA-style registration file') + out_fsl_file = File(exists=True, desc='Output FLIRT-style registration file') + out_lta_file = File(exists=True, desc='Output LTA-style registration file') min_cost_file = File(exists=True, desc='Output registration minimum cost file') - registered_file = File(desc='Registered and resampled source file') + init_cost_file = File(exists=True, desc='Output initial registration cost file') + registered_file = File(exists=True, desc='Registered and resampled source file') class BBRegister(FSCommand): @@ -1242,17 +1245,19 @@ def _list_outputs(self): else: outputs['out_fsl_file'] = op.abspath(_in.out_fsl_file) + if isdefined(_in.init_cost_file): + if isinstance(_in.out_fsl_file, bool): + outputs['init_cost_file'] = outputs['out_reg_file'] + '.initcost' + else: + outputs['init_cost_file'] = op.abspath(_in.init_cost_file) + outputs['min_cost_file'] = outputs['out_reg_file'] + '.mincost' return outputs def _format_arg(self, name, spec, value): - - if name in ['registered_file', 'out_fsl_file', 'out_lta_file']: - if isinstance(value, bool): - fname = self._list_outputs()[name] - else: - fname = value - return spec.argstr % fname + if name in ('registered_file', 'out_fsl_file', 'out_lta_file', + 'init_cost_file') and isinstance(value, bool): + value = self._list_outputs()[name] return super(BBRegister, self)._format_arg(name, spec, value) def _gen_filename(self, name): diff --git a/nipype/interfaces/freesurfer/tests/test_BBRegister.py b/nipype/interfaces/freesurfer/tests/test_BBRegister.py index e29ea17b63..9725065fef 100644 --- a/nipype/interfaces/freesurfer/tests/test_BBRegister.py +++ b/nipype/interfaces/freesurfer/tests/test_BBRegister.py @@ -12,6 +12,7 @@ def test_BBRegister_inputs(): fsldof=dict(argstr='--fsl-dof %d',), ignore_exception=dict(nohash=True, usedefault=True,), init=dict(argstr='--init-%s', mandatory=True, xor=['init_reg_file'],), + init_cost_file=dict(argstr='--initcost %s',), init_reg_file=dict(argstr='--init-reg %s', mandatory=True, xor=['init'],), intermediate_file=dict(argstr='--int %s',), out_fsl_file=dict(argstr='--fslmat %s',), @@ -36,6 +37,7 @@ def test_BBRegister_inputs(): ignore_exception=dict(nohash=True, usedefault=True,), init=dict(argstr='--init-%s', xor=['init_reg_file'],), init_reg_file=dict(argstr='--init-reg %s', xor=['init'],), + init_cost_file=dict(argstr='--initcost %s',), intermediate_file=dict(argstr='--int %s',), out_fsl_file=dict(argstr='--fslmat %s',), out_lta_file=dict(argstr='--lta %s', min_ver='5.2.0',), @@ -62,7 +64,8 @@ def test_BBRegister_inputs(): def test_BBRegister_outputs(): - output_map = dict(min_cost_file=dict(), + output_map = dict(init_cost_file=dict(), + min_cost_file=dict(), out_fsl_file=dict(), out_lta_file=dict(), out_reg_file=dict(), From 72bd8e267e838cc91693c6eb39eb9ab01208c54f Mon Sep 17 00:00:00 2001 From: adelavega Date: Fri, 8 Sep 2017 11:56:26 -0700 Subject: [PATCH 190/643] Added mandatory option for outfieds --- nipype/interfaces/bids.py | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/nipype/interfaces/bids.py b/nipype/interfaces/bids.py index 5e772569b2..db2e7c6f44 100644 --- a/nipype/interfaces/bids.py +++ b/nipype/interfaces/bids.py @@ -29,6 +29,7 @@ else: have_pybids = True +from warnings import warn class BIDSDataGrabberInputSpec(DynamicTraitedSpec): base_dir = traits.Directory(exists=True, @@ -37,6 +38,9 @@ class BIDSDataGrabberInputSpec(DynamicTraitedSpec): output_query = traits.Dict(key_trait=Str, value_trait=traits.Dict, desc='Queries for outfield outputs') + raise_on_empty = traits.Bool(True, usedefault=True, + desc='Generate exception if list is empty ' + 'for a given field') return_type = traits.Enum('filename', 'namedtuple', usedefault=True) @@ -58,7 +62,7 @@ class BIDSDataGrabber(BaseInterface): >>> bg.inputs.base_dir = 'ds005/' >>> results = bg.run() >>> len(results.outputs.outfield) # doctest: +ALLOW_UNICODE - 116 + 135 Using dynamically created, user-defined input fields, filter files based on BIDS entities. @@ -99,8 +103,8 @@ def __init__(self, infields=None, outfields=None, **kwargs): Indicates the input fields to be dynamically created outfields: list of str - Indicates output fields to be dynamically created - + Indicates output fields to be dynamically created. + If no matching items, returns Undefined. """ if not outfields: outfields = [] @@ -150,7 +154,18 @@ def _list_outputs(self): outputs = {} for key, query in self.inputs.output_query.items(): - outputs[key] = layout.get( - **dict(query.items() | filters.items()), - return_type='file') + args = query.copy() + args.update(filters) + filelist = layout.get(return_type='file', + **args) + if len(filelist) == 0: + msg = 'Output key: %s returned no files' % ( + key) + if self.inputs.raise_on_empty: + raise IOError(msg) + else: + warn(msg) + filelist = Undefined + else: + outputs[key] = filelist return outputs From 973f76e47906389ce42164a11edeb0506e808c34 Mon Sep 17 00:00:00 2001 From: salma1601 Date: Sun, 10 Sep 2017 20:36:41 +0200 Subject: [PATCH 191/643] fix typo in trait name --- nipype/interfaces/afni/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nipype/interfaces/afni/utils.py b/nipype/interfaces/afni/utils.py index e20fe1d5ff..88a317b8ce 100644 --- a/nipype/interfaces/afni/utils.py +++ b/nipype/interfaces/afni/utils.py @@ -602,12 +602,12 @@ class CatMatvecInputSpec(AFNICommandInputSpec): "This feature could be used, with clever scripting, to input" "a matrix directly on the command line to program 3dWarp.", argstr="-MATRIX", - xor=['oneline','fourXfour']) + xor=['oneline', 'fourxfour']) oneline = traits.Bool( descr="indicates that the resulting matrix" "will simply be written as 12 numbers on one line.", argstr="-ONELINE", - xor=['matrix','fourXfour']) + xor=['matrix', 'fourxfour']) fourxfour = traits.Bool( descr="Output matrix in augmented form (last row is 0 0 0 1)" "This option does not work with -MATRIX or -ONELINE", From 02d83e3cf02c49c2e982c5362089db7c46c64d02 Mon Sep 17 00:00:00 2001 From: salma1601 Date: Mon, 11 Sep 2017 09:20:32 +0200 Subject: [PATCH 192/643] update catMatvec autotests --- nipype/interfaces/afni/tests/test_auto_CatMatvec.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nipype/interfaces/afni/tests/test_auto_CatMatvec.py b/nipype/interfaces/afni/tests/test_auto_CatMatvec.py index 4b79cd91d8..d3d94569be 100644 --- a/nipype/interfaces/afni/tests/test_auto_CatMatvec.py +++ b/nipype/interfaces/afni/tests/test_auto_CatMatvec.py @@ -23,11 +23,11 @@ def test_CatMatvec_inputs(): ), matrix=dict(argstr='-MATRIX', descr="indicates that the resulting matrix willbe written to outfile in the 'MATRIX(...)' format (FORM 3).This feature could be used, with clever scripting, to inputa matrix directly on the command line to program 3dWarp.", - xor=['oneline', 'fourXfour'], + xor=['oneline', 'fourxfour'], ), oneline=dict(argstr='-ONELINE', descr='indicates that the resulting matrixwill simply be written as 12 numbers on one line.', - xor=['matrix', 'fourXfour'], + xor=['matrix', 'fourxfour'], ), out_file=dict(argstr=' > %s', descr='File to write concattenated matvecs to', From add51280bd804edfb8b8730e26cabc7e82ebaf00 Mon Sep 17 00:00:00 2001 From: salma1601 Date: Mon, 11 Sep 2017 11:18:18 +0200 Subject: [PATCH 193/643] add inputs to AFNI refit --- nipype/interfaces/afni/utils.py | 51 +++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/nipype/interfaces/afni/utils.py b/nipype/interfaces/afni/utils.py index e20fe1d5ff..e4c6f121b3 100644 --- a/nipype/interfaces/afni/utils.py +++ b/nipype/interfaces/afni/utils.py @@ -1595,6 +1595,11 @@ class RefitInputSpec(CommandLineInputSpec): zorigin = Str( desc='z distance for edge voxel offset', argstr='-zorigin %s') + duporigin_file = File( + argstr='-duporigin %s', + exists=True, + desc='Copies the xorigin, yorigin, and zorigin values from the header ' + 'of the given dataset') xdel = traits.Float( desc='new x voxel dimension in mm', argstr='-xdel %f') @@ -1609,6 +1614,46 @@ class RefitInputSpec(CommandLineInputSpec): argstr='-space %s', desc='Associates the dataset with a specific template type, e.g. ' 'TLRC, MNI, ORIG') + atrcopy = traits.Tuple( + traits.File(exists=True), traits.Str(), + argstr='-atrcopy %s %s', + desc='Copy AFNI header attribute from the given file into the header ' + 'of the dataset(s) being modified. For more information on AFNI ' + 'header attributes, see documentation file README.attributes. ' + 'More than one \'-atrcopy\' option can be used. For AFNI ' + 'advanced users only. Do NOT use -atrcopy or -atrstring with ' + 'other modification options. See also -copyaux.') + atrstring = traits.Tuple( + traits.Str(), traits.Str(), + argstr='-atrstring %s %s', + desc='Copy the last given string into the dataset(s) being modified, ' + 'giving it the attribute name given by the last string.' + 'To be safe, the last string should be in quotes.') + atrfloat = traits.Tuple( + traits.Str(), traits.Str(), + argstr='-atrfloat %s %s', + desc='Create or modify floating point attributes. ' + 'The input values may be specified as a single string in quotes ' + 'or as a 1D filename or string, example ' + '\'1 0.2 0 0 -0.2 1 0 0 0 0 1 0\' or ' + 'flipZ.1D or \'1D:1,0.2,2@0,-0.2,1,2@0,2@0,1,0\'') + atrint = traits.Tuple( + traits.Str(), traits.Str(), + argstr='-atrint %s %s', + desc='Create or modify integer attributes. ' + 'The input values may be specified as a single string in quotes ' + 'or as a 1D filename or string, example ' + '\'1 0 0 0 0 1 0 0 0 0 1 0\' or ' + 'flipZ.1D or \'1D:1,0,2@0,-0,1,2@0,2@0,1,0\'') + saveatr = traits.Bool( + argstr='-saveatr', + desc='(default) Copy the attributes that are known to AFNI into ' + 'the dset->dblk structure thereby forcing changes to known ' + 'attributes to be present in the output. This option only makes ' + 'sense with -atrcopy.') + nosaveatr = traits.Bool( + argstr='-nosaveatr', + desc='Opposite of -saveatr') class Refit(AFNICommandBase): @@ -1628,6 +1673,12 @@ class Refit(AFNICommandBase): '3drefit -deoblique structural.nii' >>> res = refit.run() # doctest: +SKIP + >>> refit_2 = afni.Refit() + >>> refit_2.inputs.in_file = 'structural.nii' + >>> refit_2.inputs.atrfloat = ("IJK_TO_DICOM_REAL", "'1 0.2 0 0 -0.2 1 0 0 0 0 1 0'") + >>> refit_2.cmdline # doctest: +ALLOW_UNICODE + "3drefit -atrfloat IJK_TO_DICOM_REAL '1 0.2 0 0 -0.2 1 0 0 0 0 1 0' structural.nii" + >>> res = refit_2.run() # doctest: +SKIP """ _cmd = '3drefit' input_spec = RefitInputSpec From a7d15651fcf6ff75c1330a8d568f0d77d521ef8f Mon Sep 17 00:00:00 2001 From: salma1601 Date: Mon, 11 Sep 2017 11:18:51 +0200 Subject: [PATCH 194/643] update refit auto-test --- nipype/interfaces/afni/tests/test_auto_Refit.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/nipype/interfaces/afni/tests/test_auto_Refit.py b/nipype/interfaces/afni/tests/test_auto_Refit.py index a1416e8d96..b6c167198c 100644 --- a/nipype/interfaces/afni/tests/test_auto_Refit.py +++ b/nipype/interfaces/afni/tests/test_auto_Refit.py @@ -6,8 +6,18 @@ def test_Refit_inputs(): input_map = dict(args=dict(argstr='%s', ), + atrcopy=dict(argstr='-atrcopy %s %s', + ), + atrfloat=dict(argstr='-atrfloat %s %s', + ), + atrint=dict(argstr='-atrint %s %s', + ), + atrstring=dict(argstr='-atrstring %s %s', + ), deoblique=dict(argstr='-deoblique', ), + duporigin_file=dict(argstr='-duporigin %s', + ), environ=dict(nohash=True, usedefault=True, ), @@ -19,6 +29,10 @@ def test_Refit_inputs(): mandatory=True, position=-1, ), + nosaveatr=dict(argstr='-nosaveatr', + ), + saveatr=dict(argstr='-saveatr', + ), space=dict(argstr='-space %s', ), terminal_output=dict(nohash=True, From 6e7e5ca3efd5d6c1fee367d9bad9f7395b2eaad5 Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Mon, 11 Sep 2017 14:26:59 -0400 Subject: [PATCH 195/643] PIN: Set minimum numpy version to 1.9.0 --- doc/devel/gitwash/known_projects.inc | 2 +- nipype/info.py | 2 +- requirements.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/devel/gitwash/known_projects.inc b/doc/devel/gitwash/known_projects.inc index 2972352877..ce939b110e 100644 --- a/doc/devel/gitwash/known_projects.inc +++ b/doc/devel/gitwash/known_projects.inc @@ -6,7 +6,7 @@ .. _`PROJECTNAME mailing list`: http://projects.scipy.org/mailman/listinfo/nipy-devel .. numpy -.. _numpy: hhttp://numpy.scipy.org +.. _numpy: http://numpy.scipy.org .. _`numpy github`: http://github.com/numpy/numpy .. _`numpy mailing list`: http://mail.scipy.org/mailman/listinfo/numpy-discussion diff --git a/nipype/info.py b/nipype/info.py index 9db9a02abd..4b416c6db3 100644 --- a/nipype/info.py +++ b/nipype/info.py @@ -98,7 +98,7 @@ def get_nipype_gitversion(): # versions NIBABEL_MIN_VERSION = '2.1.0' NETWORKX_MIN_VERSION = '1.9' -NUMPY_MIN_VERSION = '1.8.2' +NUMPY_MIN_VERSION = '1.9.0' SCIPY_MIN_VERSION = '0.14' TRAITS_MIN_VERSION = '4.6' DATEUTIL_MIN_VERSION = '2.2' diff --git a/requirements.txt b/requirements.txt index bcd3ab2fef..a697b62244 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -numpy>=1.6.2 +numpy>=1.9.0 scipy>=0.11 networkx>=1.7 traits>=4.6 From 98f422eefe8e53a0ea37e97803f5b814439e10d6 Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Thu, 27 Jul 2017 14:13:46 -0400 Subject: [PATCH 196/643] TEST: Do not modify SUBJECTS_DIR contents --- nipype/interfaces/freesurfer/tests/test_utils.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/nipype/interfaces/freesurfer/tests/test_utils.py b/nipype/interfaces/freesurfer/tests/test_utils.py index 8e756ab401..c033a1e346 100644 --- a/nipype/interfaces/freesurfer/tests/test_utils.py +++ b/nipype/interfaces/freesurfer/tests/test_utils.py @@ -188,18 +188,16 @@ def test_mrisexpand(tmpdir): assert expand_if.cmdline == orig_cmdline assert expand_nd.interface.cmdline == orig_cmdline - # Run both interfaces - if_res = expand_if.run() + # Run Node interface nd_res = expand_nd.run() # Commandlines differ node_cmdline = 'mris_expand -T 60 -pial {cwd}/lh.pial {cwd}/lh.smoothwm ' \ '1 expandtmp'.format(cwd=nd_res.runtime.cwd) - assert if_res.runtime.cmdline == orig_cmdline assert nd_res.runtime.cmdline == node_cmdline # Check output - if_out_file = if_res.outputs.get()['out_file'] + if_out_file = expand_if._list_outputs()['out_file'] nd_out_file = nd_res.outputs.get()['out_file'] # Same filename assert op.basename(if_out_file) == op.basename(nd_out_file) @@ -207,6 +205,3 @@ def test_mrisexpand(tmpdir): assert op.dirname(if_out_file) == op.dirname(fsavginfo['smoothwm']) # Node places output in working directory assert op.dirname(nd_out_file) == nd_res.runtime.cwd - - # Remove test surface - os.unlink(if_out_file) From dc64c7284cb972dd288883515cd11999cb22e4fe Mon Sep 17 00:00:00 2001 From: adelavega Date: Wed, 13 Sep 2017 19:24:58 -0500 Subject: [PATCH 197/643] Install pybids from github in travis --- .travis.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4cd6d7bb7f..73d42a15f9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,9 +8,9 @@ python: - 3.5 - 3.6 env: -- INSTALL_DEB_DEPENDECIES=true NIPYPE_EXTRAS="doc,tests,fmri,profiler,pybids" -- INSTALL_DEB_DEPENDECIES=false NIPYPE_EXTRAS="doc,tests,fmri,profiler,pybids" -- INSTALL_DEB_DEPENDECIES=true NIPYPE_EXTRAS="doc,tests,fmri,profiler,duecredit,pybids" +- INSTALL_DEB_DEPENDECIES=true NIPYPE_EXTRAS="doc,tests,fmri,profiler" +- INSTALL_DEB_DEPENDECIES=false NIPYPE_EXTRAS="doc,tests,fmri,profiler" +- INSTALL_DEB_DEPENDECIES=true NIPYPE_EXTRAS="doc,tests,fmri,profiler,duecredit" before_install: - function apt_inst { if $INSTALL_DEB_DEPENDECIES; then sudo rm -rf /dev/shm; fi && @@ -36,7 +36,12 @@ before_install: conda install python=${TRAVIS_PYTHON_VERSION} && conda config --add channels conda-forge && conda install -y nipype icu && - rm -r ${CONDA_HOME}/lib/python${TRAVIS_PYTHON_VERSION}/site-packages/nipype*; } + rm -r ${CONDA_HOME}/lib/python${TRAVIS_PYTHON_VERSION}/site-packages/nipype*; + pushd $HOME; + git clone https://github.com/INCF/pybids.git; + cd pybids; + pip install -e .; + popd; } # Add install of vtk and mayavi to test mesh (disabled): conda install -y vtk mayavi - travis_retry apt_inst - travis_retry conda_inst From 406c72914e67e147ea484b6684d9be5fce463eb9 Mon Sep 17 00:00:00 2001 From: adelavega Date: Wed, 13 Sep 2017 19:26:05 -0500 Subject: [PATCH 198/643] Fix docstring, and Directory import --- nipype/interfaces/bids.py | 109 +++++++++++++++++++------------------- 1 file changed, 55 insertions(+), 54 deletions(-) diff --git a/nipype/interfaces/bids.py b/nipype/interfaces/bids.py index db2e7c6f44..cf2e63d545 100644 --- a/nipype/interfaces/bids.py +++ b/nipype/interfaces/bids.py @@ -2,21 +2,22 @@ # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """ Set of interfaces that allow interaction with BIDS data. Currently - available interfaces are: +available interfaces are: - BIDSDataGrabber: Query data from BIDS dataset using pybids grabbids. +BIDSDataGrabber: Query data from BIDS dataset using pybids grabbids. - Change directory to provide relative paths for doctests - >>> import os - >>> import bids - >>> filepath = os.path.realpath(os.path.dirname(bids.__file__)) - >>> datadir = os.path.realpath(os.path.join(filepath, 'grabbids/tests/data/')) - >>> os.chdir(datadir) +Change directory to provide relative paths for doctests +>>> import os +>>> import bids +>>> filepath = os.path.realpath(os.path.dirname(bids.__file__)) +>>> datadir = os.path.realpath(os.path.join(filepath, 'grabbids/tests/data/')) +>>> os.chdir(datadir) """ from .base import (traits, DynamicTraitedSpec, + Directory, BaseInterface, isdefined, Str, @@ -32,9 +33,9 @@ from warnings import warn class BIDSDataGrabberInputSpec(DynamicTraitedSpec): - base_dir = traits.Directory(exists=True, - desc='Path to BIDS Directory.', - mandatory=True) + base_dir = Directory(exists=True, + desc='Path to BIDS Directory.', + mandatory=True) output_query = traits.Dict(key_trait=Str, value_trait=traits.Dict, desc='Queries for outfield outputs') @@ -47,49 +48,49 @@ class BIDSDataGrabberInputSpec(DynamicTraitedSpec): class BIDSDataGrabber(BaseInterface): """ BIDS datagrabber module that wraps around pybids to allow arbitrary - querying of BIDS datasets. - - Examples - -------- - - >>> from nipype.interfaces.bids import BIDSDataGrabber - >>> from os.path import basename - >>> import pprint - - Select all files from a BIDS project - - >>> bg = BIDSDataGrabber() - >>> bg.inputs.base_dir = 'ds005/' - >>> results = bg.run() - >>> len(results.outputs.outfield) # doctest: +ALLOW_UNICODE - 135 - - Using dynamically created, user-defined input fields, - filter files based on BIDS entities. - - >>> bg = BIDSDataGrabber(infields = ['subject', 'run']) - >>> bg.inputs.base_dir = 'ds005/' - >>> bg.inputs.subject = '01' - >>> bg.inputs.run = '01' - >>> results = bg.run() - >>> basename(results.outputs.outfield[0]) # doctest: +ALLOW_UNICODE - 'sub-01_task-mixedgamblestask_run-01_bold.nii.gz' - - Using user-defined output fields, return different types of outputs, - filtered on common entities - filter files based on BIDS entities. - - >>> bg = BIDSDataGrabber(infields = ['subject'], outfields = ['func', 'anat']) - >>> bg.inputs.base_dir = 'ds005/' - >>> bg.inputs.subject = '01' - >>> bg.inputs.output_query['func'] = dict(modality='func') - >>> bg.inputs.output_query['anat'] = dict(modality='anat') - >>> results = bg.run() - >>> basename(results.outputs.func[0]) # doctest: +ALLOW_UNICODE - 'sub-01_task-mixedgamblestask_run-01_bold.nii.gz' - - >>> basename(results.outputs.anat[0]) # doctest: +ALLOW_UNICODE - 'sub-01_T1w.nii.gz' + querying of BIDS datasets. + + Examples + -------- + + >>> from nipype.interfaces.bids import BIDSDataGrabber + >>> from os.path import basename + >>> import pprint + + Select all files from a BIDS project + + >>> bg = BIDSDataGrabber() + >>> bg.inputs.base_dir = 'ds005/' + >>> results = bg.run() + >>> len(results.outputs.outfield) # doctest: +ALLOW_UNICODE + 135 + + Using dynamically created, user-defined input fields, + filter files based on BIDS entities. + + >>> bg = BIDSDataGrabber(infields = ['subject', 'run']) + >>> bg.inputs.base_dir = 'ds005/' + >>> bg.inputs.subject = '01' + >>> bg.inputs.run = '01' + >>> results = bg.run() + >>> basename(results.outputs.outfield[0]) # doctest: +ALLOW_UNICODE + 'sub-01_task-mixedgamblestask_run-01_bold.nii.gz' + + Using user-defined output fields, return different types of outputs, + filtered on common entities + filter files based on BIDS entities. + + >>> bg = BIDSDataGrabber(infields = ['subject'], outfields = ['func', 'anat']) + >>> bg.inputs.base_dir = 'ds005/' + >>> bg.inputs.subject = '01' + >>> bg.inputs.output_query['func'] = dict(modality='func') + >>> bg.inputs.output_query['anat'] = dict(modality='anat') + >>> results = bg.run() + >>> basename(results.outputs.func[0]) # doctest: +ALLOW_UNICODE + 'sub-01_task-mixedgamblestask_run-01_bold.nii.gz' + + >>> basename(results.outputs.anat[0]) # doctest: +ALLOW_UNICODE + 'sub-01_T1w.nii.gz' """ input_spec = BIDSDataGrabberInputSpec output_spec = DynamicTraitedSpec From 0915a9d0ec055ebb0115f631baa78d8d15563918 Mon Sep 17 00:00:00 2001 From: adelavega Date: Wed, 13 Sep 2017 19:27:19 -0500 Subject: [PATCH 199/643] Use logger --- nipype/interfaces/bids.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nipype/interfaces/bids.py b/nipype/interfaces/bids.py index cf2e63d545..190608fb2a 100644 --- a/nipype/interfaces/bids.py +++ b/nipype/interfaces/bids.py @@ -14,7 +14,7 @@ >>> os.chdir(datadir) """ - +from .. import logging from .base import (traits, DynamicTraitedSpec, Directory, @@ -30,7 +30,7 @@ else: have_pybids = True -from warnings import warn +LOGGER = logging.getLogger('workflows') class BIDSDataGrabberInputSpec(DynamicTraitedSpec): base_dir = Directory(exists=True, @@ -165,7 +165,7 @@ def _list_outputs(self): if self.inputs.raise_on_empty: raise IOError(msg) else: - warn(msg) + LOGGER.warning(msg) filelist = Undefined else: outputs[key] = filelist From 651bc85c831e32bbc5e4f1ccfb2c08275f208cae Mon Sep 17 00:00:00 2001 From: adelavega Date: Wed, 13 Sep 2017 20:37:12 -0500 Subject: [PATCH 200/643] Smart defaults --- nipype/interfaces/bids.py | 102 +++++++++++++++++++------------------- 1 file changed, 50 insertions(+), 52 deletions(-) diff --git a/nipype/interfaces/bids.py b/nipype/interfaces/bids.py index 190608fb2a..1bb15bc6bf 100644 --- a/nipype/interfaces/bids.py +++ b/nipype/interfaces/bids.py @@ -14,6 +14,7 @@ >>> os.chdir(datadir) """ +from os.path import join, dirname from .. import logging from .base import (traits, DynamicTraitedSpec, @@ -24,7 +25,8 @@ Undefined) try: - from bids.grabbids import BIDSLayout + from bids import grabbids as gb + import json except ImportError: have_pybids = False else: @@ -57,40 +59,34 @@ class BIDSDataGrabber(BaseInterface): >>> from os.path import basename >>> import pprint - Select all files from a BIDS project + By default, the BIDSDataGrabber fetches anatomical and functional images + from a project, and makes BIDS entities (e.g. subject) available for + filtering outputs. >>> bg = BIDSDataGrabber() >>> bg.inputs.base_dir = 'ds005/' - >>> results = bg.run() - >>> len(results.outputs.outfield) # doctest: +ALLOW_UNICODE - 135 - - Using dynamically created, user-defined input fields, - filter files based on BIDS entities. - - >>> bg = BIDSDataGrabber(infields = ['subject', 'run']) - >>> bg.inputs.base_dir = 'ds005/' >>> bg.inputs.subject = '01' - >>> bg.inputs.run = '01' >>> results = bg.run() - >>> basename(results.outputs.outfield[0]) # doctest: +ALLOW_UNICODE + >>> basename(results.outputs.anat[0]) # doctest: +ALLOW_UNICODE + 'sub-01_T1w.nii.gz' + + >>> basename(results.outputs.func[0]) # doctest: +ALLOW_UNICODE 'sub-01_task-mixedgamblestask_run-01_bold.nii.gz' - Using user-defined output fields, return different types of outputs, - filtered on common entities - filter files based on BIDS entities. - >>> bg = BIDSDataGrabber(infields = ['subject'], outfields = ['func', 'anat']) + Dynamically created, user-defined output fields can also be defined to + return different types of outputs from the same project. All outputs + are filtered on common entities, which can be explicitly defined as + infields. + + >>> bg = BIDSDataGrabber(infields = ['subject'], outfields = ['dwi']) >>> bg.inputs.base_dir = 'ds005/' >>> bg.inputs.subject = '01' - >>> bg.inputs.output_query['func'] = dict(modality='func') - >>> bg.inputs.output_query['anat'] = dict(modality='anat') + >>> bg.inputs.output_query['dwi'] = dict(modality='dwi') >>> results = bg.run() - >>> basename(results.outputs.func[0]) # doctest: +ALLOW_UNICODE - 'sub-01_task-mixedgamblestask_run-01_bold.nii.gz' + >>> basename(results.outputs.dwi[0]) # doctest: +ALLOW_UNICODE + 'sub-01_dwi.nii.gz' - >>> basename(results.outputs.anat[0]) # doctest: +ALLOW_UNICODE - 'sub-01_T1w.nii.gz' """ input_spec = BIDSDataGrabberInputSpec output_spec = DynamicTraitedSpec @@ -107,51 +103,53 @@ def __init__(self, infields=None, outfields=None, **kwargs): Indicates output fields to be dynamically created. If no matching items, returns Undefined. """ - if not outfields: - outfields = [] - if not infields: - infields = [] - super(BIDSDataGrabber, self).__init__(**kwargs) - undefined_traits = {} - # used for mandatory inputs check + if not have_pybids: + raise ImportError("The BIDSEventsGrabber interface requires pybids." + " Please make sure it is installed.") + + # If outfields is None use anat and func as default + if outfields is None: + outfields = ['func', 'anat'] + self.inputs.output_query = { + "func": {"modality": "func"}, + "anat": {"modality": "anat"}} + else: + self.inputs.output_query = {} + + # If infields is None, use all BIDS entities + if infields is None: + bids_config = join(dirname(gb.__file__), 'config', 'bids.json') + bids_config = json.load(open(bids_config, 'r')) + infields = [i['name'] for i in bids_config['entities']] + self._infields = infields self._outfields = outfields + + # used for mandatory inputs check + undefined_traits = {} for key in infields: self.inputs.add_trait(key, traits.Any) undefined_traits[key] = Undefined - if not isdefined(self.inputs.output_query): - self.inputs.output_query = {} - self.inputs.trait_set(trait_change_notify=False, **undefined_traits) def _run_interface(self, runtime): - if not have_pybids: - raise ImportError("The BIDSEventsGrabber interface requires pybids." - " Please make sure it is installed.") return runtime def _list_outputs(self): - if not self._outfields: - self._outfields = ['outfield'] - self.inputs.output_query = {'outfield' : {}} - else: - for key in self._outfields: - if key not in self.inputs.output_query: - raise ValueError("Define query for all outputs") + layout = gb.BIDSLayout(self.inputs.base_dir) + + for key in self._outfields: + if key not in self.inputs.output_query: + raise ValueError("Define query for all outputs") + # If infield is not given nm input value, silently ignore + filters = {} for key in self._infields: value = getattr(self.inputs, key) - if not isdefined(value): - msg = "%s requires a value for input '%s' because" \ - " it was listed in 'infields'" % \ - (self.__class__.__name__, key) - raise ValueError(msg) - - layout = BIDSLayout(self.inputs.base_dir) - - filters = {i: getattr(self.inputs, i) for i in self._infields} + if isdefined(value): + filters[key] = value outputs = {} for key, query in self.inputs.output_query.items(): From dd03863d9df998f8e2c06c066c7ff80f5f23a51d Mon Sep 17 00:00:00 2001 From: adelavega Date: Wed, 13 Sep 2017 21:04:30 -0500 Subject: [PATCH 201/643] Try fix CI --- docker/base.Dockerfile | 5 +- nipype/interfaces/bids.py | 170 -------------------------------------- 2 files changed, 4 insertions(+), 171 deletions(-) delete mode 100644 nipype/interfaces/bids.py diff --git a/docker/base.Dockerfile b/docker/base.Dockerfile index a5b5134c2c..3de42492ce 100644 --- a/docker/base.Dockerfile +++ b/docker/base.Dockerfile @@ -148,5 +148,8 @@ ENV MATLABCMD="/opt/mcr/v85/toolbox/matlab" \ SPMMCRCMD="/opt/spm12/run_spm12.sh /opt/mcr/v85/ script" \ FORCE_SPMMCR=1 -WORKDIR /work +# Install pybids +RUN git clone https://github.com/INCF/pybids.git +RUN pip install -e . +WORKDIR /work diff --git a/nipype/interfaces/bids.py b/nipype/interfaces/bids.py deleted file mode 100644 index 1bb15bc6bf..0000000000 --- a/nipype/interfaces/bids.py +++ /dev/null @@ -1,170 +0,0 @@ -# -*- coding: utf-8 -*- -# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- -# vi: set ft=python sts=4 ts=4 sw=4 et: -""" Set of interfaces that allow interaction with BIDS data. Currently -available interfaces are: - -BIDSDataGrabber: Query data from BIDS dataset using pybids grabbids. - -Change directory to provide relative paths for doctests ->>> import os ->>> import bids ->>> filepath = os.path.realpath(os.path.dirname(bids.__file__)) ->>> datadir = os.path.realpath(os.path.join(filepath, 'grabbids/tests/data/')) ->>> os.chdir(datadir) - -""" -from os.path import join, dirname -from .. import logging -from .base import (traits, - DynamicTraitedSpec, - Directory, - BaseInterface, - isdefined, - Str, - Undefined) - -try: - from bids import grabbids as gb - import json -except ImportError: - have_pybids = False -else: - have_pybids = True - -LOGGER = logging.getLogger('workflows') - -class BIDSDataGrabberInputSpec(DynamicTraitedSpec): - base_dir = Directory(exists=True, - desc='Path to BIDS Directory.', - mandatory=True) - output_query = traits.Dict(key_trait=Str, - value_trait=traits.Dict, - desc='Queries for outfield outputs') - raise_on_empty = traits.Bool(True, usedefault=True, - desc='Generate exception if list is empty ' - 'for a given field') - return_type = traits.Enum('filename', 'namedtuple', usedefault=True) - - -class BIDSDataGrabber(BaseInterface): - - """ BIDS datagrabber module that wraps around pybids to allow arbitrary - querying of BIDS datasets. - - Examples - -------- - - >>> from nipype.interfaces.bids import BIDSDataGrabber - >>> from os.path import basename - >>> import pprint - - By default, the BIDSDataGrabber fetches anatomical and functional images - from a project, and makes BIDS entities (e.g. subject) available for - filtering outputs. - - >>> bg = BIDSDataGrabber() - >>> bg.inputs.base_dir = 'ds005/' - >>> bg.inputs.subject = '01' - >>> results = bg.run() - >>> basename(results.outputs.anat[0]) # doctest: +ALLOW_UNICODE - 'sub-01_T1w.nii.gz' - - >>> basename(results.outputs.func[0]) # doctest: +ALLOW_UNICODE - 'sub-01_task-mixedgamblestask_run-01_bold.nii.gz' - - - Dynamically created, user-defined output fields can also be defined to - return different types of outputs from the same project. All outputs - are filtered on common entities, which can be explicitly defined as - infields. - - >>> bg = BIDSDataGrabber(infields = ['subject'], outfields = ['dwi']) - >>> bg.inputs.base_dir = 'ds005/' - >>> bg.inputs.subject = '01' - >>> bg.inputs.output_query['dwi'] = dict(modality='dwi') - >>> results = bg.run() - >>> basename(results.outputs.dwi[0]) # doctest: +ALLOW_UNICODE - 'sub-01_dwi.nii.gz' - - """ - input_spec = BIDSDataGrabberInputSpec - output_spec = DynamicTraitedSpec - _always_run = True - - def __init__(self, infields=None, outfields=None, **kwargs): - """ - Parameters - ---------- - infields : list of str - Indicates the input fields to be dynamically created - - outfields: list of str - Indicates output fields to be dynamically created. - If no matching items, returns Undefined. - """ - super(BIDSDataGrabber, self).__init__(**kwargs) - if not have_pybids: - raise ImportError("The BIDSEventsGrabber interface requires pybids." - " Please make sure it is installed.") - - # If outfields is None use anat and func as default - if outfields is None: - outfields = ['func', 'anat'] - self.inputs.output_query = { - "func": {"modality": "func"}, - "anat": {"modality": "anat"}} - else: - self.inputs.output_query = {} - - # If infields is None, use all BIDS entities - if infields is None: - bids_config = join(dirname(gb.__file__), 'config', 'bids.json') - bids_config = json.load(open(bids_config, 'r')) - infields = [i['name'] for i in bids_config['entities']] - - self._infields = infields - self._outfields = outfields - - # used for mandatory inputs check - undefined_traits = {} - for key in infields: - self.inputs.add_trait(key, traits.Any) - undefined_traits[key] = Undefined - - self.inputs.trait_set(trait_change_notify=False, **undefined_traits) - - def _run_interface(self, runtime): - return runtime - - def _list_outputs(self): - layout = gb.BIDSLayout(self.inputs.base_dir) - - for key in self._outfields: - if key not in self.inputs.output_query: - raise ValueError("Define query for all outputs") - - # If infield is not given nm input value, silently ignore - filters = {} - for key in self._infields: - value = getattr(self.inputs, key) - if isdefined(value): - filters[key] = value - - outputs = {} - for key, query in self.inputs.output_query.items(): - args = query.copy() - args.update(filters) - filelist = layout.get(return_type='file', - **args) - if len(filelist) == 0: - msg = 'Output key: %s returned no files' % ( - key) - if self.inputs.raise_on_empty: - raise IOError(msg) - else: - LOGGER.warning(msg) - filelist = Undefined - else: - outputs[key] = filelist - return outputs From f460eaa9b42f3fdaebbadcd54672f4d7a2e16910 Mon Sep 17 00:00:00 2001 From: adelavega Date: Wed, 13 Sep 2017 21:20:30 -0500 Subject: [PATCH 202/643] Moved to bids utils --- nipype/interfaces/bids_utils.py | 169 ++++++++++++++++++++++++++++++++ 1 file changed, 169 insertions(+) create mode 100644 nipype/interfaces/bids_utils.py diff --git a/nipype/interfaces/bids_utils.py b/nipype/interfaces/bids_utils.py new file mode 100644 index 0000000000..fda56f79b2 --- /dev/null +++ b/nipype/interfaces/bids_utils.py @@ -0,0 +1,169 @@ +# -*- coding: utf-8 -*- +# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- +# vi: set ft=python sts=4 ts=4 sw=4 et: +""" Set of interfaces that allow interaction with BIDS data. Currently +available interfaces are: + +BIDSDataGrabber: Query data from BIDS dataset using pybids grabbids. + +Change directory to provide relative paths for doctests +>>> import os +>>> import bids +>>> filepath = os.path.realpath(os.path.dirname(bids.__file__)) +>>> datadir = os.path.realpath(os.path.join(filepath, 'grabbids/tests/data/')) +>>> os.chdir(datadir) + +""" +from os.path import join, dirname +from .. import logging +from .base import (traits, + DynamicTraitedSpec, + Directory, + BaseInterface, + isdefined, + Str, + Undefined) + +try: + from bids import grabbids as gb + import json +except ImportError: + have_pybids = False +else: + have_pybids = True + +LOGGER = logging.getLogger('workflows') + +class BIDSDataGrabberInputSpec(DynamicTraitedSpec): + base_dir = Directory(exists=True, + desc='Path to BIDS Directory.', + mandatory=True) + output_query = traits.Dict(key_trait=Str, + value_trait=traits.Dict, + desc='Queries for outfield outputs') + raise_on_empty = traits.Bool(True, usedefault=True, + desc='Generate exception if list is empty ' + 'for a given field') + return_type = traits.Enum('filename', 'namedtuple', usedefault=True) + + +class BIDSDataGrabber(BaseInterface): + + """ BIDS datagrabber module that wraps around pybids to allow arbitrary + querying of BIDS datasets. + + Examples + -------- + + >>> from nipype.interfaces.bids_utils import BIDSDataGrabber + >>> from os.path import basename + + By default, the BIDSDataGrabber fetches anatomical and functional images + from a project, and makes BIDS entities (e.g. subject) available for + filtering outputs. + + >>> bg = BIDSDataGrabber() + >>> bg.inputs.base_dir = 'ds005/' + >>> bg.inputs.subject = '01' + >>> results = bg.run() + >>> basename(results.outputs.anat[0]) # doctest: +ALLOW_UNICODE + 'sub-01_T1w.nii.gz' + + >>> basename(results.outputs.func[0]) # doctest: +ALLOW_UNICODE + 'sub-01_task-mixedgamblestask_run-01_bold.nii.gz' + + + Dynamically created, user-defined output fields can also be defined to + return different types of outputs from the same project. All outputs + are filtered on common entities, which can be explicitly defined as + infields. + + >>> bg = BIDSDataGrabber(infields = ['subject'], outfields = ['dwi']) + >>> bg.inputs.base_dir = 'ds005/' + >>> bg.inputs.subject = '01' + >>> bg.inputs.output_query['dwi'] = dict(modality='dwi') + >>> results = bg.run() + >>> basename(results.outputs.dwi[0]) # doctest: +ALLOW_UNICODE + 'sub-01_dwi.nii.gz' + + """ + input_spec = BIDSDataGrabberInputSpec + output_spec = DynamicTraitedSpec + _always_run = True + + def __init__(self, infields=None, outfields=None, **kwargs): + """ + Parameters + ---------- + infields : list of str + Indicates the input fields to be dynamically created + + outfields: list of str + Indicates output fields to be dynamically created. + If no matching items, returns Undefined. + """ + super(BIDSDataGrabber, self).__init__(**kwargs) + if not have_pybids: + raise ImportError("The BIDSEventsGrabber interface requires pybids." + " Please make sure it is installed.") + + # If outfields is None use anat and func as default + if outfields is None: + outfields = ['func', 'anat'] + self.inputs.output_query = { + "func": {"modality": "func"}, + "anat": {"modality": "anat"}} + else: + self.inputs.output_query = {} + + # If infields is None, use all BIDS entities + if infields is None: + bids_config = join(dirname(gb.__file__), 'config', 'bids.json') + bids_config = json.load(open(bids_config, 'r')) + infields = [i['name'] for i in bids_config['entities']] + + self._infields = infields + self._outfields = outfields + + # used for mandatory inputs check + undefined_traits = {} + for key in infields: + self.inputs.add_trait(key, traits.Any) + undefined_traits[key] = Undefined + + self.inputs.trait_set(trait_change_notify=False, **undefined_traits) + + def _run_interface(self, runtime): + return runtime + + def _list_outputs(self): + layout = gb.BIDSLayout(self.inputs.base_dir) + + for key in self._outfields: + if key not in self.inputs.output_query: + raise ValueError("Define query for all outputs") + + # If infield is not given nm input value, silently ignore + filters = {} + for key in self._infields: + value = getattr(self.inputs, key) + if isdefined(value): + filters[key] = value + + outputs = {} + for key, query in self.inputs.output_query.items(): + args = query.copy() + args.update(filters) + filelist = layout.get(return_type='file', + **args) + if len(filelist) == 0: + msg = 'Output key: %s returned no files' % ( + key) + if self.inputs.raise_on_empty: + raise IOError(msg) + else: + LOGGER.warning(msg) + filelist = Undefined + else: + outputs[key] = filelist + return outputs From 3cc3a236384ac235df1dbe1feea7d15f1d5decba Mon Sep 17 00:00:00 2001 From: adelavega Date: Wed, 13 Sep 2017 21:41:22 -0500 Subject: [PATCH 203/643] Try fix Circle --- circle.yml | 2 ++ docker/base.Dockerfile | 4 ---- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/circle.yml b/circle.yml index 5624dbb7f8..f414972934 100644 --- a/circle.yml +++ b/circle.yml @@ -27,6 +27,8 @@ dependencies: - if [[ ! -e "$HOME/bin/codecov" ]]; then mkdir -p $HOME/bin; curl -so $HOME/bin/codecov https://codecov.io/bash && chmod 755 $HOME/bin/codecov; fi - (cd $HOME/docker && gzip -d cache.tar.gz && docker load --input $HOME/docker/cache.tar) || true : timeout: 6000 + - git clone https://github.com/INCF/pybids.git && cd pybids && python setup.py develop + override: # Get data - if [[ ! -d ~/examples/nipype-tutorial ]]; then wget --retry-connrefused --waitretry=5 --read-timeout=20 --timeout=15 -t 0 -q -O nipype-tutorial.tar.bz2 "${DATA_NIPYPE_TUTORIAL_URL}" && tar xjf nipype-tutorial.tar.bz2 -C ~/examples/; fi diff --git a/docker/base.Dockerfile b/docker/base.Dockerfile index 3de42492ce..5b39951f64 100644 --- a/docker/base.Dockerfile +++ b/docker/base.Dockerfile @@ -148,8 +148,4 @@ ENV MATLABCMD="/opt/mcr/v85/toolbox/matlab" \ SPMMCRCMD="/opt/spm12/run_spm12.sh /opt/mcr/v85/ script" \ FORCE_SPMMCR=1 -# Install pybids -RUN git clone https://github.com/INCF/pybids.git -RUN pip install -e . - WORKDIR /work From e2e78c4b9fcc4f730f40e64267b3162b7a347ad8 Mon Sep 17 00:00:00 2001 From: adelavega Date: Thu, 14 Sep 2017 00:19:15 -0500 Subject: [PATCH 204/643] Return type argument --- nipype/interfaces/bids_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nipype/interfaces/bids_utils.py b/nipype/interfaces/bids_utils.py index fda56f79b2..11d342baf6 100644 --- a/nipype/interfaces/bids_utils.py +++ b/nipype/interfaces/bids_utils.py @@ -154,7 +154,7 @@ def _list_outputs(self): for key, query in self.inputs.output_query.items(): args = query.copy() args.update(filters) - filelist = layout.get(return_type='file', + filelist = layout.get(return_type=self.inputs.return_type, **args) if len(filelist) == 0: msg = 'Output key: %s returned no files' % ( From 60dce3ff855ef8a988c9ed36fb9bb1157921e701 Mon Sep 17 00:00:00 2001 From: adelavega Date: Thu, 14 Sep 2017 00:22:32 -0500 Subject: [PATCH 205/643] Undefined output if no match --- nipype/interfaces/bids_utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nipype/interfaces/bids_utils.py b/nipype/interfaces/bids_utils.py index 11d342baf6..ebbf2a1149 100644 --- a/nipype/interfaces/bids_utils.py +++ b/nipype/interfaces/bids_utils.py @@ -164,6 +164,6 @@ def _list_outputs(self): else: LOGGER.warning(msg) filelist = Undefined - else: - outputs[key] = filelist + + outputs[key] = filelist return outputs From 97d832ba6668d74c3711ac6f1b2a51bc8e1c8fd5 Mon Sep 17 00:00:00 2001 From: adelavega Date: Thu, 14 Sep 2017 01:04:50 -0500 Subject: [PATCH 206/643] Fix return type --- nipype/interfaces/bids_utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nipype/interfaces/bids_utils.py b/nipype/interfaces/bids_utils.py index ebbf2a1149..e1606e7d92 100644 --- a/nipype/interfaces/bids_utils.py +++ b/nipype/interfaces/bids_utils.py @@ -44,7 +44,7 @@ class BIDSDataGrabberInputSpec(DynamicTraitedSpec): raise_on_empty = traits.Bool(True, usedefault=True, desc='Generate exception if list is empty ' 'for a given field') - return_type = traits.Enum('filename', 'namedtuple', usedefault=True) + return_type = traits.Enum('file', 'namedtuple', usedefault=True) class BIDSDataGrabber(BaseInterface): @@ -164,6 +164,6 @@ def _list_outputs(self): else: LOGGER.warning(msg) filelist = Undefined - + outputs[key] = filelist return outputs From c464fc287e472fd0610e4637f9284d6e395eb803 Mon Sep 17 00:00:00 2001 From: Salma BOUGACHA Date: Fri, 15 Sep 2017 11:59:38 +0200 Subject: [PATCH 207/643] 3dUndump interface --- nipype/interfaces/afni/utils.py | 97 +++++++++++++++++++++++++++++++++ 1 file changed, 97 insertions(+) diff --git a/nipype/interfaces/afni/utils.py b/nipype/interfaces/afni/utils.py index 8d640039d7..00598ad50c 100644 --- a/nipype/interfaces/afni/utils.py +++ b/nipype/interfaces/afni/utils.py @@ -1963,6 +1963,103 @@ class To3D(AFNICommand): output_spec = AFNICommandOutputSpec +class UndumpInputSpec(AFNICommandInputSpec): + in_file = File( + desc='input file to 3dUndump, whose geometry will determine' + 'the geometry of the output', + argstr='-master %s', + position=-1, + mandatory=True, + exists=True, + copyfile=False) + out_file = File( + desc='output image file name', + argstr='-prefix %s', + name_source='in_file') + mask_file = File( + desc='mask image file name. Only voxels that are nonzero in the mask ' + 'can be set.', + argstr='-mask %s') + datatype = traits.Enum( + 'short', 'float', 'byte', + desc='set output file datatype', + argstr='-datum %s') + default_value = traits.Float( + desc='default value stored in each input voxel that does not have ' + 'a value supplied in the input file', + argstr='-dval %f') + fill_value = traits.Float( + desc='value, used for each voxel in the output dataset that is NOT ' + 'listed in the input file', + argstr='-fval %f') + coordinates_specification = traits.Enum( + 'ijk', 'xyz', + desc='Coordinates in the input file as index triples (i, j, k) ' + 'or spatial coordinates (x, y, z) in mm', + argstr='-%s') + srad = traits.Float( + desc='radius in mm of the sphere that will be filled about each input ' + '(x,y,z) or (i,j,k) voxel. If the radius is not given, or is 0, ' + 'then each input data line sets the value in only one voxel.', + argstr='-srad -%f') + srad = traits.Tuple( + traits.Enum('R', 'L'), traits.Enum('A', 'P'), traits.Enum('I', 'S'), + desc='radius in mm of the sphere that will be filled about each input ' + '(x,y,z) or (i,j,k) voxel. If the radius is not given, or is 0, ' + 'then each input data line sets the value in only one voxel.', + argstr='-srad -%f') + head_only = traits.Bool( + desc='create only the .HEAD file which gets exploited by ' + 'the AFNI matlab library function New_HEAD.m', + argstr='-head_only') + + +class UndumpOutputSpec(TraitedSpec): + out_file = File(desc='assembled file', exists=True) + + +class Undump(AFNICommand): + """3dUndump - Assembles a 3D dataset from an ASCII list of coordinates and + (optionally) values. + + The input file(s) are ASCII files, with one voxel specification per + line. A voxel specification is 3 numbers (-ijk or -xyz coordinates), + with an optional 4th number giving the voxel value. For example: + + 1 2 3 + 3 2 1 5 + 5.3 6.2 3.7 + // this line illustrates a comment + + The first line puts a voxel (with value given by '-dval') at point + (1,2,3). The second line puts a voxel (with value 5) at point (3,2,1). + The third line puts a voxel (with value given by '-dval') at point + (5.3,6.2,3.7). If -ijk is in effect, and fractional coordinates + are given, they will be rounded to the nearest integers; for example, + the third line would be equivalent to (i,j,k) = (5,6,4). + + + For complete details, see the `3dUndump Documentation. + `_ + + Examples + ======== + + >>> from nipype.interfaces import afni + >>> unndump = afni.Undump() + >>> unndump.inputs.in_file = 'structural.nii' + >>> unndump.inputs.out_file = 'structural_undumped.nii' + >>> unndump.cmdline # doctest: +ALLOW_UNICODE + '3dUnifize -prefix structural_unifized.nii -master structural.nii' + >>> res = unndump.run() # doctest: +SKIP + + """ + + _cmd = '3dUndump' + input_spec = UndumpInputSpec + output_spec = UndumpOutputSpec + + class UnifizeInputSpec(AFNICommandInputSpec): in_file = File( desc='input file to 3dUnifize', From 8def391bcd269fe665b8f86b317a70a0141a5aaf Mon Sep 17 00:00:00 2001 From: Gilles de Hollander Date: Fri, 15 Sep 2017 14:08:31 +0200 Subject: [PATCH 208/643] Test --- nipype/interfaces/ants/registration.py | 34 ++++++++++++++++++-------- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/nipype/interfaces/ants/registration.py b/nipype/interfaces/ants/registration.py index 6ee12c263d..7a477bcd3f 100644 --- a/nipype/interfaces/ants/registration.py +++ b/nipype/interfaces/ants/registration.py @@ -242,9 +242,9 @@ class RegistrationInputSpec(ANTSCommandInputSpec): restore_state = File(argstr='--restore-state %s', exists=True, desc='Filename for restoring the internal restorable state of the registration') - initial_moving_transform = File(argstr='%s', exists=True, desc='', + initial_moving_transform = InputMultiPath(argstr='%s', exists=True, desc='', xor=['initial_moving_transform_com']) - invert_initial_moving_transform = traits.Bool(requires=["initial_moving_transform"], + invert_initial_moving_transform= InputMultiPath(traits.Bool(), requires=["initial_moving_transform"], desc='', xor=['initial_moving_transform_com']) initial_moving_transform_com = traits.Enum(0, 1, 2, argstr='%s', @@ -865,6 +865,23 @@ def _format_winsorize_image_intensities(self): return '--winsorize-image-intensities [ %s, %s ]' % (self.inputs.winsorize_lower_quantile, self.inputs.winsorize_upper_quantile) + def _get_initial_transform_filenames(self): + retval = ['--initial-moving-transform'] + #retval = [] + for ii in range(len(self.inputs.initial_moving_transform)): + if isdefined(self.inputs.invert_initial_moving_transform): + if len(self.inputs.initial_moving_transform) == len(self.inputs.invert_initial_moving_transform): + invert_code = 1 if self.inputs.invert_initial_moving_transform[ + ii] else 0 + retval.append("[ %s, %d ]" % + (self.inputs.initial_moving_transform[ii], invert_code)) + else: + raise Exception(("ERROR: The useInverse list must have the same number " + "of entries as the transformsFileName list.")) + else: + retval.append("--initial-moving-transform [%s, 0] " % self.inputs.initial_moving_transform[ii]) + return " ".join(retval) + def _format_arg(self, opt, spec, val): if opt == 'fixed_image_mask': if isdefined(self.inputs.moving_image_mask): @@ -875,10 +892,7 @@ def _format_arg(self, opt, spec, val): elif opt == 'transforms': return self._format_registration() elif opt == 'initial_moving_transform': - do_invert_transform = self.inputs.invert_initial_moving_transform \ - if isdefined(self.inputs.invert_initial_moving_transform) else 0 # Just do the default behavior - return '--initial-moving-transform [ %s, %d ]' % (self.inputs.initial_moving_transform, - do_invert_transform) + return self._get_initial_transform_filenames() elif opt == 'initial_moving_transform_com': do_center_of_mass_init = self.inputs.initial_moving_transform_com \ if isdefined(self.inputs.initial_moving_transform_com) else 0 # Just do the default behavior @@ -959,10 +973,10 @@ def _list_outputs(self): if not self.inputs.collapse_output_transforms: transform_count = 0 if isdefined(self.inputs.initial_moving_transform): - outputs['forward_transforms'].append(self.inputs.initial_moving_transform) - outputs['forward_invert_flags'].append(invert_initial_moving_transform) - outputs['reverse_transforms'].insert(0, self.inputs.initial_moving_transform) - outputs['reverse_invert_flags'].insert(0, not invert_initial_moving_transform) # Prepend + outputs['forward_transforms'] += self.inputs.initial_moving_transform + outputs['forward_invert_flags'] += invert_initial_moving_transform + outputs['reverse_transforms'] = self.inputs.initial_moving_transform + outputs['reverse_transforms'] + outputs['reverse_invert_flags'] = [not e for e in self.inputs.invert_initial_moving_transform] + outputs['reverse_invert_flags'] # Prepend transform_count += 1 elif isdefined(self.inputs.initial_moving_transform_com): forward_filename, forward_inversemode = self._output_filenames( From c329fc084fc3a2325952601d71a63e4895ab339c Mon Sep 17 00:00:00 2001 From: salma1601 Date: Fri, 15 Sep 2017 14:55:06 +0200 Subject: [PATCH 209/643] fix doc and expose undump --- nipype/interfaces/afni/__init__.py | 3 ++- nipype/interfaces/afni/utils.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/nipype/interfaces/afni/__init__.py b/nipype/interfaces/afni/__init__.py index e62ae79a93..cdca22c4f3 100644 --- a/nipype/interfaces/afni/__init__.py +++ b/nipype/interfaces/afni/__init__.py @@ -23,6 +23,7 @@ Bucket, Calc, Cat, CatMatvec, Copy, Dot, Edge3, Eval, FWHMx, MaskTool, Merge, Notes, NwarpApply, OneDToolPy, - Refit, Resample, TCat, TCatSubBrick, TStat, To3D, Unifize, ZCutUp, GCOR, + Refit, Resample, TCat, TCatSubBrick, TStat, To3D, Unifize, + Undump, ZCutUp, GCOR, Zcat, Zeropad) from .model import (Deconvolve, Remlfit) diff --git a/nipype/interfaces/afni/utils.py b/nipype/interfaces/afni/utils.py index 00598ad50c..726ecd3dc0 100644 --- a/nipype/interfaces/afni/utils.py +++ b/nipype/interfaces/afni/utils.py @@ -2050,7 +2050,7 @@ class Undump(AFNICommand): >>> unndump.inputs.in_file = 'structural.nii' >>> unndump.inputs.out_file = 'structural_undumped.nii' >>> unndump.cmdline # doctest: +ALLOW_UNICODE - '3dUnifize -prefix structural_unifized.nii -master structural.nii' + '3dUndump -prefix structural_undumped.nii -master structural.nii' >>> res = unndump.run() # doctest: +SKIP """ From 5138a4c43955becf1682604591489d38ec6f3d6a Mon Sep 17 00:00:00 2001 From: salma1601 Date: Fri, 15 Sep 2017 14:58:29 +0200 Subject: [PATCH 210/643] add auto-test --- .../interfaces/afni/tests/test_auto_Undump.py | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 nipype/interfaces/afni/tests/test_auto_Undump.py diff --git a/nipype/interfaces/afni/tests/test_auto_Undump.py b/nipype/interfaces/afni/tests/test_auto_Undump.py new file mode 100644 index 0000000000..808de86daf --- /dev/null +++ b/nipype/interfaces/afni/tests/test_auto_Undump.py @@ -0,0 +1,55 @@ +# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT +from __future__ import unicode_literals +from ..utils import Undump + + +def test_Undump_inputs(): + input_map = dict(args=dict(argstr='%s', + ), + coordinates_specification=dict(argstr='-%s', + ), + datatype=dict(argstr='-datum %s', + ), + default_value=dict(argstr='-dval %f', + ), + environ=dict(nohash=True, + usedefault=True, + ), + fill_value=dict(argstr='-fval %f', + ), + head_only=dict(argstr='-head_only', + ), + ignore_exception=dict(nohash=True, + usedefault=True, + ), + in_file=dict(argstr='-master %s', + copyfile=False, + mandatory=True, + position=-1, + ), + mask_file=dict(argstr='-mask %s', + ), + out_file=dict(argstr='-prefix %s', + name_source='in_file', + ), + outputtype=dict(), + srad=dict(argstr='-srad -%f', + ), + terminal_output=dict(nohash=True, + ), + ) + inputs = Undump.input_spec() + + for key, metadata in list(input_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(inputs.traits()[key], metakey) == value + + +def test_Undump_outputs(): + output_map = dict(out_file=dict(), + ) + outputs = Undump.output_spec() + + for key, metadata in list(output_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(outputs.traits()[key], metakey) == value From aba1a5ea8dffa5e42e602015af4d1544e5969319 Mon Sep 17 00:00:00 2001 From: Gilles de Hollander Date: Fri, 15 Sep 2017 16:03:09 +0200 Subject: [PATCH 211/643] Various bugfixes --- nipype/interfaces/ants/registration.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/nipype/interfaces/ants/registration.py b/nipype/interfaces/ants/registration.py index 7a477bcd3f..d33982a443 100644 --- a/nipype/interfaces/ants/registration.py +++ b/nipype/interfaces/ants/registration.py @@ -867,7 +867,6 @@ def _format_winsorize_image_intensities(self): def _get_initial_transform_filenames(self): retval = ['--initial-moving-transform'] - #retval = [] for ii in range(len(self.inputs.initial_moving_transform)): if isdefined(self.inputs.invert_initial_moving_transform): if len(self.inputs.initial_moving_transform) == len(self.inputs.invert_initial_moving_transform): @@ -879,7 +878,7 @@ def _get_initial_transform_filenames(self): raise Exception(("ERROR: The useInverse list must have the same number " "of entries as the transformsFileName list.")) else: - retval.append("--initial-moving-transform [%s, 0] " % self.inputs.initial_moving_transform[ii]) + retval.append("[%s, 0] " % self.inputs.initial_moving_transform[ii]) return " ".join(retval) def _format_arg(self, opt, spec, val): @@ -959,7 +958,7 @@ def _list_outputs(self): # invert_initial_moving_transform should be always defined, even if # there's no initial transform - invert_initial_moving_transform = False + invert_initial_moving_transform = [False] * len(self.inputs.initial_moving_transform) if isdefined(self.inputs.invert_initial_moving_transform): invert_initial_moving_transform = self.inputs.invert_initial_moving_transform @@ -976,8 +975,8 @@ def _list_outputs(self): outputs['forward_transforms'] += self.inputs.initial_moving_transform outputs['forward_invert_flags'] += invert_initial_moving_transform outputs['reverse_transforms'] = self.inputs.initial_moving_transform + outputs['reverse_transforms'] - outputs['reverse_invert_flags'] = [not e for e in self.inputs.invert_initial_moving_transform] + outputs['reverse_invert_flags'] # Prepend - transform_count += 1 + outputs['reverse_invert_flags'] = [not e for e in invert_initial_moving_transform] + outputs['reverse_invert_flags'] # Prepend + transform_count += len(self.inputs.initial_moving_transform) elif isdefined(self.inputs.initial_moving_transform_com): forward_filename, forward_inversemode = self._output_filenames( self.inputs.output_transform_prefix, From dfc3bcd3ce263515bc48794a1ab6d6e76a4f10c5 Mon Sep 17 00:00:00 2001 From: Gilles de Hollander Date: Fri, 15 Sep 2017 16:27:09 +0200 Subject: [PATCH 212/643] Fake test data for ComposeMultiTransforms --- nipype/testing/data/struct_to_template.mat | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 nipype/testing/data/struct_to_template.mat diff --git a/nipype/testing/data/struct_to_template.mat b/nipype/testing/data/struct_to_template.mat new file mode 100644 index 0000000000..e69de29bb2 From ea351d18c69c1c92822bd9e92db867eae5998aec Mon Sep 17 00:00:00 2001 From: Gilles de Hollander Date: Fri, 15 Sep 2017 16:27:57 +0200 Subject: [PATCH 213/643] Make antsRegistration cmdline consistent with documentation --- nipype/interfaces/ants/registration.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nipype/interfaces/ants/registration.py b/nipype/interfaces/ants/registration.py index d33982a443..ff494227f2 100644 --- a/nipype/interfaces/ants/registration.py +++ b/nipype/interfaces/ants/registration.py @@ -866,7 +866,7 @@ def _format_winsorize_image_intensities(self): self.inputs.winsorize_upper_quantile) def _get_initial_transform_filenames(self): - retval = ['--initial-moving-transform'] + retval = ['--initial-moving-transform '] for ii in range(len(self.inputs.initial_moving_transform)): if isdefined(self.inputs.invert_initial_moving_transform): if len(self.inputs.initial_moving_transform) == len(self.inputs.invert_initial_moving_transform): From 998a7c154876aa35d11fd8d66441c75eae6d6d2f Mon Sep 17 00:00:00 2001 From: Gilles de Hollander Date: Fri, 15 Sep 2017 16:28:25 +0200 Subject: [PATCH 214/643] Small typo in documentation --- nipype/interfaces/ants/utils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nipype/interfaces/ants/utils.py b/nipype/interfaces/ants/utils.py index 9c4484c248..c651b948e0 100644 --- a/nipype/interfaces/ants/utils.py +++ b/nipype/interfaces/ants/utils.py @@ -225,7 +225,7 @@ class AffineInitializer(ANTSCommand): def _list_outputs(self): return {'out_file': os.path.abspath(self.inputs.out_file)} - + class ComposeMultiTransformInputSpec(ANTSCommandInputSpec): dimension = traits.Enum(3, 2, argstr='%d', usedefault=True, mandatory=True, @@ -247,12 +247,12 @@ class ComposeMultiTransform(ANTSCommand): Examples -------- >>> from nipype.interfaces.ants import ComposeMultiTransform - >>> compose = ComposeMultiTransform() + >>> compose_transform = ComposeMultiTransform() >>> compose_transform.inputs.dimension = 3 >>> compose_transform.inputs.transforms = ['struct_to_template.mat', 'func_to_struct.mat'] >>> compose_transform.inputs.output_transform = 'func_to_template.mat' >>> compose_transform.cmdline # doctest: +ALLOW_UNICODE - 'TODO TODO TODO' + 'ComposeMultiTransform 3 func_to_template.mat struct_to_template.mat func_to_struct.mat' """ _cmd = 'ComposeMultiTransform' input_spec = ComposeMultiTransformInputSpec From e32082b6dd45862535136d22afb2638e9c5a3ce0 Mon Sep 17 00:00:00 2001 From: oliver-contier Date: Tue, 19 Sep 2017 13:35:45 +0200 Subject: [PATCH 215/643] reference run can now be given as string ('first', 'last', 'middle). Also added rudimentary tests --- nipype/workflows/fmri/fsl/preprocess.py | 2 +- .../fmri/fsl/tests/test_preprocess.py | 19 ++++++++++++++----- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/nipype/workflows/fmri/fsl/preprocess.py b/nipype/workflows/fmri/fsl/preprocess.py index 07c79b736b..a2ef9fe47d 100644 --- a/nipype/workflows/fmri/fsl/preprocess.py +++ b/nipype/workflows/fmri/fsl/preprocess.py @@ -19,7 +19,7 @@ def getthreshop(thresh): def pickrun(files, whichrun): """pick file from list of files""" - filemap = {'first': 0, 'last': -1, 'middle' :len(files) // 2} + filemap = {'first': 0, 'last': -1, 'middle': len(files) // 2} if isinstance(whichrun, str): if whichrun not in filemap.keys(): diff --git a/nipype/workflows/fmri/fsl/tests/test_preprocess.py b/nipype/workflows/fmri/fsl/tests/test_preprocess.py index 847d948def..ac9960514c 100644 --- a/nipype/workflows/fmri/fsl/tests/test_preprocess.py +++ b/nipype/workflows/fmri/fsl/tests/test_preprocess.py @@ -4,13 +4,22 @@ def test_pickrun(): - files = ['1', '2', '3'] + files = ['1', '2', '3', '4'] assert pickrun(files, 0) == '1' - assert pickrun(files, -1) == '3' + assert pickrun(files, 'first') == '1' + assert pickrun(files, -1) == '4' + assert pickrun(files, 'last') == '4' + assert pickrun(files, 'middle') == '3' def test_create_featreg_preproc(): - # smoke test + """smoke test""" wf = create_featreg_preproc(whichrun=0) - wf.get_node('extractref') - assert wf._get_dot() + + # test type + import nipype + assert type(wf) == nipype.pipeline.engine.Workflow + + # test methods + assert wf.get_node('extractref') + assert wf._get_dot() \ No newline at end of file From 64fe757140c7e34333b387dc833f7b4fac5665d7 Mon Sep 17 00:00:00 2001 From: oliver-contier Date: Tue, 19 Sep 2017 16:53:26 +0200 Subject: [PATCH 216/643] changed if clause structure to account for case when single file name is given --- nipype/workflows/fmri/fsl/preprocess.py | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/nipype/workflows/fmri/fsl/preprocess.py b/nipype/workflows/fmri/fsl/preprocess.py index 4b95de0ac8..ea67667294 100644 --- a/nipype/workflows/fmri/fsl/preprocess.py +++ b/nipype/workflows/fmri/fsl/preprocess.py @@ -18,22 +18,25 @@ def getthreshop(thresh): return ['-thr %.10f -Tmin -bin' % (0.1 * val[1]) for val in thresh] - def pickrun(files, whichrun): """pick file from list of files""" filemap = {'first': 0, 'last': -1, 'middle': len(files) // 2} - if isinstance(whichrun, str): - if whichrun not in filemap.keys(): - raise(KeyError, 'Sorry, whichrun must be either integer index' - 'or string in form of "first", "last" or "middle') - else: - return files[filemap[whichrun]] - if isinstance(files, list): - return files[whichrun] + + # whichrun is given as integer + if isinstance(whichrun, int): + return files[whichrun] + # whichrun is given as string + elif isinstance(whichrun, str): + if whichrun not in filemap.keys(): + raise(KeyError, 'Sorry, whichrun must be either integer index' + 'or string in form of "first", "last" or "middle') + else: + return files[filemap[whichrun]] else: + # in case single file name is given return files From ce148eb573c570baac04ce7e7f39795125e660e8 Mon Sep 17 00:00:00 2001 From: adelavega Date: Tue, 19 Sep 2017 17:49:13 -0500 Subject: [PATCH 217/643] Install pybids for tesing in Dockerfile --- Dockerfile | 3 +++ circle.yml | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 502216cf8d..14a6dec135 100644 --- a/Dockerfile +++ b/Dockerfile @@ -87,6 +87,9 @@ COPY requirements.txt requirements.txt RUN pip install -r requirements.txt && \ rm -rf ~/.cache/pip +RUN git clone https://github.com/INCF/pybids.git && \ + cd pybids && python setup.py develop + # Installing nipype COPY . /src/nipype RUN cd /src/nipype && \ diff --git a/circle.yml b/circle.yml index f414972934..82d67432d6 100644 --- a/circle.yml +++ b/circle.yml @@ -27,7 +27,6 @@ dependencies: - if [[ ! -e "$HOME/bin/codecov" ]]; then mkdir -p $HOME/bin; curl -so $HOME/bin/codecov https://codecov.io/bash && chmod 755 $HOME/bin/codecov; fi - (cd $HOME/docker && gzip -d cache.tar.gz && docker load --input $HOME/docker/cache.tar) || true : timeout: 6000 - - git clone https://github.com/INCF/pybids.git && cd pybids && python setup.py develop override: # Get data From fc6dd01cf8c8b88ebcfbb79cb33b552ffab451c4 Mon Sep 17 00:00:00 2001 From: Alejandro de la Vega Date: Wed, 20 Sep 2017 00:12:28 -0500 Subject: [PATCH 218/643] Update circle.yml --- circle.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/circle.yml b/circle.yml index 82d67432d6..5624dbb7f8 100644 --- a/circle.yml +++ b/circle.yml @@ -27,7 +27,6 @@ dependencies: - if [[ ! -e "$HOME/bin/codecov" ]]; then mkdir -p $HOME/bin; curl -so $HOME/bin/codecov https://codecov.io/bash && chmod 755 $HOME/bin/codecov; fi - (cd $HOME/docker && gzip -d cache.tar.gz && docker load --input $HOME/docker/cache.tar) || true : timeout: 6000 - override: # Get data - if [[ ! -d ~/examples/nipype-tutorial ]]; then wget --retry-connrefused --waitretry=5 --read-timeout=20 --timeout=15 -t 0 -q -O nipype-tutorial.tar.bz2 "${DATA_NIPYPE_TUTORIAL_URL}" && tar xjf nipype-tutorial.tar.bz2 -C ~/examples/; fi From da6681fe216418a45b76437cd2912ae09d571832 Mon Sep 17 00:00:00 2001 From: oesteban Date: Thu, 21 Sep 2017 16:47:16 -0700 Subject: [PATCH 219/643] [WIP,ENH] Revision to the resource profiler This PR revises the resource profiler with the following objectives: - Increase robustness (and making sure it does not crash nipype) - Extend profiling to all interfaces (including pure python) The increase of robustness will be expected from: 1. Trying to reduce (or remove at all if possible) the logger callback to register the estimations of memory and cpus. This could be achieved by making interfaces responsible or keeping track of their resources to then collect all results after execution of the node. 2. Centralize profiler imports, like the config or logger object so that the applicability of the profiler is checked only once. This first commit just creates one new module nipype.utils.profiler, and moves the related functions in there. --- doc/users/config_file.rst | 7 +- docker/files/run_examples.sh | 2 +- nipype/interfaces/base.py | 163 +------------------------ nipype/interfaces/utility/wrappers.py | 17 +-- nipype/pipeline/engine/nodes.py | 4 +- nipype/utils/config.py | 2 +- nipype/utils/filemanip.py | 2 +- nipype/utils/logger.py | 12 +- nipype/utils/profiler.py | 164 ++++++++++++++++++++++++++ 9 files changed, 187 insertions(+), 186 deletions(-) create mode 100644 nipype/utils/profiler.py diff --git a/doc/users/config_file.rst b/doc/users/config_file.rst index 7d55cc522d..1a1a550311 100644 --- a/doc/users/config_file.rst +++ b/doc/users/config_file.rst @@ -16,9 +16,10 @@ Logging *workflow_level* How detailed the logs regarding workflow should be (possible values: ``INFO`` and ``DEBUG``; default value: ``INFO``) -*filemanip_level* - How detailed the logs regarding file operations (for example overwriting - warning) should be (possible values: ``INFO`` and ``DEBUG``; default value: +*utils_level* + How detailed the logs regarding nipype utils like file operations + (for example overwriting warning) or the resource profiler should be + (possible values: ``INFO`` and ``DEBUG``; default value: ``INFO``) *interface_level* How detailed the logs regarding interface execution should be (possible diff --git a/docker/files/run_examples.sh b/docker/files/run_examples.sh index a23c27e76b..f23bc6f44c 100644 --- a/docker/files/run_examples.sh +++ b/docker/files/run_examples.sh @@ -12,7 +12,7 @@ mkdir -p ${HOME}/.nipype ${WORKDIR}/logs/example_${example_id} ${WORKDIR}/tests echo "[logging]" > ${HOME}/.nipype/nipype.cfg echo "workflow_level = DEBUG" >> ${HOME}/.nipype/nipype.cfg echo "interface_level = DEBUG" >> ${HOME}/.nipype/nipype.cfg -echo "filemanip_level = DEBUG" >> ${HOME}/.nipype/nipype.cfg +echo "utils_level = DEBUG" >> ${HOME}/.nipype/nipype.cfg echo "log_to_file = true" >> ${HOME}/.nipype/nipype.cfg echo "log_directory = ${WORKDIR}/logs/example_${example_id}" >> ${HOME}/.nipype/nipype.cfg diff --git a/nipype/interfaces/base.py b/nipype/interfaces/base.py index 19cf9ccaa6..c626328fde 100644 --- a/nipype/interfaces/base.py +++ b/nipype/interfaces/base.py @@ -44,22 +44,12 @@ File, Directory, DictStrStr, has_metadata, ImageFile) from ..external.due import due -runtime_profile = str2bool(config.get('execution', 'profile_runtime')) nipype_version = Version(__version__) iflogger = logging.getLogger('interface') FLOAT_FORMAT = '{:.10f}'.format PY35 = sys.version_info >= (3, 5) PY3 = sys.version_info[0] > 2 - -if runtime_profile: - try: - import psutil - except ImportError as exc: - iflogger.info('Unable to import packages needed for runtime profiling. '\ - 'Turning off runtime profiler. Reason: %s' % exc) - runtime_profile = False - __docformat__ = 'restructuredtext' @@ -1270,118 +1260,6 @@ def _read(self, drain): self._lastidx = len(self._rows) -# Get number of threads for process -def _get_num_threads(proc): - """Function to get the number of threads a process is using - NOTE: If - - Parameters - ---------- - proc : psutil.Process instance - the process to evaluate thead usage of - - Returns - ------- - num_threads : int - the number of threads that the process is using - """ - - # Import packages - import psutil - - # If process is running - if proc.status() == psutil.STATUS_RUNNING: - num_threads = proc.num_threads() - elif proc.num_threads() > 1: - tprocs = [psutil.Process(thr.id) for thr in proc.threads()] - alive_tprocs = [tproc for tproc in tprocs if tproc.status() == psutil.STATUS_RUNNING] - num_threads = len(alive_tprocs) - else: - num_threads = 1 - - # Try-block for errors - try: - child_threads = 0 - # Iterate through child processes and get number of their threads - for child in proc.children(recursive=True): - # Leaf process - if len(child.children()) == 0: - # If process is running, get its number of threads - if child.status() == psutil.STATUS_RUNNING: - child_thr = child.num_threads() - # If its not necessarily running, but still multi-threaded - elif child.num_threads() > 1: - # Cast each thread as a process and check for only running - tprocs = [psutil.Process(thr.id) for thr in child.threads()] - alive_tprocs = [tproc for tproc in tprocs if tproc.status() == psutil.STATUS_RUNNING] - child_thr = len(alive_tprocs) - # Otherwise, no threads are running - else: - child_thr = 0 - # Increment child threads - child_threads += child_thr - # Catch any NoSuchProcess errors - except psutil.NoSuchProcess: - pass - - # Number of threads is max between found active children and parent - num_threads = max(child_threads, num_threads) - - # Return number of threads found - return num_threads - - -# Get ram usage of process -def _get_ram_mb(pid, pyfunc=False): - """Function to get the RAM usage of a process and its children - - Parameters - ---------- - pid : integer - the PID of the process to get RAM usage of - pyfunc : boolean (optional); default=False - a flag to indicate if the process is a python function; - when Pythons are multithreaded via multiprocess or threading, - children functions include their own memory + parents. if this - is set, the parent memory will removed from children memories - - Reference: http://ftp.dev411.com/t/python/python-list/095thexx8g/multiprocessing-forking-memory-usage - - Returns - ------- - mem_mb : float - the memory RAM in MB utilized by the process PID - """ - - # Import packages - import psutil - - # Init variables - _MB = 1024.0**2 - - # Try block to protect against any dying processes in the interim - try: - # Init parent - parent = psutil.Process(pid) - # Get memory of parent - parent_mem = parent.memory_info().rss - mem_mb = parent_mem/_MB - - # Iterate through child processes - for child in parent.children(recursive=True): - child_mem = child.memory_info().rss - if pyfunc: - child_mem -= parent_mem - mem_mb += child_mem/_MB - - # Catch if process dies, return gracefully - except psutil.NoSuchProcess: - pass - - # Return memory - return mem_mb - - def _canonicalize_env(env): """Windows requires that environment be dicts with bytes as keys and values This function converts any unicode entries for Windows only, returning the @@ -1411,54 +1289,19 @@ def _canonicalize_env(env): return out_env -# Get max resources used for process -def get_max_resources_used(pid, mem_mb, num_threads, pyfunc=False): - """Function to get the RAM and threads usage of a process - - Parameters - ---------- - pid : integer - the process ID of process to profile - mem_mb : float - the high memory watermark so far during process execution (in MB) - num_threads: int - the high thread watermark so far during process execution - - Returns - ------- - mem_mb : float - the new high memory watermark of process (MB) - num_threads : float - the new high thread watermark of process - """ - - # Import packages - import psutil - - try: - mem_mb = max(mem_mb, _get_ram_mb(pid, pyfunc=pyfunc)) - num_threads = max(num_threads, _get_num_threads(psutil.Process(pid))) - except Exception as exc: - iflogger.info('Could not get resources used by process. Error: %s'\ - % exc) - - # Return resources - return mem_mb, num_threads - - def run_command(runtime, output=None, timeout=0.01, redirect_x=False): """Run a command, read stdout and stderr, prefix with timestamp. The returned runtime contains a merged stdout+stderr log with timestamps """ - - # Init logger - logger = logging.getLogger('workflow') + # Check profiling + from ..utils.profiler import get_max_resources_used, runtime_profile # Init variables PIPE = subprocess.PIPE cmdline = runtime.cmdline + if redirect_x: exist_xvfb, _ = _exists_in_path('xvfb-run', runtime.environ) if not exist_xvfb: diff --git a/nipype/interfaces/utility/wrappers.py b/nipype/interfaces/utility/wrappers.py index 4de11d7ea8..87332c633b 100644 --- a/nipype/interfaces/utility/wrappers.py +++ b/nipype/interfaces/utility/wrappers.py @@ -20,21 +20,13 @@ from builtins import str, bytes from ... import logging -from ..base import (traits, DynamicTraitedSpec, Undefined, isdefined, runtime_profile, - BaseInterfaceInputSpec, get_max_resources_used) +from ..base import (traits, DynamicTraitedSpec, Undefined, isdefined, + BaseInterfaceInputSpec) from ..io import IOBase, add_traits from ...utils.filemanip import filename_to_list from ...utils.misc import getsource, create_function_from_source logger = logging.getLogger('interface') -if runtime_profile: - try: - import psutil - except ImportError as exc: - logger.info('Unable to import packages needed for runtime profiling. '\ - 'Turning off runtime profiler. Reason: %s' % exc) - runtime_profile = False - class FunctionInputSpec(DynamicTraitedSpec, BaseInterfaceInputSpec): function_str = traits.Str(mandatory=True, desc='code for function') @@ -137,8 +129,8 @@ def _add_output_traits(self, base): return base def _run_interface(self, runtime): - # Get workflow logger for runtime profile error reporting - logger = logging.getLogger('workflow') + # Check profiling + from ..utils.profiler import runtime_profile # Create function handle function_handle = create_function_from_source(self.inputs.function_str, @@ -163,6 +155,7 @@ def _function_handle_wrapper(queue, **kwargs): # Profile resources if set if runtime_profile: import multiprocessing + from ..utils.profiler import get_max_resources_used # Init communication queue and proc objs queue = multiprocessing.Queue() proc = multiprocessing.Process(target=_function_handle_wrapper, diff --git a/nipype/pipeline/engine/nodes.py b/nipype/pipeline/engine/nodes.py index 622003f8a2..65f69093ef 100644 --- a/nipype/pipeline/engine/nodes.py +++ b/nipype/pipeline/engine/nodes.py @@ -46,8 +46,7 @@ from ...interfaces.base import (traits, InputMultiPath, CommandLine, Undefined, TraitedSpec, DynamicTraitedSpec, Bunch, InterfaceResult, md5, Interface, - TraitDictObject, TraitListObject, isdefined, - runtime_profile) + TraitDictObject, TraitListObject, isdefined) from .utils import (generate_expanded_graph, modify_paths, export_graph, make_output_dir, write_workflow_prov, clean_working_directory, format_dot, topological_sort, @@ -690,6 +689,7 @@ def update(self, **opts): self.inputs.update(**opts) def write_report(self, report_type=None, cwd=None): + from ...utils.profiler import runtime_profile if not str2bool(self.config['execution']['create_report']): return report_dir = op.join(cwd, '_report') diff --git a/nipype/utils/config.py b/nipype/utils/config.py index ebea9e5816..c749a5480f 100644 --- a/nipype/utils/config.py +++ b/nipype/utils/config.py @@ -34,7 +34,7 @@ default_cfg = """ [logging] workflow_level = INFO -filemanip_level = INFO +utils_level = INFO interface_level = INFO log_to_file = false log_directory = %s diff --git a/nipype/utils/filemanip.py b/nipype/utils/filemanip.py index 59b269e943..e321a597a6 100644 --- a/nipype/utils/filemanip.py +++ b/nipype/utils/filemanip.py @@ -27,7 +27,7 @@ from .misc import is_container from ..interfaces.traits_extension import isdefined -fmlogger = logging.getLogger("filemanip") +fmlogger = logging.getLogger('utils') related_filetype_sets = [ diff --git a/nipype/utils/logger.py b/nipype/utils/logger.py index b30b50bc72..73088a2fcf 100644 --- a/nipype/utils/logger.py +++ b/nipype/utils/logger.py @@ -33,11 +33,11 @@ def __init__(self, config): stream=sys.stdout) # logging.basicConfig(stream=sys.stdout) self._logger = logging.getLogger('workflow') - self._fmlogger = logging.getLogger('filemanip') + self._utlogger = logging.getLogger('utils') self._iflogger = logging.getLogger('interface') self.loggers = {'workflow': self._logger, - 'filemanip': self._fmlogger, + 'utils': self._utlogger, 'interface': self._iflogger} self._hdlr = None self.update_logging(self._config) @@ -53,14 +53,14 @@ def enable_file_logging(self): formatter = logging.Formatter(fmt=self.fmt, datefmt=self.datefmt) hdlr.setFormatter(formatter) self._logger.addHandler(hdlr) - self._fmlogger.addHandler(hdlr) + self._utlogger.addHandler(hdlr) self._iflogger.addHandler(hdlr) self._hdlr = hdlr def disable_file_logging(self): if self._hdlr: self._logger.removeHandler(self._hdlr) - self._fmlogger.removeHandler(self._hdlr) + self._utlogger.removeHandler(self._hdlr) self._iflogger.removeHandler(self._hdlr) self._hdlr = None @@ -69,8 +69,8 @@ def update_logging(self, config): self.disable_file_logging() self._logger.setLevel(logging.getLevelName(config.get('logging', 'workflow_level'))) - self._fmlogger.setLevel(logging.getLevelName(config.get('logging', - 'filemanip_level'))) + self._utlogger.setLevel(logging.getLevelName(config.get('logging', + 'utils_level'))) self._iflogger.setLevel(logging.getLevelName(config.get('logging', 'interface_level'))) if str2bool(config.get('logging', 'log_to_file')): diff --git a/nipype/utils/profiler.py b/nipype/utils/profiler.py new file mode 100644 index 0000000000..bf6f3d2daa --- /dev/null +++ b/nipype/utils/profiler.py @@ -0,0 +1,164 @@ +# -*- coding: utf-8 -*- +# @Author: oesteban +# @Date: 2017-09-21 15:50:37 +# @Last Modified by: oesteban +# @Last Modified time: 2017-09-21 16:43:42 + +try: + import psutil +except ImportError as exc: + psutil = None + +from .. import config, logging +from .misc import str2bool + +proflogger = logging.getLogger('utils') + +runtime_profile = str2bool(config.get('execution', 'profile_runtime')) +if runtime_profile and psutil is None: + proflogger.warn('Switching "profile_runtime" off: the option was on, but the ' + 'necessary package "psutil" could not be imported.') + runtime_profile = False + + +# Get max resources used for process +def get_max_resources_used(pid, mem_mb, num_threads, pyfunc=False): + """ + Function to get the RAM and threads utilized by a given process + + Parameters + ---------- + pid : integer + the process ID of process to profile + mem_mb : float + the high memory watermark so far during process execution (in MB) + num_threads: int + the high thread watermark so far during process execution + + Returns + ------- + mem_mb : float + the new high memory watermark of process (MB) + num_threads : float + the new high thread watermark of process + """ + + try: + mem_mb = max(mem_mb, _get_ram_mb(pid, pyfunc=pyfunc)) + num_threads = max(num_threads, _get_num_threads(psutil.Process(pid))) + except Exception as exc: + proflogger = logging.getLogger('profiler') + proflogger.info('Could not get resources used by process. Error: %s', exc) + + return mem_mb, num_threads + + +# Get number of threads for process +def _get_num_threads(proc): + """ + Function to get the number of threads a process is using + + Parameters + ---------- + proc : psutil.Process instance + the process to evaluate thead usage of + + Returns + ------- + num_threads : int + the number of threads that the process is using + + """ + + # If process is running + if proc.status() == psutil.STATUS_RUNNING: + num_threads = proc.num_threads() + elif proc.num_threads() > 1: + tprocs = [psutil.Process(thr.id) for thr in proc.threads()] + alive_tprocs = [tproc for tproc in tprocs if tproc.status() == psutil.STATUS_RUNNING] + num_threads = len(alive_tprocs) + else: + num_threads = 1 + + # Try-block for errors + try: + child_threads = 0 + # Iterate through child processes and get number of their threads + for child in proc.children(recursive=True): + # Leaf process + if len(child.children()) == 0: + # If process is running, get its number of threads + if child.status() == psutil.STATUS_RUNNING: + child_thr = child.num_threads() + # If its not necessarily running, but still multi-threaded + elif child.num_threads() > 1: + # Cast each thread as a process and check for only running + tprocs = [psutil.Process(thr.id) for thr in child.threads()] + alive_tprocs = [tproc for tproc in tprocs + if tproc.status() == psutil.STATUS_RUNNING] + child_thr = len(alive_tprocs) + # Otherwise, no threads are running + else: + child_thr = 0 + # Increment child threads + child_threads += child_thr + # Catch any NoSuchProcess errors + except psutil.NoSuchProcess: + pass + + # Number of threads is max between found active children and parent + num_threads = max(child_threads, num_threads) + + # Return number of threads found + return num_threads + + +# Get ram usage of process +def _get_ram_mb(pid, pyfunc=False): + """ + Function to get the RAM usage of a process and its children + Reference: http://ftp.dev411.com/t/python/python-list/095thexx8g/\ +multiprocessing-forking-memory-usage + + Parameters + ---------- + pid : integer + the PID of the process to get RAM usage of + pyfunc : boolean (optional); default=False + a flag to indicate if the process is a python function; + when Pythons are multithreaded via multiprocess or threading, + children functions include their own memory + parents. if this + is set, the parent memory will removed from children memories + + + Returns + ------- + mem_mb : float + the memory RAM in MB utilized by the process PID + + """ + + # Init variables + _MB = 1024.0**2 + + # Try block to protect against any dying processes in the interim + try: + # Init parent + parent = psutil.Process(pid) + # Get memory of parent + parent_mem = parent.memory_info().rss + mem_mb = parent_mem / _MB + + # Iterate through child processes + for child in parent.children(recursive=True): + child_mem = child.memory_info().rss + if pyfunc: + child_mem -= parent_mem + mem_mb += child_mem / _MB + + # Catch if process dies, return gracefully + except psutil.NoSuchProcess: + pass + + # Return memory + return mem_mb From 32c2f39e86431331c54780455d0b09d139b45d32 Mon Sep 17 00:00:00 2001 From: oesteban Date: Thu, 21 Sep 2017 17:27:55 -0700 Subject: [PATCH 220/643] fix tests --- nipype/interfaces/tests/test_runtime_profiler.py | 9 +++------ nipype/interfaces/utility/wrappers.py | 2 +- nipype/utils/profiler.py | 6 +++++- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/nipype/interfaces/tests/test_runtime_profiler.py b/nipype/interfaces/tests/test_runtime_profiler.py index 400b2728ae..1e86d6a653 100644 --- a/nipype/interfaces/tests/test_runtime_profiler.py +++ b/nipype/interfaces/tests/test_runtime_profiler.py @@ -11,12 +11,9 @@ from builtins import open, str # Import packages -from nipype.interfaces.base import (traits, CommandLine, CommandLineInputSpec, - runtime_profile) import pytest -import sys - -run_profile = runtime_profile +from nipype.utils.profiler import runtime_profile as run_profile +from nipype.interfaces.base import (traits, CommandLine, CommandLineInputSpec) if run_profile: try: @@ -39,7 +36,7 @@ class UseResourcesInputSpec(CommandLineInputSpec): num_gb = traits.Float(desc='Number of GB of RAM to use', argstr='-g %f') num_threads = traits.Int(desc='Number of threads to use', - argstr='-p %d') + argstr='-p %d') # UseResources interface diff --git a/nipype/interfaces/utility/wrappers.py b/nipype/interfaces/utility/wrappers.py index 87332c633b..94f69e5bba 100644 --- a/nipype/interfaces/utility/wrappers.py +++ b/nipype/interfaces/utility/wrappers.py @@ -130,7 +130,7 @@ def _add_output_traits(self, base): def _run_interface(self, runtime): # Check profiling - from ..utils.profiler import runtime_profile + from ...utils.profiler import runtime_profile # Create function handle function_handle = create_function_from_source(self.inputs.function_str, diff --git a/nipype/utils/profiler.py b/nipype/utils/profiler.py index bf6f3d2daa..4bc3a1de22 100644 --- a/nipype/utils/profiler.py +++ b/nipype/utils/profiler.py @@ -2,7 +2,7 @@ # @Author: oesteban # @Date: 2017-09-21 15:50:37 # @Last Modified by: oesteban -# @Last Modified time: 2017-09-21 16:43:42 +# @Last Modified time: 2017-09-21 17:18:40 try: import psutil @@ -43,6 +43,10 @@ def get_max_resources_used(pid, mem_mb, num_threads, pyfunc=False): the new high thread watermark of process """ + if not runtime_profile: + raise RuntimeError('Attempted to measure resources with ' + '"profile_runtime" set off.') + try: mem_mb = max(mem_mb, _get_ram_mb(pid, pyfunc=pyfunc)) num_threads = max(num_threads, _get_num_threads(psutil.Process(pid))) From 0e2c5812f8630c2c3a99077796d1d1092e25b5b0 Mon Sep 17 00:00:00 2001 From: oesteban Date: Thu, 21 Sep 2017 17:35:56 -0700 Subject: [PATCH 221/643] Python 2 compatibility --- nipype/utils/profiler.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/nipype/utils/profiler.py b/nipype/utils/profiler.py index 4bc3a1de22..0973fc1bf8 100644 --- a/nipype/utils/profiler.py +++ b/nipype/utils/profiler.py @@ -2,7 +2,11 @@ # @Author: oesteban # @Date: 2017-09-21 15:50:37 # @Last Modified by: oesteban -# @Last Modified time: 2017-09-21 17:18:40 +# @Last Modified time: 2017-09-21 17:33:39 +""" +Utilities to keep track of performance +""" +from __future__ import print_function, division, unicode_literals, absolute_import try: import psutil From 5a8e7fe7230d9b5cfac68451643a9556f69331d9 Mon Sep 17 00:00:00 2001 From: oesteban Date: Thu, 21 Sep 2017 18:11:03 -0700 Subject: [PATCH 222/643] add nipype_mprof --- nipype/utils/profiler.py | 38 +++++++++++++++++++++++++++++++++----- setup.py | 1 + 2 files changed, 34 insertions(+), 5 deletions(-) diff --git a/nipype/utils/profiler.py b/nipype/utils/profiler.py index 0973fc1bf8..b1842a9c83 100644 --- a/nipype/utils/profiler.py +++ b/nipype/utils/profiler.py @@ -2,7 +2,7 @@ # @Author: oesteban # @Date: 2017-09-21 15:50:37 # @Last Modified by: oesteban -# @Last Modified time: 2017-09-21 17:33:39 +# @Last Modified time: 2017-09-21 18:03:32 """ Utilities to keep track of performance """ @@ -53,7 +53,7 @@ def get_max_resources_used(pid, mem_mb, num_threads, pyfunc=False): try: mem_mb = max(mem_mb, _get_ram_mb(pid, pyfunc=pyfunc)) - num_threads = max(num_threads, _get_num_threads(psutil.Process(pid))) + num_threads = max(num_threads, _get_num_threads(pid)) except Exception as exc: proflogger = logging.getLogger('profiler') proflogger.info('Could not get resources used by process. Error: %s', exc) @@ -62,14 +62,14 @@ def get_max_resources_used(pid, mem_mb, num_threads, pyfunc=False): # Get number of threads for process -def _get_num_threads(proc): +def _get_num_threads(pid): """ Function to get the number of threads a process is using Parameters ---------- - proc : psutil.Process instance - the process to evaluate thead usage of + pid : integer + the process ID of process to profile Returns ------- @@ -78,6 +78,7 @@ def _get_num_threads(proc): """ + proc = psutil.Process(pid) # If process is running if proc.status() == psutil.STATUS_RUNNING: num_threads = proc.num_threads() @@ -170,3 +171,30 @@ def _get_ram_mb(pid, pyfunc=False): # Return memory return mem_mb + + +def main(): + """ + A minimal entry point to measure any process using psutil + """ + import sys + wait = None + if len(sys.argv) > 2: + wait = float(sys.argv[2]) + + _probe_loop(int(sys.argv[1]), wait=wait) + + +def _probe_loop(pid, wait=None): + from time import sleep + + if wait is None: + wait = 5 + + while True: + print('mem=%f cpus=%d' % (_get_ram_mb(pid), _get_num_threads(pid))) + sleep(wait) + + +if __name__ == "__main__": + main() diff --git a/setup.py b/setup.py index 331fa5905b..3453901b3e 100755 --- a/setup.py +++ b/setup.py @@ -148,6 +148,7 @@ def main(): entry_points=''' [console_scripts] nipypecli=nipype.scripts.cli:cli + nipype_mprof=nipype.utils.profiler:main ''' ) From 6f574b02c37a80e3282ac02feaf8693c2c5785bd Mon Sep 17 00:00:00 2001 From: Dorota Jarecka Date: Sat, 26 Aug 2017 23:26:40 -0400 Subject: [PATCH 223/643] updating to networkx ver.2 (dev): removing all *_iter and adding list(*) in a few places (nodes_iter, in_edges_iter, etc., dont exist in ver 2, but nodes, in_edges, etc., are iterators); had to add .copy to .subgraph for ver 2 (otherwise its a view), but had to keep original code for ver 1 --- nipype/pipeline/engine/tests/test_engine.py | 4 +-- nipype/pipeline/engine/utils.py | 37 ++++++++++++--------- nipype/pipeline/engine/workflows.py | 28 ++++++++-------- 3 files changed, 38 insertions(+), 31 deletions(-) diff --git a/nipype/pipeline/engine/tests/test_engine.py b/nipype/pipeline/engine/tests/test_engine.py index cece44444b..90d566ddf9 100644 --- a/nipype/pipeline/engine/tests/test_engine.py +++ b/nipype/pipeline/engine/tests/test_engine.py @@ -316,7 +316,7 @@ def test_disconnect(): flow1 = pe.Workflow(name='test') flow1.connect(a, 'a', b, 'a') flow1.disconnect(a, 'a', b, 'a') - assert flow1._graph.edges() == [] + assert list(flow1._graph.edges()) == [] def test_doubleconnect(): @@ -637,7 +637,7 @@ def func1(in1): n1.inputs.in1 = [1] eg = w1.run() - node = eg.nodes()[0] + node = list(eg.nodes())[0] outjson = glob(os.path.join(node.output_dir(), '_0x*.json')) assert len(outjson) == 1 diff --git a/nipype/pipeline/engine/utils.py b/nipype/pipeline/engine/utils.py index 25b12ab607..20e82a6324 100644 --- a/nipype/pipeline/engine/utils.py +++ b/nipype/pipeline/engine/utils.py @@ -24,6 +24,7 @@ from functools import reduce import numpy as np from ...utils.misc import package_check +from distutils.version import LooseVersion package_check('networkx', '1.3') @@ -267,7 +268,7 @@ def _write_detailed_dot(graph, dotfilename): for n in nx.topological_sort(graph): nodename = str(n) inports = [] - for u, v, d in graph.in_edges_iter(nbunch=n, data=True): + for u, v, d in graph.in_edges(nbunch=n, data=True): for cd in d['connect']: if isinstance(cd[0], (str, bytes)): outport = cd[0] @@ -287,7 +288,7 @@ def _write_detailed_dot(graph, dotfilename): inputstr += '| %s' % (replacefunk(ip), ip) inputstr += '}' outports = [] - for u, v, d in graph.out_edges_iter(nbunch=n, data=True): + for u, v, d in graph.out_edges(nbunch=n, data=True): for cd in d['connect']: if isinstance(cd[0], (str, bytes)): outport = cd[0] @@ -446,7 +447,7 @@ def get_levels(G): levels = {} for n in nx.topological_sort(G): levels[n] = 0 - for pred in G.predecessors_iter(n): + for pred in G.predecessors(n): levels[n] = max(levels[n], levels[pred] + 1) return levels @@ -491,9 +492,9 @@ def _merge_graphs(supergraph, nodes, subgraph, nodeid, iterables, raise Exception(("Execution graph does not have a unique set of node " "names. Please rerun the workflow")) edgeinfo = {} - for n in subgraph.nodes(): + for n in list(subgraph.nodes()): nidx = ids.index(n._hierarchy + n._id) - for edge in supergraph.in_edges_iter(supernodes[nidx]): + for edge in supergraph.in_edges(list(supernodes)[nidx]): # make sure edge is not part of subgraph if edge[0] not in subgraph.nodes(): if n._hierarchy + n._id not in list(edgeinfo.keys()): @@ -514,7 +515,7 @@ def _merge_graphs(supergraph, nodes, subgraph, nodeid, iterables, Gc = deepcopy(subgraph) ids = [n._hierarchy + n._id for n in Gc.nodes()] nodeidx = ids.index(nodeid) - rootnode = Gc.nodes()[nodeidx] + rootnode = list(Gc.nodes())[nodeidx] paramstr = '' for key, val in sorted(params.items()): paramstr = '{}_{}_{}'.format( @@ -613,10 +614,10 @@ def _node_ports(graph, node): """ portinputs = {} portoutputs = {} - for u, _, d in graph.in_edges_iter(node, data=True): + for u, _, d in graph.in_edges(node, data=True): for src, dest in d['connect']: portinputs[dest] = (u, src) - for _, v, d in graph.out_edges_iter(node, data=True): + for _, v, d in graph.out_edges(node, data=True): for src, dest in d['connect']: if isinstance(src, tuple): srcport = src[0] @@ -682,7 +683,7 @@ def generate_expanded_graph(graph_in): logger.debug("PE: expanding iterables") graph_in = _remove_nonjoin_identity_nodes(graph_in, keep_iterables=True) # standardize the iterables as {(field, function)} dictionaries - for node in graph_in.nodes_iter(): + for node in graph_in.nodes(): if node.iterables: _standardize_iterables(node) allprefixes = list('abcdefghijklmnopqrstuvwxyz') @@ -697,7 +698,7 @@ def generate_expanded_graph(graph_in): logger.debug("Expanding the iterable node %s..." % inode) # the join successor nodes of the current iterable node - jnodes = [node for node in graph_in.nodes_iter() + jnodes = [node for node in graph_in.nodes() if hasattr(node, 'joinsource') and inode.name == node.joinsource and nx.has_path(graph_in, inode, node)] @@ -709,7 +710,7 @@ def generate_expanded_graph(graph_in): for jnode in jnodes: in_edges = jedge_dict[jnode] = {} edges2remove = [] - for src, dest, data in graph_in.in_edges_iter(jnode, True): + for src, dest, data in graph_in.in_edges(jnode, True): in_edges[src.itername] = data edges2remove.append((src, dest)) @@ -726,7 +727,7 @@ def generate_expanded_graph(graph_in): src_fields = [src_fields] # find the unique iterable source node in the graph try: - iter_src = next((node for node in graph_in.nodes_iter() + iter_src = next((node for node in graph_in.nodes() if node.name == src_name and nx.has_path(graph_in, node, inode))) except StopIteration: @@ -781,7 +782,11 @@ def make_field_func(*pair): inode._id += ('.' + iterable_prefix + 'I') # merge the iterated subgraphs - subgraph = graph_in.subgraph(subnodes) + # dj: the behaviour of .copy changes in version 2 + if LooseVersion(nx.__version__) < LooseVersion('2'): + subgraph = graph_in.subgraph(subnodes) + else: + subgraph = graph_in.subgraph(subnodes).copy() graph_in = _merge_graphs(graph_in, subnodes, subgraph, inode._hierarchy + inode._id, iterables, iterable_prefix, inode.synchronize) @@ -793,7 +798,7 @@ def make_field_func(*pair): old_edge_dict = jedge_dict[jnode] # the edge source node replicates expansions = defaultdict(list) - for node in graph_in.nodes_iter(): + for node in graph_in.nodes(): for src_id, edge_data in list(old_edge_dict.items()): if node.itername.startswith(src_id): expansions[src_id].append(node) @@ -1283,7 +1288,7 @@ def write_workflow_prov(graph, filename=None, format='all'): # add dependencies (edges) # Process->Process - for idx, edgeinfo in enumerate(graph.in_edges_iter()): + for idx, edgeinfo in enumerate(graph.in_edges()): ps.g.wasStartedBy(processes[nodes.index(edgeinfo[1])], starter=processes[nodes.index(edgeinfo[0])]) @@ -1295,7 +1300,7 @@ def write_workflow_prov(graph, filename=None, format='all'): def topological_sort(graph, depth_first=False): """Returns a depth first sorted order if depth_first is True """ - nodesort = nx.topological_sort(graph) + nodesort = list(nx.topological_sort(graph)) if not depth_first: return nodesort, None logger.debug("Performing depth first search") diff --git a/nipype/pipeline/engine/workflows.py b/nipype/pipeline/engine/workflows.py index e1535b4cf9..392be85aa3 100644 --- a/nipype/pipeline/engine/workflows.py +++ b/nipype/pipeline/engine/workflows.py @@ -185,7 +185,7 @@ def connect(self, *args, **kwargs): # check to see which ports of destnode are already # connected. if not disconnect and (destnode in self._graph.nodes()): - for edge in self._graph.in_edges_iter(destnode): + for edge in self._graph.in_edges(destnode): data = self._graph.get_edge_data(*edge) for sourceinfo, destname in data['connect']: if destname not in connected_ports[destnode]: @@ -506,8 +506,8 @@ def export(self, filename=None, prefix="output", format="python", else: lines.append(line) # write connections - for u, _, d in flatgraph.in_edges_iter(nbunch=node, - data=True): + for u, _, d in flatgraph.in_edges(nbunch=node, + data=True): for cd in d['connect']: if isinstance(cd[0], tuple): args = list(cd[0]) @@ -633,7 +633,7 @@ def _write_report_info(self, workingdir, name, graph): total=N, name='Group_%05d' % gid)) json_dict['maxN'] = maxN - for u, v in graph.in_edges_iter(): + for u, v in graph.in_edges(): json_dict['links'].append(dict(source=nodes.index(u), target=nodes.index(v), value=1)) @@ -654,7 +654,7 @@ def getname(u, i): json_dict = [] for i, node in enumerate(nodes): imports = [] - for u, v in graph.in_edges_iter(nbunch=node): + for u, v in graph.in_edges(nbunch=node): imports.append(getname(u, nodes.index(u))) json_dict.append(dict(name=getname(node, i), size=1, @@ -669,7 +669,7 @@ def _set_needed_outputs(self, graph): return for node in graph.nodes(): node.needed_outputs = [] - for edge in graph.out_edges_iter(node): + for edge in graph.out_edges(node): data = graph.get_edge_data(*edge) sourceinfo = [v1[0] if isinstance(v1, tuple) else v1 for v1, v2 in data['connect']] @@ -683,7 +683,7 @@ def _configure_exec_nodes(self, graph): """ for node in graph.nodes(): node.input_source = {} - for edge in graph.in_edges_iter(node): + for edge in graph.in_edges(node): data = graph.get_edge_data(*edge) for sourceinfo, field in data['connect']: node.input_source[field] = \ @@ -758,8 +758,8 @@ def _get_inputs(self): setattr(inputdict, node.name, node.inputs) else: taken_inputs = [] - for _, _, d in self._graph.in_edges_iter(nbunch=node, - data=True): + for _, _, d in self._graph.in_edges(nbunch=node, + data=True): for cd in d['connect']: taken_inputs.append(cd[1]) unconnectedinputs = TraitedSpec() @@ -864,7 +864,8 @@ def _generate_flatgraph(self): # use in_edges instead of in_edges_iter to allow # disconnections to take place properly. otherwise, the # edge dict is modified. - for u, _, d in self._graph.in_edges(nbunch=node, data=True): + # dj: added list() for networkx ver.2 + for u, _, d in list(self._graph.in_edges(nbunch=node, data=True)): logger.debug('in: connections-> %s', to_str(d['connect'])) for cd in deepcopy(d['connect']): logger.debug("in: %s", to_str(cd)) @@ -877,7 +878,8 @@ def _generate_flatgraph(self): self.disconnect(u, cd[0], node, cd[1]) self.connect(srcnode, srcout, dstnode, dstin) # do not use out_edges_iter for reasons stated in in_edges - for _, v, d in self._graph.out_edges(nbunch=node, data=True): + # dj: for ver 2 use list(out_edges) + for _, v, d in list(self._graph.out_edges(nbunch=node, data=True)): logger.debug('out: connections-> %s', to_str(d['connect'])) for cd in deepcopy(d['connect']): logger.debug("out: %s", to_str(cd)) @@ -965,7 +967,7 @@ def _get_dot(self, prefix=None, hierarchy=None, colored=False, simple_form=simple_form, level=level + 3)) dotlist.append('}') else: - for subnode in self._graph.successors_iter(node): + for subnode in self._graph.successors(node): if node._hierarchy != subnode._hierarchy: continue if not isinstance(subnode, Workflow): @@ -980,7 +982,7 @@ def _get_dot(self, prefix=None, hierarchy=None, colored=False, subnodename)) logger.debug('connection: %s', dotlist[-1]) # add between workflow connections - for u, v, d in self._graph.edges_iter(data=True): + for u, v, d in self._graph.edges(data=True): uname = '.'.join(hierarchy + [u.fullname]) vname = '.'.join(hierarchy + [v.fullname]) for src, dest in d['connect']: From 1c16fca4804bdadc6e27ec4c905d745848adf5f5 Mon Sep 17 00:00:00 2001 From: Dorota Jarecka Date: Sun, 27 Aug 2017 12:08:34 -0400 Subject: [PATCH 224/643] updating to networkx ver.2 (dev): add_edge doesnt have attr_dict anymore (so changed to **dict); some updates related to changes in .nodes method (its not a list anymore) --- nipype/pipeline/engine/utils.py | 6 +++--- nipype/pipeline/plugins/tests/test_linear.py | 2 +- nipype/pipeline/plugins/tests/test_multiproc.py | 2 +- nipype/pipeline/plugins/tests/test_multiproc_nondaemon.py | 2 +- nipype/pipeline/plugins/tests/test_oar.py | 2 +- nipype/pipeline/plugins/tests/test_pbs.py | 2 +- nipype/pipeline/plugins/tests/test_somaflow.py | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/nipype/pipeline/engine/utils.py b/nipype/pipeline/engine/utils.py index 20e82a6324..5a7eda2d68 100644 --- a/nipype/pipeline/engine/utils.py +++ b/nipype/pipeline/engine/utils.py @@ -847,7 +847,7 @@ def make_field_func(*pair): logger.debug("Qualified the %s -> %s join field" " %s as %s." % (in_node, jnode, dest_field, slot_field)) - graph_in.add_edge(in_node, jnode, newdata) + graph_in.add_edge(in_node, jnode, **newdata) logger.debug("Connected the join node %s subgraph to the" " expanded join point %s" % (jnode, in_node)) @@ -1289,8 +1289,8 @@ def write_workflow_prov(graph, filename=None, format='all'): # add dependencies (edges) # Process->Process for idx, edgeinfo in enumerate(graph.in_edges()): - ps.g.wasStartedBy(processes[nodes.index(edgeinfo[1])], - starter=processes[nodes.index(edgeinfo[0])]) + ps.g.wasStartedBy(processes[list(nodes).index(edgeinfo[1])], + starter=processes[list(nodes).index(edgeinfo[0])]) # write provenance ps.write_provenance(filename, format=format) diff --git a/nipype/pipeline/plugins/tests/test_linear.py b/nipype/pipeline/plugins/tests/test_linear.py index e4df3f7db3..2e2fead4eb 100644 --- a/nipype/pipeline/plugins/tests/test_linear.py +++ b/nipype/pipeline/plugins/tests/test_linear.py @@ -41,6 +41,6 @@ def test_run_in_series(tmpdir): mod1.inputs.input1 = 1 execgraph = pipe.run(plugin="Linear") names = ['.'.join((node._hierarchy, node.name)) for node in execgraph.nodes()] - node = execgraph.nodes()[names.index('pipe.mod1')] + node = list(execgraph.nodes())[names.index('pipe.mod1')] result = node.get_output('output1') assert result == [1, 1] diff --git a/nipype/pipeline/plugins/tests/test_multiproc.py b/nipype/pipeline/plugins/tests/test_multiproc.py index 20ea72a929..6dab555a11 100644 --- a/nipype/pipeline/plugins/tests/test_multiproc.py +++ b/nipype/pipeline/plugins/tests/test_multiproc.py @@ -46,7 +46,7 @@ def test_run_multiproc(tmpdir): pipe.config['execution']['poll_sleep_duration'] = 2 execgraph = pipe.run(plugin="MultiProc") names = ['.'.join((node._hierarchy, node.name)) for node in execgraph.nodes()] - node = execgraph.nodes()[names.index('pipe.mod1')] + node = list(execgraph.nodes())[names.index('pipe.mod1')] result = node.get_output('output1') assert result == [1, 1] diff --git a/nipype/pipeline/plugins/tests/test_multiproc_nondaemon.py b/nipype/pipeline/plugins/tests/test_multiproc_nondaemon.py index f8dd22ed66..7112aa2448 100644 --- a/nipype/pipeline/plugins/tests/test_multiproc_nondaemon.py +++ b/nipype/pipeline/plugins/tests/test_multiproc_nondaemon.py @@ -123,7 +123,7 @@ def run_multiproc_nondaemon_with_flag(nondaemon_flag): 'non_daemon': nondaemon_flag}) names = ['.'.join((node._hierarchy, node.name)) for node in execgraph.nodes()] - node = execgraph.nodes()[names.index('pipe.f2')] + node = list(execgraph.nodes())[names.index('pipe.f2')] result = node.get_output('sum_out') os.chdir(cur_dir) rmtree(temp_dir) diff --git a/nipype/pipeline/plugins/tests/test_oar.py b/nipype/pipeline/plugins/tests/test_oar.py index 68dc98c344..181aff0f6f 100644 --- a/nipype/pipeline/plugins/tests/test_oar.py +++ b/nipype/pipeline/plugins/tests/test_oar.py @@ -50,7 +50,7 @@ def test_run_oar(): '.'.join((node._hierarchy, node.name)) for node in execgraph.nodes() ] - node = execgraph.nodes()[names.index('pipe.mod1')] + node = list(execgraph.nodes())[names.index('pipe.mod1')] result = node.get_output('output1') assert result == [1, 1] os.chdir(cur_dir) diff --git a/nipype/pipeline/plugins/tests/test_pbs.py b/nipype/pipeline/plugins/tests/test_pbs.py index d7b5a83528..719ffbfc72 100644 --- a/nipype/pipeline/plugins/tests/test_pbs.py +++ b/nipype/pipeline/plugins/tests/test_pbs.py @@ -48,7 +48,7 @@ def test_run_pbsgraph(): mod1.inputs.input1 = 1 execgraph = pipe.run(plugin="PBSGraph") names = ['.'.join((node._hierarchy, node.name)) for node in execgraph.nodes()] - node = execgraph.nodes()[names.index('pipe.mod1')] + node = list(execgraph.nodes())[names.index('pipe.mod1')] result = node.get_output('output1') assert result == [1, 1] os.chdir(cur_dir) diff --git a/nipype/pipeline/plugins/tests/test_somaflow.py b/nipype/pipeline/plugins/tests/test_somaflow.py index f8309bf826..f2d5c945fb 100644 --- a/nipype/pipeline/plugins/tests/test_somaflow.py +++ b/nipype/pipeline/plugins/tests/test_somaflow.py @@ -46,6 +46,6 @@ def test_run_somaflow(tmpdir): mod1.inputs.input1 = 1 execgraph = pipe.run(plugin="SomaFlow") names = ['.'.join((node._hierarchy, node.name)) for node in execgraph.nodes()] - node = execgraph.nodes()[names.index('pipe.mod1')] + node = list(execgraph.nodes())[names.index('pipe.mod1')] result = node.get_output('output1') assert result == [1, 1] From bff81b2167a4f2ec7700367588cac66e3d4ecf24 Mon Sep 17 00:00:00 2001 From: Dorota Jarecka Date: Sun, 27 Aug 2017 12:44:11 -0400 Subject: [PATCH 225/643] updating to networkx ver.2 (dev): updating interfaces/cmtk - they have no tests, so no idea if changes work --- nipype/interfaces/cmtk/cmtk.py | 12 ++++---- nipype/interfaces/cmtk/nbs.py | 6 ++-- nipype/interfaces/cmtk/nx.py | 38 +++++++++++++------------- nipype/interfaces/cmtk/parcellation.py | 4 +-- 4 files changed, 30 insertions(+), 30 deletions(-) diff --git a/nipype/interfaces/cmtk/cmtk.py b/nipype/interfaces/cmtk/cmtk.py index 7d65af99a7..1ad0db399f 100644 --- a/nipype/interfaces/cmtk/cmtk.py +++ b/nipype/interfaces/cmtk/cmtk.py @@ -214,16 +214,16 @@ def cmat(track_file, roi_file, resolution_network_file, matrix_name, matrix_mat_ nROIs = len(gp.nodes()) # add node information from parcellation - if 'dn_position' in gp.node[gp.nodes()[0]]: + if 'dn_position' in gp.nodes[list(gp.nodes())[0]]: G = gp.copy() else: G = nx.Graph() - for u, d in gp.nodes_iter(data=True): + for u, d in gp.nodes(data=True): G.add_node(int(u), d) # compute a position for the node based on the mean position of the # ROI in voxel coordinates (segmentation volume ) xyz = tuple(np.mean(np.where(np.flipud(roiData) == int(d["dn_correspondence_id"])), axis=1)) - G.node[int(u)]['dn_position'] = tuple([xyz[0], xyz[2], -xyz[1]]) + G.nodes[int(u)]['dn_position'] = tuple([xyz[0], xyz[2], -xyz[1]]) if intersections: iflogger.info("Filtering tractography from intersections") @@ -304,7 +304,7 @@ def cmat(track_file, roi_file, resolution_network_file, matrix_name, matrix_mat_ fibmean = numfib.copy() fibmedian = numfib.copy() fibdev = numfib.copy() - for u, v, d in G.edges_iter(data=True): + for u, v, d in G.edges(data=True): G.remove_edge(u, v) di = {} if 'fiblist' in d: @@ -747,10 +747,10 @@ def create_nodes(roi_file, resolution_network_file, out_filename): roi_image = nb.load(roi_file, mmap=NUMPY_MMAP) roiData = roi_image.get_data() nROIs = len(gp.nodes()) - for u, d in gp.nodes_iter(data=True): + for u, d in gp.nodes(data=True): G.add_node(int(u), d) xyz = tuple(np.mean(np.where(np.flipud(roiData) == int(d["dn_correspondence_id"])), axis=1)) - G.node[int(u)]['dn_position'] = tuple([xyz[0], xyz[2], -xyz[1]]) + G.nodes[int(u)]['dn_position'] = tuple([xyz[0], xyz[2], -xyz[1]]) nx.write_gpickle(G, out_filename) return out_filename diff --git a/nipype/interfaces/cmtk/nbs.py b/nipype/interfaces/cmtk/nbs.py index fd4ff0e050..3754484677 100644 --- a/nipype/interfaces/cmtk/nbs.py +++ b/nipype/interfaces/cmtk/nbs.py @@ -113,9 +113,9 @@ def _run_interface(self, runtime): node_network = nx.read_gpickle(node_ntwk_name) iflogger.info('Populating node dictionaries with attributes from {node}'.format(node=node_ntwk_name)) - for nid, ndata in node_network.nodes_iter(data=True): - nbsgraph.node[nid] = ndata - nbs_pval_graph.node[nid] = ndata + for nid, ndata in node_network.nodes(data=True): + nbsgraph.nodes[nid] = ndata + nbs_pval_graph.nodes[nid] = ndata path = op.abspath('NBS_Result_' + details) iflogger.info(path) diff --git a/nipype/interfaces/cmtk/nx.py b/nipype/interfaces/cmtk/nx.py index 48763256f7..53f8704bd8 100644 --- a/nipype/interfaces/cmtk/nx.py +++ b/nipype/interfaces/cmtk/nx.py @@ -48,7 +48,7 @@ def read_unknown_ntwk(ntwk): def remove_all_edges(ntwk): ntwktmp = ntwk.copy() - edges = ntwktmp.edges_iter() + edges = list(ntwktmp.edges()) for edge in edges: ntwk.remove_edge(edge[0], edge[1]) return ntwk @@ -60,16 +60,16 @@ def fix_keys_for_gexf(orig): """ import networkx as nx ntwk = nx.Graph() - nodes = orig.nodes_iter() - edges = orig.edges_iter() + nodes = list(orig.nodes()) + edges = list(orig.edges()) for node in nodes: newnodedata = {} - newnodedata.update(orig.node[node]) - if 'dn_fsname' in orig.node[node]: - newnodedata['label'] = orig.node[node]['dn_fsname'] + newnodedata.update(orig.nodes[node]) + if 'dn_fsname' in orig.nodes[node]: + newnodedata['label'] = orig.nodes[node]['dn_fsname'] ntwk.add_node(str(node), newnodedata) - if 'dn_position' in ntwk.node[str(node)] and 'dn_position' in newnodedata: - ntwk.node[str(node)]['dn_position'] = str(newnodedata['dn_position']) + if 'dn_position' in ntwk.nodes[str(node)] and 'dn_position' in newnodedata: + ntwk.nodes[str(node)]['dn_position'] = str(newnodedata['dn_position']) for edge in edges: data = {} data = orig.edge[edge[0]][edge[1]] @@ -125,7 +125,7 @@ def average_networks(in_files, ntwk_res_file, group_id): tmp = nx.read_gpickle(subject) iflogger.info(('File {s} has {n} ' 'edges').format(s=subject, n=tmp.number_of_edges())) - edges = tmp.edges_iter() + edges = list(tmp.edges()) for edge in edges: data = {} data = tmp.edge[edge[0]][edge[1]] @@ -135,27 +135,27 @@ def average_networks(in_files, ntwk_res_file, group_id): current = ntwk.edge[edge[0]][edge[1]] data = add_dicts_by_key(current, data) ntwk.add_edge(edge[0], edge[1], data) - nodes = tmp.nodes_iter() + nodes = list(nodes()) for node in nodes: data = {} - data = ntwk.node[node] - if 'value' in tmp.node[node]: - data['value'] = data['value'] + tmp.node[node]['value'] + data = ntwk.nodes[node] + if 'value' in tmp.nodes[node]: + data['value'] = data['value'] + tmp.nodes[node]['value'] ntwk.add_node(node, data) # Divides each value by the number of files - nodes = ntwk.nodes_iter() - edges = ntwk.edges_iter() + nodes = list(ntwk.nodes()) + edges = list(ntwk.edges()) iflogger.info(('Total network has {n} ' 'edges').format(n=ntwk.number_of_edges())) avg_ntwk = nx.Graph() newdata = {} for node in nodes: - data = ntwk.node[node] + data = ntwk.nodes[node] newdata = data if 'value' in data: newdata['value'] = data['value'] / len(in_files) - ntwk.node[node]['value'] = newdata + ntwk.nodes[node]['value'] = newdata avg_ntwk.add_node(node, newdata) edge_dict = {} @@ -173,7 +173,7 @@ def average_networks(in_files, ntwk_res_file, group_id): iflogger.info('After thresholding, the average network has has {n} edges'.format(n=avg_ntwk.number_of_edges())) - avg_edges = avg_ntwk.edges_iter() + avg_edges = avg_ntwk.edges() for edge in avg_edges: data = avg_ntwk.edge[edge[0]][edge[1]] for key in list(data.keys()): @@ -319,7 +319,7 @@ def compute_network_measures(ntwk): def add_node_data(node_array, ntwk): node_ntwk = nx.Graph() newdata = {} - for idx, data in ntwk.nodes_iter(data=True): + for idx, data in ntwk.nodes(data=True): if not int(idx) == 0: newdata['value'] = node_array[int(idx) - 1] data.update(newdata) diff --git a/nipype/interfaces/cmtk/parcellation.py b/nipype/interfaces/cmtk/parcellation.py index 5a510bcdf7..7a2340cb4d 100644 --- a/nipype/interfaces/cmtk/parcellation.py +++ b/nipype/interfaces/cmtk/parcellation.py @@ -213,7 +213,7 @@ def create_roi(subject_id, subjects_dir, fs_dir, parcellation_name, dilation): rois = np.zeros((256, 256, 256), dtype=np.int16) count = 0 - for brk, brv in pg.nodes_iter(data=True): + for brk, brv in pg.nodes(data=True): count = count + 1 iflogger.info(brv) iflogger.info(brk) @@ -429,7 +429,7 @@ def create_wm_mask(subject_id, subjects_dir, fs_dir, parcellation_name): roid = roi.get_data() assert roid.shape[0] == wmmask.shape[0] pg = nx.read_graphml(pgpath) - for brk, brv in pg.nodes_iter(data=True): + for brk, brv in pg.nodes(data=True): if brv['dn_region'] == 'cortical': iflogger.info("Subtracting region %s with intensity value %s" % (brv['dn_region'], brv['dn_correspondence_id'])) From f799adf90a8d1596b8a5cb80c92f3a1f270d510b Mon Sep 17 00:00:00 2001 From: Dorota Jarecka Date: Sun, 27 Aug 2017 13:34:08 -0400 Subject: [PATCH 226/643] updating to networkx ver.2 (dev): more updates to interfaces/cmtk - they have no tests, so no idea if changes work --- nipype/interfaces/cmtk/cmtk.py | 6 +++--- nipype/interfaces/cmtk/nx.py | 16 ++++++++-------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/nipype/interfaces/cmtk/cmtk.py b/nipype/interfaces/cmtk/cmtk.py index 1ad0db399f..4eeec3e370 100644 --- a/nipype/interfaces/cmtk/cmtk.py +++ b/nipype/interfaces/cmtk/cmtk.py @@ -219,7 +219,7 @@ def cmat(track_file, roi_file, resolution_network_file, matrix_name, matrix_mat_ else: G = nx.Graph() for u, d in gp.nodes(data=True): - G.add_node(int(u), d) + G.add_node(int(u), **d) # compute a position for the node based on the mean position of the # ROI in voxel coordinates (segmentation volume ) xyz = tuple(np.mean(np.where(np.flipud(roiData) == int(d["dn_correspondence_id"])), axis=1)) @@ -319,7 +319,7 @@ def cmat(track_file, roi_file, resolution_network_file, matrix_name, matrix_mat_ di['fiber_length_median'] = 0 di['fiber_length_std'] = 0 if not u == v: # Fix for self loop problem - G.add_edge(u, v, di) + G.add_edge(u, v, **di) if 'fiblist' in d: numfib.add_edge(u, v, weight=di['number_of_fibers']) fibmean.add_edge(u, v, weight=di['fiber_length_mean']) @@ -748,7 +748,7 @@ def create_nodes(roi_file, resolution_network_file, out_filename): roiData = roi_image.get_data() nROIs = len(gp.nodes()) for u, d in gp.nodes(data=True): - G.add_node(int(u), d) + G.add_node(int(u), **d) xyz = tuple(np.mean(np.where(np.flipud(roiData) == int(d["dn_correspondence_id"])), axis=1)) G.nodes[int(u)]['dn_position'] = tuple([xyz[0], xyz[2], -xyz[1]]) nx.write_gpickle(G, out_filename) diff --git a/nipype/interfaces/cmtk/nx.py b/nipype/interfaces/cmtk/nx.py index 53f8704bd8..c2f6d7c361 100644 --- a/nipype/interfaces/cmtk/nx.py +++ b/nipype/interfaces/cmtk/nx.py @@ -67,13 +67,13 @@ def fix_keys_for_gexf(orig): newnodedata.update(orig.nodes[node]) if 'dn_fsname' in orig.nodes[node]: newnodedata['label'] = orig.nodes[node]['dn_fsname'] - ntwk.add_node(str(node), newnodedata) + ntwk.add_node(str(node), **newnodedata) if 'dn_position' in ntwk.nodes[str(node)] and 'dn_position' in newnodedata: ntwk.nodes[str(node)]['dn_position'] = str(newnodedata['dn_position']) for edge in edges: data = {} data = orig.edge[edge[0]][edge[1]] - ntwk.add_edge(str(edge[0]), str(edge[1]), data) + ntwk.add_edge(str(edge[0]), str(edge[1]), **data) if 'fiber_length_mean' in ntwk.edge[str(edge[0])][str(edge[1])]: ntwk.edge[str(edge[0])][str(edge[1])]['fiber_length_mean'] = str(data['fiber_length_mean']) if 'fiber_length_std' in ntwk.edge[str(edge[0])][str(edge[1])]: @@ -134,14 +134,14 @@ def average_networks(in_files, ntwk_res_file, group_id): current = {} current = ntwk.edge[edge[0]][edge[1]] data = add_dicts_by_key(current, data) - ntwk.add_edge(edge[0], edge[1], data) + ntwk.add_edge(edge[0], edge[1], **data) nodes = list(nodes()) for node in nodes: data = {} data = ntwk.nodes[node] if 'value' in tmp.nodes[node]: data['value'] = data['value'] + tmp.nodes[node]['value'] - ntwk.add_node(node, data) + ntwk.add_node(node, **data) # Divides each value by the number of files nodes = list(ntwk.nodes()) @@ -156,7 +156,7 @@ def average_networks(in_files, ntwk_res_file, group_id): if 'value' in data: newdata['value'] = data['value'] / len(in_files) ntwk.nodes[node]['value'] = newdata - avg_ntwk.add_node(node, newdata) + avg_ntwk.add_node(node, **newdata) edge_dict = {} edge_dict['count'] = np.zeros((avg_ntwk.number_of_nodes(), @@ -168,7 +168,7 @@ def average_networks(in_files, ntwk_res_file, group_id): if not key == 'count': data[key] = data[key] / len(in_files) ntwk.edge[edge[0]][edge[1]] = data - avg_ntwk.add_edge(edge[0], edge[1], data) + avg_ntwk.add_edge(edge[0], edge[1], **data) edge_dict['count'][edge[0] - 1][edge[1] - 1] = ntwk.edge[edge[0]][edge[1]]['count'] iflogger.info('After thresholding, the average network has has {n} edges'.format(n=avg_ntwk.number_of_edges())) @@ -323,7 +323,7 @@ def add_node_data(node_array, ntwk): if not int(idx) == 0: newdata['value'] = node_array[int(idx) - 1] data.update(newdata) - node_ntwk.add_node(int(idx), data) + node_ntwk.add_node(int(idx), **data) return node_ntwk @@ -339,7 +339,7 @@ def add_edge_data(edge_array, ntwk, above=0, below=0): old_edge_dict = edge_ntwk.edge[x + 1][y + 1] edge_ntwk.remove_edge(x + 1, y + 1) data.update(old_edge_dict) - edge_ntwk.add_edge(x + 1, y + 1, data) + edge_ntwk.add_edge(x + 1, y + 1, **data) return edge_ntwk From c052581ac3d4d9055567a2f7ffd874b5d39e3dcf Mon Sep 17 00:00:00 2001 From: Dorota Jarecka Date: Fri, 22 Sep 2017 12:11:27 -0400 Subject: [PATCH 227/643] changing pydotplus to pydot in the requirements --- doc/users/install.rst | 2 +- nipype/info.py | 4 ++-- requirements.txt | 2 +- rtd_requirements.txt | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/users/install.rst b/doc/users/install.rst index 2e38122c68..ce30c79267 100644 --- a/doc/users/install.rst +++ b/doc/users/install.rst @@ -47,7 +47,7 @@ use the following command:: While `all` installs everything, one can also install select components as listed below:: - 'doc': ['Sphinx>=1.4', 'matplotlib', 'pydotplus'], + 'doc': ['Sphinx>=1.4', 'matplotlib', 'pydot'], 'tests': ['pytest-cov', 'codecov'], 'nipy': ['nitime', 'nilearn', 'dipy', 'nipy', 'matplotlib'], 'profiler': ['psutil'], diff --git a/nipype/info.py b/nipype/info.py index 4b416c6db3..845f18c819 100644 --- a/nipype/info.py +++ b/nipype/info.py @@ -141,7 +141,7 @@ def get_nipype_gitversion(): 'funcsigs', 'pytest>=%s' % PYTEST_MIN_VERSION, 'mock', - 'pydotplus', + 'pydot', 'packaging', ] @@ -154,7 +154,7 @@ def get_nipype_gitversion(): ] EXTRA_REQUIRES = { - 'doc': ['Sphinx>=1.4', 'matplotlib', 'pydotplus'], + 'doc': ['Sphinx>=1.4', 'matplotlib', 'pydot'], 'tests': TESTS_REQUIRES, 'nipy': ['nitime', 'nilearn', 'dipy', 'nipy', 'matplotlib'], 'profiler': ['psutil'], diff --git a/requirements.txt b/requirements.txt index a697b62244..58759283f7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,5 +12,5 @@ funcsigs configparser pytest>=3.0 mock -pydotplus +pydot packaging diff --git a/rtd_requirements.txt b/rtd_requirements.txt index a002562f3e..db88b18c44 100644 --- a/rtd_requirements.txt +++ b/rtd_requirements.txt @@ -11,7 +11,7 @@ funcsigs configparser pytest>=3.0 mock -pydotplus +pydot psutil matplotlib packaging From 03243d881e341e399ac55e9092ec1d0fa39005ef Mon Sep 17 00:00:00 2001 From: adelavega Date: Fri, 22 Sep 2017 11:11:57 -0500 Subject: [PATCH 228/643] Added reference to io --- nipype/interfaces/io.py | 1 + 1 file changed, 1 insertion(+) diff --git a/nipype/interfaces/io.py b/nipype/interfaces/io.py index 516c92c804..f2e3fcd943 100644 --- a/nipype/interfaces/io.py +++ b/nipype/interfaces/io.py @@ -40,6 +40,7 @@ from .base import ( TraitedSpec, traits, Str, File, Directory, BaseInterface, InputMultiPath, isdefined, OutputMultiPath, DynamicTraitedSpec, Undefined, BaseInterfaceInputSpec) +from .bids_utils import BIDSDataGrabber try: import pyxnat From 7d953cc74020767d2e8f155d9d1f1b3746cb6486 Mon Sep 17 00:00:00 2001 From: oesteban Date: Fri, 22 Sep 2017 09:33:10 -0700 Subject: [PATCH 229/643] implement monitor in a parallel process --- nipype/interfaces/base.py | 222 ++++++++++++-------------- nipype/interfaces/utility/wrappers.py | 46 +----- nipype/utils/config.py | 6 +- nipype/utils/profiler.py | 115 ++++++------- nipype/utils/provenance.py | 23 ++- 5 files changed, 184 insertions(+), 228 deletions(-) diff --git a/nipype/interfaces/base.py b/nipype/interfaces/base.py index c626328fde..2816a8e6de 100644 --- a/nipype/interfaces/base.py +++ b/nipype/interfaces/base.py @@ -24,7 +24,7 @@ import platform from string import Template import select -import subprocess +import subprocess as sp import sys import time from textwrap import wrap @@ -52,6 +52,9 @@ PY3 = sys.version_info[0] > 2 __docformat__ = 'restructuredtext' +if sys.version_info < (3, 3): + setattr(sp, 'DEVNULL', os.devnull) + class Str(traits.Unicode): pass @@ -1053,6 +1056,13 @@ def run(self, **inputs): results : an InterfaceResult object containing a copy of the instance that was executed, provenance information and, if successful, results """ + from ..utils.profiler import runtime_profile + + force_raise = not ( + hasattr(self.inputs, 'ignore_exception') and + isdefined(self.inputs.ignore_exception) and + self.inputs.ignore_exception + ) self.inputs.trait_set(**inputs) self._check_mandatory_inputs() self._check_version_requirements(self.inputs) @@ -1070,66 +1080,59 @@ def run(self, **inputs): platform=platform.platform(), hostname=platform.node(), version=self.version) + + proc_prof = None + if runtime_profile: + ifpid = '%d' % os.getpid() + fname = os.path.abspath('.prof-%s_freq-%0.3f' % (ifpid, 1)) + proc_prof = sp.Popen( + ['nipype_mprof', ifpid, '-o', fname, '-f', '1'], + cwd=os.getcwd(), + stdout=sp.DEVNULL, + stderr=sp.DEVNULL, + preexec_fn=os.setsid + ) + iflogger.debug('Started runtime profiler monitor (PID=%d) to file "%s"', + proc_prof.pid, fname) + + # Grab inputs now, as they should not change during execution + inputs = self.inputs.get_traitsfree() + outputs = None try: runtime = self._run_wrapper(runtime) outputs = self.aggregate_outputs(runtime) - runtime.endTime = dt.isoformat(dt.utcnow()) - timediff = parseutc(runtime.endTime) - parseutc(runtime.startTime) - runtime.duration = (timediff.days * 86400 + timediff.seconds + - timediff.microseconds / 100000.) - results = InterfaceResult(interface, runtime, - inputs=self.inputs.get_traitsfree(), - outputs=outputs) - prov_record = None - if str2bool(config.get('execution', 'write_provenance')): - prov_record = write_provenance(results) - results.provenance = prov_record except Exception as e: - runtime.endTime = dt.isoformat(dt.utcnow()) - timediff = parseutc(runtime.endTime) - parseutc(runtime.startTime) - runtime.duration = (timediff.days * 86400 + timediff.seconds + - timediff.microseconds / 100000.) - if len(e.args) == 0: - e.args = ("") - - message = "\nInterface %s failed to run." % self.__class__.__name__ - - if config.has_option('logging', 'interface_level') and \ - config.get('logging', 'interface_level').lower() == 'debug': - inputs_str = "\nInputs:" + str(self.inputs) + "\n" - else: - inputs_str = '' - - if len(e.args) == 1 and isinstance(e.args[0], (str, bytes)): - e.args = (e.args[0] + " ".join([message, inputs_str]),) - else: - e.args += (message, ) - if inputs_str != '': - e.args += (inputs_str, ) - - # exception raising inhibition for special cases import traceback - runtime.traceback = traceback.format_exc() - runtime.traceback_args = e.args - inputs = None - try: - inputs = self.inputs.get_traitsfree() - except Exception as e: - pass - results = InterfaceResult(interface, runtime, inputs=inputs) - prov_record = None - if str2bool(config.get('execution', 'write_provenance')): - try: - prov_record = write_provenance(results) - except Exception: - prov_record = None - results.provenance = prov_record - if hasattr(self.inputs, 'ignore_exception') and \ - isdefined(self.inputs.ignore_exception) and \ - self.inputs.ignore_exception: - pass - else: - raise + # Retrieve the maximum info fast + setattr(runtime, 'traceback', traceback.format_exc()) + # Gather up the exception arguments and append nipype info. + exc_args = e.args if getattr(e, 'args') else tuple() + exc_args += ('An exception of type %s occurred while running interface %s.' % + (type(e).__name__, self.__class__.__name__), ) + if config.get('logging', 'interface_level', 'info').lower() == 'debug': + exc_args += ('Inputs: %s' % str(self.inputs),) + + setattr(runtime, 'traceback_args', ('\n'.join(exc_args),)) + + # Fill in runtime times + runtime = _tearup_runtime(runtime) + results = InterfaceResult(interface, runtime, inputs=inputs, outputs=outputs) + + # Add provenance (if required) + results.provenance = None + if str2bool(config.get('execution', 'write_provenance', 'false')): + # Provenance will throw a warning if something went wrong + results.provenance = write_provenance(results) + + # Make sure runtime profiler is shut down + if runtime_profile: + import signal + os.killpg(os.getpgid(proc_prof.pid), signal.SIGINT) + iflogger.debug('Killing runtime profiler monitor (PID=%d)', proc_prof.pid) + + if force_raise and getattr(runtime, 'traceback', None): + raise NipypeInterfaceError('Fatal error:\n%s\n\n%s' % + (runtime.traceback, runtime.traceback_args)) return results def _list_outputs(self): @@ -1294,14 +1297,11 @@ def run_command(runtime, output=None, timeout=0.01, redirect_x=False): The returned runtime contains a merged stdout+stderr log with timestamps """ - # Check profiling - from ..utils.profiler import get_max_resources_used, runtime_profile # Init variables - PIPE = subprocess.PIPE + PIPE = sp.PIPE cmdline = runtime.cmdline - if redirect_x: exist_xvfb, _ = _exists_in_path('xvfb-run', runtime.environ) if not exist_xvfb: @@ -1319,28 +1319,23 @@ def run_command(runtime, output=None, timeout=0.01, redirect_x=False): stderr = open(errfile, 'wb') # t=='text'===default stdout = open(outfile, 'wb') - proc = subprocess.Popen(cmdline, - stdout=stdout, - stderr=stderr, - shell=True, - cwd=runtime.cwd, - env=env) + proc = sp.Popen(cmdline, + stdout=stdout, + stderr=stderr, + shell=True, + cwd=runtime.cwd, + env=env) else: - proc = subprocess.Popen(cmdline, - stdout=PIPE, - stderr=PIPE, - shell=True, - cwd=runtime.cwd, - env=env) + proc = sp.Popen(cmdline, + stdout=PIPE, + stderr=PIPE, + shell=True, + cwd=runtime.cwd, + env=env) result = {} errfile = os.path.join(runtime.cwd, 'stderr.nipype') outfile = os.path.join(runtime.cwd, 'stdout.nipype') - # Init variables for memory profiling - mem_mb = 0 - num_threads = 1 - interval = .5 - if output == 'stream': streams = [Stream('stdout', proc.stdout), Stream('stderr', proc.stderr)] @@ -1356,13 +1351,11 @@ def _process(drain=0): else: for stream in res[0]: stream.read(drain) + while proc.returncode is None: - if runtime_profile: - mem_mb, num_threads = \ - get_max_resources_used(proc.pid, mem_mb, num_threads) proc.poll() _process() - time.sleep(interval) + _process(drain=1) # collect results, merge and return @@ -1376,12 +1369,6 @@ def _process(drain=0): result['merged'] = [r[1] for r in temp] if output == 'allatonce': - if runtime_profile: - while proc.returncode is None: - mem_mb, num_threads = \ - get_max_resources_used(proc.pid, mem_mb, num_threads) - proc.poll() - time.sleep(interval) stdout, stderr = proc.communicate() stdout = stdout.decode(default_encoding) stderr = stderr.decode(default_encoding) @@ -1389,32 +1376,20 @@ def _process(drain=0): result['stderr'] = stderr.split('\n') result['merged'] = '' if output == 'file': - if runtime_profile: - while proc.returncode is None: - mem_mb, num_threads = \ - get_max_resources_used(proc.pid, mem_mb, num_threads) - proc.poll() - time.sleep(interval) ret_code = proc.wait() stderr.flush() stdout.flush() - result['stdout'] = [line.decode(default_encoding).strip() for line in open(outfile, 'rb').readlines()] - result['stderr'] = [line.decode(default_encoding).strip() for line in open(errfile, 'rb').readlines()] + result['stdout'] = [line.decode(default_encoding).strip() + for line in open(outfile, 'rb').readlines()] + result['stderr'] = [line.decode(default_encoding).strip() + for line in open(errfile, 'rb').readlines()] result['merged'] = '' if output == 'none': - if runtime_profile: - while proc.returncode is None: - mem_mb, num_threads = \ - get_max_resources_used(proc.pid, mem_mb, num_threads) - proc.poll() - time.sleep(interval) proc.communicate() result['stdout'] = [] result['stderr'] = [] result['merged'] = '' - setattr(runtime, 'runtime_memory_gb', mem_mb/1024.0) - setattr(runtime, 'runtime_threads', num_threads) runtime.stderr = '\n'.join(result['stderr']) runtime.stdout = '\n'.join(result['stdout']) runtime.merged = result['merged'] @@ -1428,19 +1403,19 @@ def get_dependencies(name, environ): Uses otool on darwin, ldd on linux. Currently doesn't support windows. """ - PIPE = subprocess.PIPE + PIPE = sp.PIPE if sys.platform == 'darwin': - proc = subprocess.Popen('otool -L `which %s`' % name, - stdout=PIPE, - stderr=PIPE, - shell=True, - env=environ) + proc = sp.Popen('otool -L `which %s`' % name, + stdout=PIPE, + stderr=PIPE, + shell=True, + env=environ) elif 'linux' in sys.platform: - proc = subprocess.Popen('ldd `which %s`' % name, - stdout=PIPE, - stderr=PIPE, - shell=True, - env=environ) + proc = sp.Popen('ldd `which %s`' % name, + stdout=PIPE, + stderr=PIPE, + shell=True, + env=environ) else: return 'Platform %s not supported' % sys.platform o, e = proc.communicate() @@ -1588,12 +1563,12 @@ def version_from_command(self, flag='-v'): if _exists_in_path(cmdname, env): out_environ = self._get_environ() env.update(out_environ) - proc = subprocess.Popen(' '.join((cmdname, flag)), - shell=True, - env=env, - stdout=subprocess.PIPE, - stderr=subprocess.PIPE, - ) + proc = sp.Popen(' '.join((cmdname, flag)), + shell=True, + env=env, + stdout=sp.PIPE, + stderr=sp.PIPE, + ) o, e = proc.communicate() return o @@ -2009,3 +1984,10 @@ class InputMultiPath(MultiPath): """ pass + +def _tearup_runtime(runtime): + runtime.endTime = dt.isoformat(dt.utcnow()) + timediff = parseutc(runtime.endTime) - parseutc(runtime.startTime) + runtime.duration = (timediff.days * 86400 + timediff.seconds + + timediff.microseconds / 1e6) + return runtime diff --git a/nipype/interfaces/utility/wrappers.py b/nipype/interfaces/utility/wrappers.py index 94f69e5bba..4fa10205d2 100644 --- a/nipype/interfaces/utility/wrappers.py +++ b/nipype/interfaces/utility/wrappers.py @@ -129,22 +129,9 @@ def _add_output_traits(self, base): return base def _run_interface(self, runtime): - # Check profiling - from ...utils.profiler import runtime_profile - # Create function handle function_handle = create_function_from_source(self.inputs.function_str, self.imports) - - # Wrapper for running function handle in multiprocessing.Process - # Can catch exceptions and report output via multiprocessing.Queue - def _function_handle_wrapper(queue, **kwargs): - try: - out = function_handle(**kwargs) - queue.put(out) - except Exception as exc: - queue.put(exc) - # Get function args args = {} for name in self._input_names: @@ -152,38 +139,7 @@ def _function_handle_wrapper(queue, **kwargs): if isdefined(value): args[name] = value - # Profile resources if set - if runtime_profile: - import multiprocessing - from ..utils.profiler import get_max_resources_used - # Init communication queue and proc objs - queue = multiprocessing.Queue() - proc = multiprocessing.Process(target=_function_handle_wrapper, - args=(queue,), kwargs=args) - - # Init memory and threads before profiling - mem_mb = 0 - num_threads = 0 - - # Start process and profile while it's alive - proc.start() - while proc.is_alive(): - mem_mb, num_threads = \ - get_max_resources_used(proc.pid, mem_mb, num_threads, - pyfunc=True) - - # Get result from process queue - out = queue.get() - # If it is an exception, raise it - if isinstance(out, Exception): - raise out - - # Function ran successfully, populate runtime stats - setattr(runtime, 'runtime_memory_gb', mem_mb / 1024.0) - setattr(runtime, 'runtime_threads', num_threads) - else: - out = function_handle(**args) - + out = function_handle(**args) if len(self._output_names) == 1: self._out[self._output_names[0]] = out else: diff --git a/nipype/utils/config.py b/nipype/utils/config.py index c749a5480f..6baada07e3 100644 --- a/nipype/utils/config.py +++ b/nipype/utils/config.py @@ -114,8 +114,10 @@ def set_log_dir(self, log_dir): """ self._config.set('logging', 'log_directory', log_dir) - def get(self, section, option): - return self._config.get(section, option) + def get(self, section, option, default=None): + if self._config.has_option(section, option): + return self._config.get(section, option) + return default def set(self, section, option, value): if isinstance(value, bool): diff --git a/nipype/utils/profiler.py b/nipype/utils/profiler.py index b1842a9c83..8087dbd361 100644 --- a/nipype/utils/profiler.py +++ b/nipype/utils/profiler.py @@ -2,7 +2,7 @@ # @Author: oesteban # @Date: 2017-09-21 15:50:37 # @Last Modified by: oesteban -# @Last Modified time: 2017-09-21 18:03:32 +# @Last Modified time: 2017-09-22 09:28:21 """ Utilities to keep track of performance """ @@ -24,6 +24,8 @@ 'necessary package "psutil" could not be imported.') runtime_profile = False +from builtins import open + # Get max resources used for process def get_max_resources_used(pid, mem_mb, num_threads, pyfunc=False): @@ -89,31 +91,26 @@ def _get_num_threads(pid): else: num_threads = 1 - # Try-block for errors - try: - child_threads = 0 - # Iterate through child processes and get number of their threads - for child in proc.children(recursive=True): - # Leaf process - if len(child.children()) == 0: - # If process is running, get its number of threads - if child.status() == psutil.STATUS_RUNNING: - child_thr = child.num_threads() - # If its not necessarily running, but still multi-threaded - elif child.num_threads() > 1: - # Cast each thread as a process and check for only running - tprocs = [psutil.Process(thr.id) for thr in child.threads()] - alive_tprocs = [tproc for tproc in tprocs - if tproc.status() == psutil.STATUS_RUNNING] - child_thr = len(alive_tprocs) - # Otherwise, no threads are running - else: - child_thr = 0 - # Increment child threads - child_threads += child_thr - # Catch any NoSuchProcess errors - except psutil.NoSuchProcess: - pass + child_threads = 0 + # Iterate through child processes and get number of their threads + for child in proc.children(recursive=True): + # Leaf process + if len(child.children()) == 0: + # If process is running, get its number of threads + if child.status() == psutil.STATUS_RUNNING: + child_thr = child.num_threads() + # If its not necessarily running, but still multi-threaded + elif child.num_threads() > 1: + # Cast each thread as a process and check for only running + tprocs = [psutil.Process(thr.id) for thr in child.threads()] + alive_tprocs = [tproc for tproc in tprocs + if tproc.status() == psutil.STATUS_RUNNING] + child_thr = len(alive_tprocs) + # Otherwise, no threads are running + else: + child_thr = 0 + # Increment child threads + child_threads += child_thr # Number of threads is max between found active children and parent num_threads = max(child_threads, num_threads) @@ -150,24 +147,17 @@ def _get_ram_mb(pid, pyfunc=False): # Init variables _MB = 1024.0**2 - # Try block to protect against any dying processes in the interim - try: - # Init parent - parent = psutil.Process(pid) - # Get memory of parent - parent_mem = parent.memory_info().rss - mem_mb = parent_mem / _MB - - # Iterate through child processes - for child in parent.children(recursive=True): - child_mem = child.memory_info().rss - if pyfunc: - child_mem -= parent_mem - mem_mb += child_mem / _MB - - # Catch if process dies, return gracefully - except psutil.NoSuchProcess: - pass + # Init parent + parent = psutil.Process(pid) + # Get memory of parent + parent_mem = parent.memory_info().rss + mem_mb = parent_mem / _MB + # Iterate through child processes + for child in parent.children(recursive=True): + child_mem = child.memory_info().rss + if pyfunc: + child_mem -= parent_mem + mem_mb += child_mem / _MB # Return memory return mem_mb @@ -177,23 +167,38 @@ def main(): """ A minimal entry point to measure any process using psutil """ - import sys - wait = None - if len(sys.argv) > 2: - wait = float(sys.argv[2]) - - _probe_loop(int(sys.argv[1]), wait=wait) - - -def _probe_loop(pid, wait=None): + from argparse import ArgumentParser + from argparse import RawTextHelpFormatter + + parser = ArgumentParser(description='A minimal process monitor', + formatter_class=RawTextHelpFormatter) + parser.add_argument('pid', action='store', type=int, + help='process PID to monitor') + parser.add_argument('-o', '--out-file', action='store', default='.prof', + help='file where monitor will be writting') + parser.add_argument('-f', '--freq', action='store', type=float, default=5.0, + help='sampling frequency') + opts = parser.parse_args() + _probe_loop(opts.pid, opts.out_file, wait=opts.freq) + + +def _probe_loop(pid, fname, wait=None): from time import sleep + print('Start monitoring') if wait is None: wait = 5 + proffh = open(fname, 'w') while True: - print('mem=%f cpus=%d' % (_get_ram_mb(pid), _get_num_threads(pid))) - sleep(wait) + try: + proffh.write('%f,%d\n' % (_get_ram_mb(pid), _get_num_threads(pid))) + proffh.flush() + sleep(wait) + except (Exception, KeyboardInterrupt): + proffh.close() + print('\nFinished.') + return if __name__ == "__main__": diff --git a/nipype/utils/provenance.py b/nipype/utils/provenance.py index 066cbb9a57..c316f67272 100644 --- a/nipype/utils/provenance.py +++ b/nipype/utils/provenance.py @@ -21,7 +21,7 @@ from .. import get_info, logging, __version__ from .filemanip import (md5, hashlib, hash_infile) -iflogger = logging.getLogger('interface') +logger = logging.getLogger('utils') foaf = pm.Namespace("foaf", "http://xmlns.com/foaf/0.1/") dcterms = pm.Namespace("dcterms", "http://purl.org/dc/terms/") nipype_ns = pm.Namespace("nipype", "http://nipy.org/nipype/terms/") @@ -173,7 +173,7 @@ def safe_encode(x, as_literal=True): jsonstr = json.dumps(outdict) except UnicodeDecodeError as excp: jsonstr = "Could not encode dictionary. {}".format(excp) - iflogger.warn('Prov: %s', jsonstr) + logger.warning('Prov: %s', jsonstr) if not as_literal: return jsonstr @@ -203,7 +203,7 @@ def safe_encode(x, as_literal=True): jsonstr = json.dumps(x) except UnicodeDecodeError as excp: jsonstr = "Could not encode list/tuple. {}".format(excp) - iflogger.warn('Prov: %s', jsonstr) + logger.warning('Prov: %s', jsonstr) if not as_literal: return jsonstr @@ -285,9 +285,20 @@ def prov_encode(graph, value, create_container=True): def write_provenance(results, filename='provenance', format='all'): - ps = ProvStore() - ps.add_results(results) - return ps.write_provenance(filename=filename, format=format) + prov = None + try: + ps = ProvStore() + ps.add_results(results) + prov = ps.write_provenance(filename=filename, format=format) + except Exception as e: + import traceback + err_msg = traceback.format_exc() + if getattr(e, 'args'): + err_msg += '\n\nException arguments:\n' + ', '.join(['"%s"' % arg for arg in e.args]) + logger.warning('Writing provenance failed - Exception details:\n%s', err_msg) + + return prov + class ProvStore(object): From 9fa38d134fe3e4123682245bf4e14b7de9c67ef3 Mon Sep 17 00:00:00 2001 From: Dorota Jarecka Date: Fri, 22 Sep 2017 13:08:33 -0400 Subject: [PATCH 230/643] restoring pydotplus, adding min version to pydot --- doc/users/install.rst | 2 +- nipype/info.py | 6 ++++-- requirements.txt | 3 ++- rtd_requirements.txt | 3 ++- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/doc/users/install.rst b/doc/users/install.rst index ce30c79267..9f500e7ec4 100644 --- a/doc/users/install.rst +++ b/doc/users/install.rst @@ -47,7 +47,7 @@ use the following command:: While `all` installs everything, one can also install select components as listed below:: - 'doc': ['Sphinx>=1.4', 'matplotlib', 'pydot'], + 'doc': ['Sphinx>=1.4', 'matplotlib', 'pydotplus', 'pydot>=1.2.3'], 'tests': ['pytest-cov', 'codecov'], 'nipy': ['nitime', 'nilearn', 'dipy', 'nipy', 'matplotlib'], 'profiler': ['psutil'], diff --git a/nipype/info.py b/nipype/info.py index 845f18c819..e813a271fe 100644 --- a/nipype/info.py +++ b/nipype/info.py @@ -107,6 +107,7 @@ def get_nipype_gitversion(): SIMPLEJSON_MIN_VERSION = '3.8.0' PROV_VERSION = '1.5.0' CLICK_MIN_VERSION = '6.6.0' +PYDOT_MIN_VERSION = '1.2.3' NAME = 'nipype' MAINTAINER = 'nipype developers' @@ -141,7 +142,8 @@ def get_nipype_gitversion(): 'funcsigs', 'pytest>=%s' % PYTEST_MIN_VERSION, 'mock', - 'pydot', + 'pydotplus', + 'pydot>=%s' % PYDOT_MIN_VERSION, 'packaging', ] @@ -154,7 +156,7 @@ def get_nipype_gitversion(): ] EXTRA_REQUIRES = { - 'doc': ['Sphinx>=1.4', 'matplotlib', 'pydot'], + 'doc': ['Sphinx>=1.4', 'matplotlib', 'pydotplus', 'pydot>=1.2.3'], 'tests': TESTS_REQUIRES, 'nipy': ['nitime', 'nilearn', 'dipy', 'nipy', 'matplotlib'], 'profiler': ['psutil'], diff --git a/requirements.txt b/requirements.txt index 58759283f7..93180ec016 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,5 +12,6 @@ funcsigs configparser pytest>=3.0 mock -pydot +pydotplus +pydot>=1.2.3 packaging diff --git a/rtd_requirements.txt b/rtd_requirements.txt index db88b18c44..4ccff153d3 100644 --- a/rtd_requirements.txt +++ b/rtd_requirements.txt @@ -11,7 +11,8 @@ funcsigs configparser pytest>=3.0 mock -pydot +pydotplus +pydot>=1.2.3 psutil matplotlib packaging From 33758eb102eae7b77a228ce0932f43badb361992 Mon Sep 17 00:00:00 2001 From: Dorota Jarecka Date: Fri, 22 Sep 2017 13:31:50 -0400 Subject: [PATCH 231/643] small changes in networkx min versions to be consistent --- requirements.txt | 2 +- rtd_requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index 93180ec016..a5ac0a5683 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ numpy>=1.9.0 scipy>=0.11 -networkx>=1.7 +networkx>=1.9 traits>=4.6 python-dateutil>=1.5 nibabel>=2.1.0 diff --git a/rtd_requirements.txt b/rtd_requirements.txt index 4ccff153d3..b36047b653 100644 --- a/rtd_requirements.txt +++ b/rtd_requirements.txt @@ -1,6 +1,6 @@ numpy>=1.6.2 scipy>=0.11 -networkx>=1.7 +networkx>=1.9 traits>=4.6 python-dateutil>=1.5 nibabel>=2.1.0 From 306c4ec6158ea57e0026e65844217deedd72f046 Mon Sep 17 00:00:00 2001 From: oesteban Date: Fri, 22 Sep 2017 13:16:13 -0700 Subject: [PATCH 232/643] set profiling outputs to runtime object, read it from node execution --- nipype/interfaces/base.py | 25 ++++++++++++++++++------- nipype/pipeline/engine/nodes.py | 12 +++++------- 2 files changed, 23 insertions(+), 14 deletions(-) diff --git a/nipype/interfaces/base.py b/nipype/interfaces/base.py index 2816a8e6de..483eeea207 100644 --- a/nipype/interfaces/base.py +++ b/nipype/interfaces/base.py @@ -1081,19 +1081,19 @@ def run(self, **inputs): hostname=platform.node(), version=self.version) - proc_prof = None + mon_sp = None if runtime_profile: ifpid = '%d' % os.getpid() - fname = os.path.abspath('.prof-%s_freq-%0.3f' % (ifpid, 1)) - proc_prof = sp.Popen( - ['nipype_mprof', ifpid, '-o', fname, '-f', '1'], + mon_fname = os.path.abspath('.prof-%s_freq-%0.3f' % (ifpid, 1)) + mon_sp = sp.Popen( + ['nipype_mprof', ifpid, '-o', mon_fname, '-f', '1'], cwd=os.getcwd(), stdout=sp.DEVNULL, stderr=sp.DEVNULL, preexec_fn=os.setsid ) iflogger.debug('Started runtime profiler monitor (PID=%d) to file "%s"', - proc_prof.pid, fname) + mon_sp.pid, mon_fname) # Grab inputs now, as they should not change during execution inputs = self.inputs.get_traitsfree() @@ -1127,8 +1127,19 @@ def run(self, **inputs): # Make sure runtime profiler is shut down if runtime_profile: import signal - os.killpg(os.getpgid(proc_prof.pid), signal.SIGINT) - iflogger.debug('Killing runtime profiler monitor (PID=%d)', proc_prof.pid) + import numpy as np + os.killpg(os.getpgid(mon_sp.pid), signal.SIGINT) + iflogger.debug('Killing runtime profiler monitor (PID=%d)', mon_sp.pid) + + # Read .prof file in and set runtime values + mem_peak_gb = None + nthreads_max = None + vals = np.loadtxt(mon_fname, delimiter=',') + if vals: + mem_peak_gb, nthreads = vals.max(0).astype(float).tolist() + + setattr(runtime, 'mem_peak_gb', mem_peak_gb / 1024) + setattr(runtime, 'nthreads_max', int(nthreads_max)) if force_raise and getattr(runtime, 'traceback', None): raise NipypeInterfaceError('Fatal error:\n%s\n\n%s' % diff --git a/nipype/pipeline/engine/nodes.py b/nipype/pipeline/engine/nodes.py index 65f69093ef..2f748f2085 100644 --- a/nipype/pipeline/engine/nodes.py +++ b/nipype/pipeline/engine/nodes.py @@ -724,15 +724,13 @@ def write_report(self, report_type=None, cwd=None): return fp.writelines(write_rst_header('Runtime info', level=1)) # Init rst dictionary of runtime stats - rst_dict = {'hostname' : self.result.runtime.hostname, - 'duration' : self.result.runtime.duration} + rst_dict = {'hostname': self.result.runtime.hostname, + 'duration': self.result.runtime.duration} # Try and insert memory/threads usage if available if runtime_profile: - try: - rst_dict['runtime_memory_gb'] = self.result.runtime.runtime_memory_gb - rst_dict['runtime_threads'] = self.result.runtime.runtime_threads - except AttributeError: - logger.info('Runtime memory and threads stats unavailable') + rst_dict['runtime_memory_gb'] = getattr(self.result.runtime, 'mem_peak_gb') + rst_dict['runtime_threads'] = getattr(self.result.runtime, 'nthreads_max') + if hasattr(self.result.runtime, 'cmdline'): rst_dict['command'] = self.result.runtime.cmdline fp.writelines(write_rst_dict(rst_dict)) From 6876a38922c71e726ab70225d24b7e50fa0dda39 Mon Sep 17 00:00:00 2001 From: Dorota Jarecka Date: Fri, 22 Sep 2017 16:38:25 -0400 Subject: [PATCH 233/643] removing package_check('networkx' --- examples/dmri_dtk_dti.py | 1 - examples/dmri_dtk_odf.py | 1 - examples/dmri_fsl_dti.py | 1 - examples/fmri_slicer_coregistration.py | 1 - nipype/pipeline/engine/utils.py | 3 --- nipype/pipeline/engine/workflows.py | 3 +-- nipype/utils/misc.py | 2 +- 7 files changed, 2 insertions(+), 10 deletions(-) diff --git a/examples/dmri_dtk_dti.py b/examples/dmri_dtk_dti.py index e71d519912..4a5e2676cf 100755 --- a/examples/dmri_dtk_dti.py +++ b/examples/dmri_dtk_dti.py @@ -37,7 +37,6 @@ package_check('numpy', '1.3', 'tutorial1') package_check('scipy', '0.7', 'tutorial1') -package_check('networkx', '1.0', 'tutorial1') package_check('IPython', '0.10', 'tutorial1') diff --git a/examples/dmri_dtk_odf.py b/examples/dmri_dtk_odf.py index ff295b1d9f..b4fb978dd0 100755 --- a/examples/dmri_dtk_odf.py +++ b/examples/dmri_dtk_odf.py @@ -37,7 +37,6 @@ package_check('numpy', '1.3', 'tutorial1') package_check('scipy', '0.7', 'tutorial1') -package_check('networkx', '1.0', 'tutorial1') package_check('IPython', '0.10', 'tutorial1') diff --git a/examples/dmri_fsl_dti.py b/examples/dmri_fsl_dti.py index 1eb3c99bdd..05891a8727 100755 --- a/examples/dmri_fsl_dti.py +++ b/examples/dmri_fsl_dti.py @@ -37,7 +37,6 @@ package_check('numpy', '1.3', 'tutorial1') package_check('scipy', '0.7', 'tutorial1') -package_check('networkx', '1.0', 'tutorial1') package_check('IPython', '0.10', 'tutorial1') diff --git a/examples/fmri_slicer_coregistration.py b/examples/fmri_slicer_coregistration.py index daf5bbb9e7..e0129651dd 100755 --- a/examples/fmri_slicer_coregistration.py +++ b/examples/fmri_slicer_coregistration.py @@ -37,7 +37,6 @@ package_check('numpy', '1.3', 'tutorial1') package_check('scipy', '0.7', 'tutorial1') -package_check('networkx', '1.0', 'tutorial1') package_check('IPython', '0.10', 'tutorial1') """The nipype tutorial contains data for two subjects. Subject data diff --git a/nipype/pipeline/engine/utils.py b/nipype/pipeline/engine/utils.py index 5a7eda2d68..f677d6c253 100644 --- a/nipype/pipeline/engine/utils.py +++ b/nipype/pipeline/engine/utils.py @@ -23,11 +23,8 @@ import pickle from functools import reduce import numpy as np -from ...utils.misc import package_check from distutils.version import LooseVersion -package_check('networkx', '1.3') - import networkx as nx from ...utils.filemanip import (fname_presuffix, FileNotFoundError, to_str, diff --git a/nipype/pipeline/engine/workflows.py b/nipype/pipeline/engine/workflows.py index 392be85aa3..17d49b046a 100644 --- a/nipype/pipeline/engine/workflows.py +++ b/nipype/pipeline/engine/workflows.py @@ -36,7 +36,7 @@ from ... import config, logging -from ...utils.misc import (unflatten, package_check, str2bool, +from ...utils.misc import (unflatten, str2bool, getsource, create_function_from_source) from ...interfaces.base import (traits, InputMultiPath, CommandLine, Undefined, TraitedSpec, DynamicTraitedSpec, @@ -58,7 +58,6 @@ from .base import EngineBase from .nodes import Node, MapNode -package_check('networkx', '1.3') logger = logging.getLogger('workflow') class Workflow(EngineBase): diff --git a/nipype/utils/misc.py b/nipype/utils/misc.py index 552e24c435..c73e643763 100644 --- a/nipype/utils/misc.py +++ b/nipype/utils/misc.py @@ -188,7 +188,7 @@ def package_check(pkg_name, version=None, app=None, checker=LooseVersion, Examples -------- package_check('numpy', '1.3') - package_check('networkx', '1.0', 'tutorial1') + package_check('scipy', '0.7', 'tutorial1') """ From 8a903f0923c0badb187cc2d8d4fdfa818b73e3f6 Mon Sep 17 00:00:00 2001 From: oesteban Date: Fri, 22 Sep 2017 13:47:31 -0700 Subject: [PATCH 234/643] revise profiler callback --- nipype/interfaces/base.py | 12 +++---- nipype/pipeline/plugins/base.py | 10 +++--- nipype/pipeline/plugins/callback_log.py | 46 +++++++++---------------- nipype/pipeline/plugins/multiproc.py | 7 ++-- 4 files changed, 29 insertions(+), 46 deletions(-) diff --git a/nipype/interfaces/base.py b/nipype/interfaces/base.py index 483eeea207..358892f450 100644 --- a/nipype/interfaces/base.py +++ b/nipype/interfaces/base.py @@ -1115,7 +1115,10 @@ def run(self, **inputs): setattr(runtime, 'traceback_args', ('\n'.join(exc_args),)) # Fill in runtime times - runtime = _tearup_runtime(runtime) + runtime.endTime = dt.isoformat(dt.utcnow()) + timediff = parseutc(runtime.endTime) - parseutc(runtime.startTime) + runtime.duration = (timediff.days * 86400 + timediff.seconds + + timediff.microseconds / 1e6) results = InterfaceResult(interface, runtime, inputs=inputs, outputs=outputs) # Add provenance (if required) @@ -1995,10 +1998,3 @@ class InputMultiPath(MultiPath): """ pass - -def _tearup_runtime(runtime): - runtime.endTime = dt.isoformat(dt.utcnow()) - timediff = parseutc(runtime.endTime) - parseutc(runtime.startTime) - runtime.duration = (timediff.days * 86400 + timediff.seconds + - timediff.microseconds / 1e6) - return runtime diff --git a/nipype/pipeline/plugins/base.py b/nipype/pipeline/plugins/base.py index 7334e00c52..2f40748774 100644 --- a/nipype/pipeline/plugins/base.py +++ b/nipype/pipeline/plugins/base.py @@ -188,10 +188,8 @@ class PluginBase(object): """Base class for plugins""" def __init__(self, plugin_args=None): - if plugin_args and 'status_callback' in plugin_args: - self._status_callback = plugin_args['status_callback'] - else: - self._status_callback = None + if plugin_args: + self._status_callback = plugin_args.get('status_callback') return def run(self, graph, config, updatehash=False): @@ -601,8 +599,8 @@ class GraphPluginBase(PluginBase): """ def __init__(self, plugin_args=None): - if plugin_args and 'status_callback' in plugin_args: - warn('status_callback not supported for Graph submission plugins') + if plugin_args and plugin_args.get('status_callback'): + logger.warning('status_callback not supported for Graph submission plugins') super(GraphPluginBase, self).__init__(plugin_args=plugin_args) def run(self, graph, config, updatehash=False): diff --git a/nipype/pipeline/plugins/callback_log.py b/nipype/pipeline/plugins/callback_log.py index 5ddc9eedd5..4e9d7a3b50 100644 --- a/nipype/pipeline/plugins/callback_log.py +++ b/nipype/pipeline/plugins/callback_log.py @@ -26,41 +26,29 @@ def log_nodes_cb(node, status): status info to the callback logger """ + if status != 'end': + return + # Import packages - import datetime import logging import json - # Check runtime profile stats - if node.result is not None: - try: - runtime = node.result.runtime - runtime_memory_gb = runtime.runtime_memory_gb - runtime_threads = runtime.runtime_threads - except AttributeError: - runtime_memory_gb = runtime_threads = 'Unknown' - else: - runtime_memory_gb = runtime_threads = 'N/A' - # Init variables logger = logging.getLogger('callback') - status_dict = {'name' : node.name, - 'id' : node._id, - 'estimated_memory_gb' : node._interface.estimated_memory_gb, - 'num_threads' : node._interface.num_threads} - - # Check status and write to log - # Start - if status == 'start': - status_dict['start'] = str(datetime.datetime.now()) - # End - elif status == 'end': - status_dict['finish'] = str(datetime.datetime.now()) - status_dict['runtime_threads'] = runtime_threads - status_dict['runtime_memory_gb'] = runtime_memory_gb - # Other - else: - status_dict['finish'] = str(datetime.datetime.now()) + status_dict = { + 'name': node.name, + 'id': node._id, + 'start': getattr(node.result.runtime, 'startTime'), + 'finish': getattr(node.result.runtime, 'endTime'), + 'runtime_threads': getattr( + node.result.runtime, 'nthreads_max', 'N/A'), + 'runtime_memory_gb': getattr( + node.result.runtime, 'mem_peak_gb', 'N/A'), + 'estimated_memory_gb': node._interface.estimated_memory_gb, + 'num_threads': node._interface.num_threads, + } + + if status_dict['start'] is None or status_dict['end'] is None: status_dict['error'] = True # Dump string to log diff --git a/nipype/pipeline/plugins/multiproc.py b/nipype/pipeline/plugins/multiproc.py index 3994f2e1cd..46a81d12b8 100644 --- a/nipype/pipeline/plugins/multiproc.py +++ b/nipype/pipeline/plugins/multiproc.py @@ -242,7 +242,7 @@ def _send_procs_to_workers(self, updatehash=False, graph=None): free_processors = self.processors - busy_processors # Check all jobs without dependency not run - jobids = np.flatnonzero((self.proc_done == False) & \ + jobids = np.flatnonzero((self.proc_done is False) & (self.depidx.sum(axis=0) == 0).__array__()) # Sort jobs ready to run first by memory and then by number of threads @@ -251,14 +251,15 @@ def _send_procs_to_workers(self, updatehash=False, graph=None): key=lambda item: (self.procs[item]._interface.estimated_memory_gb, self.procs[item]._interface.num_threads)) - if str2bool(config.get('execution', 'profile_runtime')): + profile_runtime = str2bool(config.get('execution', 'profile_runtime', 'false')) + if profile_runtime: logger.debug('Free memory (GB): %d, Free processors: %d', free_memory_gb, free_processors) # While have enough memory and processors for first job # Submit first job on the list for jobid in jobids: - if str2bool(config.get('execution', 'profile_runtime')): + if profile_runtime: logger.debug('Next Job: %d, memory (GB): %d, threads: %d' \ % (jobid, self.procs[jobid]._interface.estimated_memory_gb, From 9ced114e4df2c7cc224d08615d1a7320b4e80ef6 Mon Sep 17 00:00:00 2001 From: Satrajit Ghosh Date: Sat, 23 Sep 2017 14:02:00 -0400 Subject: [PATCH 235/643] fix: afni version check --- nipype/interfaces/afni/base.py | 39 ++++++++++++---------------- nipype/interfaces/afni/preprocess.py | 4 +-- 2 files changed, 18 insertions(+), 25 deletions(-) diff --git a/nipype/interfaces/afni/base.py b/nipype/interfaces/afni/base.py index 82c695b55b..3ab5756f03 100644 --- a/nipype/interfaces/afni/base.py +++ b/nipype/interfaces/afni/base.py @@ -10,7 +10,7 @@ from sys import platform from distutils import spawn -from ... import logging +from ... import logging, LooseVersion from ...utils.filemanip import split_filename, fname_presuffix from ..base import ( @@ -44,32 +44,25 @@ def version(): """ try: - clout = CommandLine(command='afni_vcheck', + clout = CommandLine(command='afni --version', terminal_output='allatonce').run() - - # Try to parse the version number - currv = clout.runtime.stdout.split('\n')[1].split('=', 1)[1].strip() except IOError: # If afni_vcheck is not present, return None - IFLOGGER.warn('afni_vcheck executable not found.') + IFLOGGER.warn('afni executable not found.') return None - except RuntimeError as e: - # If AFNI is outdated, afni_vcheck throws error. - # Show new version, but parse current anyways. - currv = str(e).split('\n')[4].split('=', 1)[1].strip() - nextv = str(e).split('\n')[6].split('=', 1)[1].strip() - IFLOGGER.warn( - 'AFNI is outdated, detected version %s and %s is available.' % (currv, nextv)) - - if currv.startswith('AFNI_'): - currv = currv[5:] - - v = currv.split('.') - try: - v = [int(n) for n in v] - except ValueError: - return currv - return tuple(v) + + version_stamp = clout.runtime.stdout.split('\n')[0].split('Version ')[1] + if version_stamp.startswith('AFNI'): + version_stamp = version_stamp.split('AFNI_')[1] + elif version_stamp.startswith('Debian'): + version_stamp = version_stamp.split('Debian-')[1].split('~')[0] + else: + return None + + version = LooseVersion(version_stamp.replace('_', '.')).version[:3] + if version[0] < 1000: + version[0] = version[0] + 2000 + return tuple(version) @classmethod def output_type_to_ext(cls, outputtype): diff --git a/nipype/interfaces/afni/preprocess.py b/nipype/interfaces/afni/preprocess.py index 0a92417a70..97455ec69f 100644 --- a/nipype/interfaces/afni/preprocess.py +++ b/nipype/interfaces/afni/preprocess.py @@ -1457,7 +1457,7 @@ def __init__(self, **inputs): version = Info.version() # As of AFNI 16.0.00, redirect_x is not needed - if isinstance(version[0], int) and version[0] > 15: + if version[0] > 2015: self._redirect_x = False def _parse_inputs(self, skip=None): @@ -2150,7 +2150,7 @@ def __init__(self, **inputs): v = Info.version() # As of AFNI 16.0.00, redirect_x is not needed - if isinstance(v[0], int) and v[0] > 15: + if v[0] > 2015: self._redirect_x = False From 3fa5c5cf66897fe0ec4fbb674e7b5d44d0217ca9 Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Sat, 23 Sep 2017 09:58:02 -0400 Subject: [PATCH 236/643] CI: Add pip install --pre entry to Travis --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index f97f48dddb..43ed8ac271 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,6 +11,7 @@ env: - INSTALL_DEB_DEPENDECIES=true NIPYPE_EXTRAS="doc,tests,fmri,profiler" - INSTALL_DEB_DEPENDECIES=false NIPYPE_EXTRAS="doc,tests,fmri,profiler" - INSTALL_DEB_DEPENDECIES=true NIPYPE_EXTRAS="doc,tests,fmri,profiler,duecredit" +- INSTALL_DEB_DEPENDECIES=true NIPYPE_EXTRAS="doc,tests,fmri,profiler" PIP_FLAGS="--pre" before_install: - function apt_inst { if $INSTALL_DEB_DEPENDECIES; then sudo rm -rf /dev/shm; fi && @@ -41,7 +42,7 @@ before_install: - travis_retry apt_inst - travis_retry conda_inst install: -- travis_retry pip install -e .[$NIPYPE_EXTRAS] +- travis_retry pip install $PIP_FLAGS -e .[$NIPYPE_EXTRAS] script: - py.test -v --doctest-modules nipype deploy: From e3982d758f2d138a483b8c08872971557b987569 Mon Sep 17 00:00:00 2001 From: Oscar Esteban Date: Sun, 24 Sep 2017 20:31:31 -0700 Subject: [PATCH 237/643] robuster constructor --- nipype/pipeline/plugins/base.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/nipype/pipeline/plugins/base.py b/nipype/pipeline/plugins/base.py index 2f40748774..3ddb433f6c 100644 --- a/nipype/pipeline/plugins/base.py +++ b/nipype/pipeline/plugins/base.py @@ -188,8 +188,10 @@ class PluginBase(object): """Base class for plugins""" def __init__(self, plugin_args=None): - if plugin_args: - self._status_callback = plugin_args.get('status_callback') + if plugin_args is None: + plugin_args = {} + + self._status_callback = plugin_args.get('status_callback') return def run(self, graph, config, updatehash=False): From 48f87af77161a54b41ce8157010de6e8ea123a3a Mon Sep 17 00:00:00 2001 From: Oscar Esteban Date: Sun, 24 Sep 2017 20:40:53 -0700 Subject: [PATCH 238/643] remove unused import --- nipype/pipeline/plugins/base.py | 1 - 1 file changed, 1 deletion(-) diff --git a/nipype/pipeline/plugins/base.py b/nipype/pipeline/plugins/base.py index 3ddb433f6c..e199d5b041 100644 --- a/nipype/pipeline/plugins/base.py +++ b/nipype/pipeline/plugins/base.py @@ -16,7 +16,6 @@ import uuid from time import strftime, sleep, time from traceback import format_exception, format_exc -from warnings import warn import numpy as np import scipy.sparse as ssp From 01158b55f2a5b79a5520a8d9e4ba038f44aec89c Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Mon, 25 Sep 2017 09:40:21 -0400 Subject: [PATCH 239/643] RF: Use np.nanmean --- nipype/algorithms/rapidart.py | 26 ++++++-------------------- 1 file changed, 6 insertions(+), 20 deletions(-) diff --git a/nipype/algorithms/rapidart.py b/nipype/algorithms/rapidart.py index b0511c0fc6..5cee9ffdb9 100644 --- a/nipype/algorithms/rapidart.py +++ b/nipype/algorithms/rapidart.py @@ -136,20 +136,6 @@ def _calc_norm(mc, use_differences, source, brain_pts=None): return normdata, displacement -def _nanmean(a, axis=None): - """Return the mean excluding items that are nan - - >>> a = [1, 2, np.nan] - >>> _nanmean(a) - 1.5 - - """ - if axis: - return np.nansum(a, axis) / np.sum(1 - np.isnan(a), axis) - else: - return np.nansum(a) / np.sum(1 - np.isnan(a)) - - class ArtifactDetectInputSpec(BaseInterfaceInputSpec): realigned_files = InputMultiPath(File(exists=True), desc="Names of realigned functional data files", @@ -376,11 +362,11 @@ def _detect_outliers_core(self, imgfile, motionfile, runidx, cwd=None): vol = data[:, :, :, t0] # Use an SPM like approach mask_tmp = vol > \ - (_nanmean(vol) / self.inputs.global_threshold) + (np.nanmean(vol) / self.inputs.global_threshold) mask = mask * mask_tmp for t0 in range(timepoints): vol = data[:, :, :, t0] - g[t0] = _nanmean(vol[mask]) + g[t0] = np.nanmean(vol[mask]) if len(find_indices(mask)) < (np.prod((x, y, z)) / 10): intersect_mask = False g = np.zeros((timepoints, 1)) @@ -390,7 +376,7 @@ def _detect_outliers_core(self, imgfile, motionfile, runidx, cwd=None): for t0 in range(timepoints): vol = data[:, :, :, t0] mask_tmp = vol > \ - (_nanmean(vol) / self.inputs.global_threshold) + (np.nanmean(vol) / self.inputs.global_threshold) mask[:, :, :, t0] = mask_tmp g[t0] = np.nansum(vol * mask_tmp) / np.nansum(mask_tmp) elif masktype == 'file': # uses a mask image to determine intensity @@ -400,15 +386,15 @@ def _detect_outliers_core(self, imgfile, motionfile, runidx, cwd=None): mask = mask > 0.5 for t0 in range(timepoints): vol = data[:, :, :, t0] - g[t0] = _nanmean(vol[mask]) + g[t0] = np.nanmean(vol[mask]) elif masktype == 'thresh': # uses a fixed signal threshold for t0 in range(timepoints): vol = data[:, :, :, t0] mask = vol > self.inputs.mask_threshold - g[t0] = _nanmean(vol[mask]) + g[t0] = np.nanmean(vol[mask]) else: mask = np.ones((x, y, z)) - g = _nanmean(data[mask > 0, :], 1) + g = np.nanmean(data[mask > 0, :], 1) # compute normalized intensity values gz = signal.detrend(g, axis=0) # detrend the signal From 487c2ce2914e44dc26103f890cd593c6eebd503b Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Mon, 25 Sep 2017 09:42:03 -0400 Subject: [PATCH 240/643] RF: Allow _calc_norm core to be passed list of affines --- nipype/algorithms/rapidart.py | 46 +++++++++++++++++++++++++---------- 1 file changed, 33 insertions(+), 13 deletions(-) diff --git a/nipype/algorithms/rapidart.py b/nipype/algorithms/rapidart.py index 5cee9ffdb9..06f790eca1 100644 --- a/nipype/algorithms/rapidart.py +++ b/nipype/algorithms/rapidart.py @@ -99,6 +99,29 @@ def _calc_norm(mc, use_differences, source, brain_pts=None): """ + affines = [_get_affine_matrix(mc[i, :], source) + for i in range(mc.shape[0])] + return _calc_norm_affine(affines, use_differences, source, brain_pts) + + +def _calc_norm_affine(affines, use_differences, source, brain_pts=None): + """Calculates the maximum overall displacement of the midpoints + of the faces of a cube due to translation and rotation. + + Parameters + ---------- + affines : list of [4 x 4] affine matrices + use_differences : boolean + brain_pts : [4 x n_points] of coordinates + + Returns + ------- + + norm : at each time point + displacement : euclidean distance (mm) of displacement at each coordinate + + """ + if brain_pts is None: respos = np.diag([70, 70, 75]) resneg = np.diag([-70, -110, -45]) @@ -107,22 +130,19 @@ def _calc_norm(mc, use_differences, source, brain_pts=None): else: all_pts = brain_pts n_pts = all_pts.size - all_pts.shape[1] - newpos = np.zeros((mc.shape[0], n_pts)) + newpos = np.zeros((len(affines), n_pts)) if brain_pts is not None: - displacement = np.zeros((mc.shape[0], int(n_pts / 3))) - for i in range(mc.shape[0]): - affine = _get_affine_matrix(mc[i, :], source) - newpos[i, :] = np.dot(affine, - all_pts)[0:3, :].ravel() + displacement = np.zeros((len(affines), int(n_pts / 3))) + for i, affine in enumerate(affines): + newpos[i, :] = np.dot(affine, all_pts)[0:3, :].ravel() if brain_pts is not None: - displacement[i, :] = \ - np.sqrt(np.sum(np.power(np.reshape(newpos[i, :], - (3, all_pts.shape[1])) - - all_pts[0:3, :], - 2), - axis=0)) + displacement[i, :] = np.sqrt(np.sum( + np.power(np.reshape(newpos[i, :], + (3, all_pts.shape[1])) - all_pts[0:3, :], + 2), + axis=0)) # np.savez('displacement.npz', newpos=newpos, pts=all_pts) - normdata = np.zeros(mc.shape[0]) + normdata = np.zeros(len(affines)) if use_differences: newpos = np.concatenate((np.zeros((1, n_pts)), np.diff(newpos, n=1, axis=0)), axis=0) From 951ad5582a7a81e80334221f56b60c0d1290331e Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Mon, 25 Sep 2017 10:04:10 -0400 Subject: [PATCH 241/643] STY: PEP8 fix --- nipype/algorithms/rapidart.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/nipype/algorithms/rapidart.py b/nipype/algorithms/rapidart.py index 06f790eca1..c551d4665e 100644 --- a/nipype/algorithms/rapidart.py +++ b/nipype/algorithms/rapidart.py @@ -148,8 +148,10 @@ def _calc_norm_affine(affines, use_differences, source, brain_pts=None): np.diff(newpos, n=1, axis=0)), axis=0) for i in range(newpos.shape[0]): normdata[i] = \ - np.max(np.sqrt(np.sum(np.reshape(np.power(np.abs(newpos[i, :]), 2), - (3, all_pts.shape[1])), axis=0))) + np.max(np.sqrt(np.sum( + np.reshape(np.power(np.abs(newpos[i, :]), 2), + (3, all_pts.shape[1])), + axis=0))) else: newpos = np.abs(signal.detrend(newpos, axis=0, type='constant')) normdata = np.sqrt(np.mean(np.power(newpos, 2), axis=1)) From c74fec07d878321c325b34df247ae51bdddc22f9 Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Mon, 25 Sep 2017 13:19:20 -0400 Subject: [PATCH 242/643] RF: Remove unused "source" parameter --- nipype/algorithms/rapidart.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nipype/algorithms/rapidart.py b/nipype/algorithms/rapidart.py index c551d4665e..a3f362cb8f 100644 --- a/nipype/algorithms/rapidart.py +++ b/nipype/algorithms/rapidart.py @@ -101,10 +101,10 @@ def _calc_norm(mc, use_differences, source, brain_pts=None): affines = [_get_affine_matrix(mc[i, :], source) for i in range(mc.shape[0])] - return _calc_norm_affine(affines, use_differences, source, brain_pts) + return _calc_norm_affine(affines, use_differences, brain_pts) -def _calc_norm_affine(affines, use_differences, source, brain_pts=None): +def _calc_norm_affine(affines, use_differences, brain_pts=None): """Calculates the maximum overall displacement of the midpoints of the faces of a cube due to translation and rotation. From 46dde3228d6b0c18c56714b7f7613da2a6944548 Mon Sep 17 00:00:00 2001 From: oesteban Date: Mon, 25 Sep 2017 14:31:29 -0700 Subject: [PATCH 243/643] various fixes --- nipype/interfaces/afni/base.py | 2 +- nipype/interfaces/base.py | 74 ++++++++------- nipype/interfaces/spm/base.py | 30 +++--- nipype/pipeline/engine/tests/test_engine.py | 33 ++++--- nipype/pipeline/plugins/base.py | 8 +- nipype/pipeline/plugins/callback_log.py | 3 +- nipype/pipeline/plugins/multiproc.py | 95 ++++++------------- .../pipeline/plugins/tests/test_multiproc.py | 25 ++--- nipype/utils/draw_gantt_chart.py | 61 ++---------- nipype/utils/profiler.py | 31 +++++- 10 files changed, 160 insertions(+), 202 deletions(-) diff --git a/nipype/interfaces/afni/base.py b/nipype/interfaces/afni/base.py index 3ab5756f03..35751d4e5c 100644 --- a/nipype/interfaces/afni/base.py +++ b/nipype/interfaces/afni/base.py @@ -105,7 +105,7 @@ def standard_image(img_name): '''Grab an image from the standard location. Could be made more fancy to allow for more relocatability''' - clout = CommandLine('which afni', + clout = CommandLine('which afni', ignore_exception=True, terminal_output='allatonce').run() if clout.runtime.returncode is not 0: return None diff --git a/nipype/interfaces/base.py b/nipype/interfaces/base.py index 358892f450..ba16c8767b 100644 --- a/nipype/interfaces/base.py +++ b/nipype/interfaces/base.py @@ -1070,6 +1070,8 @@ def run(self, **inputs): self._duecredit_cite() # initialize provenance tracking + store_provenance = str2bool(config.get( + 'execution', 'write_provenance', 'false')) env = deepcopy(dict(os.environ)) runtime = Bunch(cwd=os.getcwd(), returncode=None, @@ -1112,41 +1114,45 @@ def run(self, **inputs): if config.get('logging', 'interface_level', 'info').lower() == 'debug': exc_args += ('Inputs: %s' % str(self.inputs),) - setattr(runtime, 'traceback_args', ('\n'.join(exc_args),)) + setattr(runtime, 'traceback_args', + ('\n'.join(['%s' % arg for arg in exc_args]),)) - # Fill in runtime times - runtime.endTime = dt.isoformat(dt.utcnow()) - timediff = parseutc(runtime.endTime) - parseutc(runtime.startTime) - runtime.duration = (timediff.days * 86400 + timediff.seconds + - timediff.microseconds / 1e6) - results = InterfaceResult(interface, runtime, inputs=inputs, outputs=outputs) - - # Add provenance (if required) - results.provenance = None - if str2bool(config.get('execution', 'write_provenance', 'false')): - # Provenance will throw a warning if something went wrong - results.provenance = write_provenance(results) - - # Make sure runtime profiler is shut down - if runtime_profile: - import signal - import numpy as np - os.killpg(os.getpgid(mon_sp.pid), signal.SIGINT) - iflogger.debug('Killing runtime profiler monitor (PID=%d)', mon_sp.pid) - - # Read .prof file in and set runtime values - mem_peak_gb = None - nthreads_max = None - vals = np.loadtxt(mon_fname, delimiter=',') - if vals: - mem_peak_gb, nthreads = vals.max(0).astype(float).tolist() - - setattr(runtime, 'mem_peak_gb', mem_peak_gb / 1024) - setattr(runtime, 'nthreads_max', int(nthreads_max)) - - if force_raise and getattr(runtime, 'traceback', None): - raise NipypeInterfaceError('Fatal error:\n%s\n\n%s' % - (runtime.traceback, runtime.traceback_args)) + if force_raise: + raise + finally: + # This needs to be done always + runtime.endTime = dt.isoformat(dt.utcnow()) + timediff = parseutc(runtime.endTime) - parseutc(runtime.startTime) + runtime.duration = (timediff.days * 86400 + timediff.seconds + + timediff.microseconds / 1e6) + results = InterfaceResult(interface, runtime, inputs=inputs, outputs=outputs, + provenance=None) + + # Add provenance (if required) + if store_provenance: + # Provenance will only throw a warning if something went wrong + results.provenance = write_provenance(results) + + # Make sure runtime profiler is shut down + if runtime_profile: + import signal + import numpy as np + os.killpg(os.getpgid(mon_sp.pid), signal.SIGINT) + iflogger.debug('Killing runtime profiler monitor (PID=%d)', mon_sp.pid) + + # Read .prof file in and set runtime values + mem_peak_gb = None + nthreads_max = None + vals = np.loadtxt(mon_fname, delimiter=',') + if vals: + mem_peak_gb, nthreads = vals.max(0).astype(float).tolist() + + setattr(runtime, 'mem_peak_gb', mem_peak_gb / 1024) + setattr(runtime, 'nthreads_max', int(nthreads_max)) + + # if force_raise and getattr(runtime, 'traceback', None): + # raise NipypeInterfaceError('Fatal error:\n%s\n\n%s' % + # (runtime.traceback, runtime.traceback_args)) return results def _list_outputs(self): diff --git a/nipype/interfaces/spm/base.py b/nipype/interfaces/spm/base.py index 6c3fbab32e..33c540f457 100644 --- a/nipype/interfaces/spm/base.py +++ b/nipype/interfaces/spm/base.py @@ -29,7 +29,7 @@ # Local imports from ... import logging from ...utils import spm_docs as sd, NUMPY_MMAP -from ..base import (BaseInterface, traits, isdefined, InputMultiPath, +from ..base import (BaseInterface, CommandLine, traits, isdefined, InputMultiPath, BaseInterfaceInputSpec, Directory, Undefined, ImageFile) from ..matlab import MatlabCommand from ...external.due import due, Doi, BibTeX @@ -151,18 +151,18 @@ def version(matlab_cmd=None, paths=None, use_mcr=None): returns None of path not found """ - if use_mcr or 'FORCE_SPMMCR' in os.environ: - use_mcr = True - if matlab_cmd is None: - try: - matlab_cmd = os.environ['SPMMCRCMD'] - except KeyError: - pass - if matlab_cmd is None: - try: - matlab_cmd = os.environ['MATLABCMD'] - except KeyError: - matlab_cmd = 'matlab -nodesktop -nosplash' + + # Test if matlab is installed, exit quickly if not. + clout = CommandLine('which matlab', ignore_exception=True, + terminal_output='allatonce').run() + if clout.runtime.returncode is not 0: + return None + + use_mcr = use_mcr or 'FORCE_SPMMCR' in os.environ + matlab_cmd = (os.getenv('SPMMCRCMD') or + os.getenv('MATLABCMD') or + 'matlab -nodesktop -nosplash') + mlab = MatlabCommand(matlab_cmd=matlab_cmd) mlab.inputs.mfile = False if paths: @@ -187,7 +187,7 @@ def version(matlab_cmd=None, paths=None, use_mcr=None): except (IOError, RuntimeError) as e: # if no Matlab at all -- exception could be raised # No Matlab -- no spm - logger.debug(str(e)) + logger.debug('%s', e) return None else: out = sd._strip_header(out.runtime.stdout) @@ -276,7 +276,7 @@ def _find_mlab_cmd_defaults(self): def _matlab_cmd_update(self): # MatlabCommand has to be created here, - # because matlab_cmb is not a proper input + # because matlab_cmd is not a proper input # and can be set only during init self.mlab = MatlabCommand(matlab_cmd=self.inputs.matlab_cmd, mfile=self.inputs.mfile, diff --git a/nipype/pipeline/engine/tests/test_engine.py b/nipype/pipeline/engine/tests/test_engine.py index 90d566ddf9..56c4f78e84 100644 --- a/nipype/pipeline/engine/tests/test_engine.py +++ b/nipype/pipeline/engine/tests/test_engine.py @@ -475,7 +475,7 @@ def double_func(x): def test_mapnode_nested(tmpdir): - os.chdir(str(tmpdir)) + tmpdir.chdir() from nipype import MapNode, Function def func1(in1): @@ -505,7 +505,7 @@ def func1(in1): def test_mapnode_expansion(tmpdir): - os.chdir(str(tmpdir)) + tmpdir.chdir() from nipype import MapNode, Function def func1(in1): @@ -527,9 +527,8 @@ def func1(in1): def test_node_hash(tmpdir): - wd = str(tmpdir) - os.chdir(wd) from nipype.interfaces.utility import Function + tmpdir.chdir() def func1(): return 1 @@ -548,13 +547,13 @@ def func2(a): modify = lambda x: x + 1 n1.inputs.a = 1 w1.connect(n1, ('a', modify), n2, 'a') - w1.base_dir = wd + w1.base_dir = os.getcwd() # generate outputs w1.run(plugin='Linear') # ensure plugin is being called w1.config['execution'] = {'stop_on_first_crash': 'true', 'local_hash_check': 'false', - 'crashdump_dir': wd} + 'crashdump_dir': os.getcwd()} # create dummy distributed plugin class from nipype.pipeline.plugins.base import DistributedPluginBase @@ -576,14 +575,14 @@ def _submit_job(self, node, updatehash=False): # set local check w1.config['execution'] = {'stop_on_first_crash': 'true', 'local_hash_check': 'true', - 'crashdump_dir': wd} + 'crashdump_dir': os.getcwd()} w1.run(plugin=RaiseError()) def test_old_config(tmpdir): - wd = str(tmpdir) - os.chdir(wd) + tmpdir.chdir() + wd = os.getcwd() from nipype.interfaces.utility import Function def func1(): @@ -614,8 +613,8 @@ def func2(a): def test_mapnode_json(tmpdir): """Tests that mapnodes don't generate excess jsons """ - wd = str(tmpdir) - os.chdir(wd) + tmpdir.chdir() + wd = os.getcwd() from nipype import MapNode, Function, Workflow def func1(in1): @@ -671,8 +670,8 @@ def test_parameterize_dirs_false(tmpdir): def test_serial_input(tmpdir): - wd = str(tmpdir) - os.chdir(wd) + tmpdir.chdir() + wd = os.getcwd() from nipype import MapNode, Function, Workflow def func1(in1): @@ -697,9 +696,9 @@ def func1(in1): assert n1.num_subnodes() == len(n1.inputs.in1) # test running the workflow on default conditions - w1.run(plugin='MultiProc') + # w1.run(plugin='MultiProc') - # test output of num_subnodes method when serial is True + # # test output of num_subnodes method when serial is True n1._serial = True assert n1.num_subnodes() == 1 @@ -708,7 +707,7 @@ def func1(in1): def test_write_graph_runs(tmpdir): - os.chdir(str(tmpdir)) + tmpdir.chdir() for graph in ('orig', 'flat', 'exec', 'hierarchical', 'colored'): for simple in (True, False): @@ -736,7 +735,7 @@ def test_write_graph_runs(tmpdir): def test_deep_nested_write_graph_runs(tmpdir): - os.chdir(str(tmpdir)) + tmpdir.chdir() for graph in ('orig', 'flat', 'exec', 'hierarchical', 'colored'): for simple in (True, False): diff --git a/nipype/pipeline/plugins/base.py b/nipype/pipeline/plugins/base.py index e199d5b041..93b33aba90 100644 --- a/nipype/pipeline/plugins/base.py +++ b/nipype/pipeline/plugins/base.py @@ -239,12 +239,12 @@ def run(self, graph, config, updatehash=False): self.mapnodesubids = {} # setup polling - TODO: change to threaded model notrun = [] - while np.any(self.proc_done == False) | \ - np.any(self.proc_pending == True): + while not np.all(self.proc_done) or np.any(self.proc_pending): toappend = [] # trigger callbacks for any pending results while self.pending_tasks: + logger.info('Processing %d pending tasks.', len(self.pending_tasks)) taskid, jobid = self.pending_tasks.pop() try: result = self._get_result(taskid) @@ -263,6 +263,8 @@ def run(self, graph, config, updatehash=False): 'traceback': format_exc()} notrun.append(self._clean_queue(jobid, graph, result=result)) + + logger.debug('Appending %d new tasks.' % len(toappend)) if toappend: self.pending_tasks.extend(toappend) num_jobs = len(self.pending_tasks) @@ -348,7 +350,7 @@ def _submit_mapnode(self, jobid): def _send_procs_to_workers(self, updatehash=False, graph=None): """ Sends jobs to workers """ - while np.any(self.proc_done == False): + while not np.all(self.proc_done): num_jobs = len(self.pending_tasks) if np.isinf(self.max_jobs): slots = None diff --git a/nipype/pipeline/plugins/callback_log.py b/nipype/pipeline/plugins/callback_log.py index 4e9d7a3b50..fb3cddd4aa 100644 --- a/nipype/pipeline/plugins/callback_log.py +++ b/nipype/pipeline/plugins/callback_log.py @@ -40,6 +40,7 @@ def log_nodes_cb(node, status): 'id': node._id, 'start': getattr(node.result.runtime, 'startTime'), 'finish': getattr(node.result.runtime, 'endTime'), + 'duration': getattr(node.result.runtime, 'duration'), 'runtime_threads': getattr( node.result.runtime, 'nthreads_max', 'N/A'), 'runtime_memory_gb': getattr( @@ -48,7 +49,7 @@ def log_nodes_cb(node, status): 'num_threads': node._interface.num_threads, } - if status_dict['start'] is None or status_dict['end'] is None: + if status_dict['start'] is None or status_dict['finish'] is None: status_dict['error'] = True # Dump string to log diff --git a/nipype/pipeline/plugins/multiproc.py b/nipype/pipeline/plugins/multiproc.py index 46a81d12b8..8f087d8d62 100644 --- a/nipype/pipeline/plugins/multiproc.py +++ b/nipype/pipeline/plugins/multiproc.py @@ -20,12 +20,14 @@ from ... import logging, config from ...utils.misc import str2bool +from ...utils.profiler import get_system_total_memory_gb from ..engine import MapNode from .base import (DistributedPluginBase, report_crash) # Init logger logger = logging.getLogger('workflow') + # Run node def run_node(node, updatehash, taskid): """Function to execute node.run(), catch and log any errors and @@ -44,6 +46,10 @@ def run_node(node, updatehash, taskid): dictionary containing the node runtime results and stats """ + from nipype import logging + logger = logging.getLogger('workflow') + + logger.debug('run_node called on %s', node.name) # Init variables result = dict(result=None, traceback=None, taskid=taskid) @@ -77,34 +83,6 @@ class NonDaemonPool(pool.Pool): Process = NonDaemonProcess -# Get total system RAM -def get_system_total_memory_gb(): - """Function to get the total RAM of the running system in GB - """ - - # Import packages - import os - import sys - - # Get memory - if 'linux' in sys.platform: - with open('/proc/meminfo', 'r') as f_in: - meminfo_lines = f_in.readlines() - mem_total_line = [line for line in meminfo_lines \ - if 'MemTotal' in line][0] - mem_total = float(mem_total_line.split()[1]) - memory_gb = mem_total/(1024.0**2) - elif 'darwin' in sys.platform: - mem_str = os.popen('sysctl hw.memsize').read().strip().split(' ')[-1] - memory_gb = float(mem_str)/(1024.0**3) - else: - err_msg = 'System platform: %s is not supported' - raise Exception(err_msg) - - # Return memory - return memory_gb - - class MultiProcPlugin(DistributedPluginBase): """Execute workflow with multiprocessing, not sending more jobs at once than the system can support. @@ -131,36 +109,29 @@ class MultiProcPlugin(DistributedPluginBase): def __init__(self, plugin_args=None): # Init variables and instance attributes super(MultiProcPlugin, self).__init__(plugin_args=plugin_args) + + if plugin_args is None: + plugin_args = {} + self.plugin_args = plugin_args + self._taskresult = {} self._task_obj = {} self._taskid = 0 - non_daemon = True - self.plugin_args = plugin_args - self.processors = cpu_count() - self.memory_gb = get_system_total_memory_gb()*0.9 # 90% of system memory - - self._timeout=2.0 + self._timeout = 2.0 self._event = threading.Event() - - - # Check plugin args - if self.plugin_args: - if 'non_daemon' in self.plugin_args: - non_daemon = plugin_args['non_daemon'] - if 'n_procs' in self.plugin_args: - self.processors = self.plugin_args['n_procs'] - if 'memory_gb' in self.plugin_args: - self.memory_gb = self.plugin_args['memory_gb'] - - logger.debug("MultiProcPlugin starting %d threads in pool"%(self.processors)) + # Read in options or set defaults. + non_daemon = self.plugin_args.get('non_daemon', True) + self.processors = self.plugin_args.get('n_procs', cpu_count()) + self.memory_gb = self.plugin_args.get('memory_gb', # Allocate 90% of system memory + get_system_total_memory_gb() * 0.9) # Instantiate different thread pools for non-daemon processes - if non_daemon: - # run the execution using the non-daemon pool subclass - self.pool = NonDaemonPool(processes=self.processors) - else: - self.pool = Pool(processes=self.processors) + logger.debug('MultiProcPlugin starting in "%sdaemon" mode (n_procs=%d, mem_gb=%0.2f)', + 'non' if non_daemon else '', self.processors, self.memory_gb) + self.pool = (NonDaemonPool(processes=self.processors) + if non_daemon else Pool(processes=self.processors)) + def _wait(self): if len(self.pending_tasks) > 0: @@ -172,15 +143,11 @@ def _wait(self): self._event.clear() def _async_callback(self, args): - self._taskresult[args['taskid']]=args + self._taskresult[args['taskid']] = args self._event.set() def _get_result(self, taskid): - if taskid not in self._taskresult: - result=None - else: - result=self._taskresult[taskid] - return result + return self._taskresult.get(taskid) def _report_crash(self, node, result=None): if result and result['traceback']: @@ -217,16 +184,15 @@ def _send_procs_to_workers(self, updatehash=False, graph=None): executing_now = [] # Check to see if a job is available - currently_running_jobids = np.flatnonzero((self.proc_pending == True) & \ - (self.depidx.sum(axis=0) == 0).__array__()) + currently_running_jobids = np.flatnonzero( + self.proc_pending & (self.depidx.sum(axis=0) == 0).__array__()) # Check available system resources by summing all threads and memory used busy_memory_gb = 0 busy_processors = 0 for jobid in currently_running_jobids: if self.procs[jobid]._interface.estimated_memory_gb <= self.memory_gb and \ - self.procs[jobid]._interface.num_threads <= self.processors: - + self.procs[jobid]._interface.num_threads <= self.processors: busy_memory_gb += self.procs[jobid]._interface.estimated_memory_gb busy_processors += self.procs[jobid]._interface.num_threads @@ -242,7 +208,7 @@ def _send_procs_to_workers(self, updatehash=False, graph=None): free_processors = self.processors - busy_processors # Check all jobs without dependency not run - jobids = np.flatnonzero((self.proc_done is False) & + jobids = np.flatnonzero((self.proc_done == False) & (self.depidx.sum(axis=0) == 0).__array__()) # Sort jobs ready to run first by memory and then by number of threads @@ -301,9 +267,8 @@ def _send_procs_to_workers(self, updatehash=False, graph=None): hash_exists, _, _, _ = self.procs[ jobid].hash_exists() logger.debug('Hash exists %s' % str(hash_exists)) - if (hash_exists and (self.procs[jobid].overwrite == False or - (self.procs[jobid].overwrite == None and - not self.procs[jobid]._interface.always_run))): + if hash_exists and not self.procs[jobid].overwrite and \ + not self.procs[jobid]._interface.always_run: self._task_finished_cb(jobid) self._remove_node_dirs() continue diff --git a/nipype/pipeline/plugins/tests/test_multiproc.py b/nipype/pipeline/plugins/tests/test_multiproc.py index 6dab555a11..b99a9135d5 100644 --- a/nipype/pipeline/plugins/tests/test_multiproc.py +++ b/nipype/pipeline/plugins/tests/test_multiproc.py @@ -1,15 +1,15 @@ # -*- coding: utf-8 -*- import logging -import os, sys +import os from multiprocessing import cpu_count import nipype.interfaces.base as nib from nipype.utils import draw_gantt_chart -import pytest import nipype.pipeline.engine as pe from nipype.pipeline.plugins.callback_log import log_nodes_cb from nipype.pipeline.plugins.multiproc import get_system_total_memory_gb + class InputSpec(nib.TraitedSpec): input1 = nib.traits.Int(desc='a random int') input2 = nib.traits.Int(desc='a random int') @@ -32,6 +32,7 @@ def _list_outputs(self): outputs['output1'] = [1, self.inputs.input1] return outputs + def test_run_multiproc(tmpdir): os.chdir(str(tmpdir)) @@ -82,8 +83,8 @@ def find_metrics(nodes, last_node): from dateutil.parser import parse import datetime - start = nodes[0]['start'] - total_duration = int((last_node['finish'] - start).total_seconds()) + start = parse(nodes[0]['start']) + total_duration = max(int((parse(last_node['finish']) - start).total_seconds()), 1) total_memory = [] total_threads = [] @@ -100,8 +101,8 @@ def find_metrics(nodes, last_node): x = now for j in range(start_index, len(nodes)): - node_start = nodes[j]['start'] - node_finish = nodes[j]['finish'] + node_start = parse(nodes[j]['start']) + node_finish = parse(nodes[j]['finish']) if node_start < x and node_finish > x: total_memory[i] += float(nodes[j]['estimated_memory_gb']) @@ -115,8 +116,10 @@ def find_metrics(nodes, last_node): return total_memory, total_threads -def test_no_more_memory_than_specified(): - LOG_FILENAME = 'callback.log' + +def test_no_more_memory_than_specified(tmpdir): + tmpdir.chdir() + LOG_FILENAME = tmpdir.join('callback.log').strpath my_logger = logging.getLogger('callback') my_logger.setLevel(logging.DEBUG) @@ -146,10 +149,9 @@ def test_no_more_memory_than_specified(): plugin_args={'memory_gb': max_memory, 'status_callback': log_nodes_cb}) - nodes = draw_gantt_chart.log_to_dict(LOG_FILENAME) last_node = nodes[-1] - #usage in every second + # usage in every second memory, threads = find_metrics(nodes, last_node) result = True @@ -173,6 +175,7 @@ def test_no_more_memory_than_specified(): os.remove(LOG_FILENAME) + def test_no_more_threads_than_specified(): LOG_FILENAME = 'callback.log' my_logger = logging.getLogger('callback') @@ -205,7 +208,7 @@ def test_no_more_threads_than_specified(): nodes = draw_gantt_chart.log_to_dict(LOG_FILENAME) last_node = nodes[-1] - #usage in every second + # usage in every second memory, threads = find_metrics(nodes, last_node) result = True diff --git a/nipype/utils/draw_gantt_chart.py b/nipype/utils/draw_gantt_chart.py index 4c18a66f8f..74705ebe38 100644 --- a/nipype/utils/draw_gantt_chart.py +++ b/nipype/utils/draw_gantt_chart.py @@ -102,61 +102,14 @@ def log_to_dict(logfile): ''' # Init variables - #keep track of important vars - nodes_list = [] #all the parsed nodes - unifinished_nodes = [] #all start nodes that dont have a finish yet - with open(logfile, 'r') as content: - #read file separating each line - content = content.read() - lines = content.split('\n') - - for l in lines: - #try to parse each line and transform in a json dict. - #if the line has a bad format, just skip - node = None - try: - node = json.loads(l) - except ValueError: - pass - - if not node: - continue - - #if it is a start node, add to unifinished nodes - if 'start' in node: - node['start'] = parser.parse(node['start']) - unifinished_nodes.append(node) - - #if it is end node, look in uninished nodes for matching start - #remove from unifinished list and add to node list - elif 'finish' in node: - node['finish'] = parser.parse(node['finish']) - #because most nodes are small, we look backwards in the unfinished list - for s in range(len(unifinished_nodes)): - aux = unifinished_nodes[s] - #found the end for node start, copy over info - if aux['id'] == node['id'] and aux['name'] == node['name'] \ - and aux['start'] < node['finish']: - node['start'] = aux['start'] - node['duration'] = \ - (node['finish'] - node['start']).total_seconds() - - unifinished_nodes.remove(aux) - nodes_list.append(node) - break - - #finished parsing - #assume nodes without finish didn't finish running. - #set their finish to last node run - last_node = nodes_list[-1] - for n in unifinished_nodes: - n['finish'] = last_node['finish'] - n['duration'] = (n['finish'] - n['start']).total_seconds() - nodes_list.append(n) - - # Return list of nodes - return nodes_list + # read file separating each line + lines = content.readlines() + + nodes_list = [json.loads(l) for l in lines] + + # Return list of nodes + return nodes_list def calculate_resource_timeseries(events, resource): diff --git a/nipype/utils/profiler.py b/nipype/utils/profiler.py index 8087dbd361..8dee35ba01 100644 --- a/nipype/utils/profiler.py +++ b/nipype/utils/profiler.py @@ -2,7 +2,7 @@ # @Author: oesteban # @Date: 2017-09-21 15:50:37 # @Last Modified by: oesteban -# @Last Modified time: 2017-09-22 09:28:21 +# @Last Modified time: 2017-09-25 10:06:54 """ Utilities to keep track of performance """ @@ -27,6 +27,35 @@ from builtins import open +# Get total system RAM +def get_system_total_memory_gb(): + """ + Function to get the total RAM of the running system in GB + """ + + # Import packages + import os + import sys + + # Get memory + if 'linux' in sys.platform: + with open('/proc/meminfo', 'r') as f_in: + meminfo_lines = f_in.readlines() + mem_total_line = [line for line in meminfo_lines + if 'MemTotal' in line][0] + mem_total = float(mem_total_line.split()[1]) + memory_gb = mem_total / (1024.0**2) + elif 'darwin' in sys.platform: + mem_str = os.popen('sysctl hw.memsize').read().strip().split(' ')[-1] + memory_gb = float(mem_str) / (1024.0**3) + else: + err_msg = 'System platform: %s is not supported' + raise Exception(err_msg) + + # Return memory + return memory_gb + + # Get max resources used for process def get_max_resources_used(pid, mem_mb, num_threads, pyfunc=False): """ From 9d70a2f3319713b20675afe8f0d4b4bf17b958a2 Mon Sep 17 00:00:00 2001 From: oesteban Date: Mon, 25 Sep 2017 15:24:03 -0700 Subject: [PATCH 244/643] cleaning up code --- doc/users/resource_sched_profiler.rst | 4 +- nipype/pipeline/plugins/__init__.py | 2 +- nipype/pipeline/plugins/base.py | 14 ++--- nipype/pipeline/plugins/callback_log.py | 56 ------------------- nipype/pipeline/plugins/multiproc.py | 6 -- .../pipeline/plugins/tests/test_multiproc.py | 3 +- nipype/utils/draw_gantt_chart.py | 2 +- nipype/utils/profiler.py | 51 ++++++++++++++++- .../tests/test_profiler.py} | 4 +- 9 files changed, 63 insertions(+), 79 deletions(-) delete mode 100644 nipype/pipeline/plugins/callback_log.py rename nipype/{interfaces/tests/test_runtime_profiler.py => utils/tests/test_profiler.py} (99%) diff --git a/doc/users/resource_sched_profiler.rst b/doc/users/resource_sched_profiler.rst index 37404b27da..7fa0819c19 100644 --- a/doc/users/resource_sched_profiler.rst +++ b/doc/users/resource_sched_profiler.rst @@ -82,7 +82,7 @@ by setting the ``status_callback`` parameter to point to this function in the :: - from nipype.pipeline.plugins.callback_log import log_nodes_cb + from nipype.utils.profiler import log_nodes_cb args_dict = {'n_procs' : 8, 'memory_gb' : 10, 'status_callback' : log_nodes_cb} To set the filepath for the callback log the ``'callback'`` logger must be @@ -141,7 +141,7 @@ The pandas_ Python package is required to use this feature. :: - from nipype.pipeline.plugins.callback_log import log_nodes_cb + from nipype.utils.profiler import log_nodes_cb args_dict = {'n_procs' : 8, 'memory_gb' : 10, 'status_callback' : log_nodes_cb} workflow.run(plugin='MultiProc', plugin_args=args_dict) diff --git a/nipype/pipeline/plugins/__init__.py b/nipype/pipeline/plugins/__init__.py index cb2c193004..34d3abdebc 100644 --- a/nipype/pipeline/plugins/__init__.py +++ b/nipype/pipeline/plugins/__init__.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: +from __future__ import print_function, division, unicode_literals, absolute_import from .debug import DebugPlugin from .linear import LinearPlugin @@ -19,5 +20,4 @@ from .slurm import SLURMPlugin from .slurmgraph import SLURMGraphPlugin -from .callback_log import log_nodes_cb from . import semaphore_singleton diff --git a/nipype/pipeline/plugins/base.py b/nipype/pipeline/plugins/base.py index 93b33aba90..dab48b15f0 100644 --- a/nipype/pipeline/plugins/base.py +++ b/nipype/pipeline/plugins/base.py @@ -58,9 +58,9 @@ def report_crash(node, traceback=None, hostname=None): timeofcrash = strftime('%Y%m%d-%H%M%S') login_name = getpass.getuser() crashfile = 'crash-%s-%s-%s-%s' % (timeofcrash, - login_name, - name, - str(uuid.uuid4())) + login_name, + name, + str(uuid.uuid4())) crashdir = node.config['execution']['crashdump_dir'] if crashdir is None: crashdir = os.getcwd() @@ -142,7 +142,8 @@ def create_pyscript(node, updatehash=False, store_exception=True): from collections import OrderedDict config_dict=%s config.update_config(config_dict) - ## Only configure matplotlib if it was successfully imported, matplotlib is an optional component to nipype + ## Only configure matplotlib if it was successfully imported, + ## matplotlib is an optional component to nipype if can_import_matplotlib: config.update_matplotlib() logging.update_logging(config) @@ -189,6 +190,7 @@ class PluginBase(object): def __init__(self, plugin_args=None): if plugin_args is None: plugin_args = {} + self.plugin_args = plugin_args self._status_callback = plugin_args.get('status_callback') return @@ -222,9 +224,7 @@ def __init__(self, plugin_args=None): self.mapnodesubids = None self.proc_done = None self.proc_pending = None - self.max_jobs = np.inf - if plugin_args and 'max_jobs' in plugin_args: - self.max_jobs = plugin_args['max_jobs'] + self.max_jobs = self.plugin_args.get('max_jobs', np.inf) def run(self, graph, config, updatehash=False): """Executes a pre-defined pipeline using distributed approaches diff --git a/nipype/pipeline/plugins/callback_log.py b/nipype/pipeline/plugins/callback_log.py deleted file mode 100644 index fb3cddd4aa..0000000000 --- a/nipype/pipeline/plugins/callback_log.py +++ /dev/null @@ -1,56 +0,0 @@ -# -*- coding: utf-8 -*- -# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- -# vi: set ft=python sts=4 ts=4 sw=4 et: -"""Callback logger for recording workflow and node run stats -""" -from __future__ import print_function, division, unicode_literals, absolute_import - - -# Log node stats function -def log_nodes_cb(node, status): - """Function to record node run statistics to a log file as json - dictionaries - - Parameters - ---------- - node : nipype.pipeline.engine.Node - the node being logged - status : string - acceptable values are 'start', 'end'; otherwise it is - considered and error - - Returns - ------- - None - this function does not return any values, it logs the node - status info to the callback logger - """ - - if status != 'end': - return - - # Import packages - import logging - import json - - # Init variables - logger = logging.getLogger('callback') - status_dict = { - 'name': node.name, - 'id': node._id, - 'start': getattr(node.result.runtime, 'startTime'), - 'finish': getattr(node.result.runtime, 'endTime'), - 'duration': getattr(node.result.runtime, 'duration'), - 'runtime_threads': getattr( - node.result.runtime, 'nthreads_max', 'N/A'), - 'runtime_memory_gb': getattr( - node.result.runtime, 'mem_peak_gb', 'N/A'), - 'estimated_memory_gb': node._interface.estimated_memory_gb, - 'num_threads': node._interface.num_threads, - } - - if status_dict['start'] is None or status_dict['finish'] is None: - status_dict['error'] = True - - # Dump string to log - logger.debug(json.dumps(status_dict)) diff --git a/nipype/pipeline/plugins/multiproc.py b/nipype/pipeline/plugins/multiproc.py index 8f087d8d62..ce6b76d203 100644 --- a/nipype/pipeline/plugins/multiproc.py +++ b/nipype/pipeline/plugins/multiproc.py @@ -7,7 +7,6 @@ http://stackoverflow.com/a/8963618/1183453 """ from __future__ import print_function, division, unicode_literals, absolute_import -from builtins import open # Import packages from multiprocessing import Process, Pool, cpu_count, pool @@ -109,11 +108,6 @@ class MultiProcPlugin(DistributedPluginBase): def __init__(self, plugin_args=None): # Init variables and instance attributes super(MultiProcPlugin, self).__init__(plugin_args=plugin_args) - - if plugin_args is None: - plugin_args = {} - self.plugin_args = plugin_args - self._taskresult = {} self._task_obj = {} self._taskid = 0 diff --git a/nipype/pipeline/plugins/tests/test_multiproc.py b/nipype/pipeline/plugins/tests/test_multiproc.py index b99a9135d5..20718feda6 100644 --- a/nipype/pipeline/plugins/tests/test_multiproc.py +++ b/nipype/pipeline/plugins/tests/test_multiproc.py @@ -6,8 +6,7 @@ import nipype.interfaces.base as nib from nipype.utils import draw_gantt_chart import nipype.pipeline.engine as pe -from nipype.pipeline.plugins.callback_log import log_nodes_cb -from nipype.pipeline.plugins.multiproc import get_system_total_memory_gb +from nipype.utils.profiler import log_nodes_cb, get_system_total_memory_gb class InputSpec(nib.TraitedSpec): diff --git a/nipype/utils/draw_gantt_chart.py b/nipype/utils/draw_gantt_chart.py index 74705ebe38..e21965480f 100644 --- a/nipype/utils/draw_gantt_chart.py +++ b/nipype/utils/draw_gantt_chart.py @@ -406,7 +406,7 @@ def generate_gantt_chart(logfile, cores, minute_scale=10, ----- # import logging # import logging.handlers - # from nipype.pipeline.plugins.callback_log import log_nodes_cb + # from nipype.utils.profiler import log_nodes_cb # log_filename = 'callback.log' # logger = logging.getLogger('callback') diff --git a/nipype/utils/profiler.py b/nipype/utils/profiler.py index 8dee35ba01..f730c7e175 100644 --- a/nipype/utils/profiler.py +++ b/nipype/utils/profiler.py @@ -2,7 +2,7 @@ # @Author: oesteban # @Date: 2017-09-21 15:50:37 # @Last Modified by: oesteban -# @Last Modified time: 2017-09-25 10:06:54 +# @Last Modified time: 2017-09-25 15:06:56 """ Utilities to keep track of performance """ @@ -15,6 +15,7 @@ from .. import config, logging from .misc import str2bool +from builtins import open proflogger = logging.getLogger('utils') @@ -24,7 +25,53 @@ 'necessary package "psutil" could not be imported.') runtime_profile = False -from builtins import open + +# Log node stats function +def log_nodes_cb(node, status): + """Function to record node run statistics to a log file as json + dictionaries + + Parameters + ---------- + node : nipype.pipeline.engine.Node + the node being logged + status : string + acceptable values are 'start', 'end'; otherwise it is + considered and error + + Returns + ------- + None + this function does not return any values, it logs the node + status info to the callback logger + """ + + if status != 'end': + return + + # Import packages + import logging + import json + + status_dict = { + 'name': node.name, + 'id': node._id, + 'start': getattr(node.result.runtime, 'startTime'), + 'finish': getattr(node.result.runtime, 'endTime'), + 'duration': getattr(node.result.runtime, 'duration'), + 'runtime_threads': getattr( + node.result.runtime, 'nthreads_max', 'N/A'), + 'runtime_memory_gb': getattr( + node.result.runtime, 'mem_peak_gb', 'N/A'), + 'estimated_memory_gb': node._interface.estimated_memory_gb, + 'num_threads': node._interface.num_threads, + } + + if status_dict['start'] is None or status_dict['finish'] is None: + status_dict['error'] = True + + # Dump string to log + logging.getLogger('callback').debug(json.dumps(status_dict)) # Get total system RAM diff --git a/nipype/interfaces/tests/test_runtime_profiler.py b/nipype/utils/tests/test_profiler.py similarity index 99% rename from nipype/interfaces/tests/test_runtime_profiler.py rename to nipype/utils/tests/test_profiler.py index 1e86d6a653..f979300f6e 100644 --- a/nipype/interfaces/tests/test_runtime_profiler.py +++ b/nipype/utils/tests/test_profiler.py @@ -230,7 +230,7 @@ def _run_cmdline_workflow(self, num_gb, num_threads): import nipype.pipeline.engine as pe import nipype.interfaces.utility as util - from nipype.pipeline.plugins.callback_log import log_nodes_cb + from nipype.utils.profiler import log_nodes_cb # Init variables base_dir = tempfile.mkdtemp() @@ -305,7 +305,7 @@ def _run_function_workflow(self, num_gb, num_threads): import nipype.pipeline.engine as pe import nipype.interfaces.utility as util - from nipype.pipeline.plugins.callback_log import log_nodes_cb + from nipype.utils.profiler import log_nodes_cb # Init variables base_dir = tempfile.mkdtemp() From 1fabd25aec8fa01f9c561face8f358d21cf57361 Mon Sep 17 00:00:00 2001 From: oesteban Date: Mon, 25 Sep 2017 15:26:13 -0700 Subject: [PATCH 245/643] remove comment --- nipype/interfaces/base.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/nipype/interfaces/base.py b/nipype/interfaces/base.py index ba16c8767b..268aeedb64 100644 --- a/nipype/interfaces/base.py +++ b/nipype/interfaces/base.py @@ -1150,9 +1150,6 @@ def run(self, **inputs): setattr(runtime, 'mem_peak_gb', mem_peak_gb / 1024) setattr(runtime, 'nthreads_max', int(nthreads_max)) - # if force_raise and getattr(runtime, 'traceback', None): - # raise NipypeInterfaceError('Fatal error:\n%s\n\n%s' % - # (runtime.traceback, runtime.traceback_args)) return results def _list_outputs(self): From ecedfcf0587ec91439b19926e14db776a75900f7 Mon Sep 17 00:00:00 2001 From: oesteban Date: Mon, 25 Sep 2017 15:32:25 -0700 Subject: [PATCH 246/643] interface.base cleanup --- nipype/interfaces/base.py | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/nipype/interfaces/base.py b/nipype/interfaces/base.py index 268aeedb64..9ec20f4c6c 100644 --- a/nipype/interfaces/base.py +++ b/nipype/interfaces/base.py @@ -59,8 +59,10 @@ class Str(traits.Unicode): pass + traits.Str = Str + class NipypeInterfaceError(Exception): def __init__(self, value): self.value = value @@ -68,6 +70,7 @@ def __init__(self, value): def __str__(self): return '{}'.format(self.value) + def _exists_in_path(cmd, environ): """ Based on a code snippet from @@ -137,7 +140,6 @@ class Bunch(object): """ - def __init__(self, *args, **kwargs): self.__dict__.update(*args, **kwargs) @@ -574,7 +576,6 @@ def get_hashval(self, hash_method=None): hash_files=hash_files))) return dict_withhash, md5(to_str(dict_nofilename).encode()).hexdigest() - def _get_sorteddict(self, objekt, dictwithhash=False, hash_method=None, hash_files=True): if isinstance(objekt, dict): @@ -775,7 +776,6 @@ def __init__(self, from_file=None, **inputs): for name, value in list(inputs.items()): setattr(self.inputs, name, value) - @classmethod def help(cls, returnhelp=False): """ Prints class help @@ -896,7 +896,7 @@ def _outputs_help(cls): """ helpstr = ['Outputs::', ''] if cls.output_spec: - outputs = cls.output_spec() #pylint: disable=E1102 + outputs = cls.output_spec() # pylint: disable=E1102 for name, spec in sorted(outputs.traits(transient=None).items()): helpstr += cls._get_trait_desc(outputs, name, spec) if len(helpstr) == 2: @@ -908,7 +908,7 @@ def _outputs(self): """ outputs = None if self.output_spec: - outputs = self.output_spec() #pylint: disable=E1102 + outputs = self.output_spec() # pylint: disable=E1102 return outputs @@ -1004,7 +1004,6 @@ def _check_version_requirements(self, trait_object, raise_exception=True): return unavailable_traits def _run_wrapper(self, runtime): - sysdisplay = os.getenv('DISPLAY') if self._redirect_x: try: from xvfbwrapper import Xvfb @@ -1180,7 +1179,7 @@ def aggregate_outputs(self, runtime=None, needed_outputs=None): self.__class__.__name__)) try: setattr(outputs, key, val) - _ = getattr(outputs, key) + getattr(outputs, key) except TraitError as error: if hasattr(error, 'info') and \ error.info.startswith("an existing"): @@ -1393,7 +1392,7 @@ def _process(drain=0): result['stderr'] = stderr.split('\n') result['merged'] = '' if output == 'file': - ret_code = proc.wait() + proc.wait() stderr.flush() stdout.flush() result['stdout'] = [line.decode(default_encoding).strip() @@ -1442,7 +1441,7 @@ def get_dependencies(name, environ): class CommandLineInputSpec(BaseInterfaceInputSpec): args = Str(argstr='%s', desc='Additional parameters to the command') environ = DictStrStr(desc='Environment variables', usedefault=True, - nohash=True) + nohash=True) # This input does not have a "usedefault=True" so the set_default_terminal_output() # method would work terminal_output = traits.Enum('stream', 'allatonce', 'file', 'none', @@ -1585,7 +1584,7 @@ def version_from_command(self, flag='-v'): env=env, stdout=sp.PIPE, stderr=sp.PIPE, - ) + ) o, e = proc.communicate() return o @@ -1740,7 +1739,7 @@ def _list_outputs(self): metadata = dict(name_source=lambda t: t is not None) traits = self.inputs.traits(**metadata) if traits: - outputs = self.output_spec().get() #pylint: disable=E1102 + outputs = self.output_spec().get() # pylint: disable=E1102 for name, trait_spec in list(traits.items()): out_name = name if trait_spec.output_name is not None: @@ -1788,8 +1787,8 @@ def _parse_inputs(self, skip=None): final_args[pos] = arg else: all_args.append(arg) - first_args = [arg for pos, arg in sorted(initial_args.items())] - last_args = [arg for pos, arg in sorted(final_args.items())] + first_args = [el for _, el in sorted(initial_args.items())] + last_args = [el for _, el in sorted(final_args.items())] return first_args + all_args + last_args @@ -1860,7 +1859,7 @@ class SEMLikeCommandLine(CommandLine): """ def _list_outputs(self): - outputs = self.output_spec().get() #pylint: disable=E1102 + outputs = self.output_spec().get() # pylint: disable=E1102 return self._outputs_from_inputs(outputs) def _outputs_from_inputs(self, outputs): @@ -1897,7 +1896,7 @@ def validate(self, object, name, value): # want to treat range and other sequences (except str) as list if not isinstance(value, (str, bytes)) and isinstance(value, collections.Sequence): - value = list(value) + value = list(value) if not isdefined(value) or \ (isinstance(value, list) and len(value) == 0): From 2d359598d8a23cd86ec9d42c57a403537e27f7cf Mon Sep 17 00:00:00 2001 From: oesteban Date: Mon, 25 Sep 2017 16:35:41 -0700 Subject: [PATCH 247/643] update new config settings --- doc/users/config_file.rst | 7 ++++++ docker/files/run_pytests.sh | 6 ++--- nipype/interfaces/base.py | 32 ++++++++++--------------- nipype/pipeline/plugins/multiproc.py | 8 +++---- nipype/utils/config.py | 2 +- nipype/utils/profiler.py | 36 ++++++++++++++++++++++++---- 6 files changed, 59 insertions(+), 32 deletions(-) diff --git a/doc/users/config_file.rst b/doc/users/config_file.rst index 1a1a550311..b32e5602bc 100644 --- a/doc/users/config_file.rst +++ b/doc/users/config_file.rst @@ -147,6 +147,13 @@ Execution crashfiles allow portability across machines and shorter load time. (possible values: ``pklz`` and ``txt``; default value: ``pklz``) +*resource_monitor* + Enables monitoring the resources occupation. + +*resource_monitor_frequency* + Sampling period (in seconds) between measurements of resources (memory, cpus) + being used by an interface. Requires ``resource_monitor`` to be ``true``. + Example ~~~~~~~ diff --git a/docker/files/run_pytests.sh b/docker/files/run_pytests.sh index f76734ad45..ad13ef75f6 100644 --- a/docker/files/run_pytests.sh +++ b/docker/files/run_pytests.sh @@ -17,10 +17,10 @@ echo '[logging]' > ${HOME}/.nipype/nipype.cfg echo 'log_to_file = true' >> ${HOME}/.nipype/nipype.cfg echo "log_directory = ${WORKDIR}/logs/py${PYTHON_VERSION}" >> ${HOME}/.nipype/nipype.cfg -# Enable profile_runtime tests only for python 2.7 +# Enable resource_monitor tests only for python 2.7 if [[ "${PYTHON_VERSION}" -lt "30" ]]; then echo '[execution]' >> ${HOME}/.nipype/nipype.cfg - echo 'profile_runtime = true' >> ${HOME}/.nipype/nipype.cfg + echo 'resource_monitor = true' >> ${HOME}/.nipype/nipype.cfg fi # Run tests using pytest @@ -31,7 +31,7 @@ exit_code=$? # Workaround: run here the profiler tests in python 3 if [[ "${PYTHON_VERSION}" -ge "30" ]]; then echo '[execution]' >> ${HOME}/.nipype/nipype.cfg - echo 'profile_runtime = true' >> ${HOME}/.nipype/nipype.cfg + echo 'resource_monitor = true' >> ${HOME}/.nipype/nipype.cfg export COVERAGE_FILE=${WORKDIR}/tests/.coverage.py${PYTHON_VERSION}_extra py.test -v --junitxml=${WORKDIR}/tests/pytests_py${PYTHON_VERSION}_extra.xml --cov nipype --cov-report xml:${WORKDIR}/tests/coverage_py${PYTHON_VERSION}_extra.xml /src/nipype/nipype/interfaces/tests/test_runtime_profiler.py /src/nipype/nipype/pipeline/plugins/tests/test_multiproc*.py exit_code=$(( $exit_code + $? )) diff --git a/nipype/interfaces/base.py b/nipype/interfaces/base.py index 9ec20f4c6c..9e37fe32ca 100644 --- a/nipype/interfaces/base.py +++ b/nipype/interfaces/base.py @@ -1055,7 +1055,7 @@ def run(self, **inputs): results : an InterfaceResult object containing a copy of the instance that was executed, provenance information and, if successful, results """ - from ..utils.profiler import runtime_profile + from ..utils.profiler import runtime_profile, ResourceMonitor force_raise = not ( hasattr(self.inputs, 'ignore_exception') and @@ -1084,17 +1084,11 @@ def run(self, **inputs): mon_sp = None if runtime_profile: - ifpid = '%d' % os.getpid() - mon_fname = os.path.abspath('.prof-%s_freq-%0.3f' % (ifpid, 1)) - mon_sp = sp.Popen( - ['nipype_mprof', ifpid, '-o', mon_fname, '-f', '1'], - cwd=os.getcwd(), - stdout=sp.DEVNULL, - stderr=sp.DEVNULL, - preexec_fn=os.setsid - ) - iflogger.debug('Started runtime profiler monitor (PID=%d) to file "%s"', - mon_sp.pid, mon_fname) + mon_freq = config.get('execution', 'resource_monitor_frequency', 1) + proc_pid = os.getpid() + mon_fname = os.path.abspath('.prof-%d_freq-%0.3f' % (proc_pid, mon_freq)) + mon_sp = ResourceMonitor(proc_pid, freq=mon_freq, fname=mon_fname) + mon_sp.start() # Grab inputs now, as they should not change during execution inputs = self.inputs.get_traitsfree() @@ -1134,20 +1128,18 @@ def run(self, **inputs): # Make sure runtime profiler is shut down if runtime_profile: - import signal import numpy as np - os.killpg(os.getpgid(mon_sp.pid), signal.SIGINT) - iflogger.debug('Killing runtime profiler monitor (PID=%d)', mon_sp.pid) + mon_sp.stop() + + setattr(runtime, 'mem_peak_gb', None) + setattr(runtime, 'nthreads_max', None) # Read .prof file in and set runtime values - mem_peak_gb = None - nthreads_max = None vals = np.loadtxt(mon_fname, delimiter=',') if vals: mem_peak_gb, nthreads = vals.max(0).astype(float).tolist() - - setattr(runtime, 'mem_peak_gb', mem_peak_gb / 1024) - setattr(runtime, 'nthreads_max', int(nthreads_max)) + setattr(runtime, 'mem_peak_gb', mem_peak_gb / 1024) + setattr(runtime, 'nthreads_max', int(nthreads)) return results diff --git a/nipype/pipeline/plugins/multiproc.py b/nipype/pipeline/plugins/multiproc.py index ce6b76d203..50543825ec 100644 --- a/nipype/pipeline/plugins/multiproc.py +++ b/nipype/pipeline/plugins/multiproc.py @@ -131,7 +131,7 @@ def _wait(self): if len(self.pending_tasks) > 0: if self._config['execution']['poll_sleep_duration']: self._timeout = float(self._config['execution']['poll_sleep_duration']) - sig_received=self._event.wait(self._timeout) + sig_received = self._event.wait(self._timeout) if not sig_received: logger.debug('MultiProcPlugin timeout before signal received. Deadlock averted??') self._event.clear() @@ -211,15 +211,15 @@ def _send_procs_to_workers(self, updatehash=False, graph=None): key=lambda item: (self.procs[item]._interface.estimated_memory_gb, self.procs[item]._interface.num_threads)) - profile_runtime = str2bool(config.get('execution', 'profile_runtime', 'false')) - if profile_runtime: + resource_monitor = str2bool(config.get('execution', 'resource_monitor', 'false')) + if resource_monitor: logger.debug('Free memory (GB): %d, Free processors: %d', free_memory_gb, free_processors) # While have enough memory and processors for first job # Submit first job on the list for jobid in jobids: - if profile_runtime: + if resource_monitor: logger.debug('Next Job: %d, memory (GB): %d, threads: %d' \ % (jobid, self.procs[jobid]._interface.estimated_memory_gb, diff --git a/nipype/utils/config.py b/nipype/utils/config.py index 6baada07e3..6aaf3bf2d3 100644 --- a/nipype/utils/config.py +++ b/nipype/utils/config.py @@ -64,7 +64,7 @@ parameterize_dirs = true poll_sleep_duration = 2 xvfb_max_wait = 10 -profile_runtime = false +resource_monitor = false [check] interval = 1209600 diff --git a/nipype/utils/profiler.py b/nipype/utils/profiler.py index f730c7e175..789ae9fb85 100644 --- a/nipype/utils/profiler.py +++ b/nipype/utils/profiler.py @@ -2,12 +2,13 @@ # @Author: oesteban # @Date: 2017-09-21 15:50:37 # @Last Modified by: oesteban -# @Last Modified time: 2017-09-25 15:06:56 +# @Last Modified time: 2017-09-25 16:34:23 """ Utilities to keep track of performance """ from __future__ import print_function, division, unicode_literals, absolute_import +import threading try: import psutil except ImportError as exc: @@ -19,13 +20,40 @@ proflogger = logging.getLogger('utils') -runtime_profile = str2bool(config.get('execution', 'profile_runtime')) +runtime_profile = str2bool(config.get('execution', 'resource_monitor')) if runtime_profile and psutil is None: - proflogger.warn('Switching "profile_runtime" off: the option was on, but the ' + proflogger.warn('Switching "resource_monitor" off: the option was on, but the ' 'necessary package "psutil" could not be imported.') runtime_profile = False +class ResourceMonitor(threading.Thread): + def __init__(self, pid, freq=5, fname=None): + if freq <= 0: + raise RuntimeError('Frequency (%0.2fs) cannot be lower than zero' % freq) + + if fname is None: + fname = '.nipype.prof' + + self._pid = pid + self._log = open(fname, 'w') + self._freq = freq + threading.Thread.__init__(self) + self._event = threading.Event() + + def stop(self): + self._event.set() + self._log.close() + self.join() + + def run(self): + while not self._event.is_set(): + self._log.write('%f,%d\n' % (_get_ram_mb(self._pid), + _get_num_threads(self._pid))) + self._log.flush() + self._event.wait(self._freq) + + # Log node stats function def log_nodes_cb(node, status): """Function to record node run statistics to a log file as json @@ -127,7 +155,7 @@ def get_max_resources_used(pid, mem_mb, num_threads, pyfunc=False): if not runtime_profile: raise RuntimeError('Attempted to measure resources with ' - '"profile_runtime" set off.') + '"resource_monitor" set off.') try: mem_mb = max(mem_mb, _get_ram_mb(pid, pyfunc=pyfunc)) From 3f34711e33129415a108b0d3e93c8e9b2e8ac66e Mon Sep 17 00:00:00 2001 From: oesteban Date: Mon, 25 Sep 2017 16:41:26 -0700 Subject: [PATCH 248/643] make naming consistent across tests --- docker/files/run_pytests.sh | 2 +- nipype/interfaces/base.py | 6 +++--- nipype/pipeline/engine/nodes.py | 4 ++-- nipype/utils/profiler.py | 10 +++++----- nipype/utils/tests/test_profiler.py | 6 +++--- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/docker/files/run_pytests.sh b/docker/files/run_pytests.sh index ad13ef75f6..2bb2d64f22 100644 --- a/docker/files/run_pytests.sh +++ b/docker/files/run_pytests.sh @@ -33,7 +33,7 @@ if [[ "${PYTHON_VERSION}" -ge "30" ]]; then echo '[execution]' >> ${HOME}/.nipype/nipype.cfg echo 'resource_monitor = true' >> ${HOME}/.nipype/nipype.cfg export COVERAGE_FILE=${WORKDIR}/tests/.coverage.py${PYTHON_VERSION}_extra - py.test -v --junitxml=${WORKDIR}/tests/pytests_py${PYTHON_VERSION}_extra.xml --cov nipype --cov-report xml:${WORKDIR}/tests/coverage_py${PYTHON_VERSION}_extra.xml /src/nipype/nipype/interfaces/tests/test_runtime_profiler.py /src/nipype/nipype/pipeline/plugins/tests/test_multiproc*.py + py.test -v --junitxml=${WORKDIR}/tests/pytests_py${PYTHON_VERSION}_extra.xml --cov nipype --cov-report xml:${WORKDIR}/tests/coverage_py${PYTHON_VERSION}_extra.xml /src/nipype/nipype/interfaces/tests/test_runtime_monitor.py /src/nipype/nipype/pipeline/plugins/tests/test_multiproc*.py exit_code=$(( $exit_code + $? )) fi diff --git a/nipype/interfaces/base.py b/nipype/interfaces/base.py index 9e37fe32ca..a261195c6f 100644 --- a/nipype/interfaces/base.py +++ b/nipype/interfaces/base.py @@ -1055,7 +1055,7 @@ def run(self, **inputs): results : an InterfaceResult object containing a copy of the instance that was executed, provenance information and, if successful, results """ - from ..utils.profiler import runtime_profile, ResourceMonitor + from ..utils.profiler import resource_monitor, ResourceMonitor force_raise = not ( hasattr(self.inputs, 'ignore_exception') and @@ -1083,7 +1083,7 @@ def run(self, **inputs): version=self.version) mon_sp = None - if runtime_profile: + if resource_monitor: mon_freq = config.get('execution', 'resource_monitor_frequency', 1) proc_pid = os.getpid() mon_fname = os.path.abspath('.prof-%d_freq-%0.3f' % (proc_pid, mon_freq)) @@ -1127,7 +1127,7 @@ def run(self, **inputs): results.provenance = write_provenance(results) # Make sure runtime profiler is shut down - if runtime_profile: + if resource_monitor: import numpy as np mon_sp.stop() diff --git a/nipype/pipeline/engine/nodes.py b/nipype/pipeline/engine/nodes.py index 2f748f2085..c5ee3f28f3 100644 --- a/nipype/pipeline/engine/nodes.py +++ b/nipype/pipeline/engine/nodes.py @@ -689,7 +689,7 @@ def update(self, **opts): self.inputs.update(**opts) def write_report(self, report_type=None, cwd=None): - from ...utils.profiler import runtime_profile + from ...utils.profiler import resource_monitor if not str2bool(self.config['execution']['create_report']): return report_dir = op.join(cwd, '_report') @@ -727,7 +727,7 @@ def write_report(self, report_type=None, cwd=None): rst_dict = {'hostname': self.result.runtime.hostname, 'duration': self.result.runtime.duration} # Try and insert memory/threads usage if available - if runtime_profile: + if resource_monitor: rst_dict['runtime_memory_gb'] = getattr(self.result.runtime, 'mem_peak_gb') rst_dict['runtime_threads'] = getattr(self.result.runtime, 'nthreads_max') diff --git a/nipype/utils/profiler.py b/nipype/utils/profiler.py index 789ae9fb85..2bfc9746c5 100644 --- a/nipype/utils/profiler.py +++ b/nipype/utils/profiler.py @@ -2,7 +2,7 @@ # @Author: oesteban # @Date: 2017-09-21 15:50:37 # @Last Modified by: oesteban -# @Last Modified time: 2017-09-25 16:34:23 +# @Last Modified time: 2017-09-25 16:37:02 """ Utilities to keep track of performance """ @@ -20,11 +20,11 @@ proflogger = logging.getLogger('utils') -runtime_profile = str2bool(config.get('execution', 'resource_monitor')) -if runtime_profile and psutil is None: +resource_monitor = str2bool(config.get('execution', 'resource_monitor')) +if resource_monitor and psutil is None: proflogger.warn('Switching "resource_monitor" off: the option was on, but the ' 'necessary package "psutil" could not be imported.') - runtime_profile = False + resource_monitor = False class ResourceMonitor(threading.Thread): @@ -153,7 +153,7 @@ def get_max_resources_used(pid, mem_mb, num_threads, pyfunc=False): the new high thread watermark of process """ - if not runtime_profile: + if not resource_monitor: raise RuntimeError('Attempted to measure resources with ' '"resource_monitor" set off.') diff --git a/nipype/utils/tests/test_profiler.py b/nipype/utils/tests/test_profiler.py index f979300f6e..f27ac3dc3a 100644 --- a/nipype/utils/tests/test_profiler.py +++ b/nipype/utils/tests/test_profiler.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- -# test_runtime_profiler.py +# test_profiler.py # # Author: Daniel Clark, 2016 """ -Module to unit test the runtime_profiler in nipype +Module to unit test the resource_monitor in nipype """ from __future__ import print_function, division, unicode_literals, absolute_import @@ -12,7 +12,7 @@ # Import packages import pytest -from nipype.utils.profiler import runtime_profile as run_profile +from nipype.utils.profiler import resource_monitor as run_profile from nipype.interfaces.base import (traits, CommandLine, CommandLineInputSpec) if run_profile: From 99ded42cd94afb898b92b24549f7f098a5e8bc6e Mon Sep 17 00:00:00 2001 From: oesteban Date: Mon, 25 Sep 2017 17:22:57 -0700 Subject: [PATCH 249/643] implement raise_insufficient --- doc/users/plugins.rst | 7 ++++ nipype/pipeline/plugins/multiproc.py | 59 ++++++++++++++++------------ 2 files changed, 40 insertions(+), 26 deletions(-) diff --git a/doc/users/plugins.rst b/doc/users/plugins.rst index 6c825aa8f8..2a3620b838 100644 --- a/doc/users/plugins.rst +++ b/doc/users/plugins.rst @@ -74,6 +74,13 @@ Optional arguments:: n_procs : Number of processes to launch in parallel, if not set number of processors/threads will be automatically detected + memory_gb : Total memory available to be shared by all simultaneous tasks + currently running, if not set it will be automatically estimated. + + raise_insufficient : Raise exception when the estimated resources of a node + exceed the total amount of resources available (memory and threads), when + ``False`` (default), only a warning will be issued. + To distribute processing on a multicore machine, simply call:: workflow.run(plugin='MultiProc') diff --git a/nipype/pipeline/plugins/multiproc.py b/nipype/pipeline/plugins/multiproc.py index 50543825ec..713bdb85e2 100644 --- a/nipype/pipeline/plugins/multiproc.py +++ b/nipype/pipeline/plugins/multiproc.py @@ -112,13 +112,14 @@ def __init__(self, plugin_args=None): self._task_obj = {} self._taskid = 0 self._timeout = 2.0 - self._event = threading.Event() + # self._event = threading.Event() # Read in options or set defaults. non_daemon = self.plugin_args.get('non_daemon', True) self.processors = self.plugin_args.get('n_procs', cpu_count()) self.memory_gb = self.plugin_args.get('memory_gb', # Allocate 90% of system memory get_system_total_memory_gb() * 0.9) + self.raise_insufficient = self.plugin_args.get('raise_insufficient', True) # Instantiate different thread pools for non-daemon processes logger.debug('MultiProcPlugin starting in "%sdaemon" mode (n_procs=%d, mem_gb=%0.2f)', @@ -126,19 +127,18 @@ def __init__(self, plugin_args=None): self.pool = (NonDaemonPool(processes=self.processors) if non_daemon else Pool(processes=self.processors)) - - def _wait(self): - if len(self.pending_tasks) > 0: - if self._config['execution']['poll_sleep_duration']: - self._timeout = float(self._config['execution']['poll_sleep_duration']) - sig_received = self._event.wait(self._timeout) - if not sig_received: - logger.debug('MultiProcPlugin timeout before signal received. Deadlock averted??') - self._event.clear() + # def _wait(self): + # if len(self.pending_tasks) > 0: + # if self._config['execution']['poll_sleep_duration']: + # self._timeout = float(self._config['execution']['poll_sleep_duration']) + # sig_received = self._event.wait(self._timeout) + # if not sig_received: + # logger.debug('MultiProcPlugin timeout before signal received. Deadlock averted??') + # self._event.clear() def _async_callback(self, args): self._taskresult[args['taskid']] = args - self._event.set() + # self._event.set() def _get_result(self, taskid): return self._taskresult.get(taskid) @@ -185,18 +185,25 @@ def _send_procs_to_workers(self, updatehash=False, graph=None): busy_memory_gb = 0 busy_processors = 0 for jobid in currently_running_jobids: - if self.procs[jobid]._interface.estimated_memory_gb <= self.memory_gb and \ - self.procs[jobid]._interface.num_threads <= self.processors: - busy_memory_gb += self.procs[jobid]._interface.estimated_memory_gb - busy_processors += self.procs[jobid]._interface.num_threads - - else: - raise ValueError( - "Resources required by jobid {0} ({3}GB, {4} threads) exceed what is " - "available on the system ({1}GB, {2} threads)".format( - jobid, self.memory_gb, self.processors, - self.procs[jobid]._interface.estimated_memory_gb, - self.procs[jobid]._interface.num_threads)) + est_mem_gb = self.procs[jobid]._interface.estimated_memory_gb + est_num_th = self.procs[jobid]._interface.num_threads + + if est_mem_gb > self.memory_gb: + logger.warning( + 'Job %s - Estimated memory (%0.2fGB) exceeds the total amount' + ' available (%0.2fGB).', self.procs[jobid].name, est_mem_gb, self.memory_gb) + if self.raise_insufficient: + raise RuntimeError('Insufficient resources available for job') + + if est_num_th > self.processors: + logger.warning( + 'Job %s - Requested %d threads, but only %d are available.', + self.procs[jobid].name, est_num_th, self.processors) + if self.raise_insufficient: + raise RuntimeError('Insufficient resources available for job') + + busy_memory_gb += min(est_mem_gb, self.memory_gb) + busy_processors += min(est_num_th, self.processors) free_memory_gb = self.memory_gb - busy_memory_gb free_processors = self.processors - busy_processors @@ -276,8 +283,8 @@ def _send_procs_to_workers(self, updatehash=False, graph=None): logger.debug('Finished checking hash') if self.procs[jobid].run_without_submitting: - logger.debug('Running node %s on master thread' \ - % self.procs[jobid]) + logger.debug('Running node %s on master thread', + self.procs[jobid]) try: self.procs[jobid].run() except Exception: @@ -288,7 +295,7 @@ def _send_procs_to_workers(self, updatehash=False, graph=None): self._remove_node_dirs() else: - logger.debug('MultiProcPlugin submitting %s' % str(jobid)) + logger.debug('MultiProcPlugin submitting %s', str(jobid)) tid = self._submit_job(deepcopy(self.procs[jobid]), updatehash=updatehash) if tid is None: From b0d25bde97d7599b7a923002c581258772ec432a Mon Sep 17 00:00:00 2001 From: oesteban Date: Mon, 25 Sep 2017 22:42:10 -0700 Subject: [PATCH 250/643] fix test --- docker/files/run_pytests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/files/run_pytests.sh b/docker/files/run_pytests.sh index 2bb2d64f22..e994b0ca41 100644 --- a/docker/files/run_pytests.sh +++ b/docker/files/run_pytests.sh @@ -33,7 +33,7 @@ if [[ "${PYTHON_VERSION}" -ge "30" ]]; then echo '[execution]' >> ${HOME}/.nipype/nipype.cfg echo 'resource_monitor = true' >> ${HOME}/.nipype/nipype.cfg export COVERAGE_FILE=${WORKDIR}/tests/.coverage.py${PYTHON_VERSION}_extra - py.test -v --junitxml=${WORKDIR}/tests/pytests_py${PYTHON_VERSION}_extra.xml --cov nipype --cov-report xml:${WORKDIR}/tests/coverage_py${PYTHON_VERSION}_extra.xml /src/nipype/nipype/interfaces/tests/test_runtime_monitor.py /src/nipype/nipype/pipeline/plugins/tests/test_multiproc*.py + py.test -v --junitxml=${WORKDIR}/tests/pytests_py${PYTHON_VERSION}_extra.xml --cov nipype --cov-report xml:${WORKDIR}/tests/coverage_py${PYTHON_VERSION}_extra.xml /src/nipype/nipype/utils/tests/test_runtime_monitor.py /src/nipype/nipype/pipeline/plugins/tests/test_multiproc*.py exit_code=$(( $exit_code + $? )) fi From 2a37693e0ac0ff5ec23a95c8382c8e92d41f2cf7 Mon Sep 17 00:00:00 2001 From: oesteban Date: Mon, 25 Sep 2017 23:34:23 -0700 Subject: [PATCH 251/643] fix test (amend previous commit) --- docker/files/run_pytests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/files/run_pytests.sh b/docker/files/run_pytests.sh index e994b0ca41..622772d3ae 100644 --- a/docker/files/run_pytests.sh +++ b/docker/files/run_pytests.sh @@ -33,7 +33,7 @@ if [[ "${PYTHON_VERSION}" -ge "30" ]]; then echo '[execution]' >> ${HOME}/.nipype/nipype.cfg echo 'resource_monitor = true' >> ${HOME}/.nipype/nipype.cfg export COVERAGE_FILE=${WORKDIR}/tests/.coverage.py${PYTHON_VERSION}_extra - py.test -v --junitxml=${WORKDIR}/tests/pytests_py${PYTHON_VERSION}_extra.xml --cov nipype --cov-report xml:${WORKDIR}/tests/coverage_py${PYTHON_VERSION}_extra.xml /src/nipype/nipype/utils/tests/test_runtime_monitor.py /src/nipype/nipype/pipeline/plugins/tests/test_multiproc*.py + py.test -v --junitxml=${WORKDIR}/tests/pytests_py${PYTHON_VERSION}_extra.xml --cov nipype --cov-report xml:${WORKDIR}/tests/coverage_py${PYTHON_VERSION}_extra.xml /src/nipype/nipype/utils/tests/test_profiler.py /src/nipype/nipype/pipeline/plugins/tests/test_multiproc*.py exit_code=$(( $exit_code + $? )) fi From 10d0f39e9728236ee35069d732d13b8243dd5a2c Mon Sep 17 00:00:00 2001 From: oesteban Date: Tue, 26 Sep 2017 00:46:23 -0700 Subject: [PATCH 252/643] address review comments --- doc/users/config_file.rst | 9 +++-- doc/users/plugins.rst | 3 +- nipype/interfaces/base.py | 10 +---- nipype/interfaces/spm/base.py | 2 +- nipype/pipeline/engine/tests/test_engine.py | 4 +- nipype/pipeline/plugins/multiproc.py | 25 ++++++------ nipype/utils/config.py | 25 ++++++++++-- nipype/utils/draw_gantt_chart.py | 1 - nipype/utils/profiler.py | 42 --------------------- setup.py | 1 - 10 files changed, 47 insertions(+), 75 deletions(-) diff --git a/doc/users/config_file.rst b/doc/users/config_file.rst index b32e5602bc..bca5f0eb00 100644 --- a/doc/users/config_file.rst +++ b/doc/users/config_file.rst @@ -17,8 +17,8 @@ Logging How detailed the logs regarding workflow should be (possible values: ``INFO`` and ``DEBUG``; default value: ``INFO``) *utils_level* - How detailed the logs regarding nipype utils like file operations - (for example overwriting warning) or the resource profiler should be + How detailed the logs regarding nipype utils, like file operations + (for example overwriting warning) or the resource profiler, should be (possible values: ``INFO`` and ``DEBUG``; default value: ``INFO``) *interface_level* @@ -148,10 +148,11 @@ Execution (possible values: ``pklz`` and ``txt``; default value: ``pklz``) *resource_monitor* - Enables monitoring the resources occupation. + Enables monitoring the resources occupation (possible values: ``true`` and + ``false``; default value: ``false``) *resource_monitor_frequency* - Sampling period (in seconds) between measurements of resources (memory, cpus) + Sampling period (in seconds) between measurements of resources (memory, cpus) being used by an interface. Requires ``resource_monitor`` to be ``true``. Example diff --git a/doc/users/plugins.rst b/doc/users/plugins.rst index 2a3620b838..4c0960c554 100644 --- a/doc/users/plugins.rst +++ b/doc/users/plugins.rst @@ -75,7 +75,8 @@ Optional arguments:: processors/threads will be automatically detected memory_gb : Total memory available to be shared by all simultaneous tasks - currently running, if not set it will be automatically estimated. + currently running, if not set it will be automatically set to 90\% of + system RAM. raise_insufficient : Raise exception when the estimated resources of a node exceed the total amount of resources available (memory and threads), when diff --git a/nipype/interfaces/base.py b/nipype/interfaces/base.py index a261195c6f..e2a3ebf29c 100644 --- a/nipype/interfaces/base.py +++ b/nipype/interfaces/base.py @@ -52,9 +52,6 @@ PY3 = sys.version_info[0] > 2 __docformat__ = 'restructuredtext' -if sys.version_info < (3, 3): - setattr(sp, 'DEVNULL', os.devnull) - class Str(traits.Unicode): pass @@ -1057,11 +1054,7 @@ def run(self, **inputs): """ from ..utils.profiler import resource_monitor, ResourceMonitor - force_raise = not ( - hasattr(self.inputs, 'ignore_exception') and - isdefined(self.inputs.ignore_exception) and - self.inputs.ignore_exception - ) + force_raise = not getattr(self.inputs, 'ignore_exception', False) self.inputs.trait_set(**inputs) self._check_mandatory_inputs() self._check_version_requirements(self.inputs) @@ -1363,6 +1356,7 @@ def _process(drain=0): while proc.returncode is None: proc.poll() _process() + time.sleep(interval) _process(drain=1) diff --git a/nipype/interfaces/spm/base.py b/nipype/interfaces/spm/base.py index 33c540f457..b4659a6a5c 100644 --- a/nipype/interfaces/spm/base.py +++ b/nipype/interfaces/spm/base.py @@ -159,7 +159,7 @@ def version(matlab_cmd=None, paths=None, use_mcr=None): return None use_mcr = use_mcr or 'FORCE_SPMMCR' in os.environ - matlab_cmd = (os.getenv('SPMMCRCMD') or + matlab_cmd = ((use_mcr and os.getenv('SPMMCRCMD')) or os.getenv('MATLABCMD') or 'matlab -nodesktop -nosplash') diff --git a/nipype/pipeline/engine/tests/test_engine.py b/nipype/pipeline/engine/tests/test_engine.py index 56c4f78e84..adaf506122 100644 --- a/nipype/pipeline/engine/tests/test_engine.py +++ b/nipype/pipeline/engine/tests/test_engine.py @@ -696,9 +696,9 @@ def func1(in1): assert n1.num_subnodes() == len(n1.inputs.in1) # test running the workflow on default conditions - # w1.run(plugin='MultiProc') + w1.run(plugin='MultiProc') - # # test output of num_subnodes method when serial is True + # test output of num_subnodes method when serial is True n1._serial = True assert n1.num_subnodes() == 1 diff --git a/nipype/pipeline/plugins/multiproc.py b/nipype/pipeline/plugins/multiproc.py index 713bdb85e2..4f25a3f286 100644 --- a/nipype/pipeline/plugins/multiproc.py +++ b/nipype/pipeline/plugins/multiproc.py @@ -124,8 +124,7 @@ def __init__(self, plugin_args=None): # Instantiate different thread pools for non-daemon processes logger.debug('MultiProcPlugin starting in "%sdaemon" mode (n_procs=%d, mem_gb=%0.2f)', 'non' if non_daemon else '', self.processors, self.memory_gb) - self.pool = (NonDaemonPool(processes=self.processors) - if non_daemon else Pool(processes=self.processors)) + self.pool = (NonDaemonPool if non_daemon else Pool)(processes=self.processors) # def _wait(self): # if len(self.pending_tasks) > 0: @@ -234,7 +233,7 @@ def _send_procs_to_workers(self, updatehash=False, graph=None): if self.procs[jobid]._interface.estimated_memory_gb <= free_memory_gb and \ self.procs[jobid]._interface.num_threads <= free_processors: - logger.info('Executing: %s ID: %d' %(self.procs[jobid]._id, jobid)) + logger.info('Executing: %s ID: %d' % (self.procs[jobid]._id, jobid)) executing_now.append(self.procs[jobid]) if isinstance(self.procs[jobid], MapNode): @@ -265,11 +264,13 @@ def _send_procs_to_workers(self, updatehash=False, graph=None): if str2bool(self.procs[jobid].config['execution']['local_hash_check']): logger.debug('checking hash locally') try: - hash_exists, _, _, _ = self.procs[ - jobid].hash_exists() - logger.debug('Hash exists %s' % str(hash_exists)) - if hash_exists and not self.procs[jobid].overwrite and \ - not self.procs[jobid]._interface.always_run: + hash_exists, _, _, _ = self.procs[jobid].hash_exists() + overwrite = self.procs[jobid].overwrite + always_run = self.procs[jobid]._interface.always_run + if (hash_exists and (overwrite is False or + (overwrite is None and not always_run))): + logger.debug('Skipping cached node %s with ID %s.', + self.procs[jobid]._id, jobid) self._task_finished_cb(jobid) self._remove_node_dirs() continue @@ -280,7 +281,8 @@ def _send_procs_to_workers(self, updatehash=False, graph=None): self._clean_queue(jobid, graph) self.proc_pending[jobid] = False continue - logger.debug('Finished checking hash') + finally: + logger.debug('Finished checking hash') if self.procs[jobid].run_without_submitting: logger.debug('Running node %s on master thread', @@ -291,8 +293,9 @@ def _send_procs_to_workers(self, updatehash=False, graph=None): etype, eval, etr = sys.exc_info() traceback = format_exception(etype, eval, etr) report_crash(self.procs[jobid], traceback=traceback) - self._task_finished_cb(jobid) - self._remove_node_dirs() + finally: + self._task_finished_cb(jobid) + self._remove_node_dirs() else: logger.debug('MultiProcPlugin submitting %s', str(jobid)) diff --git a/nipype/utils/config.py b/nipype/utils/config.py index 6aaf3bf2d3..86bc0738a0 100644 --- a/nipype/utils/config.py +++ b/nipype/utils/config.py @@ -11,21 +11,24 @@ ''' from __future__ import print_function, division, unicode_literals, absolute_import import os -import shutil import errno from warnings import warn from io import StringIO from distutils.version import LooseVersion -from simplejson import load, dump +import configparser import numpy as np from builtins import str, object, open + +from simplejson import load, dump +from ..external import portalocker from future import standard_library standard_library.install_aliases() -import configparser -from ..external import portalocker +CONFIG_DEPRECATIONS = { + 'profile_runtime': ('resource_monitor', '1.13.2'), +} NUMPY_MMAP = LooseVersion(np.__version__) >= LooseVersion('1.12.0') @@ -115,6 +118,13 @@ def set_log_dir(self, log_dir): self._config.set('logging', 'log_directory', log_dir) def get(self, section, option, default=None): + if option in CONFIG_DEPRECATIONS: + msg = ('Config option "%s" has been deprecated as of nipype %s. Please use ' + '"%s" instead.') % (option, CONFIG_DEPRECATIONS[option][1], + CONFIG_DEPRECATIONS[option][0]) + warn(msg) + option = CONFIG_DEPRECATIONS[option][0] + if self._config.has_option(section, option): return self._config.get(section, option) return default @@ -123,6 +133,13 @@ def set(self, section, option, value): if isinstance(value, bool): value = str(value) + if option in CONFIG_DEPRECATIONS: + msg = ('Config option "%s" has been deprecated as of nipype %s. Please use ' + '"%s" instead.') % (option, CONFIG_DEPRECATIONS[option][1], + CONFIG_DEPRECATIONS[option][0]) + warn(msg) + option = CONFIG_DEPRECATIONS[option][0] + return self._config.set(section, option, value) def getboolean(self, section, option): diff --git a/nipype/utils/draw_gantt_chart.py b/nipype/utils/draw_gantt_chart.py index e21965480f..c91acf662c 100644 --- a/nipype/utils/draw_gantt_chart.py +++ b/nipype/utils/draw_gantt_chart.py @@ -11,7 +11,6 @@ import random import datetime import simplejson as json -from dateutil import parser from builtins import str, range, open # Py2 compat: http://python-future.org/compatible_idioms.html#collections-counter-and-ordereddict from future import standard_library diff --git a/nipype/utils/profiler.py b/nipype/utils/profiler.py index 2bfc9746c5..07a7a51035 100644 --- a/nipype/utils/profiler.py +++ b/nipype/utils/profiler.py @@ -265,45 +265,3 @@ def _get_ram_mb(pid, pyfunc=False): # Return memory return mem_mb - - -def main(): - """ - A minimal entry point to measure any process using psutil - """ - from argparse import ArgumentParser - from argparse import RawTextHelpFormatter - - parser = ArgumentParser(description='A minimal process monitor', - formatter_class=RawTextHelpFormatter) - parser.add_argument('pid', action='store', type=int, - help='process PID to monitor') - parser.add_argument('-o', '--out-file', action='store', default='.prof', - help='file where monitor will be writting') - parser.add_argument('-f', '--freq', action='store', type=float, default=5.0, - help='sampling frequency') - opts = parser.parse_args() - _probe_loop(opts.pid, opts.out_file, wait=opts.freq) - - -def _probe_loop(pid, fname, wait=None): - from time import sleep - - print('Start monitoring') - if wait is None: - wait = 5 - - proffh = open(fname, 'w') - while True: - try: - proffh.write('%f,%d\n' % (_get_ram_mb(pid), _get_num_threads(pid))) - proffh.flush() - sleep(wait) - except (Exception, KeyboardInterrupt): - proffh.close() - print('\nFinished.') - return - - -if __name__ == "__main__": - main() diff --git a/setup.py b/setup.py index 3453901b3e..331fa5905b 100755 --- a/setup.py +++ b/setup.py @@ -148,7 +148,6 @@ def main(): entry_points=''' [console_scripts] nipypecli=nipype.scripts.cli:cli - nipype_mprof=nipype.utils.profiler:main ''' ) From 62a65938fdec7bf333f1b74ce9c7e6ecd5bf4f08 Mon Sep 17 00:00:00 2001 From: oesteban Date: Tue, 26 Sep 2017 00:50:14 -0700 Subject: [PATCH 253/643] fix typo --- nipype/interfaces/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nipype/interfaces/base.py b/nipype/interfaces/base.py index e2a3ebf29c..56677c466c 100644 --- a/nipype/interfaces/base.py +++ b/nipype/interfaces/base.py @@ -1356,7 +1356,7 @@ def _process(drain=0): while proc.returncode is None: proc.poll() _process() - time.sleep(interval) + time.sleep(0) _process(drain=1) From d6401f3c6eee244178e9496d10637ded424d977a Mon Sep 17 00:00:00 2001 From: oesteban Date: Tue, 26 Sep 2017 09:06:47 -0700 Subject: [PATCH 254/643] fixes to the tear-up section of interfaces --- nipype/interfaces/base.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/nipype/interfaces/base.py b/nipype/interfaces/base.py index 56677c466c..bff625b329 100644 --- a/nipype/interfaces/base.py +++ b/nipype/interfaces/base.py @@ -1124,15 +1124,15 @@ def run(self, **inputs): import numpy as np mon_sp.stop() - setattr(runtime, 'mem_peak_gb', None) - setattr(runtime, 'nthreads_max', None) + runtime.mem_peak_gb = None + runtime.nthreads_max = None # Read .prof file in and set runtime values vals = np.loadtxt(mon_fname, delimiter=',') - if vals: + if vals.tolist(): mem_peak_gb, nthreads = vals.max(0).astype(float).tolist() - setattr(runtime, 'mem_peak_gb', mem_peak_gb / 1024) - setattr(runtime, 'nthreads_max', int(nthreads)) + runtime.mem_peak_gb = mem_peak_gb / 1024 + runtime.nthreads_max = int(nthreads) return results From ce3f08a46ab77d5ae949f14e5d1ddce8f1ade38b Mon Sep 17 00:00:00 2001 From: oesteban Date: Tue, 26 Sep 2017 09:13:46 -0700 Subject: [PATCH 255/643] fix NoSuchProcess exception --- nipype/utils/profiler.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/nipype/utils/profiler.py b/nipype/utils/profiler.py index 07a7a51035..89e1457306 100644 --- a/nipype/utils/profiler.py +++ b/nipype/utils/profiler.py @@ -2,7 +2,7 @@ # @Author: oesteban # @Date: 2017-09-21 15:50:37 # @Last Modified by: oesteban -# @Last Modified time: 2017-09-25 16:37:02 +# @Last Modified time: 2017-09-26 09:12:36 """ Utilities to keep track of performance """ @@ -42,14 +42,20 @@ def __init__(self, pid, freq=5, fname=None): self._event = threading.Event() def stop(self): - self._event.set() - self._log.close() - self.join() + if not self._event.is_set(): + self._event.set() + self._log.close() + self.join() def run(self): while not self._event.is_set(): - self._log.write('%f,%d\n' % (_get_ram_mb(self._pid), - _get_num_threads(self._pid))) + try: + ram = _get_ram_mb(self._pid) + cpus = _get_num_threads(self._pid) + except psutil.NoSuchProcess: + self.stop() + + self._log.write('%f,%d\n' % (ram, cpus)) self._log.flush() self._event.wait(self._freq) From ffb750986c71c79634533fabd264eb381d83bdff Mon Sep 17 00:00:00 2001 From: oesteban Date: Tue, 26 Sep 2017 11:05:51 -0700 Subject: [PATCH 256/643] making monitor robuster --- nipype/interfaces/base.py | 7 +-- nipype/utils/profiler.py | 114 +++++++++++++++++++++----------------- 2 files changed, 66 insertions(+), 55 deletions(-) diff --git a/nipype/interfaces/base.py b/nipype/interfaces/base.py index bff625b329..898caed50a 100644 --- a/nipype/interfaces/base.py +++ b/nipype/interfaces/base.py @@ -1092,7 +1092,7 @@ def run(self, **inputs): except Exception as e: import traceback # Retrieve the maximum info fast - setattr(runtime, 'traceback', traceback.format_exc()) + runtime.traceback = traceback.format_exc() # Gather up the exception arguments and append nipype info. exc_args = e.args if getattr(e, 'args') else tuple() exc_args += ('An exception of type %s occurred while running interface %s.' % @@ -1100,8 +1100,7 @@ def run(self, **inputs): if config.get('logging', 'interface_level', 'info').lower() == 'debug': exc_args += ('Inputs: %s' % str(self.inputs),) - setattr(runtime, 'traceback_args', - ('\n'.join(['%s' % arg for arg in exc_args]),)) + runtime.traceback_args = ('\n'.join(['%s' % arg for arg in exc_args]),) if force_raise: raise @@ -1130,7 +1129,7 @@ def run(self, **inputs): # Read .prof file in and set runtime values vals = np.loadtxt(mon_fname, delimiter=',') if vals.tolist(): - mem_peak_gb, nthreads = vals.max(0).astype(float).tolist() + mem_peak_gb, nthreads = np.atleast_2d(vals).max(0).astype(float).tolist() runtime.mem_peak_gb = mem_peak_gb / 1024 runtime.nthreads_max = int(nthreads) diff --git a/nipype/utils/profiler.py b/nipype/utils/profiler.py index 89e1457306..68b55d48c0 100644 --- a/nipype/utils/profiler.py +++ b/nipype/utils/profiler.py @@ -2,13 +2,14 @@ # @Author: oesteban # @Date: 2017-09-21 15:50:37 # @Last Modified by: oesteban -# @Last Modified time: 2017-09-26 09:12:36 +# @Last Modified time: 2017-09-26 10:56:03 """ Utilities to keep track of performance """ from __future__ import print_function, division, unicode_literals, absolute_import import threading +from time import time try: import psutil except ImportError as exc: @@ -26,6 +27,9 @@ 'necessary package "psutil" could not be imported.') resource_monitor = False +# Init variables +_MB = 1024.0**2 + class ResourceMonitor(threading.Thread): def __init__(self, pid, freq=5, fname=None): @@ -37,6 +41,8 @@ def __init__(self, pid, freq=5, fname=None): self._pid = pid self._log = open(fname, 'w') + self._log.write('%s,0.0,0\n' % time()) + self._log.flush() self._freq = freq threading.Thread.__init__(self) self._event = threading.Event() @@ -52,11 +58,15 @@ def run(self): try: ram = _get_ram_mb(self._pid) cpus = _get_num_threads(self._pid) - except psutil.NoSuchProcess: - self.stop() + if all(ram is not None, cpus is not None): + self._log.write('%s,%f,%d\n' % (time(), ram, cpus)) + self._log.flush() + except ValueError as e: + if e.args == ('I/O operation on closed file.',): + pass + except Exception: + pass - self._log.write('%f,%d\n' % (ram, cpus)) - self._log.flush() self._event.wait(self._freq) @@ -190,37 +200,40 @@ def _get_num_threads(pid): """ - proc = psutil.Process(pid) - # If process is running - if proc.status() == psutil.STATUS_RUNNING: - num_threads = proc.num_threads() - elif proc.num_threads() > 1: - tprocs = [psutil.Process(thr.id) for thr in proc.threads()] - alive_tprocs = [tproc for tproc in tprocs if tproc.status() == psutil.STATUS_RUNNING] - num_threads = len(alive_tprocs) - else: - num_threads = 1 - - child_threads = 0 - # Iterate through child processes and get number of their threads - for child in proc.children(recursive=True): - # Leaf process - if len(child.children()) == 0: - # If process is running, get its number of threads - if child.status() == psutil.STATUS_RUNNING: - child_thr = child.num_threads() - # If its not necessarily running, but still multi-threaded - elif child.num_threads() > 1: - # Cast each thread as a process and check for only running - tprocs = [psutil.Process(thr.id) for thr in child.threads()] - alive_tprocs = [tproc for tproc in tprocs - if tproc.status() == psutil.STATUS_RUNNING] - child_thr = len(alive_tprocs) - # Otherwise, no threads are running - else: - child_thr = 0 - # Increment child threads - child_threads += child_thr + try: + proc = psutil.Process(pid) + # If process is running + if proc.status() == psutil.STATUS_RUNNING: + num_threads = proc.num_threads() + elif proc.num_threads() > 1: + tprocs = [psutil.Process(thr.id) for thr in proc.threads()] + alive_tprocs = [tproc for tproc in tprocs if tproc.status() == psutil.STATUS_RUNNING] + num_threads = len(alive_tprocs) + else: + num_threads = 1 + + child_threads = 0 + # Iterate through child processes and get number of their threads + for child in proc.children(recursive=True): + # Leaf process + if len(child.children()) == 0: + # If process is running, get its number of threads + if child.status() == psutil.STATUS_RUNNING: + child_thr = child.num_threads() + # If its not necessarily running, but still multi-threaded + elif child.num_threads() > 1: + # Cast each thread as a process and check for only running + tprocs = [psutil.Process(thr.id) for thr in child.threads()] + alive_tprocs = [tproc for tproc in tprocs + if tproc.status() == psutil.STATUS_RUNNING] + child_thr = len(alive_tprocs) + # Otherwise, no threads are running + else: + child_thr = 0 + # Increment child threads + child_threads += child_thr + except psutil.NoSuchProcess: + return None # Number of threads is max between found active children and parent num_threads = max(child_threads, num_threads) @@ -253,21 +266,20 @@ def _get_ram_mb(pid, pyfunc=False): the memory RAM in MB utilized by the process PID """ - - # Init variables - _MB = 1024.0**2 - - # Init parent - parent = psutil.Process(pid) - # Get memory of parent - parent_mem = parent.memory_info().rss - mem_mb = parent_mem / _MB - # Iterate through child processes - for child in parent.children(recursive=True): - child_mem = child.memory_info().rss - if pyfunc: - child_mem -= parent_mem - mem_mb += child_mem / _MB + try: + # Init parent + parent = psutil.Process(pid) + # Get memory of parent + parent_mem = parent.memory_info().rss + mem_mb = parent_mem / _MB + # Iterate through child processes + for child in parent.children(recursive=True): + child_mem = child.memory_info().rss + if pyfunc: + child_mem -= parent_mem + mem_mb += child_mem / _MB + except psutil.NoSuchProcess: + return None # Return memory return mem_mb From 085dff96cfbc83df6d52d86f5cbb918970d40d6f Mon Sep 17 00:00:00 2001 From: oesteban Date: Tue, 26 Sep 2017 11:09:26 -0700 Subject: [PATCH 257/643] [ENH] Update C3D version in nipype/base docker image Since sourceforge is having some hiccups and we were using the outdated 1.0.0 version, this PR updates it to 1.1.0 and pulls it down from OSF, which seems more reliable. --- docker/base.Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/base.Dockerfile b/docker/base.Dockerfile index 5b39951f64..25fbb36401 100644 --- a/docker/base.Dockerfile +++ b/docker/base.Dockerfile @@ -109,7 +109,7 @@ ENV PATH=/usr/lib/fsl/5.0:/usr/lib/afni/bin:$ANTSPATH:$PATH # Installing and setting up c3d RUN mkdir -p /opt/c3d && \ - curl -sSL "http://downloads.sourceforge.net/project/c3d/c3d/1.0.0/c3d-1.0.0-Linux-x86_64.tar.gz" \ + curl -sSL "https://files.osf.io/v1/resources/nefdp/providers/osfstorage/59ca96a9b83f69025d6b8985?action=download&version=1&direct" \ | tar -xzC /opt/c3d --strip-components 1 ENV C3DPATH=/opt/c3d/ From c9b474b014fad7802d8f612e57cab09a07efa645 Mon Sep 17 00:00:00 2001 From: oesteban Date: Tue, 26 Sep 2017 16:40:12 -0700 Subject: [PATCH 258/643] first functional prototype --- nipype/interfaces/afni/base.py | 7 ++++-- nipype/interfaces/base.py | 18 ++++++++++------ nipype/interfaces/dynamic_slicer.py | 3 ++- nipype/interfaces/matlab.py | 1 + nipype/interfaces/spm/base.py | 14 +++++------- nipype/pipeline/engine/utils.py | 8 ++++--- nipype/pipeline/plugins/condor.py | 2 ++ nipype/pipeline/plugins/dagman.py | 1 + nipype/pipeline/plugins/lsf.py | 2 ++ nipype/pipeline/plugins/oar.py | 1 + nipype/pipeline/plugins/pbs.py | 2 ++ nipype/pipeline/plugins/pbsgraph.py | 1 + nipype/pipeline/plugins/sge.py | 1 + nipype/pipeline/plugins/sgegraph.py | 1 + nipype/pipeline/plugins/slurm.py | 2 ++ nipype/pipeline/plugins/slurmgraph.py | 1 + nipype/utils/docparse.py | 2 ++ nipype/utils/profiler.py | 31 ++++++++++++--------------- nipype/utils/spm_docs.py | 2 +- 19 files changed, 61 insertions(+), 39 deletions(-) diff --git a/nipype/interfaces/afni/base.py b/nipype/interfaces/afni/base.py index 35751d4e5c..b834b34163 100644 --- a/nipype/interfaces/afni/base.py +++ b/nipype/interfaces/afni/base.py @@ -45,6 +45,7 @@ def version(): """ try: clout = CommandLine(command='afni --version', + resource_monitor=False, terminal_output='allatonce').run() except IOError: # If afni_vcheck is not present, return None @@ -105,7 +106,9 @@ def standard_image(img_name): '''Grab an image from the standard location. Could be made more fancy to allow for more relocatability''' - clout = CommandLine('which afni', ignore_exception=True, + clout = CommandLine('which afni', + ignore_exception=True, + resource_monitor=False, terminal_output='allatonce').run() if clout.runtime.returncode is not 0: return None @@ -295,4 +298,4 @@ def cmd(self): @property def cmdline(self): - return "{} {}".format(self.inputs.py27_path, super(AFNIPythonCommand, self).cmdline) \ No newline at end of file + return "{} {}".format(self.inputs.py27_path, super(AFNIPythonCommand, self).cmdline) diff --git a/nipype/interfaces/base.py b/nipype/interfaces/base.py index 898caed50a..a200eb900f 100644 --- a/nipype/interfaces/base.py +++ b/nipype/interfaces/base.py @@ -729,9 +729,12 @@ def _get_filecopy_info(self): class BaseInterfaceInputSpec(TraitedSpec): - ignore_exception = traits.Bool(False, desc="Print an error message instead \ -of throwing an exception in case the interface fails to run", usedefault=True, - nohash=True) + ignore_exception = traits.Bool(False, usedefault=True, nohash=True, + desc='Print an error message instead of throwing an exception ' + 'in case the interface fails to run') + resource_monitor = traits.Bool(True, usedefault=True, nohash=True, + desc='Disable the resource monitor for this interface ' + '(overloads the default nipype config).') class BaseInterface(Interface): @@ -1054,6 +1057,7 @@ def run(self, **inputs): """ from ..utils.profiler import resource_monitor, ResourceMonitor + enable_rm = resource_monitor and self.inputs.resource_monitor force_raise = not getattr(self.inputs, 'ignore_exception', False) self.inputs.trait_set(**inputs) self._check_mandatory_inputs() @@ -1076,10 +1080,12 @@ def run(self, **inputs): version=self.version) mon_sp = None - if resource_monitor: + if enable_rm: mon_freq = config.get('execution', 'resource_monitor_frequency', 1) proc_pid = os.getpid() mon_fname = os.path.abspath('.prof-%d_freq-%0.3f' % (proc_pid, mon_freq)) + iflogger.debug('Creating a ResourceMonitor on a %s interface: %s', + self.__class__.__name__, mon_fname) mon_sp = ResourceMonitor(proc_pid, freq=mon_freq, fname=mon_fname) mon_sp.start() @@ -1119,7 +1125,7 @@ def run(self, **inputs): results.provenance = write_provenance(results) # Make sure runtime profiler is shut down - if resource_monitor: + if enable_rm: import numpy as np mon_sp.stop() @@ -1129,7 +1135,7 @@ def run(self, **inputs): # Read .prof file in and set runtime values vals = np.loadtxt(mon_fname, delimiter=',') if vals.tolist(): - mem_peak_gb, nthreads = np.atleast_2d(vals).max(0).astype(float).tolist() + _, mem_peak_gb, nthreads = np.atleast_2d(vals).max(0).astype(float).tolist() runtime.mem_peak_gb = mem_peak_gb / 1024 runtime.nthreads_max = int(nthreads) diff --git a/nipype/interfaces/dynamic_slicer.py b/nipype/interfaces/dynamic_slicer.py index d38f4171f3..4d1df1e136 100644 --- a/nipype/interfaces/dynamic_slicer.py +++ b/nipype/interfaces/dynamic_slicer.py @@ -25,7 +25,8 @@ class SlicerCommandLine(CommandLine): output_spec = DynamicTraitedSpec def _grab_xml(self, module): - cmd = CommandLine(command="Slicer3", args="--launch %s --xml" % module) + cmd = CommandLine(command="Slicer3", resource_monitor=False, + args="--launch %s --xml" % module) ret = cmd.run() if ret.runtime.returncode == 0: return xml.dom.minidom.parseString(ret.runtime.stdout) diff --git a/nipype/interfaces/matlab.py b/nipype/interfaces/matlab.py index d3f6f26993..b56ef3ce17 100644 --- a/nipype/interfaces/matlab.py +++ b/nipype/interfaces/matlab.py @@ -22,6 +22,7 @@ def get_matlab_command(): try: res = CommandLine(command='which', args=matlab_cmd, + resource_monitor=False, terminal_output='allatonce').run() matlab_path = res.runtime.stdout.strip() except Exception as e: diff --git a/nipype/interfaces/spm/base.py b/nipype/interfaces/spm/base.py index b4659a6a5c..391528e83b 100644 --- a/nipype/interfaces/spm/base.py +++ b/nipype/interfaces/spm/base.py @@ -29,7 +29,7 @@ # Local imports from ... import logging from ...utils import spm_docs as sd, NUMPY_MMAP -from ..base import (BaseInterface, CommandLine, traits, isdefined, InputMultiPath, +from ..base import (BaseInterface, traits, isdefined, InputMultiPath, BaseInterfaceInputSpec, Directory, Undefined, ImageFile) from ..matlab import MatlabCommand from ...external.due import due, Doi, BibTeX @@ -152,18 +152,13 @@ def version(matlab_cmd=None, paths=None, use_mcr=None): returns None of path not found """ - # Test if matlab is installed, exit quickly if not. - clout = CommandLine('which matlab', ignore_exception=True, - terminal_output='allatonce').run() - if clout.runtime.returncode is not 0: - return None - use_mcr = use_mcr or 'FORCE_SPMMCR' in os.environ matlab_cmd = ((use_mcr and os.getenv('SPMMCRCMD')) or os.getenv('MATLABCMD') or 'matlab -nodesktop -nosplash') - mlab = MatlabCommand(matlab_cmd=matlab_cmd) + mlab = MatlabCommand(matlab_cmd=matlab_cmd, + resource_monitor=False) mlab.inputs.mfile = False if paths: mlab.inputs.paths = paths @@ -280,7 +275,8 @@ def _matlab_cmd_update(self): # and can be set only during init self.mlab = MatlabCommand(matlab_cmd=self.inputs.matlab_cmd, mfile=self.inputs.mfile, - paths=self.inputs.paths) + paths=self.inputs.paths, + resource_monitor=False) self.mlab.inputs.script_file = 'pyscript_%s.m' % \ self.__class__.__name__.split('.')[-1].lower() if isdefined(self.inputs.use_mcr) and self.inputs.use_mcr: diff --git a/nipype/pipeline/engine/utils.py b/nipype/pipeline/engine/utils.py index f677d6c253..48e3f6ed49 100644 --- a/nipype/pipeline/engine/utils.py +++ b/nipype/pipeline/engine/utils.py @@ -1022,7 +1022,8 @@ def export_graph(graph_in, base_dir=None, show=False, use_execgraph=False, _write_detailed_dot(graph, outfname) if format != 'dot': cmd = 'dot -T%s -O %s' % (format, outfname) - res = CommandLine(cmd, terminal_output='allatonce').run() + res = CommandLine(cmd, terminal_output='allatonce', + resource_monitor=False).run() if res.runtime.returncode: logger.warn('dot2png: %s', res.runtime.stderr) pklgraph = _create_dot_graph(graph, show_connectinfo, simple_form) @@ -1033,7 +1034,8 @@ def export_graph(graph_in, base_dir=None, show=False, use_execgraph=False, nx.drawing.nx_pydot.write_dot(pklgraph, simplefname) if format != 'dot': cmd = 'dot -T%s -O %s' % (format, simplefname) - res = CommandLine(cmd, terminal_output='allatonce').run() + res = CommandLine(cmd, terminal_output='allatonce', + resource_monitor=False).run() if res.runtime.returncode: logger.warn('dot2png: %s', res.runtime.stderr) if show: @@ -1053,7 +1055,7 @@ def format_dot(dotfilename, format='png'): if format != 'dot': cmd = 'dot -T%s -O \'%s\'' % (format, dotfilename) try: - CommandLine(cmd).run() + CommandLine(cmd, resource_monitor=False).run() except IOError as ioe: if "could not be found" in str(ioe): raise IOError("Cannot draw directed graph; executable 'dot' is unavailable") diff --git a/nipype/pipeline/plugins/condor.py b/nipype/pipeline/plugins/condor.py index 9b8b5c218d..de4265e3f3 100644 --- a/nipype/pipeline/plugins/condor.py +++ b/nipype/pipeline/plugins/condor.py @@ -46,6 +46,7 @@ def __init__(self, **kwargs): def _is_pending(self, taskid): cmd = CommandLine('condor_q', + resource_monitor=False, terminal_output='allatonce') cmd.inputs.args = '%d' % taskid # check condor cluster @@ -59,6 +60,7 @@ def _is_pending(self, taskid): def _submit_batchtask(self, scriptfile, node): cmd = CommandLine('condor_qsub', environ=dict(os.environ), + resource_monitor=False, terminal_output='allatonce') path = os.path.dirname(scriptfile) qsubargs = '' diff --git a/nipype/pipeline/plugins/dagman.py b/nipype/pipeline/plugins/dagman.py index 1001ab5dac..61aa44229e 100644 --- a/nipype/pipeline/plugins/dagman.py +++ b/nipype/pipeline/plugins/dagman.py @@ -154,6 +154,7 @@ def _submit_graph(self, pyfiles, dependencies, nodes): child)) # hand over DAG to condor_dagman cmd = CommandLine('condor_submit_dag', environ=dict(os.environ), + resource_monitor=False, terminal_output='allatonce') # needs -update_submit or re-running a workflow will fail cmd.inputs.args = '%s -update_submit %s' % (self._dagman_args, diff --git a/nipype/pipeline/plugins/lsf.py b/nipype/pipeline/plugins/lsf.py index 6e27b3ab95..d065b521d8 100644 --- a/nipype/pipeline/plugins/lsf.py +++ b/nipype/pipeline/plugins/lsf.py @@ -45,6 +45,7 @@ def _is_pending(self, taskid): finished and is ready to be checked for completeness. So return True if status is either 'PEND' or 'RUN'""" cmd = CommandLine('bjobs', + resource_monitor=False, terminal_output='allatonce') cmd.inputs.args = '%d' % taskid # check lsf task @@ -60,6 +61,7 @@ def _is_pending(self, taskid): def _submit_batchtask(self, scriptfile, node): cmd = CommandLine('bsub', environ=dict(os.environ), + resource_monitor=False, terminal_output='allatonce') path = os.path.dirname(scriptfile) bsubargs = '' diff --git a/nipype/pipeline/plugins/oar.py b/nipype/pipeline/plugins/oar.py index ca77fade1e..d3a9c6f360 100644 --- a/nipype/pipeline/plugins/oar.py +++ b/nipype/pipeline/plugins/oar.py @@ -68,6 +68,7 @@ def _is_pending(self, taskid): def _submit_batchtask(self, scriptfile, node): cmd = CommandLine('oarsub', environ=dict(os.environ), + resource_monitor=False, terminal_output='allatonce') path = os.path.dirname(scriptfile) oarsubargs = '' diff --git a/nipype/pipeline/plugins/pbs.py b/nipype/pipeline/plugins/pbs.py index 5288bb36cb..62b35fa99a 100644 --- a/nipype/pipeline/plugins/pbs.py +++ b/nipype/pipeline/plugins/pbs.py @@ -48,6 +48,7 @@ def _is_pending(self, taskid): result = CommandLine('qstat {}'.format(taskid), environ=dict(os.environ), terminal_output='allatonce', + resource_monitor=False, ignore_exception=True).run() stderr = result.runtime.stderr errmsg = 'Unknown Job Id' # %s' % taskid @@ -59,6 +60,7 @@ def _is_pending(self, taskid): def _submit_batchtask(self, scriptfile, node): cmd = CommandLine('qsub', environ=dict(os.environ), + resource_monitor=False, terminal_output='allatonce') path = os.path.dirname(scriptfile) qsubargs = '' diff --git a/nipype/pipeline/plugins/pbsgraph.py b/nipype/pipeline/plugins/pbsgraph.py index 1aafd24e37..719b82578c 100644 --- a/nipype/pipeline/plugins/pbsgraph.py +++ b/nipype/pipeline/plugins/pbsgraph.py @@ -55,6 +55,7 @@ def _submit_graph(self, pyfiles, dependencies, nodes): qsub_args, batchscriptfile)) cmd = CommandLine('sh', environ=dict(os.environ), + resource_monitor=False, terminal_output='allatonce') cmd.inputs.args = '%s' % submitjobsfile cmd.run() diff --git a/nipype/pipeline/plugins/sge.py b/nipype/pipeline/plugins/sge.py index 268fecf2a9..d337ebb961 100644 --- a/nipype/pipeline/plugins/sge.py +++ b/nipype/pipeline/plugins/sge.py @@ -364,6 +364,7 @@ def _is_pending(self, taskid): def _submit_batchtask(self, scriptfile, node): cmd = CommandLine('qsub', environ=dict(os.environ), + resource_monitor=False, terminal_output='allatonce') path = os.path.dirname(scriptfile) qsubargs = '' diff --git a/nipype/pipeline/plugins/sgegraph.py b/nipype/pipeline/plugins/sgegraph.py index dd4b8076e8..882c455450 100644 --- a/nipype/pipeline/plugins/sgegraph.py +++ b/nipype/pipeline/plugins/sgegraph.py @@ -147,6 +147,7 @@ def make_job_name(jobnumber, nodeslist): batchscript=batchscriptfile) fp.writelines(full_line) cmd = CommandLine('bash', environ=dict(os.environ), + resource_monitor=False, terminal_output='allatonce') cmd.inputs.args = '%s' % submitjobsfile cmd.run() diff --git a/nipype/pipeline/plugins/slurm.py b/nipype/pipeline/plugins/slurm.py index 3f83772f6a..083f804a75 100644 --- a/nipype/pipeline/plugins/slurm.py +++ b/nipype/pipeline/plugins/slurm.py @@ -62,6 +62,7 @@ def _is_pending(self, taskid): # subprocess.Popen requires taskid to be a string res = CommandLine('squeue', args=' '.join(['-j', '%s' % taskid]), + resource_monitor=False, terminal_output='allatonce').run() return res.runtime.stdout.find(str(taskid)) > -1 @@ -72,6 +73,7 @@ def _submit_batchtask(self, scriptfile, node): formatting/processing """ cmd = CommandLine('sbatch', environ=dict(os.environ), + resource_monitor=False, terminal_output='allatonce') path = os.path.dirname(scriptfile) diff --git a/nipype/pipeline/plugins/slurmgraph.py b/nipype/pipeline/plugins/slurmgraph.py index 794a35bc84..ed571ecffe 100644 --- a/nipype/pipeline/plugins/slurmgraph.py +++ b/nipype/pipeline/plugins/slurmgraph.py @@ -146,6 +146,7 @@ def make_job_name(jobnumber, nodeslist): batchscript=batchscriptfile) fp.writelines(full_line) cmd = CommandLine('bash', environ=dict(os.environ), + resource_monitor=False, terminal_output='allatonce') cmd.inputs.args = '%s' % submitjobsfile cmd.run() diff --git a/nipype/utils/docparse.py b/nipype/utils/docparse.py index ebf52d06d3..0d6bce7d45 100644 --- a/nipype/utils/docparse.py +++ b/nipype/utils/docparse.py @@ -254,6 +254,7 @@ def get_doc(cmd, opt_map, help_flag=None, trap_error=True): """ res = CommandLine('which %s' % cmd.split(' ')[0], + resource_monitor=False, terminal_output='allatonce').run() cmd_path = res.runtime.stdout.strip() if cmd_path == '': @@ -330,6 +331,7 @@ def get_params_from_doc(cmd, style='--', help_flag=None, trap_error=True): """ res = CommandLine('which %s' % cmd.split(' ')[0], + resource_monitor=False, terminal_output='allatonce').run() cmd_path = res.runtime.stdout.strip() if cmd_path == '': diff --git a/nipype/utils/profiler.py b/nipype/utils/profiler.py index 68b55d48c0..4ace5ef6d7 100644 --- a/nipype/utils/profiler.py +++ b/nipype/utils/profiler.py @@ -2,7 +2,7 @@ # @Author: oesteban # @Date: 2017-09-21 15:50:37 # @Last Modified by: oesteban -# @Last Modified time: 2017-09-26 10:56:03 +# @Last Modified time: 2017-09-26 15:05:24 """ Utilities to keep track of performance """ @@ -40,33 +40,30 @@ def __init__(self, pid, freq=5, fname=None): fname = '.nipype.prof' self._pid = pid - self._log = open(fname, 'w') - self._log.write('%s,0.0,0\n' % time()) - self._log.flush() + self._fname = fname self._freq = freq + + self._log = open(self._fname, 'w') + print('%s,0.0,0' % time(), file=self._log) + self._log.flush() threading.Thread.__init__(self) self._event = threading.Event() def stop(self): if not self._event.is_set(): self._event.set() - self._log.close() self.join() + self._log.flush() + self._log.close() def run(self): while not self._event.is_set(): - try: - ram = _get_ram_mb(self._pid) - cpus = _get_num_threads(self._pid) - if all(ram is not None, cpus is not None): - self._log.write('%s,%f,%d\n' % (time(), ram, cpus)) - self._log.flush() - except ValueError as e: - if e.args == ('I/O operation on closed file.',): - pass - except Exception: - pass - + ram = _get_ram_mb(self._pid) + cpus = _get_num_threads(self._pid) + if ram is not None and cpus is not None: + print('%s,%f,%d' % (time(), ram, cpus), + file=self._log) + self._log.flush() self._event.wait(self._freq) diff --git a/nipype/utils/spm_docs.py b/nipype/utils/spm_docs.py index 1b7a1a1dc4..89869c1e87 100644 --- a/nipype/utils/spm_docs.py +++ b/nipype/utils/spm_docs.py @@ -27,7 +27,7 @@ def grab_doc(task_name): """ - cmd = matlab.MatlabCommandLine() + cmd = matlab.MatlabCommandLine(resource_monitor=False) # We need to tell Matlab where to find our spm_get_doc.m file. cwd = os.path.dirname(__file__) # Build matlab command From cf1f15bc26d30ef3714d38851086eecafc7566d6 Mon Sep 17 00:00:00 2001 From: oesteban Date: Tue, 26 Sep 2017 17:55:55 -0700 Subject: [PATCH 259/643] add warning to old filemanip logger --- nipype/utils/logger.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/nipype/utils/logger.py b/nipype/utils/logger.py index 73088a2fcf..59230210b3 100644 --- a/nipype/utils/logger.py +++ b/nipype/utils/logger.py @@ -6,6 +6,7 @@ # vi: set ft=python sts=4 ts=4 sw=4 et: import logging +from warnings import warn import os import sys from .misc import str2bool @@ -15,7 +16,6 @@ RFHandler except ImportError: # Next 2 lines are optional: issue a warning to the user - from warnings import warn warn("ConcurrentLogHandler not installed. Using builtin log handler") from logging.handlers import RotatingFileHandler as RFHandler @@ -34,10 +34,12 @@ def __init__(self, config): # logging.basicConfig(stream=sys.stdout) self._logger = logging.getLogger('workflow') self._utlogger = logging.getLogger('utils') + self._fmlogger = logging.getLogger('filemanip') self._iflogger = logging.getLogger('interface') self.loggers = {'workflow': self._logger, 'utils': self._utlogger, + 'filemanip': self._fmlogger, 'interface': self._iflogger} self._hdlr = None self.update_logging(self._config) @@ -55,6 +57,7 @@ def enable_file_logging(self): self._logger.addHandler(hdlr) self._utlogger.addHandler(hdlr) self._iflogger.addHandler(hdlr) + self._fmlogger.addHandler(hdlr) self._hdlr = hdlr def disable_file_logging(self): @@ -62,6 +65,7 @@ def disable_file_logging(self): self._logger.removeHandler(self._hdlr) self._utlogger.removeHandler(self._hdlr) self._iflogger.removeHandler(self._hdlr) + self._fmlogger.removeHandler(self._hdlr) self._hdlr = None def update_logging(self, config): @@ -73,10 +77,15 @@ def update_logging(self, config): 'utils_level'))) self._iflogger.setLevel(logging.getLevelName(config.get('logging', 'interface_level'))) + self._fmlogger.setLevel(logging.getLevelName(config.get('logging', + 'filemanip_level'))) if str2bool(config.get('logging', 'log_to_file')): self.enable_file_logging() def getLogger(self, name): + if name == 'filemanip': + warn('The "filemanip" logger has been deprecated and replaced by ' + 'the "utils" logger as of nipype 1.13.2') if name in self.loggers: return self.loggers[name] return None From 4b7ab934ae00fa3b213f85a87c9dd6472099a29c Mon Sep 17 00:00:00 2001 From: oesteban Date: Tue, 26 Sep 2017 21:24:52 -0700 Subject: [PATCH 260/643] do not search for filemanip_level in config --- nipype/utils/logger.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/nipype/utils/logger.py b/nipype/utils/logger.py index 59230210b3..f07d2f8cd0 100644 --- a/nipype/utils/logger.py +++ b/nipype/utils/logger.py @@ -77,8 +77,6 @@ def update_logging(self, config): 'utils_level'))) self._iflogger.setLevel(logging.getLevelName(config.get('logging', 'interface_level'))) - self._fmlogger.setLevel(logging.getLevelName(config.get('logging', - 'filemanip_level'))) if str2bool(config.get('logging', 'log_to_file')): self.enable_file_logging() From c7a1992a2943e65ba1d130d11b51d16c24312bee Mon Sep 17 00:00:00 2001 From: oesteban Date: Tue, 26 Sep 2017 21:25:15 -0700 Subject: [PATCH 261/643] fix CommandLine interface doctest --- nipype/interfaces/base.py | 1 + 1 file changed, 1 insertion(+) diff --git a/nipype/interfaces/base.py b/nipype/interfaces/base.py index a200eb900f..8c61878f56 100644 --- a/nipype/interfaces/base.py +++ b/nipype/interfaces/base.py @@ -1472,6 +1472,7 @@ class must be instantiated with a command argument {'args': '-al', 'environ': {'DISPLAY': ':1'}, 'ignore_exception': False, + 'resource_monitor': True, 'terminal_output': 'stream'} >>> cli.inputs.get_hashval()[0][0] # doctest: +ALLOW_UNICODE From 992a81bc133e6cbd0de508821b8bd2e9eb3d8a14 Mon Sep 17 00:00:00 2001 From: mathiasg Date: Wed, 27 Sep 2017 16:17:27 -0400 Subject: [PATCH 262/643] bf: ensure template can end with os separator --- nipype/interfaces/io.py | 10 ++++++---- nipype/interfaces/tests/test_auto_SelectFiles.py | 2 -- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/nipype/interfaces/io.py b/nipype/interfaces/io.py index 155563a632..c03f0c9103 100644 --- a/nipype/interfaces/io.py +++ b/nipype/interfaces/io.py @@ -1197,8 +1197,6 @@ class SelectFilesInputSpec(DynamicTraitedSpec, BaseInterfaceInputSpec): "matches the template. Either a boolean that applies to all " "output fields or a list of output field names to coerce to " " a list")) - directory_mode = traits.Bool(False, usedefault=True, - desc="Return only directories.") class SelectFiles(IOBase): @@ -1298,6 +1296,10 @@ def _list_outputs(self): for field, template in list(self._templates.items()): + find_dirs = False + if template[-1] == os.sep: + find_dirs = True + # Build the full template path if isdefined(self.inputs.base_directory): template = op.abspath(op.join( @@ -1305,8 +1307,8 @@ def _list_outputs(self): else: template = op.abspath(template) - if self.inputs.directory_mode: - # return only directories + # re-add separator if searching exclusively for directories + if find_dirs: template += os.sep # Fill in the template and glob for files diff --git a/nipype/interfaces/tests/test_auto_SelectFiles.py b/nipype/interfaces/tests/test_auto_SelectFiles.py index 4b7aeb0fe3..da119bfcf6 100644 --- a/nipype/interfaces/tests/test_auto_SelectFiles.py +++ b/nipype/interfaces/tests/test_auto_SelectFiles.py @@ -5,8 +5,6 @@ def test_SelectFiles_inputs(): input_map = dict(base_directory=dict(), - directory_mode=dict(usedefault=True, - ), force_lists=dict(usedefault=True, ), ignore_exception=dict(nohash=True, From 06b45ee80ca8ddf4fd82f3d51418b347c4118f7a Mon Sep 17 00:00:00 2001 From: mathiasg Date: Wed, 27 Sep 2017 16:27:50 -0400 Subject: [PATCH 263/643] sty: cleanup --- nipype/interfaces/io.py | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/nipype/interfaces/io.py b/nipype/interfaces/io.py index c03f0c9103..4d3220b044 100644 --- a/nipype/interfaces/io.py +++ b/nipype/interfaces/io.py @@ -1186,17 +1186,20 @@ def _list_outputs(self): class SelectFilesInputSpec(DynamicTraitedSpec, BaseInterfaceInputSpec): base_directory = Directory(exists=True, - desc="Root path common to templates.") + desc="Root path common to templates.") sort_filelist = traits.Bool(True, usedefault=True, - desc="When matching mutliple files, return them in sorted order.") + desc="When matching mutliple files, return them" + " in sorted order.") raise_on_empty = traits.Bool(True, usedefault=True, - desc="Raise an exception if a template pattern matches no files.") + desc="Raise an exception if a template pattern " + "matches no files.") force_lists = traits.Either(traits.Bool(), traits.List(Str()), - default=False, usedefault=True, - desc=("Whether to return outputs as a list even when only one file " - "matches the template. Either a boolean that applies to all " - "output fields or a list of output field names to coerce to " - " a list")) + default=False, usedefault=True, + desc=("Whether to return outputs as a list even" + " when only one file matches the template. " + "Either a boolean that applies to all output " + "fields or a list of output field names to " + "coerce to a list")) class SelectFiles(IOBase): @@ -1296,9 +1299,7 @@ def _list_outputs(self): for field, template in list(self._templates.items()): - find_dirs = False - if template[-1] == os.sep: - find_dirs = True + find_dirs = template[-1] == os.sep # Build the full template path if isdefined(self.inputs.base_directory): From 80eb34296f0ea71ccf93eea720297456a9fae432 Mon Sep 17 00:00:00 2001 From: oesteban Date: Tue, 26 Sep 2017 21:44:27 -0700 Subject: [PATCH 264/643] fix tests --- nipype/interfaces/fsl/tests/test_preprocess.py | 3 ++- nipype/utils/tests/test_cmd.py | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/nipype/interfaces/fsl/tests/test_preprocess.py b/nipype/interfaces/fsl/tests/test_preprocess.py index 7d3d6a9dce..32f0266ddb 100644 --- a/nipype/interfaces/fsl/tests/test_preprocess.py +++ b/nipype/interfaces/fsl/tests/test_preprocess.py @@ -258,7 +258,8 @@ def test_flirt(setup_flirt): if key in ('trait_added', 'trait_modified', 'in_file', 'reference', 'environ', 'output_type', 'out_file', 'out_matrix_file', 'in_matrix_file', 'apply_xfm', 'ignore_exception', - 'terminal_output', 'out_log', 'save_log'): + 'resource_monitor', 'terminal_output', 'out_log', + 'save_log'): continue param = None value = None diff --git a/nipype/utils/tests/test_cmd.py b/nipype/utils/tests/test_cmd.py index 315d55441f..b590ecb351 100644 --- a/nipype/utils/tests/test_cmd.py +++ b/nipype/utils/tests/test_cmd.py @@ -104,6 +104,7 @@ def test_run_4d_realign_without_arguments(self): [--between_loops [BETWEEN_LOOPS [BETWEEN_LOOPS ...]]] [--ignore_exception] [--loops [LOOPS [LOOPS ...]]] + [--resource_monitor] [--slice_order SLICE_ORDER] [--speedup [SPEEDUP [SPEEDUP ...]]] [--start START] From c166c1d824146f7f7e77a4375a1c95fa721f598f Mon Sep 17 00:00:00 2001 From: oesteban Date: Tue, 26 Sep 2017 23:30:07 -0700 Subject: [PATCH 265/643] fix location of use_resources --- nipype/{interfaces => utils}/tests/use_resources | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename nipype/{interfaces => utils}/tests/use_resources (100%) diff --git a/nipype/interfaces/tests/use_resources b/nipype/utils/tests/use_resources similarity index 100% rename from nipype/interfaces/tests/use_resources rename to nipype/utils/tests/use_resources From 16c195af73e07961ced474b758d4afc31a4348ad Mon Sep 17 00:00:00 2001 From: oesteban Date: Tue, 26 Sep 2017 23:32:13 -0700 Subject: [PATCH 266/643] fix attribute error when input spec is not standard --- nipype/interfaces/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nipype/interfaces/base.py b/nipype/interfaces/base.py index 8c61878f56..ee8cb998e1 100644 --- a/nipype/interfaces/base.py +++ b/nipype/interfaces/base.py @@ -1057,7 +1057,7 @@ def run(self, **inputs): """ from ..utils.profiler import resource_monitor, ResourceMonitor - enable_rm = resource_monitor and self.inputs.resource_monitor + enable_rm = resource_monitor and getattr(self.inputs, 'resource_monitor', True) force_raise = not getattr(self.inputs, 'ignore_exception', False) self.inputs.trait_set(**inputs) self._check_mandatory_inputs() From cda3a5ebc97f98b37147bdbca5b3b5c2d842d18b Mon Sep 17 00:00:00 2001 From: oesteban Date: Tue, 26 Sep 2017 23:46:43 -0700 Subject: [PATCH 267/643] re-include filemanip logger into config documentation --- doc/users/config_file.rst | 131 +++++++++++++++++++------------------- 1 file changed, 67 insertions(+), 64 deletions(-) diff --git a/doc/users/config_file.rst b/doc/users/config_file.rst index bca5f0eb00..8fccf7e42a 100644 --- a/doc/users/config_file.rst +++ b/doc/users/config_file.rst @@ -14,49 +14,52 @@ Logging ~~~~~~~ *workflow_level* - How detailed the logs regarding workflow should be (possible values: - ``INFO`` and ``DEBUG``; default value: ``INFO``) + How detailed the logs regarding workflow should be (possible values: + ``INFO`` and ``DEBUG``; default value: ``INFO``) *utils_level* - How detailed the logs regarding nipype utils, like file operations - (for example overwriting warning) or the resource profiler, should be - (possible values: ``INFO`` and ``DEBUG``; default value: - ``INFO``) + How detailed the logs regarding nipype utils, like file operations + (for example overwriting warning) or the resource profiler, should be + (possible values: ``INFO`` and ``DEBUG``; default value: + ``INFO``) *interface_level* - How detailed the logs regarding interface execution should be (possible - values: ``INFO`` and ``DEBUG``; default value: ``INFO``) + How detailed the logs regarding interface execution should be (possible + values: ``INFO`` and ``DEBUG``; default value: ``INFO``) +*filemanip_level* (deprecated as of 0.13.2) + How detailed the logs regarding file operations (for example overwriting + warning) should be (possible values: ``INFO`` and ``DEBUG``) *log_to_file* Indicates whether logging should also send the output to a file (possible values: ``true`` and ``false``; default value: ``false``) *log_directory* - Where to store logs. (string, default value: home directory) + Where to store logs. (string, default value: home directory) *log_size* - Size of a single log file. (integer, default value: 254000) + Size of a single log file. (integer, default value: 254000) *log_rotate* - How many rotation should the log file make. (integer, default value: 4) + How many rotation should the log file make. (integer, default value: 4) Execution ~~~~~~~~~ *plugin* - This defines which execution plugin to use. (possible values: ``Linear``, - ``MultiProc``, ``SGE``, ``IPython``; default value: ``Linear``) + This defines which execution plugin to use. (possible values: ``Linear``, + ``MultiProc``, ``SGE``, ``IPython``; default value: ``Linear``) *stop_on_first_crash* - Should the workflow stop upon first node crashing or try to execute as many - nodes as possible? (possible values: ``true`` and ``false``; default value: - ``false``) + Should the workflow stop upon first node crashing or try to execute as many + nodes as possible? (possible values: ``true`` and ``false``; default value: + ``false``) *stop_on_first_rerun* - Should the workflow stop upon first node trying to recompute (by that we - mean rerunning a node that has been run before - this can happen due changed - inputs and/or hash_method since the last run). (possible values: ``true`` - and ``false``; default value: ``false``) + Should the workflow stop upon first node trying to recompute (by that we + mean rerunning a node that has been run before - this can happen due changed + inputs and/or hash_method since the last run). (possible values: ``true`` + and ``false``; default value: ``false``) *hash_method* - Should the input files be checked for changes using their content (slow, but - 100% accurate) or just their size and modification date (fast, but - potentially prone to errors)? (possible values: ``content`` and - ``timestamp``; default value: ``timestamp``) + Should the input files be checked for changes using their content (slow, but + 100% accurate) or just their size and modification date (fast, but + potentially prone to errors)? (possible values: ``content`` and + ``timestamp``; default value: ``timestamp``) *keep_inputs* Ensures that all inputs that are created in the nodes working directory are @@ -64,44 +67,44 @@ Execution value: ``false``) *single_thread_matlab* - Should all of the Matlab interfaces (including SPM) use only one thread? - This is useful if you are parallelizing your workflow using MultiProc or - IPython on a single multicore machine. (possible values: ``true`` and - ``false``; default value: ``true``) + Should all of the Matlab interfaces (including SPM) use only one thread? + This is useful if you are parallelizing your workflow using MultiProc or + IPython on a single multicore machine. (possible values: ``true`` and + ``false``; default value: ``true``) *display_variable* - What ``DISPLAY`` variable should all command line interfaces be - run with. This is useful if you are using `xnest - `_ - or `Xvfb `_ - and you would like to redirect all spawned windows to - it. (possible values: any X server address; default value: not - set) + What ``DISPLAY`` variable should all command line interfaces be + run with. This is useful if you are using `xnest + `_ + or `Xvfb `_ + and you would like to redirect all spawned windows to + it. (possible values: any X server address; default value: not + set) *remove_unnecessary_outputs* - This will remove any interface outputs not needed by the workflow. If the - required outputs from a node changes, rerunning the workflow will rerun the - node. Outputs of leaf nodes (nodes whose outputs are not connected to any - other nodes) will never be deleted independent of this parameter. (possible - values: ``true`` and ``false``; default value: ``true``) + This will remove any interface outputs not needed by the workflow. If the + required outputs from a node changes, rerunning the workflow will rerun the + node. Outputs of leaf nodes (nodes whose outputs are not connected to any + other nodes) will never be deleted independent of this parameter. (possible + values: ``true`` and ``false``; default value: ``true``) *try_hard_link_datasink* - When the DataSink is used to produce an orginized output file outside - of nipypes internal cache structure, a file system hard link will be - attempted first. A hard link allow multiple file paths to point to the - same physical storage location on disk if the conditions allow. By - refering to the same physical file on disk (instead of copying files - byte-by-byte) we can avoid unnecessary data duplication. If hard links - are not supported for the source or destination paths specified, then - a standard byte-by-byte copy is used. (possible values: ``true`` and - ``false``; default value: ``true``) + When the DataSink is used to produce an orginized output file outside + of nipypes internal cache structure, a file system hard link will be + attempted first. A hard link allow multiple file paths to point to the + same physical storage location on disk if the conditions allow. By + refering to the same physical file on disk (instead of copying files + byte-by-byte) we can avoid unnecessary data duplication. If hard links + are not supported for the source or destination paths specified, then + a standard byte-by-byte copy is used. (possible values: ``true`` and + ``false``; default value: ``true``) *use_relative_paths* - Should the paths stored in results (and used to look for inputs) - be relative or absolute. Relative paths allow moving the whole - working directory around but may cause problems with - symlinks. (possible values: ``true`` and ``false``; default - value: ``false``) + Should the paths stored in results (and used to look for inputs) + be relative or absolute. Relative paths allow moving the whole + working directory around but may cause problems with + symlinks. (possible values: ``true`` and ``false``; default + value: ``false``) *local_hash_check* Perform the hash check on the job submission machine. This option minimizes @@ -116,10 +119,10 @@ Execution done after a job finish is detected. (float in seconds; default value: 5) *remove_node_directories (EXPERIMENTAL)* - Removes directories whose outputs have already been used - up. Doesn't work with IdentiInterface or any node that patches - data through (without copying) (possible values: ``true`` and - ``false``; default value: ``false``) + Removes directories whose outputs have already been used + up. Doesn't work with IdentiInterface or any node that patches + data through (without copying) (possible values: ``true`` and + ``false``; default value: ``false``) *stop_on_unknown_version* If this is set to True, an underlying interface will raise an error, when no @@ -160,13 +163,13 @@ Example :: - [logging] - workflow_level = DEBUG + [logging] + workflow_level = DEBUG - [execution] - stop_on_first_crash = true - hash_method = timestamp - display_variable = :1 + [execution] + stop_on_first_crash = true + hash_method = timestamp + display_variable = :1 Workflow.config property has a form of a nested dictionary reflecting the structure of the .cfg file. From 166205a9da7f58e88aa272a6c2df91ca1d00b330 Mon Sep 17 00:00:00 2001 From: oesteban Date: Wed, 27 Sep 2017 00:53:46 -0700 Subject: [PATCH 268/643] minor additions to resource_monitor option --- nipype/utils/config.py | 4 +++- nipype/utils/profiler.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/nipype/utils/config.py b/nipype/utils/config.py index 86bc0738a0..241f2de8ee 100644 --- a/nipype/utils/config.py +++ b/nipype/utils/config.py @@ -67,7 +67,6 @@ parameterize_dirs = true poll_sleep_duration = 2 xvfb_max_wait = 10 -resource_monitor = false [check] interval = 1209600 @@ -191,3 +190,6 @@ def update_matplotlib(self): def enable_provenance(self): self._config.set('execution', 'write_provenance', 'true') self._config.set('execution', 'hash_method', 'content') + + def enable_resource_monitor(self): + self._config.set('execution', 'resource_monitor', 'true') diff --git a/nipype/utils/profiler.py b/nipype/utils/profiler.py index 4ace5ef6d7..7e784fad32 100644 --- a/nipype/utils/profiler.py +++ b/nipype/utils/profiler.py @@ -21,7 +21,7 @@ proflogger = logging.getLogger('utils') -resource_monitor = str2bool(config.get('execution', 'resource_monitor')) +resource_monitor = str2bool(config.get('execution', 'resource_monitor', 'false')) if resource_monitor and psutil is None: proflogger.warn('Switching "resource_monitor" off: the option was on, but the ' 'necessary package "psutil" could not be imported.') From 6045c9365bb6c12172f698bf83d9a4326c32f40d Mon Sep 17 00:00:00 2001 From: oesteban Date: Wed, 27 Sep 2017 00:54:26 -0700 Subject: [PATCH 269/643] fix resource_monitor tests --- nipype/utils/tests/test_profiler.py | 49 +++++++++++------------------ 1 file changed, 18 insertions(+), 31 deletions(-) diff --git a/nipype/utils/tests/test_profiler.py b/nipype/utils/tests/test_profiler.py index f27ac3dc3a..7c08330d13 100644 --- a/nipype/utils/tests/test_profiler.py +++ b/nipype/utils/tests/test_profiler.py @@ -15,16 +15,6 @@ from nipype.utils.profiler import resource_monitor as run_profile from nipype.interfaces.base import (traits, CommandLine, CommandLineInputSpec) -if run_profile: - try: - import psutil - skip_profile_msg = 'Run profiler tests' - except ImportError as exc: - skip_profile_msg = 'Missing python packages for runtime profiling, skipping...\n'\ - 'Error: %s' % exc - run_profile = False -else: - skip_profile_msg = 'Not running profiler' # UseResources inputspec class UseResourcesInputSpec(CommandLineInputSpec): @@ -160,17 +150,17 @@ def _collect_range_runtime_stats(self, num_threads): # Iterate through all combos for num_gb in np.arange(0.25, ram_gb_range+ram_gb_step, ram_gb_step): # Cmd-level - cmd_start_str, cmd_fin_str = self._run_cmdline_workflow(num_gb, num_threads) - cmd_start_ts = json.loads(cmd_start_str)['start'] - cmd_node_stats = json.loads(cmd_fin_str) + cmd_node_str = self._run_cmdline_workflow(num_gb, num_threads) + cmd_node_stats = json.loads(cmd_node_str) + cmd_start_ts = cmd_node_stats['start'] cmd_runtime_threads = int(cmd_node_stats['runtime_threads']) cmd_runtime_gb = float(cmd_node_stats['runtime_memory_gb']) cmd_finish_ts = cmd_node_stats['finish'] # Func-level - func_start_str, func_fin_str = self._run_function_workflow(num_gb, num_threads) - func_start_ts = json.loads(func_start_str)['start'] - func_node_stats = json.loads(func_fin_str) + func_node_str = self._run_function_workflow(num_gb, num_threads) + func_node_stats = json.loads(func_node_str) + func_start_ts = func_node_stats['start'] func_runtime_threads = int(func_node_stats['runtime_threads']) func_runtime_gb = float(func_node_stats['runtime_memory_gb']) func_finish_ts = func_node_stats['finish'] @@ -238,6 +228,7 @@ def _run_cmdline_workflow(self, num_gb, num_threads): # Init logger logger = logging.getLogger('callback') + logger.propagate = False logger.setLevel(logging.DEBUG) handler = logging.FileHandler(log_file) logger.addHandler(handler) @@ -271,14 +262,14 @@ def _run_cmdline_workflow(self, num_gb, num_threads): # Get runtime stats from log file with open(log_file, 'r') as log_handle: lines = log_handle.readlines() - start_str = lines[0].rstrip('\n') - finish_str = lines[1].rstrip('\n') + + node_str = lines[0].rstrip('\n') # Delete wf base dir shutil.rmtree(base_dir) # Return runtime stats - return start_str, finish_str + return node_str # Test node def _run_function_workflow(self, num_gb, num_threads): @@ -350,17 +341,15 @@ def _run_function_workflow(self, num_gb, num_threads): # Get runtime stats from log file with open(log_file, 'r') as log_handle: lines = log_handle.readlines() - start_str = lines[0].rstrip('\n') - finish_str = lines[1].rstrip('\n') # Delete wf base dir shutil.rmtree(base_dir) # Return runtime stats - return start_str, finish_str + return lines[0].rstrip('\n') # Test resources were used as expected in cmdline interface - @pytest.mark.skipif(run_profile == False, reason=skip_profile_msg) + @pytest.mark.skipif(run_profile is False, reason='resources monitor is disabled') def test_cmdline_profiling(self): ''' Test runtime profiler correctly records workflow RAM/CPUs consumption @@ -376,9 +365,9 @@ def test_cmdline_profiling(self): num_threads = self.num_threads # Run workflow and get stats - start_str, finish_str = self._run_cmdline_workflow(num_gb, num_threads) + node_str = self._run_cmdline_workflow(num_gb, num_threads) # Get runtime stats as dictionary - node_stats = json.loads(finish_str) + node_stats = json.loads(node_str) # Read out runtime stats runtime_gb = float(node_stats['runtime_memory_gb']) @@ -401,8 +390,8 @@ def test_cmdline_profiling(self): assert abs(expected_runtime_threads - runtime_threads) <= 1, threads_err # Test resources were used as expected - @pytest.mark.skipif(True, reason="https://github.com/nipy/nipype/issues/1663") - @pytest.mark.skipif(run_profile == False, reason=skip_profile_msg) + # @pytest.mark.skipif(True, reason="https://github.com/nipy/nipype/issues/1663") + @pytest.mark.skipif(run_profile is False, reason='resources monitor is disabled') def test_function_profiling(self): ''' Test runtime profiler correctly records workflow RAM/CPUs consumption @@ -418,9 +407,9 @@ def test_function_profiling(self): num_threads = self.num_threads # Run workflow and get stats - start_str, finish_str = self._run_function_workflow(num_gb, num_threads) + node_str = self._run_function_workflow(num_gb, num_threads) # Get runtime stats as dictionary - node_stats = json.loads(finish_str) + node_stats = json.loads(node_str) # Read out runtime stats runtime_gb = float(node_stats['runtime_memory_gb']) @@ -441,5 +430,3 @@ def test_function_profiling(self): # Assert runtime stats are what was input assert runtime_gb_err <= allowed_gb_err, mem_err assert abs(expected_runtime_threads - runtime_threads) <= 1, threads_err - - From 66a89c499a6fbf5347412812e8b2c63bf34854e7 Mon Sep 17 00:00:00 2001 From: oesteban Date: Wed, 27 Sep 2017 09:48:14 -0700 Subject: [PATCH 270/643] run build 2 (the shortest) with the resource monitor on --- .circle/tests.sh | 4 ++-- docker/files/run_examples.sh | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.circle/tests.sh b/.circle/tests.sh index 202f9c5918..7267873ab1 100644 --- a/.circle/tests.sh +++ b/.circle/tests.sh @@ -30,8 +30,8 @@ case ${CIRCLE_NODE_INDEX} in exitcode=$? ;; 2) - docker run --rm=false -it -e NIPYPE_NUMBER_OF_CPUS=4 -v $HOME/examples:/data/examples:ro -v $WORKDIR:/work -w /work nipype/nipype:py27 /usr/bin/run_examples.sh fmri_spm_nested MultiProc /data/examples/ level1 && \ - docker run --rm=false -it -e NIPYPE_NUMBER_OF_CPUS=4 -v $HOME/examples:/data/examples:ro -v $WORKDIR:/work -w /work nipype/nipype:py36 /usr/bin/run_examples.sh fmri_spm_nested MultiProc /data/examples/ l2pipeline + docker run --rm=false -it -e NIPYPE_NUMBER_OF_CPUS=4 -e NIPYPE_RESOURCE_MONITOR=1 -v $HOME/examples:/data/examples:ro -v $WORKDIR:/work -w /work nipype/nipype:py27 /usr/bin/run_examples.sh fmri_spm_nested MultiProc /data/examples/ level1 && \ + docker run --rm=false -it -e NIPYPE_NUMBER_OF_CPUS=4 -e NIPYPE_RESOURCE_MONITOR=1 -v $HOME/examples:/data/examples:ro -v $WORKDIR:/work -w /work nipype/nipype:py36 /usr/bin/run_examples.sh fmri_spm_nested MultiProc /data/examples/ l2pipeline exitcode=$? ;; 3) diff --git a/docker/files/run_examples.sh b/docker/files/run_examples.sh index f23bc6f44c..67364b0b0f 100644 --- a/docker/files/run_examples.sh +++ b/docker/files/run_examples.sh @@ -16,6 +16,11 @@ echo "utils_level = DEBUG" >> ${HOME}/.nipype/nipype.cfg echo "log_to_file = true" >> ${HOME}/.nipype/nipype.cfg echo "log_directory = ${WORKDIR}/logs/example_${example_id}" >> ${HOME}/.nipype/nipype.cfg +if [[ "${NIPYPE_RESOURCE_MONITOR}" == "1" ]]; then + echo '[execution]' >> ${HOME}/.nipype/nipype.cfg + echo 'resource_monitor = true' >> ${HOME}/.nipype/nipype.cfg +fi + # Set up coverage export COVERAGE_FILE=${WORKDIR}/tests/.coverage.${example_id} if [ "$2" == "MultiProc" ]; then From 04adabd7c2427cf573cb0d8fd45e6074f1be65b4 Mon Sep 17 00:00:00 2001 From: oesteban Date: Wed, 27 Sep 2017 11:47:21 -0700 Subject: [PATCH 271/643] fix unbound variable --- docker/files/run_examples.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/files/run_examples.sh b/docker/files/run_examples.sh index 67364b0b0f..de5a45306e 100644 --- a/docker/files/run_examples.sh +++ b/docker/files/run_examples.sh @@ -16,7 +16,7 @@ echo "utils_level = DEBUG" >> ${HOME}/.nipype/nipype.cfg echo "log_to_file = true" >> ${HOME}/.nipype/nipype.cfg echo "log_directory = ${WORKDIR}/logs/example_${example_id}" >> ${HOME}/.nipype/nipype.cfg -if [[ "${NIPYPE_RESOURCE_MONITOR}" == "1" ]]; then +if [[ "${NIPYPE_RESOURCE_MONITOR:-0}" == "1" ]]; then echo '[execution]' >> ${HOME}/.nipype/nipype.cfg echo 'resource_monitor = true' >> ${HOME}/.nipype/nipype.cfg fi From c83c407db137a5ad408327f12fa656c38c1ce993 Mon Sep 17 00:00:00 2001 From: oesteban Date: Wed, 27 Sep 2017 12:51:38 -0700 Subject: [PATCH 272/643] collect resource_monitor info after run --- nipype/interfaces/base.py | 11 +++++-- nipype/pipeline/engine/utils.py | 45 +++++++++++++++++++++++++++++ nipype/pipeline/engine/workflows.py | 4 +++ 3 files changed, 58 insertions(+), 2 deletions(-) diff --git a/nipype/interfaces/base.py b/nipype/interfaces/base.py index ee8cb998e1..4cb929ba7f 100644 --- a/nipype/interfaces/base.py +++ b/nipype/interfaces/base.py @@ -1135,10 +1135,17 @@ def run(self, **inputs): # Read .prof file in and set runtime values vals = np.loadtxt(mon_fname, delimiter=',') if vals.tolist(): - _, mem_peak_gb, nthreads = np.atleast_2d(vals).max(0).astype(float).tolist() - runtime.mem_peak_gb = mem_peak_gb / 1024 + vals = np.atleast_2d(vals) + _, mem_peak_mb, nthreads = vals.max(0).astype(float).tolist() + runtime.mem_peak_gb = mem_peak_mb / 1024 runtime.nthreads_max = int(nthreads) + runtime.prof_dict = { + 'time': vals[:, 0].tolist(), + 'mem_gb': (vals[:, 1] / 1024).tolist(), + 'cpus': vals[:, 2].astype(int).tolist(), + } + return results def _list_outputs(self): diff --git a/nipype/pipeline/engine/utils.py b/nipype/pipeline/engine/utils.py index 48e3f6ed49..bedd3c0c63 100644 --- a/nipype/pipeline/engine/utils.py +++ b/nipype/pipeline/engine/utils.py @@ -1296,6 +1296,51 @@ def write_workflow_prov(graph, filename=None, format='all'): return ps.g +def write_workflow_resources(graph, filename=None): + import simplejson as json + if not filename: + filename = os.path.join(os.getcwd(), 'resource_monitor.json') + + big_dict = { + 'time': [], + 'name': [], + 'interface': [], + 'mem_gb': [], + 'cpus': [], + 'mapnode': [], + 'params': [], + } + + for idx, node in enumerate(graph.nodes()): + nodename = node.fullname + classname = node._interface.__class__.__name__ + + params = '' + if node.parameterization: + params = '_'.join(['{}'.format(p) + for p in node.parameterization]) + + rt_list = node.result.runtime + if not isinstance(rt_list, list): + rt_list = [rt_list] + + for subidx, runtime in enumerate(rt_list): + nsamples = len(runtime.prof_dict['time']) + + for key in ['time', 'mem_gb', 'cpus']: + big_dict[key] += runtime.prof_dict[key] + + big_dict['interface'] += [classname] * nsamples + big_dict['name'] += [nodename] * nsamples + big_dict['mapnode'] += [subidx] * nsamples + big_dict['params'] += [params] * nsamples + + with open(filename, 'w') as rsf: + json.dump(big_dict, rsf) + + return filename + + def topological_sort(graph, depth_first=False): """Returns a depth first sorted order if depth_first is True """ diff --git a/nipype/pipeline/engine/workflows.py b/nipype/pipeline/engine/workflows.py index 17d49b046a..936881dd0f 100644 --- a/nipype/pipeline/engine/workflows.py +++ b/nipype/pipeline/engine/workflows.py @@ -51,6 +51,7 @@ write_rst_list, to_str) from .utils import (generate_expanded_graph, modify_paths, export_graph, make_output_dir, write_workflow_prov, + write_workflow_resources, clean_working_directory, format_dot, topological_sort, get_print_name, merge_dict, evaluate_connect_function, _write_inputs, format_node) @@ -593,6 +594,9 @@ def run(self, plugin=None, plugin_args=None, updatehash=False): 'workflow_provenance_%s' % datestr) logger.info('Provenance file prefix: %s' % prov_base) write_workflow_prov(execgraph, prov_base, format='all') + + if str2bool(self.config['execution'].get('resource_monitor', 'false')): + write_workflow_resources(execgraph) return execgraph # PRIVATE API AND FUNCTIONS From f8a9fc7597a58a2b78d3d932b274abc848737d7b Mon Sep 17 00:00:00 2001 From: oesteban Date: Wed, 27 Sep 2017 12:54:57 -0700 Subject: [PATCH 273/643] reduce resource_monitor_frequency on tests (and we test it works) --- docker/files/run_examples.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/docker/files/run_examples.sh b/docker/files/run_examples.sh index de5a45306e..f71ac60dde 100644 --- a/docker/files/run_examples.sh +++ b/docker/files/run_examples.sh @@ -19,6 +19,7 @@ echo "log_directory = ${WORKDIR}/logs/example_${example_id}" >> ${HOME}/.nipype/ if [[ "${NIPYPE_RESOURCE_MONITOR:-0}" == "1" ]]; then echo '[execution]' >> ${HOME}/.nipype/nipype.cfg echo 'resource_monitor = true' >> ${HOME}/.nipype/nipype.cfg + echo 'resource_monitor_frequency = 3' >> ${HOME}/.nipype/nipype.cfg fi # Set up coverage From 8af37754e8835bc6a258c1590338c50483583e2b Mon Sep 17 00:00:00 2001 From: oesteban Date: Wed, 27 Sep 2017 12:58:48 -0700 Subject: [PATCH 274/643] store a new trace before exit --- nipype/utils/profiler.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/nipype/utils/profiler.py b/nipype/utils/profiler.py index 7e784fad32..75bb19a611 100644 --- a/nipype/utils/profiler.py +++ b/nipype/utils/profiler.py @@ -2,7 +2,7 @@ # @Author: oesteban # @Date: 2017-09-21 15:50:37 # @Last Modified by: oesteban -# @Last Modified time: 2017-09-26 15:05:24 +# @Last Modified time: 2017-09-27 12:57:50 """ Utilities to keep track of performance """ @@ -53,6 +53,10 @@ def stop(self): if not self._event.is_set(): self._event.set() self.join() + ram = _get_ram_mb(self._pid) or 0 + cpus = _get_num_threads(self._pid) or 0 + print('%s,%f,%d' % (time(), ram, cpus), + file=self._log) self._log.flush() self._log.close() From 0b00a2064e93c0ea8e2f57cb70df9209504140b7 Mon Sep 17 00:00:00 2001 From: oesteban Date: Wed, 27 Sep 2017 13:03:29 -0700 Subject: [PATCH 275/643] run resource_monitor only for level2 of fmri_spm_nested, switch python versions --- .circle/tests.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circle/tests.sh b/.circle/tests.sh index 7267873ab1..e6e9861ab7 100644 --- a/.circle/tests.sh +++ b/.circle/tests.sh @@ -30,8 +30,8 @@ case ${CIRCLE_NODE_INDEX} in exitcode=$? ;; 2) - docker run --rm=false -it -e NIPYPE_NUMBER_OF_CPUS=4 -e NIPYPE_RESOURCE_MONITOR=1 -v $HOME/examples:/data/examples:ro -v $WORKDIR:/work -w /work nipype/nipype:py27 /usr/bin/run_examples.sh fmri_spm_nested MultiProc /data/examples/ level1 && \ - docker run --rm=false -it -e NIPYPE_NUMBER_OF_CPUS=4 -e NIPYPE_RESOURCE_MONITOR=1 -v $HOME/examples:/data/examples:ro -v $WORKDIR:/work -w /work nipype/nipype:py36 /usr/bin/run_examples.sh fmri_spm_nested MultiProc /data/examples/ l2pipeline + docker run --rm=false -it -e NIPYPE_NUMBER_OF_CPUS=4 -v $HOME/examples:/data/examples:ro -v $WORKDIR:/work -w /work nipype/nipype:py36 /usr/bin/run_examples.sh fmri_spm_nested MultiProc /data/examples/ level1 && \ + docker run --rm=false -it -e NIPYPE_NUMBER_OF_CPUS=4 -e NIPYPE_RESOURCE_MONITOR=1 -v $HOME/examples:/data/examples:ro -v $WORKDIR:/work -w /work nipype/nipype:py27 /usr/bin/run_examples.sh fmri_spm_nested MultiProc /data/examples/ l2pipeline exitcode=$? ;; 3) From 6402981b5e9cadcd4c12f4ce74833066e2fb2ea9 Mon Sep 17 00:00:00 2001 From: oesteban Date: Wed, 27 Sep 2017 14:57:23 -0700 Subject: [PATCH 276/643] cleaning up MultiProc --- nipype/pipeline/plugins/multiproc.py | 29 +++++++++++----------------- 1 file changed, 11 insertions(+), 18 deletions(-) diff --git a/nipype/pipeline/plugins/multiproc.py b/nipype/pipeline/plugins/multiproc.py index 4f25a3f286..554c20389e 100644 --- a/nipype/pipeline/plugins/multiproc.py +++ b/nipype/pipeline/plugins/multiproc.py @@ -10,7 +10,6 @@ # Import packages from multiprocessing import Process, Pool, cpu_count, pool -import threading from traceback import format_exception import sys @@ -83,7 +82,8 @@ class NonDaemonPool(pool.Pool): class MultiProcPlugin(DistributedPluginBase): - """Execute workflow with multiprocessing, not sending more jobs at once + """ + Execute workflow with multiprocessing, not sending more jobs at once than the system can support. The plugin_args input to run can be used to control the multiprocessing @@ -102,6 +102,8 @@ class MultiProcPlugin(DistributedPluginBase): - non_daemon : boolean flag to execute as non-daemon processes - n_procs: maximum number of threads to be executed in parallel - memory_gb: maximum memory (in GB) that can be used at once. + - raise_insufficient: raise error if the requested resources for + a node over the maximum `n_procs` and/or `memory_gb`. """ @@ -112,7 +114,6 @@ def __init__(self, plugin_args=None): self._task_obj = {} self._taskid = 0 self._timeout = 2.0 - # self._event = threading.Event() # Read in options or set defaults. non_daemon = self.plugin_args.get('non_daemon', True) @@ -126,18 +127,8 @@ def __init__(self, plugin_args=None): 'non' if non_daemon else '', self.processors, self.memory_gb) self.pool = (NonDaemonPool if non_daemon else Pool)(processes=self.processors) - # def _wait(self): - # if len(self.pending_tasks) > 0: - # if self._config['execution']['poll_sleep_duration']: - # self._timeout = float(self._config['execution']['poll_sleep_duration']) - # sig_received = self._event.wait(self._timeout) - # if not sig_received: - # logger.debug('MultiProcPlugin timeout before signal received. Deadlock averted??') - # self._event.clear() - def _async_callback(self, args): self._taskresult[args['taskid']] = args - # self._event.set() def _get_result(self, taskid): return self._taskresult.get(taskid) @@ -178,7 +169,8 @@ def _send_procs_to_workers(self, updatehash=False, graph=None): # Check to see if a job is available currently_running_jobids = np.flatnonzero( - self.proc_pending & (self.depidx.sum(axis=0) == 0).__array__()) + np.array(self.proc_pending, dtype=bool) & ~self.depidx.sum(axis=0).astype(bool) + ) # Check available system resources by summing all threads and memory used busy_memory_gb = 0 @@ -210,6 +202,8 @@ def _send_procs_to_workers(self, updatehash=False, graph=None): # Check all jobs without dependency not run jobids = np.flatnonzero((self.proc_done == False) & (self.depidx.sum(axis=0) == 0).__array__()) + # jobids = np.flatnonzero(~np.array(self.proc_done, dtype=bool) & + # (self.depidx.sum(axis=0) == 0)) # Sort jobs ready to run first by memory and then by number of threads # The most resource consuming jobs run first @@ -226,10 +220,9 @@ def _send_procs_to_workers(self, updatehash=False, graph=None): # Submit first job on the list for jobid in jobids: if resource_monitor: - logger.debug('Next Job: %d, memory (GB): %d, threads: %d' \ - % (jobid, - self.procs[jobid]._interface.estimated_memory_gb, - self.procs[jobid]._interface.num_threads)) + logger.debug('Next Job: %d, memory (GB): %d, threads: %d', + jobid, self.procs[jobid]._interface.estimated_memory_gb, + self.procs[jobid]._interface.num_threads) if self.procs[jobid]._interface.estimated_memory_gb <= free_memory_gb and \ self.procs[jobid]._interface.num_threads <= free_processors: From b9537b5472b499e0ac5afa9d7f6627403d87cc0b Mon Sep 17 00:00:00 2001 From: oesteban Date: Wed, 27 Sep 2017 15:42:48 -0700 Subject: [PATCH 277/643] do not access __array__() of matrices --- nipype/pipeline/plugins/multiproc.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/nipype/pipeline/plugins/multiproc.py b/nipype/pipeline/plugins/multiproc.py index 554c20389e..7a380cdeb1 100644 --- a/nipype/pipeline/plugins/multiproc.py +++ b/nipype/pipeline/plugins/multiproc.py @@ -169,8 +169,7 @@ def _send_procs_to_workers(self, updatehash=False, graph=None): # Check to see if a job is available currently_running_jobids = np.flatnonzero( - np.array(self.proc_pending, dtype=bool) & ~self.depidx.sum(axis=0).astype(bool) - ) + ~self.proc_pending & ~np.sum(self.depidx, axis=0).astype(bool)) # Check available system resources by summing all threads and memory used busy_memory_gb = 0 @@ -200,10 +199,8 @@ def _send_procs_to_workers(self, updatehash=False, graph=None): free_processors = self.processors - busy_processors # Check all jobs without dependency not run - jobids = np.flatnonzero((self.proc_done == False) & - (self.depidx.sum(axis=0) == 0).__array__()) - # jobids = np.flatnonzero(~np.array(self.proc_done, dtype=bool) & - # (self.depidx.sum(axis=0) == 0)) + jobids = np.flatnonzero( + ~self.proc_done & ~np.sum(self.depidx, axis=0).astype(bool)) # Sort jobs ready to run first by memory and then by number of threads # The most resource consuming jobs run first From 9a609b689851d981ae4290c6cbd65991b0f93ba0 Mon Sep 17 00:00:00 2001 From: oesteban Date: Wed, 27 Sep 2017 15:48:29 -0700 Subject: [PATCH 278/643] do not access __array__() of matrices (now base plugin) --- nipype/pipeline/plugins/base.py | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/nipype/pipeline/plugins/base.py b/nipype/pipeline/plugins/base.py index dab48b15f0..d8347d7598 100644 --- a/nipype/pipeline/plugins/base.py +++ b/nipype/pipeline/plugins/base.py @@ -207,9 +207,9 @@ def __init__(self, plugin_args=None): """Initialize runtime attributes to none procs: list (N) of underlying interface elements to be processed - proc_done: a boolean vector (N) signifying whether a process has been + proc_done: a boolean numpy array (N) signifying whether a process has been executed - proc_pending: a boolean vector (N) signifying whether a + proc_pending: a boolean numpy array (N) signifying whether a process is currently running. Note: A process is finished only when both proc_done==True and proc_pending==False @@ -360,14 +360,14 @@ def _send_procs_to_workers(self, updatehash=False, graph=None): if (num_jobs >= self.max_jobs) or (slots == 0): break # Check to see if a job is available - jobids = np.flatnonzero((self.proc_done == False) & - (self.depidx.sum(axis=0) == 0).__array__()) + jobids = np.flatnonzero( + ~self.proc_done & ~np.sum(self.depidx, axis=0).astype(bool)) + if len(jobids) > 0: # send all available jobs - if slots: - logger.info('Pending[%d] Submitting[%d] jobs Slots[%d]' % (num_jobs, len(jobids[:slots]), slots)) - else: - logger.info('Pending[%d] Submitting[%d] jobs Slots[inf]' % (num_jobs, len(jobids))) + logger.info('Pending[%d] Submitting[%d] jobs Slots[%d]', + num_jobs, len(jobids[:slots]), slots or 'inf') + for jobid in jobids[:slots]: if isinstance(self.procs[jobid], MapNode): try: @@ -478,8 +478,7 @@ def _remove_node_dirs(self): """Removes directories whose outputs have already been used up """ if str2bool(self._config['execution']['remove_node_directories']): - for idx in np.nonzero( - (self.refidx.sum(axis=1) == 0).__array__())[0]: + for idx in np.nonzero(np.sum(self.refidx, axis=1) == 0)[0]: if idx in self.mapnodesubids: continue if self.proc_done[idx] and (not self.proc_pending[idx]): From c7fbb61a96bfc9c077d314385eee2a3266b098dc Mon Sep 17 00:00:00 2001 From: oesteban Date: Wed, 27 Sep 2017 15:52:49 -0700 Subject: [PATCH 279/643] do not access __array__() of matrices (revise) --- nipype/pipeline/plugins/base.py | 2 +- nipype/pipeline/plugins/multiproc.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/nipype/pipeline/plugins/base.py b/nipype/pipeline/plugins/base.py index d8347d7598..7dca26b1b8 100644 --- a/nipype/pipeline/plugins/base.py +++ b/nipype/pipeline/plugins/base.py @@ -361,7 +361,7 @@ def _send_procs_to_workers(self, updatehash=False, graph=None): break # Check to see if a job is available jobids = np.flatnonzero( - ~self.proc_done & ~np.sum(self.depidx, axis=0).astype(bool)) + ~self.proc_done & (np.sum(self.depidx, axis=0) == 0)) if len(jobids) > 0: # send all available jobs diff --git a/nipype/pipeline/plugins/multiproc.py b/nipype/pipeline/plugins/multiproc.py index 7a380cdeb1..930622cc52 100644 --- a/nipype/pipeline/plugins/multiproc.py +++ b/nipype/pipeline/plugins/multiproc.py @@ -169,7 +169,7 @@ def _send_procs_to_workers(self, updatehash=False, graph=None): # Check to see if a job is available currently_running_jobids = np.flatnonzero( - ~self.proc_pending & ~np.sum(self.depidx, axis=0).astype(bool)) + ~self.proc_pending & (np.sum(self.depidx, axis=0) == 0)) # Check available system resources by summing all threads and memory used busy_memory_gb = 0 @@ -200,7 +200,7 @@ def _send_procs_to_workers(self, updatehash=False, graph=None): # Check all jobs without dependency not run jobids = np.flatnonzero( - ~self.proc_done & ~np.sum(self.depidx, axis=0).astype(bool)) + ~self.proc_done & (np.sum(self.depidx, axis=0) == 0)) # Sort jobs ready to run first by memory and then by number of threads # The most resource consuming jobs run first From a40eb3ba382c37120c1ad87d96df476e40b2f40b Mon Sep 17 00:00:00 2001 From: oesteban Date: Wed, 27 Sep 2017 16:02:48 -0700 Subject: [PATCH 280/643] restore those __array__() --- nipype/pipeline/plugins/base.py | 5 +++-- nipype/pipeline/plugins/multiproc.py | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/nipype/pipeline/plugins/base.py b/nipype/pipeline/plugins/base.py index 7dca26b1b8..45206f0b28 100644 --- a/nipype/pipeline/plugins/base.py +++ b/nipype/pipeline/plugins/base.py @@ -361,7 +361,7 @@ def _send_procs_to_workers(self, updatehash=False, graph=None): break # Check to see if a job is available jobids = np.flatnonzero( - ~self.proc_done & (np.sum(self.depidx, axis=0) == 0)) + ~self.proc_done & (self.depidx.sum(axis=0) == 0).__array__()) if len(jobids) > 0: # send all available jobs @@ -478,7 +478,8 @@ def _remove_node_dirs(self): """Removes directories whose outputs have already been used up """ if str2bool(self._config['execution']['remove_node_directories']): - for idx in np.nonzero(np.sum(self.refidx, axis=1) == 0)[0]: + for idx in np.nonzero( + (self.refidx.sum(axis=1) == 0).__array__())[0]: if idx in self.mapnodesubids: continue if self.proc_done[idx] and (not self.proc_pending[idx]): diff --git a/nipype/pipeline/plugins/multiproc.py b/nipype/pipeline/plugins/multiproc.py index 930622cc52..a647c032cf 100644 --- a/nipype/pipeline/plugins/multiproc.py +++ b/nipype/pipeline/plugins/multiproc.py @@ -200,7 +200,7 @@ def _send_procs_to_workers(self, updatehash=False, graph=None): # Check all jobs without dependency not run jobids = np.flatnonzero( - ~self.proc_done & (np.sum(self.depidx, axis=0) == 0)) + ~self.proc_done & (self.depidx.sum(axis=0) == 0).__array__()) # Sort jobs ready to run first by memory and then by number of threads # The most resource consuming jobs run first From 8e710fa9a4b80deaf79f48a26aa0b913760fd77e Mon Sep 17 00:00:00 2001 From: oesteban Date: Wed, 27 Sep 2017 16:29:00 -0700 Subject: [PATCH 281/643] address @satra's comments --- doc/users/config_file.rst | 3 ++- nipype/interfaces/base.py | 24 +++++++++++------------- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/doc/users/config_file.rst b/doc/users/config_file.rst index 8fccf7e42a..c89406faf1 100644 --- a/doc/users/config_file.rst +++ b/doc/users/config_file.rst @@ -24,7 +24,7 @@ Logging *interface_level* How detailed the logs regarding interface execution should be (possible values: ``INFO`` and ``DEBUG``; default value: ``INFO``) -*filemanip_level* (deprecated as of 0.13.2) +*filemanip_level* (deprecated as of 1.0) How detailed the logs regarding file operations (for example overwriting warning) should be (possible values: ``INFO`` and ``DEBUG``) *log_to_file* @@ -157,6 +157,7 @@ Execution *resource_monitor_frequency* Sampling period (in seconds) between measurements of resources (memory, cpus) being used by an interface. Requires ``resource_monitor`` to be ``true``. + (default value: ``1``) Example ~~~~~~~ diff --git a/nipype/interfaces/base.py b/nipype/interfaces/base.py index 4cb929ba7f..76b85268aa 100644 --- a/nipype/interfaces/base.py +++ b/nipype/interfaces/base.py @@ -732,9 +732,6 @@ class BaseInterfaceInputSpec(TraitedSpec): ignore_exception = traits.Bool(False, usedefault=True, nohash=True, desc='Print an error message instead of throwing an exception ' 'in case the interface fails to run') - resource_monitor = traits.Bool(True, usedefault=True, nohash=True, - desc='Disable the resource monitor for this interface ' - '(overloads the default nipype config).') class BaseInterface(Interface): @@ -760,8 +757,9 @@ class BaseInterface(Interface): _additional_metadata = [] _redirect_x = False references_ = [] + resource_monitor = True - def __init__(self, from_file=None, **inputs): + def __init__(self, from_file=None, resource_monitor=None, **inputs): if not self.input_spec: raise Exception('No input_spec in class: %s' % self.__class__.__name__) @@ -770,6 +768,9 @@ def __init__(self, from_file=None, **inputs): self.estimated_memory_gb = 0.25 self.num_threads = 1 + if resource_monitor is not None: + self.resource_monitor = resource_monitor + if from_file is not None: self.load_inputs_from_json(from_file, overwrite=True) @@ -1057,7 +1058,7 @@ def run(self, **inputs): """ from ..utils.profiler import resource_monitor, ResourceMonitor - enable_rm = resource_monitor and getattr(self.inputs, 'resource_monitor', True) + enable_rm = resource_monitor and self.resource_monitor force_raise = not getattr(self.inputs, 'ignore_exception', False) self.inputs.trait_set(**inputs) self._check_mandatory_inputs() @@ -1081,7 +1082,7 @@ def run(self, **inputs): mon_sp = None if enable_rm: - mon_freq = config.get('execution', 'resource_monitor_frequency', 1) + mon_freq = float(config.get('execution', 'resource_monitor_frequency', 1)) proc_pid = os.getpid() mon_fname = os.path.abspath('.prof-%d_freq-%0.3f' % (proc_pid, mon_freq)) iflogger.debug('Creating a ResourceMonitor on a %s interface: %s', @@ -1159,6 +1160,7 @@ def _list_outputs(self): def aggregate_outputs(self, runtime=None, needed_outputs=None): """ Collate expected outputs and check for existence """ + predicted_outputs = self._list_outputs() outputs = self._outputs() if predicted_outputs: @@ -1176,15 +1178,13 @@ def aggregate_outputs(self, runtime=None, needed_outputs=None): self.__class__.__name__)) try: setattr(outputs, key, val) - getattr(outputs, key) except TraitError as error: - if hasattr(error, 'info') and \ - error.info.startswith("an existing"): + if getattr(error, 'info', 'default').startswith('an existing'): msg = ("File/Directory '%s' not found for %s output " "'%s'." % (val, self.__class__.__name__, key)) raise FileNotFoundError(msg) - else: - raise error + raise error + return outputs @property @@ -1368,7 +1368,6 @@ def _process(drain=0): while proc.returncode is None: proc.poll() _process() - time.sleep(0) _process(drain=1) @@ -1479,7 +1478,6 @@ class must be instantiated with a command argument {'args': '-al', 'environ': {'DISPLAY': ':1'}, 'ignore_exception': False, - 'resource_monitor': True, 'terminal_output': 'stream'} >>> cli.inputs.get_hashval()[0][0] # doctest: +ALLOW_UNICODE From 1bccef7e8dded614f04bb1d1f56b679dbe034f6f Mon Sep 17 00:00:00 2001 From: oesteban Date: Wed, 27 Sep 2017 20:35:12 -0700 Subject: [PATCH 282/643] refactoring multiproc to fix deadlock --- nipype/pipeline/plugins/API.rst | 8 - nipype/pipeline/plugins/base.py | 198 +++--------------- nipype/pipeline/plugins/multiproc.py | 39 ++-- .../pipeline/plugins/tests/test_multiproc.py | 177 +++------------- nipype/pipeline/plugins/tools.py | 162 ++++++++++++++ 5 files changed, 237 insertions(+), 347 deletions(-) delete mode 100644 nipype/pipeline/plugins/API.rst create mode 100644 nipype/pipeline/plugins/tools.py diff --git a/nipype/pipeline/plugins/API.rst b/nipype/pipeline/plugins/API.rst deleted file mode 100644 index 57ef2632bc..0000000000 --- a/nipype/pipeline/plugins/API.rst +++ /dev/null @@ -1,8 +0,0 @@ -Execution plugin API -==================== - -Current status: - -class plugin_runner(PluginBase): - - def run(graph, config, updatehash) diff --git a/nipype/pipeline/plugins/base.py b/nipype/pipeline/plugins/base.py index 45206f0b28..045bbffe83 100644 --- a/nipype/pipeline/plugins/base.py +++ b/nipype/pipeline/plugins/base.py @@ -9,188 +9,44 @@ from copy import deepcopy from glob import glob import os -import getpass import shutil -from socket import gethostname import sys -import uuid -from time import strftime, sleep, time -from traceback import format_exception, format_exc +from time import sleep, time +from traceback import format_exc import numpy as np import scipy.sparse as ssp - from ... import logging -from ...utils.filemanip import savepkl, loadpkl, crash2txt +from ...utils.filemanip import loadpkl from ...utils.misc import str2bool from ..engine.utils import (nx, dfs_preorder, topological_sort) from ..engine import MapNode - +from .tools import report_crash, report_nodes_not_run, create_pyscript logger = logging.getLogger('workflow') -iflogger = logging.getLogger('interface') -def report_crash(node, traceback=None, hostname=None): - """Writes crash related information to a file - """ - name = node._id - if node.result and hasattr(node.result, 'runtime') and \ - node.result.runtime: - if isinstance(node.result.runtime, list): - host = node.result.runtime[0].hostname - else: - host = node.result.runtime.hostname - else: - if hostname: - host = hostname - else: - host = gethostname() - message = ['Node %s failed to run on host %s.' % (name, - host)] - logger.error(message) - if not traceback: - exc_type, exc_value, exc_traceback = sys.exc_info() - traceback = format_exception(exc_type, - exc_value, - exc_traceback) - timeofcrash = strftime('%Y%m%d-%H%M%S') - login_name = getpass.getuser() - crashfile = 'crash-%s-%s-%s-%s' % (timeofcrash, - login_name, - name, - str(uuid.uuid4())) - crashdir = node.config['execution']['crashdump_dir'] - if crashdir is None: - crashdir = os.getcwd() - if not os.path.exists(crashdir): - os.makedirs(crashdir) - crashfile = os.path.join(crashdir, crashfile) - if node.config['execution']['crashfile_format'].lower() in ['text', 'txt']: - crashfile += '.txt' - else: - crashfile += '.pklz' - logger.info('Saving crash info to %s' % crashfile) - logger.info(''.join(traceback)) - if node.config['execution']['crashfile_format'].lower() in ['text', 'txt']: - crash2txt(crashfile, dict(node=node, traceback=traceback)) - else: - savepkl(crashfile, dict(node=node, traceback=traceback)) - return crashfile - - -def report_nodes_not_run(notrun): - """List nodes that crashed with crashfile info - - Optionally displays dependent nodes that weren't executed as a result of - the crash. +class PluginBase(object): """ - if notrun: - logger.info("***********************************") - for info in notrun: - logger.error("could not run node: %s" % - '.'.join((info['node']._hierarchy, - info['node']._id))) - logger.info("crashfile: %s" % info['crashfile']) - logger.debug("The following dependent nodes were not run") - for subnode in info['dependents']: - logger.debug(subnode._id) - logger.info("***********************************") - raise RuntimeError(('Workflow did not execute cleanly. ' - 'Check log for details')) - - -def create_pyscript(node, updatehash=False, store_exception=True): - # pickle node - timestamp = strftime('%Y%m%d_%H%M%S') - if node._hierarchy: - suffix = '%s_%s_%s' % (timestamp, node._hierarchy, node._id) - batch_dir = os.path.join(node.base_dir, - node._hierarchy.split('.')[0], - 'batch') - else: - suffix = '%s_%s' % (timestamp, node._id) - batch_dir = os.path.join(node.base_dir, 'batch') - if not os.path.exists(batch_dir): - os.makedirs(batch_dir) - pkl_file = os.path.join(batch_dir, 'node_%s.pklz' % suffix) - savepkl(pkl_file, dict(node=node, updatehash=updatehash)) - mpl_backend = node.config["execution"]["matplotlib_backend"] - # create python script to load and trap exception - cmdstr = """import os -import sys + Base class for plugins -can_import_matplotlib = True #Silently allow matplotlib to be ignored -try: - import matplotlib - matplotlib.use('%s') -except ImportError: - can_import_matplotlib = False - pass - -from nipype import config, logging -from nipype.utils.filemanip import loadpkl, savepkl -from socket import gethostname -from traceback import format_exception -info = None -pklfile = '%s' -batchdir = '%s' -from nipype.utils.filemanip import loadpkl, savepkl -try: - if not sys.version_info < (2, 7): - from collections import OrderedDict - config_dict=%s - config.update_config(config_dict) - ## Only configure matplotlib if it was successfully imported, - ## matplotlib is an optional component to nipype - if can_import_matplotlib: - config.update_matplotlib() - logging.update_logging(config) - traceback=None - cwd = os.getcwd() - info = loadpkl(pklfile) - result = info['node'].run(updatehash=info['updatehash']) -except Exception as e: - etype, eval, etr = sys.exc_info() - traceback = format_exception(etype,eval,etr) - if info is None or not os.path.exists(info['node'].output_dir()): - result = None - resultsfile = os.path.join(batchdir, 'crashdump_%s.pklz') - else: - result = info['node'].result - resultsfile = os.path.join(info['node'].output_dir(), - 'result_%%s.pklz'%%info['node'].name) -""" - if store_exception: - cmdstr += """ - savepkl(resultsfile, dict(result=result, hostname=gethostname(), - traceback=traceback)) -""" - else: - cmdstr += """ - if info is None: - savepkl(resultsfile, dict(result=result, hostname=gethostname(), - traceback=traceback)) - else: - from nipype.pipeline.plugins.base import report_crash - report_crash(info['node'], traceback, gethostname()) - raise Exception(e) -""" - cmdstr = cmdstr % (mpl_backend, pkl_file, batch_dir, node.config, suffix) - pyscript = os.path.join(batch_dir, 'pyscript_%s.py' % suffix) - with open(pyscript, 'wt') as fp: - fp.writelines(cmdstr) - return pyscript + Execution plugin API + ==================== + Current status:: -class PluginBase(object): - """Base class for plugins""" + class plugin_runner(PluginBase): + + def run(graph, config, updatehash) + + """ def __init__(self, plugin_args=None): if plugin_args is None: plugin_args = {} self.plugin_args = plugin_args + self._config = None self._status_callback = plugin_args.get('status_callback') return @@ -226,11 +82,17 @@ def __init__(self, plugin_args=None): self.proc_pending = None self.max_jobs = self.plugin_args.get('max_jobs', np.inf) + def _prerun_check(self, graph): + """Stub.""" + def run(self, graph, config, updatehash=False): - """Executes a pre-defined pipeline using distributed approaches + """ + Executes a pre-defined pipeline using distributed approaches """ logger.info("Running in parallel.") self._config = config + + self._prerun_check(graph) # Generate appropriate structures for worker-manager model self._generate_dependency_list(graph) self.pending_tasks = [] @@ -297,7 +159,12 @@ def _submit_job(self, node, updatehash=False): raise NotImplementedError def _report_crash(self, node, result=None): - raise NotImplementedError + tb = None + if result is not None: + node._result = getattr(result, 'result') + tb = getattr(result, 'traceback') + node._traceback = tb + return report_crash(node, traceback=tb) def _clear_task(self, taskid): raise NotImplementedError @@ -584,15 +451,6 @@ def _submit_job(self, node, updatehash=False): fp.writelines(batchscript) return self._submit_batchtask(batchscriptfile, node) - def _report_crash(self, node, result=None): - if result and result['traceback']: - node._result = result['result'] - node._traceback = result['traceback'] - return report_crash(node, - traceback=result['traceback']) - else: - return report_crash(node) - def _clear_task(self, taskid): del self._pending[taskid] diff --git a/nipype/pipeline/plugins/multiproc.py b/nipype/pipeline/plugins/multiproc.py index a647c032cf..8ad9e6e247 100644 --- a/nipype/pipeline/plugins/multiproc.py +++ b/nipype/pipeline/plugins/multiproc.py @@ -20,7 +20,7 @@ from ...utils.misc import str2bool from ...utils.profiler import get_system_total_memory_gb from ..engine import MapNode -from .base import (DistributedPluginBase, report_crash) +from .base import DistributedPluginBase # Init logger logger = logging.getLogger('workflow') @@ -133,28 +133,17 @@ def _async_callback(self, args): def _get_result(self, taskid): return self._taskresult.get(taskid) - def _report_crash(self, node, result=None): - if result and result['traceback']: - node._result = result['result'] - node._traceback = result['traceback'] - return report_crash(node, - traceback=result['traceback']) - else: - return report_crash(node) - def _clear_task(self, taskid): del self._task_obj[taskid] def _submit_job(self, node, updatehash=False): self._taskid += 1 - if hasattr(node.inputs, 'terminal_output'): - if node.inputs.terminal_output == 'stream': - node.inputs.terminal_output = 'allatonce' - - self._task_obj[self._taskid] = \ - self.pool.apply_async(run_node, - (node, updatehash, self._taskid), - callback=self._async_callback) + if getattr(node.inputs, 'terminal_output') == 'stream': + node.inputs.terminal_output = 'allatonce' + + self._task_obj[self._taskid] = self.pool.apply_async( + run_node, (node, updatehash, self._taskid), + callback=self._async_callback) return self._taskid def _close(self): @@ -162,8 +151,10 @@ def _close(self): return True def _send_procs_to_workers(self, updatehash=False, graph=None): - """ Sends jobs to workers when system resources are available. - Check memory (gb) and cores usage before running jobs. + """ + Sends jobs to workers when system resources are available. + Check memory (gb) and cores usage before running jobs. + """ executing_now = [] @@ -176,7 +167,6 @@ def _send_procs_to_workers(self, updatehash=False, graph=None): busy_processors = 0 for jobid in currently_running_jobids: est_mem_gb = self.procs[jobid]._interface.estimated_memory_gb - est_num_th = self.procs[jobid]._interface.num_threads if est_mem_gb > self.memory_gb: logger.warning( @@ -185,6 +175,7 @@ def _send_procs_to_workers(self, updatehash=False, graph=None): if self.raise_insufficient: raise RuntimeError('Insufficient resources available for job') + est_num_th = self.procs[jobid]._interface.num_threads if est_num_th > self.processors: logger.warning( 'Job %s - Requested %d threads, but only %d are available.', @@ -232,7 +223,7 @@ def _send_procs_to_workers(self, updatehash=False, graph=None): except Exception: etype, eval, etr = sys.exc_info() traceback = format_exception(etype, eval, etr) - report_crash(self.procs[jobid], traceback=traceback) + self._report_crash(self.procs[jobid], traceback=traceback) self._clean_queue(jobid, graph) self.proc_pending[jobid] = False continue @@ -267,7 +258,7 @@ def _send_procs_to_workers(self, updatehash=False, graph=None): except Exception: etype, eval, etr = sys.exc_info() traceback = format_exception(etype, eval, etr) - report_crash(self.procs[jobid], traceback=traceback) + self._report_crash(self.procs[jobid], traceback=traceback) self._clean_queue(jobid, graph) self.proc_pending[jobid] = False continue @@ -282,7 +273,7 @@ def _send_procs_to_workers(self, updatehash=False, graph=None): except Exception: etype, eval, etr = sys.exc_info() traceback = format_exception(etype, eval, etr) - report_crash(self.procs[jobid], traceback=traceback) + self._report_crash(self.procs[jobid], traceback=traceback) finally: self._task_finished_cb(jobid) self._remove_node_dirs() diff --git a/nipype/pipeline/plugins/tests/test_multiproc.py b/nipype/pipeline/plugins/tests/test_multiproc.py index 20718feda6..d8ec93d668 100644 --- a/nipype/pipeline/plugins/tests/test_multiproc.py +++ b/nipype/pipeline/plugins/tests/test_multiproc.py @@ -1,12 +1,13 @@ # -*- coding: utf-8 -*- -import logging +# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- +# vi: set ft=python sts=4 ts=4 sw=4 et: +""" +Test the resource management of MultiProc +""" import os -from multiprocessing import cpu_count - -import nipype.interfaces.base as nib -from nipype.utils import draw_gantt_chart -import nipype.pipeline.engine as pe -from nipype.utils.profiler import log_nodes_cb, get_system_total_memory_gb +import pytest +from nipype.pipeline import engine as pe +from nipype.interfaces import base as nib class InputSpec(nib.TraitedSpec): @@ -33,11 +34,11 @@ def _list_outputs(self): def test_run_multiproc(tmpdir): - os.chdir(str(tmpdir)) + tmpdir.chdir() pipe = pe.Workflow(name='pipe') - mod1 = pe.Node(interface=MultiprocTestInterface(), name='mod1') - mod2 = pe.MapNode(interface=MultiprocTestInterface(), + mod1 = pe.Node(MultiprocTestInterface(), name='mod1') + mod2 = pe.MapNode(MultiprocTestInterface(), iterfield=['input1'], name='mod2') pipe.connect([(mod1, mod2, [('output1', 'input1')])]) @@ -45,7 +46,7 @@ def test_run_multiproc(tmpdir): mod1.inputs.input1 = 1 pipe.config['execution']['poll_sleep_duration'] = 2 execgraph = pipe.run(plugin="MultiProc") - names = ['.'.join((node._hierarchy, node.name)) for node in execgraph.nodes()] + names = [node.fullname for node in execgraph.nodes()] node = list(execgraph.nodes())[names.index('pipe.mod1')] result = node.get_output('output1') assert result == [1, 1] @@ -74,69 +75,13 @@ def _list_outputs(self): return outputs -def find_metrics(nodes, last_node): - """ - """ - - # Import packages - from dateutil.parser import parse - import datetime - - start = parse(nodes[0]['start']) - total_duration = max(int((parse(last_node['finish']) - start).total_seconds()), 1) - - total_memory = [] - total_threads = [] - for i in range(total_duration): - total_memory.append(0) - total_threads.append(0) - - now = start - for i in range(total_duration): - start_index = 0 - node_start = None - node_finish = None - - x = now - - for j in range(start_index, len(nodes)): - node_start = parse(nodes[j]['start']) - node_finish = parse(nodes[j]['finish']) - - if node_start < x and node_finish > x: - total_memory[i] += float(nodes[j]['estimated_memory_gb']) - total_threads[i] += int(nodes[j]['num_threads']) - start_index = j - - if node_start > x: - break - - now += datetime.timedelta(seconds=1) - - return total_memory, total_threads - - def test_no_more_memory_than_specified(tmpdir): tmpdir.chdir() - LOG_FILENAME = tmpdir.join('callback.log').strpath - my_logger = logging.getLogger('callback') - my_logger.setLevel(logging.DEBUG) - - # Add the log message handler to the logger - handler = logging.FileHandler(LOG_FILENAME) - my_logger.addHandler(handler) - - max_memory = 1 pipe = pe.Workflow(name='pipe') - n1 = pe.Node(interface=SingleNodeTestInterface(), name='n1') - n2 = pe.Node(interface=SingleNodeTestInterface(), name='n2') - n3 = pe.Node(interface=SingleNodeTestInterface(), name='n3') - n4 = pe.Node(interface=SingleNodeTestInterface(), name='n4') - - n1.interface.estimated_memory_gb = 1 - n2.interface.estimated_memory_gb = 1 - n3.interface.estimated_memory_gb = 1 - n4.interface.estimated_memory_gb = 1 + n1 = pe.Node(SingleNodeTestInterface(), name='n1', mem_gb=1) + n2 = pe.Node(SingleNodeTestInterface(), name='n2', mem_gb=1) + n3 = pe.Node(SingleNodeTestInterface(), name='n3', mem_gb=1) + n4 = pe.Node(SingleNodeTestInterface(), name='n4', mem_gb=1) pipe.connect(n1, 'output1', n2, 'input1') pipe.connect(n1, 'output1', n3, 'input1') @@ -144,87 +89,29 @@ def test_no_more_memory_than_specified(tmpdir): pipe.connect(n3, 'output1', n4, 'input2') n1.inputs.input1 = 1 - pipe.run(plugin='MultiProc', - plugin_args={'memory_gb': max_memory, - 'status_callback': log_nodes_cb}) - - nodes = draw_gantt_chart.log_to_dict(LOG_FILENAME) - last_node = nodes[-1] - # usage in every second - memory, threads = find_metrics(nodes, last_node) - - result = True - for m in memory: - if m > max_memory: - result = False - break - - assert result - - max_threads = cpu_count() + max_memory = 0.5 + with pytest.raises(RuntimeError): + pipe.run(plugin='MultiProc', + plugin_args={'memory_gb': max_memory, + 'n_procs': 2}) - result = True - for t in threads: - if t > max_threads: - result = False - break - assert result,\ - "using more threads than system has (threads is not specified by user)" - - os.remove(LOG_FILENAME) - - -def test_no_more_threads_than_specified(): - LOG_FILENAME = 'callback.log' - my_logger = logging.getLogger('callback') - my_logger.setLevel(logging.DEBUG) - - # Add the log message handler to the logger - handler = logging.FileHandler(LOG_FILENAME) - my_logger.addHandler(handler) +def test_no_more_threads_than_specified(tmpdir): + tmpdir.chdir() - max_threads = 4 pipe = pe.Workflow(name='pipe') - n1 = pe.Node(interface=SingleNodeTestInterface(), name='n1') - n2 = pe.Node(interface=SingleNodeTestInterface(), name='n2') - n3 = pe.Node(interface=SingleNodeTestInterface(), name='n3') - n4 = pe.Node(interface=SingleNodeTestInterface(), name='n4') - - n1.interface.num_threads = 1 - n2.interface.num_threads = 1 - n3.interface.num_threads = 4 - n4.interface.num_threads = 1 + n1 = pe.Node(SingleNodeTestInterface(), name='n1', n_procs=2) + n2 = pe.Node(SingleNodeTestInterface(), name='n2', n_procs=2) + n3 = pe.Node(SingleNodeTestInterface(), name='n3', n_procs=4) + n4 = pe.Node(SingleNodeTestInterface(), name='n4', n_procs=2) pipe.connect(n1, 'output1', n2, 'input1') pipe.connect(n1, 'output1', n3, 'input1') pipe.connect(n2, 'output1', n4, 'input1') pipe.connect(n3, 'output1', n4, 'input2') n1.inputs.input1 = 4 - pipe.config['execution']['poll_sleep_duration'] = 1 - pipe.run(plugin='MultiProc', plugin_args={'n_procs': max_threads, - 'status_callback': log_nodes_cb}) - - nodes = draw_gantt_chart.log_to_dict(LOG_FILENAME) - last_node = nodes[-1] - # usage in every second - memory, threads = find_metrics(nodes, last_node) - - result = True - for t in threads: - if t > max_threads: - result = False - break - - assert result, "using more threads than specified" - - max_memory = get_system_total_memory_gb() - result = True - for m in memory: - if m > max_memory: - result = False - break - assert result,\ - "using more memory than system has (memory is not specified by user)" - - os.remove(LOG_FILENAME) + + max_threads = 2 + with pytest.raises(RuntimeError): + pipe.run(plugin='MultiProc', + plugin_args={'n_procs': max_threads}) diff --git a/nipype/pipeline/plugins/tools.py b/nipype/pipeline/plugins/tools.py new file mode 100644 index 0000000000..d76b1a3a86 --- /dev/null +++ b/nipype/pipeline/plugins/tools.py @@ -0,0 +1,162 @@ +# -*- coding: utf-8 -*- +# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- +# vi: set ft=python sts=4 ts=4 sw=4 et: +"""Common graph operations for execution +""" +from __future__ import print_function, division, unicode_literals, absolute_import +from builtins import open + +import os +import getpass +from socket import gethostname +import sys +import uuid +from time import strftime +from traceback import format_exception + +from ... import logging +from ...utils.filemanip import savepkl, crash2txt + +logger = logging.getLogger('workflow') + +def report_crash(node, traceback=None, hostname=None): + """Writes crash related information to a file + """ + name = node._id + host = None + if node.result and getattr(node.result, 'runtime'): + if isinstance(node.result.runtime, list): + host = node.result.runtime[0].hostname + else: + host = node.result.runtime.hostname + + # Try everything to fill in the host + host = host or hostname or gethostname() + logger.error('Node %s failed to run on host %s.', name, host) + if not traceback: + traceback = format_exception(*sys.exc_info()) + timeofcrash = strftime('%Y%m%d-%H%M%S') + login_name = getpass.getuser() + crashfile = 'crash-%s-%s-%s-%s' % ( + timeofcrash, login_name, name, str(uuid.uuid4())) + crashdir = node.config['execution'].get('crashdump_dir', os.getcwd()) + + if not os.path.exists(crashdir): + os.makedirs(crashdir) + crashfile = os.path.join(crashdir, crashfile) + + if node.config['execution']['crashfile_format'].lower() in ['text', 'txt']: + crashfile += '.txt' + else: + crashfile += '.pklz' + + logger.error('Saving crash info to %s\n%s', crashfile, ''.join(traceback)) + if crashfile.endswith('.txt'): + crash2txt(crashfile, dict(node=node, traceback=traceback)) + else: + savepkl(crashfile, dict(node=node, traceback=traceback)) + return crashfile + + +def report_nodes_not_run(notrun): + """List nodes that crashed with crashfile info + + Optionally displays dependent nodes that weren't executed as a result of + the crash. + """ + if notrun: + logger.info("***********************************") + for info in notrun: + logger.error("could not run node: %s" % + '.'.join((info['node']._hierarchy, + info['node']._id))) + logger.info("crashfile: %s" % info['crashfile']) + logger.debug("The following dependent nodes were not run") + for subnode in info['dependents']: + logger.debug(subnode._id) + logger.info("***********************************") + raise RuntimeError(('Workflow did not execute cleanly. ' + 'Check log for details')) + + +def create_pyscript(node, updatehash=False, store_exception=True): + # pickle node + timestamp = strftime('%Y%m%d_%H%M%S') + if node._hierarchy: + suffix = '%s_%s_%s' % (timestamp, node._hierarchy, node._id) + batch_dir = os.path.join(node.base_dir, + node._hierarchy.split('.')[0], + 'batch') + else: + suffix = '%s_%s' % (timestamp, node._id) + batch_dir = os.path.join(node.base_dir, 'batch') + if not os.path.exists(batch_dir): + os.makedirs(batch_dir) + pkl_file = os.path.join(batch_dir, 'node_%s.pklz' % suffix) + savepkl(pkl_file, dict(node=node, updatehash=updatehash)) + mpl_backend = node.config["execution"]["matplotlib_backend"] + # create python script to load and trap exception + cmdstr = """import os +import sys + +can_import_matplotlib = True #Silently allow matplotlib to be ignored +try: + import matplotlib + matplotlib.use('%s') +except ImportError: + can_import_matplotlib = False + pass + +from nipype import config, logging +from nipype.utils.filemanip import loadpkl, savepkl +from socket import gethostname +from traceback import format_exception +info = None +pklfile = '%s' +batchdir = '%s' +from nipype.utils.filemanip import loadpkl, savepkl +try: + if not sys.version_info < (2, 7): + from collections import OrderedDict + config_dict=%s + config.update_config(config_dict) + ## Only configure matplotlib if it was successfully imported, + ## matplotlib is an optional component to nipype + if can_import_matplotlib: + config.update_matplotlib() + logging.update_logging(config) + traceback=None + cwd = os.getcwd() + info = loadpkl(pklfile) + result = info['node'].run(updatehash=info['updatehash']) +except Exception as e: + etype, eval, etr = sys.exc_info() + traceback = format_exception(etype,eval,etr) + if info is None or not os.path.exists(info['node'].output_dir()): + result = None + resultsfile = os.path.join(batchdir, 'crashdump_%s.pklz') + else: + result = info['node'].result + resultsfile = os.path.join(info['node'].output_dir(), + 'result_%%s.pklz'%%info['node'].name) +""" + if store_exception: + cmdstr += """ + savepkl(resultsfile, dict(result=result, hostname=gethostname(), + traceback=traceback)) +""" + else: + cmdstr += """ + if info is None: + savepkl(resultsfile, dict(result=result, hostname=gethostname(), + traceback=traceback)) + else: + from nipype.pipeline.plugins.base import report_crash + report_crash(info['node'], traceback, gethostname()) + raise Exception(e) +""" + cmdstr = cmdstr % (mpl_backend, pkl_file, batch_dir, node.config, suffix) + pyscript = os.path.join(batch_dir, 'pyscript_%s.py' % suffix) + with open(pyscript, 'wt') as fp: + fp.writelines(cmdstr) + return pyscript From 5d132296c45e1e8db8106da0a68cfe47e35e6702 Mon Sep 17 00:00:00 2001 From: oesteban Date: Wed, 27 Sep 2017 22:52:47 -0700 Subject: [PATCH 283/643] do not import iflogger from base plugin --- nipype/pipeline/plugins/condor.py | 5 +++-- nipype/pipeline/plugins/lsf.py | 5 +++-- nipype/pipeline/plugins/oar.py | 5 +++-- nipype/pipeline/plugins/pbs.py | 4 +++- nipype/pipeline/plugins/sge.py | 5 +++-- nipype/pipeline/plugins/slurm.py | 5 ++++- 6 files changed, 19 insertions(+), 10 deletions(-) diff --git a/nipype/pipeline/plugins/condor.py b/nipype/pipeline/plugins/condor.py index de4265e3f3..377297827d 100644 --- a/nipype/pipeline/plugins/condor.py +++ b/nipype/pipeline/plugins/condor.py @@ -7,8 +7,9 @@ from time import sleep from ...interfaces.base import CommandLine -from .base import (SGELikeBatchManagerBase, logger, iflogger, logging) - +from ... import logging +from .base import (SGELikeBatchManagerBase, logger, logging) +iflogger = logging.getLogger('interface') class CondorPlugin(SGELikeBatchManagerBase): """Execute using Condor diff --git a/nipype/pipeline/plugins/lsf.py b/nipype/pipeline/plugins/lsf.py index d065b521d8..8eb54b51ae 100644 --- a/nipype/pipeline/plugins/lsf.py +++ b/nipype/pipeline/plugins/lsf.py @@ -7,9 +7,10 @@ import re from time import sleep -from .base import (SGELikeBatchManagerBase, logger, iflogger, logging) +from .base import (SGELikeBatchManagerBase, logger, logging) +from ... import logging from ...interfaces.base import CommandLine - +iflogger = logging.getLogger('interface') class LSFPlugin(SGELikeBatchManagerBase): """Execute using LSF Cluster Submission diff --git a/nipype/pipeline/plugins/oar.py b/nipype/pipeline/plugins/oar.py index d3a9c6f360..6c03bb3e77 100644 --- a/nipype/pipeline/plugins/oar.py +++ b/nipype/pipeline/plugins/oar.py @@ -10,9 +10,10 @@ import subprocess import simplejson as json -from .base import (SGELikeBatchManagerBase, logger, iflogger, logging) +from .base import (SGELikeBatchManagerBase, logger, logging) +from ... import logging from ...interfaces.base import CommandLine - +iflogger = logging.getLogger('interface') class OARPlugin(SGELikeBatchManagerBase): """Execute using OAR diff --git a/nipype/pipeline/plugins/pbs.py b/nipype/pipeline/plugins/pbs.py index 62b35fa99a..5610693e2f 100644 --- a/nipype/pipeline/plugins/pbs.py +++ b/nipype/pipeline/plugins/pbs.py @@ -8,8 +8,10 @@ from time import sleep from ...interfaces.base import CommandLine -from .base import (SGELikeBatchManagerBase, logger, iflogger, logging) +from ... import logging +from .base import (SGELikeBatchManagerBase, logger, logging) +iflogger = logging.getLogger('interface') class PBSPlugin(SGELikeBatchManagerBase): diff --git a/nipype/pipeline/plugins/sge.py b/nipype/pipeline/plugins/sge.py index d337ebb961..3a371a1761 100644 --- a/nipype/pipeline/plugins/sge.py +++ b/nipype/pipeline/plugins/sge.py @@ -15,9 +15,10 @@ import random +from ... import logging from ...interfaces.base import CommandLine -from .base import (SGELikeBatchManagerBase, logger, iflogger, logging) - +from .base import (SGELikeBatchManagerBase, logger, logging) +iflogger = logging.getLogger('interface') DEBUGGING_PREFIX = str(int(random.uniform(100, 999))) diff --git a/nipype/pipeline/plugins/slurm.py b/nipype/pipeline/plugins/slurm.py index 083f804a75..a319720907 100644 --- a/nipype/pipeline/plugins/slurm.py +++ b/nipype/pipeline/plugins/slurm.py @@ -12,8 +12,11 @@ import re from time import sleep +from ... import logging from ...interfaces.base import CommandLine -from .base import (SGELikeBatchManagerBase, logger, iflogger, logging) +from .base import (SGELikeBatchManagerBase, logger, logging) + +iflogger = logging.getLogger('interface') From a503fc84fdb2cedd9073260c663488b54b44a1aa Mon Sep 17 00:00:00 2001 From: oesteban Date: Thu, 28 Sep 2017 00:40:35 -0700 Subject: [PATCH 284/643] improve logging traces --- nipype/pipeline/plugins/base.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/nipype/pipeline/plugins/base.py b/nipype/pipeline/plugins/base.py index 045bbffe83..0af6a2f4b1 100644 --- a/nipype/pipeline/plugins/base.py +++ b/nipype/pipeline/plugins/base.py @@ -126,16 +126,15 @@ def run(self, graph, config, updatehash=False): notrun.append(self._clean_queue(jobid, graph, result=result)) - logger.debug('Appending %d new tasks.' % len(toappend)) if toappend: self.pending_tasks.extend(toappend) num_jobs = len(self.pending_tasks) - logger.debug('Number of pending tasks: %d' % num_jobs) + logger.debug('Tasks currently running (%d).', num_jobs) if num_jobs < self.max_jobs: self._send_procs_to_workers(updatehash=updatehash, graph=graph) else: - logger.debug('Not submitting') + logger.debug('Not submitting (max jobs reached)') self._wait() self._remove_node_dirs() From cb6ef0220ac0a5f9e117ba1e525d12a5b52e851f Mon Sep 17 00:00:00 2001 From: oesteban Date: Thu, 28 Sep 2017 02:35:27 -0700 Subject: [PATCH 285/643] fix tests --- nipype/interfaces/base.py | 2 - nipype/pipeline/engine/nodes.py | 30 +- nipype/pipeline/engine/tests/test_engine.py | 12 +- nipype/pipeline/plugins/base.py | 20 +- nipype/pipeline/plugins/multiproc.py | 266 +++++++++--------- nipype/pipeline/plugins/tests/test_base.py | 26 -- .../pipeline/plugins/tests/test_callback.py | 5 +- nipype/pipeline/plugins/tests/test_tools.py | 57 ++++ nipype/utils/profiler.py | 4 +- nipype/utils/tests/test_cmd.py | 1 - nipype/utils/tests/test_profiler.py | 8 +- 11 files changed, 246 insertions(+), 185 deletions(-) create mode 100644 nipype/pipeline/plugins/tests/test_tools.py diff --git a/nipype/interfaces/base.py b/nipype/interfaces/base.py index 76b85268aa..91a396dd4d 100644 --- a/nipype/interfaces/base.py +++ b/nipype/interfaces/base.py @@ -765,8 +765,6 @@ def __init__(self, from_file=None, resource_monitor=None, **inputs): self.__class__.__name__) self.inputs = self.input_spec(**inputs) - self.estimated_memory_gb = 0.25 - self.num_threads = 1 if resource_monitor is not None: self.resource_monitor = resource_monitor diff --git a/nipype/pipeline/engine/nodes.py b/nipype/pipeline/engine/nodes.py index c5ee3f28f3..b4b83d1b5d 100644 --- a/nipype/pipeline/engine/nodes.py +++ b/nipype/pipeline/engine/nodes.py @@ -78,7 +78,7 @@ class Node(EngineBase): def __init__(self, interface, name, iterables=None, itersource=None, synchronize=False, overwrite=None, needed_outputs=None, - run_without_submitting=False, n_procs=1, mem_gb=None, + run_without_submitting=False, n_procs=1, mem_gb=0.25, **kwargs): """ Parameters @@ -169,9 +169,8 @@ def __init__(self, interface, name, iterables=None, itersource=None, self.needed_outputs = [] self.plugin_args = {} - self._interface.num_threads = n_procs - if mem_gb is not None: - self._interface.estimated_memory_gb = mem_gb + self._n_procs = n_procs + self._mem_gb = mem_gb if needed_outputs: self.needed_outputs = sorted(needed_outputs) @@ -270,6 +269,7 @@ def run(self, updatehash=False): Update the hash stored in the output directory """ # check to see if output directory and hash exist + if self.config is None: self.config = deepcopy(config._sections) else: @@ -685,6 +685,24 @@ def _copyfiles_to_wd(self, outdir, execute, linksonly=False): if execute and linksonly: rmtree(outdir) + def get_mem_gb(self): + """Get estimated memory (GB)""" + if hasattr(self._interface, 'estimated_memory_gb'): + self._mem_gb = self._interface.estimated_memory_gb + logger.warning('Setting "estimated_memory_gb" on Interfaces has been ' + 'deprecated as of nipype 1.0') + del self._interface.estimated_memory_gb + return self._mem_gb + + def get_n_procs(self): + """Get estimated number of processes""" + if hasattr(self._interface, 'num_threads'): + self._n_procs = self._interface.num_threads + logger.warning('Setting "num_threads" on Interfaces has been ' + 'deprecated as of nipype 1.0') + del self._interface.num_threads + return self._n_procs + def update(self, **opts): self.inputs.update(**opts) @@ -1111,8 +1129,8 @@ def _make_nodes(self, cwd=None): for i in range(nitems): nodename = '_' + self.name + str(i) node = Node(deepcopy(self._interface), - n_procs=self._interface.num_threads, - mem_gb=self._interface.estimated_memory_gb, + n_procs=self.get_n_procs(), + mem_gb=self.get_mem_gb(), overwrite=self.overwrite, needed_outputs=self.needed_outputs, run_without_submitting=self.run_without_submitting, diff --git a/nipype/pipeline/engine/tests/test_engine.py b/nipype/pipeline/engine/tests/test_engine.py index adaf506122..6bfffdfbeb 100644 --- a/nipype/pipeline/engine/tests/test_engine.py +++ b/nipype/pipeline/engine/tests/test_engine.py @@ -513,17 +513,17 @@ def func1(in1): mapnode = MapNode(Function(function=func1), iterfield='in1', - name='mapnode') + name='mapnode', + n_procs=2, + mem_gb=2) mapnode.inputs.in1 = [1, 2] - mapnode.interface.num_threads = 2 - mapnode.interface.estimated_memory_gb = 2 for idx, node in mapnode._make_nodes(): for attr in ('overwrite', 'run_without_submitting', 'plugin_args'): assert getattr(node, attr) == getattr(mapnode, attr) - for attr in ('num_threads', 'estimated_memory_gb'): - assert (getattr(node._interface, attr) == - getattr(mapnode._interface, attr)) + for attr in ('_n_procs', '_mem_gb'): + assert (getattr(node, attr) == + getattr(mapnode, attr)) def test_node_hash(tmpdir): diff --git a/nipype/pipeline/plugins/base.py b/nipype/pipeline/plugins/base.py index 0af6a2f4b1..53c84f7dc7 100644 --- a/nipype/pipeline/plugins/base.py +++ b/nipype/pipeline/plugins/base.py @@ -80,6 +80,7 @@ def __init__(self, plugin_args=None): self.mapnodesubids = None self.proc_done = None self.proc_pending = None + self.pending_tasks = [] self.max_jobs = self.plugin_args.get('max_jobs', np.inf) def _prerun_check(self, graph): @@ -95,8 +96,6 @@ def run(self, graph, config, updatehash=False): self._prerun_check(graph) # Generate appropriate structures for worker-manager model self._generate_dependency_list(graph) - self.pending_tasks = [] - self.readytorun = [] self.mapnodes = [] self.mapnodesubids = {} # setup polling - TODO: change to threaded model @@ -110,6 +109,11 @@ def run(self, graph, config, updatehash=False): taskid, jobid = self.pending_tasks.pop() try: result = self._get_result(taskid) + except Exception: + notrun.append(self._clean_queue( + jobid, graph, result={'result': None, + 'traceback': format_exc()})) + else: if result: if result['traceback']: notrun.append(self._clean_queue(jobid, graph, @@ -120,11 +124,6 @@ def run(self, graph, config, updatehash=False): self._clear_task(taskid) else: toappend.insert(0, (taskid, jobid)) - except Exception: - result = {'result': None, - 'traceback': format_exc()} - notrun.append(self._clean_queue(jobid, graph, - result=result)) if toappend: self.pending_tasks.extend(toappend) @@ -169,12 +168,15 @@ def _clear_task(self, taskid): raise NotImplementedError def _clean_queue(self, jobid, graph, result=None): + logger.info('Clearing %d from queue', jobid) + + if self._status_callback: + self._status_callback(self.procs[jobid], 'exception') + if str2bool(self._config['execution']['stop_on_first_crash']): raise RuntimeError("".join(result['traceback'])) crashfile = self._report_crash(self.procs[jobid], result=result) - if self._status_callback: - self._status_callback(self.procs[jobid], 'exception') if jobid in self.mapnodesubids: # remove current jobid self.proc_pending[jobid] = False diff --git a/nipype/pipeline/plugins/multiproc.py b/nipype/pipeline/plugins/multiproc.py index 8ad9e6e247..e67299519e 100644 --- a/nipype/pipeline/plugins/multiproc.py +++ b/nipype/pipeline/plugins/multiproc.py @@ -55,8 +55,7 @@ def run_node(node, updatehash, taskid): try: result['result'] = node.run(updatehash=updatehash) except: - etype, eval, etr = sys.exc_info() - result['traceback'] = format_exception(etype, eval, etr) + result['traceback'] = format_exception(*sys.exc_info()) result['result'] = node.result # Return the result dictionary @@ -91,11 +90,13 @@ class MultiProcPlugin(DistributedPluginBase): should be used. When those parameters are not specified, the number of threads and memory of the system is used. - System consuming nodes should be tagged: - memory_consuming_node.interface.estimated_memory_gb = 8 - thread_consuming_node.interface.num_threads = 16 + System consuming nodes should be tagged:: - The default number of threads and memory for a node is 1. + memory_consuming_node.mem_gb = 8 + thread_consuming_node.n_procs = 16 + + The default number of threads and memory are set at node + creation, and are 1 and 0.25GB respectively. Currently supported options are: @@ -138,7 +139,7 @@ def _clear_task(self, taskid): def _submit_job(self, node, updatehash=False): self._taskid += 1 - if getattr(node.inputs, 'terminal_output') == 'stream': + if getattr(node.inputs, 'terminal_output', '') == 'stream': node.inputs.terminal_output = 'allatonce' self._task_obj[self._taskid] = self.pool.apply_async( @@ -150,142 +151,153 @@ def _close(self): self.pool.close() return True - def _send_procs_to_workers(self, updatehash=False, graph=None): + def _prerun_check(self, graph): + tasks_mem_gb = [] + tasks_num_th = [] + for node in graph.nodes(): + tasks_mem_gb.append(node.get_mem_gb()) + tasks_num_th.append(node.get_n_procs()) + + if np.any(np.array(tasks_mem_gb) > self.memory_gb): + logger.warning( + 'Some nodes exceed the total amount of memory available ' + '(%0.2fGB).', self.memory_gb) + if self.raise_insufficient: + raise RuntimeError('Insufficient resources available for job') + + if np.any(np.array(tasks_num_th) > self.processors): + logger.warning( + 'Some nodes demand for more threads than available (%d).', + self.processors) + if self.raise_insufficient: + raise RuntimeError('Insufficient resources available for job') + + def _check_resources(self, running_tasks): """ - Sends jobs to workers when system resources are available. - Check memory (gb) and cores usage before running jobs. - + Make sure there are resources available """ - executing_now = [] + free_memory_gb = self.memory_gb + free_processors = self.processors + for _, jobid in running_tasks: + free_memory_gb -= min(self.procs[jobid].get_mem_gb(), self.memory_gb) + free_processors -= min(self.procs[jobid].get_n_procs(), self.processors) - # Check to see if a job is available - currently_running_jobids = np.flatnonzero( - ~self.proc_pending & (np.sum(self.depidx, axis=0) == 0)) + return free_memory_gb, free_processors - # Check available system resources by summing all threads and memory used - busy_memory_gb = 0 - busy_processors = 0 - for jobid in currently_running_jobids: - est_mem_gb = self.procs[jobid]._interface.estimated_memory_gb - - if est_mem_gb > self.memory_gb: - logger.warning( - 'Job %s - Estimated memory (%0.2fGB) exceeds the total amount' - ' available (%0.2fGB).', self.procs[jobid].name, est_mem_gb, self.memory_gb) - if self.raise_insufficient: - raise RuntimeError('Insufficient resources available for job') - - est_num_th = self.procs[jobid]._interface.num_threads - if est_num_th > self.processors: - logger.warning( - 'Job %s - Requested %d threads, but only %d are available.', - self.procs[jobid].name, est_num_th, self.processors) - if self.raise_insufficient: - raise RuntimeError('Insufficient resources available for job') - - busy_memory_gb += min(est_mem_gb, self.memory_gb) - busy_processors += min(est_num_th, self.processors) - - free_memory_gb = self.memory_gb - busy_memory_gb - free_processors = self.processors - busy_processors + def _send_procs_to_workers(self, updatehash=False, graph=None): + """ + Sends jobs to workers when system resources are available. + """ # Check all jobs without dependency not run jobids = np.flatnonzero( ~self.proc_done & (self.depidx.sum(axis=0) == 0).__array__()) + # Check available system resources by summing all threads and memory used + free_memory_gb, free_processors = self._check_resources(self.pending_tasks) + + logger.debug('Currently running %d tasks, and %d jobs ready. ' + 'Free memory (GB): %0.2f/%0.2f, Free processors: %d/%d', + len(self.pending_tasks), len(jobids), + free_memory_gb, self.memory_gb, free_processors, self.processors) + + + if (len(jobids) + len(self.pending_tasks)) == 0: + logger.debug('No tasks are being run, and no jobs can ' + 'be submitted to the queue. Potential deadlock') + return + # Sort jobs ready to run first by memory and then by number of threads # The most resource consuming jobs run first - jobids = sorted(jobids, - key=lambda item: (self.procs[item]._interface.estimated_memory_gb, - self.procs[item]._interface.num_threads)) - - resource_monitor = str2bool(config.get('execution', 'resource_monitor', 'false')) - if resource_monitor: - logger.debug('Free memory (GB): %d, Free processors: %d', - free_memory_gb, free_processors) + # jobids = sorted(jobids, + # key=lambda item: (self.procs[item]._get_mem_gb(), + # self.procs[item]._get_n_procs())) # While have enough memory and processors for first job # Submit first job on the list for jobid in jobids: - if resource_monitor: - logger.debug('Next Job: %d, memory (GB): %d, threads: %d', - jobid, self.procs[jobid]._interface.estimated_memory_gb, - self.procs[jobid]._interface.num_threads) - - if self.procs[jobid]._interface.estimated_memory_gb <= free_memory_gb and \ - self.procs[jobid]._interface.num_threads <= free_processors: - logger.info('Executing: %s ID: %d' % (self.procs[jobid]._id, jobid)) - executing_now.append(self.procs[jobid]) - - if isinstance(self.procs[jobid], MapNode): - try: - num_subnodes = self.procs[jobid].num_subnodes() - except Exception: - etype, eval, etr = sys.exc_info() - traceback = format_exception(etype, eval, etr) - self._report_crash(self.procs[jobid], traceback=traceback) - self._clean_queue(jobid, graph) - self.proc_pending[jobid] = False + # First expand mapnodes + if isinstance(self.procs[jobid], MapNode): + try: + num_subnodes = self.procs[jobid].num_subnodes() + except Exception: + traceback = format_exception(*sys.exc_info()) + self._report_crash(self.procs[jobid], traceback=traceback) + self._clean_queue(jobid, graph) + self.proc_pending[jobid] = False + continue + if num_subnodes > 1: + submit = self._submit_mapnode(jobid) + if not submit: continue - if num_subnodes > 1: - submit = self._submit_mapnode(jobid) - if not submit: - continue - - # change job status in appropriate queues - self.proc_done[jobid] = True - self.proc_pending[jobid] = True - - free_memory_gb -= self.procs[jobid]._interface.estimated_memory_gb - free_processors -= self.procs[jobid]._interface.num_threads - - # Send job to task manager and add to pending tasks - if self._status_callback: - self._status_callback(self.procs[jobid], 'start') - if str2bool(self.procs[jobid].config['execution']['local_hash_check']): - logger.debug('checking hash locally') - try: - hash_exists, _, _, _ = self.procs[jobid].hash_exists() - overwrite = self.procs[jobid].overwrite - always_run = self.procs[jobid]._interface.always_run - if (hash_exists and (overwrite is False or - (overwrite is None and not always_run))): - logger.debug('Skipping cached node %s with ID %s.', - self.procs[jobid]._id, jobid) - self._task_finished_cb(jobid) - self._remove_node_dirs() - continue - except Exception: - etype, eval, etr = sys.exc_info() - traceback = format_exception(etype, eval, etr) - self._report_crash(self.procs[jobid], traceback=traceback) - self._clean_queue(jobid, graph) - self.proc_pending[jobid] = False - continue - finally: - logger.debug('Finished checking hash') - - if self.procs[jobid].run_without_submitting: - logger.debug('Running node %s on master thread', - self.procs[jobid]) - try: - self.procs[jobid].run() - except Exception: - etype, eval, etr = sys.exc_info() - traceback = format_exception(etype, eval, etr) - self._report_crash(self.procs[jobid], traceback=traceback) - finally: + + # Check requirements of this job + next_job_gb = min(self.procs[jobid].get_mem_gb(), self.memory_gb) + next_job_th = min(self.procs[jobid].get_n_procs(), self.processors) + + # If node does not fit, skip at this moment + if next_job_th > free_processors or next_job_gb > free_memory_gb: + logger.debug('Cannot allocate job %d (%0.2fGB, %d threads).', + jobid, next_job_gb, next_job_th) + continue + + free_memory_gb -= next_job_gb + free_processors -= next_job_th + logger.info('Allocating %s ID=%d (%0.2fGB, %d threads). Free: %0.2fGB, %d threads.', + self.procs[jobid]._id, jobid, next_job_gb, next_job_th, + free_memory_gb, free_processors) + + # change job status in appropriate queues + self.proc_done[jobid] = True + self.proc_pending[jobid] = True + + if str2bool(self.procs[jobid].config['execution']['local_hash_check']): + logger.debug('checking hash locally') + try: + hash_exists, _, _, _ = self.procs[jobid].hash_exists() + overwrite = self.procs[jobid].overwrite + always_run = self.procs[jobid]._interface.always_run + if (hash_exists and (overwrite is False or + (overwrite is None and not always_run))): + logger.debug('Skipping cached node %s with ID %s.', + self.procs[jobid]._id, jobid) self._task_finished_cb(jobid) self._remove_node_dirs() - - else: - logger.debug('MultiProcPlugin submitting %s', str(jobid)) - tid = self._submit_job(deepcopy(self.procs[jobid]), - updatehash=updatehash) - if tid is None: - self.proc_done[jobid] = False - self.proc_pending[jobid] = False - else: - self.pending_tasks.insert(0, (tid, jobid)) + continue + except Exception: + traceback = format_exception(*sys.exc_info()) + self._report_crash(self.procs[jobid], traceback=traceback) + self._clean_queue(jobid, graph) + self.proc_pending[jobid] = False + continue + finally: + logger.debug('Finished checking hash') + + if self.procs[jobid].run_without_submitting: + logger.debug('Running node %s on master thread', + self.procs[jobid]) + try: + self.procs[jobid].run() + except Exception: + traceback = format_exception(*sys.exc_info()) + self._report_crash(self.procs[jobid], traceback=traceback) + + # Release resources + self._task_finished_cb(jobid) + self._remove_node_dirs() + free_memory_gb += next_job_gb + free_processors += next_job_th + continue + + # Task should be submitted to workers + # Send job to task manager and add to pending tasks + logger.debug('MultiProc submitting job ID %d', jobid) + if self._status_callback: + self._status_callback(self.procs[jobid], 'start') + tid = self._submit_job(deepcopy(self.procs[jobid]), + updatehash=updatehash) + if tid is None: + self.proc_done[jobid] = False + self.proc_pending[jobid] = False else: - break + self.pending_tasks.insert(0, (tid, jobid)) diff --git a/nipype/pipeline/plugins/tests/test_base.py b/nipype/pipeline/plugins/tests/test_base.py index 82a2a4480a..f8838e691a 100644 --- a/nipype/pipeline/plugins/tests/test_base.py +++ b/nipype/pipeline/plugins/tests/test_base.py @@ -5,12 +5,6 @@ """ import numpy as np import scipy.sparse as ssp -import re - -import mock - -import nipype.pipeline.plugins.base as pb - def test_scipy_sparse(): foo = ssp.lil_matrix(np.eye(3, k=1)) @@ -18,26 +12,6 @@ def test_scipy_sparse(): goo[goo.nonzero()] = 0 assert foo[0, 1] == 0 -def test_report_crash(): - with mock.patch('pickle.dump', mock.MagicMock()) as mock_pickle_dump: - with mock.patch('nipype.pipeline.plugins.base.format_exception', mock.MagicMock()): # see iss 1517 - mock_pickle_dump.return_value = True - mock_node = mock.MagicMock(name='mock_node') - mock_node._id = 'an_id' - mock_node.config = { - 'execution' : { - 'crashdump_dir' : '.', - 'crashfile_format' : 'pklz', - } - } - - actual_crashfile = pb.report_crash(mock_node) - - expected_crashfile = re.compile('.*/crash-.*-an_id-[0-9a-f\-]*.pklz') - - assert expected_crashfile.match(actual_crashfile).group() == actual_crashfile - assert mock_pickle_dump.call_count == 1 - ''' Can use the following code to test that a mapnode crash continues successfully Need to put this into a nose-test with a timeout diff --git a/nipype/pipeline/plugins/tests/test_callback.py b/nipype/pipeline/plugins/tests/test_callback.py index 822d13c5a9..bfe03463d1 100644 --- a/nipype/pipeline/plugins/tests/test_callback.py +++ b/nipype/pipeline/plugins/tests/test_callback.py @@ -81,13 +81,14 @@ def test_callback_multiproc_normal(tmpdir): assert so.statuses[1][1] == 'end' def test_callback_multiproc_exception(tmpdir): + tmpdir.chdir() + so = Status() - wf = pe.Workflow(name='test', base_dir=str(tmpdir)) + wf = pe.Workflow(name='test') f_node = pe.Node(niu.Function(function=bad_func, input_names=[], output_names=[]), name='f_node') wf.add_nodes([f_node]) - wf.config['execution']['crashdump_dir'] = wf.base_dir try: wf.run(plugin='MultiProc', plugin_args={'status_callback': so.callback}) diff --git a/nipype/pipeline/plugins/tests/test_tools.py b/nipype/pipeline/plugins/tests/test_tools.py new file mode 100644 index 0000000000..479cc773df --- /dev/null +++ b/nipype/pipeline/plugins/tests/test_tools.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- +# vi: set ft=python sts=4 ts=4 sw=4 et: +"""Tests for the engine module +""" +import numpy as np +import scipy.sparse as ssp +import re + +import mock + +from nipype.pipeline.plugins.tools import report_crash + +def test_report_crash(): + with mock.patch('pickle.dump', mock.MagicMock()) as mock_pickle_dump: + with mock.patch('nipype.pipeline.plugins.tools.format_exception', mock.MagicMock()): # see iss 1517 + mock_pickle_dump.return_value = True + mock_node = mock.MagicMock(name='mock_node') + mock_node._id = 'an_id' + mock_node.config = { + 'execution' : { + 'crashdump_dir' : '.', + 'crashfile_format' : 'pklz', + } + } + + actual_crashfile = report_crash(mock_node) + + expected_crashfile = re.compile('.*/crash-.*-an_id-[0-9a-f\-]*.pklz') + + assert expected_crashfile.match(actual_crashfile).group() == actual_crashfile + assert mock_pickle_dump.call_count == 1 + +''' +Can use the following code to test that a mapnode crash continues successfully +Need to put this into a nose-test with a timeout + +import nipype.interfaces.utility as niu +import nipype.pipeline.engine as pe + +wf = pe.Workflow(name='test') + +def func(arg1): + if arg1 == 2: + raise Exception('arg cannot be ' + str(arg1)) + return arg1 + +funkynode = pe.MapNode(niu.Function(function=func, input_names=['arg1'], output_names=['out']), + iterfield=['arg1'], + name = 'functor') +funkynode.inputs.arg1 = [1,2] + +wf.add_nodes([funkynode]) +wf.base_dir = '/tmp' + +wf.run(plugin='MultiProc') +''' diff --git a/nipype/utils/profiler.py b/nipype/utils/profiler.py index 75bb19a611..73cd40e139 100644 --- a/nipype/utils/profiler.py +++ b/nipype/utils/profiler.py @@ -108,8 +108,8 @@ def log_nodes_cb(node, status): node.result.runtime, 'nthreads_max', 'N/A'), 'runtime_memory_gb': getattr( node.result.runtime, 'mem_peak_gb', 'N/A'), - 'estimated_memory_gb': node._interface.estimated_memory_gb, - 'num_threads': node._interface.num_threads, + 'estimated_memory_gb': node.get_mem_gb(), + 'num_threads': node.get_n_procs(), } if status_dict['start'] is None or status_dict['finish'] is None: diff --git a/nipype/utils/tests/test_cmd.py b/nipype/utils/tests/test_cmd.py index b590ecb351..315d55441f 100644 --- a/nipype/utils/tests/test_cmd.py +++ b/nipype/utils/tests/test_cmd.py @@ -104,7 +104,6 @@ def test_run_4d_realign_without_arguments(self): [--between_loops [BETWEEN_LOOPS [BETWEEN_LOOPS ...]]] [--ignore_exception] [--loops [LOOPS [LOOPS ...]]] - [--resource_monitor] [--slice_order SLICE_ORDER] [--speedup [SPEEDUP [SPEEDUP ...]]] [--start START] diff --git a/nipype/utils/tests/test_profiler.py b/nipype/utils/tests/test_profiler.py index 7c08330d13..ff68d01d84 100644 --- a/nipype/utils/tests/test_profiler.py +++ b/nipype/utils/tests/test_profiler.py @@ -246,8 +246,8 @@ def _run_cmdline_workflow(self, num_gb, num_threads): # Resources used node resource_node = pe.Node(UseResources(), name='resource_node') - resource_node.interface.estimated_memory_gb = num_gb - resource_node.interface.num_threads = num_threads + resource_node._mem_gb = num_gb + resource_node._n_procs = num_threads # Connect workflow wf.connect(input_node, 'num_gb', resource_node, 'num_gb') @@ -325,8 +325,8 @@ def _run_function_workflow(self, num_gb, num_threads): output_names=[], function=use_resources), name='resource_node') - resource_node.interface.estimated_memory_gb = num_gb - resource_node.interface.num_threads = num_threads + resource_node._mem_gb = num_gb + resource_node._n_procs = num_threads # Connect workflow wf.connect(input_node, 'num_gb', resource_node, 'num_gb') From 9c2a8dad1c45e3758bdba7cac4ab571a2f57213b Mon Sep 17 00:00:00 2001 From: oesteban Date: Thu, 28 Sep 2017 02:59:44 -0700 Subject: [PATCH 286/643] add test --- .../pipeline/plugins/tests/test_multiproc.py | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/nipype/pipeline/plugins/tests/test_multiproc.py b/nipype/pipeline/plugins/tests/test_multiproc.py index d8ec93d668..780763405c 100644 --- a/nipype/pipeline/plugins/tests/test_multiproc.py +++ b/nipype/pipeline/plugins/tests/test_multiproc.py @@ -115,3 +115,23 @@ def test_no_more_threads_than_specified(tmpdir): with pytest.raises(RuntimeError): pipe.run(plugin='MultiProc', plugin_args={'n_procs': max_threads}) + + +def test_hold_job_until_procs_available(tmpdir): + tmpdir.chdir() + + pipe = pe.Workflow(name='pipe') + n1 = pe.Node(SingleNodeTestInterface(), name='n1', n_procs=2) + n2 = pe.Node(SingleNodeTestInterface(), name='n2', n_procs=2) + n3 = pe.Node(SingleNodeTestInterface(), name='n3', n_procs=2) + n4 = pe.Node(SingleNodeTestInterface(), name='n4', n_procs=2) + + pipe.connect(n1, 'output1', n2, 'input1') + pipe.connect(n1, 'output1', n3, 'input1') + pipe.connect(n2, 'output1', n4, 'input1') + pipe.connect(n3, 'output1', n4, 'input2') + n1.inputs.input1 = 4 + + max_threads = 2 + pipe.run(plugin='MultiProc', + plugin_args={'n_procs': max_threads}) From 2fcaa45872f9347011d10419a067ebeb15b2ca57 Mon Sep 17 00:00:00 2001 From: oesteban Date: Thu, 28 Sep 2017 03:00:00 -0700 Subject: [PATCH 287/643] improve debugging traces --- nipype/pipeline/plugins/base.py | 8 ++++---- nipype/pipeline/plugins/multiproc.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/nipype/pipeline/plugins/base.py b/nipype/pipeline/plugins/base.py index 53c84f7dc7..6a03b8c102 100644 --- a/nipype/pipeline/plugins/base.py +++ b/nipype/pipeline/plugins/base.py @@ -105,7 +105,7 @@ def run(self, graph, config, updatehash=False): toappend = [] # trigger callbacks for any pending results while self.pending_tasks: - logger.info('Processing %d pending tasks.', len(self.pending_tasks)) + logger.debug('Processing %d pending tasks.', len(self.pending_tasks)) taskid, jobid = self.pending_tasks.pop() try: result = self._get_result(taskid) @@ -168,7 +168,7 @@ def _clear_task(self, taskid): raise NotImplementedError def _clean_queue(self, jobid, graph, result=None): - logger.info('Clearing %d from queue', jobid) + logger.debug('Clearing %d from queue', jobid) if self._status_callback: self._status_callback(self.procs[jobid], 'exception') @@ -194,8 +194,8 @@ def _submit_mapnode(self, jobid): self.mapnodes.append(jobid) mapnodesubids = self.procs[jobid].get_subnodes() numnodes = len(mapnodesubids) - logger.info('Adding %d jobs for mapnode %s' % (numnodes, - self.procs[jobid]._id)) + logger.debug('Adding %d jobs for mapnode %s', + numnodes, self.procs[jobid]._id) for i in range(numnodes): self.mapnodesubids[self.depidx.shape[0] + i] = jobid self.procs.extend(mapnodesubids) diff --git a/nipype/pipeline/plugins/multiproc.py b/nipype/pipeline/plugins/multiproc.py index e67299519e..6a5dbe524f 100644 --- a/nipype/pipeline/plugins/multiproc.py +++ b/nipype/pipeline/plugins/multiproc.py @@ -196,7 +196,7 @@ def _send_procs_to_workers(self, updatehash=False, graph=None): # Check available system resources by summing all threads and memory used free_memory_gb, free_processors = self._check_resources(self.pending_tasks) - logger.debug('Currently running %d tasks, and %d jobs ready. ' + logger.info('Currently running %d tasks, and %d jobs ready. ' 'Free memory (GB): %0.2f/%0.2f, Free processors: %d/%d', len(self.pending_tasks), len(jobids), free_memory_gb, self.memory_gb, free_processors, self.processors) From 983ac373d0ee64cd24f0780ee8b604cfa16b22d4 Mon Sep 17 00:00:00 2001 From: oesteban Date: Thu, 28 Sep 2017 08:38:14 -0700 Subject: [PATCH 288/643] make open python 2 compatible --- nipype/pipeline/engine/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nipype/pipeline/engine/utils.py b/nipype/pipeline/engine/utils.py index bedd3c0c63..ebd7110ff4 100644 --- a/nipype/pipeline/engine/utils.py +++ b/nipype/pipeline/engine/utils.py @@ -1335,7 +1335,7 @@ def write_workflow_resources(graph, filename=None): big_dict['mapnode'] += [subidx] * nsamples big_dict['params'] += [params] * nsamples - with open(filename, 'w') as rsf: + with open(filename, 'wt') as rsf: json.dump(big_dict, rsf) return filename From ac19d23c3bc0e8cf0a39840809f23326202122d9 Mon Sep 17 00:00:00 2001 From: oesteban Date: Thu, 28 Sep 2017 10:45:07 -0700 Subject: [PATCH 289/643] address @effigies' comments --- docker/files/run_examples.sh | 2 +- docker/files/run_pytests.sh | 2 +- nipype/interfaces/base.py | 31 ++++++++++++------- nipype/pipeline/engine/nodes.py | 45 +++++++++++++++------------- nipype/pipeline/plugins/base.py | 36 +++++++++++----------- nipype/pipeline/plugins/condor.py | 3 +- nipype/pipeline/plugins/dagman.py | 2 +- nipype/pipeline/plugins/lsf.py | 3 +- nipype/pipeline/plugins/multiproc.py | 35 +++++++++++----------- nipype/pipeline/plugins/oar.py | 2 +- nipype/pipeline/plugins/pbs.py | 4 +-- nipype/pipeline/plugins/sge.py | 2 +- nipype/pipeline/plugins/slurm.py | 3 +- nipype/pipeline/plugins/tools.py | 1 + nipype/utils/config.py | 10 ++++++- nipype/utils/logger.py | 2 +- nipype/utils/profiler.py | 6 ++-- nipype/utils/spm_docs.py | 2 +- nipype/utils/tests/test_profiler.py | 2 +- 19 files changed, 110 insertions(+), 83 deletions(-) diff --git a/docker/files/run_examples.sh b/docker/files/run_examples.sh index f71ac60dde..3f4c793f9b 100644 --- a/docker/files/run_examples.sh +++ b/docker/files/run_examples.sh @@ -33,6 +33,6 @@ exit_code=$? # Collect crashfiles and generate xml report coverage xml -o ${WORKDIR}/tests/smoketest_${example_id}.xml -find /work -name "crash-*" -maxdepth 1 -exec mv {} ${WORKDIR}/crashfiles/ \; +find /work -maxdepth 1 -name "crash-*" -exec mv {} ${WORKDIR}/crashfiles/ \; exit $exit_code diff --git a/docker/files/run_pytests.sh b/docker/files/run_pytests.sh index 622772d3ae..b418c17124 100644 --- a/docker/files/run_pytests.sh +++ b/docker/files/run_pytests.sh @@ -38,7 +38,7 @@ if [[ "${PYTHON_VERSION}" -ge "30" ]]; then fi # Collect crashfiles -find ${WORKDIR} -name "crash-*" -maxdepth 1 -exec mv {} ${WORKDIR}/crashfiles/ \; +find ${WORKDIR} -maxdepth 1 -name "crash-*" -exec mv {} ${WORKDIR}/crashfiles/ \; echo "Unit tests finished with exit code ${exit_code}" exit ${exit_code} diff --git a/nipype/interfaces/base.py b/nipype/interfaces/base.py index 91a396dd4d..9f025d3e97 100644 --- a/nipype/interfaces/base.py +++ b/nipype/interfaces/base.py @@ -751,13 +751,26 @@ class BaseInterface(Interface): This class cannot be instantiated. + + Relevant Interface attributes + ----------------------------- + + ``input_spec`` points to the traited class for the inputs + ``output_spec`` points to the traited class for the outputs + ``_redirect_x`` should be set to ``True`` when the interface requires + connecting to a ``$DISPLAY`` (default is ``False``). + ``resource_monitor`` if ``False`` prevents resource-monitoring this + interface, if ``True`` monitoring will be enabled IFF the general + Nipype config is set on (``resource_monitor = true``). + + """ input_spec = BaseInterfaceInputSpec _version = None _additional_metadata = [] _redirect_x = False references_ = [] - resource_monitor = True + resource_monitor = True # Enabled for this interface IFF enabled in the config def __init__(self, from_file=None, resource_monitor=None, **inputs): if not self.input_spec: @@ -1133,7 +1146,7 @@ def run(self, **inputs): # Read .prof file in and set runtime values vals = np.loadtxt(mon_fname, delimiter=',') - if vals.tolist(): + if vals.size: vals = np.atleast_2d(vals) _, mem_peak_mb, nthreads = vals.max(0).astype(float).tolist() runtime.mem_peak_gb = mem_peak_mb / 1024 @@ -1310,7 +1323,6 @@ def run_command(runtime, output=None, timeout=0.01, redirect_x=False): """ # Init variables - PIPE = sp.PIPE cmdline = runtime.cmdline if redirect_x: @@ -1338,8 +1350,8 @@ def run_command(runtime, output=None, timeout=0.01, redirect_x=False): env=env) else: proc = sp.Popen(cmdline, - stdout=PIPE, - stderr=PIPE, + stdout=sp.PIPE, + stderr=sp.PIPE, shell=True, cwd=runtime.cwd, env=env) @@ -1414,17 +1426,16 @@ def get_dependencies(name, environ): Uses otool on darwin, ldd on linux. Currently doesn't support windows. """ - PIPE = sp.PIPE if sys.platform == 'darwin': proc = sp.Popen('otool -L `which %s`' % name, - stdout=PIPE, - stderr=PIPE, + stdout=sp.PIPE, + stderr=sp.PIPE, shell=True, env=environ) elif 'linux' in sys.platform: proc = sp.Popen('ldd `which %s`' % name, - stdout=PIPE, - stderr=PIPE, + stdout=sp.PIPE, + stderr=sp.PIPE, shell=True, env=environ) else: diff --git a/nipype/pipeline/engine/nodes.py b/nipype/pipeline/engine/nodes.py index b4b83d1b5d..6f1df368af 100644 --- a/nipype/pipeline/engine/nodes.py +++ b/nipype/pipeline/engine/nodes.py @@ -55,6 +55,7 @@ logger = logging.getLogger('workflow') + class Node(EngineBase): """Wraps interface objects for use in pipeline @@ -78,7 +79,7 @@ class Node(EngineBase): def __init__(self, interface, name, iterables=None, itersource=None, synchronize=False, overwrite=None, needed_outputs=None, - run_without_submitting=False, n_procs=1, mem_gb=0.25, + run_without_submitting=False, n_procs=1, mem_gb=0.20, **kwargs): """ Parameters @@ -200,6 +201,26 @@ def outputs(self): """Return the output fields of the underlying interface""" return self._interface._outputs() + @property + def mem_gb(self): + """Get estimated memory (GB)""" + if hasattr(self._interface, 'estimated_memory_gb'): + self._mem_gb = self._interface.estimated_memory_gb + logger.warning('Setting "estimated_memory_gb" on Interfaces has been ' + 'deprecated as of nipype 1.0, please use Node.mem_gb.') + del self._interface.estimated_memory_gb + return self._mem_gb + + @property + def n_procs(self): + """Get estimated number of processes""" + if hasattr(self._interface, 'num_threads'): + self._n_procs = self._interface.num_threads + logger.warning('Setting "num_threads" on Interfaces has been ' + 'deprecated as of nipype 1.0, please use Node.n_procs') + del self._interface.num_threads + return self._n_procs + def output_dir(self): """Return the location of the output directory for the node""" if self.base_dir is None: @@ -685,24 +706,6 @@ def _copyfiles_to_wd(self, outdir, execute, linksonly=False): if execute and linksonly: rmtree(outdir) - def get_mem_gb(self): - """Get estimated memory (GB)""" - if hasattr(self._interface, 'estimated_memory_gb'): - self._mem_gb = self._interface.estimated_memory_gb - logger.warning('Setting "estimated_memory_gb" on Interfaces has been ' - 'deprecated as of nipype 1.0') - del self._interface.estimated_memory_gb - return self._mem_gb - - def get_n_procs(self): - """Get estimated number of processes""" - if hasattr(self._interface, 'num_threads'): - self._n_procs = self._interface.num_threads - logger.warning('Setting "num_threads" on Interfaces has been ' - 'deprecated as of nipype 1.0') - del self._interface.num_threads - return self._n_procs - def update(self, **opts): self.inputs.update(**opts) @@ -1129,8 +1132,8 @@ def _make_nodes(self, cwd=None): for i in range(nitems): nodename = '_' + self.name + str(i) node = Node(deepcopy(self._interface), - n_procs=self.get_n_procs(), - mem_gb=self.get_mem_gb(), + n_procs=self.n_procs, + mem_gb=self.mem_gb, overwrite=self.overwrite, needed_outputs=self.needed_outputs, run_without_submitting=self.run_without_submitting, diff --git a/nipype/pipeline/plugins/base.py b/nipype/pipeline/plugins/base.py index 6a03b8c102..a57e76ef26 100644 --- a/nipype/pipeline/plugins/base.py +++ b/nipype/pipeline/plugins/base.py @@ -31,15 +31,6 @@ class PluginBase(object): """ Base class for plugins - Execution plugin API - ==================== - - Current status:: - - class plugin_runner(PluginBase): - - def run(graph, config, updatehash) - """ def __init__(self, plugin_args=None): @@ -47,11 +38,21 @@ def __init__(self, plugin_args=None): plugin_args = {} self.plugin_args = plugin_args self._config = None - self._status_callback = plugin_args.get('status_callback') - return def run(self, graph, config, updatehash=False): + """ + The core plugin member that should be implemented by + all plugins. + + graph: a networkx, flattened :abbr:`DAG (Directed Acyclic Graph)` + to be executed + + config: a nipype.config object + + updatehash: + + """ raise NotImplementedError @@ -63,9 +64,9 @@ def __init__(self, plugin_args=None): """Initialize runtime attributes to none procs: list (N) of underlying interface elements to be processed - proc_done: a boolean numpy array (N) signifying whether a process has been + proc_done: a boolean numpy array (N,) signifying whether a process has been executed - proc_pending: a boolean numpy array (N) signifying whether a + proc_pending: a boolean numpy array (N,) signifying whether a process is currently running. Note: A process is finished only when both proc_done==True and proc_pending==False @@ -84,7 +85,7 @@ def __init__(self, plugin_args=None): self.max_jobs = self.plugin_args.get('max_jobs', np.inf) def _prerun_check(self, graph): - """Stub.""" + """Stub method to validate/massage graph and nodes before running""" def run(self, graph, config, updatehash=False): """ @@ -227,9 +228,10 @@ def _send_procs_to_workers(self, updatehash=False, graph=None): logger.debug('Slots available: %s' % slots) if (num_jobs >= self.max_jobs) or (slots == 0): break - # Check to see if a job is available - jobids = np.flatnonzero( - ~self.proc_done & (self.depidx.sum(axis=0) == 0).__array__()) + + # Check to see if a job is available (jobs without dependencies not run) + # See https://github.com/nipy/nipype/pull/2200#discussion_r141605722 + jobids = np.nonzero(~self.proc_done & (self.depidx.sum(0) == 0))[1] if len(jobids) > 0: # send all available jobs diff --git a/nipype/pipeline/plugins/condor.py b/nipype/pipeline/plugins/condor.py index 377297827d..0548a7afbc 100644 --- a/nipype/pipeline/plugins/condor.py +++ b/nipype/pipeline/plugins/condor.py @@ -8,9 +8,10 @@ from ...interfaces.base import CommandLine from ... import logging -from .base import (SGELikeBatchManagerBase, logger, logging) +from .base import SGELikeBatchManagerBase, logger iflogger = logging.getLogger('interface') + class CondorPlugin(SGELikeBatchManagerBase): """Execute using Condor diff --git a/nipype/pipeline/plugins/dagman.py b/nipype/pipeline/plugins/dagman.py index 61aa44229e..ce2a2a5592 100644 --- a/nipype/pipeline/plugins/dagman.py +++ b/nipype/pipeline/plugins/dagman.py @@ -10,7 +10,7 @@ import time from warnings import warn -from .base import (GraphPluginBase, logger) +from .base import GraphPluginBase, logger from ...interfaces.base import CommandLine diff --git a/nipype/pipeline/plugins/lsf.py b/nipype/pipeline/plugins/lsf.py index 8eb54b51ae..5ee0483221 100644 --- a/nipype/pipeline/plugins/lsf.py +++ b/nipype/pipeline/plugins/lsf.py @@ -7,11 +7,12 @@ import re from time import sleep -from .base import (SGELikeBatchManagerBase, logger, logging) from ... import logging from ...interfaces.base import CommandLine +from .base import SGELikeBatchManagerBase, logger iflogger = logging.getLogger('interface') + class LSFPlugin(SGELikeBatchManagerBase): """Execute using LSF Cluster Submission diff --git a/nipype/pipeline/plugins/multiproc.py b/nipype/pipeline/plugins/multiproc.py index 6a5dbe524f..0100a31c26 100644 --- a/nipype/pipeline/plugins/multiproc.py +++ b/nipype/pipeline/plugins/multiproc.py @@ -16,7 +16,7 @@ from copy import deepcopy import numpy as np -from ... import logging, config +from ... import logging from ...utils.misc import str2bool from ...utils.profiler import get_system_total_memory_gb from ..engine import MapNode @@ -155,8 +155,8 @@ def _prerun_check(self, graph): tasks_mem_gb = [] tasks_num_th = [] for node in graph.nodes(): - tasks_mem_gb.append(node.get_mem_gb()) - tasks_num_th.append(node.get_n_procs()) + tasks_mem_gb.append(node.mem_gb) + tasks_num_th.append(node.n_procs) if np.any(np.array(tasks_mem_gb) > self.memory_gb): logger.warning( @@ -179,8 +179,8 @@ def _check_resources(self, running_tasks): free_memory_gb = self.memory_gb free_processors = self.processors for _, jobid in running_tasks: - free_memory_gb -= min(self.procs[jobid].get_mem_gb(), self.memory_gb) - free_processors -= min(self.procs[jobid].get_n_procs(), self.processors) + free_memory_gb -= min(self.procs[jobid].get_mem_gb(), free_memory_gb) + free_processors -= min(self.procs[jobid].get_n_procs(), free_processors) return free_memory_gb, free_processors @@ -189,7 +189,9 @@ def _send_procs_to_workers(self, updatehash=False, graph=None): Sends jobs to workers when system resources are available. """ - # Check all jobs without dependency not run + # Check to see if a job is available (jobs without dependencies not run) + # See https://github.com/nipy/nipype/pull/2200#discussion_r141605722 + jobids = np.nonzero(~self.proc_done & (self.depidx.sum(0) == 0))[1] jobids = np.flatnonzero( ~self.proc_done & (self.depidx.sum(axis=0) == 0).__array__()) @@ -197,12 +199,11 @@ def _send_procs_to_workers(self, updatehash=False, graph=None): free_memory_gb, free_processors = self._check_resources(self.pending_tasks) logger.info('Currently running %d tasks, and %d jobs ready. ' - 'Free memory (GB): %0.2f/%0.2f, Free processors: %d/%d', - len(self.pending_tasks), len(jobids), - free_memory_gb, self.memory_gb, free_processors, self.processors) + 'Free memory (GB): %0.2f/%0.2f, Free processors: %d/%d', + len(self.pending_tasks), len(jobids), + free_memory_gb, self.memory_gb, free_processors, self.processors) - - if (len(jobids) + len(self.pending_tasks)) == 0: + if len(jobids) + len(self.pending_tasks) == 0: logger.debug('No tasks are being run, and no jobs can ' 'be submitted to the queue. Potential deadlock') return @@ -210,8 +211,8 @@ def _send_procs_to_workers(self, updatehash=False, graph=None): # Sort jobs ready to run first by memory and then by number of threads # The most resource consuming jobs run first # jobids = sorted(jobids, - # key=lambda item: (self.procs[item]._get_mem_gb(), - # self.procs[item]._get_n_procs())) + # key=lambda item: (self.procs[item]._mem_gb, + # self.procs[item]._n_procs)) # While have enough memory and processors for first job # Submit first job on the list @@ -232,8 +233,8 @@ def _send_procs_to_workers(self, updatehash=False, graph=None): continue # Check requirements of this job - next_job_gb = min(self.procs[jobid].get_mem_gb(), self.memory_gb) - next_job_th = min(self.procs[jobid].get_n_procs(), self.processors) + next_job_gb = min(self.procs[jobid].mem_gb, self.memory_gb) + next_job_th = min(self.procs[jobid].n_procs, self.processors) # If node does not fit, skip at this moment if next_job_th > free_processors or next_job_gb > free_memory_gb: @@ -257,8 +258,8 @@ def _send_procs_to_workers(self, updatehash=False, graph=None): hash_exists, _, _, _ = self.procs[jobid].hash_exists() overwrite = self.procs[jobid].overwrite always_run = self.procs[jobid]._interface.always_run - if (hash_exists and (overwrite is False or - (overwrite is None and not always_run))): + if hash_exists and (overwrite is False or + overwrite is None and not always_run): logger.debug('Skipping cached node %s with ID %s.', self.procs[jobid]._id, jobid) self._task_finished_cb(jobid) diff --git a/nipype/pipeline/plugins/oar.py b/nipype/pipeline/plugins/oar.py index 6c03bb3e77..e3f5ef7947 100644 --- a/nipype/pipeline/plugins/oar.py +++ b/nipype/pipeline/plugins/oar.py @@ -10,9 +10,9 @@ import subprocess import simplejson as json -from .base import (SGELikeBatchManagerBase, logger, logging) from ... import logging from ...interfaces.base import CommandLine +from .base import SGELikeBatchManagerBase, logger iflogger = logging.getLogger('interface') class OARPlugin(SGELikeBatchManagerBase): diff --git a/nipype/pipeline/plugins/pbs.py b/nipype/pipeline/plugins/pbs.py index 5610693e2f..6154abad74 100644 --- a/nipype/pipeline/plugins/pbs.py +++ b/nipype/pipeline/plugins/pbs.py @@ -7,9 +7,9 @@ import os from time import sleep -from ...interfaces.base import CommandLine from ... import logging -from .base import (SGELikeBatchManagerBase, logger, logging) +from ...interfaces.base import CommandLine +from .base import SGELikeBatchManagerBase, logger iflogger = logging.getLogger('interface') diff --git a/nipype/pipeline/plugins/sge.py b/nipype/pipeline/plugins/sge.py index 3a371a1761..6d448df3df 100644 --- a/nipype/pipeline/plugins/sge.py +++ b/nipype/pipeline/plugins/sge.py @@ -17,7 +17,7 @@ from ... import logging from ...interfaces.base import CommandLine -from .base import (SGELikeBatchManagerBase, logger, logging) +from .base import SGELikeBatchManagerBase, logger iflogger = logging.getLogger('interface') DEBUGGING_PREFIX = str(int(random.uniform(100, 999))) diff --git a/nipype/pipeline/plugins/slurm.py b/nipype/pipeline/plugins/slurm.py index a319720907..e5b797da5d 100644 --- a/nipype/pipeline/plugins/slurm.py +++ b/nipype/pipeline/plugins/slurm.py @@ -14,12 +14,11 @@ from ... import logging from ...interfaces.base import CommandLine -from .base import (SGELikeBatchManagerBase, logger, logging) +from .base import SGELikeBatchManagerBase, logger iflogger = logging.getLogger('interface') - class SLURMPlugin(SGELikeBatchManagerBase): ''' Execute using SLURM diff --git a/nipype/pipeline/plugins/tools.py b/nipype/pipeline/plugins/tools.py index d76b1a3a86..499a1db2d7 100644 --- a/nipype/pipeline/plugins/tools.py +++ b/nipype/pipeline/plugins/tools.py @@ -19,6 +19,7 @@ logger = logging.getLogger('workflow') + def report_crash(node, traceback=None, hostname=None): """Writes crash related information to a file """ diff --git a/nipype/utils/config.py b/nipype/utils/config.py index 241f2de8ee..ee4eef2d95 100644 --- a/nipype/utils/config.py +++ b/nipype/utils/config.py @@ -27,7 +27,8 @@ CONFIG_DEPRECATIONS = { - 'profile_runtime': ('resource_monitor', '1.13.2'), + 'profile_runtime': ('resource_monitor', '1.0'), + 'filemanip_level': ('utils_level', '1.0'), } NUMPY_MMAP = LooseVersion(np.__version__) >= LooseVersion('1.12.0') @@ -96,6 +97,13 @@ def __init__(self, *args, **kwargs): if os.path.exists(config_dir): self._config.read([config_file, 'nipype.cfg']) + for option in CONFIG_DEPRECATIONS: + if self._config.has_option(option): + new_option = CONFIG_DEPRECATIONS[option][0] + if not self._config.has_option(new_option): + # Warn implicit in get + self._config.set(new_option, self._config.get(option)) + def set_default_config(self): self._config.readfp(StringIO(default_cfg)) diff --git a/nipype/utils/logger.py b/nipype/utils/logger.py index f07d2f8cd0..4604cc4145 100644 --- a/nipype/utils/logger.py +++ b/nipype/utils/logger.py @@ -83,7 +83,7 @@ def update_logging(self, config): def getLogger(self, name): if name == 'filemanip': warn('The "filemanip" logger has been deprecated and replaced by ' - 'the "utils" logger as of nipype 1.13.2') + 'the "utils" logger as of nipype 1.0') if name in self.loggers: return self.loggers[name] return None diff --git a/nipype/utils/profiler.py b/nipype/utils/profiler.py index 73cd40e139..0128f35cf8 100644 --- a/nipype/utils/profiler.py +++ b/nipype/utils/profiler.py @@ -2,7 +2,7 @@ # @Author: oesteban # @Date: 2017-09-21 15:50:37 # @Last Modified by: oesteban -# @Last Modified time: 2017-09-27 12:57:50 +# @Last Modified time: 2017-09-28 09:56:05 """ Utilities to keep track of performance """ @@ -108,8 +108,8 @@ def log_nodes_cb(node, status): node.result.runtime, 'nthreads_max', 'N/A'), 'runtime_memory_gb': getattr( node.result.runtime, 'mem_peak_gb', 'N/A'), - 'estimated_memory_gb': node.get_mem_gb(), - 'num_threads': node.get_n_procs(), + 'estimated_memory_gb': node.mem_gb, + 'num_threads': node.n_procs, } if status_dict['start'] is None or status_dict['finish'] is None: diff --git a/nipype/utils/spm_docs.py b/nipype/utils/spm_docs.py index 89869c1e87..3b9942f0af 100644 --- a/nipype/utils/spm_docs.py +++ b/nipype/utils/spm_docs.py @@ -27,7 +27,7 @@ def grab_doc(task_name): """ - cmd = matlab.MatlabCommandLine(resource_monitor=False) + cmd = matlab.MatlabCommand(resource_monitor=False) # We need to tell Matlab where to find our spm_get_doc.m file. cwd = os.path.dirname(__file__) # Build matlab command diff --git a/nipype/utils/tests/test_profiler.py b/nipype/utils/tests/test_profiler.py index ff68d01d84..38247ac821 100644 --- a/nipype/utils/tests/test_profiler.py +++ b/nipype/utils/tests/test_profiler.py @@ -13,7 +13,7 @@ # Import packages import pytest from nipype.utils.profiler import resource_monitor as run_profile -from nipype.interfaces.base import (traits, CommandLine, CommandLineInputSpec) +from nipype.interfaces.base import traits, CommandLine, CommandLineInputSpec # UseResources inputspec From 7fbd86935596e237743520d4c2fcd34d07b8ab08 Mon Sep 17 00:00:00 2001 From: oesteban Date: Thu, 28 Sep 2017 10:59:00 -0700 Subject: [PATCH 290/643] fix error accessing config.has_option --- nipype/utils/config.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/nipype/utils/config.py b/nipype/utils/config.py index ee4eef2d95..64ef3bbd0f 100644 --- a/nipype/utils/config.py +++ b/nipype/utils/config.py @@ -98,11 +98,13 @@ def __init__(self, *args, **kwargs): self._config.read([config_file, 'nipype.cfg']) for option in CONFIG_DEPRECATIONS: - if self._config.has_option(option): - new_option = CONFIG_DEPRECATIONS[option][0] - if not self._config.has_option(new_option): - # Warn implicit in get - self._config.set(new_option, self._config.get(option)) + for section in ['execution', 'logging']: + if self._config.has_option(section, option): + new_option = CONFIG_DEPRECATIONS[option][0] + if not self._config.has_option(section, new_option): + # Warn implicit in get + self._config.set(section, new_option, + self._config.get(option)) def set_default_config(self): self._config.readfp(StringIO(default_cfg)) From b338e4f62a852eada053b7765821b1c9abd42853 Mon Sep 17 00:00:00 2001 From: oesteban Date: Thu, 28 Sep 2017 10:59:33 -0700 Subject: [PATCH 291/643] make write_workflow_resources python 2 compatible (take 2) --- nipype/pipeline/engine/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nipype/pipeline/engine/utils.py b/nipype/pipeline/engine/utils.py index ebd7110ff4..870b42f8fc 100644 --- a/nipype/pipeline/engine/utils.py +++ b/nipype/pipeline/engine/utils.py @@ -1336,7 +1336,7 @@ def write_workflow_resources(graph, filename=None): big_dict['params'] += [params] * nsamples with open(filename, 'wt') as rsf: - json.dump(big_dict, rsf) + json.dump(big_dict, rsf, ensure_ascii=False) return filename From 17d205d7840c760f31c16e95993d73050fa51536 Mon Sep 17 00:00:00 2001 From: oesteban Date: Thu, 28 Sep 2017 11:10:50 -0700 Subject: [PATCH 292/643] circle tests - write txt crashfiles --- docker/files/run_examples.sh | 4 +++- docker/files/run_pytests.sh | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/docker/files/run_examples.sh b/docker/files/run_examples.sh index 3f4c793f9b..c19a15f38b 100644 --- a/docker/files/run_examples.sh +++ b/docker/files/run_examples.sh @@ -16,8 +16,10 @@ echo "utils_level = DEBUG" >> ${HOME}/.nipype/nipype.cfg echo "log_to_file = true" >> ${HOME}/.nipype/nipype.cfg echo "log_directory = ${WORKDIR}/logs/example_${example_id}" >> ${HOME}/.nipype/nipype.cfg +echo '[execution]' >> ${HOME}/.nipype/nipype.cfg +echo 'crashfile_format = txt' >> ${HOME}/.nipype/nipype.cfg + if [[ "${NIPYPE_RESOURCE_MONITOR:-0}" == "1" ]]; then - echo '[execution]' >> ${HOME}/.nipype/nipype.cfg echo 'resource_monitor = true' >> ${HOME}/.nipype/nipype.cfg echo 'resource_monitor_frequency = 3' >> ${HOME}/.nipype/nipype.cfg fi diff --git a/docker/files/run_pytests.sh b/docker/files/run_pytests.sh index b418c17124..6dcb01b5e0 100644 --- a/docker/files/run_pytests.sh +++ b/docker/files/run_pytests.sh @@ -17,9 +17,11 @@ echo '[logging]' > ${HOME}/.nipype/nipype.cfg echo 'log_to_file = true' >> ${HOME}/.nipype/nipype.cfg echo "log_directory = ${WORKDIR}/logs/py${PYTHON_VERSION}" >> ${HOME}/.nipype/nipype.cfg +echo '[execution]' >> ${HOME}/.nipype/nipype.cfg +echo 'crashfile_format = txt' >> ${HOME}/.nipype/nipype.cfg + # Enable resource_monitor tests only for python 2.7 if [[ "${PYTHON_VERSION}" -lt "30" ]]; then - echo '[execution]' >> ${HOME}/.nipype/nipype.cfg echo 'resource_monitor = true' >> ${HOME}/.nipype/nipype.cfg fi @@ -30,7 +32,6 @@ exit_code=$? # Workaround: run here the profiler tests in python 3 if [[ "${PYTHON_VERSION}" -ge "30" ]]; then - echo '[execution]' >> ${HOME}/.nipype/nipype.cfg echo 'resource_monitor = true' >> ${HOME}/.nipype/nipype.cfg export COVERAGE_FILE=${WORKDIR}/tests/.coverage.py${PYTHON_VERSION}_extra py.test -v --junitxml=${WORKDIR}/tests/pytests_py${PYTHON_VERSION}_extra.xml --cov nipype --cov-report xml:${WORKDIR}/tests/coverage_py${PYTHON_VERSION}_extra.xml /src/nipype/nipype/utils/tests/test_profiler.py /src/nipype/nipype/pipeline/plugins/tests/test_multiproc*.py From 6edd5b5842bd4fd913876667862c86b16eb02704 Mon Sep 17 00:00:00 2001 From: oesteban Date: Thu, 28 Sep 2017 11:55:05 -0700 Subject: [PATCH 293/643] fix outdated call to get_mem_gb and get_n_procs --- nipype/pipeline/plugins/multiproc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nipype/pipeline/plugins/multiproc.py b/nipype/pipeline/plugins/multiproc.py index 0100a31c26..80551966f4 100644 --- a/nipype/pipeline/plugins/multiproc.py +++ b/nipype/pipeline/plugins/multiproc.py @@ -179,8 +179,8 @@ def _check_resources(self, running_tasks): free_memory_gb = self.memory_gb free_processors = self.processors for _, jobid in running_tasks: - free_memory_gb -= min(self.procs[jobid].get_mem_gb(), free_memory_gb) - free_processors -= min(self.procs[jobid].get_n_procs(), free_processors) + free_memory_gb -= min(self.procs[jobid].mem_gb, free_memory_gb) + free_processors -= min(self.procs[jobid].n_procs, free_processors) return free_memory_gb, free_processors From 430a3b4cb4505c7d0ecc4fb90ab000a5b0a93e44 Mon Sep 17 00:00:00 2001 From: oesteban Date: Thu, 28 Sep 2017 14:33:00 -0700 Subject: [PATCH 294/643] fix tests --- .circle/tests.sh | 4 +- docker/files/run_pytests.sh | 11 +- .../interfaces/tests/test_resource_monitor.py | 408 +++++++++++++++++ nipype/pipeline/engine/utils.py | 11 +- nipype/pipeline/plugins/base.py | 4 +- nipype/pipeline/plugins/tests/test_debug.py | 17 +- nipype/utils/profiler.py | 51 ++- nipype/utils/tests/test_profiler.py | 432 ------------------ nipype/utils/tests/use_resources | 45 +- 9 files changed, 485 insertions(+), 498 deletions(-) create mode 100644 nipype/interfaces/tests/test_resource_monitor.py delete mode 100644 nipype/utils/tests/test_profiler.py diff --git a/.circle/tests.sh b/.circle/tests.sh index e6e9861ab7..d5b428ffea 100644 --- a/.circle/tests.sh +++ b/.circle/tests.sh @@ -17,8 +17,8 @@ fi # They may need to be rebalanced in the future. case ${CIRCLE_NODE_INDEX} in 0) - docker run --rm=false -it -e FSL_COURSE_DATA="/data/examples/nipype-fsl_course_data" -v $HOME/examples:/data/examples:ro -v $WORKDIR:/work -w /work nipype/nipype:py36 /usr/bin/run_pytests.sh && \ - docker run --rm=false -it -e FSL_COURSE_DATA="/data/examples/nipype-fsl_course_data" -v $HOME/examples:/data/examples:ro -v $WORKDIR:/work -w /work nipype/nipype:py27 /usr/bin/run_pytests.sh && \ + docker run --rm=false -it -e NIPYPE_RESOURCE_MONITOR=1 -e FSL_COURSE_DATA="/data/examples/nipype-fsl_course_data" -v $HOME/examples:/data/examples:ro -v $WORKDIR:/work -w /work nipype/nipype:py36 /usr/bin/run_pytests.sh && \ + docker run --rm=false -it -e NIPYPE_RESOURCE_MONITOR=1 -e FSL_COURSE_DATA="/data/examples/nipype-fsl_course_data" -v $HOME/examples:/data/examples:ro -v $WORKDIR:/work -w /work nipype/nipype:py27 /usr/bin/run_pytests.sh && \ docker run --rm=false -it -v $WORKDIR:/work -w /src/nipype/doc --entrypoint=/usr/bin/run_builddocs.sh nipype/nipype:py36 /usr/bin/run_builddocs.sh && \ docker run --rm=false -it -v $HOME/examples:/data/examples:ro -v $WORKDIR:/work -w /work nipype/nipype:py36 /usr/bin/run_examples.sh test_spm Linear /data/examples/ workflow3d && \ docker run --rm=false -it -v $HOME/examples:/data/examples:ro -v $WORKDIR:/work -w /work nipype/nipype:py36 /usr/bin/run_examples.sh test_spm Linear /data/examples/ workflow4d diff --git a/docker/files/run_pytests.sh b/docker/files/run_pytests.sh index 6dcb01b5e0..19b6fcab87 100644 --- a/docker/files/run_pytests.sh +++ b/docker/files/run_pytests.sh @@ -20,8 +20,7 @@ echo "log_directory = ${WORKDIR}/logs/py${PYTHON_VERSION}" >> ${HOME}/.nipype/ni echo '[execution]' >> ${HOME}/.nipype/nipype.cfg echo 'crashfile_format = txt' >> ${HOME}/.nipype/nipype.cfg -# Enable resource_monitor tests only for python 2.7 -if [[ "${PYTHON_VERSION}" -lt "30" ]]; then +if [[ "${NIPYPE_RESOURCE_MONITOR:-0}" == "1" ]]; then echo 'resource_monitor = true' >> ${HOME}/.nipype/nipype.cfg fi @@ -30,14 +29,6 @@ export COVERAGE_FILE=${WORKDIR}/tests/.coverage.py${PYTHON_VERSION} py.test -v --junitxml=${WORKDIR}/tests/pytests_py${PYTHON_VERSION}.xml --cov nipype --cov-config /src/nipype/.coveragerc --cov-report xml:${WORKDIR}/tests/coverage_py${PYTHON_VERSION}.xml ${TESTPATH} exit_code=$? -# Workaround: run here the profiler tests in python 3 -if [[ "${PYTHON_VERSION}" -ge "30" ]]; then - echo 'resource_monitor = true' >> ${HOME}/.nipype/nipype.cfg - export COVERAGE_FILE=${WORKDIR}/tests/.coverage.py${PYTHON_VERSION}_extra - py.test -v --junitxml=${WORKDIR}/tests/pytests_py${PYTHON_VERSION}_extra.xml --cov nipype --cov-report xml:${WORKDIR}/tests/coverage_py${PYTHON_VERSION}_extra.xml /src/nipype/nipype/utils/tests/test_profiler.py /src/nipype/nipype/pipeline/plugins/tests/test_multiproc*.py - exit_code=$(( $exit_code + $? )) -fi - # Collect crashfiles find ${WORKDIR} -maxdepth 1 -name "crash-*" -exec mv {} ${WORKDIR}/crashfiles/ \; diff --git a/nipype/interfaces/tests/test_resource_monitor.py b/nipype/interfaces/tests/test_resource_monitor.py new file mode 100644 index 0000000000..b9146bfc64 --- /dev/null +++ b/nipype/interfaces/tests/test_resource_monitor.py @@ -0,0 +1,408 @@ +# -*- coding: utf-8 -*- +# test_profiler.py +# +# Author: Daniel Clark, 2016 + +""" +Module to unit test the resource_monitor in nipype +""" + +from __future__ import print_function, division, unicode_literals, absolute_import +import os +import pytest + +# Import packages +from nipype.utils.profiler import resource_monitor as run_profile, _use_resources +from nipype.interfaces.base import traits, CommandLine, CommandLineInputSpec +from nipype.interfaces import utility as niu + + +# UseResources inputspec +class UseResourcesInputSpec(CommandLineInputSpec): + mem_gb = traits.Float(desc='Number of GB of RAM to use', + argstr='-g %f', mandatory=True) + n_procs = traits.Int(desc='Number of threads to use', + argstr='-p %d', mandatory=True) + + +# UseResources interface +class UseResources(CommandLine): + ''' + use_resources cmd interface + ''' + from nipype import __path__ + # Init attributes + input_spec = UseResourcesInputSpec + + # Get path of executable + exec_dir = os.path.realpath(__path__[0]) + exec_path = os.path.join(exec_dir, 'utils', 'tests', 'use_resources') + + # Init cmd + _cmd = exec_path + + +# Test resources were used as expected in cmdline interface +# @pytest.mark.skipif(run_profile is False, reason='resources monitor is disabled') +@pytest.mark.skipif(True, reason='test disabled temporarily') +@pytest.mark.parametrize("mem_gb,n_procs", [(0.5, 3), (2.2, 2), (0.8, 4)]) +def test_cmdline_profiling(tmpdir, mem_gb, n_procs): + ''' + Test runtime profiler correctly records workflow RAM/CPUs consumption + of a CommandLine-derived interface + ''' + from nipype import config + config.set('execution', 'resource_monitor_frequency', '0.2') # Force sampling fast + + tmpdir.chdir() + iface = UseResources(mem_gb=mem_gb, n_procs=n_procs) + result = iface.run() + + assert abs(mem_gb - result.runtime.mem_peak_gb) < 0.3, 'estimated memory error above .3GB' + assert result.runtime.nthreads_max == n_procs, 'wrong number of threads estimated' + + +# @pytest.mark.skipif(run_profile is False, reason='resources monitor is disabled') +@pytest.mark.skipif(True, reason='test disabled temporarily') +@pytest.mark.parametrize("mem_gb,n_procs", [(0.5, 3), (2.2, 2), (0.8, 4)]) +def test_function_profiling(tmpdir, mem_gb, n_procs): + ''' + Test runtime profiler correctly records workflow RAM/CPUs consumption + of a Function interface + ''' + from nipype import config + config.set('execution', 'resource_monitor_frequency', '0.2') # Force sampling fast + + tmpdir.chdir() + iface = niu.Function(function=_use_resources) + iface.inputs.mem_gb = mem_gb + iface.inputs.n_procs = n_procs + result = iface.run() + + assert abs(mem_gb - result.runtime.mem_peak_gb) < 0.3, 'estimated memory error above .3GB' + assert result.runtime.nthreads_max == n_procs, 'wrong number of threads estimated' + + +# # Test case for the run function +# class TestRuntimeProfiler(): +# ''' +# This class is a test case for the runtime profiler +# ''' + +# # setup method for the necessary arguments to run cpac_pipeline.run +# def setup_class(self): +# ''' +# Method to instantiate TestRuntimeProfiler + +# Parameters +# ---------- +# self : TestRuntimeProfile +# ''' + +# # Init parameters +# # Input RAM GB to occupy +# self.mem_gb = 1.0 +# # Input number of sub-threads (not including parent threads) +# self.n_procs = 2 +# # Acceptable percent error for memory profiled against input +# self.mem_err_gb = 0.3 # Increased to 30% for py2.7 + +# # ! Only used for benchmarking the profiler over a range of +# # ! RAM usage and number of threads +# # ! Requires a LOT of RAM to be tested +# def _collect_range_runtime_stats(self, n_procs): +# ''' +# Function to collect a range of runtime stats +# ''' + +# # Import packages +# import json +# import numpy as np +# import pandas as pd + +# # Init variables +# ram_gb_range = 10.0 +# ram_gb_step = 0.25 +# dict_list = [] + +# # Iterate through all combos +# for mem_gb in np.arange(0.25, ram_gb_range+ram_gb_step, ram_gb_step): +# # Cmd-level +# cmd_node_str = self._run_cmdline_workflow(mem_gb, n_procs) +# cmd_node_stats = json.loads(cmd_node_str) +# cmd_start_ts = cmd_node_stats['start'] +# cmd_runtime_threads = int(cmd_node_stats['runtime_threads']) +# cmd_runtime_gb = float(cmd_node_stats['runtime_memory_gb']) +# cmd_finish_ts = cmd_node_stats['finish'] + +# # Func-level +# func_node_str = self._run_function_workflow(mem_gb, n_procs) +# func_node_stats = json.loads(func_node_str) +# func_start_ts = func_node_stats['start'] +# func_runtime_threads = int(func_node_stats['runtime_threads']) +# func_runtime_gb = float(func_node_stats['runtime_memory_gb']) +# func_finish_ts = func_node_stats['finish'] + +# # Calc errors +# cmd_threads_err = cmd_runtime_threads - n_procs +# cmd_gb_err = cmd_runtime_gb - mem_gb +# func_threads_err = func_runtime_threads - n_procs +# func_gb_err = func_runtime_gb - mem_gb + +# # Node dictionary +# results_dict = {'input_threads': n_procs, +# 'input_gb': mem_gb, +# 'cmd_runtime_threads': cmd_runtime_threads, +# 'cmd_runtime_gb': cmd_runtime_gb, +# 'func_runtime_threads': func_runtime_threads, +# 'func_runtime_gb': func_runtime_gb, +# 'cmd_threads_err': cmd_threads_err, +# 'cmd_gb_err': cmd_gb_err, +# 'func_threads_err': func_threads_err, +# 'func_gb_err': func_gb_err, +# 'cmd_start_ts': cmd_start_ts, +# 'cmd_finish_ts': cmd_finish_ts, +# 'func_start_ts': func_start_ts, +# 'func_finish_ts': func_finish_ts} +# # Append to list +# dict_list.append(results_dict) + +# # Create dataframe +# runtime_results_df = pd.DataFrame(dict_list) + +# # Return dataframe +# return runtime_results_df + +# # Test node +# def _run_cmdline_workflow(self, mem_gb, n_procs): +# ''' +# Function to run the use_resources cmdline script in a nipype workflow +# and return the runtime stats recorded by the profiler + +# Parameters +# ---------- +# self : TestRuntimeProfile + +# Returns +# ------- +# finish_str : string +# a json-compatible dictionary string containing the runtime +# statistics of the nipype node that used system resources +# ''' + +# # Import packages +# import logging +# import os +# import shutil +# import tempfile + +# import nipype.pipeline.engine as pe +# import nipype.interfaces.utility as util +# from nipype.utils.profiler import log_nodes_cb + +# # Init variables +# base_dir = tempfile.mkdtemp() +# log_file = os.path.join(base_dir, 'callback.log') + +# # Init logger +# logger = logging.getLogger('callback') +# logger.propagate = False +# logger.setLevel(logging.DEBUG) +# handler = logging.FileHandler(log_file) +# logger.addHandler(handler) + +# # Declare workflow +# wf = pe.Workflow(name='test_runtime_prof_cmd') +# wf.base_dir = base_dir + +# # Input node +# input_node = pe.Node(util.IdentityInterface(fields=['mem_gb', +# 'n_procs']), +# name='input_node') + +# # Resources used node +# resource_node = pe.Node(UseResources(), name='resource_node', mem_gb=mem_gb, +# n_procs=n_procs) + +# # Connect workflow +# wf.connect(input_node, 'mem_gb', resource_node, 'mem_gb') +# wf.connect(input_node, 'n_procs', resource_node, 'n_procs') + +# # Run workflow +# plugin_args = {'n_procs': n_procs, +# 'memory_gb': mem_gb, +# 'status_callback': log_nodes_cb} +# wf.run(plugin='MultiProc', plugin_args=plugin_args) + +# # Get runtime stats from log file +# with open(log_file, 'r') as log_handle: +# lines = log_handle.readlines() + +# node_str = lines[0].rstrip('\n') + +# # Delete wf base dir +# shutil.rmtree(base_dir) + +# # Return runtime stats +# return node_str + +# # Test node +# def _run_function_workflow(self, mem_gb, n_procs): +# ''' +# Function to run the use_resources() function in a nipype workflow +# and return the runtime stats recorded by the profiler + +# Parameters +# ---------- +# self : TestRuntimeProfile + +# Returns +# ------- +# finish_str : string +# a json-compatible dictionary string containing the runtime +# statistics of the nipype node that used system resources +# ''' + +# # Import packages +# import logging +# import os +# import shutil +# import tempfile + +# import nipype.pipeline.engine as pe +# import nipype.interfaces.utility as util +# from nipype.utils.profiler import log_nodes_cb + +# # Init variables +# base_dir = tempfile.mkdtemp() +# log_file = os.path.join(base_dir, 'callback.log') + +# # Init logger +# logger = logging.getLogger('callback') +# logger.propagate = False +# logger.setLevel(logging.DEBUG) +# handler = logging.FileHandler(log_file) +# logger.addHandler(handler) + +# # Declare workflow +# wf = pe.Workflow(name='test_runtime_prof_func') +# wf.base_dir = base_dir + +# # Input node +# input_node = pe.Node(util.IdentityInterface(fields=['mem_gb', +# 'n_procs']), +# name='input_node') +# input_node.inputs.mem_gb = mem_gb +# input_node.inputs.n_procs = n_procs + +# # Resources used node +# resource_node = pe.Node(util.Function(input_names=['n_procs', +# 'mem_gb'], +# output_names=[], +# function=use_resources), +# name='resource_node', +# mem_gb=mem_gb, +# n_procs=n_procs) + +# # Connect workflow +# wf.connect(input_node, 'mem_gb', resource_node, 'mem_gb') +# wf.connect(input_node, 'n_procs', resource_node, 'n_procs') + +# # Run workflow +# plugin_args = {'n_procs': n_procs, +# 'memory_gb': mem_gb, +# 'status_callback': log_nodes_cb} +# wf.run(plugin='MultiProc', plugin_args=plugin_args) + +# # Get runtime stats from log file +# with open(log_file, 'r') as log_handle: +# lines = log_handle.readlines() + +# # Delete wf base dir +# shutil.rmtree(base_dir) + +# # Return runtime stats +# return lines[0].rstrip('\n') + +# # Test resources were used as expected in cmdline interface +# @pytest.mark.skipif(run_profile is False, reason='resources monitor is disabled') +# def test_cmdline_profiling(self): +# ''' +# Test runtime profiler correctly records workflow RAM/CPUs consumption +# from a cmdline function +# ''' + +# # Import packages +# import json +# import numpy as np + +# # Init variables +# mem_gb = self.mem_gb +# n_procs = self.n_procs + +# # Run workflow and get stats +# node_str = self._run_cmdline_workflow(mem_gb, n_procs) +# # Get runtime stats as dictionary +# node_stats = json.loads(node_str) + +# # Read out runtime stats +# runtime_gb = float(node_stats['runtime_memory_gb']) +# runtime_threads = int(node_stats['runtime_threads']) + +# # Get margin of error for RAM GB +# allowed_gb_err = self.mem_err_gb +# runtime_gb_err = np.abs(runtime_gb-mem_gb) +# # +# expected_runtime_threads = n_procs + +# # Error message formatting +# mem_err = 'Input memory: %f is not within %.3f GB of runtime '\ +# 'memory: %f' % (mem_gb, self.mem_err_gb, runtime_gb) +# threads_err = 'Input threads: %d is not equal to runtime threads: %d' \ +# % (expected_runtime_threads, runtime_threads) + +# # Assert runtime stats are what was input +# assert runtime_gb_err <= allowed_gb_err, mem_err +# assert abs(expected_runtime_threads - runtime_threads) <= 1, threads_err + +# # Test resources were used as expected +# # @pytest.mark.skipif(True, reason="https://github.com/nipy/nipype/issues/1663") +# @pytest.mark.skipif(run_profile is False, reason='resources monitor is disabled') +# def test_function_profiling(self): +# ''' +# Test runtime profiler correctly records workflow RAM/CPUs consumption +# from a python function +# ''' + +# # Import packages +# import json +# import numpy as np + +# # Init variables +# mem_gb = self.mem_gb +# n_procs = self.n_procs + +# # Run workflow and get stats +# node_str = self._run_function_workflow(mem_gb, n_procs) +# # Get runtime stats as dictionary +# node_stats = json.loads(node_str) + +# # Read out runtime stats +# runtime_gb = float(node_stats['runtime_memory_gb']) +# runtime_threads = int(node_stats['runtime_threads']) + +# # Get margin of error for RAM GB +# allowed_gb_err = self.mem_err_gb +# runtime_gb_err = np.abs(runtime_gb - mem_gb) +# # +# expected_runtime_threads = n_procs + +# # Error message formatting +# mem_err = 'Input memory: %f is not within %.3f GB of runtime '\ +# 'memory: %f' % (mem_gb, self.mem_err_gb, runtime_gb) +# threads_err = 'Input threads: %d is not equal to runtime threads: %d' \ +# % (expected_runtime_threads, runtime_threads) + +# # Assert runtime stats are what was input +# assert runtime_gb_err <= allowed_gb_err, mem_err +# assert abs(expected_runtime_threads - runtime_threads) <= 1, threads_err diff --git a/nipype/pipeline/engine/utils.py b/nipype/pipeline/engine/utils.py index 870b42f8fc..689846b0d3 100644 --- a/nipype/pipeline/engine/utils.py +++ b/nipype/pipeline/engine/utils.py @@ -37,6 +37,7 @@ from ... import logging, config logger = logging.getLogger('workflow') +PY3 = sys.version_info[0] > 2 try: dfs_preorder = nx.dfs_preorder @@ -1320,7 +1321,13 @@ def write_workflow_resources(graph, filename=None): params = '_'.join(['{}'.format(p) for p in node.parameterization]) - rt_list = node.result.runtime + try: + rt_list = node.result.runtime + except Exception: + logger.warning('Could not access runtime info for node %s' + ' (%s interface)', nodename, classname) + continue + if not isinstance(rt_list, list): rt_list = [rt_list] @@ -1335,7 +1342,7 @@ def write_workflow_resources(graph, filename=None): big_dict['mapnode'] += [subidx] * nsamples big_dict['params'] += [params] * nsamples - with open(filename, 'wt') as rsf: + with open(filename, 'w' if PY3 else 'wb') as rsf: json.dump(big_dict, rsf, ensure_ascii=False) return filename diff --git a/nipype/pipeline/plugins/base.py b/nipype/pipeline/plugins/base.py index a57e76ef26..67e0962927 100644 --- a/nipype/pipeline/plugins/base.py +++ b/nipype/pipeline/plugins/base.py @@ -160,8 +160,8 @@ def _submit_job(self, node, updatehash=False): def _report_crash(self, node, result=None): tb = None if result is not None: - node._result = getattr(result, 'result') - tb = getattr(result, 'traceback') + node._result = result['result'] + tb = result['traceback'] node._traceback = tb return report_crash(node, traceback=tb) diff --git a/nipype/pipeline/plugins/tests/test_debug.py b/nipype/pipeline/plugins/tests/test_debug.py index 2bd2003492..3e03abcf90 100644 --- a/nipype/pipeline/plugins/tests/test_debug.py +++ b/nipype/pipeline/plugins/tests/test_debug.py @@ -37,18 +37,21 @@ def test_debug(tmpdir): os.chdir(str(tmpdir)) pipe = pe.Workflow(name='pipe') - mod1 = pe.Node(interface=DebugTestInterface(), name='mod1') - mod2 = pe.MapNode(interface=DebugTestInterface(), - iterfield=['input1'], + mod1 = pe.Node(DebugTestInterface(), name='mod1') + mod2 = pe.MapNode(DebugTestInterface(), iterfield=['input1'], name='mod2') + pipe.connect([(mod1, mod2, [('output1', 'input1')])]) pipe.base_dir = os.getcwd() mod1.inputs.input1 = 1 + run_wf = lambda: pipe.run(plugin="Debug") with pytest.raises(ValueError): run_wf() + + exc = None try: pipe.run(plugin="Debug", plugin_args={'callable': callme}) - exception_raised = False - except Exception: - exception_raised = True - assert not exception_raised + except Exception as e: + exc = e + + assert exc is None, 'unexpected exception caught' diff --git a/nipype/utils/profiler.py b/nipype/utils/profiler.py index 0128f35cf8..1498474b43 100644 --- a/nipype/utils/profiler.py +++ b/nipype/utils/profiler.py @@ -2,7 +2,7 @@ # @Author: oesteban # @Date: 2017-09-21 15:50:37 # @Last Modified by: oesteban -# @Last Modified time: 2017-09-28 09:56:05 +# @Last Modified time: 2017-09-28 13:11:03 """ Utilities to keep track of performance """ @@ -17,7 +17,7 @@ from .. import config, logging from .misc import str2bool -from builtins import open +from builtins import open, range proflogger = logging.getLogger('utils') @@ -284,3 +284,50 @@ def _get_ram_mb(pid, pyfunc=False): # Return memory return mem_mb + + +# Spin multiple threads +def _use_resources(n_procs, mem_gb): + ''' + Function to execute multiple use_gb_ram functions in parallel + ''' + # from multiprocessing import Process + from threading import Thread + import sys + + def _use_gb_ram(mem_gb): + """A test function to consume mem_gb GB of RAM""" + + # Getsize of one character string + bsize = sys.getsizeof(' ') - sys.getsizeof(' ') + boffset = sys.getsizeof('') + + num_bytes = int(mem_gb * (1024**3)) + # Eat mem_gb GB of memory for 1 second + gb_str = ' ' * ((num_bytes - boffset) // bsize) + + assert sys.getsizeof(gb_str) == num_bytes + + # Spin CPU + ctr = 0 + while ctr < 30e6: + ctr += 1 + + # Clear memory + del ctr + del gb_str + + # Build thread list + thread_list = [] + for idx in range(n_procs): + thread = Thread(target=_use_gb_ram, args=(mem_gb / n_procs,), + name='thread-%d' % idx) + thread_list.append(thread) + + # Run multi-threaded + print('Using %.3f GB of memory over %d sub-threads...' % (mem_gb, n_procs)) + for thread in thread_list: + thread.start() + + for thread in thread_list: + thread.join() diff --git a/nipype/utils/tests/test_profiler.py b/nipype/utils/tests/test_profiler.py deleted file mode 100644 index 38247ac821..0000000000 --- a/nipype/utils/tests/test_profiler.py +++ /dev/null @@ -1,432 +0,0 @@ -# -*- coding: utf-8 -*- -# test_profiler.py -# -# Author: Daniel Clark, 2016 - -""" -Module to unit test the resource_monitor in nipype -""" - -from __future__ import print_function, division, unicode_literals, absolute_import -from builtins import open, str - -# Import packages -import pytest -from nipype.utils.profiler import resource_monitor as run_profile -from nipype.interfaces.base import traits, CommandLine, CommandLineInputSpec - - -# UseResources inputspec -class UseResourcesInputSpec(CommandLineInputSpec): - ''' - use_resources cmd interface inputspec - ''' - - # Init attributes - num_gb = traits.Float(desc='Number of GB of RAM to use', - argstr='-g %f') - num_threads = traits.Int(desc='Number of threads to use', - argstr='-p %d') - - -# UseResources interface -class UseResources(CommandLine): - ''' - use_resources cmd interface - ''' - - # Import packages - import os - - # Init attributes - input_spec = UseResourcesInputSpec - - # Get path of executable - exec_dir = os.path.dirname(os.path.realpath(__file__)) - exec_path = os.path.join(exec_dir, 'use_resources') - - # Init cmd - _cmd = exec_path - - -# Spin multiple threads -def use_resources(num_threads, num_gb): - ''' - Function to execute multiple use_gb_ram functions in parallel - ''' - - # Function to occupy GB of memory - def _use_gb_ram(num_gb): - ''' - Function to consume GB of memory - ''' - import sys - - # Getsize of one character string - bsize = sys.getsizeof(' ') - sys.getsizeof(' ') - boffset = sys.getsizeof('') - - num_bytes = int(num_gb * (1024**3)) - # Eat num_gb GB of memory for 1 second - gb_str = ' ' * ((num_bytes - boffset) // bsize) - - assert sys.getsizeof(gb_str) == num_bytes - - # Spin CPU - ctr = 0 - while ctr < 30e6: - ctr += 1 - - # Clear memory - del ctr - del gb_str - - # Import packages - from multiprocessing import Process - from threading import Thread - - # Init variables - num_gb = float(num_gb) - - # Build thread list - thread_list = [] - for idx in range(num_threads): - thread = Thread(target=_use_gb_ram, args=(num_gb/num_threads,), - name=str(idx)) - thread_list.append(thread) - - # Run multi-threaded - print('Using %.3f GB of memory over %d sub-threads...' % \ - (num_gb, num_threads)) - for idx, thread in enumerate(thread_list): - thread.start() - - for thread in thread_list: - thread.join() - - -# Test case for the run function -class TestRuntimeProfiler(): - ''' - This class is a test case for the runtime profiler - ''' - - # setup method for the necessary arguments to run cpac_pipeline.run - def setup_class(self): - ''' - Method to instantiate TestRuntimeProfiler - - Parameters - ---------- - self : TestRuntimeProfile - ''' - - # Init parameters - # Input RAM GB to occupy - self.num_gb = 1.0 - # Input number of sub-threads (not including parent threads) - self.num_threads = 2 - # Acceptable percent error for memory profiled against input - self.mem_err_gb = 0.3 # Increased to 30% for py2.7 - - # ! Only used for benchmarking the profiler over a range of - # ! RAM usage and number of threads - # ! Requires a LOT of RAM to be tested - def _collect_range_runtime_stats(self, num_threads): - ''' - Function to collect a range of runtime stats - ''' - - # Import packages - import json - import numpy as np - import pandas as pd - - # Init variables - ram_gb_range = 10.0 - ram_gb_step = 0.25 - dict_list = [] - - # Iterate through all combos - for num_gb in np.arange(0.25, ram_gb_range+ram_gb_step, ram_gb_step): - # Cmd-level - cmd_node_str = self._run_cmdline_workflow(num_gb, num_threads) - cmd_node_stats = json.loads(cmd_node_str) - cmd_start_ts = cmd_node_stats['start'] - cmd_runtime_threads = int(cmd_node_stats['runtime_threads']) - cmd_runtime_gb = float(cmd_node_stats['runtime_memory_gb']) - cmd_finish_ts = cmd_node_stats['finish'] - - # Func-level - func_node_str = self._run_function_workflow(num_gb, num_threads) - func_node_stats = json.loads(func_node_str) - func_start_ts = func_node_stats['start'] - func_runtime_threads = int(func_node_stats['runtime_threads']) - func_runtime_gb = float(func_node_stats['runtime_memory_gb']) - func_finish_ts = func_node_stats['finish'] - - # Calc errors - cmd_threads_err = cmd_runtime_threads - num_threads - cmd_gb_err = cmd_runtime_gb - num_gb - func_threads_err = func_runtime_threads - num_threads - func_gb_err = func_runtime_gb - num_gb - - # Node dictionary - results_dict = {'input_threads' : num_threads, - 'input_gb' : num_gb, - 'cmd_runtime_threads' : cmd_runtime_threads, - 'cmd_runtime_gb' : cmd_runtime_gb, - 'func_runtime_threads' : func_runtime_threads, - 'func_runtime_gb' : func_runtime_gb, - 'cmd_threads_err' : cmd_threads_err, - 'cmd_gb_err' : cmd_gb_err, - 'func_threads_err' : func_threads_err, - 'func_gb_err' : func_gb_err, - 'cmd_start_ts' : cmd_start_ts, - 'cmd_finish_ts' : cmd_finish_ts, - 'func_start_ts' : func_start_ts, - 'func_finish_ts' : func_finish_ts} - # Append to list - dict_list.append(results_dict) - - # Create dataframe - runtime_results_df = pd.DataFrame(dict_list) - - # Return dataframe - return runtime_results_df - - # Test node - def _run_cmdline_workflow(self, num_gb, num_threads): - ''' - Function to run the use_resources cmdline script in a nipype workflow - and return the runtime stats recorded by the profiler - - Parameters - ---------- - self : TestRuntimeProfile - - Returns - ------- - finish_str : string - a json-compatible dictionary string containing the runtime - statistics of the nipype node that used system resources - ''' - - # Import packages - import logging - import os - import shutil - import tempfile - - import nipype.pipeline.engine as pe - import nipype.interfaces.utility as util - from nipype.utils.profiler import log_nodes_cb - - # Init variables - base_dir = tempfile.mkdtemp() - log_file = os.path.join(base_dir, 'callback.log') - - # Init logger - logger = logging.getLogger('callback') - logger.propagate = False - logger.setLevel(logging.DEBUG) - handler = logging.FileHandler(log_file) - logger.addHandler(handler) - - # Declare workflow - wf = pe.Workflow(name='test_runtime_prof_cmd') - wf.base_dir = base_dir - - # Input node - input_node = pe.Node(util.IdentityInterface(fields=['num_gb', - 'num_threads']), - name='input_node') - input_node.inputs.num_gb = num_gb - input_node.inputs.num_threads = num_threads - - # Resources used node - resource_node = pe.Node(UseResources(), name='resource_node') - resource_node._mem_gb = num_gb - resource_node._n_procs = num_threads - - # Connect workflow - wf.connect(input_node, 'num_gb', resource_node, 'num_gb') - wf.connect(input_node, 'num_threads', resource_node, 'num_threads') - - # Run workflow - plugin_args = {'n_procs' : num_threads, - 'memory_gb' : num_gb, - 'status_callback' : log_nodes_cb} - wf.run(plugin='MultiProc', plugin_args=plugin_args) - - # Get runtime stats from log file - with open(log_file, 'r') as log_handle: - lines = log_handle.readlines() - - node_str = lines[0].rstrip('\n') - - # Delete wf base dir - shutil.rmtree(base_dir) - - # Return runtime stats - return node_str - - # Test node - def _run_function_workflow(self, num_gb, num_threads): - ''' - Function to run the use_resources() function in a nipype workflow - and return the runtime stats recorded by the profiler - - Parameters - ---------- - self : TestRuntimeProfile - - Returns - ------- - finish_str : string - a json-compatible dictionary string containing the runtime - statistics of the nipype node that used system resources - ''' - - # Import packages - import logging - import os - import shutil - import tempfile - - import nipype.pipeline.engine as pe - import nipype.interfaces.utility as util - from nipype.utils.profiler import log_nodes_cb - - # Init variables - base_dir = tempfile.mkdtemp() - log_file = os.path.join(base_dir, 'callback.log') - - # Init logger - logger = logging.getLogger('callback') - logger.setLevel(logging.DEBUG) - handler = logging.FileHandler(log_file) - logger.addHandler(handler) - - # Declare workflow - wf = pe.Workflow(name='test_runtime_prof_func') - wf.base_dir = base_dir - - # Input node - input_node = pe.Node(util.IdentityInterface(fields=['num_gb', - 'num_threads']), - name='input_node') - input_node.inputs.num_gb = num_gb - input_node.inputs.num_threads = num_threads - - # Resources used node - resource_node = pe.Node(util.Function(input_names=['num_threads', - 'num_gb'], - output_names=[], - function=use_resources), - name='resource_node') - resource_node._mem_gb = num_gb - resource_node._n_procs = num_threads - - # Connect workflow - wf.connect(input_node, 'num_gb', resource_node, 'num_gb') - wf.connect(input_node, 'num_threads', resource_node, 'num_threads') - - # Run workflow - plugin_args = {'n_procs' : num_threads, - 'memory_gb' : num_gb, - 'status_callback' : log_nodes_cb} - wf.run(plugin='MultiProc', plugin_args=plugin_args) - - # Get runtime stats from log file - with open(log_file, 'r') as log_handle: - lines = log_handle.readlines() - - # Delete wf base dir - shutil.rmtree(base_dir) - - # Return runtime stats - return lines[0].rstrip('\n') - - # Test resources were used as expected in cmdline interface - @pytest.mark.skipif(run_profile is False, reason='resources monitor is disabled') - def test_cmdline_profiling(self): - ''' - Test runtime profiler correctly records workflow RAM/CPUs consumption - from a cmdline function - ''' - - # Import packages - import json - import numpy as np - - # Init variables - num_gb = self.num_gb - num_threads = self.num_threads - - # Run workflow and get stats - node_str = self._run_cmdline_workflow(num_gb, num_threads) - # Get runtime stats as dictionary - node_stats = json.loads(node_str) - - # Read out runtime stats - runtime_gb = float(node_stats['runtime_memory_gb']) - runtime_threads = int(node_stats['runtime_threads']) - - # Get margin of error for RAM GB - allowed_gb_err = self.mem_err_gb - runtime_gb_err = np.abs(runtime_gb-num_gb) - # - expected_runtime_threads = num_threads - - # Error message formatting - mem_err = 'Input memory: %f is not within %.3f GB of runtime '\ - 'memory: %f' % (num_gb, self.mem_err_gb, runtime_gb) - threads_err = 'Input threads: %d is not equal to runtime threads: %d' \ - % (expected_runtime_threads, runtime_threads) - - # Assert runtime stats are what was input - assert runtime_gb_err <= allowed_gb_err, mem_err - assert abs(expected_runtime_threads - runtime_threads) <= 1, threads_err - - # Test resources were used as expected - # @pytest.mark.skipif(True, reason="https://github.com/nipy/nipype/issues/1663") - @pytest.mark.skipif(run_profile is False, reason='resources monitor is disabled') - def test_function_profiling(self): - ''' - Test runtime profiler correctly records workflow RAM/CPUs consumption - from a python function - ''' - - # Import packages - import json - import numpy as np - - # Init variables - num_gb = self.num_gb - num_threads = self.num_threads - - # Run workflow and get stats - node_str = self._run_function_workflow(num_gb, num_threads) - # Get runtime stats as dictionary - node_stats = json.loads(node_str) - - # Read out runtime stats - runtime_gb = float(node_stats['runtime_memory_gb']) - runtime_threads = int(node_stats['runtime_threads']) - - # Get margin of error for RAM GB - allowed_gb_err = self.mem_err_gb - runtime_gb_err = np.abs(runtime_gb-num_gb) - # - expected_runtime_threads = num_threads - - # Error message formatting - mem_err = 'Input memory: %f is not within %.3f GB of runtime '\ - 'memory: %f' % (num_gb, self.mem_err_gb, runtime_gb) - threads_err = 'Input threads: %d is not equal to runtime threads: %d' \ - % (expected_runtime_threads, runtime_threads) - - # Assert runtime stats are what was input - assert runtime_gb_err <= allowed_gb_err, mem_err - assert abs(expected_runtime_threads - runtime_threads) <= 1, threads_err diff --git a/nipype/utils/tests/use_resources b/nipype/utils/tests/use_resources index 06e2d3e906..fd2e860a1a 100755 --- a/nipype/utils/tests/use_resources +++ b/nipype/utils/tests/use_resources @@ -10,59 +10,22 @@ Usage: use_resources -g -p ''' -# Function to occupy GB of memory -def use_gb_ram(num_gb): - ''' - Function to consume GB of memory - ''' - - # Eat 1 GB of memory for 1 second - gb_str = ' ' * int(num_gb*1024.0**3) - - # Spin CPU - ctr = 0 - while ctr < 30e6: - ctr+= 1 - - # Clear memory - del ctr - del gb_str - - # Make main executable if __name__ == '__main__': # Import packages import argparse - from threading import Thread - from multiprocessing import Process + from nipype.utils.profiler import _use_resources # Init argparser parser = argparse.ArgumentParser(description=__doc__) # Add arguments - parser.add_argument('-g', '--num_gb', nargs=1, required=True, + parser.add_argument('-g', '--num_gb', required=True, type=float, help='Number of GB RAM to use, can be float or int') - parser.add_argument('-p', '--num_threads', nargs=1, required=True, + parser.add_argument('-p', '--num_threads', required=True, type=int, help='Number of threads to run in parallel') # Parse args args = parser.parse_args() - - # Init variables - num_gb = float(args.num_gb[0]) - num_threads = int(args.num_threads[0]) - - # Build thread list - thread_list = [] - for idx in range(num_threads): - thread_list.append(Thread(target=use_gb_ram, args=(num_gb/num_threads,))) - - # Run multi-threaded - print('Using %.3f GB of memory over %d sub-threads...' % \ - (num_gb, num_threads)) - for thread in thread_list: - thread.start() - - for thread in thread_list: - thread.join() + _use_resources(args.num_threads, args.num_gb) From 8a5e7a3c3d51f5e46d03f665cfaa3cc9b02d9065 Mon Sep 17 00:00:00 2001 From: oesteban Date: Thu, 28 Sep 2017 14:48:51 -0700 Subject: [PATCH 295/643] add MultiProc scheduler option --- nipype/pipeline/plugins/multiproc.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/nipype/pipeline/plugins/multiproc.py b/nipype/pipeline/plugins/multiproc.py index 80551966f4..f0a1683e7e 100644 --- a/nipype/pipeline/plugins/multiproc.py +++ b/nipype/pipeline/plugins/multiproc.py @@ -208,14 +208,9 @@ def _send_procs_to_workers(self, updatehash=False, graph=None): 'be submitted to the queue. Potential deadlock') return - # Sort jobs ready to run first by memory and then by number of threads - # The most resource consuming jobs run first - # jobids = sorted(jobids, - # key=lambda item: (self.procs[item]._mem_gb, - # self.procs[item]._n_procs)) - - # While have enough memory and processors for first job - # Submit first job on the list + jobids = self._sort_jobs(jobids, scheduler=self.plugin_args.get('scheduler')) + + # Submit jobs for jobid in jobids: # First expand mapnodes if isinstance(self.procs[jobid], MapNode): @@ -302,3 +297,9 @@ def _send_procs_to_workers(self, updatehash=False, graph=None): self.proc_pending[jobid] = False else: self.pending_tasks.insert(0, (tid, jobid)) + + def _sort_jobs(self, jobids, scheduler='tsort'): + if scheduler == 'mem_thread': + return sorted(jobids, key=lambda item: ( + self.procs[item].mem_gb, self.procs[item].n_procs)) + return jobids From 43f32d5826344c691c9f22ab9dcb5bbdcd090bbd Mon Sep 17 00:00:00 2001 From: oesteban Date: Thu, 28 Sep 2017 16:55:34 -0700 Subject: [PATCH 296/643] fix initialization of NipypeConfig --- nipype/utils/config.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/nipype/utils/config.py b/nipype/utils/config.py index 64ef3bbd0f..cd7e580499 100644 --- a/nipype/utils/config.py +++ b/nipype/utils/config.py @@ -99,12 +99,11 @@ def __init__(self, *args, **kwargs): for option in CONFIG_DEPRECATIONS: for section in ['execution', 'logging']: - if self._config.has_option(section, option): + if self.has_option(section, option): new_option = CONFIG_DEPRECATIONS[option][0] - if not self._config.has_option(section, new_option): + if not self.has_option(section, new_option): # Warn implicit in get - self._config.set(section, new_option, - self._config.get(option)) + self.set(section, new_option, self.get(section, option)) def set_default_config(self): self._config.readfp(StringIO(default_cfg)) From b7b860bc99b00bc07f3d504b307288cef581e51f Mon Sep 17 00:00:00 2001 From: oesteban Date: Thu, 28 Sep 2017 16:56:35 -0700 Subject: [PATCH 297/643] add more documentation to MultiProc --- nipype/pipeline/plugins/multiproc.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/nipype/pipeline/plugins/multiproc.py b/nipype/pipeline/plugins/multiproc.py index f0a1683e7e..9eabfd97e5 100644 --- a/nipype/pipeline/plugins/multiproc.py +++ b/nipype/pipeline/plugins/multiproc.py @@ -104,7 +104,11 @@ class MultiProcPlugin(DistributedPluginBase): - n_procs: maximum number of threads to be executed in parallel - memory_gb: maximum memory (in GB) that can be used at once. - raise_insufficient: raise error if the requested resources for - a node over the maximum `n_procs` and/or `memory_gb`. + a node over the maximum `n_procs` and/or `memory_gb` + (default is ``True``). + - scheduler: sort jobs topologically (``'tsort'``, default value) + or prioritize jobs by, first, memory consumption and, second, + number of threads (``'mem_thread'`` option). """ From 013724360c53983f18de008a64ae87bf497633f0 Mon Sep 17 00:00:00 2001 From: oesteban Date: Thu, 28 Sep 2017 17:31:40 -0700 Subject: [PATCH 298/643] remove some code duplication checking hash locally --- nipype/pipeline/plugins/base.py | 52 ++++++++++++++++------------ nipype/pipeline/plugins/multiproc.py | 24 ++----------- 2 files changed, 33 insertions(+), 43 deletions(-) diff --git a/nipype/pipeline/plugins/base.py b/nipype/pipeline/plugins/base.py index 67e0962927..c6bc5da15c 100644 --- a/nipype/pipeline/plugins/base.py +++ b/nipype/pipeline/plugins/base.py @@ -217,8 +217,10 @@ def _submit_mapnode(self, jobid): return False def _send_procs_to_workers(self, updatehash=False, graph=None): - """ Sends jobs to workers """ + Sends jobs to workers + """ + while not np.all(self.proc_done): num_jobs = len(self.pending_tasks) if np.isinf(self.max_jobs): @@ -258,27 +260,8 @@ def _send_procs_to_workers(self, updatehash=False, graph=None): (self.procs[jobid]._id, jobid)) if self._status_callback: self._status_callback(self.procs[jobid], 'start') - continue_with_submission = True - if str2bool(self.procs[jobid].config['execution'] - ['local_hash_check']): - logger.debug('checking hash locally') - try: - hash_exists, _, _, _ = self.procs[ - jobid].hash_exists() - logger.debug('Hash exists %s' % str(hash_exists)) - if (hash_exists and (self.procs[jobid].overwrite is False or - (self.procs[jobid].overwrite is None and not - self.procs[jobid]._interface.always_run))): - continue_with_submission = False - self._task_finished_cb(jobid) - self._remove_node_dirs() - except Exception: - self._clean_queue(jobid, graph) - self.proc_pending[jobid] = False - continue_with_submission = False - logger.debug('Finished checking hash %s' % - str(continue_with_submission)) - if continue_with_submission: + + if not self._local_hash_check(jobid, graph): if self.procs[jobid].run_without_submitting: logger.debug('Running node %s on master thread' % self.procs[jobid]) @@ -301,6 +284,31 @@ def _send_procs_to_workers(self, updatehash=False, graph=None): else: break + def _local_hash_check(self, jobid, graph): + if not str2bool(self.procs[jobid].config['execution']['local_hash_check']): + return False + + logger.debug('Checking hash (%d) locally', jobid) + + hash_exists, _, _, _ = self.procs[jobid].hash_exists() + overwrite = self.procs[jobid].overwrite + always_run = self.procs[jobid]._interface.always_run + + if hash_exists and (overwrite is False or + overwrite is None and not always_run): + logger.debug('Skipping cached node %s with ID %s.', + self.procs[jobid]._id, jobid) + try: + self._task_finished_cb(jobid) + self._remove_node_dirs() + except Exception: + logger.debug('Error skipping cached node %s (%s).', + self.procs[jobid]._id, jobid) + self._clean_queue(jobid, graph) + self.proc_pending[jobid] = False + return True + return False + def _task_finished_cb(self, jobid): """ Extract outputs and assign to inputs of dependent tasks diff --git a/nipype/pipeline/plugins/multiproc.py b/nipype/pipeline/plugins/multiproc.py index 9eabfd97e5..f790c555f9 100644 --- a/nipype/pipeline/plugins/multiproc.py +++ b/nipype/pipeline/plugins/multiproc.py @@ -251,27 +251,9 @@ def _send_procs_to_workers(self, updatehash=False, graph=None): self.proc_done[jobid] = True self.proc_pending[jobid] = True - if str2bool(self.procs[jobid].config['execution']['local_hash_check']): - logger.debug('checking hash locally') - try: - hash_exists, _, _, _ = self.procs[jobid].hash_exists() - overwrite = self.procs[jobid].overwrite - always_run = self.procs[jobid]._interface.always_run - if hash_exists and (overwrite is False or - overwrite is None and not always_run): - logger.debug('Skipping cached node %s with ID %s.', - self.procs[jobid]._id, jobid) - self._task_finished_cb(jobid) - self._remove_node_dirs() - continue - except Exception: - traceback = format_exception(*sys.exc_info()) - self._report_crash(self.procs[jobid], traceback=traceback) - self._clean_queue(jobid, graph) - self.proc_pending[jobid] = False - continue - finally: - logger.debug('Finished checking hash') + # If cached just retrieve it, don't run + if self._local_hash_check(jobid, graph): + continue if self.procs[jobid].run_without_submitting: logger.debug('Running node %s on master thread', From 6e0030612bf2359eb6a3759b7c576c86934b630f Mon Sep 17 00:00:00 2001 From: oesteban Date: Thu, 28 Sep 2017 17:32:02 -0700 Subject: [PATCH 299/643] fix linting --- nipype/pipeline/engine/utils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nipype/pipeline/engine/utils.py b/nipype/pipeline/engine/utils.py index 689846b0d3..bb93bbe8fb 100644 --- a/nipype/pipeline/engine/utils.py +++ b/nipype/pipeline/engine/utils.py @@ -1082,7 +1082,7 @@ def make_output_dir(outdir): except OSError: logger.debug("Problem creating %s", outdir) if not os.path.exists(outdir): - raise OSError('Could not create %s', outdir) + raise OSError('Could not create %s' % outdir) return outdir @@ -1269,7 +1269,7 @@ def write_workflow_prov(graph, filename=None, format='all'): ps.g.add_bundle(sub_bundle) bundle_entity = ps.g.entity(sub_bundle.identifier, other_attributes={'prov:type': - pm.PROV_BUNDLE}) + pm.PROV_BUNDLE}) ps.g.wasGeneratedBy(bundle_entity, process) else: process.add_attributes({pm.PROV["type"]: nipype_ns["Node"]}) @@ -1282,7 +1282,7 @@ def write_workflow_prov(graph, filename=None, format='all'): ps.g.add_bundle(result_bundle) bundle_entity = ps.g.entity(result_bundle.identifier, other_attributes={'prov:type': - pm.PROV_BUNDLE}) + pm.PROV_BUNDLE}) ps.g.wasGeneratedBy(bundle_entity, process) processes.append(process) From 43ff2681ec01992e38eef2517dddd9fa58d93923 Mon Sep 17 00:00:00 2001 From: oesteban Date: Fri, 29 Sep 2017 09:34:40 -0700 Subject: [PATCH 300/643] remove leftover line that @satra spotted --- nipype/pipeline/plugins/multiproc.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/nipype/pipeline/plugins/multiproc.py b/nipype/pipeline/plugins/multiproc.py index f790c555f9..0f5aeb2854 100644 --- a/nipype/pipeline/plugins/multiproc.py +++ b/nipype/pipeline/plugins/multiproc.py @@ -196,8 +196,6 @@ def _send_procs_to_workers(self, updatehash=False, graph=None): # Check to see if a job is available (jobs without dependencies not run) # See https://github.com/nipy/nipype/pull/2200#discussion_r141605722 jobids = np.nonzero(~self.proc_done & (self.depidx.sum(0) == 0))[1] - jobids = np.flatnonzero( - ~self.proc_done & (self.depidx.sum(axis=0) == 0).__array__()) # Check available system resources by summing all threads and memory used free_memory_gb, free_processors = self._check_resources(self.pending_tasks) From f9074992c49680f9d73138411c05f972464ad8bb Mon Sep 17 00:00:00 2001 From: salma1601 Date: Fri, 29 Sep 2017 19:24:38 +0200 Subject: [PATCH 301/643] added 3dCM interface --- nipype/interfaces/afni/__init__.py | 2 +- nipype/interfaces/afni/utils.py | 94 ++++++++++++++++++++++++++++++ 2 files changed, 95 insertions(+), 1 deletion(-) diff --git a/nipype/interfaces/afni/__init__.py b/nipype/interfaces/afni/__init__.py index cdca22c4f3..f4089e4eda 100644 --- a/nipype/interfaces/afni/__init__.py +++ b/nipype/interfaces/afni/__init__.py @@ -20,7 +20,7 @@ TShift, Volreg, Warp, QwarpPlusMinus, Qwarp) from .svm import (SVMTest, SVMTrain) from .utils import (ABoverlap, AFNItoNIFTI, Autobox, Axialize, BrickStat, - Bucket, Calc, Cat, CatMatvec, Copy, Dot, + Bucket, Calc, Cat, CatMatvec, CenterMass, Copy, Dot, Edge3, Eval, FWHMx, MaskTool, Merge, Notes, NwarpApply, OneDToolPy, Refit, Resample, TCat, TCatSubBrick, TStat, To3D, Unifize, diff --git a/nipype/interfaces/afni/utils.py b/nipype/interfaces/afni/utils.py index 726ecd3dc0..e5fdc94908 100644 --- a/nipype/interfaces/afni/utils.py +++ b/nipype/interfaces/afni/utils.py @@ -642,6 +642,100 @@ def _format_arg(self, name, spec, value): return spec.argstr%(' '.join([i[0]+' -'+i[1] for i in value])) return super(CatMatvec, self)._format_arg(name, spec, value) + +class CenterMassInputSpec(CommandLineInputSpec): + in_file = File( + desc='input file to 3dCM', + argstr='%s', + position=-2, + mandatory=True, + exists=True, + copyfile=True) + cm_file = File( + name_source='in_file', + name_template='%s_cm.out', + keep_extension=False, + descr="File to write center of mass to", + argstr=" > %s", + position=-1) + mask_file = File( + desc='Only voxels with nonzero values in the provided mask will be ' + 'averaged.', + argstr='-mask %s', + exists=True) + automask = traits.Bool( + desc='Generate the mask automatically', + argstr='-automask') + set_cm = traits.Tuple( + (traits.Float(), traits.Float(), traits.Float()), + desc='After computing the center of mass, set the origin fields in ' + 'the header so that the center of mass will be at (x,y,z) in ' + 'DICOM coords.', + argstr='-set %f %f %f') + local_ijk = traits.Bool( + desc='Output values as (i,j,k) in local orienation', + argstr='-local_ijk') + roi_vals = traits.List( + traits.Int, + desc='Compute center of mass for each blob with voxel value of v0, ' + 'v1, v2, etc. This option is handy for getting ROI centers of ' + 'mass.', + argstr='-roi_vals %s') + automask = traits.Bool( + desc='Don\'t bother listing the values of ROIs you want: The program ' + 'will find all of them and produce a full list', + argstr='-all_rois') + + +class CenterMassOutputSpec(TraitedSpec): + out_file = File( + exists=True, + desc='output file') + cm_file = File( + desc='file with the center of mass coordinates') + cm = traits.Tuple( + traits.Float(), traits.Float(), traits.Float(), + desc='center of mass') + + +class CenterMass(AFNICommandBase): + """Computes center of mass using 3dCM command + + .. note:: + + By default, the output is (x,y,z) values in DICOM coordinates. But + as of Dec, 2016, there are now command line switches for other options. + + + For complete details, see the `3dCM Documentation. + `_ + + Examples + ======== + + >>> from nipype.interfaces import afni + >>> cm = afni.CenterMass() + >>> cm.inputs.in_file = 'structural.nii' + >>> cm.inputs.out_file = 'cm.txt' + >>> cm.inputs.set_cm = (0, 0, 0) + >>> cm.cmdline # doctest: +ALLOW_UNICODE + '3dcm -set 0 0 0 structural.nii > cm.txt' + >>> res = 3dcm.run() # doctest: +SKIP + """ + + _cmd = '3dCM' + input_spec = CenterMassInputSpec + output_spec = CenterMassOutputSpec + + def _list_outputs(self): + outputs = super(CenterMass, self)._list_outputs() + outputs['out_file'] = os.path.abspath(self.inputs.in_file) + outputs['cm_file'] = os.path.abspath(self.inputs.cm_file) + sout = np.loadtxt(outputs['cm_file']) # pylint: disable=E1101 + outputs['cm'] = tuple(sout) + return outputs + + class CopyInputSpec(AFNICommandInputSpec): in_file = File( desc='input file to 3dcopy', From d09ca59b250624003b45083303f22e17825fb5b5 Mon Sep 17 00:00:00 2001 From: oesteban Date: Fri, 29 Sep 2017 14:07:21 -0700 Subject: [PATCH 302/643] improve logging to understand https://github.com/nipy/nipype/pull/2200#discussion_r141926478 --- nipype/pipeline/plugins/base.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/nipype/pipeline/plugins/base.py b/nipype/pipeline/plugins/base.py index c6bc5da15c..34c921e19f 100644 --- a/nipype/pipeline/plugins/base.py +++ b/nipype/pipeline/plugins/base.py @@ -103,10 +103,19 @@ def run(self, graph, config, updatehash=False): notrun = [] while not np.all(self.proc_done) or np.any(self.proc_pending): + # Check to see if a job is available (jobs without dependencies not run) + # See https://github.com/nipy/nipype/pull/2200#discussion_r141605722 + jobs_ready = np.nonzero(~self.proc_done & (self.depidx.sum(0) == 0))[1] + + logger.info('Progress: %d jobs, %d/%d/%d/%d (done/running/pending/ready).', + len(self.proc_done), + np.sum(self.proc_done & ~self.proc_pending), + np.sum(self.proc_done & self.proc_pending), + len(self.pending_tasks), + len(jobs_ready)) toappend = [] # trigger callbacks for any pending results while self.pending_tasks: - logger.debug('Processing %d pending tasks.', len(self.pending_tasks)) taskid, jobid = self.pending_tasks.pop() try: result = self._get_result(taskid) @@ -124,6 +133,7 @@ def run(self, graph, config, updatehash=False): self._remove_node_dirs() self._clear_task(taskid) else: + assert self.proc_done[jobid] and self.proc_pending[jobid] toappend.insert(0, (taskid, jobid)) if toappend: From 15dae8e8cc93ea7b58800ac194d42cab179d0ccd Mon Sep 17 00:00:00 2001 From: salma1601 Date: Fri, 29 Sep 2017 23:42:07 +0200 Subject: [PATCH 303/643] fix trait all_rois and tests --- .../afni/tests/test_auto_CenterMass.py | 58 +++++++++++++++++++ nipype/interfaces/afni/utils.py | 21 ++++--- 2 files changed, 71 insertions(+), 8 deletions(-) create mode 100644 nipype/interfaces/afni/tests/test_auto_CenterMass.py diff --git a/nipype/interfaces/afni/tests/test_auto_CenterMass.py b/nipype/interfaces/afni/tests/test_auto_CenterMass.py new file mode 100644 index 0000000000..f873d1901a --- /dev/null +++ b/nipype/interfaces/afni/tests/test_auto_CenterMass.py @@ -0,0 +1,58 @@ +# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT +from __future__ import unicode_literals +from ..utils import CenterMass + + +def test_CenterMass_inputs(): + input_map = dict(all_rois=dict(argstr='-all_rois', + ), + args=dict(argstr='%s', + ), + automask=dict(argstr='-automask', + ), + cm_file=dict(argstr='> %s', + descr='File to write center of mass to', + keep_extension=False, + name_source='in_file', + name_template='%s_cm.out', + position=-1, + ), + environ=dict(nohash=True, + usedefault=True, + ), + ignore_exception=dict(nohash=True, + usedefault=True, + ), + in_file=dict(argstr='%s', + copyfile=True, + mandatory=True, + position=-2, + ), + local_ijk=dict(argstr='-local_ijk', + ), + mask_file=dict(argstr='-mask %s', + ), + roi_vals=dict(argstr='-roi_vals %s', + ), + set_cm=dict(argstr='-set %f %f %f', + ), + terminal_output=dict(nohash=True, + ), + ) + inputs = CenterMass.input_spec() + + for key, metadata in list(input_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(inputs.traits()[key], metakey) == value + + +def test_CenterMass_outputs(): + output_map = dict(cm=dict(), + cm_file=dict(), + out_file=dict(), + ) + outputs = CenterMass.output_spec() + + for key, metadata in list(output_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(outputs.traits()[key], metakey) == value diff --git a/nipype/interfaces/afni/utils.py b/nipype/interfaces/afni/utils.py index e5fdc94908..8abdd251df 100644 --- a/nipype/interfaces/afni/utils.py +++ b/nipype/interfaces/afni/utils.py @@ -656,7 +656,7 @@ class CenterMassInputSpec(CommandLineInputSpec): name_template='%s_cm.out', keep_extension=False, descr="File to write center of mass to", - argstr=" > %s", + argstr="> %s", position=-1) mask_file = File( desc='Only voxels with nonzero values in the provided mask will be ' @@ -681,7 +681,7 @@ class CenterMassInputSpec(CommandLineInputSpec): 'v1, v2, etc. This option is handy for getting ROI centers of ' 'mass.', argstr='-roi_vals %s') - automask = traits.Bool( + all_rois = traits.Bool( desc='Don\'t bother listing the values of ROIs you want: The program ' 'will find all of them and produce a full list', argstr='-all_rois') @@ -693,8 +693,10 @@ class CenterMassOutputSpec(TraitedSpec): desc='output file') cm_file = File( desc='file with the center of mass coordinates') - cm = traits.Tuple( - traits.Float(), traits.Float(), traits.Float(), + cm = traits.Either( + traits.Tuple(traits.Float(), traits.Float(), traits.Float()), + traits.List(traits.Tuple(traits.Float(), traits.Float(), + traits.Float())), desc='center of mass') @@ -716,10 +718,10 @@ class CenterMass(AFNICommandBase): >>> from nipype.interfaces import afni >>> cm = afni.CenterMass() >>> cm.inputs.in_file = 'structural.nii' - >>> cm.inputs.out_file = 'cm.txt' - >>> cm.inputs.set_cm = (0, 0, 0) + >>> cm.inputs.cm_file = 'cm.txt' + >>> cm.inputs.roi_vals = [2, 10] >>> cm.cmdline # doctest: +ALLOW_UNICODE - '3dcm -set 0 0 0 structural.nii > cm.txt' + '3dCM -roi_vals 2 10 structural.nii > cm.txt' >>> res = 3dcm.run() # doctest: +SKIP """ @@ -732,7 +734,10 @@ def _list_outputs(self): outputs['out_file'] = os.path.abspath(self.inputs.in_file) outputs['cm_file'] = os.path.abspath(self.inputs.cm_file) sout = np.loadtxt(outputs['cm_file']) # pylint: disable=E1101 - outputs['cm'] = tuple(sout) + if len(sout) > 1: + outputs['cm'] = [tuple(s) for s in sout] + else: + outputs['cm'] = tuple(sout) return outputs From 013be14d7ca3a6aa52f8d004adfc0517a6dd944d Mon Sep 17 00:00:00 2001 From: oesteban Date: Fri, 29 Sep 2017 16:52:35 -0700 Subject: [PATCH 304/643] prevent writing to same monitor --- nipype/interfaces/base.py | 9 ++++----- nipype/utils/profiler.py | 41 +++++++++++++++++++++------------------ 2 files changed, 26 insertions(+), 24 deletions(-) diff --git a/nipype/interfaces/base.py b/nipype/interfaces/base.py index 9f025d3e97..8dac2e0528 100644 --- a/nipype/interfaces/base.py +++ b/nipype/interfaces/base.py @@ -1095,10 +1095,9 @@ def run(self, **inputs): if enable_rm: mon_freq = float(config.get('execution', 'resource_monitor_frequency', 1)) proc_pid = os.getpid() - mon_fname = os.path.abspath('.prof-%d_freq-%0.3f' % (proc_pid, mon_freq)) - iflogger.debug('Creating a ResourceMonitor on a %s interface: %s', - self.__class__.__name__, mon_fname) - mon_sp = ResourceMonitor(proc_pid, freq=mon_freq, fname=mon_fname) + iflogger.debug('Creating a ResourceMonitor on a %s interface, PID=%d.', + self.__class__.__name__, proc_pid) + mon_sp = ResourceMonitor(proc_pid, freq=mon_freq) mon_sp.start() # Grab inputs now, as they should not change during execution @@ -1145,7 +1144,7 @@ def run(self, **inputs): runtime.nthreads_max = None # Read .prof file in and set runtime values - vals = np.loadtxt(mon_fname, delimiter=',') + vals = np.loadtxt(mon_sp.logfile, delimiter=',') if vals.size: vals = np.atleast_2d(vals) _, mem_peak_mb, nthreads = vals.max(0).astype(float).tolist() diff --git a/nipype/utils/profiler.py b/nipype/utils/profiler.py index 1498474b43..9a1e22b573 100644 --- a/nipype/utils/profiler.py +++ b/nipype/utils/profiler.py @@ -2,7 +2,7 @@ # @Author: oesteban # @Date: 2017-09-21 15:50:37 # @Last Modified by: oesteban -# @Last Modified time: 2017-09-28 13:11:03 +# @Last Modified time: 2017-09-29 16:42:27 """ Utilities to keep track of performance """ @@ -33,41 +33,44 @@ class ResourceMonitor(threading.Thread): def __init__(self, pid, freq=5, fname=None): - if freq <= 0: - raise RuntimeError('Frequency (%0.2fs) cannot be lower than zero' % freq) + if freq < 0.2: + raise RuntimeError('Frequency (%0.2fs) cannot be lower than 0.2s' % freq) if fname is None: - fname = '.nipype.prof' + fname = '.proc-%d_time-%s_freq-%0.2f' % (pid, time(), freq) self._pid = pid self._fname = fname self._freq = freq - self._log = open(self._fname, 'w') - print('%s,0.0,0' % time(), file=self._log) - self._log.flush() + self._logfile = open(self._fname, 'w') + self._sample() + threading.Thread.__init__(self) self._event = threading.Event() + @property + def fname(self): + return self._fname + def stop(self): if not self._event.is_set(): self._event.set() self.join() - ram = _get_ram_mb(self._pid) or 0 - cpus = _get_num_threads(self._pid) or 0 - print('%s,%f,%d' % (time(), ram, cpus), - file=self._log) - self._log.flush() - self._log.close() + self._sample() + self._logfile.flush() + self._logfile.close() + + def _sample(self): + ram = _get_ram_mb(self._pid) or 0 + cpus = _get_num_threads(self._pid) or 0 + print('%s,%f,%d' % (time(), ram, cpus), + file=self._logfile) + self._logfile.flush() def run(self): while not self._event.is_set(): - ram = _get_ram_mb(self._pid) - cpus = _get_num_threads(self._pid) - if ram is not None and cpus is not None: - print('%s,%f,%d' % (time(), ram, cpus), - file=self._log) - self._log.flush() + self._sample() self._event.wait(self._freq) From 427e6689714caaaa13a1aff5c9a434cb2c962da5 Mon Sep 17 00:00:00 2001 From: oesteban Date: Fri, 29 Sep 2017 16:53:17 -0700 Subject: [PATCH 305/643] improve documentation of DistributedBasePlugin --- nipype/pipeline/plugins/base.py | 71 ++++++++++++++++++---------- nipype/pipeline/plugins/multiproc.py | 15 +++--- 2 files changed, 52 insertions(+), 34 deletions(-) diff --git a/nipype/pipeline/plugins/base.py b/nipype/pipeline/plugins/base.py index 34c921e19f..4733cece7b 100644 --- a/nipype/pipeline/plugins/base.py +++ b/nipype/pipeline/plugins/base.py @@ -57,21 +57,40 @@ def run(self, graph, config, updatehash=False): class DistributedPluginBase(PluginBase): - """Execute workflow with a distribution engine + """ + Execute workflow with a distribution engine + + Relevant class attributes + ------------------------- + + procs: list (N) of underlying interface elements to be processed + proc_done: a boolean numpy array (N,) signifying whether a process has been + submitted for execution + proc_pending: a boolean numpy array (N,) signifying whether a + process is currently running. + depidx: a boolean matrix (NxN) storing the dependency structure accross + processes. Process dependencies are derived from each column. + + Combinations of ``proc_done`` and ``proc_pending`` + -------------------------------------------------- + + +------------+---------------+--------------------------------+ + | proc_done | proc_pending | outcome | + +============+===============+================================+ + | True | False | Process is finished | + +------------+---------------+--------------------------------+ + | True | True | Process is currently being run | + +------------+---------------+--------------------------------+ + | False | False | Process is queued | + +------------+---------------+--------------------------------+ + | False | True | INVALID COMBINATION | + +------------+---------------+--------------------------------+ """ def __init__(self, plugin_args=None): - """Initialize runtime attributes to none - - procs: list (N) of underlying interface elements to be processed - proc_done: a boolean numpy array (N,) signifying whether a process has been - executed - proc_pending: a boolean numpy array (N,) signifying whether a - process is currently running. Note: A process is finished only when - both proc_done==True and - proc_pending==False - depidx: a boolean matrix (NxN) storing the dependency structure accross - processes. Process dependencies are derived from each column. + """ + Initialize runtime attributes to none + """ super(DistributedPluginBase, self).__init__(plugin_args=plugin_args) self.procs = None @@ -87,12 +106,16 @@ def __init__(self, plugin_args=None): def _prerun_check(self, graph): """Stub method to validate/massage graph and nodes before running""" + def _postrun_check(self): + """Stub method to close any open resources""" + def run(self, graph, config, updatehash=False): """ Executes a pre-defined pipeline using distributed approaches """ logger.info("Running in parallel.") self._config = config + poll_sleep_secs = float(config['execution']['poll_sleep_duration']) self._prerun_check(graph) # Generate appropriate structures for worker-manager model @@ -107,12 +130,14 @@ def run(self, graph, config, updatehash=False): # See https://github.com/nipy/nipype/pull/2200#discussion_r141605722 jobs_ready = np.nonzero(~self.proc_done & (self.depidx.sum(0) == 0))[1] - logger.info('Progress: %d jobs, %d/%d/%d/%d (done/running/pending/ready).', + logger.info('Progress: %d jobs, %d/%d/%d (done/running/ready),' + ' %d/%d (pending_tasks/waiting).', len(self.proc_done), - np.sum(self.proc_done & ~self.proc_pending), + np.sum(self.proc_done ^ self.proc_pending), np.sum(self.proc_done & self.proc_pending), + len(jobs_ready), len(self.pending_tasks), - len(jobs_ready)) + np.sum(~self.proc_done & ~self.proc_pending)) toappend = [] # trigger callbacks for any pending results while self.pending_tasks: @@ -139,27 +164,21 @@ def run(self, graph, config, updatehash=False): if toappend: self.pending_tasks.extend(toappend) num_jobs = len(self.pending_tasks) - logger.debug('Tasks currently running (%d).', num_jobs) + logger.debug('Tasks currently running: %d. Pending: %d.', num_jobs, + np.sum(self.proc_done & self.proc_pending)) if num_jobs < self.max_jobs: self._send_procs_to_workers(updatehash=updatehash, graph=graph) else: logger.debug('Not submitting (max jobs reached)') - self._wait() + + sleep(poll_sleep_secs) self._remove_node_dirs() report_nodes_not_run(notrun) # close any open resources - self._close() - - def _wait(self): - sleep(float(self._config['execution']['poll_sleep_duration'])) - - def _close(self): - # close any open resources, this could raise NotImplementedError - # but I didn't want to break other plugins - return True + self._postrun_check() def _get_result(self, taskid): raise NotImplementedError diff --git a/nipype/pipeline/plugins/multiproc.py b/nipype/pipeline/plugins/multiproc.py index 0f5aeb2854..0be2db8045 100644 --- a/nipype/pipeline/plugins/multiproc.py +++ b/nipype/pipeline/plugins/multiproc.py @@ -118,7 +118,6 @@ def __init__(self, plugin_args=None): self._taskresult = {} self._task_obj = {} self._taskid = 0 - self._timeout = 2.0 # Read in options or set defaults. non_daemon = self.plugin_args.get('non_daemon', True) @@ -151,11 +150,8 @@ def _submit_job(self, node, updatehash=False): callback=self._async_callback) return self._taskid - def _close(self): - self.pool.close() - return True - def _prerun_check(self, graph): + """Check if any node exeeds the available resources""" tasks_mem_gb = [] tasks_num_th = [] for node in graph.nodes(): @@ -176,6 +172,9 @@ def _prerun_check(self, graph): if self.raise_insufficient: raise RuntimeError('Insufficient resources available for job') + def _postrun_check(self): + self.pool.close() + def _check_resources(self, running_tasks): """ Make sure there are resources available @@ -241,9 +240,9 @@ def _send_procs_to_workers(self, updatehash=False, graph=None): free_memory_gb -= next_job_gb free_processors -= next_job_th - logger.info('Allocating %s ID=%d (%0.2fGB, %d threads). Free: %0.2fGB, %d threads.', - self.procs[jobid]._id, jobid, next_job_gb, next_job_th, - free_memory_gb, free_processors) + logger.debug('Allocating %s ID=%d (%0.2fGB, %d threads). Free: %0.2fGB, %d threads.', + self.procs[jobid]._id, jobid, next_job_gb, next_job_th, + free_memory_gb, free_processors) # change job status in appropriate queues self.proc_done[jobid] = True From 34f982416341a5e8a6ce88527e10ee3d7ad33b64 Mon Sep 17 00:00:00 2001 From: oesteban Date: Fri, 29 Sep 2017 16:54:45 -0700 Subject: [PATCH 306/643] fix mistaken property name --- nipype/interfaces/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nipype/interfaces/base.py b/nipype/interfaces/base.py index 8dac2e0528..bc5c91748c 100644 --- a/nipype/interfaces/base.py +++ b/nipype/interfaces/base.py @@ -1144,7 +1144,7 @@ def run(self, **inputs): runtime.nthreads_max = None # Read .prof file in and set runtime values - vals = np.loadtxt(mon_sp.logfile, delimiter=',') + vals = np.loadtxt(mon_sp.fname, delimiter=',') if vals.size: vals = np.atleast_2d(vals) _, mem_peak_mb, nthreads = vals.max(0).astype(float).tolist() From 48832117ad404246275c480cfefd7411ca0fff51 Mon Sep 17 00:00:00 2001 From: oesteban Date: Fri, 29 Sep 2017 17:22:27 -0700 Subject: [PATCH 307/643] mv final resource_monitor.json to logs/ folder --- docker/files/run_examples.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docker/files/run_examples.sh b/docker/files/run_examples.sh index c19a15f38b..d8fc17b512 100644 --- a/docker/files/run_examples.sh +++ b/docker/files/run_examples.sh @@ -33,8 +33,10 @@ fi coverage run /src/nipype/tools/run_examples.py $@ exit_code=$? +if [[ "${NIPYPE_RESOURCE_MONITOR:-0}" == "1" ]]; then + cp resource_monitor.json 2>/dev/null ${WORKDIR}/logs/example_${example_id}/ || : +fi # Collect crashfiles and generate xml report coverage xml -o ${WORKDIR}/tests/smoketest_${example_id}.xml find /work -maxdepth 1 -name "crash-*" -exec mv {} ${WORKDIR}/crashfiles/ \; exit $exit_code - From d130211d0e8f448bd973c36e75f46e05630e3297 Mon Sep 17 00:00:00 2001 From: salma1601 Date: Sat, 30 Sep 2017 20:13:03 +0200 Subject: [PATCH 308/643] add hash_files=False to center of mass file --- nipype/interfaces/afni/tests/test_auto_CenterMass.py | 1 + nipype/interfaces/afni/utils.py | 1 + 2 files changed, 2 insertions(+) diff --git a/nipype/interfaces/afni/tests/test_auto_CenterMass.py b/nipype/interfaces/afni/tests/test_auto_CenterMass.py index f873d1901a..99d50831c2 100644 --- a/nipype/interfaces/afni/tests/test_auto_CenterMass.py +++ b/nipype/interfaces/afni/tests/test_auto_CenterMass.py @@ -12,6 +12,7 @@ def test_CenterMass_inputs(): ), cm_file=dict(argstr='> %s', descr='File to write center of mass to', + hash_files=False, keep_extension=False, name_source='in_file', name_template='%s_cm.out', diff --git a/nipype/interfaces/afni/utils.py b/nipype/interfaces/afni/utils.py index 8abdd251df..7fadffe5b4 100644 --- a/nipype/interfaces/afni/utils.py +++ b/nipype/interfaces/afni/utils.py @@ -654,6 +654,7 @@ class CenterMassInputSpec(CommandLineInputSpec): cm_file = File( name_source='in_file', name_template='%s_cm.out', + hash_files=False, keep_extension=False, descr="File to write center of mass to", argstr="> %s", From 831071b853483422d3d85b6579316166e362fee4 Mon Sep 17 00:00:00 2001 From: Satrajit Ghosh Date: Sat, 30 Sep 2017 15:29:33 -0400 Subject: [PATCH 309/643] fix: add new config options and defaults to default_cfg --- nipype/utils/config.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nipype/utils/config.py b/nipype/utils/config.py index cd7e580499..d18752c87f 100644 --- a/nipype/utils/config.py +++ b/nipype/utils/config.py @@ -68,6 +68,8 @@ parameterize_dirs = true poll_sleep_duration = 2 xvfb_max_wait = 10 +resource_monitor = false +resource_monitor_frequency = 1 [check] interval = 1209600 From 966b7f1183a674f668fcc8cabb3c9a80fc2ab593 Mon Sep 17 00:00:00 2001 From: oesteban Date: Sun, 1 Oct 2017 00:11:36 -0700 Subject: [PATCH 310/643] improving measurement of resources, use oneshot from psutils>=5.0 --- nipype/info.py | 2 +- nipype/interfaces/base.py | 9 +- .../interfaces/tests/test_resource_monitor.py | 344 +----------------- nipype/utils/profiler.py | 130 ++++--- 4 files changed, 95 insertions(+), 390 deletions(-) diff --git a/nipype/info.py b/nipype/info.py index b6a6ac1d3e..d7b1b106d1 100644 --- a/nipype/info.py +++ b/nipype/info.py @@ -159,7 +159,7 @@ def get_nipype_gitversion(): 'doc': ['Sphinx>=1.4', 'matplotlib', 'pydotplus', 'pydot>=1.2.3'], 'tests': TESTS_REQUIRES, 'nipy': ['nitime', 'nilearn', 'dipy', 'nipy', 'matplotlib'], - 'profiler': ['psutil'], + 'profiler': ['psutil>=5.0'], 'duecredit': ['duecredit'], 'xvfbwrapper': ['xvfbwrapper'], 'pybids' : ['pybids'] diff --git a/nipype/interfaces/base.py b/nipype/interfaces/base.py index bc5c91748c..d14a81a696 100644 --- a/nipype/interfaces/base.py +++ b/nipype/interfaces/base.py @@ -1141,20 +1141,19 @@ def run(self, **inputs): mon_sp.stop() runtime.mem_peak_gb = None - runtime.nthreads_max = None + runtime.cpu_percent = None # Read .prof file in and set runtime values vals = np.loadtxt(mon_sp.fname, delimiter=',') if vals.size: vals = np.atleast_2d(vals) - _, mem_peak_mb, nthreads = vals.max(0).astype(float).tolist() - runtime.mem_peak_gb = mem_peak_mb / 1024 - runtime.nthreads_max = int(nthreads) + runtime.mem_peak_gb = float(vals[:, 1].max() / 1024) + runtime.cpu_percent = float(vals[:, 2].max()) runtime.prof_dict = { 'time': vals[:, 0].tolist(), 'mem_gb': (vals[:, 1] / 1024).tolist(), - 'cpus': vals[:, 2].astype(int).tolist(), + 'cpus': vals[:, 2].tolist(), } return results diff --git a/nipype/interfaces/tests/test_resource_monitor.py b/nipype/interfaces/tests/test_resource_monitor.py index b9146bfc64..ec1bf83450 100644 --- a/nipype/interfaces/tests/test_resource_monitor.py +++ b/nipype/interfaces/tests/test_resource_monitor.py @@ -40,12 +40,13 @@ class UseResources(CommandLine): # Init cmd _cmd = exec_path + _always_run = True # Test resources were used as expected in cmdline interface -# @pytest.mark.skipif(run_profile is False, reason='resources monitor is disabled') -@pytest.mark.skipif(True, reason='test disabled temporarily') -@pytest.mark.parametrize("mem_gb,n_procs", [(0.5, 3), (2.2, 2), (0.8, 4)]) +# @pytest.mark.skipif(True, reason='test disabled temporarily') +@pytest.mark.skipif(run_profile is False, reason='resources monitor is disabled') +@pytest.mark.parametrize("mem_gb,n_procs", [(0.5, 3), (2.2, 8), (0.8, 4), (1.5, 1)]) def test_cmdline_profiling(tmpdir, mem_gb, n_procs): ''' Test runtime profiler correctly records workflow RAM/CPUs consumption @@ -59,12 +60,12 @@ def test_cmdline_profiling(tmpdir, mem_gb, n_procs): result = iface.run() assert abs(mem_gb - result.runtime.mem_peak_gb) < 0.3, 'estimated memory error above .3GB' - assert result.runtime.nthreads_max == n_procs, 'wrong number of threads estimated' + assert int(result.runtime.cpu_percent / 100 + 0.2) == n_procs, 'wrong number of threads estimated' -# @pytest.mark.skipif(run_profile is False, reason='resources monitor is disabled') -@pytest.mark.skipif(True, reason='test disabled temporarily') -@pytest.mark.parametrize("mem_gb,n_procs", [(0.5, 3), (2.2, 2), (0.8, 4)]) +# @pytest.mark.skipif(True, reason='test disabled temporarily') +@pytest.mark.skipif(run_profile is False, reason='resources monitor is disabled') +@pytest.mark.parametrize("mem_gb,n_procs", [(0.5, 3), (2.2, 8), (0.8, 4), (1.5, 1)]) def test_function_profiling(tmpdir, mem_gb, n_procs): ''' Test runtime profiler correctly records workflow RAM/CPUs consumption @@ -79,330 +80,5 @@ def test_function_profiling(tmpdir, mem_gb, n_procs): iface.inputs.n_procs = n_procs result = iface.run() - assert abs(mem_gb - result.runtime.mem_peak_gb) < 0.3, 'estimated memory error above .3GB' - assert result.runtime.nthreads_max == n_procs, 'wrong number of threads estimated' - - -# # Test case for the run function -# class TestRuntimeProfiler(): -# ''' -# This class is a test case for the runtime profiler -# ''' - -# # setup method for the necessary arguments to run cpac_pipeline.run -# def setup_class(self): -# ''' -# Method to instantiate TestRuntimeProfiler - -# Parameters -# ---------- -# self : TestRuntimeProfile -# ''' - -# # Init parameters -# # Input RAM GB to occupy -# self.mem_gb = 1.0 -# # Input number of sub-threads (not including parent threads) -# self.n_procs = 2 -# # Acceptable percent error for memory profiled against input -# self.mem_err_gb = 0.3 # Increased to 30% for py2.7 - -# # ! Only used for benchmarking the profiler over a range of -# # ! RAM usage and number of threads -# # ! Requires a LOT of RAM to be tested -# def _collect_range_runtime_stats(self, n_procs): -# ''' -# Function to collect a range of runtime stats -# ''' - -# # Import packages -# import json -# import numpy as np -# import pandas as pd - -# # Init variables -# ram_gb_range = 10.0 -# ram_gb_step = 0.25 -# dict_list = [] - -# # Iterate through all combos -# for mem_gb in np.arange(0.25, ram_gb_range+ram_gb_step, ram_gb_step): -# # Cmd-level -# cmd_node_str = self._run_cmdline_workflow(mem_gb, n_procs) -# cmd_node_stats = json.loads(cmd_node_str) -# cmd_start_ts = cmd_node_stats['start'] -# cmd_runtime_threads = int(cmd_node_stats['runtime_threads']) -# cmd_runtime_gb = float(cmd_node_stats['runtime_memory_gb']) -# cmd_finish_ts = cmd_node_stats['finish'] - -# # Func-level -# func_node_str = self._run_function_workflow(mem_gb, n_procs) -# func_node_stats = json.loads(func_node_str) -# func_start_ts = func_node_stats['start'] -# func_runtime_threads = int(func_node_stats['runtime_threads']) -# func_runtime_gb = float(func_node_stats['runtime_memory_gb']) -# func_finish_ts = func_node_stats['finish'] - -# # Calc errors -# cmd_threads_err = cmd_runtime_threads - n_procs -# cmd_gb_err = cmd_runtime_gb - mem_gb -# func_threads_err = func_runtime_threads - n_procs -# func_gb_err = func_runtime_gb - mem_gb - -# # Node dictionary -# results_dict = {'input_threads': n_procs, -# 'input_gb': mem_gb, -# 'cmd_runtime_threads': cmd_runtime_threads, -# 'cmd_runtime_gb': cmd_runtime_gb, -# 'func_runtime_threads': func_runtime_threads, -# 'func_runtime_gb': func_runtime_gb, -# 'cmd_threads_err': cmd_threads_err, -# 'cmd_gb_err': cmd_gb_err, -# 'func_threads_err': func_threads_err, -# 'func_gb_err': func_gb_err, -# 'cmd_start_ts': cmd_start_ts, -# 'cmd_finish_ts': cmd_finish_ts, -# 'func_start_ts': func_start_ts, -# 'func_finish_ts': func_finish_ts} -# # Append to list -# dict_list.append(results_dict) - -# # Create dataframe -# runtime_results_df = pd.DataFrame(dict_list) - -# # Return dataframe -# return runtime_results_df - -# # Test node -# def _run_cmdline_workflow(self, mem_gb, n_procs): -# ''' -# Function to run the use_resources cmdline script in a nipype workflow -# and return the runtime stats recorded by the profiler - -# Parameters -# ---------- -# self : TestRuntimeProfile - -# Returns -# ------- -# finish_str : string -# a json-compatible dictionary string containing the runtime -# statistics of the nipype node that used system resources -# ''' - -# # Import packages -# import logging -# import os -# import shutil -# import tempfile - -# import nipype.pipeline.engine as pe -# import nipype.interfaces.utility as util -# from nipype.utils.profiler import log_nodes_cb - -# # Init variables -# base_dir = tempfile.mkdtemp() -# log_file = os.path.join(base_dir, 'callback.log') - -# # Init logger -# logger = logging.getLogger('callback') -# logger.propagate = False -# logger.setLevel(logging.DEBUG) -# handler = logging.FileHandler(log_file) -# logger.addHandler(handler) - -# # Declare workflow -# wf = pe.Workflow(name='test_runtime_prof_cmd') -# wf.base_dir = base_dir - -# # Input node -# input_node = pe.Node(util.IdentityInterface(fields=['mem_gb', -# 'n_procs']), -# name='input_node') - -# # Resources used node -# resource_node = pe.Node(UseResources(), name='resource_node', mem_gb=mem_gb, -# n_procs=n_procs) - -# # Connect workflow -# wf.connect(input_node, 'mem_gb', resource_node, 'mem_gb') -# wf.connect(input_node, 'n_procs', resource_node, 'n_procs') - -# # Run workflow -# plugin_args = {'n_procs': n_procs, -# 'memory_gb': mem_gb, -# 'status_callback': log_nodes_cb} -# wf.run(plugin='MultiProc', plugin_args=plugin_args) - -# # Get runtime stats from log file -# with open(log_file, 'r') as log_handle: -# lines = log_handle.readlines() - -# node_str = lines[0].rstrip('\n') - -# # Delete wf base dir -# shutil.rmtree(base_dir) - -# # Return runtime stats -# return node_str - -# # Test node -# def _run_function_workflow(self, mem_gb, n_procs): -# ''' -# Function to run the use_resources() function in a nipype workflow -# and return the runtime stats recorded by the profiler - -# Parameters -# ---------- -# self : TestRuntimeProfile - -# Returns -# ------- -# finish_str : string -# a json-compatible dictionary string containing the runtime -# statistics of the nipype node that used system resources -# ''' - -# # Import packages -# import logging -# import os -# import shutil -# import tempfile - -# import nipype.pipeline.engine as pe -# import nipype.interfaces.utility as util -# from nipype.utils.profiler import log_nodes_cb - -# # Init variables -# base_dir = tempfile.mkdtemp() -# log_file = os.path.join(base_dir, 'callback.log') - -# # Init logger -# logger = logging.getLogger('callback') -# logger.propagate = False -# logger.setLevel(logging.DEBUG) -# handler = logging.FileHandler(log_file) -# logger.addHandler(handler) - -# # Declare workflow -# wf = pe.Workflow(name='test_runtime_prof_func') -# wf.base_dir = base_dir - -# # Input node -# input_node = pe.Node(util.IdentityInterface(fields=['mem_gb', -# 'n_procs']), -# name='input_node') -# input_node.inputs.mem_gb = mem_gb -# input_node.inputs.n_procs = n_procs - -# # Resources used node -# resource_node = pe.Node(util.Function(input_names=['n_procs', -# 'mem_gb'], -# output_names=[], -# function=use_resources), -# name='resource_node', -# mem_gb=mem_gb, -# n_procs=n_procs) - -# # Connect workflow -# wf.connect(input_node, 'mem_gb', resource_node, 'mem_gb') -# wf.connect(input_node, 'n_procs', resource_node, 'n_procs') - -# # Run workflow -# plugin_args = {'n_procs': n_procs, -# 'memory_gb': mem_gb, -# 'status_callback': log_nodes_cb} -# wf.run(plugin='MultiProc', plugin_args=plugin_args) - -# # Get runtime stats from log file -# with open(log_file, 'r') as log_handle: -# lines = log_handle.readlines() - -# # Delete wf base dir -# shutil.rmtree(base_dir) - -# # Return runtime stats -# return lines[0].rstrip('\n') - -# # Test resources were used as expected in cmdline interface -# @pytest.mark.skipif(run_profile is False, reason='resources monitor is disabled') -# def test_cmdline_profiling(self): -# ''' -# Test runtime profiler correctly records workflow RAM/CPUs consumption -# from a cmdline function -# ''' - -# # Import packages -# import json -# import numpy as np - -# # Init variables -# mem_gb = self.mem_gb -# n_procs = self.n_procs - -# # Run workflow and get stats -# node_str = self._run_cmdline_workflow(mem_gb, n_procs) -# # Get runtime stats as dictionary -# node_stats = json.loads(node_str) - -# # Read out runtime stats -# runtime_gb = float(node_stats['runtime_memory_gb']) -# runtime_threads = int(node_stats['runtime_threads']) - -# # Get margin of error for RAM GB -# allowed_gb_err = self.mem_err_gb -# runtime_gb_err = np.abs(runtime_gb-mem_gb) -# # -# expected_runtime_threads = n_procs - -# # Error message formatting -# mem_err = 'Input memory: %f is not within %.3f GB of runtime '\ -# 'memory: %f' % (mem_gb, self.mem_err_gb, runtime_gb) -# threads_err = 'Input threads: %d is not equal to runtime threads: %d' \ -# % (expected_runtime_threads, runtime_threads) - -# # Assert runtime stats are what was input -# assert runtime_gb_err <= allowed_gb_err, mem_err -# assert abs(expected_runtime_threads - runtime_threads) <= 1, threads_err - -# # Test resources were used as expected -# # @pytest.mark.skipif(True, reason="https://github.com/nipy/nipype/issues/1663") -# @pytest.mark.skipif(run_profile is False, reason='resources monitor is disabled') -# def test_function_profiling(self): -# ''' -# Test runtime profiler correctly records workflow RAM/CPUs consumption -# from a python function -# ''' - -# # Import packages -# import json -# import numpy as np - -# # Init variables -# mem_gb = self.mem_gb -# n_procs = self.n_procs - -# # Run workflow and get stats -# node_str = self._run_function_workflow(mem_gb, n_procs) -# # Get runtime stats as dictionary -# node_stats = json.loads(node_str) - -# # Read out runtime stats -# runtime_gb = float(node_stats['runtime_memory_gb']) -# runtime_threads = int(node_stats['runtime_threads']) - -# # Get margin of error for RAM GB -# allowed_gb_err = self.mem_err_gb -# runtime_gb_err = np.abs(runtime_gb - mem_gb) -# # -# expected_runtime_threads = n_procs - -# # Error message formatting -# mem_err = 'Input memory: %f is not within %.3f GB of runtime '\ -# 'memory: %f' % (mem_gb, self.mem_err_gb, runtime_gb) -# threads_err = 'Input threads: %d is not equal to runtime threads: %d' \ -# % (expected_runtime_threads, runtime_threads) - -# # Assert runtime stats are what was input -# assert runtime_gb_err <= allowed_gb_err, mem_err -# assert abs(expected_runtime_threads - runtime_threads) <= 1, threads_err + # assert abs(mem_gb - result.runtime.mem_peak_gb) < 0.3, 'estimated memory error above .3GB' + assert int(result.runtime.cpu_percent / 100 + 0.2) >= n_procs diff --git a/nipype/utils/profiler.py b/nipype/utils/profiler.py index 9a1e22b573..3479a40d7b 100644 --- a/nipype/utils/profiler.py +++ b/nipype/utils/profiler.py @@ -15,16 +15,16 @@ except ImportError as exc: psutil = None +from builtins import open, range from .. import config, logging from .misc import str2bool -from builtins import open, range proflogger = logging.getLogger('utils') resource_monitor = str2bool(config.get('execution', 'resource_monitor', 'false')) if resource_monitor and psutil is None: - proflogger.warn('Switching "resource_monitor" off: the option was on, but the ' - 'necessary package "psutil" could not be imported.') + proflogger.warning('Switching "resource_monitor" off: the option was on, but the ' + 'necessary package "psutil" could not be imported.') resource_monitor = False # Init variables @@ -32,28 +32,40 @@ class ResourceMonitor(threading.Thread): - def __init__(self, pid, freq=5, fname=None): + """ + A ``Thread`` to monitor a specific PID with a certain frequence + to a file + """ + + def __init__(self, pid, freq=5, fname=None, python=True): + # Make sure psutil is imported + import psutil + if freq < 0.2: raise RuntimeError('Frequency (%0.2fs) cannot be lower than 0.2s' % freq) if fname is None: fname = '.proc-%d_time-%s_freq-%0.2f' % (pid, time(), freq) - - self._pid = pid self._fname = fname + self._logfile = open(self._fname, 'w') self._freq = freq + self._python = python - self._logfile = open(self._fname, 'w') - self._sample() + # Leave process initialized and make first sample + self._process = psutil.Process(pid) + self._sample(cpu_interval=0.2) + # Start thread threading.Thread.__init__(self) self._event = threading.Event() @property def fname(self): + """Get/set the internal filename""" return self._fname def stop(self): + """Stop monitoring""" if not self._event.is_set(): self._event.set() self.join() @@ -61,14 +73,32 @@ def stop(self): self._logfile.flush() self._logfile.close() - def _sample(self): - ram = _get_ram_mb(self._pid) or 0 - cpus = _get_num_threads(self._pid) or 0 - print('%s,%f,%d' % (time(), ram, cpus), + def _sample(self, cpu_interval=None): + cpu = 0.0 + mem = 0.0 + try: + with self._process.oneshot(): + cpu += self._process.cpu_percent(interval=cpu_interval) + mem += self._process.memory_info().rss + except psutil.NoSuchProcess: + pass + + # parent_mem = mem + # Iterate through child processes and get number of their threads + for child in self._process.children(recursive=True): + try: + with child.oneshot(): + cpu += child.cpu_percent() + mem += child.memory_info().rss + except psutil.NoSuchProcess: + pass + + print('%f,%f,%f' % (time(), (mem / _MB), cpu), file=self._logfile) self._logfile.flush() def run(self): + """Core monitoring function, called by start()""" while not self._event.is_set(): self._sample() self._event.wait(self._freq) @@ -181,8 +211,7 @@ def get_max_resources_used(pid, mem_mb, num_threads, pyfunc=False): mem_mb = max(mem_mb, _get_ram_mb(pid, pyfunc=pyfunc)) num_threads = max(num_threads, _get_num_threads(pid)) except Exception as exc: - proflogger = logging.getLogger('profiler') - proflogger.info('Could not get resources used by process. Error: %s', exc) + proflogger.info('Could not get resources used by process.\n%s', exc) return mem_mb, num_threads @@ -289,48 +318,49 @@ def _get_ram_mb(pid, pyfunc=False): return mem_mb +def _use_cpu(x): + ctr = 0 + while ctr < 1e7: + ctr += 1 + x*x + # Spin multiple threads def _use_resources(n_procs, mem_gb): - ''' + """ Function to execute multiple use_gb_ram functions in parallel - ''' - # from multiprocessing import Process - from threading import Thread + """ + import os import sys + import psutil + from multiprocessing import Pool + from nipype import logging + from nipype.utils.profiler import _use_cpu - def _use_gb_ram(mem_gb): - """A test function to consume mem_gb GB of RAM""" + iflogger = logging.getLogger('interface') - # Getsize of one character string - bsize = sys.getsizeof(' ') - sys.getsizeof(' ') - boffset = sys.getsizeof('') + # Getsize of one character string + BSIZE = sys.getsizeof(' ') - sys.getsizeof(' ') + BOFFSET = sys.getsizeof('') + _GB = 1024.0**3 - num_bytes = int(mem_gb * (1024**3)) + def _use_gb_ram(mem_gb): + """A test function to consume mem_gb GB of RAM""" + num_bytes = int(mem_gb * _GB) # Eat mem_gb GB of memory for 1 second - gb_str = ' ' * ((num_bytes - boffset) // bsize) - + gb_str = ' ' * ((num_bytes - BOFFSET) // BSIZE) assert sys.getsizeof(gb_str) == num_bytes - - # Spin CPU - ctr = 0 - while ctr < 30e6: - ctr += 1 - - # Clear memory - del ctr - del gb_str - - # Build thread list - thread_list = [] - for idx in range(n_procs): - thread = Thread(target=_use_gb_ram, args=(mem_gb / n_procs,), - name='thread-%d' % idx) - thread_list.append(thread) - - # Run multi-threaded - print('Using %.3f GB of memory over %d sub-threads...' % (mem_gb, n_procs)) - for thread in thread_list: - thread.start() - - for thread in thread_list: - thread.join() + return gb_str + + # Measure the amount of memory this process already holds + p = psutil.Process(os.getpid()) + mem_offset = p.memory_info().rss / _GB + big_str = _use_gb_ram(mem_gb - mem_offset) + _use_cpu(5) + mem_total = p.memory_info().rss / _GB + del big_str + iflogger.info('[%d] Memory offset %0.2fGB, total %0.2fGB', os.getpid(), mem_offset, mem_total) + + if n_procs > 1: + pool = Pool(n_procs) + pool.map(_use_cpu, range(n_procs)) + return True From 403961f3fd0486f8d972bbd23b47f1acc1f6ac3e Mon Sep 17 00:00:00 2001 From: oesteban Date: Sun, 1 Oct 2017 11:21:06 -0700 Subject: [PATCH 311/643] fix unconsistency of runtime attributes --- nipype/pipeline/engine/nodes.py | 4 ++-- nipype/utils/profiler.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/nipype/pipeline/engine/nodes.py b/nipype/pipeline/engine/nodes.py index 6f1df368af..2b03570c9c 100644 --- a/nipype/pipeline/engine/nodes.py +++ b/nipype/pipeline/engine/nodes.py @@ -749,8 +749,8 @@ def write_report(self, report_type=None, cwd=None): 'duration': self.result.runtime.duration} # Try and insert memory/threads usage if available if resource_monitor: - rst_dict['runtime_memory_gb'] = getattr(self.result.runtime, 'mem_peak_gb') - rst_dict['runtime_threads'] = getattr(self.result.runtime, 'nthreads_max') + rst_dict['mem_peak_gb'] = self.result.runtime.mem_peak_gb + rst_dict['cpu_percent'] = self.result.runtime.cpu_percent if hasattr(self.result.runtime, 'cmdline'): rst_dict['command'] = self.result.runtime.cmdline diff --git a/nipype/utils/profiler.py b/nipype/utils/profiler.py index 3479a40d7b..61d92cb4b6 100644 --- a/nipype/utils/profiler.py +++ b/nipype/utils/profiler.py @@ -138,7 +138,7 @@ def log_nodes_cb(node, status): 'finish': getattr(node.result.runtime, 'endTime'), 'duration': getattr(node.result.runtime, 'duration'), 'runtime_threads': getattr( - node.result.runtime, 'nthreads_max', 'N/A'), + node.result.runtime, 'cpu_percent', 'N/A'), 'runtime_memory_gb': getattr( node.result.runtime, 'mem_peak_gb', 'N/A'), 'estimated_memory_gb': node.mem_gb, From e7bc88879f752350ce3f1ed3370be79d160bea7e Mon Sep 17 00:00:00 2001 From: oesteban Date: Sun, 1 Oct 2017 20:04:23 -0700 Subject: [PATCH 312/643] enable all tests in test_resource_monitor --- nipype/interfaces/base.py | 1 - .../interfaces/tests/test_resource_monitor.py | 23 ++++++++----------- nipype/utils/profiler.py | 3 ++- 3 files changed, 12 insertions(+), 15 deletions(-) diff --git a/nipype/interfaces/base.py b/nipype/interfaces/base.py index d14a81a696..af10d50792 100644 --- a/nipype/interfaces/base.py +++ b/nipype/interfaces/base.py @@ -101,7 +101,6 @@ def load_template(name): template : string.Template """ - full_fname = os.path.join(os.path.dirname(__file__), 'script_templates', name) template_file = open(full_fname) diff --git a/nipype/interfaces/tests/test_resource_monitor.py b/nipype/interfaces/tests/test_resource_monitor.py index ec1bf83450..20677bb494 100644 --- a/nipype/interfaces/tests/test_resource_monitor.py +++ b/nipype/interfaces/tests/test_resource_monitor.py @@ -1,8 +1,7 @@ +#!/usr/bin/env python # -*- coding: utf-8 -*- -# test_profiler.py -# -# Author: Daniel Clark, 2016 - +# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- +# vi: set ft=python sts=4 ts=4 sw=4 et: """ Module to unit test the resource_monitor in nipype """ @@ -17,7 +16,6 @@ from nipype.interfaces import utility as niu -# UseResources inputspec class UseResourcesInputSpec(CommandLineInputSpec): mem_gb = traits.Float(desc='Number of GB of RAM to use', argstr='-g %f', mandatory=True) @@ -25,11 +23,10 @@ class UseResourcesInputSpec(CommandLineInputSpec): argstr='-p %d', mandatory=True) -# UseResources interface class UseResources(CommandLine): - ''' + """ use_resources cmd interface - ''' + """ from nipype import __path__ # Init attributes input_spec = UseResourcesInputSpec @@ -48,10 +45,10 @@ class UseResources(CommandLine): @pytest.mark.skipif(run_profile is False, reason='resources monitor is disabled') @pytest.mark.parametrize("mem_gb,n_procs", [(0.5, 3), (2.2, 8), (0.8, 4), (1.5, 1)]) def test_cmdline_profiling(tmpdir, mem_gb, n_procs): - ''' + """ Test runtime profiler correctly records workflow RAM/CPUs consumption of a CommandLine-derived interface - ''' + """ from nipype import config config.set('execution', 'resource_monitor_frequency', '0.2') # Force sampling fast @@ -67,10 +64,10 @@ def test_cmdline_profiling(tmpdir, mem_gb, n_procs): @pytest.mark.skipif(run_profile is False, reason='resources monitor is disabled') @pytest.mark.parametrize("mem_gb,n_procs", [(0.5, 3), (2.2, 8), (0.8, 4), (1.5, 1)]) def test_function_profiling(tmpdir, mem_gb, n_procs): - ''' + """ Test runtime profiler correctly records workflow RAM/CPUs consumption of a Function interface - ''' + """ from nipype import config config.set('execution', 'resource_monitor_frequency', '0.2') # Force sampling fast @@ -80,5 +77,5 @@ def test_function_profiling(tmpdir, mem_gb, n_procs): iface.inputs.n_procs = n_procs result = iface.run() - # assert abs(mem_gb - result.runtime.mem_peak_gb) < 0.3, 'estimated memory error above .3GB' + assert abs(mem_gb - result.runtime.mem_peak_gb) < 0.3, 'estimated memory error above .3GB' assert int(result.runtime.cpu_percent / 100 + 0.2) >= n_procs diff --git a/nipype/utils/profiler.py b/nipype/utils/profiler.py index 61d92cb4b6..6685d1eb0b 100644 --- a/nipype/utils/profiler.py +++ b/nipype/utils/profiler.py @@ -358,7 +358,8 @@ def _use_gb_ram(mem_gb): _use_cpu(5) mem_total = p.memory_info().rss / _GB del big_str - iflogger.info('[%d] Memory offset %0.2fGB, total %0.2fGB', os.getpid(), mem_offset, mem_total) + iflogger.info('[%d] Memory offset %0.2fGB, total %0.2fGB', + os.getpid(), mem_offset, mem_total) if n_procs > 1: pool = Pool(n_procs) From ef097a6390b72b1550d60145d23b23597a48208c Mon Sep 17 00:00:00 2001 From: oesteban Date: Mon, 2 Oct 2017 10:37:27 -0700 Subject: [PATCH 313/643] do not delete num_threads, check inputs also --- nipype/pipeline/engine/nodes.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/nipype/pipeline/engine/nodes.py b/nipype/pipeline/engine/nodes.py index 2b03570c9c..3f1ce0268d 100644 --- a/nipype/pipeline/engine/nodes.py +++ b/nipype/pipeline/engine/nodes.py @@ -208,7 +208,7 @@ def mem_gb(self): self._mem_gb = self._interface.estimated_memory_gb logger.warning('Setting "estimated_memory_gb" on Interfaces has been ' 'deprecated as of nipype 1.0, please use Node.mem_gb.') - del self._interface.estimated_memory_gb + return self._mem_gb @property @@ -218,7 +218,10 @@ def n_procs(self): self._n_procs = self._interface.num_threads logger.warning('Setting "num_threads" on Interfaces has been ' 'deprecated as of nipype 1.0, please use Node.n_procs') - del self._interface.num_threads + + if hasattr(self._interface.inputs, 'num_threads') and isdefined( + self._interface.inputs.num_threads): + self._n_procs = self._interface.inputs.num_threads return self._n_procs def output_dir(self): From 4fdce5c880f35fb4b206c3c17c79ef77fe257217 Mon Sep 17 00:00:00 2001 From: oesteban Date: Mon, 2 Oct 2017 13:29:16 -0700 Subject: [PATCH 314/643] several fixups - [x] Add `num_threads` as a property synchronized with `inputs.num_threads` in afni interfaces - [x] Add syncrhonization between `Node.n_procs` and `Interface.inputs.num_threads` - [x] Minor documentation fixes of the old profiler callback-log. --- nipype/interfaces/afni/base.py | 56 +++++++++++++++++++------------- nipype/pipeline/engine/nodes.py | 35 +++++++++++++------- nipype/utils/draw_gantt_chart.py | 5 +-- 3 files changed, 60 insertions(+), 36 deletions(-) diff --git a/nipype/interfaces/afni/base.py b/nipype/interfaces/afni/base.py index b834b34163..50f7f8ac87 100644 --- a/nipype/interfaces/afni/base.py +++ b/nipype/interfaces/afni/base.py @@ -130,6 +130,8 @@ def _run_interface(self, runtime): class AFNICommandInputSpec(CommandLineInputSpec): + num_threads = traits.Int(1, usedefault=True, nohash=True, + desc='set number of threads') outputtype = traits.Enum('AFNI', list(Info.ftypes.keys()), desc='AFNI output filetype') out_file = File(name_template="%s_afni", desc='output image file name', @@ -141,6 +143,7 @@ class AFNICommandOutputSpec(TraitedSpec): out_file = File(desc='output file', exists=True) + class AFNICommand(AFNICommandBase): """Shared options for several AFNI commands """ input_spec = AFNICommandInputSpec @@ -172,9 +175,33 @@ class AFNICommand(AFNICommandBase): 'tags': ['implementation'], }] + @property + def num_threads(self): + return self.inputs.num_threads + + @num_threads.setter + def num_threads(self, value): + self.inputs.num_threads = value + + @classmethod + def set_default_output_type(cls, outputtype): + """Set the default output type for AFNI classes. + + This method is used to set the default output type for all afni + subclasses. However, setting this will not update the output + type for any existing instances. For these, assign the + .inputs.outputtype. + """ + + if outputtype in Info.ftypes: + cls._outputtype = outputtype + else: + raise AttributeError('Invalid AFNI outputtype: %s' % outputtype) + def __init__(self, **inputs): super(AFNICommand, self).__init__(**inputs) self.inputs.on_trait_change(self._output_update, 'outputtype') + self.inputs.on_trait_change(self._nthreads_update, 'num_threads') if self._outputtype is None: self._outputtype = Info.outputtype() @@ -184,11 +211,9 @@ def __init__(self, **inputs): else: self._output_update() - def _run_interface(self, runtime): - # Update num threads estimate from OMP_NUM_THREADS env var - # Default to 1 if not set - self.inputs.environ['OMP_NUM_THREADS'] = str(self.num_threads) - return super(AFNICommand, self)._run_interface(runtime) + def _nthreads_update(self): + """Update environment with new number of threads""" + self.inputs.environ['OMP_NUM_THREADS'] = '%d' % self.inputs.num_threads def _output_update(self): """ i think? updates class private attribute based on instance input @@ -197,21 +222,6 @@ def _output_update(self): """ self._outputtype = self.inputs.outputtype - @classmethod - def set_default_output_type(cls, outputtype): - """Set the default output type for AFNI classes. - - This method is used to set the default output type for all afni - subclasses. However, setting this will not update the output - type for any existing instances. For these, assign the - .inputs.outputtype. - """ - - if outputtype in Info.ftypes: - cls._outputtype = outputtype - else: - raise AttributeError('Invalid AFNI outputtype: %s' % outputtype) - def _overload_extension(self, value, name=None): path, base, _ = split_filename(value) return os.path.join(path, base + Info.output_type_to_ext(self.inputs.outputtype)) @@ -274,6 +284,7 @@ def _gen_fname(self, basename, cwd=None, suffix=None, change_ext=True, use_ext=False, newpath=cwd) return fname + def no_afni(): """ Checks if AFNI is available """ if Info.version() is None: @@ -285,8 +296,9 @@ class AFNIPythonCommandInputSpec(CommandLineInputSpec): outputtype = traits.Enum('AFNI', list(Info.ftypes.keys()), desc='AFNI output filetype') py27_path = traits.Either('python2', File(exists=True), - usedefault=True, - default='python2') + usedefault=True, + default='python2') + class AFNIPythonCommand(AFNICommand): @property diff --git a/nipype/pipeline/engine/nodes.py b/nipype/pipeline/engine/nodes.py index 3f1ce0268d..0727c843c3 100644 --- a/nipype/pipeline/engine/nodes.py +++ b/nipype/pipeline/engine/nodes.py @@ -79,7 +79,7 @@ class Node(EngineBase): def __init__(self, interface, name, iterables=None, itersource=None, synchronize=False, overwrite=None, needed_outputs=None, - run_without_submitting=False, n_procs=1, mem_gb=0.20, + run_without_submitting=False, n_procs=None, mem_gb=0.20, **kwargs): """ Parameters @@ -153,12 +153,15 @@ def __init__(self, interface, name, iterables=None, itersource=None, if 'base_dir' in kwargs: base_dir = kwargs['base_dir'] super(Node, self).__init__(name, base_dir) + + # Make sure an interface is set, and that it is an Interface if interface is None: raise IOError('Interface must be provided') if not isinstance(interface, Interface): raise IOError('interface must be an instance of an Interface') self._interface = interface self.name = name + self._result = None self.iterables = iterables self.synchronize = synchronize @@ -170,8 +173,10 @@ def __init__(self, interface, name, iterables=None, itersource=None, self.needed_outputs = [] self.plugin_args = {} - self._n_procs = n_procs self._mem_gb = mem_gb + self._n_procs = n_procs + if hasattr(self.inputs, 'num_threads') and self._n_procs is not None: + self.inputs.num_threads = self._n_procs if needed_outputs: self.needed_outputs = sorted(needed_outputs) @@ -213,16 +218,22 @@ def mem_gb(self): @property def n_procs(self): - """Get estimated number of processes""" - if hasattr(self._interface, 'num_threads'): - self._n_procs = self._interface.num_threads - logger.warning('Setting "num_threads" on Interfaces has been ' - 'deprecated as of nipype 1.0, please use Node.n_procs') - - if hasattr(self._interface.inputs, 'num_threads') and isdefined( - self._interface.inputs.num_threads): - self._n_procs = self._interface.inputs.num_threads - return self._n_procs + """Get the estimated number of processes/threads""" + if self._n_procs is not None: + return self._n_procs + elif hasattr(self.inputs, 'num_threads') and isdefined(self.inputs.num_threads): + return self.inputs.num_threads + else: + return 1 + + @n_procs.setter + def n_procs(self, value): + """Set an estimated number of processes/threads""" + self._n_procs = value + + # Overwrite interface's dynamic input of num_threads + if hasattr(self._interface.inputs, 'num_threads'): + self._interface.inputs.num_threads = self._n_procs def output_dir(self): """Return the location of the output directory for the node""" diff --git a/nipype/utils/draw_gantt_chart.py b/nipype/utils/draw_gantt_chart.py index c91acf662c..8731aa32eb 100644 --- a/nipype/utils/draw_gantt_chart.py +++ b/nipype/utils/draw_gantt_chart.py @@ -1,8 +1,9 @@ # -*- coding: utf-8 -*- # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: -"""Module to draw an html gantt chart from logfile produced by -callback_log.log_nodes_cb() +""" +Module to draw an html gantt chart from logfile produced by +``nipype.utils.profiler.log_nodes_cb()`` """ from __future__ import print_function, division, unicode_literals, absolute_import From 31a495214985043a1eeaf42fb9ab22bb764c0ace Mon Sep 17 00:00:00 2001 From: oesteban Date: Mon, 2 Oct 2017 14:33:07 -0700 Subject: [PATCH 315/643] retrieve num_threads from Interface object --- nipype/pipeline/engine/nodes.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/nipype/pipeline/engine/nodes.py b/nipype/pipeline/engine/nodes.py index 0727c843c3..ab01312752 100644 --- a/nipype/pipeline/engine/nodes.py +++ b/nipype/pipeline/engine/nodes.py @@ -175,8 +175,8 @@ def __init__(self, interface, name, iterables=None, itersource=None, self._mem_gb = mem_gb self._n_procs = n_procs - if hasattr(self.inputs, 'num_threads') and self._n_procs is not None: - self.inputs.num_threads = self._n_procs + if hasattr(self._interface.inputs, 'num_threads') and self._n_procs is not None: + self._interface.inputs.num_threads = self._n_procs if needed_outputs: self.needed_outputs = sorted(needed_outputs) @@ -221,8 +221,9 @@ def n_procs(self): """Get the estimated number of processes/threads""" if self._n_procs is not None: return self._n_procs - elif hasattr(self.inputs, 'num_threads') and isdefined(self.inputs.num_threads): - return self.inputs.num_threads + elif hasattr(self._interface.inputs, 'num_threads') and isdefined( + self._interface.inputs.num_threads): + return self._interface.inputs.num_threads else: return 1 From 5fb992eaa9926af2126ae4b473fdaff73f905dc8 Mon Sep 17 00:00:00 2001 From: oesteban Date: Mon, 2 Oct 2017 14:34:33 -0700 Subject: [PATCH 316/643] fix unnecessary, preemptive float castings --- nipype/interfaces/base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nipype/interfaces/base.py b/nipype/interfaces/base.py index af10d50792..5d434fc56f 100644 --- a/nipype/interfaces/base.py +++ b/nipype/interfaces/base.py @@ -1146,8 +1146,8 @@ def run(self, **inputs): vals = np.loadtxt(mon_sp.fname, delimiter=',') if vals.size: vals = np.atleast_2d(vals) - runtime.mem_peak_gb = float(vals[:, 1].max() / 1024) - runtime.cpu_percent = float(vals[:, 2].max()) + runtime.mem_peak_gb = vals[:, 1].max() / 1024 + runtime.cpu_percent = vals[:, 2].max() runtime.prof_dict = { 'time': vals[:, 0].tolist(), From 7b3c4043d5b6788b95498a1527d9590e74ec1681 Mon Sep 17 00:00:00 2001 From: jakubk Date: Mon, 2 Oct 2017 18:57:02 -0400 Subject: [PATCH 317/643] enh: generate dockerfiles with neurodocker + rename base dockerfile Rename base.Dockerfile to Dockerfile.base to conform to moby style. For now, the master Neurodocker Docker image is used, but a versioned image will be used once a newer Neurodocker version is released. --- Dockerfile | 297 ++++++++++++++++++++++----------- docker/Dockerfile.base | 234 ++++++++++++++++++++++++++ docker/base.Dockerfile | 151 ----------------- docker/generate_dockerfiles.sh | 75 +++++++++ 4 files changed, 508 insertions(+), 249 deletions(-) create mode 100644 docker/Dockerfile.base delete mode 100644 docker/base.Dockerfile create mode 100755 docker/generate_dockerfiles.sh diff --git a/Dockerfile b/Dockerfile index 14a6dec135..073185f1cc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,111 +1,212 @@ -# Copyright (c) 2016, The developers of the Stanford CRN -# All rights reserved. +# Generated by Neurodocker v0.3.1-2-g4dfcf56. # -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: +# Thank you for using Neurodocker. If you discover any issues +# or ways to improve this software, please submit an issue or +# pull request on our GitHub repository: +# https://github.com/kaczmarj/neurodocker # -# * Redistributions of source code must retain the above copyright notice, this -# list of conditions and the following disclaimer. -# -# * Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions and the following disclaimer in the documentation -# and/or other materials provided with the distribution. -# -# * Neither the name of crn_base nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# Timestamp: 2017-10-02 22:55:57 +FROM kaczmarj/nipype:base -# -# Based on https://github.com/poldracklab/fmriprep/blob/9c92a3de9112f8ef1655b876de060a2ad336ffb0/Dockerfile -# -FROM nipype/base:latest -MAINTAINER The nipype developers https://github.com/nipy/nipype - -ARG PYTHON_VERSION_MAJOR=3 - -# Installing and setting up miniconda -RUN curl -sSLO https://repo.continuum.io/miniconda/Miniconda${PYTHON_VERSION_MAJOR}-4.2.12-Linux-x86_64.sh && \ - bash Miniconda${PYTHON_VERSION_MAJOR}-4.2.12-Linux-x86_64.sh -b -p /usr/local/miniconda && \ - rm Miniconda${PYTHON_VERSION_MAJOR}-4.2.12-Linux-x86_64.sh - -ENV PATH=/usr/local/miniconda/bin:$PATH \ - LANG=C.UTF-8 \ - LC_ALL=C.UTF-8 \ - ACCEPT_INTEL_PYTHON_EULA=yes \ - MKL_NUM_THREADS=1 \ - OMP_NUM_THREADS=1 -# MKL/OMP_NUM_THREADS: unless otherwise specified, each process should -# only use one thread - nipype will handle parallelization - -# Installing precomputed python packages -ARG PYTHON_VERSION_MINOR=6 -RUN conda config --add channels conda-forge; sync && \ - conda config --set always_yes yes --set changeps1 no; sync && \ - conda install -y python=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} \ - mkl \ - numpy \ - scipy \ - scikit-learn \ - matplotlib \ - pandas \ - libxml2 \ - libxslt \ - traits=4.6.0 \ - psutil \ - icu=58.1 && \ - sync; - -# matplotlib cleanups: set default backend, precaching fonts -RUN sed -i 's/\(backend *: \).*$/\1Agg/g' /usr/local/miniconda/lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages/matplotlib/mpl-data/matplotlibrc && \ - python -c "from matplotlib import font_manager" - -# Install CI scripts -COPY docker/files/run_* /usr/bin/ -RUN chmod +x /usr/bin/run_* - -# Replace imglob with a Python3 compatible version -COPY nipype/external/fsl_imglob.py /usr/bin/fsl_imglob.py -RUN rm -rf ${FSLDIR}/bin/imglob && \ - chmod +x /usr/bin/fsl_imglob.py && \ - ln -s /usr/bin/fsl_imglob.py ${FSLDIR}/bin/imglob - -# Installing dev requirements (packages that are not in pypi) -WORKDIR /src/ -COPY requirements.txt requirements.txt -RUN pip install -r requirements.txt && \ - rm -rf ~/.cache/pip - -RUN git clone https://github.com/INCF/pybids.git && \ - cd pybids && python setup.py develop - -# Installing nipype -COPY . /src/nipype -RUN cd /src/nipype && \ - pip install -e .[all] && \ - rm -rf ~/.cache/pip - -WORKDIR /work/ +ARG DEBIAN_FRONTEND=noninteractive + +#---------------------------------------------------------- +# Install common dependencies and create default entrypoint +#---------------------------------------------------------- +ENV LANG="en_US.UTF-8" \ + LC_ALL="C.UTF-8" \ + ND_ENTRYPOINT="/neurodocker/startup.sh" +RUN apt-get update -qq && apt-get install -yq --no-install-recommends \ + apt-utils bzip2 ca-certificates curl locales unzip \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \ + && localedef --force --inputfile=en_US --charmap=UTF-8 C.UTF-8 \ + && chmod 777 /opt && chmod a+s /opt \ + && mkdir -p /neurodocker \ + && if [ ! -f "$ND_ENTRYPOINT" ]; then \ + echo '#!/usr/bin/env bash' >> $ND_ENTRYPOINT \ + && echo 'set +x' >> $ND_ENTRYPOINT \ + && echo 'if [ -z "$*" ]; then /usr/bin/env bash; else $*; fi' >> $ND_ENTRYPOINT; \ + fi \ + && chmod -R 777 /neurodocker && chmod a+s /neurodocker +ENTRYPOINT ["/neurodocker/startup.sh"] + +LABEL maintainer="The nipype developers https://github.com/nipy/nipype" + +ENV MKL_NUM_THREADS="1" \ + OMP_NUM_THREADS="1" + +# Create new user: neuro +RUN useradd --no-user-group --create-home --shell /bin/bash neuro +USER neuro + +#------------------ +# Install Miniconda +#------------------ +ENV CONDA_DIR=/opt/conda \ + PATH=/opt/conda/bin:$PATH +RUN echo "Downloading Miniconda installer ..." \ + && miniconda_installer=/tmp/miniconda.sh \ + && curl -sSL -o $miniconda_installer https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh \ + && /bin/bash $miniconda_installer -b -p $CONDA_DIR \ + && rm -f $miniconda_installer \ + && conda config --system --prepend channels conda-forge \ + && conda config --system --set auto_update_conda false \ + && conda config --system --set show_channel_urls true \ + && conda update -y -q --all && sync \ + && conda clean -tipsy && sync +#------------------------- +# Create conda environment +#------------------------- +RUN conda create -y -q --name neuro \ + && sync && conda clean -tipsy && sync +ENV PATH=/opt/conda/envs/neuro/bin:$PATH + +COPY ["docker/files/run_builddocs.sh", "docker/files/run_examples.sh", "docker/files/run_pytests.sh", "nipype/external/fsl_imglob.py", "/usr/bin/"] + +COPY [".", "/src/nipype"] + +USER root + +# User-defined instruction +RUN chmod 777 -R /src/nipype + +USER neuro + +ARG PYTHON_VERSION_MAJOR="3" +ARG PYTHON_VERSION_MINOR="6" ARG BUILD_DATE ARG VCS_REF ARG VERSION -LABEL org.label-schema.build-date=$BUILD_DATE \ + +#------------------------- +# Update conda environment +#------------------------- +RUN conda install -y -q --name neuro python=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} \ + icu=58.1 \ + libxml2 \ + libxslt \ + matplotlib \ + mkl \ + numpy \ + pandas \ + psutil \ + scikit-learn \ + scipy \ + traits=4.6.0 \ + && sync && conda clean -tipsy && sync \ + && /bin/bash -c "source activate neuro \ + && pip install -q --no-cache-dir -e /src/nipype[all]" \ + && sync + +LABEL org.label-schema.build-date="$BUILD_DATE" \ org.label-schema.name="NIPYPE" \ org.label-schema.description="NIPYPE - Neuroimaging in Python: Pipelines and Interfaces" \ org.label-schema.url="http://nipype.readthedocs.io" \ - org.label-schema.vcs-ref=$VCS_REF \ + org.label-schema.vcs-ref="$VCS_REF" \ org.label-schema.vcs-url="https://github.com/nipy/nipype" \ - org.label-schema.version=$VERSION \ + org.label-schema.version="$VERSION" \ org.label-schema.schema-version="1.0" + +#-------------------------------------- +# Save container specifications to JSON +#-------------------------------------- +RUN echo '{ \ + \n "pkg_manager": "apt", \ + \n "check_urls": false, \ + \n "instructions": [ \ + \n [ \ + \n "base", \ + \n "kaczmarj/nipype:base" \ + \n ], \ + \n [ \ + \n "label", \ + \n { \ + \n "maintainer": "The nipype developers https://github.com/nipy/nipype" \ + \n } \ + \n ], \ + \n [ \ + \n "env", \ + \n { \ + \n "MKL_NUM_THREADS": "1", \ + \n "OMP_NUM_THREADS": "1" \ + \n } \ + \n ], \ + \n [ \ + \n "user", \ + \n "neuro" \ + \n ], \ + \n [ \ + \n "miniconda", \ + \n { \ + \n "env_name": "neuro", \ + \n "add_to_path": true \ + \n } \ + \n ], \ + \n [ \ + \n "copy", \ + \n [ \ + \n "docker/files/run_builddocs.sh", \ + \n "docker/files/run_examples.sh", \ + \n "docker/files/run_pytests.sh", \ + \n "nipype/external/fsl_imglob.py", \ + \n "/usr/bin/" \ + \n ] \ + \n ], \ + \n [ \ + \n "copy", \ + \n [ \ + \n ".", \ + \n "/src/nipype" \ + \n ] \ + \n ], \ + \n [ \ + \n "user", \ + \n "root" \ + \n ], \ + \n [ \ + \n "run", \ + \n "chmod 777 -R /src/nipype" \ + \n ], \ + \n [ \ + \n "user", \ + \n "neuro" \ + \n ], \ + \n [ \ + \n "arg", \ + \n { \ + \n "PYTHON_VERSION_MAJOR": "3", \ + \n "PYTHON_VERSION_MINOR": "6", \ + \n "BUILD_DATE": "", \ + \n "VCS_REF": "", \ + \n "VERSION": "" \ + \n } \ + \n ], \ + \n [ \ + \n "miniconda", \ + \n { \ + \n "env_name": "neuro", \ + \n "conda_install": "python=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} icu=58.1 libxml2 libxslt matplotlib mkl numpy pandas psutil scikit-learn scipy traits=4.6.0", \ + \n "pip_opts": "-e", \ + \n "pip_install": "/src/nipype[all]" \ + \n } \ + \n ], \ + \n [ \ + \n "label", \ + \n { \ + \n "org.label-schema.build-date": "$BUILD_DATE", \ + \n "org.label-schema.name": "NIPYPE", \ + \n "org.label-schema.description": "NIPYPE - Neuroimaging in Python: Pipelines and Interfaces", \ + \n "org.label-schema.url": "http://nipype.readthedocs.io", \ + \n "org.label-schema.vcs-ref": "$VCS_REF", \ + \n "org.label-schema.vcs-url": "https://github.com/nipy/nipype", \ + \n "org.label-schema.version": "$VERSION", \ + \n "org.label-schema.schema-version": "1.0" \ + \n } \ + \n ] \ + \n ], \ + \n "generation_timestamp": "2017-10-02 22:55:57", \ + \n "neurodocker_version": "0.3.1-2-g4dfcf56" \ + \n}' > /neurodocker/neurodocker_specs.json diff --git a/docker/Dockerfile.base b/docker/Dockerfile.base new file mode 100644 index 0000000000..5735c04b93 --- /dev/null +++ b/docker/Dockerfile.base @@ -0,0 +1,234 @@ +# Generated by Neurodocker v0.3.1-2-g4dfcf56. +# +# Thank you for using Neurodocker. If you discover any issues +# or ways to improve this software, please submit an issue or +# pull request on our GitHub repository: +# https://github.com/kaczmarj/neurodocker +# +# Timestamp: 2017-10-02 22:55:55 + +FROM neurodebian@sha256:b09c09faa34bca0ea096b9360ee5121e048594cb8e2d7744d7d546ade88a2996 + +ARG DEBIAN_FRONTEND=noninteractive + +#---------------------------------------------------------- +# Install common dependencies and create default entrypoint +#---------------------------------------------------------- +ENV LANG="en_US.UTF-8" \ + LC_ALL="C.UTF-8" \ + ND_ENTRYPOINT="/neurodocker/startup.sh" +RUN apt-get update -qq && apt-get install -yq --no-install-recommends \ + apt-utils bzip2 ca-certificates curl locales unzip \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \ + && localedef --force --inputfile=en_US --charmap=UTF-8 C.UTF-8 \ + && chmod 777 /opt && chmod a+s /opt \ + && mkdir -p /neurodocker \ + && if [ ! -f "$ND_ENTRYPOINT" ]; then \ + echo '#!/usr/bin/env bash' >> $ND_ENTRYPOINT \ + && echo 'set +x' >> $ND_ENTRYPOINT \ + && echo 'if [ -z "$*" ]; then /usr/bin/env bash; else $*; fi' >> $ND_ENTRYPOINT; \ + fi \ + && chmod -R 777 /neurodocker && chmod a+s /neurodocker +ENTRYPOINT ["/neurodocker/startup.sh"] + +LABEL maintainer="The nipype developers https://github.com/nipy/nipype" + +#---------------------- +# Install MCR and SPM12 +#---------------------- +# Install MATLAB Compiler Runtime +RUN apt-get update -qq && apt-get install -yq --no-install-recommends libxext6 libxt6 \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \ + && echo "Downloading MATLAB Compiler Runtime ..." \ + && curl -sSL -o /tmp/mcr.zip https://www.mathworks.com/supportfiles/downloads/R2017a/deployment_files/R2017a/installers/glnxa64/MCR_R2017a_glnxa64_installer.zip \ + && unzip -q /tmp/mcr.zip -d /tmp/mcrtmp \ + && /tmp/mcrtmp/install -destinationFolder /opt/mcr -mode silent -agreeToLicense yes \ + && rm -rf /tmp/* + +# Install standalone SPM +RUN echo "Downloading standalone SPM ..." \ + && curl -sSL -o spm.zip http://www.fil.ion.ucl.ac.uk/spm/download/restricted/utopia/dev/spm12_latest_Linux_R2017a.zip \ + && unzip -q spm.zip -d /opt \ + && chmod -R 777 /opt/spm* \ + && rm -rf spm.zip \ + && /opt/spm12/run_spm12.sh /opt/mcr/v92/ quit \ + && sed -i '$iexport SPMMCRCMD=\"/opt/spm12/run_spm12.sh /opt/mcr/v92/ script\"' $ND_ENTRYPOINT +ENV MATLABCMD=/opt/mcr/v92/toolbox/matlab \ + FORCE_SPMMCR=1 \ + LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:/opt/mcr/v92/runtime/glnxa64:/opt/mcr/v92/bin/glnxa64:/opt/mcr/v92/sys/os/glnxa64:$LD_LIBRARY_PATH + +#-------------------- +# Install AFNI latest +#-------------------- +ENV PATH=/opt/afni:$PATH +RUN apt-get update -qq && apt-get install -yq --no-install-recommends ed gsl-bin libglu1-mesa-dev libglib2.0-0 libglw1-mesa \ + libgomp1 libjpeg62 libxm4 netpbm tcsh xfonts-base xvfb \ + && libs_path=/usr/lib/x86_64-linux-gnu \ + && if [ -f $libs_path/libgsl.so.19 ]; then \ + ln $libs_path/libgsl.so.19 $libs_path/libgsl.so.0; \ + fi \ + && echo "Install libxp (not in all ubuntu/debian repositories)" \ + && apt-get install -yq --no-install-recommends libxp6 \ + || /bin/bash -c " \ + curl --retry 5 -o /tmp/libxp6.deb -sSL http://mirrors.kernel.org/debian/pool/main/libx/libxp/libxp6_1.0.2-2_amd64.deb \ + && dpkg -i /tmp/libxp6.deb && rm -f /tmp/libxp6.deb" \ + && echo "Install libpng12 (not in all ubuntu/debian repositories" \ + && apt-get install -yq --no-install-recommends libpng12-0 \ + || /bin/bash -c " \ + curl -o /tmp/libpng12.deb -sSL http://mirrors.kernel.org/debian/pool/main/libp/libpng/libpng12-0_1.2.49-1%2Bdeb7u2_amd64.deb \ + && dpkg -i /tmp/libpng12.deb && rm -f /tmp/libpng12.deb" \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \ + && echo "Downloading AFNI ..." \ + && mkdir -p /opt/afni \ + && curl -sSL --retry 5 https://afni.nimh.nih.gov/pub/dist/tgz/linux_openmp_64.tgz \ + | tar zx -C /opt/afni --strip-components=1 + +#-------------------------- +# Install FreeSurfer v6.0.0 +#-------------------------- +# Install version minimized for recon-all +# See https://github.com/freesurfer/freesurfer/issues/70 +RUN apt-get update -qq && apt-get install -yq --no-install-recommends bc libgomp1 libxmu6 libxt6 tcsh perl \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \ + && echo "Downloading minimized FreeSurfer ..." \ + && curl -sSL https://dl.dropbox.com/s/nnzcfttc41qvt31/recon-all-freesurfer6-3.min.tgz | tar xz -C /opt \ + && sed -i '$isource $FREESURFER_HOME/SetUpFreeSurfer.sh' $ND_ENTRYPOINT +ENV FREESURFER_HOME=/opt/freesurfer + +# User-defined instruction +RUN echo "cHJpbnRmICJrcnp5c3p0b2YuZ29yZ29sZXdza2lAZ21haWwuY29tXG41MTcyXG4gKkN2dW12RVYzelRmZ1xuRlM1Si8yYzFhZ2c0RVxuIiA+IC9vcHQvZnJlZXN1cmZlci9saWNlbnNlLnR4dAo=" | base64 -d | sh + +RUN apt-get update -qq \ + && apt-get install -y -q --no-install-recommends ants \ + apt-utils \ + bzip2 \ + file \ + fsl-core \ + fsl-mni152-templates \ + fusefat \ + g++ \ + git \ + graphviz \ + make \ + ruby \ + unzip \ + xvfb \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* + +# Add command(s) to entrypoint +RUN sed -i '$isource /etc/fsl/fsl.sh' $ND_ENTRYPOINT + +ENV ANTSPATH="/usr/lib/ants" \ + PATH="/usr/lib/ants:$PATH" + +#------------------------ +# Install Convert3D 1.0.0 +#------------------------ +RUN echo "Downloading C3D ..." \ + && mkdir /opt/c3d \ + && curl -sSL --retry 5 https://sourceforge.net/projects/c3d/files/c3d/1.0.0/c3d-1.0.0-Linux-x86_64.tar.gz/download \ + | tar -xzC /opt/c3d --strip-components=1 +ENV C3DPATH=/opt/c3d \ + PATH=/opt/c3d/bin:$PATH + +# User-defined instruction +RUN gem install fakes3 + +WORKDIR /work + +#-------------------------------------- +# Save container specifications to JSON +#-------------------------------------- +RUN echo '{ \ + \n "pkg_manager": "apt", \ + \n "check_urls": false, \ + \n "instructions": [ \ + \n [ \ + \n "base", \ + \n "neurodebian@sha256:b09c09faa34bca0ea096b9360ee5121e048594cb8e2d7744d7d546ade88a2996" \ + \n ], \ + \n [ \ + \n "label", \ + \n { \ + \n "maintainer": "The nipype developers https://github.com/nipy/nipype" \ + \n } \ + \n ], \ + \n [ \ + \n "spm", \ + \n { \ + \n "version": "12", \ + \n "matlab_version": "R2017a" \ + \n } \ + \n ], \ + \n [ \ + \n "afni", \ + \n { \ + \n "version": "latest" \ + \n } \ + \n ], \ + \n [ \ + \n "freesurfer", \ + \n { \ + \n "version": "6.0.0", \ + \n "min": true \ + \n } \ + \n ], \ + \n [ \ + \n "run", \ + \n "echo \"cHJpbnRmICJrcnp5c3p0b2YuZ29yZ29sZXdza2lAZ21haWwuY29tXG41MTcyXG4gKkN2dW12RVYzelRmZ1xuRlM1Si8yYzFhZ2c0RVxuIiA+IC9vcHQvZnJlZXN1cmZlci9saWNlbnNlLnR4dAo=\" | base64 -d | sh" \ + \n ], \ + \n [ \ + \n "install", \ + \n [ \ + \n "ants", \ + \n "apt-utils", \ + \n "bzip2", \ + \n "file", \ + \n "fsl-core", \ + \n "fsl-mni152-templates", \ + \n "fusefat", \ + \n "g++", \ + \n "git", \ + \n "graphviz", \ + \n "make", \ + \n "ruby", \ + \n "unzip", \ + \n "xvfb" \ + \n ] \ + \n ], \ + \n [ \ + \n "add_to_entrypoint", \ + \n [ \ + \n "source /etc/fsl/fsl.sh" \ + \n ] \ + \n ], \ + \n [ \ + \n "env", \ + \n { \ + \n "ANTSPATH": "/usr/lib/ants", \ + \n "PATH": "/usr/lib/ants:$PATH" \ + \n } \ + \n ], \ + \n [ \ + \n "c3d", \ + \n { \ + \n "version": "1.0.0" \ + \n } \ + \n ], \ + \n [ \ + \n "instruction", \ + \n "RUN gem install fakes3" \ + \n ], \ + \n [ \ + \n "workdir", \ + \n "/work" \ + \n ] \ + \n ], \ + \n "generation_timestamp": "2017-10-02 22:55:55", \ + \n "neurodocker_version": "0.3.1-2-g4dfcf56" \ + \n}' > /neurodocker/neurodocker_specs.json diff --git a/docker/base.Dockerfile b/docker/base.Dockerfile deleted file mode 100644 index 25fbb36401..0000000000 --- a/docker/base.Dockerfile +++ /dev/null @@ -1,151 +0,0 @@ -# Copyright (c) 2016, The developers of the Stanford CRN -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# * Redistributions of source code must retain the above copyright notice, this -# list of conditions and the following disclaimer. -# -# * Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions and the following disclaimer in the documentation -# and/or other materials provided with the distribution. -# -# * Neither the name of crn_base nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -# -# Based on https://github.com/poldracklab/fmriprep/blob/9c92a3de9112f8ef1655b876de060a2ad336ffb0/Dockerfile -# -FROM ubuntu:xenial-20161213 -MAINTAINER The nipype developers https://github.com/nipy/nipype - -# Set noninteractive -ENV DEBIAN_FRONTEND=noninteractive - -# Installing requirements for freesurfer installation -RUN apt-get update && \ - apt-get install -y --no-install-recommends curl ca-certificates && \ - apt-get clean && \ - rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* - -WORKDIR /opt -# Installing freesurfer -- do it first so that it is cached early -#----------------------------------------------------------------------------- -# 3. Install FreeSurfer v6.0 (minimized with reprozip): -# https://github.com/freesurfer/freesurfer/issues/70 -#----------------------------------------------------------------------------- -RUN curl -sSL https://dl.dropbox.com/s/pbaisn6m5qpi9uu/recon-all-freesurfer6-2.min.tgz?dl=0 | tar zx -C /opt -ENV FS_OVERRIDE=0 \ - OS=Linux \ - FSF_OUTPUT_FORMAT=nii.gz \ - FIX_VERTEX_AREA=\ - FREESURFER_HOME=/opt/freesurfer -ENV MNI_DIR=$FREESURFER_HOME/mni \ - SUBJECTS_DIR=$FREESURFER_HOME/subjects -ENV PERL5LIB=$MNI_DIR/share/perl5 \ - MNI_PERL5LIB=$MNI_DIR/share/perl5 \ - MINC_BIN_DIR=$MNI_DIR/bin \ - MINC_LIB_DIR=$MNI_DIR/lib \ - MNI_DATAPATH=$MNI_DIR/data -ENV PATH=$FREESURFER_HOME/bin:$FREESURFER_HOME/tktools:$MINC_BIN_DIR:$PATH -ENV FSL_DIR=/usr/share/fsl/5.0 -RUN echo "cHJpbnRmICJrcnp5c3p0b2YuZ29yZ29sZXdza2lAZ21haWwuY29tXG41MTcyXG4gKkN2dW12RVYzelRmZ1xuRlM1Si8yYzFhZ2c0RVxuIiA+IC9vcHQvZnJlZXN1cmZlci9saWNlbnNlLnR4dAo=" | base64 -d | sh - -# Enable neurodebian -COPY docker/files/neurodebian.gpg /etc/apt/neurodebian.gpg -RUN curl -sSL http://neuro.debian.net/lists/xenial.us-ca.full >> /etc/apt/sources.list.d/neurodebian.sources.list && \ - apt-key add /etc/apt/neurodebian.gpg && \ - apt-key adv --refresh-keys --keyserver hkp://ha.pool.sks-keyservers.net 0xA5D32F012649A5A9 || true - -# Installing general Debian utilities and Neurodebian packages (FSL, AFNI, git) -RUN apt-get update && \ - apt-get install -y --no-install-recommends \ - fsl-core \ - fsl-mni152-templates \ - afni \ - ants \ - bzip2 \ - xvfb \ - git \ - graphviz \ - unzip \ - apt-utils \ - fusefat \ - make \ - file \ - # Added g++ to compile dipy in py3.6 - g++ \ - ruby && \ - apt-get clean && \ - rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* - -ENV FSLDIR=/usr/share/fsl/5.0 \ - FSLOUTPUTTYPE=NIFTI_GZ \ - FSLMULTIFILEQUIT=TRUE \ - POSSUMDIR=/usr/share/fsl/5.0 \ - LD_LIBRARY_PATH=/usr/lib/fsl/5.0:$LD_LIBRARY_PATH \ - FSLTCLSH=/usr/bin/tclsh \ - FSLWISH=/usr/bin/wish \ - AFNI_MODELPATH=/usr/lib/afni/models \ - AFNI_IMSAVE_WARNINGS=NO \ - AFNI_TTATLAS_DATASET=/usr/share/afni/atlases \ - AFNI_PLUGINPATH=/usr/lib/afni/plugins \ - ANTSPATH=/usr/lib/ants -ENV PATH=/usr/lib/fsl/5.0:/usr/lib/afni/bin:$ANTSPATH:$PATH - -# Installing and setting up c3d -RUN mkdir -p /opt/c3d && \ - curl -sSL "https://files.osf.io/v1/resources/nefdp/providers/osfstorage/59ca96a9b83f69025d6b8985?action=download&version=1&direct" \ - | tar -xzC /opt/c3d --strip-components 1 - -ENV C3DPATH=/opt/c3d/ -ENV PATH=$C3DPATH/bin:$PATH - -# Install fake-S3 -ENV GEM_HOME /usr/lib/ruby/gems/2.3 -ENV BUNDLE_PATH="$GEM_HOME" \ - BUNDLE_BIN="$GEM_HOME/bin" \ - BUNDLE_SILENCE_ROOT_WARNING=1 \ - BUNDLE_APP_CONFIG="$GEM_HOME" -ENV PATH $BUNDLE_BIN:$PATH -RUN mkdir -p "$GEM_HOME" "$BUNDLE_BIN" && \ - chmod 777 "$GEM_HOME" "$BUNDLE_BIN" - -RUN gem install fakes3 - -# Install Matlab MCR: from the good old install_spm_mcr.sh of @chrisfilo -RUN echo "destinationFolder=/opt/mcr" > mcr_options.txt && \ - echo "agreeToLicense=yes" >> mcr_options.txt && \ - echo "outputFile=/tmp/matlabinstall_log" >> mcr_options.txt && \ - echo "mode=silent" >> mcr_options.txt && \ - mkdir -p matlab_installer && \ - curl -sSL http://www.mathworks.com/supportfiles/downloads/R2015a/deployment_files/R2015a/installers/glnxa64/MCR_R2015a_glnxa64_installer.zip \ - -o matlab_installer/installer.zip && \ - unzip matlab_installer/installer.zip -d matlab_installer/ && \ - matlab_installer/install -inputFile mcr_options.txt && \ - rm -rf matlab_installer mcr_options.txt - -# Install SPM -RUN curl -sSL http://www.fil.ion.ucl.ac.uk/spm/download/restricted/utopia/dev/spm12_r6472_Linux_R2015a.zip -o spm12.zip && \ - unzip spm12.zip && \ - rm -rf spm12.zip - -ENV MATLABCMD="/opt/mcr/v85/toolbox/matlab" \ - SPMMCRCMD="/opt/spm12/run_spm12.sh /opt/mcr/v85/ script" \ - FORCE_SPMMCR=1 - -WORKDIR /work diff --git a/docker/generate_dockerfiles.sh b/docker/generate_dockerfiles.sh new file mode 100755 index 0000000000..07e1aa3774 --- /dev/null +++ b/docker/generate_dockerfiles.sh @@ -0,0 +1,75 @@ + #!/usr/bin/env bash + +# kaczmarj/neurodocker:master pulled on September 13, 2017. +NEURODOCKER_IMAGE="kaczmarj/neurodocker:master" +# neurodebian/stretch-non-free:latest pulled on September 13, 2017. +BASE_IMAGE="neurodebian@sha256:b09c09faa34bca0ea096b9360ee5121e048594cb8e2d7744d7d546ade88a2996" +NIPYPE_BASE_IMAGE="kaczmarj/nipype:base" +PKG_MANAGER="apt" + +# Save Dockerfiles relative to this path so that this script can be run from +# any directory. https://stackoverflow.com/a/246128/5666087 +DIR="$(dirname "$0")" + + +function generate_base_dockerfile() { + docker run --rm "$NEURODOCKER_IMAGE" generate \ + --base "$BASE_IMAGE" --pkg-manager "$PKG_MANAGER" \ + --label maintainer="The nipype developers https://github.com/nipy/nipype" \ + --spm version=12 matlab_version=R2017a \ + --afni version=latest \ + --freesurfer version=6.0.0 min=true \ + --run 'echo "cHJpbnRmICJrcnp5c3p0b2YuZ29yZ29sZXdza2lAZ21haWwuY29tXG41MTcyXG4gKkN2dW12RVYzelRmZ1xuRlM1Si8yYzFhZ2c0RVxuIiA+IC9vcHQvZnJlZXN1cmZlci9saWNlbnNlLnR4dAo=" | base64 -d | sh' \ + --install ants apt-utils bzip2 file fsl-core fsl-mni152-templates \ + fusefat g++ git graphviz make ruby unzip xvfb \ + --add-to-entrypoint "source /etc/fsl/fsl.sh" \ + --env ANTSPATH='/usr/lib/ants' PATH='/usr/lib/ants:$PATH' \ + --c3d version=1.0.0 \ + --instruction "RUN gem install fakes3" \ + --workdir /work \ + --no-check-urls > "$DIR/Dockerfile.base" +} + + +# The Dockerfile ADD/COPY instructions do not honor the current user, so the +# owner of the directories has to be manually changed to user neuro. +# See https://github.com/moby/moby/issues/6119 for more information on this +# behavior. +# Docker plans on changing this behavior by added a `--chown` flag to the +# ADD/COPY commands. See https://github.com/moby/moby/pull/34263. + +function generate_main_dockerfile() { + docker run --rm "$NEURODOCKER_IMAGE" generate \ + --base "$NIPYPE_BASE_IMAGE" --pkg-manager "$PKG_MANAGER" \ + --label maintainer="The nipype developers https://github.com/nipy/nipype" \ + --env MKL_NUM_THREADS=1 OMP_NUM_THREADS=1 \ + --user neuro \ + --miniconda env_name=neuro \ + add_to_path=true \ + --copy docker/files/run_builddocs.sh docker/files/run_examples.sh \ + docker/files/run_pytests.sh nipype/external/fsl_imglob.py /usr/bin/ \ + --copy . /src/nipype \ + --user root \ + --run "chmod 777 -R /src/nipype" \ + --user neuro \ + --arg PYTHON_VERSION_MAJOR=3 PYTHON_VERSION_MINOR=6 BUILD_DATE VCS_REF VERSION \ + --miniconda env_name=neuro \ + conda_install='python=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} + icu=58.1 libxml2 libxslt matplotlib mkl numpy + pandas psutil scikit-learn scipy traits=4.6.0' \ + pip_opts="-e" \ + pip_install="/src/nipype[all]" \ + --label org.label-schema.build-date='$BUILD_DATE' \ + org.label-schema.name="NIPYPE" \ + org.label-schema.description="NIPYPE - Neuroimaging in Python: Pipelines and Interfaces" \ + org.label-schema.url="http://nipype.readthedocs.io" \ + org.label-schema.vcs-ref='$VCS_REF' \ + org.label-schema.vcs-url="https://github.com/nipy/nipype" \ + org.label-schema.version='$VERSION' \ + org.label-schema.schema-version="1.0" \ + --no-check-urls > "$DIR/../Dockerfile" +} + + +generate_base_dockerfile +generate_main_dockerfile From 2e1b2ce5107673be46fdfc273b8304d88fdd4697 Mon Sep 17 00:00:00 2001 From: oesteban Date: Mon, 2 Oct 2017 16:00:49 -0700 Subject: [PATCH 318/643] a more consistent resource_monitor checking --- nipype/interfaces/base.py | 4 +- .../interfaces/tests/test_resource_monitor.py | 7 ++- nipype/pipeline/engine/nodes.py | 3 +- nipype/pipeline/engine/utils.py | 4 ++ nipype/pipeline/engine/workflows.py | 2 +- nipype/utils/config.py | 45 +++++++++++++++++-- nipype/utils/profiler.py | 10 +---- 7 files changed, 58 insertions(+), 17 deletions(-) diff --git a/nipype/interfaces/base.py b/nipype/interfaces/base.py index 5d434fc56f..93ea49eeaa 100644 --- a/nipype/interfaces/base.py +++ b/nipype/interfaces/base.py @@ -1066,9 +1066,9 @@ def run(self, **inputs): results : an InterfaceResult object containing a copy of the instance that was executed, provenance information and, if successful, results """ - from ..utils.profiler import resource_monitor, ResourceMonitor + from ..utils.profiler import ResourceMonitor - enable_rm = resource_monitor and self.resource_monitor + enable_rm = config.resource_monitor and self.resource_monitor force_raise = not getattr(self.inputs, 'ignore_exception', False) self.inputs.trait_set(**inputs) self._check_mandatory_inputs() diff --git a/nipype/interfaces/tests/test_resource_monitor.py b/nipype/interfaces/tests/test_resource_monitor.py index 20677bb494..5ed456f4ba 100644 --- a/nipype/interfaces/tests/test_resource_monitor.py +++ b/nipype/interfaces/tests/test_resource_monitor.py @@ -11,10 +11,15 @@ import pytest # Import packages -from nipype.utils.profiler import resource_monitor as run_profile, _use_resources +from nipype import config +from nipype.utils.profiler import _use_resources from nipype.interfaces.base import traits, CommandLine, CommandLineInputSpec from nipype.interfaces import utility as niu +# Try to enable the resource monitor +config.enable_resource_monitor() +run_profile = config.resource_monitor + class UseResourcesInputSpec(CommandLineInputSpec): mem_gb = traits.Float(desc='Number of GB of RAM to use', diff --git a/nipype/pipeline/engine/nodes.py b/nipype/pipeline/engine/nodes.py index ab01312752..1657c33d6f 100644 --- a/nipype/pipeline/engine/nodes.py +++ b/nipype/pipeline/engine/nodes.py @@ -725,7 +725,6 @@ def update(self, **opts): self.inputs.update(**opts) def write_report(self, report_type=None, cwd=None): - from ...utils.profiler import resource_monitor if not str2bool(self.config['execution']['create_report']): return report_dir = op.join(cwd, '_report') @@ -763,7 +762,7 @@ def write_report(self, report_type=None, cwd=None): rst_dict = {'hostname': self.result.runtime.hostname, 'duration': self.result.runtime.duration} # Try and insert memory/threads usage if available - if resource_monitor: + if config.resource_monitor: rst_dict['mem_peak_gb'] = self.result.runtime.mem_peak_gb rst_dict['cpu_percent'] = self.result.runtime.cpu_percent diff --git a/nipype/pipeline/engine/utils.py b/nipype/pipeline/engine/utils.py index bb93bbe8fb..5d2291b6fa 100644 --- a/nipype/pipeline/engine/utils.py +++ b/nipype/pipeline/engine/utils.py @@ -1298,6 +1298,10 @@ def write_workflow_prov(graph, filename=None, format='all'): def write_workflow_resources(graph, filename=None): + """ + Generate a JSON file with profiling traces that can be loaded + in a pandas DataFrame or processed with JavaScript like D3.js + """ import simplejson as json if not filename: filename = os.path.join(os.getcwd(), 'resource_monitor.json') diff --git a/nipype/pipeline/engine/workflows.py b/nipype/pipeline/engine/workflows.py index 936881dd0f..35f1f7df3b 100644 --- a/nipype/pipeline/engine/workflows.py +++ b/nipype/pipeline/engine/workflows.py @@ -595,7 +595,7 @@ def run(self, plugin=None, plugin_args=None, updatehash=False): logger.info('Provenance file prefix: %s' % prov_base) write_workflow_prov(execgraph, prov_base, format='all') - if str2bool(self.config['execution'].get('resource_monitor', 'false')): + if config.resource_monitor: write_workflow_resources(execgraph) return execgraph diff --git a/nipype/utils/config.py b/nipype/utils/config.py index d18752c87f..2442f1eb01 100644 --- a/nipype/utils/config.py +++ b/nipype/utils/config.py @@ -18,11 +18,13 @@ import configparser import numpy as np -from builtins import str, object, open +from builtins import bytes, str, object, open from simplejson import load, dump -from ..external import portalocker from future import standard_library +from ..external import portalocker +from .misc import str2bool + standard_library.install_aliases() @@ -96,6 +98,7 @@ def __init__(self, *args, **kwargs): config_file = os.path.join(config_dir, 'nipype.cfg') self.data_file = os.path.join(config_dir, 'nipype.json') self._config.readfp(StringIO(default_cfg)) + self._resource_monitor = None if os.path.exists(config_dir): self._config.read([config_file, 'nipype.cfg']) @@ -202,5 +205,41 @@ def enable_provenance(self): self._config.set('execution', 'write_provenance', 'true') self._config.set('execution', 'hash_method', 'content') + @property + def resource_monitor(self): + """Check if resource_monitor is available""" + if self._resource_monitor is not None: + return self._resource_monitor + + # Cache config from nipype config + self.resource_monitor = self._config.get( + 'execution', 'resource_monitor') or False + return self._resource_monitor + + @resource_monitor.setter + def resource_monitor(self, value): + # Accept string true/false values + if isinstance(value, (str, bytes)): + value = str2bool(value.lower()) + + if value is False: + self._resource_monitor = False + elif value is True: + if not self._resource_monitor: + # Before setting self._resource_monitor check psutil availability + self._resource_monitor = False + try: + import psutil + self._resource_monitor = LooseVersion( + psutil.__version__) >= LooseVersion('5.0') + except ImportError: + pass + finally: + if not self._resource_monitor: + warn('Could not enable the resource monitor: psutil>=5.0' + ' could not be imported.') + self._config.set('execution', 'resource_monitor', + ('%s' % self._resource_monitor).lower()) + def enable_resource_monitor(self): - self._config.set('execution', 'resource_monitor', 'true') + self.resource_monitor = True diff --git a/nipype/utils/profiler.py b/nipype/utils/profiler.py index 6685d1eb0b..7dd1823d43 100644 --- a/nipype/utils/profiler.py +++ b/nipype/utils/profiler.py @@ -2,7 +2,7 @@ # @Author: oesteban # @Date: 2017-09-21 15:50:37 # @Last Modified by: oesteban -# @Last Modified time: 2017-09-29 16:42:27 +# @Last Modified time: 2017-10-02 15:44:29 """ Utilities to keep track of performance """ @@ -17,15 +17,9 @@ from builtins import open, range from .. import config, logging -from .misc import str2bool proflogger = logging.getLogger('utils') - -resource_monitor = str2bool(config.get('execution', 'resource_monitor', 'false')) -if resource_monitor and psutil is None: - proflogger.warning('Switching "resource_monitor" off: the option was on, but the ' - 'necessary package "psutil" could not be imported.') - resource_monitor = False +resource_monitor = config.resource_monitor # Init variables _MB = 1024.0**2 From 7bc9a2fd39d6f2c8e6fcbba4c94723e4f1316203 Mon Sep 17 00:00:00 2001 From: jakubk Date: Mon, 2 Oct 2017 19:06:31 -0400 Subject: [PATCH 319/643] enh: migrate to circleci 2.0 + check base dockerfile against cache The specification for CircleCI 2.0 is stored in `.circleci/config.yml` instead of in `circle.yml`. Todo: - Run tests. For now, images are built and pushed, but no tests are run. - Minimize containers with neurodocker reprozip. This functionality will be updated soon. See discussion in ViDA-NYU/reprozip#274. --- .circleci/config.yml | 149 ++++++++++++++++++++++++++++++++ {.circle => .circleci}/tests.sh | 0 circle.yml | 86 ------------------ 3 files changed, 149 insertions(+), 86 deletions(-) create mode 100644 .circleci/config.yml rename {.circle => .circleci}/tests.sh (100%) delete mode 100644 circle.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000000..d0c9099617 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,149 @@ +# Examples: +# https://github.com/circleci/frontend/blob/master/.circleci/config.yml +# +# Questions +# --------- +# 1. Regarding the cache: what if the base Dockerfile is reverted to a previous +# version? The cache for that Dockerfile will exist, so it will pull the +# image, which is incorrect. Include a note in generate_dockerfiles.sh to +# increase the version of the cache. + +version: 2 +jobs: + + compare_base_dockerfiles: + docker: + - image: docker:17.06.2-ce-git # shell is /bin/ash (bash not available) + steps: + - checkout: + path: /home/circleci/nipype + - run: + name: Prune base Dockerfile in preparation for cache check + command: | + mkdir -p /tmp/docker + + # Remove empty lines, comments, and the timestamp from the base + # Dockerfile. Use the sha256 sum of this pruned Dockerfile as the + # cache key. + sed -e '/\s*#.*$/d' \ + -e '/^\s*$/d' \ + -e '/generation_timestamp/d' \ + /home/circleci/nipype/docker/Dockerfile.base \ + > /tmp/docker/Dockerfile.base-pruned + - restore_cache: + key: dftest-v4-master-{{ checksum "/tmp/docker/Dockerfile.base-pruned" }} + - run: + name: Determine how to get base image + command: | + GET_BASE="/tmp/docker/get_base_image.sh" + + # This directory comes from the cache. + if [ -d /cache/base-dockerfile ]; then + echo 'echo Pulling base image ...' > "$GET_BASE" + echo 'docker pull kaczmarj/nipype:base' >> "$GET_BASE" + else + echo 'echo Building base image ...' > "$GET_BASE" + echo 'docker build -t kaczmarj/nipype:base - < /home/circleci/nipype/docker/Dockerfile.base' >> "$GET_BASE" + fi + - persist_to_workspace: + root: /tmp + paths: + - docker/* + + + build_and_test: + parallelism: 1 + # Ideally, we could test inside the main docker image. + machine: + # Ubuntu 14.04 with Docker 17.03.0-ce + image: circleci/classic:201703-01 + steps: + - checkout: + path: /home/circleci/nipype + - attach_workspace: + at: /tmp + - run: + name: Get base image (pull or build) + no_output_timeout: 60m + command: | + bash /tmp/docker/get_base_image.sh + - run: + name: Build main image (latest & py36) + no_output_timeout: 60m + command: | + cd /home/circleci/nipype + + docker build --rm=false \ + --tag kaczmarj/nipype:latest \ + --tag kaczmarj/nipype:py36 \ + --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \ + --build-arg VCS_REF=`git rev-parse --short HEAD` \ + --build-arg VERSION=$CIRCLE_TAG . + - run: + name: Build main image (py27) + no_output_timeout: 60m + command: | + cd /home/circleci/nipype + + docker build --rm=false \ + --tag kaczmarj/nipype:py27 \ + --build-arg PYTHON_VERSION_MAJOR=2 \ + --build-arg PYTHON_VERSION_MINOR=7 \ + --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \ + --build-arg VCS_REF=`git rev-parse --short HEAD` \ + --build-arg VERSION=$CIRCLE_TAG-py27 /home/circleci/nipype + - run: + name: Run tests + command: | + echo "This is node $CIRCLE_NODE_INDEX" + echo "No tests to run yet." + - run: + name: Save Docker images to workspace + no_output_timeout: 60m + command: | + if [ "$CIRCLE_NODE_INDEX" -eq "0" ]; then + echo "Saving Docker images to tar.gz files ..." + docker save kaczmarj/nipype:latest kaczmarj/nipype:py36 | gzip > /tmp/docker/nipype-latest-py36.tar.gz + fi + - persist_to_workspace: + root: /tmp + paths: + - docker/* + + + deploy: + docker: + - image: docker:17.06.2-ce-git + steps: + - checkout + - setup_remote_docker + - attach_workspace: + at: /tmp + - run: + name: Load saved Docker images. + no_output_timeout: 60m + command: | + docker load < /tmp/docker/nipype-latest-py36.tar.gz + - run: + name: Push to DockerHub + no_output_timeout: 60m + command: | + if [ "${CIRCLE_BRANCH}" == "enh/circleci-neurodocker" ]; then + docker login -u $DOCKER_USER -p $DOCKER_PASS + docker push kaczmarj/nipype:latest + docker push kaczmarj/nipype:py36 + fi +# TODO: write pruned Dockerfile to cache here. Make a shell script that will +# prune Dockerfiles + +workflows: + version: 2 + build_test_deply: + jobs: + - compare_base_dockerfiles + - build_and_test: + requires: + - compare_base_dockerfiles + - deploy: + requires: + - build_and_test diff --git a/.circle/tests.sh b/.circleci/tests.sh similarity index 100% rename from .circle/tests.sh rename to .circleci/tests.sh diff --git a/circle.yml b/circle.yml deleted file mode 100644 index 5624dbb7f8..0000000000 --- a/circle.yml +++ /dev/null @@ -1,86 +0,0 @@ -machine: - pre: - - curl -sSL https://s3.amazonaws.com/circle-downloads/install-circleci-docker.sh | bash -s -- 1.10.0 - environment: - OSF_NIPYPE_URL: "https://files.osf.io/v1/resources/nefdp/providers/osfstorage" - DATA_NIPYPE_TUTORIAL_URL: "${OSF_NIPYPE_URL}/57f4739cb83f6901ed94bf21" - DATA_NIPYPE_FSL_COURSE: "${OSF_NIPYPE_URL}/57f472cf9ad5a101f977ecfe" - DATA_NIPYPE_FSL_FEEDS: "${OSF_NIPYPE_URL}/57f473066c613b01f113e7af" - WORKDIR: "$HOME/work" - CODECOV_TOKEN: "ac172a50-8e66-42e5-8822-5373fcf54686" - services: - - docker - -dependencies: - cache_directories: - - "~/docker" - - "~/examples" - - "~/.apt-cache" - - pre: - # Let CircleCI cache the apt archive - - mkdir -p ~/.apt-cache/partial && sudo rm -rf /var/cache/apt/archives && sudo ln -s ~/.apt-cache /var/cache/apt/archives - - sudo apt-get -y update && sudo apt-get install -y wget bzip2 - # Create work folder and force group permissions - - mkdir -p $WORKDIR && sudo setfacl -d -m group:ubuntu:rwx $WORKDIR && sudo setfacl -m group:ubuntu:rwx $WORKDIR - - mkdir -p $HOME/docker $HOME/examples $WORKDIR/tests $WORKDIR/logs $WORKDIR/crashfiles ${CIRCLE_TEST_REPORTS}/tests/ - - if [[ ! -e "$HOME/bin/codecov" ]]; then mkdir -p $HOME/bin; curl -so $HOME/bin/codecov https://codecov.io/bash && chmod 755 $HOME/bin/codecov; fi - - (cd $HOME/docker && gzip -d cache.tar.gz && docker load --input $HOME/docker/cache.tar) || true : - timeout: 6000 - override: - # Get data - - if [[ ! -d ~/examples/nipype-tutorial ]]; then wget --retry-connrefused --waitretry=5 --read-timeout=20 --timeout=15 -t 0 -q -O nipype-tutorial.tar.bz2 "${DATA_NIPYPE_TUTORIAL_URL}" && tar xjf nipype-tutorial.tar.bz2 -C ~/examples/; fi - - if [[ ! -d ~/examples/nipype-fsl_course_data ]]; then wget --retry-connrefused --waitretry=5 --read-timeout=20 --timeout=15 -t 0 -q -O nipype-fsl_course_data.tar.gz "${DATA_NIPYPE_FSL_COURSE}" && tar xzf nipype-fsl_course_data.tar.gz -C ~/examples/; fi - - if [[ ! -d ~/examples/feeds ]]; then wget --retry-connrefused --waitretry=5 --read-timeout=20 --timeout=15 -t 0 -q -O fsl-5.0.9-feeds.tar.gz "${DATA_NIPYPE_FSL_FEEDS}" && tar xzf fsl-5.0.9-feeds.tar.gz -C ~/examples/; fi - - if [ "$CIRCLE_TAG" != "" ]; then sed -i -E "s/(__version__ = )'[A-Za-z0-9.-]+'/\1'$CIRCLE_TAG'/" nipype/info.py; fi - # Docker - - docker images - - ? | - e=1 && for i in {1..5}; do - docker build --rm=false -f docker/base.Dockerfile -t nipype/base:latest . && e=0 && break || sleep 15; - done && [ "$e" -eq "0" ] - : - timeout: 21600 - - ? | - e=1 && for i in {1..5}; do - docker build --rm=false -t nipype/nipype:latest -t nipype/nipype:py36 --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` --build-arg VCS_REF=`git rev-parse --short HEAD` --build-arg VERSION=$CIRCLE_TAG . && e=0 && break || sleep 15; - done && [ "$e" -eq "0" ] - : - timeout: 6000 - - ? | - e=1 && for i in {1..5}; do - docker build --rm=false -t nipype/nipype:py27 --build-arg PYTHON_VERSION_MAJOR=2 --build-arg PYTHON_VERSION_MINOR=7 --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` --build-arg VCS_REF=`git rev-parse --short HEAD` --build-arg VERSION=$CIRCLE_TAG-py27 . && e=0 && break || sleep 15; - done && [ "$e" -eq "0" ] - : - timeout: 6000 - - docker save -o $HOME/docker/cache.tar ubuntu:xenial-20161213 nipype/base:latest nipype/nipype:py36 && (cd $HOME/docker && gzip cache.tar) : - timeout: 6000 - -test: - override: - - bash .circle/tests.sh : - timeout: 7200 - parallel: true - -general: - artifacts: - - "~/work/docs" - - "~/work/logs" - - "~/work/tests" - - "~/work/crashfiles" - -deployment: - production: - tag: /.*/ - commands: - # Deploy to docker hub - - if [[ -n "$DOCKER_PASS" ]]; then docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS && docker push nipype/base:latest; fi : - timeout: 21600 - - if [[ -n "$DOCKER_PASS" ]]; then docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS && docker push nipype/nipype:latest; fi : - timeout: 21600 - - if [[ -n "$DOCKER_PASS" ]]; then docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS && docker tag nipype/nipype nipype/nipype:$CIRCLE_TAG && docker push nipype/nipype:$CIRCLE_TAG; fi : - timeout: 21600 - -# Automatic deployment to Pypi: -# - printf "[distutils]\nindex-servers =\n pypi\n\n[pypi]\nusername:$PYPI_USER\npassword:$PYPI_PASS\n" > ~/.pypirc -# - python setup.py sdist upload -r pypi From 345e97894464d3a07d22da0921d826de3f1a7f1b Mon Sep 17 00:00:00 2001 From: oesteban Date: Mon, 2 Oct 2017 16:37:51 -0700 Subject: [PATCH 320/643] do not hook _nthreads_update to inputs.num_threads changes for afni interfaces that do not have the input --- nipype/interfaces/afni/base.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nipype/interfaces/afni/base.py b/nipype/interfaces/afni/base.py index 50f7f8ac87..3405f96cfa 100644 --- a/nipype/interfaces/afni/base.py +++ b/nipype/interfaces/afni/base.py @@ -201,7 +201,9 @@ def set_default_output_type(cls, outputtype): def __init__(self, **inputs): super(AFNICommand, self).__init__(**inputs) self.inputs.on_trait_change(self._output_update, 'outputtype') - self.inputs.on_trait_change(self._nthreads_update, 'num_threads') + + if hasattr(self.inputs, 'num_threads'): + self.inputs.on_trait_change(self._nthreads_update, 'num_threads') if self._outputtype is None: self._outputtype = Info.outputtype() From 1d7afbcf9fd19f0d1475b25acf42f7adcd36ceb1 Mon Sep 17 00:00:00 2001 From: oesteban Date: Mon, 2 Oct 2017 16:38:26 -0700 Subject: [PATCH 321/643] quickly return to polling function when no resources are available --- nipype/pipeline/plugins/multiproc.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nipype/pipeline/plugins/multiproc.py b/nipype/pipeline/plugins/multiproc.py index 0be2db8045..3f92925984 100644 --- a/nipype/pipeline/plugins/multiproc.py +++ b/nipype/pipeline/plugins/multiproc.py @@ -204,6 +204,10 @@ def _send_procs_to_workers(self, updatehash=False, graph=None): len(self.pending_tasks), len(jobids), free_memory_gb, self.memory_gb, free_processors, self.processors) + if free_memory_gb < 0.01 or free_processors == 0: + logger.debug('No resources available') + return + if len(jobids) + len(self.pending_tasks) == 0: logger.debug('No tasks are being run, and no jobs can ' 'be submitted to the queue. Potential deadlock') From c42473adbcc926e4d99b4f579e2c013ab075d16a Mon Sep 17 00:00:00 2001 From: oesteban Date: Mon, 2 Oct 2017 17:43:12 -0700 Subject: [PATCH 322/643] remove logging from run_node which blocked mriqc, improve logging of both Nodes and MultiProc --- nipype/pipeline/engine/nodes.py | 13 +++++++------ nipype/pipeline/plugins/multiproc.py | 11 ++++------- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/nipype/pipeline/engine/nodes.py b/nipype/pipeline/engine/nodes.py index 1657c33d6f..b71e42737c 100644 --- a/nipype/pipeline/engine/nodes.py +++ b/nipype/pipeline/engine/nodes.py @@ -314,7 +314,7 @@ def run(self, updatehash=False): self._get_inputs() self._got_inputs = True outdir = self.output_dir() - logger.info("Executing node %s in dir: %s", self._id, outdir) + logger.info("Executing node %s in dir: %s", self.fullname, outdir) if op.exists(outdir): logger.debug('Output dir: %s', to_str(os.listdir(outdir))) hash_info = self.hash_exists(updatehash=updatehash) @@ -630,9 +630,10 @@ def _run_command(self, execute, copyfiles=True): runtime=runtime, inputs=self._interface.inputs.get_traitsfree()) self._result = result - logger.debug('Executing node') if copyfiles: self._copyfiles_to_wd(cwd, execute) + + message = 'Running a "%s" interface' if issubclass(self._interface.__class__, CommandLine): try: cmd = self._interface.cmdline @@ -640,10 +641,10 @@ def _run_command(self, execute, copyfiles=True): self._result.runtime.stderr = msg raise cmdfile = op.join(cwd, 'command.txt') - fd = open(cmdfile, 'wt') - fd.writelines(cmd + "\n") - fd.close() - logger.info('Running: %s' % cmd) + with open(cmdfile, 'wt') as fd: + print(cmd + "\n", file=fd) + message += ', a CommandLine Interface with command:\n%s' % cmd + logger.info(message + '.', self._interface.__class__.__name__) try: result = self._interface.run() except Exception as msg: diff --git a/nipype/pipeline/plugins/multiproc.py b/nipype/pipeline/plugins/multiproc.py index 3f92925984..ecbb8a4a70 100644 --- a/nipype/pipeline/plugins/multiproc.py +++ b/nipype/pipeline/plugins/multiproc.py @@ -17,7 +17,6 @@ import numpy as np from ... import logging -from ...utils.misc import str2bool from ...utils.profiler import get_system_total_memory_gb from ..engine import MapNode from .base import DistributedPluginBase @@ -44,10 +43,6 @@ def run_node(node, updatehash, taskid): dictionary containing the node runtime results and stats """ - from nipype import logging - logger = logging.getLogger('workflow') - - logger.debug('run_node called on %s', node.name) # Init variables result = dict(result=None, traceback=None, taskid=taskid) @@ -148,6 +143,9 @@ def _submit_job(self, node, updatehash=False): self._task_obj[self._taskid] = self.pool.apply_async( run_node, (node, updatehash, self._taskid), callback=self._async_callback) + + logger.debug('MultiProc submitted task %s (taskid=%d).', + node.fullname, self._taskid) return self._taskid def _prerun_check(self, graph): @@ -245,7 +243,7 @@ def _send_procs_to_workers(self, updatehash=False, graph=None): free_memory_gb -= next_job_gb free_processors -= next_job_th logger.debug('Allocating %s ID=%d (%0.2fGB, %d threads). Free: %0.2fGB, %d threads.', - self.procs[jobid]._id, jobid, next_job_gb, next_job_th, + self.procs[jobid].fullname, jobid, next_job_gb, next_job_th, free_memory_gb, free_processors) # change job status in appropriate queues @@ -274,7 +272,6 @@ def _send_procs_to_workers(self, updatehash=False, graph=None): # Task should be submitted to workers # Send job to task manager and add to pending tasks - logger.debug('MultiProc submitting job ID %d', jobid) if self._status_callback: self._status_callback(self.procs[jobid], 'start') tid = self._submit_job(deepcopy(self.procs[jobid]), From 94146e7f3144041f213dfa9e6782e0d729573924 Mon Sep 17 00:00:00 2001 From: oesteban Date: Tue, 3 Oct 2017 00:43:26 -0700 Subject: [PATCH 323/643] [ENH] Centralize virtual/physical $DISPLAYs This PR addresses several (related) problems: - Makes `$DISPLAY` and the config `display_variable` optional (close #2055) - Should fix #1403 since xvfb-run is not used anymore. - Relates to #1400: - Will reduce its impact because now Xvfb is called only once and only if it is absolutely necessary - May make it worse in some cases when Xvfb fails to create a listener (root needed?). This PR adds a `config.get_display()` which identifies what display should be used, and creates a virtual one if necessary. Also adds a few unit tests to the config object to make sure precedence is fulfilled. --- nipype/interfaces/base.py | 56 ++++--------------------------- nipype/utils/config.py | 52 ++++++++++++++++++++++++++-- nipype/utils/tests/test_config.py | 41 ++++++++++++++++++++++ 3 files changed, 98 insertions(+), 51 deletions(-) create mode 100644 nipype/utils/tests/test_config.py diff --git a/nipype/interfaces/base.py b/nipype/interfaces/base.py index 19cf9ccaa6..844f97d4d6 100644 --- a/nipype/interfaces/base.py +++ b/nipype/interfaces/base.py @@ -1010,32 +1010,6 @@ def _check_version_requirements(self, trait_object, raise_exception=True): version, max_ver)) return unavailable_traits - def _run_wrapper(self, runtime): - sysdisplay = os.getenv('DISPLAY') - if self._redirect_x: - try: - from xvfbwrapper import Xvfb - except ImportError: - iflogger.error('Xvfb wrapper could not be imported') - raise - - vdisp = Xvfb(nolisten='tcp') - vdisp.start() - try: - vdisp_num = vdisp.new_display - except AttributeError: # outdated version of xvfbwrapper - vdisp_num = vdisp.vdisplay_num - - iflogger.info('Redirecting X to :%d' % vdisp_num) - runtime.environ['DISPLAY'] = ':%d' % vdisp_num - - runtime = self._run_interface(runtime) - - if self._redirect_x: - vdisp.stop() - - return runtime - def _run_interface(self, runtime): """ Core function that executes interface """ @@ -1071,6 +1045,9 @@ def run(self, **inputs): # initialize provenance tracking env = deepcopy(dict(os.environ)) + if self._redirect_x: + env['DISPLAY'] = config.get_display() + runtime = Bunch(cwd=os.getcwd(), returncode=None, duration=None, @@ -1080,8 +1057,9 @@ def run(self, **inputs): platform=platform.platform(), hostname=platform.node(), version=self.version) + try: - runtime = self._run_wrapper(runtime) + runtime = self._run_interface(runtime) outputs = self.aggregate_outputs(runtime) runtime.endTime = dt.isoformat(dt.utcnow()) timediff = parseutc(runtime.endTime) - parseutc(runtime.startTime) @@ -1446,7 +1424,7 @@ def get_max_resources_used(pid, mem_mb, num_threads, pyfunc=False): return mem_mb, num_threads -def run_command(runtime, output=None, timeout=0.01, redirect_x=False): +def run_command(runtime, output=None, timeout=0.01): """Run a command, read stdout and stderr, prefix with timestamp. The returned runtime contains a merged stdout+stderr log with timestamps @@ -1458,13 +1436,6 @@ def run_command(runtime, output=None, timeout=0.01, redirect_x=False): # Init variables PIPE = subprocess.PIPE cmdline = runtime.cmdline - - if redirect_x: - exist_xvfb, _ = _exists_in_path('xvfb-run', runtime.environ) - if not exist_xvfb: - raise RuntimeError('Xvfb was not found, X redirection aborted') - cmdline = 'xvfb-run -a ' + cmdline - env = _canonicalize_env(runtime.environ) default_encoding = locale.getdefaultlocale()[1] @@ -1727,14 +1698,6 @@ def help(cls, returnhelp=False): print(allhelp) def _get_environ(self): - out_environ = {} - if not self._redirect_x: - try: - display_var = config.get('execution', 'display_variable') - out_environ = {'DISPLAY': display_var} - except NoOptionError: - pass - iflogger.debug(out_environ) if isdefined(self.inputs.environ): out_environ.update(self.inputs.environ) return out_environ @@ -1754,10 +1717,6 @@ def version_from_command(self, flag='-v'): o, e = proc.communicate() return o - def _run_wrapper(self, runtime): - runtime = self._run_interface(runtime) - return runtime - def _run_interface(self, runtime, correct_return_codes=(0,)): """Execute command via subprocess @@ -1785,8 +1744,7 @@ def _run_interface(self, runtime, correct_return_codes=(0,)): setattr(runtime, 'command_path', cmd_path) setattr(runtime, 'dependencies', get_dependencies(executable_name, runtime.environ)) - runtime = run_command(runtime, output=self.inputs.terminal_output, - redirect_x=self._redirect_x) + runtime = run_command(runtime, output=self.inputs.terminal_output) if runtime.returncode is None or \ runtime.returncode not in correct_return_codes: self.raise_exception(runtime) diff --git a/nipype/utils/config.py b/nipype/utils/config.py index ebea9e5816..5817940ab3 100644 --- a/nipype/utils/config.py +++ b/nipype/utils/config.py @@ -44,7 +44,6 @@ [execution] create_report = true crashdump_dir = %s -display_variable = :1 hash_method = timestamp job_finished_timeout = 5 keep_inputs = false @@ -82,7 +81,8 @@ def mkdir_p(path): class NipypeConfig(object): - """Base nipype config class + """ + Base nipype config class """ def __init__(self, *args, **kwargs): @@ -91,6 +91,7 @@ def __init__(self, *args, **kwargs): config_file = os.path.join(config_dir, 'nipype.cfg') self.data_file = os.path.join(config_dir, 'nipype.json') self._config.readfp(StringIO(default_cfg)) + self._display = None if os.path.exists(config_dir): self._config.read([config_file, 'nipype.cfg']) @@ -172,3 +173,50 @@ def update_matplotlib(self): def enable_provenance(self): self._config.set('execution', 'write_provenance', 'true') self._config.set('execution', 'hash_method', 'content') + + def get_display(self): + """Returns the first display available""" + + # Check if an Xorg server is listening + # import subprocess as sp + # if not hasattr(sp, 'DEVNULL'): + # setattr(sp, 'DEVNULL', os.devnull) + # x_listening = bool(sp.call('ps au | grep -v grep | grep -i xorg', + # shell=True, stdout=sp.DEVNULL)) + + if self._display is not None: + return ':%d' % self._display.vdisplay_num + + sysdisplay = None + if self._config.has_option('execution', 'display_variable'): + sysdisplay = self._config.get('execution', 'display_variable') + + sysdisplay = sysdisplay or os.getenv('DISPLAY') + if sysdisplay: + from collections import namedtuple + def _mock(): + pass + + # Store a fake Xvfb object + ndisp = int(sysdisplay.split(':')[-1]) + Xvfb = namedtuple('Xvfb', ['vdisplay_num', 'stop']) + self._display = Xvfb(ndisp, _mock) + return sysdisplay + + else: + try: + from xvfbwrapper import Xvfb + except ImportError: + raise RuntimeError( + 'A display server was required, but $DISPLAY is not defined ' + ' and Xvfb could not be imported.') + + self._display = Xvfb(nolisten='tcp') + self._display.start() + + # Older versions of Xvfb used vdisplay_num + if hasattr(self._display, 'new_display'): + setattr(self._display, 'vdisplay_num', + self._display.new_display) + + return ':%d' % self._display.vdisplay_num diff --git a/nipype/utils/tests/test_config.py b/nipype/utils/tests/test_config.py new file mode 100644 index 0000000000..9883721e29 --- /dev/null +++ b/nipype/utils/tests/test_config.py @@ -0,0 +1,41 @@ +# -*- coding: utf-8 -*- +# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- +# vi: set ft=python sts=4 ts=4 sw=4 et: +from __future__ import print_function, division, unicode_literals, absolute_import +import os +import pytest +from nipype import config + +@pytest.mark.parametrize('dispnum', range(5)) +def test_display_config(monkeypatch, dispnum): + """Check that the display_variable option is used""" + config._display = None + dispstr = ':%d' % dispnum + config.set('execution', 'display_variable', dispstr) + monkeypatch.delitem(os.environ, 'DISPLAY', raising=False) + assert config.get_display() == config.get('execution', 'display_variable') + +@pytest.mark.parametrize('dispnum', range(5)) +def test_display_system(monkeypatch, dispnum): + """Check that when only a $DISPLAY is defined, it is used""" + config._display = None + config._config.remove_option('execution', 'display_variable') + dispstr = ':%d' % dispnum + monkeypatch.setitem(os.environ, 'DISPLAY', dispstr) + assert config.get_display() == dispstr + +def test_display_config_and_system(monkeypatch): + """Check that when only both config and $DISPLAY are defined, the config takes precedence""" + config._display = None + dispstr = ':10' + config.set('execution', 'display_variable', dispstr) + monkeypatch.setitem(os.environ, 'DISPLAY', dispstr) + assert config.get_display() == dispstr + +def test_display_noconfig_nosystem(monkeypatch): + """Check that when no display is specified, a virtual Xvfb is used""" + config._display = None + if config.has_option('execution', 'display_variable'): + config._config.remove_option('execution', 'display_variable') + monkeypatch.delitem(os.environ, 'DISPLAY', raising=False) + assert int(config.get_display().split(':')[-1]) > 80 \ No newline at end of file From e8e18f039ce6ab7c7bd19c045e083bf02275c7c0 Mon Sep 17 00:00:00 2001 From: oesteban Date: Tue, 3 Oct 2017 01:03:58 -0700 Subject: [PATCH 324/643] update documentation --- doc/users/config_file.rst | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/doc/users/config_file.rst b/doc/users/config_file.rst index 7d55cc522d..d6d83ae762 100644 --- a/doc/users/config_file.rst +++ b/doc/users/config_file.rst @@ -69,12 +69,17 @@ Execution ``false``; default value: ``true``) *display_variable* - What ``DISPLAY`` variable should all command line interfaces be - run with. This is useful if you are using `xnest - `_ + What ``$DISPLAY`` environment variable should utilize those interfaces + that require an X server. These interfaces should have the attribute + ``_redirect_x = True``. This option is very useful when the system has + an X server listening in the default port 6000, but ``$DISPLAY`` is + not defined. In that case, set ``display_variable = :0``. Similarly, + it can be used to point X-based interfaces to other servers, like VNC, + `xnest `_ or `Xvfb `_ and you would like to redirect all spawned windows to - it. (possible values: any X server address; default value: not + it. If not set, nipype will try to configure a new virtual server using + Xvfb. (possible values: any X server address; default value: not set) *remove_unnecessary_outputs* From d181f4cc5c0bc2ddc1fa729860d63930878f8d16 Mon Sep 17 00:00:00 2001 From: salma1601 Date: Tue, 3 Oct 2017 17:19:42 +0200 Subject: [PATCH 325/643] allow float as weight --- nipype/interfaces/afni/preprocess.py | 7 ++++--- nipype/interfaces/afni/tests/test_auto_Allineate.py | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/nipype/interfaces/afni/preprocess.py b/nipype/interfaces/afni/preprocess.py index 97455ec69f..c890782614 100644 --- a/nipype/interfaces/afni/preprocess.py +++ b/nipype/interfaces/afni/preprocess.py @@ -353,12 +353,13 @@ class AllineateInputSpec(AFNICommandInputSpec): argstr='-nomask', desc='Don\'t compute the autoweight/mask; if -weight is not ' 'also used, then every voxel will be counted equally.') - weight_file = File( + weight = traits.Either( + File(exists=True), traits.Float(), argstr='-weight %s', - exists=True, desc='Set the weighting for each voxel in the base dataset; ' 'larger weights mean that voxel count more in the cost function. ' - 'Must be defined on the same grid as the base dataset') + 'If an image file is given, the volume must be defined on the ' + 'same grid as the base dataset') out_weight_file = traits.File( argstr='-wtprefix %s', desc='Write the weight volume to disk as a dataset', diff --git a/nipype/interfaces/afni/tests/test_auto_Allineate.py b/nipype/interfaces/afni/tests/test_auto_Allineate.py index d1a8ae2187..adc10179db 100644 --- a/nipype/interfaces/afni/tests/test_auto_Allineate.py +++ b/nipype/interfaces/afni/tests/test_auto_Allineate.py @@ -117,7 +117,7 @@ def test_Allineate_inputs(): ), warpfreeze=dict(argstr='-warpfreeze', ), - weight_file=dict(argstr='-weight %s', + weight=dict(argstr='-weight %s', ), zclip=dict(argstr='-zclip', ), From 486cef3823321678a98a0abe53e13ed134383a13 Mon Sep 17 00:00:00 2001 From: oesteban Date: Tue, 3 Oct 2017 08:33:40 -0700 Subject: [PATCH 326/643] fix failing tests --- nipype/interfaces/base.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nipype/interfaces/base.py b/nipype/interfaces/base.py index 844f97d4d6..7f7642261d 100644 --- a/nipype/interfaces/base.py +++ b/nipype/interfaces/base.py @@ -1699,8 +1699,9 @@ def help(cls, returnhelp=False): def _get_environ(self): if isdefined(self.inputs.environ): - out_environ.update(self.inputs.environ) - return out_environ + return self.inputs.environ + else: + return {} def version_from_command(self, flag='-v'): cmdname = self.cmd.split()[0] From eaf42e6d699ef2e5f73d74a9ed877f21e5308a0e Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Tue, 3 Oct 2017 12:08:06 -0400 Subject: [PATCH 327/643] FIX: Create out_reg_file correctly in RobustRegister --- nipype/interfaces/freesurfer/preprocess.py | 42 +++++++++------------- 1 file changed, 17 insertions(+), 25 deletions(-) diff --git a/nipype/interfaces/freesurfer/preprocess.py b/nipype/interfaces/freesurfer/preprocess.py index 13bd2d86bf..84e40dbeb3 100644 --- a/nipype/interfaces/freesurfer/preprocess.py +++ b/nipype/interfaces/freesurfer/preprocess.py @@ -1461,8 +1461,9 @@ class RobustRegisterInputSpec(FSTraitedSpec): desc='volume to be registered') target_file = File(mandatory=True, argstr='--dst %s', desc='target volume for the registration') - out_reg_file = File(genfile=True, argstr='--lta %s', - desc='registration file to write') + out_reg_file = traits.Either( + True, File, default=True, usedefault=True, argstr='--lta %s', + desc='registration file; either True or filename') registered_file = traits.Either(traits.Bool, File, argstr='--warp %s', desc='registered image; either True or filename') weights_file = traits.Either(traits.Bool, File, argstr='--weights %s', @@ -1551,24 +1552,20 @@ class RobustRegister(FSCommand): output_spec = RobustRegisterOutputSpec def _format_arg(self, name, spec, value): - for option in ["registered_file", "weights_file", "half_source", "half_targ", - "half_weights", "half_source_xfm", "half_targ_xfm"]: - if name == option: - if isinstance(value, bool): - fname = self._list_outputs()[name] - else: - fname = value - return spec.argstr % fname + options = ("out_reg_file", "registered_file", "weights_file", + "half_source", "half_targ", "half_weights", + "half_source_xfm", "half_targ_xfm") + if name in options and isinstance(value, bool): + value = self._list_outputs()[name] return super(RobustRegister, self)._format_arg(name, spec, value) def _list_outputs(self): outputs = self.output_spec().get() - outputs['out_reg_file'] = self.inputs.out_reg_file - if not isdefined(self.inputs.out_reg_file) and self.inputs.source_file: - outputs['out_reg_file'] = fname_presuffix(self.inputs.source_file, - suffix='_robustreg.lta', use_ext=False) - prefices = dict(src=self.inputs.source_file, trg=self.inputs.target_file) - suffices = dict(registered_file=("src", "_robustreg", True), + cwd = os.getcwd() + prefices = dict(src=self.inputs.source_file, + trg=self.inputs.target_file) + suffices = dict(out_reg_file=("src", "_robustreg.lta", False), + registered_file=("src", "_robustreg", True), weights_file=("src", "_robustweights", True), half_source=("src", "_halfway", True), half_targ=("trg", "_halfway", True), @@ -1577,21 +1574,16 @@ def _list_outputs(self): half_targ_xfm=("trg", "_robustxfm.lta", False)) for name, sufftup in list(suffices.items()): value = getattr(self.inputs, name) - if isdefined(value): - if isinstance(value, bool): + if value: + if value is True: outputs[name] = fname_presuffix(prefices[sufftup[0]], suffix=sufftup[1], - newpath=os.getcwd(), + newpath=cwd, use_ext=sufftup[2]) else: - outputs[name] = value + outputs[name] = os.path.abspath(value) return outputs - def _gen_filename(self, name): - if name == 'out_reg_file': - return self._list_outputs()[name] - return None - class FitMSParamsInputSpec(FSTraitedSpec): From 99c7ab64553a1b8d71571690b7830f683544a67a Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Tue, 3 Oct 2017 12:08:21 -0400 Subject: [PATCH 328/643] STY: Flake8 fix RobustRegister --- nipype/interfaces/freesurfer/preprocess.py | 115 +++++++++++++-------- 1 file changed, 70 insertions(+), 45 deletions(-) diff --git a/nipype/interfaces/freesurfer/preprocess.py b/nipype/interfaces/freesurfer/preprocess.py index 84e40dbeb3..e211293f30 100644 --- a/nipype/interfaces/freesurfer/preprocess.py +++ b/nipype/interfaces/freesurfer/preprocess.py @@ -1457,77 +1457,102 @@ def _gen_filename(self, name): class RobustRegisterInputSpec(FSTraitedSpec): - source_file = File(mandatory=True, argstr='--mov %s', + source_file = File(exists=True, mandatory=True, argstr='--mov %s', desc='volume to be registered') - target_file = File(mandatory=True, argstr='--dst %s', + target_file = File(exists=True, mandatory=True, argstr='--dst %s', desc='target volume for the registration') out_reg_file = traits.Either( True, File, default=True, usedefault=True, argstr='--lta %s', desc='registration file; either True or filename') - registered_file = traits.Either(traits.Bool, File, argstr='--warp %s', - desc='registered image; either True or filename') - weights_file = traits.Either(traits.Bool, File, argstr='--weights %s', - desc='weights image to write; either True or filename') - est_int_scale = traits.Bool(argstr='--iscale', - desc='estimate intensity scale (recommended for unnormalized images)') + registered_file = traits.Either( + traits.Bool, File, argstr='--warp %s', + desc='registered image; either True or filename') + weights_file = traits.Either( + traits.Bool, File, argstr='--weights %s', + desc='weights image to write; either True or filename') + est_int_scale = traits.Bool( + argstr='--iscale', + desc='estimate intensity scale (recommended for unnormalized images)') trans_only = traits.Bool(argstr='--transonly', desc='find 3 parameter translation only') in_xfm_file = File(exists=True, argstr='--transform', desc='use initial transform on source') - half_source = traits.Either(traits.Bool, File, argstr='--halfmov %s', - desc="write source volume mapped to halfway space") - half_targ = traits.Either(traits.Bool, File, argstr="--halfdst %s", - desc="write target volume mapped to halfway space") - half_weights = traits.Either(traits.Bool, File, argstr="--halfweights %s", - desc="write weights volume mapped to halfway space") - half_source_xfm = traits.Either(traits.Bool, File, argstr="--halfmovlta %s", - desc="write transform from source to halfway space") - half_targ_xfm = traits.Either(traits.Bool, File, argstr="--halfdstlta %s", - desc="write transform from target to halfway space") - auto_sens = traits.Bool(argstr='--satit', xor=['outlier_sens'], mandatory=True, - desc='auto-detect good sensitivity') - outlier_sens = traits.Float(argstr='--sat %.4f', xor=['auto_sens'], mandatory=True, - desc='set outlier sensitivity explicitly') - least_squares = traits.Bool(argstr='--leastsquares', - desc='use least squares instead of robust estimator') + half_source = traits.Either( + traits.Bool, File, argstr='--halfmov %s', + desc="write source volume mapped to halfway space") + half_targ = traits.Either( + traits.Bool, File, argstr="--halfdst %s", + desc="write target volume mapped to halfway space") + half_weights = traits.Either( + traits.Bool, File, argstr="--halfweights %s", + desc="write weights volume mapped to halfway space") + half_source_xfm = traits.Either( + traits.Bool, File, argstr="--halfmovlta %s", + desc="write transform from source to halfway space") + half_targ_xfm = traits.Either( + traits.Bool, File, argstr="--halfdstlta %s", + desc="write transform from target to halfway space") + auto_sens = traits.Bool( + argstr='--satit', xor=['outlier_sens'], mandatory=True, + desc='auto-detect good sensitivity') + outlier_sens = traits.Float( + argstr='--sat %.4f', xor=['auto_sens'], mandatory=True, + desc='set outlier sensitivity explicitly') + least_squares = traits.Bool( + argstr='--leastsquares', + desc='use least squares instead of robust estimator') no_init = traits.Bool(argstr='--noinit', desc='skip transform init') - init_orient = traits.Bool(argstr='--initorient', - desc='use moments for initial orient (recommended for stripped brains)') + init_orient = traits.Bool( + argstr='--initorient', + desc='use moments for initial orient (recommended for stripped brains)' + ) max_iterations = traits.Int(argstr='--maxit %d', desc='maximum # of times on each resolution') high_iterations = traits.Int(argstr='--highit %d', desc='max # of times on highest resolution') - iteration_thresh = traits.Float(argstr='--epsit %.3f', - desc='stop iterations when below threshold') - subsample_thresh = traits.Int(argstr='--subsample %d', - desc='subsample if dimension is above threshold size') + iteration_thresh = traits.Float( + argstr='--epsit %.3f', desc='stop iterations when below threshold') + subsample_thresh = traits.Int( + argstr='--subsample %d', + desc='subsample if dimension is above threshold size') outlier_limit = traits.Float(argstr='--wlimit %.3f', desc='set maximal outlier limit in satit') - write_vo2vox = traits.Bool(argstr='--vox2vox', - desc='output vox2vox matrix (default is RAS2RAS)') - no_multi = traits.Bool(argstr='--nomulti', desc='work on highest resolution') + write_vo2vox = traits.Bool( + argstr='--vox2vox', desc='output vox2vox matrix (default is RAS2RAS)') + no_multi = traits.Bool(argstr='--nomulti', + desc='work on highest resolution') mask_source = File(exists=True, argstr='--maskmov %s', desc='image to mask source volume with') mask_target = File(exists=True, argstr='--maskdst %s', desc='image to mask target volume with') - force_double = traits.Bool(argstr='--doubleprec', desc='use double-precision intensities') - force_float = traits.Bool(argstr='--floattype', desc='use float intensities') + force_double = traits.Bool(argstr='--doubleprec', + desc='use double-precision intensities') + force_float = traits.Bool(argstr='--floattype', + desc='use float intensities') class RobustRegisterOutputSpec(TraitedSpec): out_reg_file = File(exists=True, desc="output registration file") - registered_file = File(desc="output image with registration applied") - weights_file = File(desc="image of weights used") - half_source = File(desc="source image mapped to halfway space") - half_targ = File(desc="target image mapped to halfway space") - half_weights = File(desc="weights image mapped to halfway space") - half_source_xfm = File(desc="transform file to map source image to halfway space") - half_targ_xfm = File(desc="transform file to map target image to halfway space") + registered_file = File(exists=True, + desc="output image with registration applied") + weights_file = File(exists=True, desc="image of weights used") + half_source = File(exists=True, + desc="source image mapped to halfway space") + half_targ = File(exists=True, desc="target image mapped to halfway space") + half_weights = File(exists=True, + desc="weights image mapped to halfway space") + half_source_xfm = File( + exists=True, + desc="transform file to map source image to halfway space") + half_targ_xfm = File( + exists=True, + desc="transform file to map target image to halfway space") class RobustRegister(FSCommand): - """Perform intramodal linear registration (translation and rotation) using robust statistics. + """Perform intramodal linear registration (translation and rotation) using + robust statistics. Examples -------- @@ -1542,8 +1567,8 @@ class RobustRegister(FSCommand): References ---------- - Reuter, M, Rosas, HD, and Fischl, B, (2010). Highly Accurate Inverse Consistent Registration: - A Robust Approach. Neuroimage 53(4) 1181-96. + Reuter, M, Rosas, HD, and Fischl, B, (2010). Highly Accurate Inverse + Consistent Registration: A Robust Approach. Neuroimage 53(4) 1181-96. """ From 758251aa9dbc2c1115522c724ef472d58475ea76 Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Tue, 3 Oct 2017 12:11:12 -0400 Subject: [PATCH 329/643] make specs --- nipype/interfaces/freesurfer/tests/test_auto_RobustRegister.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nipype/interfaces/freesurfer/tests/test_auto_RobustRegister.py b/nipype/interfaces/freesurfer/tests/test_auto_RobustRegister.py index c8b7080c26..1918061a7e 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_RobustRegister.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_RobustRegister.py @@ -53,7 +53,7 @@ def test_RobustRegister_inputs(): no_multi=dict(argstr='--nomulti', ), out_reg_file=dict(argstr='--lta %s', - genfile=True, + usedefault=True, ), outlier_limit=dict(argstr='--wlimit %.3f', ), From 44b4880b042d109b35c61db918f46a8577eae5f5 Mon Sep 17 00:00:00 2001 From: oesteban Date: Tue, 3 Oct 2017 10:31:15 -0700 Subject: [PATCH 330/643] fix (and cover with test) the case --- nipype/utils/config.py | 6 ++++-- nipype/utils/tests/test_config.py | 10 +++++++++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/nipype/utils/config.py b/nipype/utils/config.py index 5817940ab3..97831190a6 100644 --- a/nipype/utils/config.py +++ b/nipype/utils/config.py @@ -202,14 +202,16 @@ def _mock(): Xvfb = namedtuple('Xvfb', ['vdisplay_num', 'stop']) self._display = Xvfb(ndisp, _mock) return sysdisplay - else: + # If $DISPLAY is empty, it confuses Xvfb so unset + if sysdisplay == '': + del os.environ['DISPLAY'] try: from xvfbwrapper import Xvfb except ImportError: raise RuntimeError( 'A display server was required, but $DISPLAY is not defined ' - ' and Xvfb could not be imported.') + 'and Xvfb could not be imported.') self._display = Xvfb(nolisten='tcp') self._display.start() diff --git a/nipype/utils/tests/test_config.py b/nipype/utils/tests/test_config.py index 9883721e29..017bf95af2 100644 --- a/nipype/utils/tests/test_config.py +++ b/nipype/utils/tests/test_config.py @@ -38,4 +38,12 @@ def test_display_noconfig_nosystem(monkeypatch): if config.has_option('execution', 'display_variable'): config._config.remove_option('execution', 'display_variable') monkeypatch.delitem(os.environ, 'DISPLAY', raising=False) - assert int(config.get_display().split(':')[-1]) > 80 \ No newline at end of file + assert int(config.get_display().split(':')[-1]) > 80 + +def test_display_empty(monkeypatch): + """Check that when no display is specified, a virtual Xvfb is used""" + config._display = None + if config.has_option('execution', 'display_variable'): + config._config.remove_option('execution', 'display_variable') + monkeypatch.setitem(os.environ, 'DISPLAY', '') + assert int(config.get_display().split(':')[-1]) > 80 From 8a16650764dddfbaef7cbe0f03fa796135d1fd90 Mon Sep 17 00:00:00 2001 From: oesteban Date: Tue, 3 Oct 2017 11:10:00 -0700 Subject: [PATCH 331/643] fix afni.SkullStrip with AFNI >= 16.2.07 --- nipype/interfaces/afni/preprocess.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nipype/interfaces/afni/preprocess.py b/nipype/interfaces/afni/preprocess.py index 97455ec69f..02413121f1 100644 --- a/nipype/interfaces/afni/preprocess.py +++ b/nipype/interfaces/afni/preprocess.py @@ -2146,11 +2146,12 @@ class SkullStrip(AFNICommand): def __init__(self, **inputs): super(SkullStrip, self).__init__(**inputs) + if not no_afni(): v = Info.version() - # As of AFNI 16.0.00, redirect_x is not needed - if v[0] > 2015: + # Between AFNI 16.0.00 and 16.2.07, redirect_x is not needed + if v >= (2016, 0, 0) and v < (2016, 2, 7): self._redirect_x = False From d2599e2f86df754bfa0fa41b8f6789e2408fb7bd Mon Sep 17 00:00:00 2001 From: oesteban Date: Tue, 3 Oct 2017 11:40:46 -0700 Subject: [PATCH 332/643] disable resource_monitor tests when running tests in Circle and Travis --- .circle/tests.sh | 4 ++-- .travis.yml | 8 ++++---- nipype/interfaces/tests/test_resource_monitor.py | 7 ++----- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/.circle/tests.sh b/.circle/tests.sh index d5b428ffea..0178ab91dd 100644 --- a/.circle/tests.sh +++ b/.circle/tests.sh @@ -17,8 +17,8 @@ fi # They may need to be rebalanced in the future. case ${CIRCLE_NODE_INDEX} in 0) - docker run --rm=false -it -e NIPYPE_RESOURCE_MONITOR=1 -e FSL_COURSE_DATA="/data/examples/nipype-fsl_course_data" -v $HOME/examples:/data/examples:ro -v $WORKDIR:/work -w /work nipype/nipype:py36 /usr/bin/run_pytests.sh && \ - docker run --rm=false -it -e NIPYPE_RESOURCE_MONITOR=1 -e FSL_COURSE_DATA="/data/examples/nipype-fsl_course_data" -v $HOME/examples:/data/examples:ro -v $WORKDIR:/work -w /work nipype/nipype:py27 /usr/bin/run_pytests.sh && \ + docker run --rm=false -it -e CI_SKIP_TEST=1 -e NIPYPE_RESOURCE_MONITOR=1 -e FSL_COURSE_DATA="/data/examples/nipype-fsl_course_data" -v $HOME/examples:/data/examples:ro -v $WORKDIR:/work -w /work nipype/nipype:py36 /usr/bin/run_pytests.sh && \ + docker run --rm=false -it -e CI_SKIP_TEST=1 -e NIPYPE_RESOURCE_MONITOR=1 -e FSL_COURSE_DATA="/data/examples/nipype-fsl_course_data" -v $HOME/examples:/data/examples:ro -v $WORKDIR:/work -w /work nipype/nipype:py27 /usr/bin/run_pytests.sh && \ docker run --rm=false -it -v $WORKDIR:/work -w /src/nipype/doc --entrypoint=/usr/bin/run_builddocs.sh nipype/nipype:py36 /usr/bin/run_builddocs.sh && \ docker run --rm=false -it -v $HOME/examples:/data/examples:ro -v $WORKDIR:/work -w /work nipype/nipype:py36 /usr/bin/run_examples.sh test_spm Linear /data/examples/ workflow3d && \ docker run --rm=false -it -v $HOME/examples:/data/examples:ro -v $WORKDIR:/work -w /work nipype/nipype:py36 /usr/bin/run_examples.sh test_spm Linear /data/examples/ workflow4d diff --git a/.travis.yml b/.travis.yml index be611996f6..a7630ca911 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,10 +8,10 @@ python: - 3.5 - 3.6 env: -- INSTALL_DEB_DEPENDECIES=true NIPYPE_EXTRAS="doc,tests,fmri,profiler" -- INSTALL_DEB_DEPENDECIES=false NIPYPE_EXTRAS="doc,tests,fmri,profiler" -- INSTALL_DEB_DEPENDECIES=true NIPYPE_EXTRAS="doc,tests,fmri,profiler,duecredit" -- INSTALL_DEB_DEPENDECIES=true NIPYPE_EXTRAS="doc,tests,fmri,profiler" PIP_FLAGS="--pre" +- INSTALL_DEB_DEPENDECIES=true NIPYPE_EXTRAS="doc,tests,fmri,profiler" CI_SKIP_TEST=1 +- INSTALL_DEB_DEPENDECIES=false NIPYPE_EXTRAS="doc,tests,fmri,profiler" CI_SKIP_TEST=1 +- INSTALL_DEB_DEPENDECIES=true NIPYPE_EXTRAS="doc,tests,fmri,profiler,duecredit" CI_SKIP_TEST=1 +- INSTALL_DEB_DEPENDECIES=true NIPYPE_EXTRAS="doc,tests,fmri,profiler" PIP_FLAGS="--pre" CI_SKIP_TEST=1 before_install: - function apt_inst { if $INSTALL_DEB_DEPENDECIES; then sudo rm -rf /dev/shm; fi && diff --git a/nipype/interfaces/tests/test_resource_monitor.py b/nipype/interfaces/tests/test_resource_monitor.py index 5ed456f4ba..660f11455e 100644 --- a/nipype/interfaces/tests/test_resource_monitor.py +++ b/nipype/interfaces/tests/test_resource_monitor.py @@ -45,9 +45,7 @@ class UseResources(CommandLine): _always_run = True -# Test resources were used as expected in cmdline interface -# @pytest.mark.skipif(True, reason='test disabled temporarily') -@pytest.mark.skipif(run_profile is False, reason='resources monitor is disabled') +@pytest.mark.skipif(os.getenv('CI_SKIP_TEST', False), reason='disabled in CI tests') @pytest.mark.parametrize("mem_gb,n_procs", [(0.5, 3), (2.2, 8), (0.8, 4), (1.5, 1)]) def test_cmdline_profiling(tmpdir, mem_gb, n_procs): """ @@ -65,8 +63,7 @@ def test_cmdline_profiling(tmpdir, mem_gb, n_procs): assert int(result.runtime.cpu_percent / 100 + 0.2) == n_procs, 'wrong number of threads estimated' -# @pytest.mark.skipif(True, reason='test disabled temporarily') -@pytest.mark.skipif(run_profile is False, reason='resources monitor is disabled') +@pytest.mark.skipif(True, reason='test disabled temporarily, until funcion profiling works') @pytest.mark.parametrize("mem_gb,n_procs", [(0.5, 3), (2.2, 8), (0.8, 4), (1.5, 1)]) def test_function_profiling(tmpdir, mem_gb, n_procs): """ From 678bb1a735a09ae944b75ef867c79f93d6d94320 Mon Sep 17 00:00:00 2001 From: oesteban Date: Tue, 3 Oct 2017 11:52:06 -0700 Subject: [PATCH 333/643] let the inner interface set _n_procs and _mem_gb --- nipype/pipeline/engine/nodes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nipype/pipeline/engine/nodes.py b/nipype/pipeline/engine/nodes.py index b71e42737c..680639ee8f 100644 --- a/nipype/pipeline/engine/nodes.py +++ b/nipype/pipeline/engine/nodes.py @@ -1147,8 +1147,8 @@ def _make_nodes(self, cwd=None): for i in range(nitems): nodename = '_' + self.name + str(i) node = Node(deepcopy(self._interface), - n_procs=self.n_procs, - mem_gb=self.mem_gb, + n_procs=self._n_procs, + mem_gb=self._mem_gb, overwrite=self.overwrite, needed_outputs=self.needed_outputs, run_without_submitting=self.run_without_submitting, From 0eb6ba0ae881a14df170e30abd6264bb0ecf1448 Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Tue, 3 Oct 2017 16:49:00 -0400 Subject: [PATCH 334/643] DOCTEST: Ellipsis --- nipype/interfaces/freesurfer/preprocess.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nipype/interfaces/freesurfer/preprocess.py b/nipype/interfaces/freesurfer/preprocess.py index e211293f30..658b397630 100644 --- a/nipype/interfaces/freesurfer/preprocess.py +++ b/nipype/interfaces/freesurfer/preprocess.py @@ -1562,8 +1562,8 @@ class RobustRegister(FSCommand): >>> reg.inputs.target_file = 'T1.nii' >>> reg.inputs.auto_sens = True >>> reg.inputs.init_orient = True - >>> reg.cmdline # doctest: +ALLOW_UNICODE - 'mri_robust_register --satit --initorient --lta structural_robustreg.lta --mov structural.nii --dst T1.nii' + >>> reg.cmdline # doctest: +ALLOW_UNICODE +ELLIPSIS + 'mri_robust_register --satit --initorient --lta .../structural_robustreg.lta --mov structural.nii --dst T1.nii' References ---------- From 0a718c13108da20318251ad5c7e5ba445d44306a Mon Sep 17 00:00:00 2001 From: oesteban Date: Tue, 3 Oct 2017 16:29:08 -0700 Subject: [PATCH 335/643] tests on new config --- nipype/utils/config.py | 8 ++-- nipype/utils/tests/test_config.py | 69 +++++++++++++++++++++++++++++-- 2 files changed, 69 insertions(+), 8 deletions(-) diff --git a/nipype/utils/config.py b/nipype/utils/config.py index 97831190a6..a0fae4353e 100644 --- a/nipype/utils/config.py +++ b/nipype/utils/config.py @@ -217,8 +217,8 @@ def _mock(): self._display.start() # Older versions of Xvfb used vdisplay_num - if hasattr(self._display, 'new_display'): - setattr(self._display, 'vdisplay_num', - self._display.new_display) + if hasattr(self._display, 'vdisplay_num'): + return ':%d' % self._display.vdisplay_num - return ':%d' % self._display.vdisplay_num + if hasattr(self._display, 'new_display'): + return ':%d' % self._display.new_display diff --git a/nipype/utils/tests/test_config.py b/nipype/utils/tests/test_config.py index 017bf95af2..86ad23a81d 100644 --- a/nipype/utils/tests/test_config.py +++ b/nipype/utils/tests/test_config.py @@ -3,8 +3,21 @@ # vi: set ft=python sts=4 ts=4 sw=4 et: from __future__ import print_function, division, unicode_literals, absolute_import import os +import sys import pytest from nipype import config +from mock import MagicMock +from builtins import object + +try: + import xvfbwrapper + has_Xvfb = True +except ImportError: + has_Xvfb = False + +xvfbpatch = MagicMock() +xvfbpatch.Xvfb.return_value = MagicMock(vdisplay_num=2010) + @pytest.mark.parametrize('dispnum', range(5)) def test_display_config(monkeypatch, dispnum): @@ -15,6 +28,7 @@ def test_display_config(monkeypatch, dispnum): monkeypatch.delitem(os.environ, 'DISPLAY', raising=False) assert config.get_display() == config.get('execution', 'display_variable') + @pytest.mark.parametrize('dispnum', range(5)) def test_display_system(monkeypatch, dispnum): """Check that when only a $DISPLAY is defined, it is used""" @@ -24,6 +38,7 @@ def test_display_system(monkeypatch, dispnum): monkeypatch.setitem(os.environ, 'DISPLAY', dispstr) assert config.get_display() == dispstr + def test_display_config_and_system(monkeypatch): """Check that when only both config and $DISPLAY are defined, the config takes precedence""" config._display = None @@ -32,18 +47,64 @@ def test_display_config_and_system(monkeypatch): monkeypatch.setitem(os.environ, 'DISPLAY', dispstr) assert config.get_display() == dispstr -def test_display_noconfig_nosystem(monkeypatch): + +def test_display_noconfig_nosystem_patched(monkeypatch): """Check that when no display is specified, a virtual Xvfb is used""" config._display = None if config.has_option('execution', 'display_variable'): config._config.remove_option('execution', 'display_variable') monkeypatch.delitem(os.environ, 'DISPLAY', raising=False) - assert int(config.get_display().split(':')[-1]) > 80 + monkeypatch.setitem(sys.modules, 'xvfbwrapper', xvfbpatch) + assert config.get_display() == ":2010" + + +def test_display_empty_patched(monkeypatch): + """Check that when no display is specified, a virtual Xvfb is used""" + config._display = None + if config.has_option('execution', 'display_variable'): + config._config.remove_option('execution', 'display_variable') + monkeypatch.setitem(os.environ, 'DISPLAY', '') + monkeypatch.setitem(sys.modules, 'xvfbwrapper', xvfbpatch) + assert config.get_display() == ':2010' + + +def test_display_noconfig_nosystem_notinstalled(monkeypatch): + """Check that when no display is specified, a virtual Xvfb is used""" + config._display = None + if config.has_option('execution', 'display_variable'): + config._config.remove_option('execution', 'display_variable') + monkeypatch.delitem(os.environ, 'DISPLAY', raising=False) + monkeypatch.setitem(sys.modules, 'xvfbwrapper', None) + with pytest.raises(RuntimeError): + config.get_display() + + +def test_display_empty_notinstalled(monkeypatch): + """Check that when no display is specified, a virtual Xvfb is used""" + config._display = None + if config.has_option('execution', 'display_variable'): + config._config.remove_option('execution', 'display_variable') + monkeypatch.setitem(os.environ, 'DISPLAY', '') + monkeypatch.setitem(sys.modules, 'xvfbwrapper', None) + with pytest.raises(RuntimeError): + config.get_display() + + +@pytest.mark.skipif(not has_Xvfb, reason='xvfbwrapper not installed') +def test_display_noconfig_nosystem_installed(monkeypatch): + """Check that when no display is specified, a virtual Xvfb is used""" + config._display = None + if config.has_option('execution', 'display_variable'): + config._config.remove_option('execution', 'display_variable') + monkeypatch.delitem(os.environ, 'DISPLAY', raising=False) + assert int(config.get_display().split(':')[-1]) > 1000 + -def test_display_empty(monkeypatch): +@pytest.mark.skipif(not has_Xvfb, reason='xvfbwrapper not installed') +def test_display_empty_installed(monkeypatch): """Check that when no display is specified, a virtual Xvfb is used""" config._display = None if config.has_option('execution', 'display_variable'): config._config.remove_option('execution', 'display_variable') monkeypatch.setitem(os.environ, 'DISPLAY', '') - assert int(config.get_display().split(':')[-1]) > 80 + assert int(config.get_display().split(':')[-1]) > 1000 From 2f83d08e29239d962e51491c97dc9cec5ff9e600 Mon Sep 17 00:00:00 2001 From: oesteban Date: Tue, 3 Oct 2017 16:38:36 -0700 Subject: [PATCH 336/643] hookup a callback to close the display (if virtual) when nipype exits --- nipype/utils/config.py | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/nipype/utils/config.py b/nipype/utils/config.py index a0fae4353e..700a50240a 100644 --- a/nipype/utils/config.py +++ b/nipype/utils/config.py @@ -11,21 +11,19 @@ ''' from __future__ import print_function, division, unicode_literals, absolute_import import os -import shutil import errno -from warnings import warn +import atexit from io import StringIO from distutils.version import LooseVersion from simplejson import load, dump import numpy as np from builtins import str, object, open -from future import standard_library -standard_library.install_aliases() - -import configparser from ..external import portalocker +import configparser +from future import standard_library +standard_library.install_aliases() NUMPY_MMAP = LooseVersion(np.__version__) >= LooseVersion('1.12.0') @@ -194,6 +192,7 @@ def get_display(self): sysdisplay = sysdisplay or os.getenv('DISPLAY') if sysdisplay: from collections import namedtuple + def _mock(): pass @@ -222,3 +221,16 @@ def _mock(): if hasattr(self._display, 'new_display'): return ':%d' % self._display.new_display + + def stop_display(self): + """Closes the display if started""" + if self._display is not None: + self._display.stop() + + +@atexit.register +def free_display(): + from nipype import config + from nipype import logging + config.stop_display() + logging.getLogger('interface').info('Closing display (if virtual)') From 7644acf555c687b4fe2761271a38718f816bb366 Mon Sep 17 00:00:00 2001 From: oesteban Date: Tue, 3 Oct 2017 19:09:34 -0700 Subject: [PATCH 337/643] fix tests test_Commandline_environ, test_CommandLine_output --- nipype/interfaces/tests/test_base.py | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/nipype/interfaces/tests/test_base.py b/nipype/interfaces/tests/test_base.py index 34d1134e42..f042173a6d 100644 --- a/nipype/interfaces/tests/test_base.py +++ b/nipype/interfaces/tests/test_base.py @@ -639,25 +639,43 @@ def _gen_filename(self, name): nib.CommandLine.input_spec = nib.CommandLineInputSpec -def test_Commandline_environ(): +def test_Commandline_environ(monkeypatch, tmpdir): from nipype import config config.set_default_config() + + tmpdir.chdir() + monkeypatch.setitem(os.environ, 'DISPLAY', ':1') + # Test environment ci3 = nib.CommandLine(command='echo') res = ci3.run() assert res.runtime.environ['DISPLAY'] == ':1' + + # Test display_variable option + monkeypatch.delitem(os.environ, 'DISPLAY', raising=False) config.set('execution', 'display_variable', ':3') res = ci3.run() assert not 'DISPLAY' in ci3.inputs.environ + assert not 'DISPLAY' in res.runtime.environ + + # If the interface has _redirect_x then yes, it should be set + ci3._redirect_x = True + res = ci3.run() assert res.runtime.environ['DISPLAY'] == ':3' + + # Test overwrite + monkeypatch.setitem(os.environ, 'DISPLAY', ':1') ci3.inputs.environ = {'DISPLAY': ':2'} res = ci3.run() assert res.runtime.environ['DISPLAY'] == ':2' -def test_CommandLine_output(setup_file): - tmp_infile = setup_file - tmpd, name = os.path.split(tmp_infile) - assert os.path.exists(tmp_infile) +def test_CommandLine_output(tmpdir): + # Create one file + tmpdir.chdir() + file = tmpdir.join('foo.txt') + file.write('123456\n') + name = os.path.basename(file.strpath) + ci = nib.CommandLine(command='ls -l') ci.inputs.terminal_output = 'allatonce' res = ci.run() From f634c0b541423dcb19e1c480f1ad31aa93a82342 Mon Sep 17 00:00:00 2001 From: oesteban Date: Tue, 3 Oct 2017 22:13:25 -0700 Subject: [PATCH 338/643] fix conflicts on config file --- nipype/utils/config.py | 116 ++++++++++++++++++++--------------------- 1 file changed, 56 insertions(+), 60 deletions(-) diff --git a/nipype/utils/config.py b/nipype/utils/config.py index 4ea4d611ed..39bdda4fef 100644 --- a/nipype/utils/config.py +++ b/nipype/utils/config.py @@ -13,25 +13,18 @@ import os import errno import atexit +from warnings import warn from io import StringIO from distutils.version import LooseVersion import configparser import numpy as np -<<<<<<< HEAD -from builtins import str, object, open -from ..external import portalocker -import configparser - -from future import standard_library -standard_library.install_aliases() -======= from builtins import bytes, str, object, open - from simplejson import load, dump from future import standard_library -from ..external import portalocker + from .misc import str2bool +from ..external import portalocker standard_library.install_aliases() @@ -40,7 +33,6 @@ 'profile_runtime': ('resource_monitor', '1.0'), 'filemanip_level': ('utils_level', '1.0'), } ->>>>>>> upstream/master NUMPY_MMAP = LooseVersion(np.__version__) >= LooseVersion('1.12.0') @@ -97,9 +89,7 @@ def mkdir_p(path): class NipypeConfig(object): - """ - Base nipype config class - """ + """Base nipype config class""" def __init__(self, *args, **kwargs): self._config = configparser.ConfigParser() @@ -107,11 +97,9 @@ def __init__(self, *args, **kwargs): config_file = os.path.join(config_dir, 'nipype.cfg') self.data_file = os.path.join(config_dir, 'nipype.json') self._config.readfp(StringIO(default_cfg)) -<<<<<<< HEAD self._display = None -======= self._resource_monitor = None ->>>>>>> upstream/master + if os.path.exists(config_dir): self._config.read([config_file, 'nipype.cfg']) @@ -127,8 +115,7 @@ def set_default_config(self): self._config.readfp(StringIO(default_cfg)) def enable_debug_mode(self): - """Enables debug configuration - """ + """Enables debug configuration""" self._config.set('execution', 'stop_on_first_crash', 'true') self._config.set('execution', 'remove_unnecessary_outputs', 'false') self._config.set('execution', 'keep_inputs', 'true') @@ -144,6 +131,7 @@ def set_log_dir(self, log_dir): self._config.set('logging', 'log_directory', log_dir) def get(self, section, option, default=None): + """Get an option""" if option in CONFIG_DEPRECATIONS: msg = ('Config option "%s" has been deprecated as of nipype %s. Please use ' '"%s" instead.') % (option, CONFIG_DEPRECATIONS[option][1], @@ -156,6 +144,7 @@ def get(self, section, option, default=None): return default def set(self, section, option, value): + """Set new value on option""" if isinstance(value, bool): value = str(value) @@ -169,9 +158,11 @@ def set(self, section, option, value): return self._config.set(section, option, value) def getboolean(self, section, option): + """Get a boolean option from section""" return self._config.getboolean(section, option) def has_option(self, section, option): + """Check if option exists in section""" return self._config.has_option(section, option) @property @@ -179,6 +170,7 @@ def _sections(self): return self._config._sections def get_data(self, key): + """Read options file""" if not os.path.exists(self.data_file): return None with open(self.data_file, 'rt') as file: @@ -189,6 +181,7 @@ def get_data(self, key): return None def save_data(self, key, value): + """Store config flie""" datadict = {} if os.path.exists(self.data_file): with open(self.data_file, 'rt') as file: @@ -204,6 +197,7 @@ def save_data(self, key, value): dump(datadict, file) def update_config(self, config_dict): + """Extend internal dictionary with config_dict""" for section in ['execution', 'logging', 'check']: if section in config_dict: for key, val in list(config_dict[section].items()): @@ -211,14 +205,55 @@ def update_config(self, config_dict): self._config.set(section, key, str(val)) def update_matplotlib(self): + """Set backend on matplotlib from options""" import matplotlib matplotlib.use(self.get('execution', 'matplotlib_backend')) def enable_provenance(self): + """Sets provenance storing on""" self._config.set('execution', 'write_provenance', 'true') self._config.set('execution', 'hash_method', 'content') -<<<<<<< HEAD + @property + def resource_monitor(self): + """Check if resource_monitor is available""" + if self._resource_monitor is not None: + return self._resource_monitor + + # Cache config from nipype config + self.resource_monitor = self._config.get( + 'execution', 'resource_monitor') or False + return self._resource_monitor + + @resource_monitor.setter + def resource_monitor(self, value): + # Accept string true/false values + if isinstance(value, (str, bytes)): + value = str2bool(value.lower()) + + if value is False: + self._resource_monitor = False + elif value is True: + if not self._resource_monitor: + # Before setting self._resource_monitor check psutil availability + self._resource_monitor = False + try: + import psutil + self._resource_monitor = LooseVersion( + psutil.__version__) >= LooseVersion('5.0') + except ImportError: + pass + finally: + if not self._resource_monitor: + warn('Could not enable the resource monitor: psutil>=5.0' + ' could not be imported.') + self._config.set('execution', 'resource_monitor', + ('%s' % self._resource_monitor).lower()) + + def enable_resource_monitor(self): + """Sets the resource monitor on""" + self.resource_monitor = True + def get_display(self): """Returns the first display available""" @@ -277,47 +312,8 @@ def stop_display(self): @atexit.register def free_display(): + """Stop virtual display (if it is up)""" from nipype import config from nipype import logging config.stop_display() logging.getLogger('interface').info('Closing display (if virtual)') -======= - @property - def resource_monitor(self): - """Check if resource_monitor is available""" - if self._resource_monitor is not None: - return self._resource_monitor - - # Cache config from nipype config - self.resource_monitor = self._config.get( - 'execution', 'resource_monitor') or False - return self._resource_monitor - - @resource_monitor.setter - def resource_monitor(self, value): - # Accept string true/false values - if isinstance(value, (str, bytes)): - value = str2bool(value.lower()) - - if value is False: - self._resource_monitor = False - elif value is True: - if not self._resource_monitor: - # Before setting self._resource_monitor check psutil availability - self._resource_monitor = False - try: - import psutil - self._resource_monitor = LooseVersion( - psutil.__version__) >= LooseVersion('5.0') - except ImportError: - pass - finally: - if not self._resource_monitor: - warn('Could not enable the resource monitor: psutil>=5.0' - ' could not be imported.') - self._config.set('execution', 'resource_monitor', - ('%s' % self._resource_monitor).lower()) - - def enable_resource_monitor(self): - self.resource_monitor = True ->>>>>>> upstream/master From 5151bf60b1aca0424362ba72b101b8f2c31082f8 Mon Sep 17 00:00:00 2001 From: oesteban Date: Tue, 3 Oct 2017 22:22:16 -0700 Subject: [PATCH 339/643] update CHANGES --- CHANGES | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES b/CHANGES index 2f2ad920af..885f7875e9 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,9 @@ Upcoming release ================ +* ENH: Centralize virtual/physical $DISPLAYs (https://github.com/nipy/nipype/pull/#2203) +* ENH: New ResourceMonitor - replaces resource profiler (https://github.com/nipy/nipype/pull/#2200) + 0.13.1 (May 20, 2017) ===================== From 9e3ee319a9de22a41a6aff312980a3f1b55a4d3f Mon Sep 17 00:00:00 2001 From: oesteban Date: Wed, 4 Oct 2017 01:03:33 -0700 Subject: [PATCH 340/643] [WIP] Revise terminal_output This PR revises the terminal_output feature, making it a class attribute and deprecating the old InputSpec trait. It also implements new ways of storing the output of a CommandLine, as discussed in #1407. Thus, closes #1407. --- examples/fmri_ants_openfmri.py | 8 +- examples/rsfmri_vol_surface_preprocessing.py | 4 +- .../rsfmri_vol_surface_preprocessing_nipy.py | 4 +- nipype/interfaces/afni/preprocess.py | 8 +- nipype/interfaces/base.py | 211 ++++++++++-------- nipype/interfaces/freesurfer/base.py | 10 +- nipype/interfaces/matlab.py | 4 +- nipype/interfaces/tests/test_base.py | 6 +- nipype/pipeline/plugins/multiproc.py | 6 +- .../data/smri_ants_registration_settings.json | 1 - 10 files changed, 137 insertions(+), 125 deletions(-) diff --git a/examples/fmri_ants_openfmri.py b/examples/fmri_ants_openfmri.py index 3cb772d78c..ee6ddee3f9 100755 --- a/examples/fmri_ants_openfmri.py +++ b/examples/fmri_ants_openfmri.py @@ -218,7 +218,7 @@ def create_reg_workflow(name='registration'): warpmean.inputs.input_image_type = 0 warpmean.inputs.interpolation = 'Linear' warpmean.inputs.invert_transform_flags = [False, False] - warpmean.inputs.terminal_output = 'file' + warpmean.terminal_output = 'file' register.connect(inputnode, 'target_image_brain', warpmean, 'reference_image') register.connect(inputnode, 'mean_image', warpmean, 'input_image') @@ -234,7 +234,7 @@ def create_reg_workflow(name='registration'): warpall.inputs.input_image_type = 0 warpall.inputs.interpolation = 'Linear' warpall.inputs.invert_transform_flags = [False, False] - warpall.inputs.terminal_output = 'file' + warpall.terminal_output = 'file' register.connect(inputnode, 'target_image_brain', warpall, 'reference_image') register.connect(inputnode, 'source_files', warpall, 'input_image') @@ -428,7 +428,7 @@ def create_fs_reg_workflow(name='registration'): warpmean.inputs.input_image_type = 0 warpmean.inputs.interpolation = 'Linear' warpmean.inputs.invert_transform_flags = [False, False] - warpmean.inputs.terminal_output = 'file' + warpmean.terminal_output = 'file' warpmean.inputs.args = '--float' # warpmean.inputs.num_threads = 4 # warpmean.plugin_args = {'sbatch_args': '--mem=4G -c 4'} @@ -443,7 +443,7 @@ def create_fs_reg_workflow(name='registration'): warpall.inputs.input_image_type = 0 warpall.inputs.interpolation = 'Linear' warpall.inputs.invert_transform_flags = [False, False] - warpall.inputs.terminal_output = 'file' + warpall.terminal_output = 'file' warpall.inputs.args = '--float' warpall.inputs.num_threads = 2 warpall.plugin_args = {'sbatch_args': '--mem=6G -c 2'} diff --git a/examples/rsfmri_vol_surface_preprocessing.py b/examples/rsfmri_vol_surface_preprocessing.py index 38c745fdfd..8d86f73fd7 100644 --- a/examples/rsfmri_vol_surface_preprocessing.py +++ b/examples/rsfmri_vol_surface_preprocessing.py @@ -547,7 +547,7 @@ def create_reg_workflow(name='registration'): warpmean.inputs.input_image_type = 3 warpmean.inputs.interpolation = 'Linear' warpmean.inputs.invert_transform_flags = [False, False] - warpmean.inputs.terminal_output = 'file' + warpmean.terminal_output = 'file' warpmean.inputs.args = '--float' warpmean.inputs.num_threads = 4 @@ -767,7 +767,7 @@ def merge_files(in1, in2): warpall.inputs.input_image_type = 3 warpall.inputs.interpolation = 'Linear' warpall.inputs.invert_transform_flags = [False, False] - warpall.inputs.terminal_output = 'file' + warpall.terminal_output = 'file' warpall.inputs.reference_image = target_file warpall.inputs.args = '--float' warpall.inputs.num_threads = 1 diff --git a/examples/rsfmri_vol_surface_preprocessing_nipy.py b/examples/rsfmri_vol_surface_preprocessing_nipy.py index 5f52aac4b2..51a5742284 100644 --- a/examples/rsfmri_vol_surface_preprocessing_nipy.py +++ b/examples/rsfmri_vol_surface_preprocessing_nipy.py @@ -482,7 +482,7 @@ def create_reg_workflow(name='registration'): warpmean.inputs.input_image_type = 3 warpmean.inputs.interpolation = 'Linear' warpmean.inputs.invert_transform_flags = [False, False] - warpmean.inputs.terminal_output = 'file' + warpmean.terminal_output = 'file' warpmean.inputs.args = '--float' warpmean.inputs.num_threads = 4 warpmean.plugin_args = {'sbatch_args': '-c%d' % 4} @@ -704,7 +704,7 @@ def merge_files(in1, in2): warpall.inputs.input_image_type = 3 warpall.inputs.interpolation = 'Linear' warpall.inputs.invert_transform_flags = [False, False] - warpall.inputs.terminal_output = 'file' + warpall.terminal_output = 'file' warpall.inputs.reference_image = target_file warpall.inputs.args = '--float' warpall.inputs.num_threads = 2 diff --git a/nipype/interfaces/afni/preprocess.py b/nipype/interfaces/afni/preprocess.py index 97455ec69f..0fd53176cb 100644 --- a/nipype/interfaces/afni/preprocess.py +++ b/nipype/interfaces/afni/preprocess.py @@ -1872,13 +1872,10 @@ class ROIStatsInputSpec(CommandLineInputSpec): desc='execute quietly', argstr='-quiet', position=1) - terminal_output = traits.Enum( - 'allatonce', + terminal_output = traits.Enum('allatonce', deprecated='1.0.0', desc='Control terminal output:`allatonce` - waits till command is ' 'finished to display output', - nohash=True, - mandatory=True, - usedefault=True) + nohash=True) class ROIStatsOutputSpec(TraitedSpec): @@ -1907,6 +1904,7 @@ class ROIStats(AFNICommandBase): """ _cmd = '3dROIstats' + _terminal_output = 'allatonce' input_spec = ROIStatsInputSpec output_spec = ROIStatsOutputSpec diff --git a/nipype/interfaces/base.py b/nipype/interfaces/base.py index 93ea49eeaa..4c8408ff10 100644 --- a/nipype/interfaces/base.py +++ b/nipype/interfaces/base.py @@ -50,6 +50,8 @@ FLOAT_FORMAT = '{:.10f}'.format PY35 = sys.version_info >= (3, 5) PY3 = sys.version_info[0] > 2 +VALID_TERMINAL_OUTPUT = ['stream', 'allatonce', 'file', 'file_split', + 'file_stdout', 'file_stderr', 'discard'] __docformat__ = 'restructuredtext' @@ -1333,28 +1335,39 @@ def run_command(runtime, output=None, timeout=0.01, redirect_x=False): default_encoding = locale.getdefaultlocale()[1] if default_encoding is None: default_encoding = 'UTF-8' + + errfile = None + outfile = None + stdout = sp.PIPE + stderr = sp.PIPE + if output == 'file': + outfile = os.path.join(runtime.cwd, 'output.nipype') + stdout = open(outfile, 'wb') # t=='text'===default + stderr = sp.STDOUT + elif output == 'file_split': + outfile = os.path.join(runtime.cwd, 'stdout.nipype') + stdout = open(outfile, 'wb') errfile = os.path.join(runtime.cwd, 'stderr.nipype') + stderr = open(errfile, 'wb') + elif output == 'file_stdout': outfile = os.path.join(runtime.cwd, 'stdout.nipype') - stderr = open(errfile, 'wb') # t=='text'===default stdout = open(outfile, 'wb') - - proc = sp.Popen(cmdline, - stdout=stdout, - stderr=stderr, - shell=True, - cwd=runtime.cwd, - env=env) - else: - proc = sp.Popen(cmdline, - stdout=sp.PIPE, - stderr=sp.PIPE, - shell=True, - cwd=runtime.cwd, - env=env) - result = {} - errfile = os.path.join(runtime.cwd, 'stderr.nipype') - outfile = os.path.join(runtime.cwd, 'stdout.nipype') + elif output == 'file_stderr': + errfile = os.path.join(runtime.cwd, 'stderr.nipype') + stderr = open(errfile, 'wb') + + proc = sp.Popen(cmdline, + stdout=stdout, + stderr=stderr, + shell=True, + cwd=runtime.cwd, + env=env) + result = { + 'stdout': [], + 'stderr': [], + 'merged': [], + } if output == 'stream': streams = [Stream('stdout', proc.stdout), Stream('stderr', proc.stderr)] @@ -1363,7 +1376,7 @@ def _process(drain=0): try: res = select.select(streams, [], [], timeout) except select.error as e: - iflogger.info(str(e)) + iflogger.info(e) if e[0] == errno.EINTR: return else: @@ -1390,29 +1403,29 @@ def _process(drain=0): if output == 'allatonce': stdout, stderr = proc.communicate() - stdout = stdout.decode(default_encoding) - stderr = stderr.decode(default_encoding) - result['stdout'] = stdout.split('\n') - result['stderr'] = stderr.split('\n') - result['merged'] = '' - if output == 'file': + result['stdout'] = stdout.decode(default_encoding).split('\n') + result['stderr'] = stderr.decode(default_encoding).split('\n') + + elif output.startswith('file'): proc.wait() - stderr.flush() - stdout.flush() - result['stdout'] = [line.decode(default_encoding).strip() - for line in open(outfile, 'rb').readlines()] - result['stderr'] = [line.decode(default_encoding).strip() - for line in open(errfile, 'rb').readlines()] - result['merged'] = '' - if output == 'none': - proc.communicate() - result['stdout'] = [] - result['stderr'] = [] - result['merged'] = '' + if outfile is not None: + stdout.flush() + result['stdout'] = [line.decode(default_encoding).strip() + for line in open(outfile, 'rb').readlines()] + if errfile is not None: + stderr.flush() + result['stderr'] = [line.decode(default_encoding).strip() + for line in open(errfile, 'rb').readlines()] + + if output == 'file': + result['merged'] = result['stdout'] + result['stdout'] = [] + else: + proc.communicate() # Discard stdout and stderr runtime.stderr = '\n'.join(result['stderr']) runtime.stdout = '\n'.join(result['stdout']) - runtime.merged = result['merged'] + runtime.merged = '\n'.join(result['merged']) runtime.returncode = proc.returncode return runtime @@ -1448,6 +1461,7 @@ class CommandLineInputSpec(BaseInterfaceInputSpec): # This input does not have a "usedefault=True" so the set_default_terminal_output() # method would work terminal_output = traits.Enum('stream', 'allatonce', 'file', 'none', + deprecated='1.0.0', desc=('Control terminal output: `stream` - ' 'displays to terminal immediately (default), ' '`allatonce` - waits till command is ' @@ -1484,7 +1498,7 @@ class must be instantiated with a command argument {'args': '-al', 'environ': {'DISPLAY': ':1'}, 'ignore_exception': False, - 'terminal_output': 'stream'} + 'terminal_output': } >>> cli.inputs.get_hashval()[0][0] # doctest: +ALLOW_UNICODE ('args', '-al') @@ -1497,25 +1511,6 @@ class must be instantiated with a command argument _version = None _terminal_output = 'stream' - def __init__(self, command=None, **inputs): - super(CommandLine, self).__init__(**inputs) - self._environ = None - if not hasattr(self, '_cmd'): - self._cmd = None - if self.cmd is None and command is None: - raise Exception("Missing command") - if command: - self._cmd = command - self.inputs.on_trait_change(self._terminal_output_update, - 'terminal_output') - if not isdefined(self.inputs.terminal_output): - self.inputs.terminal_output = self._terminal_output - else: - self._terminal_output_update() - - def _terminal_output_update(self): - self._terminal_output = self.inputs.terminal_output - @classmethod def set_default_terminal_output(cls, output_type): """Set the default terminal output for CommandLine Interfaces. @@ -1523,15 +1518,39 @@ def set_default_terminal_output(cls, output_type): This method is used to set default terminal output for CommandLine Interfaces. However, setting this will not update the output type for any existing instances. For these, - assign the .inputs.terminal_output. + assign the .terminal_output. """ - if output_type in ['stream', 'allatonce', 'file', 'none']: + if output_type in VALID_TERMINAL_OUTPUT: cls._terminal_output = output_type else: raise AttributeError('Invalid terminal output_type: %s' % output_type) + @classmethod + def help(cls, returnhelp=False): + allhelp = 'Wraps command **{cmd}**\n\n{help}'.format( + cmd=cls._cmd, help=super(CommandLine, cls).help(returnhelp=True)) + if returnhelp: + return allhelp + print(allhelp) + + def __init__(self, command=None, terminal_output=None, **inputs): + super(CommandLine, self).__init__(**inputs) + self._environ = None + # Set command. Input argument takes precedence + self._cmd = command or getattr(self, '_cmd', None) + + if self._cmd is None: + raise Exception("Missing command") + + if terminal_output is not None: + self.terminal_output = terminal_output + + # Attach terminal_output callback for backwards compatibility + self.inputs.on_trait_change(self._terminal_output_update, + 'terminal_output') + @property def cmd(self): """sets base command, immutable""" @@ -1542,27 +1561,30 @@ def cmdline(self): """ `command` plus any arguments (args) validates arguments and generates command line""" self._check_mandatory_inputs() - allargs = self._parse_inputs() - allargs.insert(0, self.cmd) + allargs = [self.cmd] + self._parse_inputs() return ' '.join(allargs) + @property + def terminal_output(self): + return self._terminal_output + + @terminal_output.setter + def terminal_output(self, value): + if value not in VALID_TERMINAL_OUTPUT: + raise RuntimeError( + 'Setting invalid value "%s" for terminal_output. Valid values are ' + '%s.' % (value, ', '.join(['"%s"' % v for v in VALID_TERMINAL_OUTPUT]))) + self._terminal_output = value + + def _terminal_output_update(self): + self.terminal_output = self.terminal_output + def raise_exception(self, runtime): raise RuntimeError( ('Command:\n{cmdline}\nStandard output:\n{stdout}\n' 'Standard error:\n{stderr}\nReturn code: {returncode}').format( **runtime.dictcopy())) - @classmethod - def help(cls, returnhelp=False): - allhelp = super(CommandLine, cls).help(returnhelp=True) - - allhelp = "Wraps command **%s**\n\n" % cls._cmd + allhelp - - if returnhelp: - return allhelp - else: - print(allhelp) - def _get_environ(self): out_environ = {} if not self._redirect_x: @@ -1608,21 +1630,25 @@ def _run_interface(self, runtime, correct_return_codes=(0,)): adds stdout, stderr, merged, cmdline, dependencies, command_path """ - setattr(runtime, 'stdout', None) - setattr(runtime, 'stderr', None) - setattr(runtime, 'cmdline', self.cmdline) + out_environ = self._get_environ() + # Initialize runtime Bunch + runtime.stdout = None + runtime.stderr = None + runtime.cmdline = self.cmdline runtime.environ.update(out_environ) + + # which $cmd executable_name = self.cmd.split()[0] exist_val, cmd_path = _exists_in_path(executable_name, runtime.environ) if not exist_val: raise IOError("command '%s' could not be found on host %s" % (self.cmd.split()[0], runtime.hostname)) - setattr(runtime, 'command_path', cmd_path) - setattr(runtime, 'dependencies', get_dependencies(executable_name, - runtime.environ)) - runtime = run_command(runtime, output=self.inputs.terminal_output, + + runtime.command_path = cmd_path + runtime.dependencies = get_dependencies(executable_name, runtime.environ) + runtime = run_command(runtime, output=self.terminal_output, redirect_x=self._redirect_x) if runtime.returncode is None or \ runtime.returncode not in correct_return_codes: @@ -1636,14 +1662,10 @@ def _format_arg(self, name, trait_spec, value): Formats a trait containing argstr metadata """ argstr = trait_spec.argstr - iflogger.debug('%s_%s' % (name, str(value))) + iflogger.debug('%s_%s', name, value) if trait_spec.is_trait_type(traits.Bool) and "%" not in argstr: - if value: - # Boolean options have no format string. Just append options - # if True. - return argstr - else: - return None + # Boolean options have no format string. Just append options if True. + return argstr if value else None # traits.Either turns into traits.TraitCompound and does not have any # inner_traits elif trait_spec.is_trait_type(traits.List) \ @@ -1658,11 +1680,9 @@ def _format_arg(self, name, trait_spec, value): # Depending on whether we stick with traitlets, and whether or # not we beef up traitlets.List, we may want to put some # type-checking code here as well - sep = trait_spec.sep - if sep is None: - sep = ' ' - if argstr.endswith('...'): + sep = trait_spec.sep or ' ' + if argstr.endswith('...'): # repeatable option # --id %d... will expand to # --id 1 --id 2 --id 3 etc.,. @@ -1694,7 +1714,7 @@ def _filename_from_source(self, name, chain=None): ns = trait_spec.name_source while isinstance(ns, (list, tuple)): if len(ns) > 1: - iflogger.warn('Only one name_source per trait is allowed') + iflogger.warning('Only one name_source per trait is allowed') ns = ns[0] if not isinstance(ns, (str, bytes)): @@ -1803,10 +1823,7 @@ class StdOutCommandLine(CommandLine): input_spec = StdOutCommandLineInputSpec def _gen_filename(self, name): - if name == 'out_file': - return self._gen_outfilename() - else: - return None + return self._gen_outfilename() if name == 'out_file' else None def _gen_outfilename(self): raise NotImplementedError @@ -1919,7 +1936,7 @@ def validate(self, object, name, value): newvalue = [value] value = super(MultiPath, self).validate(object, name, newvalue) - if len(value) > 0: + if value: return value self.error(object, name, value) diff --git a/nipype/interfaces/freesurfer/base.py b/nipype/interfaces/freesurfer/base.py index c3107b299c..4d87cdf9e7 100644 --- a/nipype/interfaces/freesurfer/base.py +++ b/nipype/interfaces/freesurfer/base.py @@ -232,23 +232,19 @@ def _associated_file(in_file, out_name): class FSScriptCommand(FSCommand): - """ Support for Freesurfer script commands with log inputs.terminal_output + """ Support for Freesurfer script commands with log terminal_output """ _terminal_output = 'file' _always_run = False - def __init__(self, **inputs): - super(FSScriptCommand, self).__init__(**inputs) - self.set_default_terminal_output(self._terminal_output) - def _list_outputs(self): outputs = self._outputs().get() - outputs['log_file'] = os.path.abspath('stdout.nipype') + outputs['log_file'] = os.path.abspath('output.nipype') return outputs class FSScriptOutputSpec(TraitedSpec): - log_file = File('stdout.nipype', usedefault=True, + log_file = File('output.nipype', usedefault=True, exists=True, desc="The output log") diff --git a/nipype/interfaces/matlab.py b/nipype/interfaces/matlab.py index b56ef3ce17..0d8aa29e16 100644 --- a/nipype/interfaces/matlab.py +++ b/nipype/interfaces/matlab.py @@ -105,7 +105,7 @@ def __init__(self, matlab_cmd=None, **inputs): self.inputs.single_comp_thread = True # For matlab commands force all output to be returned since matlab # does not have a clean way of notifying an error - self.inputs.terminal_output = 'allatonce' + self.terminal_output = 'allatonce' @classmethod def set_default_matlab_cmd(cls, matlab_cmd): @@ -141,7 +141,7 @@ def set_default_paths(cls, paths): cls._default_paths = paths def _run_interface(self, runtime): - self.inputs.terminal_output = 'allatonce' + self.terminal_output = 'allatonce' runtime = super(MatlabCommand, self)._run_interface(runtime) try: # Matlab can leave the terminal in a barbbled state diff --git a/nipype/interfaces/tests/test_base.py b/nipype/interfaces/tests/test_base.py index 34d1134e42..0a6e150c79 100644 --- a/nipype/interfaces/tests/test_base.py +++ b/nipype/interfaces/tests/test_base.py @@ -659,17 +659,17 @@ def test_CommandLine_output(setup_file): tmpd, name = os.path.split(tmp_infile) assert os.path.exists(tmp_infile) ci = nib.CommandLine(command='ls -l') - ci.inputs.terminal_output = 'allatonce' + ci.terminal_output = 'allatonce' res = ci.run() assert res.runtime.merged == '' assert name in res.runtime.stdout ci = nib.CommandLine(command='ls -l') - ci.inputs.terminal_output = 'file' + ci.terminal_output = 'file' res = ci.run() assert 'stdout.nipype' in res.runtime.stdout assert isinstance(res.runtime.stdout, (str, bytes)) ci = nib.CommandLine(command='ls -l') - ci.inputs.terminal_output = 'none' + ci.terminal_output = 'none' res = ci.run() assert res.runtime.stdout == '' ci = nib.CommandLine(command='ls -l') diff --git a/nipype/pipeline/plugins/multiproc.py b/nipype/pipeline/plugins/multiproc.py index ecbb8a4a70..3d82da0f11 100644 --- a/nipype/pipeline/plugins/multiproc.py +++ b/nipype/pipeline/plugins/multiproc.py @@ -137,8 +137,10 @@ def _clear_task(self, taskid): def _submit_job(self, node, updatehash=False): self._taskid += 1 - if getattr(node.inputs, 'terminal_output', '') == 'stream': - node.inputs.terminal_output = 'allatonce' + + # Don't allow streaming outputs + if node.terminal_output == 'stream': + node.terminal_output = 'allatonce' self._task_obj[self._taskid] = self.pool.apply_async( run_node, (node, updatehash, self._taskid), diff --git a/nipype/testing/data/smri_ants_registration_settings.json b/nipype/testing/data/smri_ants_registration_settings.json index 455a9c6ef1..54f27908e4 100644 --- a/nipype/testing/data/smri_ants_registration_settings.json +++ b/nipype/testing/data/smri_ants_registration_settings.json @@ -84,7 +84,6 @@ true, true ], - "terminal_output": "stream", "write_composite_transform": true, "initialize_transforms_per_stage": false, "num_threads": 1, From 40b66be8150553ef280af70b5b3b5ea2c39cfc9b Mon Sep 17 00:00:00 2001 From: salma1601 Date: Wed, 4 Oct 2017 15:56:35 +0200 Subject: [PATCH 341/643] use deprecated for weight_file --- nipype/interfaces/afni/preprocess.py | 7 +++++++ nipype/interfaces/afni/tests/test_auto_Allineate.py | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/nipype/interfaces/afni/preprocess.py b/nipype/interfaces/afni/preprocess.py index c890782614..fe8a963777 100644 --- a/nipype/interfaces/afni/preprocess.py +++ b/nipype/interfaces/afni/preprocess.py @@ -353,6 +353,13 @@ class AllineateInputSpec(AFNICommandInputSpec): argstr='-nomask', desc='Don\'t compute the autoweight/mask; if -weight is not ' 'also used, then every voxel will be counted equally.') + weight_file = File( + argstr='-weight %s', + exists=True, + deprecated='1.0.0', new_name='weight', + desc='Set the weighting for each voxel in the base dataset; ' + 'larger weights mean that voxel count more in the cost function. ' + 'Must be defined on the same grid as the base dataset') weight = traits.Either( File(exists=True), traits.Float(), argstr='-weight %s', diff --git a/nipype/interfaces/afni/tests/test_auto_Allineate.py b/nipype/interfaces/afni/tests/test_auto_Allineate.py index adc10179db..f1e6d4181a 100644 --- a/nipype/interfaces/afni/tests/test_auto_Allineate.py +++ b/nipype/interfaces/afni/tests/test_auto_Allineate.py @@ -119,6 +119,10 @@ def test_Allineate_inputs(): ), weight=dict(argstr='-weight %s', ), + weight_file=dict(argstr='-weight %s', + deprecated='1.0.0', + new_name='weight', + ), zclip=dict(argstr='-zclip', ), ) From 77bcb601462ab966008bdcf8facb8422c4afb027 Mon Sep 17 00:00:00 2001 From: oesteban Date: Wed, 4 Oct 2017 10:21:45 -0700 Subject: [PATCH 342/643] fix multiproc access to terminal_output --- nipype/pipeline/plugins/multiproc.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nipype/pipeline/plugins/multiproc.py b/nipype/pipeline/plugins/multiproc.py index 3d82da0f11..7070ae1da5 100644 --- a/nipype/pipeline/plugins/multiproc.py +++ b/nipype/pipeline/plugins/multiproc.py @@ -139,8 +139,9 @@ def _submit_job(self, node, updatehash=False): self._taskid += 1 # Don't allow streaming outputs - if node.terminal_output == 'stream': - node.terminal_output = 'allatonce' + if hasattr(node.interface, 'terminal_output') and \ + node.interface.terminal_output == 'stream': + node.interface.terminal_output = 'allatonce' self._task_obj[self._taskid] = self.pool.apply_async( run_node, (node, updatehash, self._taskid), From e269e74a038fd0c62f4e8a24165873f5c67d3d9b Mon Sep 17 00:00:00 2001 From: oesteban Date: Wed, 4 Oct 2017 10:24:30 -0700 Subject: [PATCH 343/643] update failing spec --- nipype/interfaces/afni/tests/test_auto_ROIStats.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/nipype/interfaces/afni/tests/test_auto_ROIStats.py b/nipype/interfaces/afni/tests/test_auto_ROIStats.py index 1e5de5806f..cdb6c8c570 100644 --- a/nipype/interfaces/afni/tests/test_auto_ROIStats.py +++ b/nipype/interfaces/afni/tests/test_auto_ROIStats.py @@ -25,9 +25,8 @@ def test_ROIStats_inputs(): quiet=dict(argstr='-quiet', position=1, ), - terminal_output=dict(mandatory=True, + terminal_output=dict(deprecated='1.0.0', nohash=True, - usedefault=True, ), ) inputs = ROIStats.input_spec() From efaaaa2f1b1f180d99f03f22e527c32d347e87cd Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Wed, 4 Oct 2017 09:41:36 -0400 Subject: [PATCH 344/643] TEST: Fix RobustRegister cmdline checks --- nipype/interfaces/freesurfer/tests/test_preprocess.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/nipype/interfaces/freesurfer/tests/test_preprocess.py b/nipype/interfaces/freesurfer/tests/test_preprocess.py index 2d5e8cfb44..4965329fae 100644 --- a/nipype/interfaces/freesurfer/tests/test_preprocess.py +++ b/nipype/interfaces/freesurfer/tests/test_preprocess.py @@ -17,6 +17,7 @@ def test_robustregister(create_files_in_directory): filelist, outdir = create_files_in_directory reg = freesurfer.RobustRegister() + cwd = os.getcwd() # make sure command gets called assert reg.cmd == 'mri_robust_register' @@ -28,8 +29,9 @@ def test_robustregister(create_files_in_directory): reg.inputs.source_file = filelist[0] reg.inputs.target_file = filelist[1] reg.inputs.auto_sens = True - assert reg.cmdline == ('mri_robust_register ' - '--satit --lta %s_robustreg.lta --mov %s --dst %s' % (filelist[0][:-4], filelist[0], filelist[1])) + assert reg.cmdline == ('mri_robust_register --satit --lta ' + '%s/%s_robustreg.lta --mov %s --dst %s' % + (cwd, filelist[0][:-4], filelist[0], filelist[1])) # constructor based parameter setting reg2 = freesurfer.RobustRegister(source_file=filelist[0], target_file=filelist[1], outlier_sens=3.0, From 8fce0af7b21f911e39e0c1edb3630d1887ad18d6 Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Wed, 4 Oct 2017 13:25:48 -0400 Subject: [PATCH 345/643] ENH: Reduce verbosity of distributed plugin --- nipype/pipeline/plugins/base.py | 37 +++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/nipype/pipeline/plugins/base.py b/nipype/pipeline/plugins/base.py index 4733cece7b..bab2812903 100644 --- a/nipype/pipeline/plugins/base.py +++ b/nipype/pipeline/plugins/base.py @@ -125,19 +125,25 @@ def run(self, graph, config, updatehash=False): # setup polling - TODO: change to threaded model notrun = [] + old_progress_stats = None + old_presub_stats = None while not np.all(self.proc_done) or np.any(self.proc_pending): # Check to see if a job is available (jobs without dependencies not run) # See https://github.com/nipy/nipype/pull/2200#discussion_r141605722 jobs_ready = np.nonzero(~self.proc_done & (self.depidx.sum(0) == 0))[1] - logger.info('Progress: %d jobs, %d/%d/%d (done/running/ready),' - ' %d/%d (pending_tasks/waiting).', - len(self.proc_done), - np.sum(self.proc_done ^ self.proc_pending), - np.sum(self.proc_done & self.proc_pending), - len(jobs_ready), - len(self.pending_tasks), - np.sum(~self.proc_done & ~self.proc_pending)) + progress_stats = (len(self.proc_done), + np.sum(self.proc_done ^ self.proc_pending), + np.sum(self.proc_done & self.proc_pending), + len(jobs_ready), + len(self.pending_tasks), + np.sum(~self.proc_done & ~self.proc_pending)) + display_stats = progress_stats != old_progress_stats + if display_stats: + logger.debug('Progress: %d jobs, %d/%d/%d ' + '(done/running/ready), %d/%d ' + '(pending_tasks/waiting).', *progress_stats) + old_progress_stats = progress_stats toappend = [] # trigger callbacks for any pending results while self.pending_tasks: @@ -163,13 +169,18 @@ def run(self, graph, config, updatehash=False): if toappend: self.pending_tasks.extend(toappend) + num_jobs = len(self.pending_tasks) - logger.debug('Tasks currently running: %d. Pending: %d.', num_jobs, - np.sum(self.proc_done & self.proc_pending)) + presub_stats = (num_jobs, + np.sum(self.proc_done & self.proc_pending)) + display_stats = display_stats or presub_stats != old_presub_stats + if display_stats: + logger.debug('Tasks currently running: %d. Pending: %d.', + *presub_stats) + old_presub_stats = presub_stats if num_jobs < self.max_jobs: - self._send_procs_to_workers(updatehash=updatehash, - graph=graph) - else: + self._send_procs_to_workers(updatehash=updatehash, graph=graph) + elif display_stats: logger.debug('Not submitting (max jobs reached)') sleep(poll_sleep_secs) From 484da5db4a227af07183502a4440f120ea57f649 Mon Sep 17 00:00:00 2001 From: oesteban Date: Wed, 4 Oct 2017 11:21:42 -0700 Subject: [PATCH 346/643] fix terminal_output tests --- nipype/interfaces/base.py | 2 +- nipype/interfaces/tests/test_base.py | 100 ++++++++++++++++++--------- 2 files changed, 70 insertions(+), 32 deletions(-) diff --git a/nipype/interfaces/base.py b/nipype/interfaces/base.py index 4c8408ff10..c75fd88ce3 100644 --- a/nipype/interfaces/base.py +++ b/nipype/interfaces/base.py @@ -51,7 +51,7 @@ PY35 = sys.version_info >= (3, 5) PY3 = sys.version_info[0] > 2 VALID_TERMINAL_OUTPUT = ['stream', 'allatonce', 'file', 'file_split', - 'file_stdout', 'file_stderr', 'discard'] + 'file_stdout', 'file_stderr', 'none'] __docformat__ = 'restructuredtext' diff --git a/nipype/interfaces/tests/test_base.py b/nipype/interfaces/tests/test_base.py index 0a6e150c79..459e80996e 100644 --- a/nipype/interfaces/tests/test_base.py +++ b/nipype/interfaces/tests/test_base.py @@ -3,24 +3,23 @@ # vi: set ft=python sts=4 ts=4 sw=4 et: from __future__ import print_function, unicode_literals from future import standard_library -standard_library.install_aliases() - -from builtins import open, str, bytes +from builtins import open, str import os import warnings import simplejson as json import pytest +import traits.api as traits from nipype.testing import example_data - import nipype.interfaces.base as nib from nipype.utils.filemanip import split_filename from nipype.interfaces.base import Undefined, config -import traits.api as traits +standard_library.install_aliases() + @pytest.mark.parametrize("args", [ - {}, - {'a' : 1, 'b' : [2, 3]} + {}, + {'a': 1, 'b': [2, 3]} ]) def test_bunch(args): b = nib.Bunch(**args) @@ -31,7 +30,7 @@ def test_bunch_attribute(): b = nib.Bunch(a=1, b=[2, 3], c=None) assert b.a == 1 assert b.b == [2, 3] - assert b.c == None + assert b.c is None def test_bunch_repr(): @@ -66,7 +65,7 @@ def test_bunch_hash(): with open(json_pth, 'r') as fp: jshash.update(fp.read().encode('utf-8')) assert newbdict['infile'][0][1] == jshash.hexdigest() - assert newbdict['yat'] == True + assert newbdict['yat'] is True @pytest.fixture(scope="module") @@ -654,49 +653,88 @@ def test_Commandline_environ(): assert res.runtime.environ['DISPLAY'] == ':2' -def test_CommandLine_output(setup_file): - tmp_infile = setup_file - tmpd, name = os.path.split(tmp_infile) - assert os.path.exists(tmp_infile) +def test_CommandLine_output(tmpdir): + # Create a file + name = 'foo.txt' + tmpdir.chdir() + tmpdir.join(name).write('foo') + ci = nib.CommandLine(command='ls -l') ci.terminal_output = 'allatonce' res = ci.run() assert res.runtime.merged == '' assert name in res.runtime.stdout + + # Check stdout is written ci = nib.CommandLine(command='ls -l') - ci.terminal_output = 'file' + ci.terminal_output = 'file_stdout' res = ci.run() - assert 'stdout.nipype' in res.runtime.stdout - assert isinstance(res.runtime.stdout, (str, bytes)) + assert os.path.isfile('stdout.nipype') + assert name in res.runtime.stdout + tmpdir.join('stdout.nipype').remove(ignore_errors=True) + + # Check stderr is written + ci = nib.CommandLine(command='ls -l') + ci.terminal_output = 'file_stderr' + res = ci.run() + assert os.path.isfile('stderr.nipype') + tmpdir.join('stderr.nipype').remove(ignore_errors=True) + + # Check outputs are thrown away ci = nib.CommandLine(command='ls -l') ci.terminal_output = 'none' res = ci.run() - assert res.runtime.stdout == '' + assert res.runtime.stdout == '' and \ + res.runtime.stderr == '' and \ + res.runtime.merged == '' + + # Check that new interfaces are set to default 'stream' ci = nib.CommandLine(command='ls -l') res = ci.run() - assert 'stdout.nipype' in res.runtime.stdout + assert ci.terminal_output == 'stream' + assert name in res.runtime.stdout and \ + res.runtime.stderr == '' + # Check only one file is generated + ci = nib.CommandLine(command='ls -l') + ci.terminal_output = 'file' + res = ci.run() + assert os.path.isfile('output.nipype') + assert name in res.runtime.merged and \ + res.runtime.stdout == '' and \ + res.runtime.stderr == '' + tmpdir.join('output.nipype').remove(ignore_errors=True) -def test_global_CommandLine_output(setup_file): - tmp_infile = setup_file - tmpd, name = os.path.split(tmp_infile) + # Check split files are generated ci = nib.CommandLine(command='ls -l') + ci.terminal_output = 'file_split' res = ci.run() + assert os.path.isfile('stdout.nipype') + assert os.path.isfile('stderr.nipype') assert name in res.runtime.stdout - assert os.path.exists(tmp_infile) + + +def test_global_CommandLine_output(tmpdir): + """Ensures CommandLine.set_default_terminal_output works""" + from nipype.interfaces.fsl import BET + + ci = nib.CommandLine(command='ls -l') + assert ci.terminal_output == 'stream' # default case + + ci = BET() + assert ci.terminal_output == 'stream' # default case + nib.CommandLine.set_default_terminal_output('allatonce') ci = nib.CommandLine(command='ls -l') - res = ci.run() - assert res.runtime.merged == '' - assert name in res.runtime.stdout + assert ci.terminal_output == 'allatonce' + nib.CommandLine.set_default_terminal_output('file') ci = nib.CommandLine(command='ls -l') - res = ci.run() - assert 'stdout.nipype' in res.runtime.stdout - nib.CommandLine.set_default_terminal_output('none') - ci = nib.CommandLine(command='ls -l') - res = ci.run() - assert res.runtime.stdout == '' + assert ci.terminal_output == 'file' + + # Check default affects derived interfaces + ci = BET() + assert ci.terminal_output == 'file' def check_dict(ref_dict, tst_dict): From fc75e0f970d1567aea02ea25f66dde97becf2e22 Mon Sep 17 00:00:00 2001 From: oesteban Date: Wed, 4 Oct 2017 11:40:29 -0700 Subject: [PATCH 347/643] raise error when trying to run Xvfb on Mac. close #1400 --- nipype/utils/config.py | 9 +++++++++ nipype/utils/tests/test_config.py | 12 ++++++++++++ 2 files changed, 21 insertions(+) diff --git a/nipype/utils/config.py b/nipype/utils/config.py index 39bdda4fef..fe1524c6d6 100644 --- a/nipype/utils/config.py +++ b/nipype/utils/config.py @@ -11,6 +11,7 @@ ''' from __future__ import print_function, division, unicode_literals, absolute_import import os +import sys import errno import atexit from warnings import warn @@ -284,6 +285,14 @@ def _mock(): self._display = Xvfb(ndisp, _mock) return sysdisplay else: + if 'darwin' in sys.platform: + raise RuntimeError( + 'Xvfb requires root permissions to run in OSX. Please ' + 'make sure that an X server is listening and set the ' + 'appropriate config on either $DISPLAY or nipype\'s ' + '"display_variable" config. Valid X servers include ' + 'VNC, XQuartz, or manually started Xvfb.') + # If $DISPLAY is empty, it confuses Xvfb so unset if sysdisplay == '': del os.environ['DISPLAY'] diff --git a/nipype/utils/tests/test_config.py b/nipype/utils/tests/test_config.py index 86ad23a81d..032212dba1 100644 --- a/nipype/utils/tests/test_config.py +++ b/nipype/utils/tests/test_config.py @@ -108,3 +108,15 @@ def test_display_empty_installed(monkeypatch): config._config.remove_option('execution', 'display_variable') monkeypatch.setitem(os.environ, 'DISPLAY', '') assert int(config.get_display().split(':')[-1]) > 1000 + + +def test_display_empty_macosx(monkeypatch): + """Check that when no display is specified, a virtual Xvfb is used""" + config._display = None + if config.has_option('execution', 'display_variable'): + config._config.remove_option('execution', 'display_variable') + monkeypatch.delitem(os.environ, 'DISPLAY', '') + + monkeypatch.setattr(sys, 'platform', 'darwin') + with pytest.raises(RuntimeError): + config.get_display() From 82a2c6a04c1d06a97bd41ab6fa1d893aa93789f4 Mon Sep 17 00:00:00 2001 From: oesteban Date: Wed, 4 Oct 2017 13:50:07 -0700 Subject: [PATCH 348/643] address @effigies' comments --- doc/users/config_file.rst | 22 +++++++++--------- nipype/utils/tests/test_config.py | 37 +++++++++++++++++++++++-------- 2 files changed, 38 insertions(+), 21 deletions(-) diff --git a/doc/users/config_file.rst b/doc/users/config_file.rst index 5303fe1fb5..b196047e97 100644 --- a/doc/users/config_file.rst +++ b/doc/users/config_file.rst @@ -73,18 +73,16 @@ Execution ``false``; default value: ``true``) *display_variable* - What ``$DISPLAY`` environment variable should utilize those interfaces - that require an X server. These interfaces should have the attribute - ``_redirect_x = True``. This option is very useful when the system has - an X server listening in the default port 6000, but ``$DISPLAY`` is - not defined. In that case, set ``display_variable = :0``. Similarly, - it can be used to point X-based interfaces to other servers, like VNC, - `xnest `_ - or `Xvfb `_ - and you would like to redirect all spawned windows to - it. If not set, nipype will try to configure a new virtual server using - Xvfb. (possible values: any X server address; default value: not - set) + Override the ``$DISPLAY`` environment variable for interfaces that require + an X server. This option is useful if there is a running X server, but + ``$DISPLAY`` was not defined in nipype's environment. For example, if an X + server is listening on the default port of 6000, set ``display_variable = :0`` + to enable nipype interfaces to use it. It may also point to displays provided + by VNC, `xnest `_ + or `Xvfb `_. + If neither ``display_variable`` nor the ``$DISPLAY`` environment variable are + set, nipype will try to configure a new virtual server using Xvfb. + (possible values: any X server address; default value: not set) *remove_unnecessary_outputs* This will remove any interface outputs not needed by the workflow. If the diff --git a/nipype/utils/tests/test_config.py b/nipype/utils/tests/test_config.py index 032212dba1..4cb7bcd350 100644 --- a/nipype/utils/tests/test_config.py +++ b/nipype/utils/tests/test_config.py @@ -21,7 +21,7 @@ @pytest.mark.parametrize('dispnum', range(5)) def test_display_config(monkeypatch, dispnum): - """Check that the display_variable option is used""" + """Check that the display_variable option is used ($DISPLAY not set)""" config._display = None dispstr = ':%d' % dispnum config.set('execution', 'display_variable', dispstr) @@ -44,12 +44,12 @@ def test_display_config_and_system(monkeypatch): config._display = None dispstr = ':10' config.set('execution', 'display_variable', dispstr) - monkeypatch.setitem(os.environ, 'DISPLAY', dispstr) + monkeypatch.setitem(os.environ, 'DISPLAY', ':0') assert config.get_display() == dispstr def test_display_noconfig_nosystem_patched(monkeypatch): - """Check that when no display is specified, a virtual Xvfb is used""" + """Check that when no $DISPLAY nor option are specified, a virtual Xvfb is used""" config._display = None if config.has_option('execution', 'display_variable'): config._config.remove_option('execution', 'display_variable') @@ -59,7 +59,10 @@ def test_display_noconfig_nosystem_patched(monkeypatch): def test_display_empty_patched(monkeypatch): - """Check that when no display is specified, a virtual Xvfb is used""" + """ + Check that when $DISPLAY is empty string and no option is specified, + a virtual Xvfb is used + """ config._display = None if config.has_option('execution', 'display_variable'): config._config.remove_option('execution', 'display_variable') @@ -69,7 +72,10 @@ def test_display_empty_patched(monkeypatch): def test_display_noconfig_nosystem_notinstalled(monkeypatch): - """Check that when no display is specified, a virtual Xvfb is used""" + """ + Check that an exception is raised if xvfbwrapper is not installed + but necessary (no config and $DISPLAY unset) + """ config._display = None if config.has_option('execution', 'display_variable'): config._config.remove_option('execution', 'display_variable') @@ -80,7 +86,10 @@ def test_display_noconfig_nosystem_notinstalled(monkeypatch): def test_display_empty_notinstalled(monkeypatch): - """Check that when no display is specified, a virtual Xvfb is used""" + """ + Check that an exception is raised if xvfbwrapper is not installed + but necessary (no config and $DISPLAY empty) + """ config._display = None if config.has_option('execution', 'display_variable'): config._config.remove_option('execution', 'display_variable') @@ -92,7 +101,10 @@ def test_display_empty_notinstalled(monkeypatch): @pytest.mark.skipif(not has_Xvfb, reason='xvfbwrapper not installed') def test_display_noconfig_nosystem_installed(monkeypatch): - """Check that when no display is specified, a virtual Xvfb is used""" + """ + Check that actually uses xvfbwrapper when installed (not mocked) + and necessary (no config and $DISPLAY unset) + """ config._display = None if config.has_option('execution', 'display_variable'): config._config.remove_option('execution', 'display_variable') @@ -102,7 +114,10 @@ def test_display_noconfig_nosystem_installed(monkeypatch): @pytest.mark.skipif(not has_Xvfb, reason='xvfbwrapper not installed') def test_display_empty_installed(monkeypatch): - """Check that when no display is specified, a virtual Xvfb is used""" + """ + Check that actually uses xvfbwrapper when installed (not mocked) + and necessary (no config and $DISPLAY empty) + """ config._display = None if config.has_option('execution', 'display_variable'): config._config.remove_option('execution', 'display_variable') @@ -111,7 +126,11 @@ def test_display_empty_installed(monkeypatch): def test_display_empty_macosx(monkeypatch): - """Check that when no display is specified, a virtual Xvfb is used""" + """ + Check that an exception is raised if xvfbwrapper is necessary + (no config and $DISPLAY unset) but platform is OSX. See + https://github.com/nipy/nipype/issues/1400 + """ config._display = None if config.has_option('execution', 'display_variable'): config._config.remove_option('execution', 'display_variable') From 617bba07aa9fbe940463acd9362357ee5a001c6d Mon Sep 17 00:00:00 2001 From: oesteban Date: Wed, 4 Oct 2017 20:33:13 -0700 Subject: [PATCH 349/643] fix xor in AFNI OutlierCount. fixes #1406 --- nipype/interfaces/afni/preprocess.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nipype/interfaces/afni/preprocess.py b/nipype/interfaces/afni/preprocess.py index 7eeba11c4c..879967aef2 100644 --- a/nipype/interfaces/afni/preprocess.py +++ b/nipype/interfaces/afni/preprocess.py @@ -1676,13 +1676,13 @@ class OutlierCountInputSpec(CommandLineInputSpec): False, usedefault=True, argstr='-autoclip', - xor=['in_file'], + xor=['mask'], desc='clip off small voxels') automask = traits.Bool( False, usedefault=True, argstr='-automask', - xor=['in_file'], + xor=['mask'], desc='clip off small voxels') fraction = traits.Bool( False, From 19a356b1f3c7980cd06a4d9fae6287091dab3d07 Mon Sep 17 00:00:00 2001 From: oesteban Date: Wed, 4 Oct 2017 20:35:09 -0700 Subject: [PATCH 350/643] update specs of the two interfaces affected so far --- .../afni/tests/test_auto_OutlierCount.py | 7 ++++--- .../fsl/tests/test_auto_WarpPointsFromStd.py | 17 +++++++++-------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/nipype/interfaces/afni/tests/test_auto_OutlierCount.py b/nipype/interfaces/afni/tests/test_auto_OutlierCount.py index 23f768f3dd..244a9b4490 100644 --- a/nipype/interfaces/afni/tests/test_auto_OutlierCount.py +++ b/nipype/interfaces/afni/tests/test_auto_OutlierCount.py @@ -8,11 +8,11 @@ def test_OutlierCount_inputs(): ), autoclip=dict(argstr='-autoclip', usedefault=True, - xor=['in_file'], + xor=['mask'], ), automask=dict(argstr='-automask', usedefault=True, - xor=['in_file'], + xor=['mask'], ), environ=dict(nohash=True, usedefault=True, @@ -54,7 +54,8 @@ def test_OutlierCount_inputs(): ), save_outliers=dict(usedefault=True, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = OutlierCount.input_spec() diff --git a/nipype/interfaces/fsl/tests/test_auto_WarpPointsFromStd.py b/nipype/interfaces/fsl/tests/test_auto_WarpPointsFromStd.py index bdb3f8e256..dd7b200d84 100644 --- a/nipype/interfaces/fsl/tests/test_auto_WarpPointsFromStd.py +++ b/nipype/interfaces/fsl/tests/test_auto_WarpPointsFromStd.py @@ -1,5 +1,5 @@ # AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT -from ....testing import assert_equal +from __future__ import unicode_literals from ..utils import WarpPointsFromStd @@ -7,10 +7,10 @@ def test_WarpPointsFromStd_inputs(): input_map = dict(args=dict(argstr='%s', ), coord_mm=dict(argstr='-mm', - xor=[u'coord_vox'], + xor=['coord_vox'], ), coord_vox=dict(argstr='-vox', - xor=[u'coord_mm'], + xor=['coord_mm'], ), environ=dict(nohash=True, usedefault=True, @@ -28,20 +28,21 @@ def test_WarpPointsFromStd_inputs(): std_file=dict(argstr='-std %s', mandatory=True, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), warp_file=dict(argstr='-warp %s', - xor=[u'xfm_file'], + xor=['xfm_file'], ), xfm_file=dict(argstr='-xfm %s', - xor=[u'warp_file'], + xor=['warp_file'], ), ) inputs = WarpPointsFromStd.input_spec() for key, metadata in list(input_map.items()): for metakey, value in list(metadata.items()): - yield assert_equal, getattr(inputs.traits()[key], metakey), value + assert getattr(inputs.traits()[key], metakey) == value def test_WarpPointsFromStd_outputs(): @@ -51,4 +52,4 @@ def test_WarpPointsFromStd_outputs(): for key, metadata in list(output_map.items()): for metakey, value in list(metadata.items()): - yield assert_equal, getattr(outputs.traits()[key], metakey), value + assert getattr(outputs.traits()[key], metakey) == value From 1d22038cc6b878ec7d338fd23f9acf0799f3003c Mon Sep 17 00:00:00 2001 From: oesteban Date: Wed, 4 Oct 2017 20:49:06 -0700 Subject: [PATCH 351/643] make ants.OutlierCount use the terminal_output. Close #1406 --- nipype/interfaces/afni/preprocess.py | 31 +++++++++++-------- .../afni/tests/test_auto_OutlierCount.py | 11 ++----- 2 files changed, 20 insertions(+), 22 deletions(-) diff --git a/nipype/interfaces/afni/preprocess.py b/nipype/interfaces/afni/preprocess.py index 879967aef2..71c7c9b96e 100644 --- a/nipype/interfaces/afni/preprocess.py +++ b/nipype/interfaces/afni/preprocess.py @@ -1718,23 +1718,14 @@ class OutlierCountInputSpec(CommandLineInputSpec): out_file = File( name_template='%s_outliers', name_source=['in_file'], - argstr='> %s', keep_extension=False, - position=-1, desc='capture standard output') class OutlierCountOutputSpec(TraitedSpec): - out_outliers = File( - exists=True, - desc='output image file name') - out_file = File( - name_template='%s_tqual', - name_source=['in_file'], - argstr='> %s', - keep_extension=False, - position=-1, - desc='capture standard output') + out_outliers = File(exists=True, + desc='output image file name') + out_file = File(desc='capture standard output') class OutlierCount(CommandLine): @@ -1759,20 +1750,34 @@ class OutlierCount(CommandLine): _cmd = '3dToutcount' input_spec = OutlierCountInputSpec output_spec = OutlierCountOutputSpec + _terminal_output = 'file_split' def _parse_inputs(self, skip=None): if skip is None: skip = [] + # This is not strictly an input, but needs be + # set before run() is called. + if self.terminal_output == 'none': + self.terminal_output = 'file_split' + if not self.inputs.save_outliers: skip += ['outliers_file'] return super(OutlierCount, self)._parse_inputs(skip) + def _run_interface(self, runtime): + runtime = super(OutlierCount, self)._run_interface(runtime) + + # Read from runtime.stdout or runtime.merged + with open(op.abspath(self.inputs.out_file), 'w') as outfh: + outfh.write(runtime.stdout or runtime.merged) + return runtime + def _list_outputs(self): outputs = self.output_spec().get() + outputs['out_file'] = op.abspath(self.inputs.out_file) if self.inputs.save_outliers: outputs['out_outliers'] = op.abspath(self.inputs.outliers_file) - outputs['out_file'] = op.abspath(self.inputs.out_file) return outputs diff --git a/nipype/interfaces/afni/tests/test_auto_OutlierCount.py b/nipype/interfaces/afni/tests/test_auto_OutlierCount.py index 244a9b4490..8658ad5bba 100644 --- a/nipype/interfaces/afni/tests/test_auto_OutlierCount.py +++ b/nipype/interfaces/afni/tests/test_auto_OutlierCount.py @@ -36,11 +36,9 @@ def test_OutlierCount_inputs(): mask=dict(argstr='-mask %s', xor=['autoclip', 'automask'], ), - out_file=dict(argstr='> %s', - keep_extension=False, + out_file=dict(keep_extension=False, name_source=['in_file'], name_template='%s_outliers', - position=-1, ), outliers_file=dict(argstr='-save %s', keep_extension=True, @@ -66,12 +64,7 @@ def test_OutlierCount_inputs(): def test_OutlierCount_outputs(): - output_map = dict(out_file=dict(argstr='> %s', - keep_extension=False, - name_source=['in_file'], - name_template='%s_tqual', - position=-1, - ), + output_map = dict(out_file=dict(), out_outliers=dict(), ) outputs = OutlierCount.output_spec() From 8b08f903719a3aee1d3af526660a8241805c1a0f Mon Sep 17 00:00:00 2001 From: oesteban Date: Wed, 4 Oct 2017 21:19:43 -0700 Subject: [PATCH 352/643] update documentation --- doc/users/interface_tutorial.rst | 65 +++++++++++++++++++++++++++++++- doc/users/saving_workflows.rst | 6 +-- 2 files changed, 67 insertions(+), 4 deletions(-) diff --git a/doc/users/interface_tutorial.rst b/doc/users/interface_tutorial.rst index 25e6d54120..9193aa6d8f 100644 --- a/doc/users/interface_tutorial.rst +++ b/doc/users/interface_tutorial.rst @@ -10,7 +10,7 @@ Specifying input settings The nipype interface modules provide a Python interface to external packages like FSL_ and SPM_. Within the module are a series of Python classes which wrap specific package functionality. For example, in -the fsl module, the class :class:`nipype.interfaces.fsl.Bet` wraps the +the fsl module, the class :class:`nipype.interfaces.fsl.BET` wraps the ``bet`` command-line tool. Using the command-line tool, one would specify input settings using flags like ``-o``, ``-m``, ``-f ``, etc... However, in nipype, options are assigned to Python attributes and can @@ -81,6 +81,69 @@ In this case, ``mybet.inputs.frac`` will contain the value ``0.7`` regardless the value that could be stored in the ``bet-settings.json`` file. +Controlling the standard output and error +----------------------------------------- + +It is very likely that the software wrapped within the interface writes +to the standard output or the standard error of the terminal. +Interfaces provide a means to access and retrieve these outputs, by +using the ``terminal_output`` attribute: :: + + import nipype.interfaces.fsl as fsl + mybet = fsl.BET(from_file='bet-settings.json') + mybet.terminal_output = 'file_split' + +In the example, the ``terminal_output = 'file_split'`` will redirect the +standard output and the standard error to split files (called +``stdout.nipype`` and ``stderr.nipype`` respectively). +The possible values for ``terminal_output`` are: + +*file* + Redirects both standard output and standard error to the same file + called ``output.nipype``. + Messages from both streams will be overlapped as they arrive to + the file. + +*file_split* + Redirects the output streams separately, to ``stdout.nipype`` + and ``stderr.nipype`` respectively, as described in the example. + +*file_stdout* + Only the standard output will be redirected to ``stdout.nipype`` + and the standard error will be discarded. + +*file_stderr* + Only the standard error will be redirected to ``stderr.nipype`` + and the standard output will be discarded. + +*stream* + Both output streams are redirected to the current logger printing + their messages interleaved and immediately to the terminal. + +*allatonce* + Both output streams will be forwarded to a buffer and stored + separately in the `runtime` object that the `run()` method returns. + No files are written nor streams printed out to terminal. + +*none* + Both outputs are discarded + +In all cases, except for the ``'none'`` setting of ``terminal_output``, +the ``run()`` method will return a "runtime" object that will contain +the streams in the corresponding properties (``runtime.stdout`` +for the standard output, ``runtime.stderr`` for the standard error, and +``runtime.merged`` for both when streams are mixed, eg. when using the +*file* option). :: + + import nipype.interfaces.fsl as fsl + mybet = fsl.BET(from_file='bet-settings.json') + mybet.terminal_output = 'file_split' + ... + result = mybet.run() + result.runtime.stdout + ' ... captured standard output ...' + + Getting Help ------------ diff --git a/doc/users/saving_workflows.rst b/doc/users/saving_workflows.rst index c97751eead..ad0834ec7b 100644 --- a/doc/users/saving_workflows.rst +++ b/doc/users/saving_workflows.rst @@ -82,20 +82,20 @@ This will create a file "outputtestsave.py" with the following content: bet2.inputs.environ = {'FSLOUTPUTTYPE': 'NIFTI_GZ'} bet2.inputs.ignore_exception = False bet2.inputs.output_type = 'NIFTI_GZ' - bet2.inputs.terminal_output = 'stream' + bet2.terminal_output = 'stream' # Node: testsave.bet bet = Node(BET(), name="bet") bet.iterables = ('frac', [0.3, 0.4]) bet.inputs.environ = {'FSLOUTPUTTYPE': 'NIFTI_GZ'} bet.inputs.ignore_exception = False bet.inputs.output_type = 'NIFTI_GZ' - bet.inputs.terminal_output = 'stream' + bet.terminal_output = 'stream' # Node: testsave.maths maths = Node(ImageMaths(), name="maths") maths.inputs.environ = {'FSLOUTPUTTYPE': 'NIFTI_GZ'} maths.inputs.ignore_exception = False maths.inputs.output_type = 'NIFTI_GZ' - maths.inputs.terminal_output = 'stream' + maths.terminal_output = 'stream' testsave.connect(bet2, ('mask_file', func), maths, "in_file2") testsave.connect(bet, "mask_file", maths, "in_file") testsave.connect(testfunc, "output", maths, "op_string") From 6279fb28e2b7d4f09026d931c98d5eb113947fe4 Mon Sep 17 00:00:00 2001 From: oesteban Date: Wed, 4 Oct 2017 22:18:34 -0700 Subject: [PATCH 353/643] fix tests --- nipype/interfaces/afni/preprocess.py | 6 +++--- nipype/interfaces/fsl/utils.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/nipype/interfaces/afni/preprocess.py b/nipype/interfaces/afni/preprocess.py index 71c7c9b96e..4fd8db724e 100644 --- a/nipype/interfaces/afni/preprocess.py +++ b/nipype/interfaces/afni/preprocess.py @@ -1729,8 +1729,8 @@ class OutlierCountOutputSpec(TraitedSpec): class OutlierCount(CommandLine): - """Calculates number of 'outliers' a 3D+time dataset, at each - time point, and writes the results to stdout. + """Calculates number of 'outliers' at each time point of a + a 3D+time dataset. For complete details, see the `3dToutcount Documentation `_ @@ -1742,7 +1742,7 @@ class OutlierCount(CommandLine): >>> toutcount = afni.OutlierCount() >>> toutcount.inputs.in_file = 'functional.nii' >>> toutcount.cmdline # doctest: +ELLIPSIS +ALLOW_UNICODE - '3dToutcount functional.nii > functional_outliers' + '3dToutcount functional.nii' >>> res = toutcount.run() # doctest: +SKIP """ diff --git a/nipype/interfaces/fsl/utils.py b/nipype/interfaces/fsl/utils.py index 46b03aa6fc..004c436b5c 100644 --- a/nipype/interfaces/fsl/utils.py +++ b/nipype/interfaces/fsl/utils.py @@ -2148,7 +2148,7 @@ class WarpPointsFromStd(CommandLine): >>> warppoints.inputs.std_file = 'mni.nii' >>> warppoints.inputs.warp_file = 'warpfield.nii' >>> warppoints.inputs.coord_mm = True - >>> warppoints.cmdline # doctest: +ELLIPSIS +IGNORE_UNICODE + >>> warppoints.cmdline # doctest: +ELLIPSIS +ALLOW_UNICODE 'std2imgcoord -mm -img T1.nii -std mni.nii -warp warpfield.nii surf.txt' >>> res = warppoints.run() # doctest: +SKIP From 0abc8ac01fe275330fb34ceaaac46bd0bcb9ae38 Mon Sep 17 00:00:00 2001 From: oesteban Date: Wed, 4 Oct 2017 22:19:01 -0700 Subject: [PATCH 354/643] move documentation to the interface_specs file --- doc/devel/interface_specs.rst | 64 ++++++++++++++++++++++++++++++++ doc/users/interface_tutorial.rst | 63 ------------------------------- 2 files changed, 64 insertions(+), 63 deletions(-) diff --git a/doc/devel/interface_specs.rst b/doc/devel/interface_specs.rst index 2f7d63496e..37f3533384 100644 --- a/doc/devel/interface_specs.rst +++ b/doc/devel/interface_specs.rst @@ -159,6 +159,70 @@ generated depending on inputs, by the tool. OutputSpecs inherit from ``interfaces.base.TraitedSpec`` directly. +Controlling outputs to terminal +------------------------------- + +It is very likely that the software wrapped within the interface writes +to the standard output or the standard error of the terminal. +Interfaces provide a means to access and retrieve these outputs, by +using the ``terminal_output`` attribute: :: + + import nipype.interfaces.fsl as fsl + mybet = fsl.BET(from_file='bet-settings.json') + mybet.terminal_output = 'file_split' + +In the example, the ``terminal_output = 'file_split'`` will redirect the +standard output and the standard error to split files (called +``stdout.nipype`` and ``stderr.nipype`` respectively). +The possible values for ``terminal_output`` are: + +*file* + Redirects both standard output and standard error to the same file + called ``output.nipype``. + Messages from both streams will be overlapped as they arrive to + the file. + +*file_split* + Redirects the output streams separately, to ``stdout.nipype`` + and ``stderr.nipype`` respectively, as described in the example. + +*file_stdout* + Only the standard output will be redirected to ``stdout.nipype`` + and the standard error will be discarded. + +*file_stderr* + Only the standard error will be redirected to ``stderr.nipype`` + and the standard output will be discarded. + +*stream* + Both output streams are redirected to the current logger printing + their messages interleaved and immediately to the terminal. + +*allatonce* + Both output streams will be forwarded to a buffer and stored + separately in the `runtime` object that the `run()` method returns. + No files are written nor streams printed out to terminal. + +*none* + Both outputs are discarded + +In all cases, except for the ``'none'`` setting of ``terminal_output``, +the ``run()`` method will return a "runtime" object that will contain +the streams in the corresponding properties (``runtime.stdout`` +for the standard output, ``runtime.stderr`` for the standard error, and +``runtime.merged`` for both when streams are mixed, eg. when using the +*file* option). :: + + import nipype.interfaces.fsl as fsl + mybet = fsl.BET(from_file='bet-settings.json') + mybet.terminal_output = 'file_split' + ... + result = mybet.run() + result.runtime.stdout + ' ... captured standard output ...' + + + Traited Attributes ------------------ diff --git a/doc/users/interface_tutorial.rst b/doc/users/interface_tutorial.rst index 9193aa6d8f..ced4be7f60 100644 --- a/doc/users/interface_tutorial.rst +++ b/doc/users/interface_tutorial.rst @@ -81,69 +81,6 @@ In this case, ``mybet.inputs.frac`` will contain the value ``0.7`` regardless the value that could be stored in the ``bet-settings.json`` file. -Controlling the standard output and error ------------------------------------------ - -It is very likely that the software wrapped within the interface writes -to the standard output or the standard error of the terminal. -Interfaces provide a means to access and retrieve these outputs, by -using the ``terminal_output`` attribute: :: - - import nipype.interfaces.fsl as fsl - mybet = fsl.BET(from_file='bet-settings.json') - mybet.terminal_output = 'file_split' - -In the example, the ``terminal_output = 'file_split'`` will redirect the -standard output and the standard error to split files (called -``stdout.nipype`` and ``stderr.nipype`` respectively). -The possible values for ``terminal_output`` are: - -*file* - Redirects both standard output and standard error to the same file - called ``output.nipype``. - Messages from both streams will be overlapped as they arrive to - the file. - -*file_split* - Redirects the output streams separately, to ``stdout.nipype`` - and ``stderr.nipype`` respectively, as described in the example. - -*file_stdout* - Only the standard output will be redirected to ``stdout.nipype`` - and the standard error will be discarded. - -*file_stderr* - Only the standard error will be redirected to ``stderr.nipype`` - and the standard output will be discarded. - -*stream* - Both output streams are redirected to the current logger printing - their messages interleaved and immediately to the terminal. - -*allatonce* - Both output streams will be forwarded to a buffer and stored - separately in the `runtime` object that the `run()` method returns. - No files are written nor streams printed out to terminal. - -*none* - Both outputs are discarded - -In all cases, except for the ``'none'`` setting of ``terminal_output``, -the ``run()`` method will return a "runtime" object that will contain -the streams in the corresponding properties (``runtime.stdout`` -for the standard output, ``runtime.stderr`` for the standard error, and -``runtime.merged`` for both when streams are mixed, eg. when using the -*file* option). :: - - import nipype.interfaces.fsl as fsl - mybet = fsl.BET(from_file='bet-settings.json') - mybet.terminal_output = 'file_split' - ... - result = mybet.run() - result.runtime.stdout - ' ... captured standard output ...' - - Getting Help ------------ From 5372a79ced62daa0663cb5e0b27e2d613574277b Mon Sep 17 00:00:00 2001 From: oesteban Date: Wed, 4 Oct 2017 22:26:02 -0700 Subject: [PATCH 355/643] fix CHANGES --- CHANGES | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGES b/CHANGES index d3ce55476b..cca75f50eb 100644 --- a/CHANGES +++ b/CHANGES @@ -24,7 +24,6 @@ Upcoming release 0.13.0 (May 11, 2017) ===================== -<<<<<<< HEAD * ENH: Multi-stage recon-all directives (https://github.com/nipy/nipype/pull/1991) * FIX: FEAT "folder does not exist" error (https://github.com/nipy/nipype/pull/2000) * ENH: Niftyfit interfaces (https://github.com/nipy/nipype/pull/1910) From 82263dcb509b2140813f153bbb944e8adbf61ea4 Mon Sep 17 00:00:00 2001 From: oesteban Date: Wed, 4 Oct 2017 22:26:27 -0700 Subject: [PATCH 356/643] remove unnecessary dependency --- nipype/interfaces/fsl/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nipype/interfaces/fsl/utils.py b/nipype/interfaces/fsl/utils.py index 004c436b5c..072895a719 100644 --- a/nipype/interfaces/fsl/utils.py +++ b/nipype/interfaces/fsl/utils.py @@ -17,7 +17,7 @@ os.chdir(datadir) """ from __future__ import print_function, division, unicode_literals, absolute_import -from builtins import map, range, open +from builtins import map, range import os import os.path as op From d951ab43e22af2cc7d7e1caeebf4452e0e120bee Mon Sep 17 00:00:00 2001 From: oesteban Date: Thu, 5 Oct 2017 09:24:12 -0700 Subject: [PATCH 357/643] fix tests --- nipype/interfaces/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nipype/interfaces/base.py b/nipype/interfaces/base.py index 367ef3e672..7efa602441 100644 --- a/nipype/interfaces/base.py +++ b/nipype/interfaces/base.py @@ -1607,7 +1607,7 @@ def _run_interface(self, runtime, correct_return_codes=(0,)): runtime.command_path = cmd_path runtime.dependencies = get_dependencies(executable_name, runtime.environ) - runtime = run_command(runtime, output=self.inputs.terminal_output) + runtime = run_command(runtime, output=self.terminal_output) if runtime.returncode is None or \ runtime.returncode not in correct_return_codes: self.raise_exception(runtime) From 57bc50961e13def1fbb203e40da01f6051bec808 Mon Sep 17 00:00:00 2001 From: Elizabeth DuPre Date: Thu, 5 Oct 2017 13:35:39 -0400 Subject: [PATCH 358/643] Creates nipype wrapper for the AFNI command 3dSynthesize --- nipype/interfaces/afni/__init__.py | 2 +- nipype/interfaces/afni/model.py | 80 ++++++++++++++++++++++++++++++ 2 files changed, 81 insertions(+), 1 deletion(-) diff --git a/nipype/interfaces/afni/__init__.py b/nipype/interfaces/afni/__init__.py index cdca22c4f3..3b4d90e87d 100644 --- a/nipype/interfaces/afni/__init__.py +++ b/nipype/interfaces/afni/__init__.py @@ -26,4 +26,4 @@ Refit, Resample, TCat, TCatSubBrick, TStat, To3D, Unifize, Undump, ZCutUp, GCOR, Zcat, Zeropad) -from .model import (Deconvolve, Remlfit) +from .model import (Deconvolve, Remlfit, Synthesize) diff --git a/nipype/interfaces/afni/model.py b/nipype/interfaces/afni/model.py index 475e2c9d73..4fdc533a1b 100644 --- a/nipype/interfaces/afni/model.py +++ b/nipype/interfaces/afni/model.py @@ -154,6 +154,12 @@ class DeconvolveInputSpec(AFNICommandInputSpec): x1D_stop = traits.Bool( desc='stop running after writing .xmat.1D file', argstr='-x1D_stop') + cbucket = traits.Str( + desc='Name for dataset in which to save the regression ' + 'coefficients (no statistics). This dataset ' + 'will be used in a -xrestore run [not yet implemented] ' + 'instead of the bucket dataset, if possible.', + argstr='-cbucket %s') out_file = File( desc='output statistics file', argstr='-bucket %s') @@ -231,6 +237,8 @@ class DeconvolveOutputSpec(TraitedSpec): desc='automatical generated script to run 3dREMLfit', exists=True) x1D = File( desc='save out X matrix', exists=True) + cbucket = File( + desc='output regression coefficients file (if generated)') class Deconvolve(AFNICommand): @@ -588,3 +596,75 @@ def _list_outputs(self): outputs[key] = os.path.abspath(self.inputs.get()[key]) return outputs + + +class SynthesizeInputSpec(AFNICommandInputSpec): + cbucket = File( + desc='Read the dataset output from ' + '3dDeconvolve via the \'-cbucket\' option.', + argstr='-cbucket %s', + copyfile=False, + mandatory=True) + matrix = File( + desc='Read the matrix output from ' + '3dDeconvolve via the \'-x1D\' option.', + argstr='-matrix %s', + copyfile=False, + mandatory=True) + select = traits.List( + Str(desc='selected columns to synthesize'), + argstr='-select %s', + desc='A list of selected columns from the matrix (and the ' + 'corresponding coefficient sub-bricks from the ' + 'cbucket). Valid types include \'baseline\', ' + ' \'polort\', \'allfunc\', \'allstim\', \'all\', ' + 'Can also provide \'something\' where something matches ' + 'a stim_label from 3dDeconvolve, and \'digits\' where digits ' + 'are the numbers of the select matrix columns by ' + 'numbers (starting at 0), or number ranges of the form ' + '\'3..7\' and \'3-7\'.', + mandatory=True) + out_file = File( + name_template='syn', + desc='output dataset prefix name (default \'syn\')', + argstr='-prefix %s') + dry_run = traits.Bool( + desc='Don\'t compute the output, just ' + 'check the inputs.', + argstr='-dry') + TR = traits.Float( + desc='TR to set in the output. The default value of ' + 'TR is read from the header of the matrix file.', + argstr='-TR %f') + cenfill = traits.Enum( + 'zero','nbhr','none', + argstr='-cenfill %s', + desc='Determines how censored time points from the ' + '3dDeconvolve run will be filled. Valid types ' + 'are \'zero\', \'nbhr\' and \'none\'.') + + +class Synthesize(AFNICommand): + """Reads a '-cbucket' dataset and a '.xmat.1D' matrix from 3dDeconvolve, + and synthesizes a fit dataset using user-selected sub-bricks and + matrix columns. + + For complete details, see the `3dSynthesize Documentation. + `_ + + Examples + ======== + + >>> from nipype.interfaces import afni + >>> synthesize = afni.Synthesize() + >>> synthesize.inputs.cbucket = 'functional.nii' + >>> synthesize.inputs.matrix = 'output.1D' + >>> synthesize.inputs.select = ['baseline'] + >>> synthesize.cmdline # doctest: +ALLOW_UNICODE + '3dSynthesize -cbucket functional.nii -matrix output.1D -select baseline' + >>> syn = synthesize.run() # doctest: +SKIP + """ + + _cmd = '3dSynthesize' + input_spec = SynthesizeInputSpec + output_spec = AFNICommandOutputSpec From c53d16822fc2892299e459a037623bd05d57f378 Mon Sep 17 00:00:00 2001 From: Elizabeth DuPre Date: Thu, 5 Oct 2017 13:41:21 -0400 Subject: [PATCH 359/643] Add test for 3dSynthesize, edit test for 3dDeconvolve to add cbucket --- .../afni/tests/test_auto_Deconvolve.py | 5 +- .../afni/tests/test_auto_Synthesize.py | 53 +++++++++++++++++++ 2 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 nipype/interfaces/afni/tests/test_auto_Synthesize.py diff --git a/nipype/interfaces/afni/tests/test_auto_Deconvolve.py b/nipype/interfaces/afni/tests/test_auto_Deconvolve.py index 0dfbec8deb..4254adc522 100644 --- a/nipype/interfaces/afni/tests/test_auto_Deconvolve.py +++ b/nipype/interfaces/afni/tests/test_auto_Deconvolve.py @@ -14,6 +14,8 @@ def test_Deconvolve_inputs(): ), automask=dict(argstr='-automask', ), + cbucket=dict(argstr='-cbucket %s', + ), censor=dict(argstr='-censor %s', ), dmbase=dict(argstr='-dmbase', @@ -123,7 +125,8 @@ def test_Deconvolve_inputs(): def test_Deconvolve_outputs(): - output_map = dict(out_file=dict(), + output_map = dict(cbucket=dict(), + out_file=dict(), reml_script=dict(), x1D=dict(), ) diff --git a/nipype/interfaces/afni/tests/test_auto_Synthesize.py b/nipype/interfaces/afni/tests/test_auto_Synthesize.py new file mode 100644 index 0000000000..084a4ae248 --- /dev/null +++ b/nipype/interfaces/afni/tests/test_auto_Synthesize.py @@ -0,0 +1,53 @@ +# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT +from __future__ import unicode_literals +from ..model import Synthesize + + +def test_Synthesize_inputs(): + input_map = dict(TR=dict(argstr='-TR %f', + ), + args=dict(argstr='%s', + ), + cbucket=dict(argstr='-cbucket %s', + copyfile=False, + mandatory=True, + ), + cenfill=dict(argstr='-cenfill %s', + ), + dry_run=dict(argstr='-dry', + ), + environ=dict(nohash=True, + usedefault=True, + ), + ignore_exception=dict(nohash=True, + usedefault=True, + ), + matrix=dict(argstr='-matrix %s', + copyfile=False, + mandatory=True, + ), + out_file=dict(argstr='-prefix %s', + name_template='syn', + ), + outputtype=dict(), + select=dict(argstr='-select %s', + mandatory=True, + ), + terminal_output=dict(nohash=True, + ), + ) + inputs = Synthesize.input_spec() + + for key, metadata in list(input_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(inputs.traits()[key], metakey) == value + + +def test_Synthesize_outputs(): + output_map = dict(out_file=dict(), + ) + outputs = Synthesize.output_spec() + + for key, metadata in list(output_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(outputs.traits()[key], metakey) == value From 43f9db81dee883640f2cefe8827177105f21433e Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Thu, 5 Oct 2017 16:20:39 -0400 Subject: [PATCH 360/643] FIX: Typo in BBRegister._list_outputs --- nipype/interfaces/freesurfer/preprocess.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nipype/interfaces/freesurfer/preprocess.py b/nipype/interfaces/freesurfer/preprocess.py index 658b397630..2acd3fa0ff 100644 --- a/nipype/interfaces/freesurfer/preprocess.py +++ b/nipype/interfaces/freesurfer/preprocess.py @@ -1226,7 +1226,7 @@ def _list_outputs(self): outputs['registered_file'] = op.abspath(_in.registered_file) if isdefined(_in.out_lta_file): - if isinstance(_in.out_fsl_file, bool): + if isinstance(_in.out_lta_file, bool): suffix = '_bbreg_%s.lta' % _in.subject_id out_lta_file = fname_presuffix(_in.source_file, suffix=suffix, From 5526eeda7454c7799f0dc4b105bee1a2f7241206 Mon Sep 17 00:00:00 2001 From: salma1601 Date: Thu, 5 Oct 2017 23:08:09 +0200 Subject: [PATCH 361/643] fix CenterMass txt file loading --- nipype/interfaces/afni/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nipype/interfaces/afni/utils.py b/nipype/interfaces/afni/utils.py index 7fadffe5b4..38bd1d41cc 100644 --- a/nipype/interfaces/afni/utils.py +++ b/nipype/interfaces/afni/utils.py @@ -734,7 +734,7 @@ def _list_outputs(self): outputs = super(CenterMass, self)._list_outputs() outputs['out_file'] = os.path.abspath(self.inputs.in_file) outputs['cm_file'] = os.path.abspath(self.inputs.cm_file) - sout = np.loadtxt(outputs['cm_file']) # pylint: disable=E1101 + sout = np.loadtxt(outputs['cm_file'], ndmin=2) # pylint: disable=E1101 if len(sout) > 1: outputs['cm'] = [tuple(s) for s in sout] else: From bb76e4928fcdb3d7b59866d2482dd500b69be17a Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Thu, 5 Oct 2017 14:42:35 -0400 Subject: [PATCH 362/643] FIX: Relative imports finds correct config --- nipype/utils/config.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nipype/utils/config.py b/nipype/utils/config.py index fe1524c6d6..94d5427b88 100644 --- a/nipype/utils/config.py +++ b/nipype/utils/config.py @@ -322,7 +322,7 @@ def stop_display(self): @atexit.register def free_display(): """Stop virtual display (if it is up)""" - from nipype import config - from nipype import logging + from .. import config + from .. import logging config.stop_display() logging.getLogger('interface').info('Closing display (if virtual)') From 484c82bd7cff444e143de1151fe5d26da232556b Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Thu, 5 Oct 2017 14:50:53 -0400 Subject: [PATCH 363/643] ENH: Reduce noise level of MultiProc plugin --- nipype/pipeline/plugins/multiproc.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/nipype/pipeline/plugins/multiproc.py b/nipype/pipeline/plugins/multiproc.py index ecbb8a4a70..bcf668feb4 100644 --- a/nipype/pipeline/plugins/multiproc.py +++ b/nipype/pipeline/plugins/multiproc.py @@ -125,6 +125,7 @@ def __init__(self, plugin_args=None): logger.debug('MultiProcPlugin starting in "%sdaemon" mode (n_procs=%d, mem_gb=%0.2f)', 'non' if non_daemon else '', self.processors, self.memory_gb) self.pool = (NonDaemonPool if non_daemon else Pool)(processes=self.processors) + self._stats = None def _async_callback(self, args): self._taskresult[args['taskid']] = args @@ -197,10 +198,13 @@ def _send_procs_to_workers(self, updatehash=False, graph=None): # Check available system resources by summing all threads and memory used free_memory_gb, free_processors = self._check_resources(self.pending_tasks) - logger.info('Currently running %d tasks, and %d jobs ready. ' - 'Free memory (GB): %0.2f/%0.2f, Free processors: %d/%d', - len(self.pending_tasks), len(jobids), - free_memory_gb, self.memory_gb, free_processors, self.processors) + stats = (len(self.pending_tasks), len(jobids), free_memory_gb, + self.memory_gb, free_processors, self.processors) + if self._stats != stats: + logger.info('Currently running %d tasks, and %d jobs ready. Free ' + 'memory (GB): %0.2f/%0.2f, Free processors: %d/%d', + *stats) + self._stats = stats if free_memory_gb < 0.01 or free_processors == 0: logger.debug('No resources available') @@ -268,6 +272,8 @@ def _send_procs_to_workers(self, updatehash=False, graph=None): self._remove_node_dirs() free_memory_gb += next_job_gb free_processors += next_job_th + # Display stats next loop + self._stats = None continue # Task should be submitted to workers @@ -281,6 +287,8 @@ def _send_procs_to_workers(self, updatehash=False, graph=None): self.proc_pending[jobid] = False else: self.pending_tasks.insert(0, (tid, jobid)) + # Display stats next loop + self._stats = None def _sort_jobs(self, jobids, scheduler='tsort'): if scheduler == 'mem_thread': From 83e3d16bd7539bb6856999620122f0f41f3b7a32 Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Thu, 5 Oct 2017 16:25:59 -0400 Subject: [PATCH 364/643] TEST: Update tests post-#2200 --- nipype/interfaces/afni/tests/test_auto_ABoverlap.py | 3 +++ nipype/interfaces/afni/tests/test_auto_AFNICommand.py | 3 +++ nipype/interfaces/afni/tests/test_auto_AFNIPythonCommand.py | 3 +++ nipype/interfaces/afni/tests/test_auto_AFNItoNIFTI.py | 3 +++ nipype/interfaces/afni/tests/test_auto_Allineate.py | 3 +++ nipype/interfaces/afni/tests/test_auto_AutoTcorrelate.py | 3 +++ nipype/interfaces/afni/tests/test_auto_Autobox.py | 3 +++ nipype/interfaces/afni/tests/test_auto_Automask.py | 3 +++ nipype/interfaces/afni/tests/test_auto_Axialize.py | 3 +++ nipype/interfaces/afni/tests/test_auto_Bandpass.py | 3 +++ nipype/interfaces/afni/tests/test_auto_BlurInMask.py | 3 +++ nipype/interfaces/afni/tests/test_auto_BlurToFWHM.py | 3 +++ nipype/interfaces/afni/tests/test_auto_Bucket.py | 3 +++ nipype/interfaces/afni/tests/test_auto_Calc.py | 3 +++ nipype/interfaces/afni/tests/test_auto_Cat.py | 3 +++ nipype/interfaces/afni/tests/test_auto_CatMatvec.py | 3 +++ nipype/interfaces/afni/tests/test_auto_Copy.py | 3 +++ nipype/interfaces/afni/tests/test_auto_Deconvolve.py | 3 +++ nipype/interfaces/afni/tests/test_auto_DegreeCentrality.py | 3 +++ nipype/interfaces/afni/tests/test_auto_Despike.py | 3 +++ nipype/interfaces/afni/tests/test_auto_Detrend.py | 3 +++ nipype/interfaces/afni/tests/test_auto_Dot.py | 3 +++ nipype/interfaces/afni/tests/test_auto_ECM.py | 3 +++ nipype/interfaces/afni/tests/test_auto_Edge3.py | 3 +++ nipype/interfaces/afni/tests/test_auto_Eval.py | 3 +++ nipype/interfaces/afni/tests/test_auto_Fim.py | 3 +++ nipype/interfaces/afni/tests/test_auto_Fourier.py | 3 +++ nipype/interfaces/afni/tests/test_auto_LFCD.py | 3 +++ nipype/interfaces/afni/tests/test_auto_MaskTool.py | 3 +++ nipype/interfaces/afni/tests/test_auto_Maskave.py | 3 +++ nipype/interfaces/afni/tests/test_auto_Means.py | 3 +++ nipype/interfaces/afni/tests/test_auto_Merge.py | 3 +++ nipype/interfaces/afni/tests/test_auto_Notes.py | 3 +++ nipype/interfaces/afni/tests/test_auto_Qwarp.py | 3 +++ nipype/interfaces/afni/tests/test_auto_Remlfit.py | 3 +++ nipype/interfaces/afni/tests/test_auto_Resample.py | 3 +++ nipype/interfaces/afni/tests/test_auto_Retroicor.py | 3 +++ nipype/interfaces/afni/tests/test_auto_SVMTest.py | 3 +++ nipype/interfaces/afni/tests/test_auto_SVMTrain.py | 3 +++ nipype/interfaces/afni/tests/test_auto_SkullStrip.py | 3 +++ nipype/interfaces/afni/tests/test_auto_TCat.py | 3 +++ nipype/interfaces/afni/tests/test_auto_TCorr1D.py | 3 +++ nipype/interfaces/afni/tests/test_auto_TCorrMap.py | 3 +++ nipype/interfaces/afni/tests/test_auto_TCorrelate.py | 3 +++ nipype/interfaces/afni/tests/test_auto_TNorm.py | 3 +++ nipype/interfaces/afni/tests/test_auto_TShift.py | 3 +++ nipype/interfaces/afni/tests/test_auto_TStat.py | 3 +++ nipype/interfaces/afni/tests/test_auto_To3D.py | 3 +++ nipype/interfaces/afni/tests/test_auto_Undump.py | 3 +++ nipype/interfaces/afni/tests/test_auto_Unifize.py | 3 +++ nipype/interfaces/afni/tests/test_auto_Volreg.py | 3 +++ nipype/interfaces/afni/tests/test_auto_Warp.py | 3 +++ nipype/interfaces/afni/tests/test_auto_ZCutUp.py | 3 +++ nipype/interfaces/afni/tests/test_auto_Zcat.py | 3 +++ nipype/interfaces/afni/tests/test_auto_Zeropad.py | 3 +++ 55 files changed, 165 insertions(+) diff --git a/nipype/interfaces/afni/tests/test_auto_ABoverlap.py b/nipype/interfaces/afni/tests/test_auto_ABoverlap.py index 93219fe3dc..423b7f3ad7 100644 --- a/nipype/interfaces/afni/tests/test_auto_ABoverlap.py +++ b/nipype/interfaces/afni/tests/test_auto_ABoverlap.py @@ -24,6 +24,9 @@ def test_ABoverlap_inputs(): ), no_automask=dict(argstr='-no_automask', ), + num_threads=dict(nohash=True, + usedefault=True, + ), out_file=dict(argstr=' |& tee %s', position=-1, ), diff --git a/nipype/interfaces/afni/tests/test_auto_AFNICommand.py b/nipype/interfaces/afni/tests/test_auto_AFNICommand.py index aef42ee585..822dbe5e13 100644 --- a/nipype/interfaces/afni/tests/test_auto_AFNICommand.py +++ b/nipype/interfaces/afni/tests/test_auto_AFNICommand.py @@ -12,6 +12,9 @@ def test_AFNICommand_inputs(): ignore_exception=dict(nohash=True, usedefault=True, ), + num_threads=dict(nohash=True, + usedefault=True, + ), out_file=dict(argstr='-prefix %s', name_source=['in_file'], name_template='%s_afni', diff --git a/nipype/interfaces/afni/tests/test_auto_AFNIPythonCommand.py b/nipype/interfaces/afni/tests/test_auto_AFNIPythonCommand.py index e8efb62f5d..1890333e9e 100644 --- a/nipype/interfaces/afni/tests/test_auto_AFNIPythonCommand.py +++ b/nipype/interfaces/afni/tests/test_auto_AFNIPythonCommand.py @@ -12,6 +12,9 @@ def test_AFNIPythonCommand_inputs(): ignore_exception=dict(nohash=True, usedefault=True, ), + num_threads=dict(nohash=True, + usedefault=True, + ), out_file=dict(argstr='-prefix %s', name_source=['in_file'], name_template='%s_afni', diff --git a/nipype/interfaces/afni/tests/test_auto_AFNItoNIFTI.py b/nipype/interfaces/afni/tests/test_auto_AFNItoNIFTI.py index 5fe66e9df7..ff373f5745 100644 --- a/nipype/interfaces/afni/tests/test_auto_AFNItoNIFTI.py +++ b/nipype/interfaces/afni/tests/test_auto_AFNItoNIFTI.py @@ -22,6 +22,9 @@ def test_AFNItoNIFTI_inputs(): newid=dict(argstr='-newid', xor=['oldid'], ), + num_threads=dict(nohash=True, + usedefault=True, + ), oldid=dict(argstr='-oldid', xor=['newid'], ), diff --git a/nipype/interfaces/afni/tests/test_auto_Allineate.py b/nipype/interfaces/afni/tests/test_auto_Allineate.py index f1e6d4181a..d887624a8b 100644 --- a/nipype/interfaces/afni/tests/test_auto_Allineate.py +++ b/nipype/interfaces/afni/tests/test_auto_Allineate.py @@ -67,6 +67,9 @@ def test_Allineate_inputs(): ), nomask=dict(argstr='-nomask', ), + num_threads=dict(nohash=True, + usedefault=True, + ), nwarp=dict(argstr='-nwarp %s', ), nwarp_fixdep=dict(argstr='-nwarp_fixdep%s', diff --git a/nipype/interfaces/afni/tests/test_auto_AutoTcorrelate.py b/nipype/interfaces/afni/tests/test_auto_AutoTcorrelate.py index f7a3d89278..7ef1b3a57f 100644 --- a/nipype/interfaces/afni/tests/test_auto_AutoTcorrelate.py +++ b/nipype/interfaces/afni/tests/test_auto_AutoTcorrelate.py @@ -27,6 +27,9 @@ def test_AutoTcorrelate_inputs(): mask_source=dict(argstr='-mask_source %s', xor=['mask_only_targets'], ), + num_threads=dict(nohash=True, + usedefault=True, + ), out_file=dict(argstr='-prefix %s', name_source='in_file', name_template='%s_similarity_matrix.1D', diff --git a/nipype/interfaces/afni/tests/test_auto_Autobox.py b/nipype/interfaces/afni/tests/test_auto_Autobox.py index 91479c241d..20a3cdebf6 100644 --- a/nipype/interfaces/afni/tests/test_auto_Autobox.py +++ b/nipype/interfaces/afni/tests/test_auto_Autobox.py @@ -18,6 +18,9 @@ def test_Autobox_inputs(): ), no_clustering=dict(argstr='-noclust', ), + num_threads=dict(nohash=True, + usedefault=True, + ), out_file=dict(argstr='-prefix %s', name_source='in_file', name_template='%s_autobox', diff --git a/nipype/interfaces/afni/tests/test_auto_Automask.py b/nipype/interfaces/afni/tests/test_auto_Automask.py index f0a76037c2..7cea0f9eb4 100644 --- a/nipype/interfaces/afni/tests/test_auto_Automask.py +++ b/nipype/interfaces/afni/tests/test_auto_Automask.py @@ -27,6 +27,9 @@ def test_Automask_inputs(): mandatory=True, position=-1, ), + num_threads=dict(nohash=True, + usedefault=True, + ), out_file=dict(argstr='-prefix %s', name_source='in_file', name_template='%s_mask', diff --git a/nipype/interfaces/afni/tests/test_auto_Axialize.py b/nipype/interfaces/afni/tests/test_auto_Axialize.py index 6d04decdaa..a354d5a94d 100644 --- a/nipype/interfaces/afni/tests/test_auto_Axialize.py +++ b/nipype/interfaces/afni/tests/test_auto_Axialize.py @@ -23,6 +23,9 @@ def test_Axialize_inputs(): mandatory=True, position=-2, ), + num_threads=dict(nohash=True, + usedefault=True, + ), orientation=dict(argstr='-orient %s', ), out_file=dict(argstr='-prefix %s', diff --git a/nipype/interfaces/afni/tests/test_auto_Bandpass.py b/nipype/interfaces/afni/tests/test_auto_Bandpass.py index 5310eaa256..e11c2232b2 100644 --- a/nipype/interfaces/afni/tests/test_auto_Bandpass.py +++ b/nipype/interfaces/afni/tests/test_auto_Bandpass.py @@ -44,6 +44,9 @@ def test_Bandpass_inputs(): ), notrans=dict(argstr='-notrans', ), + num_threads=dict(nohash=True, + usedefault=True, + ), orthogonalize_dset=dict(argstr='-dsort %s', ), orthogonalize_file=dict(argstr='-ort %s', diff --git a/nipype/interfaces/afni/tests/test_auto_BlurInMask.py b/nipype/interfaces/afni/tests/test_auto_BlurInMask.py index eb4a571079..5d88296acf 100644 --- a/nipype/interfaces/afni/tests/test_auto_BlurInMask.py +++ b/nipype/interfaces/afni/tests/test_auto_BlurInMask.py @@ -28,6 +28,9 @@ def test_BlurInMask_inputs(): ), multimask=dict(argstr='-Mmask %s', ), + num_threads=dict(nohash=True, + usedefault=True, + ), options=dict(argstr='%s', position=2, ), diff --git a/nipype/interfaces/afni/tests/test_auto_BlurToFWHM.py b/nipype/interfaces/afni/tests/test_auto_BlurToFWHM.py index bf4d2a194c..86b4f6633d 100644 --- a/nipype/interfaces/afni/tests/test_auto_BlurToFWHM.py +++ b/nipype/interfaces/afni/tests/test_auto_BlurToFWHM.py @@ -25,6 +25,9 @@ def test_BlurToFWHM_inputs(): ), mask=dict(argstr='-blurmaster %s', ), + num_threads=dict(nohash=True, + usedefault=True, + ), out_file=dict(argstr='-prefix %s', name_source=['in_file'], name_template='%s_afni', diff --git a/nipype/interfaces/afni/tests/test_auto_Bucket.py b/nipype/interfaces/afni/tests/test_auto_Bucket.py index 1cf812fd73..a294efe4e5 100644 --- a/nipype/interfaces/afni/tests/test_auto_Bucket.py +++ b/nipype/interfaces/afni/tests/test_auto_Bucket.py @@ -16,6 +16,9 @@ def test_Bucket_inputs(): mandatory=True, position=-1, ), + num_threads=dict(nohash=True, + usedefault=True, + ), out_file=dict(argstr='-prefix %s', name_template='buck', ), diff --git a/nipype/interfaces/afni/tests/test_auto_Calc.py b/nipype/interfaces/afni/tests/test_auto_Calc.py index aa9d1222b7..9fd79af907 100644 --- a/nipype/interfaces/afni/tests/test_auto_Calc.py +++ b/nipype/interfaces/afni/tests/test_auto_Calc.py @@ -26,6 +26,9 @@ def test_Calc_inputs(): in_file_c=dict(argstr='-c %s', position=2, ), + num_threads=dict(nohash=True, + usedefault=True, + ), other=dict(argstr='', ), out_file=dict(argstr='-prefix %s', diff --git a/nipype/interfaces/afni/tests/test_auto_Cat.py b/nipype/interfaces/afni/tests/test_auto_Cat.py index c35c3e86b9..619fad5857 100644 --- a/nipype/interfaces/afni/tests/test_auto_Cat.py +++ b/nipype/interfaces/afni/tests/test_auto_Cat.py @@ -18,6 +18,9 @@ def test_Cat_inputs(): ), keepfree=dict(argstr='-nonfixed', ), + num_threads=dict(nohash=True, + usedefault=True, + ), omitconst=dict(argstr='-nonconst', ), out_cint=dict(xor=['out_format', 'out_nice', 'out_double', 'out_fint', 'out_int'], diff --git a/nipype/interfaces/afni/tests/test_auto_CatMatvec.py b/nipype/interfaces/afni/tests/test_auto_CatMatvec.py index d3d94569be..bac30741ef 100644 --- a/nipype/interfaces/afni/tests/test_auto_CatMatvec.py +++ b/nipype/interfaces/afni/tests/test_auto_CatMatvec.py @@ -25,6 +25,9 @@ def test_CatMatvec_inputs(): descr="indicates that the resulting matrix willbe written to outfile in the 'MATRIX(...)' format (FORM 3).This feature could be used, with clever scripting, to inputa matrix directly on the command line to program 3dWarp.", xor=['oneline', 'fourxfour'], ), + num_threads=dict(nohash=True, + usedefault=True, + ), oneline=dict(argstr='-ONELINE', descr='indicates that the resulting matrixwill simply be written as 12 numbers on one line.', xor=['matrix', 'fourxfour'], diff --git a/nipype/interfaces/afni/tests/test_auto_Copy.py b/nipype/interfaces/afni/tests/test_auto_Copy.py index 80338ccc57..74413f52da 100644 --- a/nipype/interfaces/afni/tests/test_auto_Copy.py +++ b/nipype/interfaces/afni/tests/test_auto_Copy.py @@ -17,6 +17,9 @@ def test_Copy_inputs(): mandatory=True, position=-2, ), + num_threads=dict(nohash=True, + usedefault=True, + ), out_file=dict(argstr='%s', name_source='in_file', name_template='%s_copy', diff --git a/nipype/interfaces/afni/tests/test_auto_Deconvolve.py b/nipype/interfaces/afni/tests/test_auto_Deconvolve.py index 0dfbec8deb..44c495dad0 100644 --- a/nipype/interfaces/afni/tests/test_auto_Deconvolve.py +++ b/nipype/interfaces/afni/tests/test_auto_Deconvolve.py @@ -74,6 +74,9 @@ def test_Deconvolve_inputs(): num_stimts=dict(argstr='-num_stimts %d', position=-6, ), + num_threads=dict(nohash=True, + usedefault=True, + ), ortvec=dict(argstr='ortvec %s', ), out_file=dict(argstr='-bucket %s', diff --git a/nipype/interfaces/afni/tests/test_auto_DegreeCentrality.py b/nipype/interfaces/afni/tests/test_auto_DegreeCentrality.py index cd4146a7b9..c740b952f0 100644 --- a/nipype/interfaces/afni/tests/test_auto_DegreeCentrality.py +++ b/nipype/interfaces/afni/tests/test_auto_DegreeCentrality.py @@ -23,6 +23,9 @@ def test_DegreeCentrality_inputs(): ), mask=dict(argstr='-mask %s', ), + num_threads=dict(nohash=True, + usedefault=True, + ), oned_file=dict(argstr='-out1D %s', ), out_file=dict(argstr='-prefix %s', diff --git a/nipype/interfaces/afni/tests/test_auto_Despike.py b/nipype/interfaces/afni/tests/test_auto_Despike.py index aedb50b684..7498669653 100644 --- a/nipype/interfaces/afni/tests/test_auto_Despike.py +++ b/nipype/interfaces/afni/tests/test_auto_Despike.py @@ -17,6 +17,9 @@ def test_Despike_inputs(): mandatory=True, position=-1, ), + num_threads=dict(nohash=True, + usedefault=True, + ), out_file=dict(argstr='-prefix %s', name_source='in_file', name_template='%s_despike', diff --git a/nipype/interfaces/afni/tests/test_auto_Detrend.py b/nipype/interfaces/afni/tests/test_auto_Detrend.py index 3fb771cbfc..6979b77057 100644 --- a/nipype/interfaces/afni/tests/test_auto_Detrend.py +++ b/nipype/interfaces/afni/tests/test_auto_Detrend.py @@ -17,6 +17,9 @@ def test_Detrend_inputs(): mandatory=True, position=-1, ), + num_threads=dict(nohash=True, + usedefault=True, + ), out_file=dict(argstr='-prefix %s', name_source='in_file', name_template='%s_detrend', diff --git a/nipype/interfaces/afni/tests/test_auto_Dot.py b/nipype/interfaces/afni/tests/test_auto_Dot.py index 21cebb28fe..371ef00419 100644 --- a/nipype/interfaces/afni/tests/test_auto_Dot.py +++ b/nipype/interfaces/afni/tests/test_auto_Dot.py @@ -35,6 +35,9 @@ def test_Dot_inputs(): ), mrange=dict(argstr='-mrange %s %s', ), + num_threads=dict(nohash=True, + usedefault=True, + ), out_file=dict(argstr=' |& tee %s', position=-1, ), diff --git a/nipype/interfaces/afni/tests/test_auto_ECM.py b/nipype/interfaces/afni/tests/test_auto_ECM.py index 39bdefe0ba..4c994674e9 100644 --- a/nipype/interfaces/afni/tests/test_auto_ECM.py +++ b/nipype/interfaces/afni/tests/test_auto_ECM.py @@ -33,6 +33,9 @@ def test_ECM_inputs(): ), memory=dict(argstr='-memory %f', ), + num_threads=dict(nohash=True, + usedefault=True, + ), out_file=dict(argstr='-prefix %s', name_source=['in_file'], name_template='%s_afni', diff --git a/nipype/interfaces/afni/tests/test_auto_Edge3.py b/nipype/interfaces/afni/tests/test_auto_Edge3.py index 51a4dc865d..9c849c552e 100644 --- a/nipype/interfaces/afni/tests/test_auto_Edge3.py +++ b/nipype/interfaces/afni/tests/test_auto_Edge3.py @@ -28,6 +28,9 @@ def test_Edge3_inputs(): nscale=dict(argstr='-nscale', xor=['fscale', 'gscale', 'scale_floats'], ), + num_threads=dict(nohash=True, + usedefault=True, + ), out_file=dict(argstr='-prefix %s', position=-1, ), diff --git a/nipype/interfaces/afni/tests/test_auto_Eval.py b/nipype/interfaces/afni/tests/test_auto_Eval.py index 490b09e486..b5492db2c8 100644 --- a/nipype/interfaces/afni/tests/test_auto_Eval.py +++ b/nipype/interfaces/afni/tests/test_auto_Eval.py @@ -26,6 +26,9 @@ def test_Eval_inputs(): in_file_c=dict(argstr='-c %s', position=2, ), + num_threads=dict(nohash=True, + usedefault=True, + ), other=dict(argstr='', ), out1D=dict(argstr='-1D', diff --git a/nipype/interfaces/afni/tests/test_auto_Fim.py b/nipype/interfaces/afni/tests/test_auto_Fim.py index e80adb6801..fa54096459 100644 --- a/nipype/interfaces/afni/tests/test_auto_Fim.py +++ b/nipype/interfaces/afni/tests/test_auto_Fim.py @@ -24,6 +24,9 @@ def test_Fim_inputs(): mandatory=True, position=1, ), + num_threads=dict(nohash=True, + usedefault=True, + ), out=dict(argstr='-out %s', position=4, ), diff --git a/nipype/interfaces/afni/tests/test_auto_Fourier.py b/nipype/interfaces/afni/tests/test_auto_Fourier.py index 0573252de4..2e0ee956cd 100644 --- a/nipype/interfaces/afni/tests/test_auto_Fourier.py +++ b/nipype/interfaces/afni/tests/test_auto_Fourier.py @@ -23,6 +23,9 @@ def test_Fourier_inputs(): lowpass=dict(argstr='-lowpass %f', mandatory=True, ), + num_threads=dict(nohash=True, + usedefault=True, + ), out_file=dict(argstr='-prefix %s', name_source='in_file', name_template='%s_fourier', diff --git a/nipype/interfaces/afni/tests/test_auto_LFCD.py b/nipype/interfaces/afni/tests/test_auto_LFCD.py index c3690b8fd5..c952429894 100644 --- a/nipype/interfaces/afni/tests/test_auto_LFCD.py +++ b/nipype/interfaces/afni/tests/test_auto_LFCD.py @@ -23,6 +23,9 @@ def test_LFCD_inputs(): ), mask=dict(argstr='-mask %s', ), + num_threads=dict(nohash=True, + usedefault=True, + ), out_file=dict(argstr='-prefix %s', name_source=['in_file'], name_template='%s_afni', diff --git a/nipype/interfaces/afni/tests/test_auto_MaskTool.py b/nipype/interfaces/afni/tests/test_auto_MaskTool.py index 0121d68d7d..7a2fe71d02 100644 --- a/nipype/interfaces/afni/tests/test_auto_MaskTool.py +++ b/nipype/interfaces/afni/tests/test_auto_MaskTool.py @@ -35,6 +35,9 @@ def test_MaskTool_inputs(): ), inter=dict(argstr='-inter', ), + num_threads=dict(nohash=True, + usedefault=True, + ), out_file=dict(argstr='-prefix %s', name_source='in_file', name_template='%s_mask', diff --git a/nipype/interfaces/afni/tests/test_auto_Maskave.py b/nipype/interfaces/afni/tests/test_auto_Maskave.py index 9c58ea432b..aa97b64dd8 100644 --- a/nipype/interfaces/afni/tests/test_auto_Maskave.py +++ b/nipype/interfaces/afni/tests/test_auto_Maskave.py @@ -20,6 +20,9 @@ def test_Maskave_inputs(): mask=dict(argstr='-mask %s', position=1, ), + num_threads=dict(nohash=True, + usedefault=True, + ), out_file=dict(argstr='> %s', keep_extension=True, name_source='in_file', diff --git a/nipype/interfaces/afni/tests/test_auto_Means.py b/nipype/interfaces/afni/tests/test_auto_Means.py index 03bab07dcc..5fa829d742 100644 --- a/nipype/interfaces/afni/tests/test_auto_Means.py +++ b/nipype/interfaces/afni/tests/test_auto_Means.py @@ -29,6 +29,9 @@ def test_Means_inputs(): ), non_zero=dict(argstr='-non_zero', ), + num_threads=dict(nohash=True, + usedefault=True, + ), out_file=dict(argstr='-prefix %s', name_source='in_file_a', name_template='%s_mean', diff --git a/nipype/interfaces/afni/tests/test_auto_Merge.py b/nipype/interfaces/afni/tests/test_auto_Merge.py index f943128da9..fde9a76cc4 100644 --- a/nipype/interfaces/afni/tests/test_auto_Merge.py +++ b/nipype/interfaces/afni/tests/test_auto_Merge.py @@ -22,6 +22,9 @@ def test_Merge_inputs(): mandatory=True, position=-1, ), + num_threads=dict(nohash=True, + usedefault=True, + ), out_file=dict(argstr='-prefix %s', name_source='in_file', name_template='%s_merge', diff --git a/nipype/interfaces/afni/tests/test_auto_Notes.py b/nipype/interfaces/afni/tests/test_auto_Notes.py index ca08111696..29418bccbb 100644 --- a/nipype/interfaces/afni/tests/test_auto_Notes.py +++ b/nipype/interfaces/afni/tests/test_auto_Notes.py @@ -24,6 +24,9 @@ def test_Notes_inputs(): mandatory=True, position=-1, ), + num_threads=dict(nohash=True, + usedefault=True, + ), out_file=dict(argstr='%s', ), outputtype=dict(), diff --git a/nipype/interfaces/afni/tests/test_auto_Qwarp.py b/nipype/interfaces/afni/tests/test_auto_Qwarp.py index 2848fe97f8..5285041812 100644 --- a/nipype/interfaces/afni/tests/test_auto_Qwarp.py +++ b/nipype/interfaces/afni/tests/test_auto_Qwarp.py @@ -98,6 +98,9 @@ def test_Qwarp_inputs(): ), noweight=dict(argstr='-noweight', ), + num_threads=dict(nohash=True, + usedefault=True, + ), out_file=dict(argstr='-prefix %s', genfile=True, name_source=['in_file'], diff --git a/nipype/interfaces/afni/tests/test_auto_Remlfit.py b/nipype/interfaces/afni/tests/test_auto_Remlfit.py index a061a01449..c9c5e0f69c 100644 --- a/nipype/interfaces/afni/tests/test_auto_Remlfit.py +++ b/nipype/interfaces/afni/tests/test_auto_Remlfit.py @@ -57,6 +57,9 @@ def test_Remlfit_inputs(): ), nofdr=dict(argstr='-noFDR', ), + num_threads=dict(nohash=True, + usedefault=True, + ), obeta=dict(argstr='-Obeta %s', ), obuck=dict(argstr='-Obuck %s', diff --git a/nipype/interfaces/afni/tests/test_auto_Resample.py b/nipype/interfaces/afni/tests/test_auto_Resample.py index 4fabc2749c..55d2bf0d9a 100644 --- a/nipype/interfaces/afni/tests/test_auto_Resample.py +++ b/nipype/interfaces/afni/tests/test_auto_Resample.py @@ -19,6 +19,9 @@ def test_Resample_inputs(): ), master=dict(argstr='-master %s', ), + num_threads=dict(nohash=True, + usedefault=True, + ), orientation=dict(argstr='-orient %s', ), out_file=dict(argstr='-prefix %s', diff --git a/nipype/interfaces/afni/tests/test_auto_Retroicor.py b/nipype/interfaces/afni/tests/test_auto_Retroicor.py index 6822425f00..b784368936 100644 --- a/nipype/interfaces/afni/tests/test_auto_Retroicor.py +++ b/nipype/interfaces/afni/tests/test_auto_Retroicor.py @@ -24,6 +24,9 @@ def test_Retroicor_inputs(): mandatory=True, position=-1, ), + num_threads=dict(nohash=True, + usedefault=True, + ), order=dict(argstr='-order %s', position=-5, ), diff --git a/nipype/interfaces/afni/tests/test_auto_SVMTest.py b/nipype/interfaces/afni/tests/test_auto_SVMTest.py index 496f947a28..47ce5eeaf3 100644 --- a/nipype/interfaces/afni/tests/test_auto_SVMTest.py +++ b/nipype/interfaces/afni/tests/test_auto_SVMTest.py @@ -26,6 +26,9 @@ def test_SVMTest_inputs(): ), nopredcensord=dict(argstr='-nopredcensord', ), + num_threads=dict(nohash=True, + usedefault=True, + ), options=dict(argstr='%s', ), out_file=dict(argstr='-predictions %s', diff --git a/nipype/interfaces/afni/tests/test_auto_SVMTrain.py b/nipype/interfaces/afni/tests/test_auto_SVMTrain.py index 25973372e6..5405e3704f 100644 --- a/nipype/interfaces/afni/tests/test_auto_SVMTrain.py +++ b/nipype/interfaces/afni/tests/test_auto_SVMTrain.py @@ -38,6 +38,9 @@ def test_SVMTrain_inputs(): ), nomodelmask=dict(argstr='-nomodelmask', ), + num_threads=dict(nohash=True, + usedefault=True, + ), options=dict(argstr='%s', ), out_file=dict(argstr='-bucket %s', diff --git a/nipype/interfaces/afni/tests/test_auto_SkullStrip.py b/nipype/interfaces/afni/tests/test_auto_SkullStrip.py index 37b24cfb76..9a35cbcd1d 100644 --- a/nipype/interfaces/afni/tests/test_auto_SkullStrip.py +++ b/nipype/interfaces/afni/tests/test_auto_SkullStrip.py @@ -17,6 +17,9 @@ def test_SkullStrip_inputs(): mandatory=True, position=1, ), + num_threads=dict(nohash=True, + usedefault=True, + ), out_file=dict(argstr='-prefix %s', name_source='in_file', name_template='%s_skullstrip', diff --git a/nipype/interfaces/afni/tests/test_auto_TCat.py b/nipype/interfaces/afni/tests/test_auto_TCat.py index 9c72dcd545..0eba85364a 100644 --- a/nipype/interfaces/afni/tests/test_auto_TCat.py +++ b/nipype/interfaces/afni/tests/test_auto_TCat.py @@ -17,6 +17,9 @@ def test_TCat_inputs(): mandatory=True, position=-1, ), + num_threads=dict(nohash=True, + usedefault=True, + ), out_file=dict(argstr='-prefix %s', name_source='in_files', name_template='%s_tcat', diff --git a/nipype/interfaces/afni/tests/test_auto_TCorr1D.py b/nipype/interfaces/afni/tests/test_auto_TCorr1D.py index e42ac2b7d5..401ebdc2cb 100644 --- a/nipype/interfaces/afni/tests/test_auto_TCorr1D.py +++ b/nipype/interfaces/afni/tests/test_auto_TCorr1D.py @@ -16,6 +16,9 @@ def test_TCorr1D_inputs(): position=1, xor=['pearson', 'spearman', 'quadrant'], ), + num_threads=dict(nohash=True, + usedefault=True, + ), out_file=dict(argstr='-prefix %s', keep_extension=True, name_source='xset', diff --git a/nipype/interfaces/afni/tests/test_auto_TCorrMap.py b/nipype/interfaces/afni/tests/test_auto_TCorrMap.py index 8c80f15080..94e8f8f332 100644 --- a/nipype/interfaces/afni/tests/test_auto_TCorrMap.py +++ b/nipype/interfaces/afni/tests/test_auto_TCorrMap.py @@ -55,6 +55,9 @@ def test_TCorrMap_inputs(): name_source='in_file', suffix='_mean', ), + num_threads=dict(nohash=True, + usedefault=True, + ), out_file=dict(argstr='-prefix %s', name_source=['in_file'], name_template='%s_afni', diff --git a/nipype/interfaces/afni/tests/test_auto_TCorrelate.py b/nipype/interfaces/afni/tests/test_auto_TCorrelate.py index e2e100cdb7..1525dc5d5b 100644 --- a/nipype/interfaces/afni/tests/test_auto_TCorrelate.py +++ b/nipype/interfaces/afni/tests/test_auto_TCorrelate.py @@ -12,6 +12,9 @@ def test_TCorrelate_inputs(): ignore_exception=dict(nohash=True, usedefault=True, ), + num_threads=dict(nohash=True, + usedefault=True, + ), out_file=dict(argstr='-prefix %s', name_source='xset', name_template='%s_tcorr', diff --git a/nipype/interfaces/afni/tests/test_auto_TNorm.py b/nipype/interfaces/afni/tests/test_auto_TNorm.py index 3b9fac4b98..32686da795 100644 --- a/nipype/interfaces/afni/tests/test_auto_TNorm.py +++ b/nipype/interfaces/afni/tests/test_auto_TNorm.py @@ -27,6 +27,9 @@ def test_TNorm_inputs(): ), normx=dict(argstr='-normx', ), + num_threads=dict(nohash=True, + usedefault=True, + ), out_file=dict(argstr='-prefix %s', name_source='in_file', name_template='%s_tnorm', diff --git a/nipype/interfaces/afni/tests/test_auto_TShift.py b/nipype/interfaces/afni/tests/test_auto_TShift.py index e167205995..1166448066 100644 --- a/nipype/interfaces/afni/tests/test_auto_TShift.py +++ b/nipype/interfaces/afni/tests/test_auto_TShift.py @@ -21,6 +21,9 @@ def test_TShift_inputs(): ), interp=dict(argstr='-%s', ), + num_threads=dict(nohash=True, + usedefault=True, + ), out_file=dict(argstr='-prefix %s', name_source='in_file', name_template='%s_tshift', diff --git a/nipype/interfaces/afni/tests/test_auto_TStat.py b/nipype/interfaces/afni/tests/test_auto_TStat.py index f09fb5b4af..1c794aba5d 100644 --- a/nipype/interfaces/afni/tests/test_auto_TStat.py +++ b/nipype/interfaces/afni/tests/test_auto_TStat.py @@ -19,6 +19,9 @@ def test_TStat_inputs(): ), mask=dict(argstr='-mask %s', ), + num_threads=dict(nohash=True, + usedefault=True, + ), options=dict(argstr='%s', ), out_file=dict(argstr='-prefix %s', diff --git a/nipype/interfaces/afni/tests/test_auto_To3D.py b/nipype/interfaces/afni/tests/test_auto_To3D.py index 0df075d87f..9e3dafffa3 100644 --- a/nipype/interfaces/afni/tests/test_auto_To3D.py +++ b/nipype/interfaces/afni/tests/test_auto_To3D.py @@ -24,6 +24,9 @@ def test_To3D_inputs(): mandatory=True, position=-1, ), + num_threads=dict(nohash=True, + usedefault=True, + ), out_file=dict(argstr='-prefix %s', name_source=['in_folder'], name_template='%s', diff --git a/nipype/interfaces/afni/tests/test_auto_Undump.py b/nipype/interfaces/afni/tests/test_auto_Undump.py index 808de86daf..ffd50b21d7 100644 --- a/nipype/interfaces/afni/tests/test_auto_Undump.py +++ b/nipype/interfaces/afni/tests/test_auto_Undump.py @@ -29,6 +29,9 @@ def test_Undump_inputs(): ), mask_file=dict(argstr='-mask %s', ), + num_threads=dict(nohash=True, + usedefault=True, + ), out_file=dict(argstr='-prefix %s', name_source='in_file', ), diff --git a/nipype/interfaces/afni/tests/test_auto_Unifize.py b/nipype/interfaces/afni/tests/test_auto_Unifize.py index 2c37e13fb1..ba8ac7263f 100644 --- a/nipype/interfaces/afni/tests/test_auto_Unifize.py +++ b/nipype/interfaces/afni/tests/test_auto_Unifize.py @@ -25,6 +25,9 @@ def test_Unifize_inputs(): ), no_duplo=dict(argstr='-noduplo', ), + num_threads=dict(nohash=True, + usedefault=True, + ), out_file=dict(argstr='-prefix %s', name_source='in_file', ), diff --git a/nipype/interfaces/afni/tests/test_auto_Volreg.py b/nipype/interfaces/afni/tests/test_auto_Volreg.py index 314ac04743..26564b0446 100644 --- a/nipype/interfaces/afni/tests/test_auto_Volreg.py +++ b/nipype/interfaces/afni/tests/test_auto_Volreg.py @@ -30,6 +30,9 @@ def test_Volreg_inputs(): name_template='%s_md.1D', position=-4, ), + num_threads=dict(nohash=True, + usedefault=True, + ), oned_file=dict(argstr='-1Dfile %s', keep_extension=True, name_source='in_file', diff --git a/nipype/interfaces/afni/tests/test_auto_Warp.py b/nipype/interfaces/afni/tests/test_auto_Warp.py index e370d32058..592482b207 100644 --- a/nipype/interfaces/afni/tests/test_auto_Warp.py +++ b/nipype/interfaces/afni/tests/test_auto_Warp.py @@ -29,6 +29,9 @@ def test_Warp_inputs(): ), newgrid=dict(argstr='-newgrid %f', ), + num_threads=dict(nohash=True, + usedefault=True, + ), out_file=dict(argstr='-prefix %s', name_source='in_file', name_template='%s_warp', diff --git a/nipype/interfaces/afni/tests/test_auto_ZCutUp.py b/nipype/interfaces/afni/tests/test_auto_ZCutUp.py index 8019b1dcf8..462aef5f32 100644 --- a/nipype/interfaces/afni/tests/test_auto_ZCutUp.py +++ b/nipype/interfaces/afni/tests/test_auto_ZCutUp.py @@ -19,6 +19,9 @@ def test_ZCutUp_inputs(): ), keep=dict(argstr='-keep %s', ), + num_threads=dict(nohash=True, + usedefault=True, + ), out_file=dict(argstr='-prefix %s', name_source='in_file', name_template='%s_zcutup', diff --git a/nipype/interfaces/afni/tests/test_auto_Zcat.py b/nipype/interfaces/afni/tests/test_auto_Zcat.py index 48f742df5e..b7fb655604 100644 --- a/nipype/interfaces/afni/tests/test_auto_Zcat.py +++ b/nipype/interfaces/afni/tests/test_auto_Zcat.py @@ -25,6 +25,9 @@ def test_Zcat_inputs(): nscale=dict(argstr='-nscale', xor=['fscale'], ), + num_threads=dict(nohash=True, + usedefault=True, + ), out_file=dict(argstr='-prefix %s', name_template='zcat', ), diff --git a/nipype/interfaces/afni/tests/test_auto_Zeropad.py b/nipype/interfaces/afni/tests/test_auto_Zeropad.py index 551498e1ab..f1c6acf3b0 100644 --- a/nipype/interfaces/afni/tests/test_auto_Zeropad.py +++ b/nipype/interfaces/afni/tests/test_auto_Zeropad.py @@ -50,6 +50,9 @@ def test_Zeropad_inputs(): mm=dict(argstr='-mm', xor=['master'], ), + num_threads=dict(nohash=True, + usedefault=True, + ), out_file=dict(argstr='-prefix %s', name_template='zeropad', ), From 2e16f838244098236ee05d3c9ac0d3bb4857c904 Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Thu, 5 Oct 2017 16:45:58 -0400 Subject: [PATCH 365/643] LOG: Write node name when running --- nipype/pipeline/engine/nodes.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nipype/pipeline/engine/nodes.py b/nipype/pipeline/engine/nodes.py index 680639ee8f..f5a0eb0b99 100644 --- a/nipype/pipeline/engine/nodes.py +++ b/nipype/pipeline/engine/nodes.py @@ -633,7 +633,7 @@ def _run_command(self, execute, copyfiles=True): if copyfiles: self._copyfiles_to_wd(cwd, execute) - message = 'Running a "%s" interface' + message = 'Running node "%s" (a "%s" interface)' if issubclass(self._interface.__class__, CommandLine): try: cmd = self._interface.cmdline @@ -644,7 +644,8 @@ def _run_command(self, execute, copyfiles=True): with open(cmdfile, 'wt') as fd: print(cmd + "\n", file=fd) message += ', a CommandLine Interface with command:\n%s' % cmd - logger.info(message + '.', self._interface.__class__.__name__) + logger.info(message + '.', self.name, + self._interface.__class__.__name__) try: result = self._interface.run() except Exception as msg: From b099e32c82990a3b4e6556b6498fa591e593c8b3 Mon Sep 17 00:00:00 2001 From: oesteban Date: Thu, 5 Oct 2017 13:58:24 -0700 Subject: [PATCH 366/643] make code work with current xvfbwrapper and make it bwd compatible. add tests for this --- nipype/utils/config.py | 14 ++++++------ nipype/utils/tests/test_config.py | 38 +++++++++++++++++++++++++++++-- 2 files changed, 43 insertions(+), 9 deletions(-) diff --git a/nipype/utils/config.py b/nipype/utils/config.py index 94d5427b88..4113d6d8c7 100644 --- a/nipype/utils/config.py +++ b/nipype/utils/config.py @@ -266,7 +266,7 @@ def get_display(self): # shell=True, stdout=sp.DEVNULL)) if self._display is not None: - return ':%d' % self._display.vdisplay_num + return ':%d' % self._display.new_display sysdisplay = None if self._config.has_option('execution', 'display_variable'): @@ -281,7 +281,7 @@ def _mock(): # Store a fake Xvfb object ndisp = int(sysdisplay.split(':')[-1]) - Xvfb = namedtuple('Xvfb', ['vdisplay_num', 'stop']) + Xvfb = namedtuple('Xvfb', ['new_display', 'stop']) self._display = Xvfb(ndisp, _mock) return sysdisplay else: @@ -306,12 +306,12 @@ def _mock(): self._display = Xvfb(nolisten='tcp') self._display.start() - # Older versions of Xvfb used vdisplay_num - if hasattr(self._display, 'vdisplay_num'): - return ':%d' % self._display.vdisplay_num + # Older versions of xvfbwrapper used vdisplay_num + if not hasattr(self._display, 'new_display'): + setattr(self._display, 'new_display', + self._display.vdisplay_num) - if hasattr(self._display, 'new_display'): - return ':%d' % self._display.new_display + return ':%d' % self._display.new_display def stop_display(self): """Closes the display if started""" diff --git a/nipype/utils/tests/test_config.py b/nipype/utils/tests/test_config.py index 4cb7bcd350..60fd655e3b 100644 --- a/nipype/utils/tests/test_config.py +++ b/nipype/utils/tests/test_config.py @@ -15,8 +15,16 @@ except ImportError: has_Xvfb = False -xvfbpatch = MagicMock() -xvfbpatch.Xvfb.return_value = MagicMock(vdisplay_num=2010) +# Define mocks for xvfbwrapper. Do not forget the spec to ensure that +# hasattr() checks return False with missing attributes. +xvfbpatch = MagicMock(spec=['Xvfb']) +xvfbpatch.Xvfb.return_value = MagicMock(spec=['new_display', 'start', 'stop'], + new_display=2010) + +# Mock the legacy xvfbwrapper.Xvfb class (changed display attribute name) +xvfbpatch_old = MagicMock(spec=['Xvfb']) +xvfbpatch_old.Xvfb.return_value = MagicMock(spec=['vdisplay_num', 'start', 'stop'], + vdisplay_num=2010) @pytest.mark.parametrize('dispnum', range(5)) @@ -71,6 +79,32 @@ def test_display_empty_patched(monkeypatch): assert config.get_display() == ':2010' +def test_display_noconfig_nosystem_patched_oldxvfbwrapper(monkeypatch): + """ + Check that when no $DISPLAY nor option are specified, + a virtual Xvfb is used (with a legacy version of xvfbwrapper). + """ + config._display = None + if config.has_option('execution', 'display_variable'): + config._config.remove_option('execution', 'display_variable') + monkeypatch.delitem(os.environ, 'DISPLAY', raising=False) + monkeypatch.setitem(sys.modules, 'xvfbwrapper', xvfbpatch_old) + assert config.get_display() == ":2010" + + +def test_display_empty_patched_oldxvfbwrapper(monkeypatch): + """ + Check that when $DISPLAY is empty string and no option is specified, + a virtual Xvfb is used (with a legacy version of xvfbwrapper). + """ + config._display = None + if config.has_option('execution', 'display_variable'): + config._config.remove_option('execution', 'display_variable') + monkeypatch.setitem(os.environ, 'DISPLAY', '') + monkeypatch.setitem(sys.modules, 'xvfbwrapper', xvfbpatch_old) + assert config.get_display() == ':2010' + + def test_display_noconfig_nosystem_notinstalled(monkeypatch): """ Check that an exception is raised if xvfbwrapper is not installed From ef7ccb0d6ef4249d791eaee3622251a807ddb28c Mon Sep 17 00:00:00 2001 From: oesteban Date: Thu, 5 Oct 2017 14:05:46 -0700 Subject: [PATCH 367/643] add checks to see if values are cached --- nipype/utils/tests/test_config.py | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/nipype/utils/tests/test_config.py b/nipype/utils/tests/test_config.py index 60fd655e3b..869b733c2e 100644 --- a/nipype/utils/tests/test_config.py +++ b/nipype/utils/tests/test_config.py @@ -35,6 +35,8 @@ def test_display_config(monkeypatch, dispnum): config.set('execution', 'display_variable', dispstr) monkeypatch.delitem(os.environ, 'DISPLAY', raising=False) assert config.get_display() == config.get('execution', 'display_variable') + # Test that it was correctly cached + assert config.get_display() == config.get('execution', 'display_variable') @pytest.mark.parametrize('dispnum', range(5)) @@ -45,6 +47,8 @@ def test_display_system(monkeypatch, dispnum): dispstr = ':%d' % dispnum monkeypatch.setitem(os.environ, 'DISPLAY', dispstr) assert config.get_display() == dispstr + # Test that it was correctly cached + assert config.get_display() == dispstr def test_display_config_and_system(monkeypatch): @@ -54,6 +58,8 @@ def test_display_config_and_system(monkeypatch): config.set('execution', 'display_variable', dispstr) monkeypatch.setitem(os.environ, 'DISPLAY', ':0') assert config.get_display() == dispstr + # Test that it was correctly cached + assert config.get_display() == dispstr def test_display_noconfig_nosystem_patched(monkeypatch): @@ -64,6 +70,8 @@ def test_display_noconfig_nosystem_patched(monkeypatch): monkeypatch.delitem(os.environ, 'DISPLAY', raising=False) monkeypatch.setitem(sys.modules, 'xvfbwrapper', xvfbpatch) assert config.get_display() == ":2010" + # Test that it was correctly cached + assert config.get_display() == ':2010' def test_display_empty_patched(monkeypatch): @@ -77,6 +85,8 @@ def test_display_empty_patched(monkeypatch): monkeypatch.setitem(os.environ, 'DISPLAY', '') monkeypatch.setitem(sys.modules, 'xvfbwrapper', xvfbpatch) assert config.get_display() == ':2010' + # Test that it was correctly cached + assert config.get_display() == ':2010' def test_display_noconfig_nosystem_patched_oldxvfbwrapper(monkeypatch): @@ -90,6 +100,8 @@ def test_display_noconfig_nosystem_patched_oldxvfbwrapper(monkeypatch): monkeypatch.delitem(os.environ, 'DISPLAY', raising=False) monkeypatch.setitem(sys.modules, 'xvfbwrapper', xvfbpatch_old) assert config.get_display() == ":2010" + # Test that it was correctly cached + assert config.get_display() == ':2010' def test_display_empty_patched_oldxvfbwrapper(monkeypatch): @@ -103,6 +115,8 @@ def test_display_empty_patched_oldxvfbwrapper(monkeypatch): monkeypatch.setitem(os.environ, 'DISPLAY', '') monkeypatch.setitem(sys.modules, 'xvfbwrapper', xvfbpatch_old) assert config.get_display() == ':2010' + # Test that it was correctly cached + assert config.get_display() == ':2010' def test_display_noconfig_nosystem_notinstalled(monkeypatch): @@ -143,7 +157,10 @@ def test_display_noconfig_nosystem_installed(monkeypatch): if config.has_option('execution', 'display_variable'): config._config.remove_option('execution', 'display_variable') monkeypatch.delitem(os.environ, 'DISPLAY', raising=False) - assert int(config.get_display().split(':')[-1]) > 1000 + newdisp = config.get_display() + assert int(newdisp.split(':')[-1]) > 1000 + # Test that it was correctly cached + assert config.get_display() == newdisp @pytest.mark.skipif(not has_Xvfb, reason='xvfbwrapper not installed') @@ -156,7 +173,10 @@ def test_display_empty_installed(monkeypatch): if config.has_option('execution', 'display_variable'): config._config.remove_option('execution', 'display_variable') monkeypatch.setitem(os.environ, 'DISPLAY', '') - assert int(config.get_display().split(':')[-1]) > 1000 + newdisp = config.get_display() + assert int(newdisp.split(':')[-1]) > 1000 + # Test that it was correctly cached + assert config.get_display() == newdisp def test_display_empty_macosx(monkeypatch): From 799dfab7bdaa3dae3cf68ade8ce7b2c61249628e Mon Sep 17 00:00:00 2001 From: oesteban Date: Thu, 5 Oct 2017 19:32:06 -0700 Subject: [PATCH 368/643] @effigies' and @satra's comments --- nipype/interfaces/base.py | 8 ++++---- nipype/pipeline/plugins/multiproc.py | 5 ++--- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/nipype/interfaces/base.py b/nipype/interfaces/base.py index 7efa602441..c63d64a7f1 100644 --- a/nipype/interfaces/base.py +++ b/nipype/interfaces/base.py @@ -1467,11 +1467,11 @@ class must be instantiated with a command argument >>> cli.cmdline # doctest: +ALLOW_UNICODE 'ls -al' - >>> pprint.pprint(cli.inputs.trait_get()) # doctest: +NORMALIZE_WHITESPACE +ALLOW_UNICODE + # Use get_traitsfree() to check all inputs set + >>> pprint.pprint(cli.inputs.get_traitsfree()) # doctest: +NORMALIZE_WHITESPACE +ALLOW_UNICODE {'args': '-al', 'environ': {'DISPLAY': ':1'}, - 'ignore_exception': False, - 'terminal_output': } + 'ignore_exception': False} >>> cli.inputs.get_hashval()[0][0] # doctest: +ALLOW_UNICODE ('args', '-al') @@ -1638,7 +1638,7 @@ def _format_arg(self, name, trait_spec, value): # Depending on whether we stick with traitlets, and whether or # not we beef up traitlets.List, we may want to put some # type-checking code here as well - sep = trait_spec.sep or ' ' + sep = trait_spec.sep if trait_spec.sep is not None else ' ' if argstr.endswith('...'): # repeatable option diff --git a/nipype/pipeline/plugins/multiproc.py b/nipype/pipeline/plugins/multiproc.py index 7070ae1da5..717d5fd810 100644 --- a/nipype/pipeline/plugins/multiproc.py +++ b/nipype/pipeline/plugins/multiproc.py @@ -139,9 +139,8 @@ def _submit_job(self, node, updatehash=False): self._taskid += 1 # Don't allow streaming outputs - if hasattr(node.interface, 'terminal_output') and \ - node.interface.terminal_output == 'stream': - node.interface.terminal_output = 'allatonce' + if getattr(node, 'terminal_output', '') == 'stream': + node.terminal_output = 'allatonce' self._task_obj[self._taskid] = self.pool.apply_async( run_node, (node, updatehash, self._taskid), From 8ed12f68dbc0cafd113b7ebab7f66b77c94b4426 Mon Sep 17 00:00:00 2001 From: oesteban Date: Thu, 5 Oct 2017 19:34:50 -0700 Subject: [PATCH 369/643] fix overcorrection --- nipype/pipeline/plugins/multiproc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nipype/pipeline/plugins/multiproc.py b/nipype/pipeline/plugins/multiproc.py index 717d5fd810..657a26eca4 100644 --- a/nipype/pipeline/plugins/multiproc.py +++ b/nipype/pipeline/plugins/multiproc.py @@ -139,8 +139,8 @@ def _submit_job(self, node, updatehash=False): self._taskid += 1 # Don't allow streaming outputs - if getattr(node, 'terminal_output', '') == 'stream': - node.terminal_output = 'allatonce' + if getattr(node.interface, 'terminal_output', '') == 'stream': + node.interface.terminal_output = 'allatonce' self._task_obj[self._taskid] = self.pool.apply_async( run_node, (node, updatehash, self._taskid), From a66678c0d0ee5150632cf433b2b8083452292e8b Mon Sep 17 00:00:00 2001 From: oesteban Date: Thu, 5 Oct 2017 19:40:53 -0700 Subject: [PATCH 370/643] update specs --- nipype/interfaces/afni/tests/test_auto_ABoverlap.py | 6 +++++- nipype/interfaces/afni/tests/test_auto_AFNICommand.py | 6 +++++- nipype/interfaces/afni/tests/test_auto_AFNICommandBase.py | 3 ++- nipype/interfaces/afni/tests/test_auto_AFNIPythonCommand.py | 6 +++++- nipype/interfaces/afni/tests/test_auto_AFNItoNIFTI.py | 6 +++++- nipype/interfaces/afni/tests/test_auto_AlignEpiAnatPy.py | 3 ++- nipype/interfaces/afni/tests/test_auto_Allineate.py | 6 +++++- nipype/interfaces/afni/tests/test_auto_AutoTLRC.py | 3 ++- nipype/interfaces/afni/tests/test_auto_AutoTcorrelate.py | 6 +++++- nipype/interfaces/afni/tests/test_auto_Autobox.py | 6 +++++- nipype/interfaces/afni/tests/test_auto_Automask.py | 6 +++++- nipype/interfaces/afni/tests/test_auto_Axialize.py | 6 +++++- nipype/interfaces/afni/tests/test_auto_Bandpass.py | 6 +++++- nipype/interfaces/afni/tests/test_auto_BlurInMask.py | 6 +++++- nipype/interfaces/afni/tests/test_auto_BlurToFWHM.py | 6 +++++- nipype/interfaces/afni/tests/test_auto_BrickStat.py | 3 ++- nipype/interfaces/afni/tests/test_auto_Bucket.py | 6 +++++- nipype/interfaces/afni/tests/test_auto_Calc.py | 6 +++++- nipype/interfaces/afni/tests/test_auto_Cat.py | 6 +++++- nipype/interfaces/afni/tests/test_auto_CatMatvec.py | 6 +++++- nipype/interfaces/afni/tests/test_auto_CenterMass.py | 3 ++- nipype/interfaces/afni/tests/test_auto_ClipLevel.py | 3 ++- nipype/interfaces/afni/tests/test_auto_Copy.py | 6 +++++- nipype/interfaces/afni/tests/test_auto_Deconvolve.py | 6 +++++- nipype/interfaces/afni/tests/test_auto_DegreeCentrality.py | 6 +++++- nipype/interfaces/afni/tests/test_auto_Despike.py | 6 +++++- nipype/interfaces/afni/tests/test_auto_Detrend.py | 6 +++++- nipype/interfaces/afni/tests/test_auto_Dot.py | 6 +++++- nipype/interfaces/afni/tests/test_auto_ECM.py | 6 +++++- nipype/interfaces/afni/tests/test_auto_Edge3.py | 6 +++++- nipype/interfaces/afni/tests/test_auto_Eval.py | 6 +++++- nipype/interfaces/afni/tests/test_auto_FWHMx.py | 3 ++- nipype/interfaces/afni/tests/test_auto_Fim.py | 6 +++++- nipype/interfaces/afni/tests/test_auto_Fourier.py | 6 +++++- nipype/interfaces/afni/tests/test_auto_GCOR.py | 3 ++- nipype/interfaces/afni/tests/test_auto_Hist.py | 3 ++- nipype/interfaces/afni/tests/test_auto_LFCD.py | 6 +++++- nipype/interfaces/afni/tests/test_auto_MaskTool.py | 6 +++++- nipype/interfaces/afni/tests/test_auto_Maskave.py | 6 +++++- nipype/interfaces/afni/tests/test_auto_Means.py | 6 +++++- nipype/interfaces/afni/tests/test_auto_Merge.py | 6 +++++- nipype/interfaces/afni/tests/test_auto_Notes.py | 6 +++++- nipype/interfaces/afni/tests/test_auto_NwarpApply.py | 3 ++- nipype/interfaces/afni/tests/test_auto_OneDToolPy.py | 3 ++- nipype/interfaces/afni/tests/test_auto_QualityIndex.py | 3 ++- nipype/interfaces/afni/tests/test_auto_Qwarp.py | 6 +++++- nipype/interfaces/afni/tests/test_auto_QwarpPlusMinus.py | 3 ++- nipype/interfaces/afni/tests/test_auto_Refit.py | 3 ++- nipype/interfaces/afni/tests/test_auto_Remlfit.py | 6 +++++- nipype/interfaces/afni/tests/test_auto_Resample.py | 6 +++++- nipype/interfaces/afni/tests/test_auto_Retroicor.py | 6 +++++- nipype/interfaces/afni/tests/test_auto_SVMTest.py | 6 +++++- nipype/interfaces/afni/tests/test_auto_SVMTrain.py | 6 +++++- nipype/interfaces/afni/tests/test_auto_Seg.py | 3 ++- nipype/interfaces/afni/tests/test_auto_SkullStrip.py | 6 +++++- nipype/interfaces/afni/tests/test_auto_TCat.py | 6 +++++- nipype/interfaces/afni/tests/test_auto_TCorr1D.py | 6 +++++- nipype/interfaces/afni/tests/test_auto_TCorrMap.py | 6 +++++- nipype/interfaces/afni/tests/test_auto_TCorrelate.py | 6 +++++- nipype/interfaces/afni/tests/test_auto_TNorm.py | 6 +++++- nipype/interfaces/afni/tests/test_auto_TShift.py | 6 +++++- nipype/interfaces/afni/tests/test_auto_TStat.py | 6 +++++- nipype/interfaces/afni/tests/test_auto_To3D.py | 6 +++++- nipype/interfaces/afni/tests/test_auto_Undump.py | 6 +++++- nipype/interfaces/afni/tests/test_auto_Unifize.py | 6 +++++- nipype/interfaces/afni/tests/test_auto_Volreg.py | 6 +++++- nipype/interfaces/afni/tests/test_auto_Warp.py | 6 +++++- nipype/interfaces/afni/tests/test_auto_ZCutUp.py | 6 +++++- nipype/interfaces/afni/tests/test_auto_Zcat.py | 6 +++++- nipype/interfaces/afni/tests/test_auto_Zeropad.py | 6 +++++- nipype/interfaces/ants/tests/test_auto_ANTS.py | 3 ++- nipype/interfaces/ants/tests/test_auto_ANTSCommand.py | 3 ++- nipype/interfaces/ants/tests/test_auto_AffineInitializer.py | 3 ++- nipype/interfaces/ants/tests/test_auto_AntsJointFusion.py | 3 ++- nipype/interfaces/ants/tests/test_auto_ApplyTransforms.py | 3 ++- .../ants/tests/test_auto_ApplyTransformsToPoints.py | 3 ++- nipype/interfaces/ants/tests/test_auto_Atropos.py | 3 ++- .../ants/tests/test_auto_AverageAffineTransform.py | 3 ++- nipype/interfaces/ants/tests/test_auto_AverageImages.py | 3 ++- nipype/interfaces/ants/tests/test_auto_BrainExtraction.py | 3 ++- .../ants/tests/test_auto_ConvertScalarImageToRGB.py | 3 ++- nipype/interfaces/ants/tests/test_auto_CorticalThickness.py | 3 ++- .../ants/tests/test_auto_CreateJacobianDeterminantImage.py | 3 ++- nipype/interfaces/ants/tests/test_auto_CreateTiledMosaic.py | 3 ++- nipype/interfaces/ants/tests/test_auto_DenoiseImage.py | 3 ++- nipype/interfaces/ants/tests/test_auto_GenWarpFields.py | 3 ++- nipype/interfaces/ants/tests/test_auto_JointFusion.py | 3 ++- nipype/interfaces/ants/tests/test_auto_KellyKapowski.py | 3 ++- .../interfaces/ants/tests/test_auto_LaplacianThickness.py | 3 ++- .../ants/tests/test_auto_MeasureImageSimilarity.py | 3 ++- nipype/interfaces/ants/tests/test_auto_MultiplyImages.py | 3 ++- .../ants/tests/test_auto_N4BiasFieldCorrection.py | 3 ++- nipype/interfaces/ants/tests/test_auto_Registration.py | 3 ++- .../ants/tests/test_auto_WarpImageMultiTransform.py | 3 ++- .../tests/test_auto_WarpTimeSeriesImageMultiTransform.py | 3 ++- .../interfaces/ants/tests/test_auto_antsBrainExtraction.py | 3 ++- .../ants/tests/test_auto_antsCorticalThickness.py | 3 ++- nipype/interfaces/ants/tests/test_auto_antsIntroduction.py | 3 ++- .../ants/tests/test_auto_buildtemplateparallel.py | 3 ++- nipype/interfaces/brainsuite/tests/test_auto_BDP.py | 3 ++- nipype/interfaces/brainsuite/tests/test_auto_Bfc.py | 3 ++- nipype/interfaces/brainsuite/tests/test_auto_Bse.py | 3 ++- nipype/interfaces/brainsuite/tests/test_auto_Cerebro.py | 3 ++- nipype/interfaces/brainsuite/tests/test_auto_Cortex.py | 3 ++- nipype/interfaces/brainsuite/tests/test_auto_Dewisp.py | 3 ++- nipype/interfaces/brainsuite/tests/test_auto_Dfs.py | 3 ++- nipype/interfaces/brainsuite/tests/test_auto_Hemisplit.py | 3 ++- nipype/interfaces/brainsuite/tests/test_auto_Pialmesh.py | 3 ++- nipype/interfaces/brainsuite/tests/test_auto_Pvc.py | 3 ++- nipype/interfaces/brainsuite/tests/test_auto_SVReg.py | 3 ++- nipype/interfaces/brainsuite/tests/test_auto_Scrubmask.py | 3 ++- nipype/interfaces/brainsuite/tests/test_auto_Skullfinder.py | 3 ++- nipype/interfaces/brainsuite/tests/test_auto_Tca.py | 3 ++- .../interfaces/brainsuite/tests/test_auto_ThicknessPVC.py | 3 ++- nipype/interfaces/camino/tests/test_auto_AnalyzeHeader.py | 3 ++- .../interfaces/camino/tests/test_auto_ComputeEigensystem.py | 3 ++- .../camino/tests/test_auto_ComputeFractionalAnisotropy.py | 3 ++- .../camino/tests/test_auto_ComputeMeanDiffusivity.py | 3 ++- .../interfaces/camino/tests/test_auto_ComputeTensorTrace.py | 3 ++- nipype/interfaces/camino/tests/test_auto_Conmat.py | 3 ++- nipype/interfaces/camino/tests/test_auto_DT2NIfTI.py | 3 ++- nipype/interfaces/camino/tests/test_auto_DTIFit.py | 3 ++- nipype/interfaces/camino/tests/test_auto_DTLUTGen.py | 3 ++- nipype/interfaces/camino/tests/test_auto_DTMetric.py | 3 ++- nipype/interfaces/camino/tests/test_auto_FSL2Scheme.py | 3 ++- nipype/interfaces/camino/tests/test_auto_Image2Voxel.py | 3 ++- nipype/interfaces/camino/tests/test_auto_ImageStats.py | 3 ++- nipype/interfaces/camino/tests/test_auto_LinRecon.py | 3 ++- nipype/interfaces/camino/tests/test_auto_MESD.py | 3 ++- nipype/interfaces/camino/tests/test_auto_ModelFit.py | 3 ++- nipype/interfaces/camino/tests/test_auto_NIfTIDT2Camino.py | 3 ++- nipype/interfaces/camino/tests/test_auto_PicoPDFs.py | 3 ++- nipype/interfaces/camino/tests/test_auto_ProcStreamlines.py | 3 ++- nipype/interfaces/camino/tests/test_auto_QBallMX.py | 3 ++- nipype/interfaces/camino/tests/test_auto_SFLUTGen.py | 3 ++- nipype/interfaces/camino/tests/test_auto_SFPICOCalibData.py | 3 ++- nipype/interfaces/camino/tests/test_auto_SFPeaks.py | 3 ++- nipype/interfaces/camino/tests/test_auto_Shredder.py | 3 ++- nipype/interfaces/camino/tests/test_auto_Track.py | 3 ++- nipype/interfaces/camino/tests/test_auto_TrackBallStick.py | 3 ++- nipype/interfaces/camino/tests/test_auto_TrackBayesDirac.py | 3 ++- .../interfaces/camino/tests/test_auto_TrackBedpostxDeter.py | 3 ++- .../interfaces/camino/tests/test_auto_TrackBedpostxProba.py | 3 ++- nipype/interfaces/camino/tests/test_auto_TrackBootstrap.py | 3 ++- nipype/interfaces/camino/tests/test_auto_TrackDT.py | 3 ++- nipype/interfaces/camino/tests/test_auto_TrackPICo.py | 3 ++- nipype/interfaces/camino/tests/test_auto_TractShredder.py | 3 ++- nipype/interfaces/camino/tests/test_auto_VtkStreamlines.py | 3 ++- .../camino2trackvis/tests/test_auto_Camino2Trackvis.py | 3 ++- .../camino2trackvis/tests/test_auto_Trackvis2Camino.py | 3 ++- .../diffusion_toolkit/tests/test_auto_DTIRecon.py | 3 ++- .../diffusion_toolkit/tests/test_auto_DTITracker.py | 3 ++- .../diffusion_toolkit/tests/test_auto_HARDIMat.py | 3 ++- .../diffusion_toolkit/tests/test_auto_ODFRecon.py | 3 ++- .../diffusion_toolkit/tests/test_auto_ODFTracker.py | 3 ++- .../diffusion_toolkit/tests/test_auto_SplineFilter.py | 3 ++- .../diffusion_toolkit/tests/test_auto_TrackMerge.py | 3 ++- nipype/interfaces/elastix/tests/test_auto_AnalyzeWarp.py | 3 ++- nipype/interfaces/elastix/tests/test_auto_ApplyWarp.py | 3 ++- nipype/interfaces/elastix/tests/test_auto_PointsWarp.py | 3 ++- nipype/interfaces/elastix/tests/test_auto_Registration.py | 3 ++- .../freesurfer/tests/test_auto_AddXFormToHeader.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_Aparc2Aseg.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_Apas2Aseg.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_ApplyMask.py | 3 ++- .../freesurfer/tests/test_auto_ApplyVolTransform.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_Binarize.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_CALabel.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_CANormalize.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_CARegister.py | 3 ++- .../freesurfer/tests/test_auto_CheckTalairachAlignment.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_Concatenate.py | 3 ++- .../interfaces/freesurfer/tests/test_auto_ConcatenateLTA.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_Contrast.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_Curvature.py | 3 ++- .../interfaces/freesurfer/tests/test_auto_CurvatureStats.py | 3 ++- .../interfaces/freesurfer/tests/test_auto_DICOMConvert.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_EMRegister.py | 3 ++- .../interfaces/freesurfer/tests/test_auto_EditWMwithAseg.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_EulerNumber.py | 3 ++- .../freesurfer/tests/test_auto_ExtractMainComponent.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_FSCommand.py | 3 ++- .../freesurfer/tests/test_auto_FSCommandOpenMP.py | 3 ++- .../freesurfer/tests/test_auto_FSScriptCommand.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_FitMSParams.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_FixTopology.py | 3 ++- .../freesurfer/tests/test_auto_FuseSegmentations.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_GLMFit.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_ImageInfo.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_Jacobian.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_LTAConvert.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_Label2Annot.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_Label2Label.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_Label2Vol.py | 3 ++- .../freesurfer/tests/test_auto_MNIBiasCorrection.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_MPRtoMNI305.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_MRIConvert.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_MRICoreg.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_MRIFill.py | 3 ++- .../freesurfer/tests/test_auto_MRIMarchingCubes.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_MRIPretess.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_MRISPreproc.py | 3 ++- .../freesurfer/tests/test_auto_MRISPreprocReconAll.py | 3 ++- .../interfaces/freesurfer/tests/test_auto_MRITessellate.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_MRIsCALabel.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_MRIsCalc.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_MRIsCombine.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_MRIsConvert.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_MRIsExpand.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_MRIsInflate.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_MS_LDA.py | 3 ++- .../freesurfer/tests/test_auto_MakeAverageSubject.py | 3 ++- .../interfaces/freesurfer/tests/test_auto_MakeSurfaces.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_Normalize.py | 3 ++- .../interfaces/freesurfer/tests/test_auto_OneSampleTTest.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_Paint.py | 3 ++- .../freesurfer/tests/test_auto_ParcellationStats.py | 3 ++- .../interfaces/freesurfer/tests/test_auto_ParseDICOMDir.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_ReconAll.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_Register.py | 3 ++- .../freesurfer/tests/test_auto_RegisterAVItoTalairach.py | 3 ++- .../freesurfer/tests/test_auto_RelabelHypointensities.py | 3 ++- .../freesurfer/tests/test_auto_RemoveIntersection.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_RemoveNeck.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_Resample.py | 3 ++- .../interfaces/freesurfer/tests/test_auto_RobustRegister.py | 3 ++- .../interfaces/freesurfer/tests/test_auto_RobustTemplate.py | 3 ++- .../freesurfer/tests/test_auto_SampleToSurface.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_SegStats.py | 3 ++- .../freesurfer/tests/test_auto_SegStatsReconAll.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_SegmentCC.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_SegmentWM.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_Smooth.py | 3 ++- .../freesurfer/tests/test_auto_SmoothTessellation.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_Sphere.py | 3 ++- .../freesurfer/tests/test_auto_SphericalAverage.py | 3 ++- .../freesurfer/tests/test_auto_Surface2VolTransform.py | 3 ++- .../interfaces/freesurfer/tests/test_auto_SurfaceSmooth.py | 3 ++- .../freesurfer/tests/test_auto_SurfaceSnapshots.py | 3 ++- .../freesurfer/tests/test_auto_SurfaceTransform.py | 3 ++- .../freesurfer/tests/test_auto_SynthesizeFLASH.py | 3 ++- .../interfaces/freesurfer/tests/test_auto_TalairachAVI.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_TalairachQC.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_Tkregister2.py | 3 ++- .../freesurfer/tests/test_auto_UnpackSDICOMDir.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_VolumeMask.py | 3 ++- .../freesurfer/tests/test_auto_WatershedSkullStrip.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_AR1Image.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_AccuracyTester.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_ApplyMask.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_ApplyTOPUP.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_ApplyWarp.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_ApplyXFM.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_AvScale.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_B0Calc.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_BEDPOSTX5.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_BET.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_BinaryMaths.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_ChangeDataType.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_Classifier.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_Cleaner.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_Cluster.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_Complex.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_ContrastMgr.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_ConvertWarp.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_ConvertXFM.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_CopyGeom.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_DTIFit.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_DilateImage.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_DistanceMap.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_DualRegression.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_EPIDeWarp.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_Eddy.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_EddyCorrect.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_EpiReg.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_ErodeImage.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_ExtractROI.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_FAST.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_FEAT.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_FEATModel.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_FIRST.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_FLAMEO.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_FLIRT.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_FNIRT.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_FSLCommand.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_FSLXCommand.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_FUGUE.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_FeatureExtractor.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_FilterRegressor.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_FindTheBiggest.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_GLM.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_ICA_AROMA.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_ImageMaths.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_ImageMeants.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_ImageStats.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_InvWarp.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_IsotropicSmooth.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_MCFLIRT.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_MELODIC.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_MakeDyadicVectors.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_MathsCommand.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_MaxImage.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_MaxnImage.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_MeanImage.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_MedianImage.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_Merge.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_MinImage.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_MotionOutliers.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_MultiImageMaths.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_Overlay.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_PRELUDE.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_PercentileImage.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_PlotMotionParams.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_PlotTimeSeries.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_PowerSpectrum.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_PrepareFieldmap.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_ProbTrackX.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_ProbTrackX2.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_ProjThresh.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_Randomise.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_Reorient2Std.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_RobustFOV.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_SMM.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_SUSAN.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_SigLoss.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_SliceTimer.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_Slicer.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_Smooth.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_SmoothEstimate.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_SpatialFilter.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_Split.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_StdImage.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_SwapDimensions.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_TOPUP.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_TemporalFilter.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_Threshold.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_TractSkeleton.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_Training.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_UnaryMaths.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_VecReg.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_WarpPoints.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_WarpPointsToStd.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_WarpUtils.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_XFibres5.py | 3 ++- nipype/interfaces/minc/tests/test_auto_Average.py | 3 ++- nipype/interfaces/minc/tests/test_auto_BBox.py | 3 ++- nipype/interfaces/minc/tests/test_auto_Beast.py | 3 ++- nipype/interfaces/minc/tests/test_auto_BestLinReg.py | 3 ++- nipype/interfaces/minc/tests/test_auto_BigAverage.py | 3 ++- nipype/interfaces/minc/tests/test_auto_Blob.py | 3 ++- nipype/interfaces/minc/tests/test_auto_Blur.py | 3 ++- nipype/interfaces/minc/tests/test_auto_Calc.py | 3 ++- nipype/interfaces/minc/tests/test_auto_Convert.py | 3 ++- nipype/interfaces/minc/tests/test_auto_Copy.py | 3 ++- nipype/interfaces/minc/tests/test_auto_Dump.py | 3 ++- nipype/interfaces/minc/tests/test_auto_Extract.py | 3 ++- nipype/interfaces/minc/tests/test_auto_Gennlxfm.py | 3 ++- nipype/interfaces/minc/tests/test_auto_Math.py | 3 ++- nipype/interfaces/minc/tests/test_auto_NlpFit.py | 3 ++- nipype/interfaces/minc/tests/test_auto_Norm.py | 3 ++- nipype/interfaces/minc/tests/test_auto_Pik.py | 3 ++- nipype/interfaces/minc/tests/test_auto_Resample.py | 3 ++- nipype/interfaces/minc/tests/test_auto_Reshape.py | 3 ++- nipype/interfaces/minc/tests/test_auto_ToEcat.py | 3 ++- nipype/interfaces/minc/tests/test_auto_ToRaw.py | 3 ++- nipype/interfaces/minc/tests/test_auto_VolSymm.py | 3 ++- nipype/interfaces/minc/tests/test_auto_Volcentre.py | 3 ++- nipype/interfaces/minc/tests/test_auto_Voliso.py | 3 ++- nipype/interfaces/minc/tests/test_auto_Volpad.py | 3 ++- nipype/interfaces/minc/tests/test_auto_XfmAvg.py | 3 ++- nipype/interfaces/minc/tests/test_auto_XfmConcat.py | 3 ++- nipype/interfaces/minc/tests/test_auto_XfmInvert.py | 3 ++- .../mipav/tests/test_auto_JistBrainMgdmSegmentation.py | 3 ++- .../mipav/tests/test_auto_JistBrainMp2rageDuraEstimation.py | 3 ++- .../mipav/tests/test_auto_JistBrainMp2rageSkullStripping.py | 3 ++- .../mipav/tests/test_auto_JistBrainPartialVolumeFilter.py | 3 ++- .../mipav/tests/test_auto_JistCortexSurfaceMeshInflation.py | 3 ++- .../mipav/tests/test_auto_JistIntensityMp2rageMasking.py | 3 ++- .../mipav/tests/test_auto_JistLaminarProfileCalculator.py | 3 ++- .../mipav/tests/test_auto_JistLaminarProfileGeometry.py | 3 ++- .../mipav/tests/test_auto_JistLaminarProfileSampling.py | 3 ++- .../mipav/tests/test_auto_JistLaminarROIAveraging.py | 3 ++- .../mipav/tests/test_auto_JistLaminarVolumetricLayering.py | 3 ++- .../mipav/tests/test_auto_MedicAlgorithmImageCalculator.py | 3 ++- .../mipav/tests/test_auto_MedicAlgorithmLesionToads.py | 3 ++- .../mipav/tests/test_auto_MedicAlgorithmMipavReorient.py | 3 ++- nipype/interfaces/mipav/tests/test_auto_MedicAlgorithmN3.py | 3 ++- .../mipav/tests/test_auto_MedicAlgorithmSPECTRE2010.py | 3 ++- .../tests/test_auto_MedicAlgorithmThresholdToBinaryMask.py | 3 ++- nipype/interfaces/mipav/tests/test_auto_RandomVol.py | 3 ++- nipype/interfaces/mne/tests/test_auto_WatershedBEM.py | 3 ++- .../tests/test_auto_ConstrainedSphericalDeconvolution.py | 3 ++- .../mrtrix/tests/test_auto_DWI2SphericalHarmonicsImage.py | 3 ++- nipype/interfaces/mrtrix/tests/test_auto_DWI2Tensor.py | 3 ++- .../tests/test_auto_DiffusionTensorStreamlineTrack.py | 3 ++- .../mrtrix/tests/test_auto_Directions2Amplitude.py | 3 ++- nipype/interfaces/mrtrix/tests/test_auto_Erode.py | 3 ++- .../mrtrix/tests/test_auto_EstimateResponseForSH.py | 3 ++- nipype/interfaces/mrtrix/tests/test_auto_FilterTracks.py | 3 ++- nipype/interfaces/mrtrix/tests/test_auto_FindShPeaks.py | 3 ++- .../interfaces/mrtrix/tests/test_auto_GenerateDirections.py | 3 ++- .../mrtrix/tests/test_auto_GenerateWhiteMatterMask.py | 3 ++- nipype/interfaces/mrtrix/tests/test_auto_MRConvert.py | 3 ++- nipype/interfaces/mrtrix/tests/test_auto_MRMultiply.py | 3 ++- nipype/interfaces/mrtrix/tests/test_auto_MRTransform.py | 3 ++- nipype/interfaces/mrtrix/tests/test_auto_MRTrixInfo.py | 3 ++- nipype/interfaces/mrtrix/tests/test_auto_MRTrixViewer.py | 3 ++- nipype/interfaces/mrtrix/tests/test_auto_MedianFilter3D.py | 3 ++- ...o_ProbabilisticSphericallyDeconvolutedStreamlineTrack.py | 3 ++- .../test_auto_SphericallyDeconvolutedStreamlineTrack.py | 3 ++- nipype/interfaces/mrtrix/tests/test_auto_StreamlineTrack.py | 3 ++- .../mrtrix/tests/test_auto_Tensor2ApparentDiffusion.py | 3 ++- .../mrtrix/tests/test_auto_Tensor2FractionalAnisotropy.py | 3 ++- nipype/interfaces/mrtrix/tests/test_auto_Tensor2Vector.py | 3 ++- nipype/interfaces/mrtrix/tests/test_auto_Threshold.py | 3 ++- nipype/interfaces/mrtrix/tests/test_auto_Tracks2Prob.py | 3 ++- nipype/interfaces/mrtrix3/tests/test_auto_ACTPrepareFSL.py | 3 ++- nipype/interfaces/mrtrix3/tests/test_auto_BrainMask.py | 3 ++- .../interfaces/mrtrix3/tests/test_auto_BuildConnectome.py | 3 ++- nipype/interfaces/mrtrix3/tests/test_auto_ComputeTDI.py | 3 ++- nipype/interfaces/mrtrix3/tests/test_auto_EstimateFOD.py | 3 ++- nipype/interfaces/mrtrix3/tests/test_auto_FitTensor.py | 3 ++- nipype/interfaces/mrtrix3/tests/test_auto_Generate5tt.py | 3 ++- nipype/interfaces/mrtrix3/tests/test_auto_LabelConfig.py | 3 ++- nipype/interfaces/mrtrix3/tests/test_auto_MRTrix3Base.py | 3 ++- nipype/interfaces/mrtrix3/tests/test_auto_Mesh2PVE.py | 3 ++- .../mrtrix3/tests/test_auto_ReplaceFSwithFIRST.py | 3 ++- nipype/interfaces/mrtrix3/tests/test_auto_ResponseSD.py | 3 ++- nipype/interfaces/mrtrix3/tests/test_auto_TCK2VTK.py | 3 ++- nipype/interfaces/mrtrix3/tests/test_auto_TensorMetrics.py | 3 ++- nipype/interfaces/mrtrix3/tests/test_auto_Tractography.py | 3 ++- nipype/interfaces/niftyfit/tests/test_auto_DwiTool.py | 3 ++- nipype/interfaces/niftyfit/tests/test_auto_FitAsl.py | 3 ++- nipype/interfaces/niftyfit/tests/test_auto_FitDwi.py | 3 ++- nipype/interfaces/niftyfit/tests/test_auto_FitQt1.py | 3 ++- .../interfaces/niftyfit/tests/test_auto_NiftyFitCommand.py | 3 ++- .../interfaces/niftyreg/tests/test_auto_NiftyRegCommand.py | 3 ++- nipype/interfaces/niftyreg/tests/test_auto_RegAladin.py | 3 ++- nipype/interfaces/niftyreg/tests/test_auto_RegAverage.py | 3 ++- nipype/interfaces/niftyreg/tests/test_auto_RegF3D.py | 3 ++- nipype/interfaces/niftyreg/tests/test_auto_RegJacobian.py | 3 ++- nipype/interfaces/niftyreg/tests/test_auto_RegMeasure.py | 3 ++- nipype/interfaces/niftyreg/tests/test_auto_RegResample.py | 3 ++- nipype/interfaces/niftyreg/tests/test_auto_RegTools.py | 3 ++- nipype/interfaces/niftyreg/tests/test_auto_RegTransform.py | 3 ++- nipype/interfaces/niftyseg/tests/test_auto_BinaryMaths.py | 3 ++- .../niftyseg/tests/test_auto_BinaryMathsInteger.py | 3 ++- nipype/interfaces/niftyseg/tests/test_auto_BinaryStats.py | 3 ++- nipype/interfaces/niftyseg/tests/test_auto_CalcTopNCC.py | 3 ++- nipype/interfaces/niftyseg/tests/test_auto_EM.py | 3 ++- nipype/interfaces/niftyseg/tests/test_auto_FillLesions.py | 3 ++- nipype/interfaces/niftyseg/tests/test_auto_LabelFusion.py | 3 ++- nipype/interfaces/niftyseg/tests/test_auto_MathsCommand.py | 3 ++- nipype/interfaces/niftyseg/tests/test_auto_Merge.py | 3 ++- .../interfaces/niftyseg/tests/test_auto_NiftySegCommand.py | 3 ++- nipype/interfaces/niftyseg/tests/test_auto_StatsCommand.py | 3 ++- nipype/interfaces/niftyseg/tests/test_auto_TupleMaths.py | 3 ++- nipype/interfaces/niftyseg/tests/test_auto_UnaryMaths.py | 3 ++- nipype/interfaces/niftyseg/tests/test_auto_UnaryStats.py | 3 ++- .../tests/test_auto_BRAINSPosteriorToContinuousClass.py | 3 ++- .../semtools/brains/tests/test_auto_BRAINSTalairach.py | 3 ++- .../semtools/brains/tests/test_auto_BRAINSTalairachMask.py | 3 ++- .../semtools/brains/tests/test_auto_GenerateEdgeMapImage.py | 3 ++- .../semtools/brains/tests/test_auto_GeneratePurePlugMask.py | 3 ++- .../brains/tests/test_auto_HistogramMatchingFilter.py | 3 ++- .../semtools/brains/tests/test_auto_SimilarityIndex.py | 3 ++- .../semtools/diffusion/tests/test_auto_DWIConvert.py | 3 ++- .../diffusion/tests/test_auto_compareTractInclusion.py | 3 ++- .../semtools/diffusion/tests/test_auto_dtiaverage.py | 3 ++- .../semtools/diffusion/tests/test_auto_dtiestim.py | 3 ++- .../semtools/diffusion/tests/test_auto_dtiprocess.py | 3 ++- .../diffusion/tests/test_auto_extractNrrdVectorIndex.py | 3 ++- .../diffusion/tests/test_auto_gtractAnisotropyMap.py | 3 ++- .../diffusion/tests/test_auto_gtractAverageBvalues.py | 3 ++- .../diffusion/tests/test_auto_gtractClipAnisotropy.py | 3 ++- .../diffusion/tests/test_auto_gtractCoRegAnatomy.py | 3 ++- .../semtools/diffusion/tests/test_auto_gtractConcatDwi.py | 3 ++- .../diffusion/tests/test_auto_gtractCopyImageOrientation.py | 3 ++- .../diffusion/tests/test_auto_gtractCoregBvalues.py | 3 ++- .../diffusion/tests/test_auto_gtractCostFastMarching.py | 3 ++- .../diffusion/tests/test_auto_gtractCreateGuideFiber.py | 3 ++- .../diffusion/tests/test_auto_gtractFastMarchingTracking.py | 3 ++- .../diffusion/tests/test_auto_gtractFiberTracking.py | 3 ++- .../diffusion/tests/test_auto_gtractImageConformity.py | 3 ++- .../tests/test_auto_gtractInvertBSplineTransform.py | 3 ++- .../tests/test_auto_gtractInvertDisplacementField.py | 3 ++- .../diffusion/tests/test_auto_gtractInvertRigidTransform.py | 3 ++- .../diffusion/tests/test_auto_gtractResampleAnisotropy.py | 3 ++- .../semtools/diffusion/tests/test_auto_gtractResampleB0.py | 3 ++- .../diffusion/tests/test_auto_gtractResampleCodeImage.py | 3 ++- .../diffusion/tests/test_auto_gtractResampleDWIInPlace.py | 3 ++- .../diffusion/tests/test_auto_gtractResampleFibers.py | 3 ++- .../semtools/diffusion/tests/test_auto_gtractTensor.py | 3 ++- .../tests/test_auto_gtractTransformToDisplacementField.py | 3 ++- .../semtools/diffusion/tests/test_auto_maxcurvature.py | 3 ++- .../tractography/tests/test_auto_UKFTractography.py | 3 ++- .../diffusion/tractography/tests/test_auto_fiberprocess.py | 3 ++- .../diffusion/tractography/tests/test_auto_fiberstats.py | 3 ++- .../diffusion/tractography/tests/test_auto_fibertrack.py | 3 ++- .../semtools/filtering/tests/test_auto_CannyEdge.py | 3 ++- .../tests/test_auto_CannySegmentationLevelSetImageFilter.py | 3 ++- .../semtools/filtering/tests/test_auto_DilateImage.py | 3 ++- .../semtools/filtering/tests/test_auto_DilateMask.py | 3 ++- .../semtools/filtering/tests/test_auto_DistanceMaps.py | 3 ++- .../filtering/tests/test_auto_DumpBinaryTrainingVectors.py | 3 ++- .../semtools/filtering/tests/test_auto_ErodeImage.py | 3 ++- .../semtools/filtering/tests/test_auto_FlippedDifference.py | 3 ++- .../filtering/tests/test_auto_GenerateBrainClippedImage.py | 3 ++- .../tests/test_auto_GenerateSummedGradientImage.py | 3 ++- .../semtools/filtering/tests/test_auto_GenerateTestImage.py | 3 ++- .../test_auto_GradientAnisotropicDiffusionImageFilter.py | 3 ++- .../filtering/tests/test_auto_HammerAttributeCreator.py | 3 ++- .../semtools/filtering/tests/test_auto_NeighborhoodMean.py | 3 ++- .../filtering/tests/test_auto_NeighborhoodMedian.py | 3 ++- .../semtools/filtering/tests/test_auto_STAPLEAnalysis.py | 3 ++- .../tests/test_auto_TextureFromNoiseImageFilter.py | 3 ++- .../filtering/tests/test_auto_TextureMeasureFilter.py | 3 ++- .../filtering/tests/test_auto_UnbiasedNonLocalMeans.py | 3 ++- .../semtools/legacy/tests/test_auto_scalartransform.py | 3 ++- .../registration/tests/test_auto_BRAINSDemonWarp.py | 3 ++- .../semtools/registration/tests/test_auto_BRAINSFit.py | 3 ++- .../semtools/registration/tests/test_auto_BRAINSResample.py | 3 ++- .../semtools/registration/tests/test_auto_BRAINSResize.py | 3 ++- .../tests/test_auto_BRAINSTransformFromFiducials.py | 3 ++- .../registration/tests/test_auto_VBRAINSDemonWarp.py | 3 ++- .../semtools/segmentation/tests/test_auto_BRAINSABC.py | 3 ++- .../tests/test_auto_BRAINSConstellationDetector.py | 3 ++- .../test_auto_BRAINSCreateLabelMapFromProbabilityMaps.py | 3 ++- .../semtools/segmentation/tests/test_auto_BRAINSCut.py | 3 ++- .../segmentation/tests/test_auto_BRAINSMultiSTAPLE.py | 3 ++- .../semtools/segmentation/tests/test_auto_BRAINSROIAuto.py | 3 ++- .../tests/test_auto_BinaryMaskEditorBasedOnLandmarks.py | 3 ++- .../semtools/segmentation/tests/test_auto_ESLR.py | 3 ++- nipype/interfaces/semtools/tests/test_auto_DWICompare.py | 3 ++- .../interfaces/semtools/tests/test_auto_DWISimpleCompare.py | 3 ++- .../test_auto_GenerateCsfClippedFromClassifiedImage.py | 3 ++- .../semtools/utilities/tests/test_auto_BRAINSAlignMSP.py | 3 ++- .../utilities/tests/test_auto_BRAINSClipInferior.py | 3 ++- .../utilities/tests/test_auto_BRAINSConstellationModeler.py | 3 ++- .../semtools/utilities/tests/test_auto_BRAINSEyeDetector.py | 3 ++- .../tests/test_auto_BRAINSInitializedControlPoints.py | 3 ++- .../utilities/tests/test_auto_BRAINSLandmarkInitializer.py | 3 ++- .../utilities/tests/test_auto_BRAINSLinearModelerEPCA.py | 3 ++- .../utilities/tests/test_auto_BRAINSLmkTransform.py | 3 ++- .../semtools/utilities/tests/test_auto_BRAINSMush.py | 3 ++- .../utilities/tests/test_auto_BRAINSSnapShotWriter.py | 3 ++- .../utilities/tests/test_auto_BRAINSTransformConvert.py | 3 ++- .../tests/test_auto_BRAINSTrimForegroundInDirection.py | 3 ++- .../utilities/tests/test_auto_CleanUpOverlapLabels.py | 3 ++- .../semtools/utilities/tests/test_auto_FindCenterOfBrain.py | 3 ++- .../tests/test_auto_GenerateLabelMapFromProbabilityMap.py | 3 ++- .../utilities/tests/test_auto_ImageRegionPlotter.py | 3 ++- .../semtools/utilities/tests/test_auto_JointHistogram.py | 3 ++- .../utilities/tests/test_auto_ShuffleVectorsModule.py | 3 ++- .../semtools/utilities/tests/test_auto_fcsv_to_hdf5.py | 3 ++- .../utilities/tests/test_auto_insertMidACPCpoint.py | 3 ++- .../tests/test_auto_landmarksConstellationAligner.py | 3 ++- .../tests/test_auto_landmarksConstellationWeights.py | 3 ++- .../slicer/diffusion/tests/test_auto_DTIexport.py | 3 ++- .../slicer/diffusion/tests/test_auto_DTIimport.py | 3 ++- .../diffusion/tests/test_auto_DWIJointRicianLMMSEFilter.py | 3 ++- .../diffusion/tests/test_auto_DWIRicianLMMSEFilter.py | 3 ++- .../slicer/diffusion/tests/test_auto_DWIToDTIEstimation.py | 3 ++- .../tests/test_auto_DiffusionTensorScalarMeasurements.py | 3 ++- .../tests/test_auto_DiffusionWeightedVolumeMasking.py | 3 ++- .../slicer/diffusion/tests/test_auto_ResampleDTIVolume.py | 3 ++- .../tests/test_auto_TractographyLabelMapSeeding.py | 3 ++- .../slicer/filtering/tests/test_auto_AddScalarVolumes.py | 3 ++- .../slicer/filtering/tests/test_auto_CastScalarVolume.py | 3 ++- .../slicer/filtering/tests/test_auto_CheckerBoardFilter.py | 3 ++- .../tests/test_auto_CurvatureAnisotropicDiffusion.py | 3 ++- .../slicer/filtering/tests/test_auto_ExtractSkeleton.py | 3 ++- .../filtering/tests/test_auto_GaussianBlurImageFilter.py | 3 ++- .../tests/test_auto_GradientAnisotropicDiffusion.py | 3 ++- .../tests/test_auto_GrayscaleFillHoleImageFilter.py | 3 ++- .../tests/test_auto_GrayscaleGrindPeakImageFilter.py | 3 ++- .../slicer/filtering/tests/test_auto_HistogramMatching.py | 3 ++- .../slicer/filtering/tests/test_auto_ImageLabelCombine.py | 3 ++- .../slicer/filtering/tests/test_auto_MaskScalarVolume.py | 3 ++- .../slicer/filtering/tests/test_auto_MedianImageFilter.py | 3 ++- .../filtering/tests/test_auto_MultiplyScalarVolumes.py | 3 ++- .../filtering/tests/test_auto_N4ITKBiasFieldCorrection.py | 3 ++- .../tests/test_auto_ResampleScalarVectorDWIVolume.py | 3 ++- .../filtering/tests/test_auto_SubtractScalarVolumes.py | 3 ++- .../filtering/tests/test_auto_ThresholdScalarVolume.py | 3 ++- .../tests/test_auto_VotingBinaryHoleFillingImageFilter.py | 3 ++- .../tests/test_auto_DWIUnbiasedNonLocalMeansFilter.py | 3 ++- .../slicer/legacy/tests/test_auto_AffineRegistration.py | 3 ++- .../legacy/tests/test_auto_BSplineDeformableRegistration.py | 3 ++- .../legacy/tests/test_auto_BSplineToDeformationField.py | 3 ++- .../legacy/tests/test_auto_ExpertAutomatedRegistration.py | 3 ++- .../slicer/legacy/tests/test_auto_LinearRegistration.py | 3 ++- .../tests/test_auto_MultiResolutionAffineRegistration.py | 3 ++- .../legacy/tests/test_auto_OtsuThresholdImageFilter.py | 3 ++- .../legacy/tests/test_auto_OtsuThresholdSegmentation.py | 3 ++- .../slicer/legacy/tests/test_auto_ResampleScalarVolume.py | 3 ++- .../slicer/legacy/tests/test_auto_RigidRegistration.py | 3 ++- .../tests/test_auto_IntensityDifferenceMetric.py | 3 ++- .../tests/test_auto_PETStandardUptakeValueComputation.py | 3 ++- .../slicer/registration/tests/test_auto_ACPCTransform.py | 3 ++- .../slicer/registration/tests/test_auto_BRAINSDemonWarp.py | 3 ++- .../slicer/registration/tests/test_auto_BRAINSFit.py | 3 ++- .../slicer/registration/tests/test_auto_BRAINSResample.py | 3 ++- .../registration/tests/test_auto_FiducialRegistration.py | 3 ++- .../slicer/registration/tests/test_auto_VBRAINSDemonWarp.py | 3 ++- .../slicer/segmentation/tests/test_auto_BRAINSROIAuto.py | 3 ++- .../segmentation/tests/test_auto_EMSegmentCommandLine.py | 3 ++- .../tests/test_auto_RobustStatisticsSegmenter.py | 3 ++- .../tests/test_auto_SimpleRegionGrowingSegmentation.py | 3 ++- .../slicer/tests/test_auto_DicomToNrrdConverter.py | 3 ++- .../slicer/tests/test_auto_EMSegmentTransformToNewFormat.py | 3 ++- .../slicer/tests/test_auto_GrayscaleModelMaker.py | 3 ++- .../interfaces/slicer/tests/test_auto_LabelMapSmoothing.py | 3 ++- nipype/interfaces/slicer/tests/test_auto_MergeModels.py | 3 ++- nipype/interfaces/slicer/tests/test_auto_ModelMaker.py | 3 ++- nipype/interfaces/slicer/tests/test_auto_ModelToLabelMap.py | 3 ++- .../interfaces/slicer/tests/test_auto_OrientScalarVolume.py | 3 ++- .../slicer/tests/test_auto_ProbeVolumeWithModel.py | 3 ++- .../interfaces/slicer/tests/test_auto_SlicerCommandLine.py | 3 ++- nipype/interfaces/tests/test_auto_Bru2.py | 3 ++- nipype/interfaces/tests/test_auto_C3dAffineTool.py | 3 ++- nipype/interfaces/tests/test_auto_CommandLine.py | 3 ++- nipype/interfaces/tests/test_auto_Dcm2nii.py | 3 ++- nipype/interfaces/tests/test_auto_Dcm2niix.py | 3 ++- nipype/interfaces/tests/test_auto_MatlabCommand.py | 3 ++- nipype/interfaces/tests/test_auto_MeshFix.py | 3 ++- nipype/interfaces/tests/test_auto_MpiCommandLine.py | 3 ++- nipype/interfaces/tests/test_auto_PETPVC.py | 3 ++- nipype/interfaces/tests/test_auto_Quickshear.py | 3 ++- nipype/interfaces/tests/test_auto_SEMLikeCommandLine.py | 3 ++- nipype/interfaces/tests/test_auto_SlicerCommandLine.py | 3 ++- nipype/interfaces/tests/test_auto_StdOutCommandLine.py | 3 ++- nipype/interfaces/vista/tests/test_auto_Vnifti2Image.py | 3 ++- nipype/interfaces/vista/tests/test_auto_VtoMat.py | 3 ++- 634 files changed, 1433 insertions(+), 634 deletions(-) diff --git a/nipype/interfaces/afni/tests/test_auto_ABoverlap.py b/nipype/interfaces/afni/tests/test_auto_ABoverlap.py index 93219fe3dc..9c2d2f0cc3 100644 --- a/nipype/interfaces/afni/tests/test_auto_ABoverlap.py +++ b/nipype/interfaces/afni/tests/test_auto_ABoverlap.py @@ -24,13 +24,17 @@ def test_ABoverlap_inputs(): ), no_automask=dict(argstr='-no_automask', ), + num_threads=dict(nohash=True, + usedefault=True, + ), out_file=dict(argstr=' |& tee %s', position=-1, ), outputtype=dict(), quiet=dict(argstr='-quiet', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), verb=dict(argstr='-verb', ), diff --git a/nipype/interfaces/afni/tests/test_auto_AFNICommand.py b/nipype/interfaces/afni/tests/test_auto_AFNICommand.py index aef42ee585..2a8f66de41 100644 --- a/nipype/interfaces/afni/tests/test_auto_AFNICommand.py +++ b/nipype/interfaces/afni/tests/test_auto_AFNICommand.py @@ -12,12 +12,16 @@ def test_AFNICommand_inputs(): ignore_exception=dict(nohash=True, usedefault=True, ), + num_threads=dict(nohash=True, + usedefault=True, + ), out_file=dict(argstr='-prefix %s', name_source=['in_file'], name_template='%s_afni', ), outputtype=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = AFNICommand.input_spec() diff --git a/nipype/interfaces/afni/tests/test_auto_AFNICommandBase.py b/nipype/interfaces/afni/tests/test_auto_AFNICommandBase.py index 37efbcee2d..6d848cedd0 100644 --- a/nipype/interfaces/afni/tests/test_auto_AFNICommandBase.py +++ b/nipype/interfaces/afni/tests/test_auto_AFNICommandBase.py @@ -12,7 +12,8 @@ def test_AFNICommandBase_inputs(): ignore_exception=dict(nohash=True, usedefault=True, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = AFNICommandBase.input_spec() diff --git a/nipype/interfaces/afni/tests/test_auto_AFNIPythonCommand.py b/nipype/interfaces/afni/tests/test_auto_AFNIPythonCommand.py index e8efb62f5d..bab1a3e829 100644 --- a/nipype/interfaces/afni/tests/test_auto_AFNIPythonCommand.py +++ b/nipype/interfaces/afni/tests/test_auto_AFNIPythonCommand.py @@ -12,12 +12,16 @@ def test_AFNIPythonCommand_inputs(): ignore_exception=dict(nohash=True, usedefault=True, ), + num_threads=dict(nohash=True, + usedefault=True, + ), out_file=dict(argstr='-prefix %s', name_source=['in_file'], name_template='%s_afni', ), outputtype=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = AFNIPythonCommand.input_spec() diff --git a/nipype/interfaces/afni/tests/test_auto_AFNItoNIFTI.py b/nipype/interfaces/afni/tests/test_auto_AFNItoNIFTI.py index 5fe66e9df7..63bdebab28 100644 --- a/nipype/interfaces/afni/tests/test_auto_AFNItoNIFTI.py +++ b/nipype/interfaces/afni/tests/test_auto_AFNItoNIFTI.py @@ -22,6 +22,9 @@ def test_AFNItoNIFTI_inputs(): newid=dict(argstr='-newid', xor=['oldid'], ), + num_threads=dict(nohash=True, + usedefault=True, + ), oldid=dict(argstr='-oldid', xor=['newid'], ), @@ -33,7 +36,8 @@ def test_AFNItoNIFTI_inputs(): outputtype=dict(), pure=dict(argstr='-pure', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = AFNItoNIFTI.input_spec() diff --git a/nipype/interfaces/afni/tests/test_auto_AlignEpiAnatPy.py b/nipype/interfaces/afni/tests/test_auto_AlignEpiAnatPy.py index 8193270c5d..b18e056d75 100644 --- a/nipype/interfaces/afni/tests/test_auto_AlignEpiAnatPy.py +++ b/nipype/interfaces/afni/tests/test_auto_AlignEpiAnatPy.py @@ -37,7 +37,8 @@ def test_AlignEpiAnatPy_inputs(): suffix=dict(argstr='-suffix %s', usedefault=True, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), tshift=dict(argstr='-tshift %s', usedefault=True, diff --git a/nipype/interfaces/afni/tests/test_auto_Allineate.py b/nipype/interfaces/afni/tests/test_auto_Allineate.py index f1e6d4181a..5c4a916228 100644 --- a/nipype/interfaces/afni/tests/test_auto_Allineate.py +++ b/nipype/interfaces/afni/tests/test_auto_Allineate.py @@ -67,6 +67,9 @@ def test_Allineate_inputs(): ), nomask=dict(argstr='-nomask', ), + num_threads=dict(nohash=True, + usedefault=True, + ), nwarp=dict(argstr='-nwarp %s', ), nwarp_fixdep=dict(argstr='-nwarp_fixdep%s', @@ -101,7 +104,8 @@ def test_Allineate_inputs(): ), source_mask=dict(argstr='-source_mask %s', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), two_best=dict(argstr='-twobest %d', ), diff --git a/nipype/interfaces/afni/tests/test_auto_AutoTLRC.py b/nipype/interfaces/afni/tests/test_auto_AutoTLRC.py index 3c95374697..90f70ecfa4 100644 --- a/nipype/interfaces/afni/tests/test_auto_AutoTLRC.py +++ b/nipype/interfaces/afni/tests/test_auto_AutoTLRC.py @@ -22,7 +22,8 @@ def test_AutoTLRC_inputs(): no_ss=dict(argstr='-no_ss', ), outputtype=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = AutoTLRC.input_spec() diff --git a/nipype/interfaces/afni/tests/test_auto_AutoTcorrelate.py b/nipype/interfaces/afni/tests/test_auto_AutoTcorrelate.py index f7a3d89278..54964487a8 100644 --- a/nipype/interfaces/afni/tests/test_auto_AutoTcorrelate.py +++ b/nipype/interfaces/afni/tests/test_auto_AutoTcorrelate.py @@ -27,6 +27,9 @@ def test_AutoTcorrelate_inputs(): mask_source=dict(argstr='-mask_source %s', xor=['mask_only_targets'], ), + num_threads=dict(nohash=True, + usedefault=True, + ), out_file=dict(argstr='-prefix %s', name_source='in_file', name_template='%s_similarity_matrix.1D', @@ -34,7 +37,8 @@ def test_AutoTcorrelate_inputs(): outputtype=dict(), polort=dict(argstr='-polort %d', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = AutoTcorrelate.input_spec() diff --git a/nipype/interfaces/afni/tests/test_auto_Autobox.py b/nipype/interfaces/afni/tests/test_auto_Autobox.py index 91479c241d..83fd613606 100644 --- a/nipype/interfaces/afni/tests/test_auto_Autobox.py +++ b/nipype/interfaces/afni/tests/test_auto_Autobox.py @@ -18,6 +18,9 @@ def test_Autobox_inputs(): ), no_clustering=dict(argstr='-noclust', ), + num_threads=dict(nohash=True, + usedefault=True, + ), out_file=dict(argstr='-prefix %s', name_source='in_file', name_template='%s_autobox', @@ -25,7 +28,8 @@ def test_Autobox_inputs(): outputtype=dict(), padding=dict(argstr='-npad %d', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = Autobox.input_spec() diff --git a/nipype/interfaces/afni/tests/test_auto_Automask.py b/nipype/interfaces/afni/tests/test_auto_Automask.py index f0a76037c2..a31cc87cd9 100644 --- a/nipype/interfaces/afni/tests/test_auto_Automask.py +++ b/nipype/interfaces/afni/tests/test_auto_Automask.py @@ -27,12 +27,16 @@ def test_Automask_inputs(): mandatory=True, position=-1, ), + num_threads=dict(nohash=True, + usedefault=True, + ), out_file=dict(argstr='-prefix %s', name_source='in_file', name_template='%s_mask', ), outputtype=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = Automask.input_spec() diff --git a/nipype/interfaces/afni/tests/test_auto_Axialize.py b/nipype/interfaces/afni/tests/test_auto_Axialize.py index 6d04decdaa..93869e283e 100644 --- a/nipype/interfaces/afni/tests/test_auto_Axialize.py +++ b/nipype/interfaces/afni/tests/test_auto_Axialize.py @@ -23,6 +23,9 @@ def test_Axialize_inputs(): mandatory=True, position=-2, ), + num_threads=dict(nohash=True, + usedefault=True, + ), orientation=dict(argstr='-orient %s', ), out_file=dict(argstr='-prefix %s', @@ -33,7 +36,8 @@ def test_Axialize_inputs(): sagittal=dict(argstr='-sagittal', xor=['coronal', 'axial'], ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), verb=dict(argstr='-verb', ), diff --git a/nipype/interfaces/afni/tests/test_auto_Bandpass.py b/nipype/interfaces/afni/tests/test_auto_Bandpass.py index 5310eaa256..5f5cffcabe 100644 --- a/nipype/interfaces/afni/tests/test_auto_Bandpass.py +++ b/nipype/interfaces/afni/tests/test_auto_Bandpass.py @@ -44,6 +44,9 @@ def test_Bandpass_inputs(): ), notrans=dict(argstr='-notrans', ), + num_threads=dict(nohash=True, + usedefault=True, + ), orthogonalize_dset=dict(argstr='-dsort %s', ), orthogonalize_file=dict(argstr='-ort %s', @@ -55,7 +58,8 @@ def test_Bandpass_inputs(): position=1, ), outputtype=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), tr=dict(argstr='-dt %f', ), diff --git a/nipype/interfaces/afni/tests/test_auto_BlurInMask.py b/nipype/interfaces/afni/tests/test_auto_BlurInMask.py index eb4a571079..43338e43d9 100644 --- a/nipype/interfaces/afni/tests/test_auto_BlurInMask.py +++ b/nipype/interfaces/afni/tests/test_auto_BlurInMask.py @@ -28,6 +28,9 @@ def test_BlurInMask_inputs(): ), multimask=dict(argstr='-Mmask %s', ), + num_threads=dict(nohash=True, + usedefault=True, + ), options=dict(argstr='%s', position=2, ), @@ -39,7 +42,8 @@ def test_BlurInMask_inputs(): outputtype=dict(), preserve=dict(argstr='-preserve', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = BlurInMask.input_spec() diff --git a/nipype/interfaces/afni/tests/test_auto_BlurToFWHM.py b/nipype/interfaces/afni/tests/test_auto_BlurToFWHM.py index bf4d2a194c..7ebd52778a 100644 --- a/nipype/interfaces/afni/tests/test_auto_BlurToFWHM.py +++ b/nipype/interfaces/afni/tests/test_auto_BlurToFWHM.py @@ -25,12 +25,16 @@ def test_BlurToFWHM_inputs(): ), mask=dict(argstr='-blurmaster %s', ), + num_threads=dict(nohash=True, + usedefault=True, + ), out_file=dict(argstr='-prefix %s', name_source=['in_file'], name_template='%s_afni', ), outputtype=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = BlurToFWHM.input_spec() diff --git a/nipype/interfaces/afni/tests/test_auto_BrickStat.py b/nipype/interfaces/afni/tests/test_auto_BrickStat.py index f15a8d972d..f1ccb2fe55 100644 --- a/nipype/interfaces/afni/tests/test_auto_BrickStat.py +++ b/nipype/interfaces/afni/tests/test_auto_BrickStat.py @@ -32,7 +32,8 @@ def test_BrickStat_inputs(): ), sum=dict(argstr='-sum', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), var=dict(argstr='-var', ), diff --git a/nipype/interfaces/afni/tests/test_auto_Bucket.py b/nipype/interfaces/afni/tests/test_auto_Bucket.py index 1cf812fd73..879e91f02f 100644 --- a/nipype/interfaces/afni/tests/test_auto_Bucket.py +++ b/nipype/interfaces/afni/tests/test_auto_Bucket.py @@ -16,11 +16,15 @@ def test_Bucket_inputs(): mandatory=True, position=-1, ), + num_threads=dict(nohash=True, + usedefault=True, + ), out_file=dict(argstr='-prefix %s', name_template='buck', ), outputtype=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = Bucket.input_spec() diff --git a/nipype/interfaces/afni/tests/test_auto_Calc.py b/nipype/interfaces/afni/tests/test_auto_Calc.py index aa9d1222b7..d352adb704 100644 --- a/nipype/interfaces/afni/tests/test_auto_Calc.py +++ b/nipype/interfaces/afni/tests/test_auto_Calc.py @@ -26,6 +26,9 @@ def test_Calc_inputs(): in_file_c=dict(argstr='-c %s', position=2, ), + num_threads=dict(nohash=True, + usedefault=True, + ), other=dict(argstr='', ), out_file=dict(argstr='-prefix %s', @@ -40,7 +43,8 @@ def test_Calc_inputs(): ), stop_idx=dict(requires=['start_idx'], ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = Calc.input_spec() diff --git a/nipype/interfaces/afni/tests/test_auto_Cat.py b/nipype/interfaces/afni/tests/test_auto_Cat.py index c35c3e86b9..e4beca3454 100644 --- a/nipype/interfaces/afni/tests/test_auto_Cat.py +++ b/nipype/interfaces/afni/tests/test_auto_Cat.py @@ -18,6 +18,9 @@ def test_Cat_inputs(): ), keepfree=dict(argstr='-nonfixed', ), + num_threads=dict(nohash=True, + usedefault=True, + ), omitconst=dict(argstr='-nonconst', ), out_cint=dict(xor=['out_format', 'out_nice', 'out_double', 'out_fint', 'out_int'], @@ -46,7 +49,8 @@ def test_Cat_inputs(): ), stack=dict(argstr='-stack', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = Cat.input_spec() diff --git a/nipype/interfaces/afni/tests/test_auto_CatMatvec.py b/nipype/interfaces/afni/tests/test_auto_CatMatvec.py index d3d94569be..3782a3a37d 100644 --- a/nipype/interfaces/afni/tests/test_auto_CatMatvec.py +++ b/nipype/interfaces/afni/tests/test_auto_CatMatvec.py @@ -25,6 +25,9 @@ def test_CatMatvec_inputs(): descr="indicates that the resulting matrix willbe written to outfile in the 'MATRIX(...)' format (FORM 3).This feature could be used, with clever scripting, to inputa matrix directly on the command line to program 3dWarp.", xor=['oneline', 'fourxfour'], ), + num_threads=dict(nohash=True, + usedefault=True, + ), oneline=dict(argstr='-ONELINE', descr='indicates that the resulting matrixwill simply be written as 12 numbers on one line.', xor=['matrix', 'fourxfour'], @@ -35,7 +38,8 @@ def test_CatMatvec_inputs(): position=-1, ), outputtype=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = CatMatvec.input_spec() diff --git a/nipype/interfaces/afni/tests/test_auto_CenterMass.py b/nipype/interfaces/afni/tests/test_auto_CenterMass.py index 99d50831c2..c64c4e8b36 100644 --- a/nipype/interfaces/afni/tests/test_auto_CenterMass.py +++ b/nipype/interfaces/afni/tests/test_auto_CenterMass.py @@ -37,7 +37,8 @@ def test_CenterMass_inputs(): ), set_cm=dict(argstr='-set %f %f %f', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = CenterMass.input_spec() diff --git a/nipype/interfaces/afni/tests/test_auto_ClipLevel.py b/nipype/interfaces/afni/tests/test_auto_ClipLevel.py index 8bd4cd346a..0843c0e67e 100644 --- a/nipype/interfaces/afni/tests/test_auto_ClipLevel.py +++ b/nipype/interfaces/afni/tests/test_auto_ClipLevel.py @@ -27,7 +27,8 @@ def test_ClipLevel_inputs(): mfrac=dict(argstr='-mfrac %s', position=2, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = ClipLevel.input_spec() diff --git a/nipype/interfaces/afni/tests/test_auto_Copy.py b/nipype/interfaces/afni/tests/test_auto_Copy.py index 80338ccc57..046f9d87c2 100644 --- a/nipype/interfaces/afni/tests/test_auto_Copy.py +++ b/nipype/interfaces/afni/tests/test_auto_Copy.py @@ -17,13 +17,17 @@ def test_Copy_inputs(): mandatory=True, position=-2, ), + num_threads=dict(nohash=True, + usedefault=True, + ), out_file=dict(argstr='%s', name_source='in_file', name_template='%s_copy', position=-1, ), outputtype=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = Copy.input_spec() diff --git a/nipype/interfaces/afni/tests/test_auto_Deconvolve.py b/nipype/interfaces/afni/tests/test_auto_Deconvolve.py index 0dfbec8deb..c249d7b160 100644 --- a/nipype/interfaces/afni/tests/test_auto_Deconvolve.py +++ b/nipype/interfaces/afni/tests/test_auto_Deconvolve.py @@ -74,6 +74,9 @@ def test_Deconvolve_inputs(): num_stimts=dict(argstr='-num_stimts %d', position=-6, ), + num_threads=dict(nohash=True, + usedefault=True, + ), ortvec=dict(argstr='ortvec %s', ), out_file=dict(argstr='-bucket %s', @@ -101,7 +104,8 @@ def test_Deconvolve_inputs(): ), svd=dict(argstr='-svd', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), tout=dict(argstr='-tout', ), diff --git a/nipype/interfaces/afni/tests/test_auto_DegreeCentrality.py b/nipype/interfaces/afni/tests/test_auto_DegreeCentrality.py index cd4146a7b9..d820239d6b 100644 --- a/nipype/interfaces/afni/tests/test_auto_DegreeCentrality.py +++ b/nipype/interfaces/afni/tests/test_auto_DegreeCentrality.py @@ -23,6 +23,9 @@ def test_DegreeCentrality_inputs(): ), mask=dict(argstr='-mask %s', ), + num_threads=dict(nohash=True, + usedefault=True, + ), oned_file=dict(argstr='-out1D %s', ), out_file=dict(argstr='-prefix %s', @@ -34,7 +37,8 @@ def test_DegreeCentrality_inputs(): ), sparsity=dict(argstr='-sparsity %f', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), thresh=dict(argstr='-thresh %f', ), diff --git a/nipype/interfaces/afni/tests/test_auto_Despike.py b/nipype/interfaces/afni/tests/test_auto_Despike.py index aedb50b684..268d76b55a 100644 --- a/nipype/interfaces/afni/tests/test_auto_Despike.py +++ b/nipype/interfaces/afni/tests/test_auto_Despike.py @@ -17,12 +17,16 @@ def test_Despike_inputs(): mandatory=True, position=-1, ), + num_threads=dict(nohash=True, + usedefault=True, + ), out_file=dict(argstr='-prefix %s', name_source='in_file', name_template='%s_despike', ), outputtype=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = Despike.input_spec() diff --git a/nipype/interfaces/afni/tests/test_auto_Detrend.py b/nipype/interfaces/afni/tests/test_auto_Detrend.py index 3fb771cbfc..d3f81979a4 100644 --- a/nipype/interfaces/afni/tests/test_auto_Detrend.py +++ b/nipype/interfaces/afni/tests/test_auto_Detrend.py @@ -17,12 +17,16 @@ def test_Detrend_inputs(): mandatory=True, position=-1, ), + num_threads=dict(nohash=True, + usedefault=True, + ), out_file=dict(argstr='-prefix %s', name_source='in_file', name_template='%s_detrend', ), outputtype=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = Detrend.input_spec() diff --git a/nipype/interfaces/afni/tests/test_auto_Dot.py b/nipype/interfaces/afni/tests/test_auto_Dot.py index 21cebb28fe..a9c5941da5 100644 --- a/nipype/interfaces/afni/tests/test_auto_Dot.py +++ b/nipype/interfaces/afni/tests/test_auto_Dot.py @@ -35,13 +35,17 @@ def test_Dot_inputs(): ), mrange=dict(argstr='-mrange %s %s', ), + num_threads=dict(nohash=True, + usedefault=True, + ), out_file=dict(argstr=' |& tee %s', position=-1, ), outputtype=dict(), show_labels=dict(argstr='-show_labels', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), upper=dict(argstr='-upper', ), diff --git a/nipype/interfaces/afni/tests/test_auto_ECM.py b/nipype/interfaces/afni/tests/test_auto_ECM.py index 39bdefe0ba..3d38246a2b 100644 --- a/nipype/interfaces/afni/tests/test_auto_ECM.py +++ b/nipype/interfaces/afni/tests/test_auto_ECM.py @@ -33,6 +33,9 @@ def test_ECM_inputs(): ), memory=dict(argstr='-memory %f', ), + num_threads=dict(nohash=True, + usedefault=True, + ), out_file=dict(argstr='-prefix %s', name_source=['in_file'], name_template='%s_afni', @@ -46,7 +49,8 @@ def test_ECM_inputs(): ), sparsity=dict(argstr='-sparsity %f', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), thresh=dict(argstr='-thresh %f', ), diff --git a/nipype/interfaces/afni/tests/test_auto_Edge3.py b/nipype/interfaces/afni/tests/test_auto_Edge3.py index 51a4dc865d..108ce31912 100644 --- a/nipype/interfaces/afni/tests/test_auto_Edge3.py +++ b/nipype/interfaces/afni/tests/test_auto_Edge3.py @@ -28,6 +28,9 @@ def test_Edge3_inputs(): nscale=dict(argstr='-nscale', xor=['fscale', 'gscale', 'scale_floats'], ), + num_threads=dict(nohash=True, + usedefault=True, + ), out_file=dict(argstr='-prefix %s', position=-1, ), @@ -35,7 +38,8 @@ def test_Edge3_inputs(): scale_floats=dict(argstr='-scale_floats %f', xor=['fscale', 'gscale', 'nscale'], ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), verbose=dict(argstr='-verbose', ), diff --git a/nipype/interfaces/afni/tests/test_auto_Eval.py b/nipype/interfaces/afni/tests/test_auto_Eval.py index 490b09e486..5673adc4b9 100644 --- a/nipype/interfaces/afni/tests/test_auto_Eval.py +++ b/nipype/interfaces/afni/tests/test_auto_Eval.py @@ -26,6 +26,9 @@ def test_Eval_inputs(): in_file_c=dict(argstr='-c %s', position=2, ), + num_threads=dict(nohash=True, + usedefault=True, + ), other=dict(argstr='', ), out1D=dict(argstr='-1D', @@ -40,7 +43,8 @@ def test_Eval_inputs(): ), stop_idx=dict(requires=['start_idx'], ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = Eval.input_spec() diff --git a/nipype/interfaces/afni/tests/test_auto_FWHMx.py b/nipype/interfaces/afni/tests/test_auto_FWHMx.py index 527c7fdb22..97f2359535 100644 --- a/nipype/interfaces/afni/tests/test_auto_FWHMx.py +++ b/nipype/interfaces/afni/tests/test_auto_FWHMx.py @@ -56,7 +56,8 @@ def test_FWHMx_inputs(): name_source='in_file', name_template='%s_subbricks.out', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), unif=dict(argstr='-unif', ), diff --git a/nipype/interfaces/afni/tests/test_auto_Fim.py b/nipype/interfaces/afni/tests/test_auto_Fim.py index e80adb6801..c70714089f 100644 --- a/nipype/interfaces/afni/tests/test_auto_Fim.py +++ b/nipype/interfaces/afni/tests/test_auto_Fim.py @@ -24,6 +24,9 @@ def test_Fim_inputs(): mandatory=True, position=1, ), + num_threads=dict(nohash=True, + usedefault=True, + ), out=dict(argstr='-out %s', position=4, ), @@ -32,7 +35,8 @@ def test_Fim_inputs(): name_template='%s_fim', ), outputtype=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = Fim.input_spec() diff --git a/nipype/interfaces/afni/tests/test_auto_Fourier.py b/nipype/interfaces/afni/tests/test_auto_Fourier.py index 0573252de4..ddd22c65bd 100644 --- a/nipype/interfaces/afni/tests/test_auto_Fourier.py +++ b/nipype/interfaces/afni/tests/test_auto_Fourier.py @@ -23,6 +23,9 @@ def test_Fourier_inputs(): lowpass=dict(argstr='-lowpass %f', mandatory=True, ), + num_threads=dict(nohash=True, + usedefault=True, + ), out_file=dict(argstr='-prefix %s', name_source='in_file', name_template='%s_fourier', @@ -30,7 +33,8 @@ def test_Fourier_inputs(): outputtype=dict(), retrend=dict(argstr='-retrend', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = Fourier.input_spec() diff --git a/nipype/interfaces/afni/tests/test_auto_GCOR.py b/nipype/interfaces/afni/tests/test_auto_GCOR.py index 5cc9bf390c..9f307dda34 100644 --- a/nipype/interfaces/afni/tests/test_auto_GCOR.py +++ b/nipype/interfaces/afni/tests/test_auto_GCOR.py @@ -24,7 +24,8 @@ def test_GCOR_inputs(): ), no_demean=dict(argstr='-no_demean', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = GCOR.input_spec() diff --git a/nipype/interfaces/afni/tests/test_auto_Hist.py b/nipype/interfaces/afni/tests/test_auto_Hist.py index 91f4238834..b7cebb027b 100644 --- a/nipype/interfaces/afni/tests/test_auto_Hist.py +++ b/nipype/interfaces/afni/tests/test_auto_Hist.py @@ -41,7 +41,8 @@ def test_Hist_inputs(): showhist=dict(argstr='-showhist', usedefault=True, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = Hist.input_spec() diff --git a/nipype/interfaces/afni/tests/test_auto_LFCD.py b/nipype/interfaces/afni/tests/test_auto_LFCD.py index c3690b8fd5..a1beef49c8 100644 --- a/nipype/interfaces/afni/tests/test_auto_LFCD.py +++ b/nipype/interfaces/afni/tests/test_auto_LFCD.py @@ -23,6 +23,9 @@ def test_LFCD_inputs(): ), mask=dict(argstr='-mask %s', ), + num_threads=dict(nohash=True, + usedefault=True, + ), out_file=dict(argstr='-prefix %s', name_source=['in_file'], name_template='%s_afni', @@ -30,7 +33,8 @@ def test_LFCD_inputs(): outputtype=dict(), polort=dict(argstr='-polort %d', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), thresh=dict(argstr='-thresh %f', ), diff --git a/nipype/interfaces/afni/tests/test_auto_MaskTool.py b/nipype/interfaces/afni/tests/test_auto_MaskTool.py index 0121d68d7d..9c0e4289fd 100644 --- a/nipype/interfaces/afni/tests/test_auto_MaskTool.py +++ b/nipype/interfaces/afni/tests/test_auto_MaskTool.py @@ -35,12 +35,16 @@ def test_MaskTool_inputs(): ), inter=dict(argstr='-inter', ), + num_threads=dict(nohash=True, + usedefault=True, + ), out_file=dict(argstr='-prefix %s', name_source='in_file', name_template='%s_mask', ), outputtype=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), union=dict(argstr='-union', ), diff --git a/nipype/interfaces/afni/tests/test_auto_Maskave.py b/nipype/interfaces/afni/tests/test_auto_Maskave.py index 9c58ea432b..080eb2db26 100644 --- a/nipype/interfaces/afni/tests/test_auto_Maskave.py +++ b/nipype/interfaces/afni/tests/test_auto_Maskave.py @@ -20,6 +20,9 @@ def test_Maskave_inputs(): mask=dict(argstr='-mask %s', position=1, ), + num_threads=dict(nohash=True, + usedefault=True, + ), out_file=dict(argstr='> %s', keep_extension=True, name_source='in_file', @@ -30,7 +33,8 @@ def test_Maskave_inputs(): quiet=dict(argstr='-quiet', position=2, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = Maskave.input_spec() diff --git a/nipype/interfaces/afni/tests/test_auto_Means.py b/nipype/interfaces/afni/tests/test_auto_Means.py index 03bab07dcc..90420861c5 100644 --- a/nipype/interfaces/afni/tests/test_auto_Means.py +++ b/nipype/interfaces/afni/tests/test_auto_Means.py @@ -29,6 +29,9 @@ def test_Means_inputs(): ), non_zero=dict(argstr='-non_zero', ), + num_threads=dict(nohash=True, + usedefault=True, + ), out_file=dict(argstr='-prefix %s', name_source='in_file_a', name_template='%s_mean', @@ -42,7 +45,8 @@ def test_Means_inputs(): ), summ=dict(argstr='-sum', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = Means.input_spec() diff --git a/nipype/interfaces/afni/tests/test_auto_Merge.py b/nipype/interfaces/afni/tests/test_auto_Merge.py index f943128da9..cef21f818f 100644 --- a/nipype/interfaces/afni/tests/test_auto_Merge.py +++ b/nipype/interfaces/afni/tests/test_auto_Merge.py @@ -22,12 +22,16 @@ def test_Merge_inputs(): mandatory=True, position=-1, ), + num_threads=dict(nohash=True, + usedefault=True, + ), out_file=dict(argstr='-prefix %s', name_source='in_file', name_template='%s_merge', ), outputtype=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = Merge.input_spec() diff --git a/nipype/interfaces/afni/tests/test_auto_Notes.py b/nipype/interfaces/afni/tests/test_auto_Notes.py index ca08111696..c36ccabb08 100644 --- a/nipype/interfaces/afni/tests/test_auto_Notes.py +++ b/nipype/interfaces/afni/tests/test_auto_Notes.py @@ -24,6 +24,9 @@ def test_Notes_inputs(): mandatory=True, position=-1, ), + num_threads=dict(nohash=True, + usedefault=True, + ), out_file=dict(argstr='%s', ), outputtype=dict(), @@ -32,7 +35,8 @@ def test_Notes_inputs(): ), ses=dict(argstr='-ses', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = Notes.input_spec() diff --git a/nipype/interfaces/afni/tests/test_auto_NwarpApply.py b/nipype/interfaces/afni/tests/test_auto_NwarpApply.py index 273d0fed47..bf9cba8a2f 100644 --- a/nipype/interfaces/afni/tests/test_auto_NwarpApply.py +++ b/nipype/interfaces/afni/tests/test_auto_NwarpApply.py @@ -32,7 +32,8 @@ def test_NwarpApply_inputs(): ), short=dict(argstr='-short', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), verb=dict(argstr='-verb', xor=['quiet'], diff --git a/nipype/interfaces/afni/tests/test_auto_OneDToolPy.py b/nipype/interfaces/afni/tests/test_auto_OneDToolPy.py index fd6aed4b12..3d5e8cf9bf 100644 --- a/nipype/interfaces/afni/tests/test_auto_OneDToolPy.py +++ b/nipype/interfaces/afni/tests/test_auto_OneDToolPy.py @@ -44,7 +44,8 @@ def test_OneDToolPy_inputs(): ), show_trs_uncensored=dict(argstr='-show_trs_uncensored %s', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = OneDToolPy.input_spec() diff --git a/nipype/interfaces/afni/tests/test_auto_QualityIndex.py b/nipype/interfaces/afni/tests/test_auto_QualityIndex.py index 2659fc8d91..a0af353f63 100644 --- a/nipype/interfaces/afni/tests/test_auto_QualityIndex.py +++ b/nipype/interfaces/afni/tests/test_auto_QualityIndex.py @@ -44,7 +44,8 @@ def test_QualityIndex_inputs(): spearman=dict(argstr='-spearman', usedefault=True, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = QualityIndex.input_spec() diff --git a/nipype/interfaces/afni/tests/test_auto_Qwarp.py b/nipype/interfaces/afni/tests/test_auto_Qwarp.py index 2848fe97f8..2ea08c4c0e 100644 --- a/nipype/interfaces/afni/tests/test_auto_Qwarp.py +++ b/nipype/interfaces/afni/tests/test_auto_Qwarp.py @@ -98,6 +98,9 @@ def test_Qwarp_inputs(): ), noweight=dict(argstr='-noweight', ), + num_threads=dict(nohash=True, + usedefault=True, + ), out_file=dict(argstr='-prefix %s', genfile=True, name_source=['in_file'], @@ -122,7 +125,8 @@ def test_Qwarp_inputs(): ), resample=dict(argstr='-resample', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), verb=dict(argstr='-verb', xor=['quiet'], diff --git a/nipype/interfaces/afni/tests/test_auto_QwarpPlusMinus.py b/nipype/interfaces/afni/tests/test_auto_QwarpPlusMinus.py index 04f12426de..eed8b3b3e4 100644 --- a/nipype/interfaces/afni/tests/test_auto_QwarpPlusMinus.py +++ b/nipype/interfaces/afni/tests/test_auto_QwarpPlusMinus.py @@ -30,7 +30,8 @@ def test_QwarpPlusMinus_inputs(): copyfile=False, mandatory=True, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = QwarpPlusMinus.input_spec() diff --git a/nipype/interfaces/afni/tests/test_auto_Refit.py b/nipype/interfaces/afni/tests/test_auto_Refit.py index b6c167198c..06c5f98255 100644 --- a/nipype/interfaces/afni/tests/test_auto_Refit.py +++ b/nipype/interfaces/afni/tests/test_auto_Refit.py @@ -35,7 +35,8 @@ def test_Refit_inputs(): ), space=dict(argstr='-space %s', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), xdel=dict(argstr='-xdel %f', ), diff --git a/nipype/interfaces/afni/tests/test_auto_Remlfit.py b/nipype/interfaces/afni/tests/test_auto_Remlfit.py index a061a01449..37566fd66d 100644 --- a/nipype/interfaces/afni/tests/test_auto_Remlfit.py +++ b/nipype/interfaces/afni/tests/test_auto_Remlfit.py @@ -57,6 +57,9 @@ def test_Remlfit_inputs(): ), nofdr=dict(argstr='-noFDR', ), + num_threads=dict(nohash=True, + usedefault=True, + ), obeta=dict(argstr='-Obeta %s', ), obuck=dict(argstr='-Obuck %s', @@ -85,7 +88,8 @@ def test_Remlfit_inputs(): ), slibase_sm=dict(argstr='-slibase_sm %s', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), tout=dict(argstr='-tout', ), diff --git a/nipype/interfaces/afni/tests/test_auto_Resample.py b/nipype/interfaces/afni/tests/test_auto_Resample.py index 4fabc2749c..34227627db 100644 --- a/nipype/interfaces/afni/tests/test_auto_Resample.py +++ b/nipype/interfaces/afni/tests/test_auto_Resample.py @@ -19,6 +19,9 @@ def test_Resample_inputs(): ), master=dict(argstr='-master %s', ), + num_threads=dict(nohash=True, + usedefault=True, + ), orientation=dict(argstr='-orient %s', ), out_file=dict(argstr='-prefix %s', @@ -28,7 +31,8 @@ def test_Resample_inputs(): outputtype=dict(), resample_mode=dict(argstr='-rmode %s', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), voxel_size=dict(argstr='-dxyz %f %f %f', ), diff --git a/nipype/interfaces/afni/tests/test_auto_Retroicor.py b/nipype/interfaces/afni/tests/test_auto_Retroicor.py index 6822425f00..142bf0f42d 100644 --- a/nipype/interfaces/afni/tests/test_auto_Retroicor.py +++ b/nipype/interfaces/afni/tests/test_auto_Retroicor.py @@ -24,6 +24,9 @@ def test_Retroicor_inputs(): mandatory=True, position=-1, ), + num_threads=dict(nohash=True, + usedefault=True, + ), order=dict(argstr='-order %s', position=-5, ), @@ -40,7 +43,8 @@ def test_Retroicor_inputs(): hash_files=False, position=-7, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), threshold=dict(argstr='-threshold %d', position=-4, diff --git a/nipype/interfaces/afni/tests/test_auto_SVMTest.py b/nipype/interfaces/afni/tests/test_auto_SVMTest.py index 496f947a28..4a7c892d2b 100644 --- a/nipype/interfaces/afni/tests/test_auto_SVMTest.py +++ b/nipype/interfaces/afni/tests/test_auto_SVMTest.py @@ -26,13 +26,17 @@ def test_SVMTest_inputs(): ), nopredcensord=dict(argstr='-nopredcensord', ), + num_threads=dict(nohash=True, + usedefault=True, + ), options=dict(argstr='%s', ), out_file=dict(argstr='-predictions %s', name_template='%s_predictions', ), outputtype=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), testlabels=dict(argstr='-testlabels %s', ), diff --git a/nipype/interfaces/afni/tests/test_auto_SVMTrain.py b/nipype/interfaces/afni/tests/test_auto_SVMTrain.py index 25973372e6..17515f7cda 100644 --- a/nipype/interfaces/afni/tests/test_auto_SVMTrain.py +++ b/nipype/interfaces/afni/tests/test_auto_SVMTrain.py @@ -38,6 +38,9 @@ def test_SVMTrain_inputs(): ), nomodelmask=dict(argstr='-nomodelmask', ), + num_threads=dict(nohash=True, + usedefault=True, + ), options=dict(argstr='%s', ), out_file=dict(argstr='-bucket %s', @@ -46,7 +49,8 @@ def test_SVMTrain_inputs(): suffix='_bucket', ), outputtype=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), trainlabels=dict(argstr='-trainlabels %s', ), diff --git a/nipype/interfaces/afni/tests/test_auto_Seg.py b/nipype/interfaces/afni/tests/test_auto_Seg.py index e8114e5838..5d57b5b7b5 100644 --- a/nipype/interfaces/afni/tests/test_auto_Seg.py +++ b/nipype/interfaces/afni/tests/test_auto_Seg.py @@ -39,7 +39,8 @@ def test_Seg_inputs(): ), prefix=dict(argstr='-prefix %s', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = Seg.input_spec() diff --git a/nipype/interfaces/afni/tests/test_auto_SkullStrip.py b/nipype/interfaces/afni/tests/test_auto_SkullStrip.py index 37b24cfb76..e31d29f62f 100644 --- a/nipype/interfaces/afni/tests/test_auto_SkullStrip.py +++ b/nipype/interfaces/afni/tests/test_auto_SkullStrip.py @@ -17,12 +17,16 @@ def test_SkullStrip_inputs(): mandatory=True, position=1, ), + num_threads=dict(nohash=True, + usedefault=True, + ), out_file=dict(argstr='-prefix %s', name_source='in_file', name_template='%s_skullstrip', ), outputtype=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = SkullStrip.input_spec() diff --git a/nipype/interfaces/afni/tests/test_auto_TCat.py b/nipype/interfaces/afni/tests/test_auto_TCat.py index 9c72dcd545..9b1c61c496 100644 --- a/nipype/interfaces/afni/tests/test_auto_TCat.py +++ b/nipype/interfaces/afni/tests/test_auto_TCat.py @@ -17,6 +17,9 @@ def test_TCat_inputs(): mandatory=True, position=-1, ), + num_threads=dict(nohash=True, + usedefault=True, + ), out_file=dict(argstr='-prefix %s', name_source='in_files', name_template='%s_tcat', @@ -25,7 +28,8 @@ def test_TCat_inputs(): rlt=dict(argstr='-rlt%s', position=1, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = TCat.input_spec() diff --git a/nipype/interfaces/afni/tests/test_auto_TCorr1D.py b/nipype/interfaces/afni/tests/test_auto_TCorr1D.py index e42ac2b7d5..d15485235e 100644 --- a/nipype/interfaces/afni/tests/test_auto_TCorr1D.py +++ b/nipype/interfaces/afni/tests/test_auto_TCorr1D.py @@ -16,6 +16,9 @@ def test_TCorr1D_inputs(): position=1, xor=['pearson', 'spearman', 'quadrant'], ), + num_threads=dict(nohash=True, + usedefault=True, + ), out_file=dict(argstr='-prefix %s', keep_extension=True, name_source='xset', @@ -34,7 +37,8 @@ def test_TCorr1D_inputs(): position=1, xor=['pearson', 'quadrant', 'ktaub'], ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), xset=dict(argstr=' %s', copyfile=False, diff --git a/nipype/interfaces/afni/tests/test_auto_TCorrMap.py b/nipype/interfaces/afni/tests/test_auto_TCorrMap.py index 8c80f15080..78accd3bb8 100644 --- a/nipype/interfaces/afni/tests/test_auto_TCorrMap.py +++ b/nipype/interfaces/afni/tests/test_auto_TCorrMap.py @@ -55,6 +55,9 @@ def test_TCorrMap_inputs(): name_source='in_file', suffix='_mean', ), + num_threads=dict(nohash=True, + usedefault=True, + ), out_file=dict(argstr='-prefix %s', name_source=['in_file'], name_template='%s_afni', @@ -83,7 +86,8 @@ def test_TCorrMap_inputs(): suffix='_sexpr', xor=('average_expr', 'average_expr_nonzero', 'sum_expr'), ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), thresholds=dict(), var_absolute_threshold=dict(argstr='-VarThresh %f %f %f %s', diff --git a/nipype/interfaces/afni/tests/test_auto_TCorrelate.py b/nipype/interfaces/afni/tests/test_auto_TCorrelate.py index e2e100cdb7..2debe70369 100644 --- a/nipype/interfaces/afni/tests/test_auto_TCorrelate.py +++ b/nipype/interfaces/afni/tests/test_auto_TCorrelate.py @@ -12,6 +12,9 @@ def test_TCorrelate_inputs(): ignore_exception=dict(nohash=True, usedefault=True, ), + num_threads=dict(nohash=True, + usedefault=True, + ), out_file=dict(argstr='-prefix %s', name_source='xset', name_template='%s_tcorr', @@ -21,7 +24,8 @@ def test_TCorrelate_inputs(): ), polort=dict(argstr='-polort %d', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), xset=dict(argstr='%s', copyfile=False, diff --git a/nipype/interfaces/afni/tests/test_auto_TNorm.py b/nipype/interfaces/afni/tests/test_auto_TNorm.py index 3b9fac4b98..e47a91340a 100644 --- a/nipype/interfaces/afni/tests/test_auto_TNorm.py +++ b/nipype/interfaces/afni/tests/test_auto_TNorm.py @@ -27,6 +27,9 @@ def test_TNorm_inputs(): ), normx=dict(argstr='-normx', ), + num_threads=dict(nohash=True, + usedefault=True, + ), out_file=dict(argstr='-prefix %s', name_source='in_file', name_template='%s_tnorm', @@ -34,7 +37,8 @@ def test_TNorm_inputs(): outputtype=dict(), polort=dict(argstr='-polort %s', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = TNorm.input_spec() diff --git a/nipype/interfaces/afni/tests/test_auto_TShift.py b/nipype/interfaces/afni/tests/test_auto_TShift.py index e167205995..a2cf3847bb 100644 --- a/nipype/interfaces/afni/tests/test_auto_TShift.py +++ b/nipype/interfaces/afni/tests/test_auto_TShift.py @@ -21,6 +21,9 @@ def test_TShift_inputs(): ), interp=dict(argstr='-%s', ), + num_threads=dict(nohash=True, + usedefault=True, + ), out_file=dict(argstr='-prefix %s', name_source='in_file', name_template='%s_tshift', @@ -30,7 +33,8 @@ def test_TShift_inputs(): ), rltplus=dict(argstr='-rlt+', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), tpattern=dict(argstr='-tpattern %s', ), diff --git a/nipype/interfaces/afni/tests/test_auto_TStat.py b/nipype/interfaces/afni/tests/test_auto_TStat.py index f09fb5b4af..7d5a87645f 100644 --- a/nipype/interfaces/afni/tests/test_auto_TStat.py +++ b/nipype/interfaces/afni/tests/test_auto_TStat.py @@ -19,6 +19,9 @@ def test_TStat_inputs(): ), mask=dict(argstr='-mask %s', ), + num_threads=dict(nohash=True, + usedefault=True, + ), options=dict(argstr='%s', ), out_file=dict(argstr='-prefix %s', @@ -26,7 +29,8 @@ def test_TStat_inputs(): name_template='%s_tstat', ), outputtype=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = TStat.input_spec() diff --git a/nipype/interfaces/afni/tests/test_auto_To3D.py b/nipype/interfaces/afni/tests/test_auto_To3D.py index 0df075d87f..3124ad083c 100644 --- a/nipype/interfaces/afni/tests/test_auto_To3D.py +++ b/nipype/interfaces/afni/tests/test_auto_To3D.py @@ -24,6 +24,9 @@ def test_To3D_inputs(): mandatory=True, position=-1, ), + num_threads=dict(nohash=True, + usedefault=True, + ), out_file=dict(argstr='-prefix %s', name_source=['in_folder'], name_template='%s', @@ -31,7 +34,8 @@ def test_To3D_inputs(): outputtype=dict(), skipoutliers=dict(argstr='-skip_outliers', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = To3D.input_spec() diff --git a/nipype/interfaces/afni/tests/test_auto_Undump.py b/nipype/interfaces/afni/tests/test_auto_Undump.py index 808de86daf..a063063198 100644 --- a/nipype/interfaces/afni/tests/test_auto_Undump.py +++ b/nipype/interfaces/afni/tests/test_auto_Undump.py @@ -29,13 +29,17 @@ def test_Undump_inputs(): ), mask_file=dict(argstr='-mask %s', ), + num_threads=dict(nohash=True, + usedefault=True, + ), out_file=dict(argstr='-prefix %s', name_source='in_file', ), outputtype=dict(), srad=dict(argstr='-srad -%f', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = Undump.input_spec() diff --git a/nipype/interfaces/afni/tests/test_auto_Unifize.py b/nipype/interfaces/afni/tests/test_auto_Unifize.py index 2c37e13fb1..6105a9d5c2 100644 --- a/nipype/interfaces/afni/tests/test_auto_Unifize.py +++ b/nipype/interfaces/afni/tests/test_auto_Unifize.py @@ -25,6 +25,9 @@ def test_Unifize_inputs(): ), no_duplo=dict(argstr='-noduplo', ), + num_threads=dict(nohash=True, + usedefault=True, + ), out_file=dict(argstr='-prefix %s', name_source='in_file', ), @@ -33,7 +36,8 @@ def test_Unifize_inputs(): ), t2=dict(argstr='-T2', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), urad=dict(argstr='-Urad %s', ), diff --git a/nipype/interfaces/afni/tests/test_auto_Volreg.py b/nipype/interfaces/afni/tests/test_auto_Volreg.py index 314ac04743..25f8942b98 100644 --- a/nipype/interfaces/afni/tests/test_auto_Volreg.py +++ b/nipype/interfaces/afni/tests/test_auto_Volreg.py @@ -30,6 +30,9 @@ def test_Volreg_inputs(): name_template='%s_md.1D', position=-4, ), + num_threads=dict(nohash=True, + usedefault=True, + ), oned_file=dict(argstr='-1Dfile %s', keep_extension=True, name_source='in_file', @@ -45,7 +48,8 @@ def test_Volreg_inputs(): name_template='%s_volreg', ), outputtype=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), timeshift=dict(argstr='-tshift 0', ), diff --git a/nipype/interfaces/afni/tests/test_auto_Warp.py b/nipype/interfaces/afni/tests/test_auto_Warp.py index e370d32058..c579758afb 100644 --- a/nipype/interfaces/afni/tests/test_auto_Warp.py +++ b/nipype/interfaces/afni/tests/test_auto_Warp.py @@ -29,12 +29,16 @@ def test_Warp_inputs(): ), newgrid=dict(argstr='-newgrid %f', ), + num_threads=dict(nohash=True, + usedefault=True, + ), out_file=dict(argstr='-prefix %s', name_source='in_file', name_template='%s_warp', ), outputtype=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), tta2mni=dict(argstr='-tta2mni', ), diff --git a/nipype/interfaces/afni/tests/test_auto_ZCutUp.py b/nipype/interfaces/afni/tests/test_auto_ZCutUp.py index 8019b1dcf8..244b5049ce 100644 --- a/nipype/interfaces/afni/tests/test_auto_ZCutUp.py +++ b/nipype/interfaces/afni/tests/test_auto_ZCutUp.py @@ -19,12 +19,16 @@ def test_ZCutUp_inputs(): ), keep=dict(argstr='-keep %s', ), + num_threads=dict(nohash=True, + usedefault=True, + ), out_file=dict(argstr='-prefix %s', name_source='in_file', name_template='%s_zcutup', ), outputtype=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = ZCutUp.input_spec() diff --git a/nipype/interfaces/afni/tests/test_auto_Zcat.py b/nipype/interfaces/afni/tests/test_auto_Zcat.py index 48f742df5e..7b625bb5f5 100644 --- a/nipype/interfaces/afni/tests/test_auto_Zcat.py +++ b/nipype/interfaces/afni/tests/test_auto_Zcat.py @@ -25,11 +25,15 @@ def test_Zcat_inputs(): nscale=dict(argstr='-nscale', xor=['fscale'], ), + num_threads=dict(nohash=True, + usedefault=True, + ), out_file=dict(argstr='-prefix %s', name_template='zcat', ), outputtype=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), verb=dict(argstr='-verb', ), diff --git a/nipype/interfaces/afni/tests/test_auto_Zeropad.py b/nipype/interfaces/afni/tests/test_auto_Zeropad.py index 551498e1ab..dfb5ac0981 100644 --- a/nipype/interfaces/afni/tests/test_auto_Zeropad.py +++ b/nipype/interfaces/afni/tests/test_auto_Zeropad.py @@ -50,11 +50,15 @@ def test_Zeropad_inputs(): mm=dict(argstr='-mm', xor=['master'], ), + num_threads=dict(nohash=True, + usedefault=True, + ), out_file=dict(argstr='-prefix %s', name_template='zeropad', ), outputtype=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), z=dict(argstr='-z %i', xor=['master'], diff --git a/nipype/interfaces/ants/tests/test_auto_ANTS.py b/nipype/interfaces/ants/tests/test_auto_ANTS.py index e7fbe117ae..883f099b60 100644 --- a/nipype/interfaces/ants/tests/test_auto_ANTS.py +++ b/nipype/interfaces/ants/tests/test_auto_ANTS.py @@ -65,7 +65,8 @@ def test_ANTS_inputs(): ), symmetry_type=dict(requires=['delta_time'], ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), transformation_model=dict(argstr='%s', mandatory=True, diff --git a/nipype/interfaces/ants/tests/test_auto_ANTSCommand.py b/nipype/interfaces/ants/tests/test_auto_ANTSCommand.py index 4f6920645b..e3a410fcb4 100644 --- a/nipype/interfaces/ants/tests/test_auto_ANTSCommand.py +++ b/nipype/interfaces/ants/tests/test_auto_ANTSCommand.py @@ -15,7 +15,8 @@ def test_ANTSCommand_inputs(): num_threads=dict(nohash=True, usedefault=True, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = ANTSCommand.input_spec() diff --git a/nipype/interfaces/ants/tests/test_auto_AffineInitializer.py b/nipype/interfaces/ants/tests/test_auto_AffineInitializer.py index 319798e13f..1b5652a4ce 100644 --- a/nipype/interfaces/ants/tests/test_auto_AffineInitializer.py +++ b/nipype/interfaces/ants/tests/test_auto_AffineInitializer.py @@ -47,7 +47,8 @@ def test_AffineInitializer_inputs(): position=4, usedefault=True, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = AffineInitializer.input_spec() diff --git a/nipype/interfaces/ants/tests/test_auto_AntsJointFusion.py b/nipype/interfaces/ants/tests/test_auto_AntsJointFusion.py index dcd115429f..1ea0db9a82 100644 --- a/nipype/interfaces/ants/tests/test_auto_AntsJointFusion.py +++ b/nipype/interfaces/ants/tests/test_auto_AntsJointFusion.py @@ -68,7 +68,8 @@ def test_AntsJointFusion_inputs(): target_image=dict(argstr='-t %s', mandatory=True, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), verbose=dict(argstr='-v', ), diff --git a/nipype/interfaces/ants/tests/test_auto_ApplyTransforms.py b/nipype/interfaces/ants/tests/test_auto_ApplyTransforms.py index 4b27963757..f7451edde1 100644 --- a/nipype/interfaces/ants/tests/test_auto_ApplyTransforms.py +++ b/nipype/interfaces/ants/tests/test_auto_ApplyTransforms.py @@ -43,7 +43,8 @@ def test_ApplyTransforms_inputs(): reference_image=dict(argstr='--reference-image %s', mandatory=True, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), transforms=dict(argstr='%s', mandatory=True, diff --git a/nipype/interfaces/ants/tests/test_auto_ApplyTransformsToPoints.py b/nipype/interfaces/ants/tests/test_auto_ApplyTransformsToPoints.py index 5a20ac0f43..e36cad94bb 100644 --- a/nipype/interfaces/ants/tests/test_auto_ApplyTransformsToPoints.py +++ b/nipype/interfaces/ants/tests/test_auto_ApplyTransformsToPoints.py @@ -26,7 +26,8 @@ def test_ApplyTransformsToPoints_inputs(): name_source=['input_file'], name_template='%s_transformed.csv', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), transforms=dict(argstr='%s', mandatory=True, diff --git a/nipype/interfaces/ants/tests/test_auto_Atropos.py b/nipype/interfaces/ants/tests/test_auto_Atropos.py index 50fd85477d..ff405ad1af 100644 --- a/nipype/interfaces/ants/tests/test_auto_Atropos.py +++ b/nipype/interfaces/ants/tests/test_auto_Atropos.py @@ -57,7 +57,8 @@ def test_Atropos_inputs(): ), prior_weighting=dict(), save_posteriors=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), use_mixture_model_proportions=dict(requires=['posterior_formulation'], ), diff --git a/nipype/interfaces/ants/tests/test_auto_AverageAffineTransform.py b/nipype/interfaces/ants/tests/test_auto_AverageAffineTransform.py index 25a7f0b892..af33926d93 100644 --- a/nipype/interfaces/ants/tests/test_auto_AverageAffineTransform.py +++ b/nipype/interfaces/ants/tests/test_auto_AverageAffineTransform.py @@ -24,7 +24,8 @@ def test_AverageAffineTransform_inputs(): mandatory=True, position=1, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), transforms=dict(argstr='%s', mandatory=True, diff --git a/nipype/interfaces/ants/tests/test_auto_AverageImages.py b/nipype/interfaces/ants/tests/test_auto_AverageImages.py index 47accd6758..4504f30469 100644 --- a/nipype/interfaces/ants/tests/test_auto_AverageImages.py +++ b/nipype/interfaces/ants/tests/test_auto_AverageImages.py @@ -32,7 +32,8 @@ def test_AverageImages_inputs(): position=1, usedefault=True, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = AverageImages.input_spec() diff --git a/nipype/interfaces/ants/tests/test_auto_BrainExtraction.py b/nipype/interfaces/ants/tests/test_auto_BrainExtraction.py index 86f652cbbe..7576c36f27 100644 --- a/nipype/interfaces/ants/tests/test_auto_BrainExtraction.py +++ b/nipype/interfaces/ants/tests/test_auto_BrainExtraction.py @@ -40,7 +40,8 @@ def test_BrainExtraction_inputs(): out_prefix=dict(argstr='-o %s', usedefault=True, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), use_floatingpoint_precision=dict(argstr='-q %d', ), diff --git a/nipype/interfaces/ants/tests/test_auto_ConvertScalarImageToRGB.py b/nipype/interfaces/ants/tests/test_auto_ConvertScalarImageToRGB.py index 42d049990b..083e5d0d7b 100644 --- a/nipype/interfaces/ants/tests/test_auto_ConvertScalarImageToRGB.py +++ b/nipype/interfaces/ants/tests/test_auto_ConvertScalarImageToRGB.py @@ -57,7 +57,8 @@ def test_ConvertScalarImageToRGB_inputs(): position=2, usedefault=True, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = ConvertScalarImageToRGB.input_spec() diff --git a/nipype/interfaces/ants/tests/test_auto_CorticalThickness.py b/nipype/interfaces/ants/tests/test_auto_CorticalThickness.py index 5fe224b494..4216eb047d 100644 --- a/nipype/interfaces/ants/tests/test_auto_CorticalThickness.py +++ b/nipype/interfaces/ants/tests/test_auto_CorticalThickness.py @@ -61,7 +61,8 @@ def test_CorticalThickness_inputs(): t1_registration_template=dict(argstr='-t %s', mandatory=True, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), use_floatingpoint_precision=dict(argstr='-j %d', ), diff --git a/nipype/interfaces/ants/tests/test_auto_CreateJacobianDeterminantImage.py b/nipype/interfaces/ants/tests/test_auto_CreateJacobianDeterminantImage.py index f7aafb27be..b5531137aa 100644 --- a/nipype/interfaces/ants/tests/test_auto_CreateJacobianDeterminantImage.py +++ b/nipype/interfaces/ants/tests/test_auto_CreateJacobianDeterminantImage.py @@ -31,7 +31,8 @@ def test_CreateJacobianDeterminantImage_inputs(): mandatory=True, position=2, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), useGeometric=dict(argstr='%d', position=4, diff --git a/nipype/interfaces/ants/tests/test_auto_CreateTiledMosaic.py b/nipype/interfaces/ants/tests/test_auto_CreateTiledMosaic.py index 09340f631f..14d8456fe1 100644 --- a/nipype/interfaces/ants/tests/test_auto_CreateTiledMosaic.py +++ b/nipype/interfaces/ants/tests/test_auto_CreateTiledMosaic.py @@ -38,7 +38,8 @@ def test_CreateTiledMosaic_inputs(): ), slices=dict(argstr='-s %s', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), tile_geometry=dict(argstr='-t %s', ), diff --git a/nipype/interfaces/ants/tests/test_auto_DenoiseImage.py b/nipype/interfaces/ants/tests/test_auto_DenoiseImage.py index 6c28016de6..5ba205137c 100644 --- a/nipype/interfaces/ants/tests/test_auto_DenoiseImage.py +++ b/nipype/interfaces/ants/tests/test_auto_DenoiseImage.py @@ -42,7 +42,8 @@ def test_DenoiseImage_inputs(): shrink_factor=dict(argstr='-s %s', usedefault=True, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), verbose=dict(argstr='-v', ), diff --git a/nipype/interfaces/ants/tests/test_auto_GenWarpFields.py b/nipype/interfaces/ants/tests/test_auto_GenWarpFields.py index f5d79bd851..b714d2c8a5 100644 --- a/nipype/interfaces/ants/tests/test_auto_GenWarpFields.py +++ b/nipype/interfaces/ants/tests/test_auto_GenWarpFields.py @@ -43,7 +43,8 @@ def test_GenWarpFields_inputs(): ), similarity_metric=dict(argstr='-s %s', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), transformation_model=dict(argstr='-t %s', usedefault=True, diff --git a/nipype/interfaces/ants/tests/test_auto_JointFusion.py b/nipype/interfaces/ants/tests/test_auto_JointFusion.py index cddfb487be..5f1dcb5256 100644 --- a/nipype/interfaces/ants/tests/test_auto_JointFusion.py +++ b/nipype/interfaces/ants/tests/test_auto_JointFusion.py @@ -56,7 +56,8 @@ def test_JointFusion_inputs(): target_image=dict(argstr='-tg %s...', mandatory=True, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), warped_intensity_images=dict(argstr='-g %s...', mandatory=True, diff --git a/nipype/interfaces/ants/tests/test_auto_KellyKapowski.py b/nipype/interfaces/ants/tests/test_auto_KellyKapowski.py index 046d31d158..99936119bd 100644 --- a/nipype/interfaces/ants/tests/test_auto_KellyKapowski.py +++ b/nipype/interfaces/ants/tests/test_auto_KellyKapowski.py @@ -45,7 +45,8 @@ def test_KellyKapowski_inputs(): ), smoothing_velocity_field=dict(argstr='--smoothing-velocity-field-parameter %f', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), thickness_prior_estimate=dict(argstr='--thickness-prior-estimate %f', usedefault=True, diff --git a/nipype/interfaces/ants/tests/test_auto_LaplacianThickness.py b/nipype/interfaces/ants/tests/test_auto_LaplacianThickness.py index 71b0483f92..8a19b6fb64 100644 --- a/nipype/interfaces/ants/tests/test_auto_LaplacianThickness.py +++ b/nipype/interfaces/ants/tests/test_auto_LaplacianThickness.py @@ -45,7 +45,8 @@ def test_LaplacianThickness_inputs(): sulcus_prior=dict(argstr='use-sulcus-prior', position=7, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = LaplacianThickness.input_spec() diff --git a/nipype/interfaces/ants/tests/test_auto_MeasureImageSimilarity.py b/nipype/interfaces/ants/tests/test_auto_MeasureImageSimilarity.py index 3dba65d8bb..76787b1b87 100644 --- a/nipype/interfaces/ants/tests/test_auto_MeasureImageSimilarity.py +++ b/nipype/interfaces/ants/tests/test_auto_MeasureImageSimilarity.py @@ -41,7 +41,8 @@ def test_MeasureImageSimilarity_inputs(): sampling_strategy=dict(requires=['metric'], usedefault=True, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = MeasureImageSimilarity.input_spec() diff --git a/nipype/interfaces/ants/tests/test_auto_MultiplyImages.py b/nipype/interfaces/ants/tests/test_auto_MultiplyImages.py index 2175db201d..bc14b1f0c2 100644 --- a/nipype/interfaces/ants/tests/test_auto_MultiplyImages.py +++ b/nipype/interfaces/ants/tests/test_auto_MultiplyImages.py @@ -32,7 +32,8 @@ def test_MultiplyImages_inputs(): mandatory=True, position=2, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = MultiplyImages.input_spec() diff --git a/nipype/interfaces/ants/tests/test_auto_N4BiasFieldCorrection.py b/nipype/interfaces/ants/tests/test_auto_N4BiasFieldCorrection.py index b863f888d9..72331ffb6b 100644 --- a/nipype/interfaces/ants/tests/test_auto_N4BiasFieldCorrection.py +++ b/nipype/interfaces/ants/tests/test_auto_N4BiasFieldCorrection.py @@ -46,7 +46,8 @@ def test_N4BiasFieldCorrection_inputs(): ), shrink_factor=dict(argstr='--shrink-factor %d', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), weight_image=dict(argstr='--weight-image %s', ), diff --git a/nipype/interfaces/ants/tests/test_auto_Registration.py b/nipype/interfaces/ants/tests/test_auto_Registration.py index d437e437f3..868ea3af8b 100644 --- a/nipype/interfaces/ants/tests/test_auto_Registration.py +++ b/nipype/interfaces/ants/tests/test_auto_Registration.py @@ -106,7 +106,8 @@ def test_Registration_inputs(): ), smoothing_sigmas=dict(mandatory=True, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), transform_parameters=dict(), transforms=dict(argstr='%s', diff --git a/nipype/interfaces/ants/tests/test_auto_WarpImageMultiTransform.py b/nipype/interfaces/ants/tests/test_auto_WarpImageMultiTransform.py index e016aac163..602ec83d27 100644 --- a/nipype/interfaces/ants/tests/test_auto_WarpImageMultiTransform.py +++ b/nipype/interfaces/ants/tests/test_auto_WarpImageMultiTransform.py @@ -39,7 +39,8 @@ def test_WarpImageMultiTransform_inputs(): ), reslice_by_header=dict(argstr='--reslice-by-header', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), tightest_box=dict(argstr='--tightest-bounding-box', xor=['reference_image'], diff --git a/nipype/interfaces/ants/tests/test_auto_WarpTimeSeriesImageMultiTransform.py b/nipype/interfaces/ants/tests/test_auto_WarpTimeSeriesImageMultiTransform.py index 79fbf89302..7f0d6b13f2 100644 --- a/nipype/interfaces/ants/tests/test_auto_WarpTimeSeriesImageMultiTransform.py +++ b/nipype/interfaces/ants/tests/test_auto_WarpTimeSeriesImageMultiTransform.py @@ -32,7 +32,8 @@ def test_WarpTimeSeriesImageMultiTransform_inputs(): ), reslice_by_header=dict(argstr='--reslice-by-header', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), tightest_box=dict(argstr='--tightest-bounding-box', xor=['reference_image'], diff --git a/nipype/interfaces/ants/tests/test_auto_antsBrainExtraction.py b/nipype/interfaces/ants/tests/test_auto_antsBrainExtraction.py index 230176c856..d13cc2296e 100644 --- a/nipype/interfaces/ants/tests/test_auto_antsBrainExtraction.py +++ b/nipype/interfaces/ants/tests/test_auto_antsBrainExtraction.py @@ -40,7 +40,8 @@ def test_antsBrainExtraction_inputs(): out_prefix=dict(argstr='-o %s', usedefault=True, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), use_floatingpoint_precision=dict(argstr='-q %d', ), diff --git a/nipype/interfaces/ants/tests/test_auto_antsCorticalThickness.py b/nipype/interfaces/ants/tests/test_auto_antsCorticalThickness.py index 02f2d46c59..d5a891049e 100644 --- a/nipype/interfaces/ants/tests/test_auto_antsCorticalThickness.py +++ b/nipype/interfaces/ants/tests/test_auto_antsCorticalThickness.py @@ -61,7 +61,8 @@ def test_antsCorticalThickness_inputs(): t1_registration_template=dict(argstr='-t %s', mandatory=True, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), use_floatingpoint_precision=dict(argstr='-j %d', ), diff --git a/nipype/interfaces/ants/tests/test_auto_antsIntroduction.py b/nipype/interfaces/ants/tests/test_auto_antsIntroduction.py index 0a9646ae2c..678231b004 100644 --- a/nipype/interfaces/ants/tests/test_auto_antsIntroduction.py +++ b/nipype/interfaces/ants/tests/test_auto_antsIntroduction.py @@ -43,7 +43,8 @@ def test_antsIntroduction_inputs(): ), similarity_metric=dict(argstr='-s %s', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), transformation_model=dict(argstr='-t %s', usedefault=True, diff --git a/nipype/interfaces/ants/tests/test_auto_buildtemplateparallel.py b/nipype/interfaces/ants/tests/test_auto_buildtemplateparallel.py index 9232bb32b1..73c5499239 100644 --- a/nipype/interfaces/ants/tests/test_auto_buildtemplateparallel.py +++ b/nipype/interfaces/ants/tests/test_auto_buildtemplateparallel.py @@ -46,7 +46,8 @@ def test_buildtemplateparallel_inputs(): ), similarity_metric=dict(argstr='-s %s', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), transformation_model=dict(argstr='-t %s', usedefault=True, diff --git a/nipype/interfaces/brainsuite/tests/test_auto_BDP.py b/nipype/interfaces/brainsuite/tests/test_auto_BDP.py index a2cbc2a440..b9d7038198 100644 --- a/nipype/interfaces/brainsuite/tests/test_auto_BDP.py +++ b/nipype/interfaces/brainsuite/tests/test_auto_BDP.py @@ -105,7 +105,8 @@ def test_BDP_inputs(): ), t1Mask=dict(argstr='--t1-mask %s', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), threads=dict(argstr='--threads=%d', ), diff --git a/nipype/interfaces/brainsuite/tests/test_auto_Bfc.py b/nipype/interfaces/brainsuite/tests/test_auto_Bfc.py index f24900c6a4..7102bed23e 100644 --- a/nipype/interfaces/brainsuite/tests/test_auto_Bfc.py +++ b/nipype/interfaces/brainsuite/tests/test_auto_Bfc.py @@ -62,7 +62,8 @@ def test_Bfc_inputs(): ), splineLambda=dict(argstr='-w %f', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), timer=dict(argstr='--timer', ), diff --git a/nipype/interfaces/brainsuite/tests/test_auto_Bse.py b/nipype/interfaces/brainsuite/tests/test_auto_Bse.py index a253bdcafc..883c882aa1 100644 --- a/nipype/interfaces/brainsuite/tests/test_auto_Bse.py +++ b/nipype/interfaces/brainsuite/tests/test_auto_Bse.py @@ -52,7 +52,8 @@ def test_Bse_inputs(): radius=dict(argstr='-r %f', usedefault=True, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), timer=dict(argstr='--timer', ), diff --git a/nipype/interfaces/brainsuite/tests/test_auto_Cerebro.py b/nipype/interfaces/brainsuite/tests/test_auto_Cerebro.py index f219aa82af..551bbb210b 100644 --- a/nipype/interfaces/brainsuite/tests/test_auto_Cerebro.py +++ b/nipype/interfaces/brainsuite/tests/test_auto_Cerebro.py @@ -46,7 +46,8 @@ def test_Cerebro_inputs(): ), tempDirectoryBase=dict(argstr='--tempdirbase %s', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), useCentroids=dict(argstr='--centroids', ), diff --git a/nipype/interfaces/brainsuite/tests/test_auto_Cortex.py b/nipype/interfaces/brainsuite/tests/test_auto_Cortex.py index 6e0fe3851c..909124518d 100644 --- a/nipype/interfaces/brainsuite/tests/test_auto_Cortex.py +++ b/nipype/interfaces/brainsuite/tests/test_auto_Cortex.py @@ -29,7 +29,8 @@ def test_Cortex_inputs(): outputCerebrumMask=dict(argstr='-o %s', genfile=True, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), timer=dict(argstr='--timer', ), diff --git a/nipype/interfaces/brainsuite/tests/test_auto_Dewisp.py b/nipype/interfaces/brainsuite/tests/test_auto_Dewisp.py index be334c7096..4d02736074 100644 --- a/nipype/interfaces/brainsuite/tests/test_auto_Dewisp.py +++ b/nipype/interfaces/brainsuite/tests/test_auto_Dewisp.py @@ -22,7 +22,8 @@ def test_Dewisp_inputs(): ), sizeThreshold=dict(argstr='-t %d', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), timer=dict(argstr='--timer', ), diff --git a/nipype/interfaces/brainsuite/tests/test_auto_Dfs.py b/nipype/interfaces/brainsuite/tests/test_auto_Dfs.py index 42887e8883..4f76cad507 100644 --- a/nipype/interfaces/brainsuite/tests/test_auto_Dfs.py +++ b/nipype/interfaces/brainsuite/tests/test_auto_Dfs.py @@ -43,7 +43,8 @@ def test_Dfs_inputs(): requires=['tessellationThreshold'], xor=('nonZeroTessellation', 'specialTessellation'), ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), tessellationThreshold=dict(argstr='%f', ), diff --git a/nipype/interfaces/brainsuite/tests/test_auto_Hemisplit.py b/nipype/interfaces/brainsuite/tests/test_auto_Hemisplit.py index 5bdfa45f0e..55ccba8ad1 100644 --- a/nipype/interfaces/brainsuite/tests/test_auto_Hemisplit.py +++ b/nipype/interfaces/brainsuite/tests/test_auto_Hemisplit.py @@ -32,7 +32,8 @@ def test_Hemisplit_inputs(): ), pialSurfaceFile=dict(argstr='-p %s', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), timer=dict(argstr='--timer', ), diff --git a/nipype/interfaces/brainsuite/tests/test_auto_Pialmesh.py b/nipype/interfaces/brainsuite/tests/test_auto_Pialmesh.py index d4511fee33..ee59e2e62f 100644 --- a/nipype/interfaces/brainsuite/tests/test_auto_Pialmesh.py +++ b/nipype/interfaces/brainsuite/tests/test_auto_Pialmesh.py @@ -51,7 +51,8 @@ def test_Pialmesh_inputs(): ), tangentSmoother=dict(argstr='--tc %f', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), timer=dict(argstr='--timer', ), diff --git a/nipype/interfaces/brainsuite/tests/test_auto_Pvc.py b/nipype/interfaces/brainsuite/tests/test_auto_Pvc.py index 08c7f3b894..c0d9dcdaf1 100644 --- a/nipype/interfaces/brainsuite/tests/test_auto_Pvc.py +++ b/nipype/interfaces/brainsuite/tests/test_auto_Pvc.py @@ -25,7 +25,8 @@ def test_Pvc_inputs(): ), spatialPrior=dict(argstr='-l %f', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), threeClassFlag=dict(argstr='-3', ), diff --git a/nipype/interfaces/brainsuite/tests/test_auto_SVReg.py b/nipype/interfaces/brainsuite/tests/test_auto_SVReg.py index 305fd26bf8..b270dc1d61 100644 --- a/nipype/interfaces/brainsuite/tests/test_auto_SVReg.py +++ b/nipype/interfaces/brainsuite/tests/test_auto_SVReg.py @@ -43,7 +43,8 @@ def test_SVReg_inputs(): mandatory=True, position=0, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), useCerebrumMask=dict(argstr="'-C'", ), diff --git a/nipype/interfaces/brainsuite/tests/test_auto_Scrubmask.py b/nipype/interfaces/brainsuite/tests/test_auto_Scrubmask.py index 5a2b0931f8..a902be5886 100644 --- a/nipype/interfaces/brainsuite/tests/test_auto_Scrubmask.py +++ b/nipype/interfaces/brainsuite/tests/test_auto_Scrubmask.py @@ -26,7 +26,8 @@ def test_Scrubmask_inputs(): outputMaskFile=dict(argstr='-o %s', genfile=True, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), timer=dict(argstr='--timer', ), diff --git a/nipype/interfaces/brainsuite/tests/test_auto_Skullfinder.py b/nipype/interfaces/brainsuite/tests/test_auto_Skullfinder.py index e96363e4f7..5d75d4939c 100644 --- a/nipype/interfaces/brainsuite/tests/test_auto_Skullfinder.py +++ b/nipype/interfaces/brainsuite/tests/test_auto_Skullfinder.py @@ -37,7 +37,8 @@ def test_Skullfinder_inputs(): ), surfaceFilePrefix=dict(argstr='-s %s', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), upperThreshold=dict(argstr='-u %d', ), diff --git a/nipype/interfaces/brainsuite/tests/test_auto_Tca.py b/nipype/interfaces/brainsuite/tests/test_auto_Tca.py index 498dd56e05..9301685533 100644 --- a/nipype/interfaces/brainsuite/tests/test_auto_Tca.py +++ b/nipype/interfaces/brainsuite/tests/test_auto_Tca.py @@ -26,7 +26,8 @@ def test_Tca_inputs(): outputMaskFile=dict(argstr='-o %s', genfile=True, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), timer=dict(argstr='--timer', ), diff --git a/nipype/interfaces/brainsuite/tests/test_auto_ThicknessPVC.py b/nipype/interfaces/brainsuite/tests/test_auto_ThicknessPVC.py index 8bd388c36c..7c055bd0c9 100644 --- a/nipype/interfaces/brainsuite/tests/test_auto_ThicknessPVC.py +++ b/nipype/interfaces/brainsuite/tests/test_auto_ThicknessPVC.py @@ -15,7 +15,8 @@ def test_ThicknessPVC_inputs(): subjectFilePrefix=dict(argstr='%s', mandatory=True, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = ThicknessPVC.input_spec() diff --git a/nipype/interfaces/camino/tests/test_auto_AnalyzeHeader.py b/nipype/interfaces/camino/tests/test_auto_AnalyzeHeader.py index 39700f5304..e56eb84a99 100644 --- a/nipype/interfaces/camino/tests/test_auto_AnalyzeHeader.py +++ b/nipype/interfaces/camino/tests/test_auto_AnalyzeHeader.py @@ -74,7 +74,8 @@ def test_AnalyzeHeader_inputs(): scheme_file=dict(argstr='%s', position=2, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), voxel_dims=dict(argstr='-voxeldims %s', units='mm', diff --git a/nipype/interfaces/camino/tests/test_auto_ComputeEigensystem.py b/nipype/interfaces/camino/tests/test_auto_ComputeEigensystem.py index 7016825269..c71c1371b3 100644 --- a/nipype/interfaces/camino/tests/test_auto_ComputeEigensystem.py +++ b/nipype/interfaces/camino/tests/test_auto_ComputeEigensystem.py @@ -30,7 +30,8 @@ def test_ComputeEigensystem_inputs(): outputdatatype=dict(argstr='-outputdatatype %s', usedefault=True, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = ComputeEigensystem.input_spec() diff --git a/nipype/interfaces/camino/tests/test_auto_ComputeFractionalAnisotropy.py b/nipype/interfaces/camino/tests/test_auto_ComputeFractionalAnisotropy.py index 6bf41d7b95..311d9182b8 100644 --- a/nipype/interfaces/camino/tests/test_auto_ComputeFractionalAnisotropy.py +++ b/nipype/interfaces/camino/tests/test_auto_ComputeFractionalAnisotropy.py @@ -29,7 +29,8 @@ def test_ComputeFractionalAnisotropy_inputs(): scheme_file=dict(argstr='%s', position=2, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = ComputeFractionalAnisotropy.input_spec() diff --git a/nipype/interfaces/camino/tests/test_auto_ComputeMeanDiffusivity.py b/nipype/interfaces/camino/tests/test_auto_ComputeMeanDiffusivity.py index 16b3e6f163..09d5cbdc3e 100644 --- a/nipype/interfaces/camino/tests/test_auto_ComputeMeanDiffusivity.py +++ b/nipype/interfaces/camino/tests/test_auto_ComputeMeanDiffusivity.py @@ -29,7 +29,8 @@ def test_ComputeMeanDiffusivity_inputs(): scheme_file=dict(argstr='%s', position=2, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = ComputeMeanDiffusivity.input_spec() diff --git a/nipype/interfaces/camino/tests/test_auto_ComputeTensorTrace.py b/nipype/interfaces/camino/tests/test_auto_ComputeTensorTrace.py index 3adc971f7b..da428ebe3f 100644 --- a/nipype/interfaces/camino/tests/test_auto_ComputeTensorTrace.py +++ b/nipype/interfaces/camino/tests/test_auto_ComputeTensorTrace.py @@ -29,7 +29,8 @@ def test_ComputeTensorTrace_inputs(): scheme_file=dict(argstr='%s', position=2, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = ComputeTensorTrace.input_spec() diff --git a/nipype/interfaces/camino/tests/test_auto_Conmat.py b/nipype/interfaces/camino/tests/test_auto_Conmat.py index 715db443da..e447923f0b 100644 --- a/nipype/interfaces/camino/tests/test_auto_Conmat.py +++ b/nipype/interfaces/camino/tests/test_auto_Conmat.py @@ -26,7 +26,8 @@ def test_Conmat_inputs(): ), targetname_file=dict(argstr='-targetnamefile %s', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), tract_prop=dict(argstr='-tractstat %s', units='NA', diff --git a/nipype/interfaces/camino/tests/test_auto_DT2NIfTI.py b/nipype/interfaces/camino/tests/test_auto_DT2NIfTI.py index f0f1c789c4..bb5012e6c1 100644 --- a/nipype/interfaces/camino/tests/test_auto_DT2NIfTI.py +++ b/nipype/interfaces/camino/tests/test_auto_DT2NIfTI.py @@ -24,7 +24,8 @@ def test_DT2NIfTI_inputs(): genfile=True, position=2, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = DT2NIfTI.input_spec() diff --git a/nipype/interfaces/camino/tests/test_auto_DTIFit.py b/nipype/interfaces/camino/tests/test_auto_DTIFit.py index e4a0115dc3..d4907557dc 100644 --- a/nipype/interfaces/camino/tests/test_auto_DTIFit.py +++ b/nipype/interfaces/camino/tests/test_auto_DTIFit.py @@ -29,7 +29,8 @@ def test_DTIFit_inputs(): mandatory=True, position=2, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = DTIFit.input_spec() diff --git a/nipype/interfaces/camino/tests/test_auto_DTLUTGen.py b/nipype/interfaces/camino/tests/test_auto_DTLUTGen.py index 285891f0cf..2d6d73f6cc 100644 --- a/nipype/interfaces/camino/tests/test_auto_DTLUTGen.py +++ b/nipype/interfaces/camino/tests/test_auto_DTLUTGen.py @@ -44,7 +44,8 @@ def test_DTLUTGen_inputs(): step=dict(argstr='-step %f', units='NA', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), trace=dict(argstr='-trace %G', units='NA', diff --git a/nipype/interfaces/camino/tests/test_auto_DTMetric.py b/nipype/interfaces/camino/tests/test_auto_DTMetric.py index ebde9241a1..191cf83ba1 100644 --- a/nipype/interfaces/camino/tests/test_auto_DTMetric.py +++ b/nipype/interfaces/camino/tests/test_auto_DTMetric.py @@ -29,7 +29,8 @@ def test_DTMetric_inputs(): outputfile=dict(argstr='-outputfile %s', genfile=True, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = DTMetric.input_spec() diff --git a/nipype/interfaces/camino/tests/test_auto_FSL2Scheme.py b/nipype/interfaces/camino/tests/test_auto_FSL2Scheme.py index efbaa1e95f..5b37c42c6c 100644 --- a/nipype/interfaces/camino/tests/test_auto_FSL2Scheme.py +++ b/nipype/interfaces/camino/tests/test_auto_FSL2Scheme.py @@ -41,7 +41,8 @@ def test_FSL2Scheme_inputs(): genfile=True, position=-1, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), usegradmod=dict(argstr='-usegradmod', ), diff --git a/nipype/interfaces/camino/tests/test_auto_Image2Voxel.py b/nipype/interfaces/camino/tests/test_auto_Image2Voxel.py index 2a17d57bc8..88ee396011 100644 --- a/nipype/interfaces/camino/tests/test_auto_Image2Voxel.py +++ b/nipype/interfaces/camino/tests/test_auto_Image2Voxel.py @@ -24,7 +24,8 @@ def test_Image2Voxel_inputs(): position=2, usedefault=True, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = Image2Voxel.input_spec() diff --git a/nipype/interfaces/camino/tests/test_auto_ImageStats.py b/nipype/interfaces/camino/tests/test_auto_ImageStats.py index cd0aa1380e..597683508a 100644 --- a/nipype/interfaces/camino/tests/test_auto_ImageStats.py +++ b/nipype/interfaces/camino/tests/test_auto_ImageStats.py @@ -26,7 +26,8 @@ def test_ImageStats_inputs(): mandatory=True, units='NA', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = ImageStats.input_spec() diff --git a/nipype/interfaces/camino/tests/test_auto_LinRecon.py b/nipype/interfaces/camino/tests/test_auto_LinRecon.py index a8f03034d3..b0686a5bdf 100644 --- a/nipype/interfaces/camino/tests/test_auto_LinRecon.py +++ b/nipype/interfaces/camino/tests/test_auto_LinRecon.py @@ -34,7 +34,8 @@ def test_LinRecon_inputs(): mandatory=True, position=2, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = LinRecon.input_spec() diff --git a/nipype/interfaces/camino/tests/test_auto_MESD.py b/nipype/interfaces/camino/tests/test_auto_MESD.py index c9ac46d3d1..a3ee83b6b4 100644 --- a/nipype/interfaces/camino/tests/test_auto_MESD.py +++ b/nipype/interfaces/camino/tests/test_auto_MESD.py @@ -42,7 +42,8 @@ def test_MESD_inputs(): scheme_file=dict(argstr='-schemefile %s', mandatory=True, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = MESD.input_spec() diff --git a/nipype/interfaces/camino/tests/test_auto_ModelFit.py b/nipype/interfaces/camino/tests/test_auto_ModelFit.py index c3555de524..2ea5013e7b 100644 --- a/nipype/interfaces/camino/tests/test_auto_ModelFit.py +++ b/nipype/interfaces/camino/tests/test_auto_ModelFit.py @@ -49,7 +49,8 @@ def test_ModelFit_inputs(): ), tau=dict(argstr='-tau %G', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = ModelFit.input_spec() diff --git a/nipype/interfaces/camino/tests/test_auto_NIfTIDT2Camino.py b/nipype/interfaces/camino/tests/test_auto_NIfTIDT2Camino.py index 999db17138..ddd4acea8e 100644 --- a/nipype/interfaces/camino/tests/test_auto_NIfTIDT2Camino.py +++ b/nipype/interfaces/camino/tests/test_auto_NIfTIDT2Camino.py @@ -30,7 +30,8 @@ def test_NIfTIDT2Camino_inputs(): ), scaleslope=dict(argstr='-scaleslope %s', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), uppertriangular=dict(argstr='-uppertriangular %s', ), diff --git a/nipype/interfaces/camino/tests/test_auto_PicoPDFs.py b/nipype/interfaces/camino/tests/test_auto_PicoPDFs.py index 1a64aa285c..c55f63d155 100644 --- a/nipype/interfaces/camino/tests/test_auto_PicoPDFs.py +++ b/nipype/interfaces/camino/tests/test_auto_PicoPDFs.py @@ -39,7 +39,8 @@ def test_PicoPDFs_inputs(): position=4, usedefault=True, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = PicoPDFs.input_spec() diff --git a/nipype/interfaces/camino/tests/test_auto_ProcStreamlines.py b/nipype/interfaces/camino/tests/test_auto_ProcStreamlines.py index da68661ea7..f215857b99 100644 --- a/nipype/interfaces/camino/tests/test_auto_ProcStreamlines.py +++ b/nipype/interfaces/camino/tests/test_auto_ProcStreamlines.py @@ -88,7 +88,8 @@ def test_ProcStreamlines_inputs(): ), targetfile=dict(argstr='-targetfile %s', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), truncateinexclusion=dict(argstr='-truncateinexclusion', ), diff --git a/nipype/interfaces/camino/tests/test_auto_QBallMX.py b/nipype/interfaces/camino/tests/test_auto_QBallMX.py index d55474e837..473e8f8299 100644 --- a/nipype/interfaces/camino/tests/test_auto_QBallMX.py +++ b/nipype/interfaces/camino/tests/test_auto_QBallMX.py @@ -34,7 +34,8 @@ def test_QBallMX_inputs(): smoothingsigma=dict(argstr='-smoothingsigma %f', units='NA', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = QBallMX.input_spec() diff --git a/nipype/interfaces/camino/tests/test_auto_SFLUTGen.py b/nipype/interfaces/camino/tests/test_auto_SFLUTGen.py index ca5044349d..a0323eaf3e 100644 --- a/nipype/interfaces/camino/tests/test_auto_SFLUTGen.py +++ b/nipype/interfaces/camino/tests/test_auto_SFLUTGen.py @@ -39,7 +39,8 @@ def test_SFLUTGen_inputs(): pdf=dict(argstr='-pdf %s', usedefault=True, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = SFLUTGen.input_spec() diff --git a/nipype/interfaces/camino/tests/test_auto_SFPICOCalibData.py b/nipype/interfaces/camino/tests/test_auto_SFPICOCalibData.py index ba9993d7bb..adcdeaa946 100644 --- a/nipype/interfaces/camino/tests/test_auto_SFPICOCalibData.py +++ b/nipype/interfaces/camino/tests/test_auto_SFPICOCalibData.py @@ -36,7 +36,8 @@ def test_SFPICOCalibData_inputs(): snr=dict(argstr='-snr %f', units='NA', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), trace=dict(argstr='-trace %f', units='NA', diff --git a/nipype/interfaces/camino/tests/test_auto_SFPeaks.py b/nipype/interfaces/camino/tests/test_auto_SFPeaks.py index f95f139256..2378fa4b82 100644 --- a/nipype/interfaces/camino/tests/test_auto_SFPeaks.py +++ b/nipype/interfaces/camino/tests/test_auto_SFPeaks.py @@ -53,7 +53,8 @@ def test_SFPeaks_inputs(): stdsfrommean=dict(argstr='-stdsfrommean %f', units='NA', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = SFPeaks.input_spec() diff --git a/nipype/interfaces/camino/tests/test_auto_Shredder.py b/nipype/interfaces/camino/tests/test_auto_Shredder.py index f74dee86b3..70f6e786e7 100644 --- a/nipype/interfaces/camino/tests/test_auto_Shredder.py +++ b/nipype/interfaces/camino/tests/test_auto_Shredder.py @@ -32,7 +32,8 @@ def test_Shredder_inputs(): position=3, units='NA', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = Shredder.input_spec() diff --git a/nipype/interfaces/camino/tests/test_auto_Track.py b/nipype/interfaces/camino/tests/test_auto_Track.py index 4903bbf163..f10e7b4936 100644 --- a/nipype/interfaces/camino/tests/test_auto_Track.py +++ b/nipype/interfaces/camino/tests/test_auto_Track.py @@ -59,7 +59,8 @@ def test_Track_inputs(): stepsize=dict(argstr='-stepsize %f', requires=['tracker'], ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), tracker=dict(argstr='-tracker %s', usedefault=True, diff --git a/nipype/interfaces/camino/tests/test_auto_TrackBallStick.py b/nipype/interfaces/camino/tests/test_auto_TrackBallStick.py index 94b2abedaf..361838512d 100644 --- a/nipype/interfaces/camino/tests/test_auto_TrackBallStick.py +++ b/nipype/interfaces/camino/tests/test_auto_TrackBallStick.py @@ -59,7 +59,8 @@ def test_TrackBallStick_inputs(): stepsize=dict(argstr='-stepsize %f', requires=['tracker'], ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), tracker=dict(argstr='-tracker %s', usedefault=True, diff --git a/nipype/interfaces/camino/tests/test_auto_TrackBayesDirac.py b/nipype/interfaces/camino/tests/test_auto_TrackBayesDirac.py index 3855f8ecc1..36eedf11f5 100644 --- a/nipype/interfaces/camino/tests/test_auto_TrackBayesDirac.py +++ b/nipype/interfaces/camino/tests/test_auto_TrackBayesDirac.py @@ -79,7 +79,8 @@ def test_TrackBayesDirac_inputs(): stepsize=dict(argstr='-stepsize %f', requires=['tracker'], ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), tracker=dict(argstr='-tracker %s', usedefault=True, diff --git a/nipype/interfaces/camino/tests/test_auto_TrackBedpostxDeter.py b/nipype/interfaces/camino/tests/test_auto_TrackBedpostxDeter.py index e3572430b7..9da147ba7c 100644 --- a/nipype/interfaces/camino/tests/test_auto_TrackBedpostxDeter.py +++ b/nipype/interfaces/camino/tests/test_auto_TrackBedpostxDeter.py @@ -65,7 +65,8 @@ def test_TrackBedpostxDeter_inputs(): stepsize=dict(argstr='-stepsize %f', requires=['tracker'], ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), tracker=dict(argstr='-tracker %s', usedefault=True, diff --git a/nipype/interfaces/camino/tests/test_auto_TrackBedpostxProba.py b/nipype/interfaces/camino/tests/test_auto_TrackBedpostxProba.py index bb4c0ed898..84a94870dd 100644 --- a/nipype/interfaces/camino/tests/test_auto_TrackBedpostxProba.py +++ b/nipype/interfaces/camino/tests/test_auto_TrackBedpostxProba.py @@ -68,7 +68,8 @@ def test_TrackBedpostxProba_inputs(): stepsize=dict(argstr='-stepsize %f', requires=['tracker'], ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), tracker=dict(argstr='-tracker %s', usedefault=True, diff --git a/nipype/interfaces/camino/tests/test_auto_TrackBootstrap.py b/nipype/interfaces/camino/tests/test_auto_TrackBootstrap.py index 30d87816b8..8449ae0301 100644 --- a/nipype/interfaces/camino/tests/test_auto_TrackBootstrap.py +++ b/nipype/interfaces/camino/tests/test_auto_TrackBootstrap.py @@ -72,7 +72,8 @@ def test_TrackBootstrap_inputs(): stepsize=dict(argstr='-stepsize %f', requires=['tracker'], ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), tracker=dict(argstr='-tracker %s', usedefault=True, diff --git a/nipype/interfaces/camino/tests/test_auto_TrackDT.py b/nipype/interfaces/camino/tests/test_auto_TrackDT.py index 1edd055921..ef41e17b26 100644 --- a/nipype/interfaces/camino/tests/test_auto_TrackDT.py +++ b/nipype/interfaces/camino/tests/test_auto_TrackDT.py @@ -59,7 +59,8 @@ def test_TrackDT_inputs(): stepsize=dict(argstr='-stepsize %f', requires=['tracker'], ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), tracker=dict(argstr='-tracker %s', usedefault=True, diff --git a/nipype/interfaces/camino/tests/test_auto_TrackPICo.py b/nipype/interfaces/camino/tests/test_auto_TrackPICo.py index b62e25cd93..c8e6eb1bfb 100644 --- a/nipype/interfaces/camino/tests/test_auto_TrackPICo.py +++ b/nipype/interfaces/camino/tests/test_auto_TrackPICo.py @@ -64,7 +64,8 @@ def test_TrackPICo_inputs(): stepsize=dict(argstr='-stepsize %f', requires=['tracker'], ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), tracker=dict(argstr='-tracker %s', usedefault=True, diff --git a/nipype/interfaces/camino/tests/test_auto_TractShredder.py b/nipype/interfaces/camino/tests/test_auto_TractShredder.py index 5f991d4090..c81a1ed71a 100644 --- a/nipype/interfaces/camino/tests/test_auto_TractShredder.py +++ b/nipype/interfaces/camino/tests/test_auto_TractShredder.py @@ -32,7 +32,8 @@ def test_TractShredder_inputs(): position=3, units='NA', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = TractShredder.input_spec() diff --git a/nipype/interfaces/camino/tests/test_auto_VtkStreamlines.py b/nipype/interfaces/camino/tests/test_auto_VtkStreamlines.py index 775f3eedd9..4b21696c21 100644 --- a/nipype/interfaces/camino/tests/test_auto_VtkStreamlines.py +++ b/nipype/interfaces/camino/tests/test_auto_VtkStreamlines.py @@ -38,7 +38,8 @@ def test_VtkStreamlines_inputs(): target_file=dict(argstr='-targetfile %s', position=2, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), voxeldims=dict(argstr='-voxeldims %s', position=4, diff --git a/nipype/interfaces/camino2trackvis/tests/test_auto_Camino2Trackvis.py b/nipype/interfaces/camino2trackvis/tests/test_auto_Camino2Trackvis.py index 258286bd9d..3d4d91e935 100644 --- a/nipype/interfaces/camino2trackvis/tests/test_auto_Camino2Trackvis.py +++ b/nipype/interfaces/camino2trackvis/tests/test_auto_Camino2Trackvis.py @@ -32,7 +32,8 @@ def test_Camino2Trackvis_inputs(): genfile=True, position=2, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), voxel_dims=dict(argstr='-x %s', mandatory=True, diff --git a/nipype/interfaces/camino2trackvis/tests/test_auto_Trackvis2Camino.py b/nipype/interfaces/camino2trackvis/tests/test_auto_Trackvis2Camino.py index 9ebd53f272..24d5aa8b19 100644 --- a/nipype/interfaces/camino2trackvis/tests/test_auto_Trackvis2Camino.py +++ b/nipype/interfaces/camino2trackvis/tests/test_auto_Trackvis2Camino.py @@ -23,7 +23,8 @@ def test_Trackvis2Camino_inputs(): genfile=True, position=2, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = Trackvis2Camino.input_spec() diff --git a/nipype/interfaces/diffusion_toolkit/tests/test_auto_DTIRecon.py b/nipype/interfaces/diffusion_toolkit/tests/test_auto_DTIRecon.py index 333578742e..c5d6a4f31b 100644 --- a/nipype/interfaces/diffusion_toolkit/tests/test_auto_DTIRecon.py +++ b/nipype/interfaces/diffusion_toolkit/tests/test_auto_DTIRecon.py @@ -36,7 +36,8 @@ def test_DTIRecon_inputs(): output_type=dict(argstr='-ot %s', usedefault=True, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = DTIRecon.input_spec() diff --git a/nipype/interfaces/diffusion_toolkit/tests/test_auto_DTITracker.py b/nipype/interfaces/diffusion_toolkit/tests/test_auto_DTITracker.py index ea20252ae3..91a188d420 100644 --- a/nipype/interfaces/diffusion_toolkit/tests/test_auto_DTITracker.py +++ b/nipype/interfaces/diffusion_toolkit/tests/test_auto_DTITracker.py @@ -58,7 +58,8 @@ def test_DTITracker_inputs(): swap_zx=dict(argstr='-szx', ), tensor_file=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), tracking_method=dict(argstr='-%s', ), diff --git a/nipype/interfaces/diffusion_toolkit/tests/test_auto_HARDIMat.py b/nipype/interfaces/diffusion_toolkit/tests/test_auto_HARDIMat.py index 699c5c920d..a3797e5805 100644 --- a/nipype/interfaces/diffusion_toolkit/tests/test_auto_HARDIMat.py +++ b/nipype/interfaces/diffusion_toolkit/tests/test_auto_HARDIMat.py @@ -34,7 +34,8 @@ def test_HARDIMat_inputs(): ), reference_file=dict(argstr='-ref %s', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = HARDIMat.input_spec() diff --git a/nipype/interfaces/diffusion_toolkit/tests/test_auto_ODFRecon.py b/nipype/interfaces/diffusion_toolkit/tests/test_auto_ODFRecon.py index 8fa38aab42..9b5b2e744d 100644 --- a/nipype/interfaces/diffusion_toolkit/tests/test_auto_ODFRecon.py +++ b/nipype/interfaces/diffusion_toolkit/tests/test_auto_ODFRecon.py @@ -51,7 +51,8 @@ def test_ODFRecon_inputs(): ), subtract_background=dict(argstr='-bg', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = ODFRecon.input_spec() diff --git a/nipype/interfaces/diffusion_toolkit/tests/test_auto_ODFTracker.py b/nipype/interfaces/diffusion_toolkit/tests/test_auto_ODFTracker.py index 647cb3767e..42a965c2e8 100644 --- a/nipype/interfaces/diffusion_toolkit/tests/test_auto_ODFTracker.py +++ b/nipype/interfaces/diffusion_toolkit/tests/test_auto_ODFTracker.py @@ -68,7 +68,8 @@ def test_ODFTracker_inputs(): ), swap_zx=dict(argstr='-szx', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), voxel_order=dict(argstr='-vorder %s', ), diff --git a/nipype/interfaces/diffusion_toolkit/tests/test_auto_SplineFilter.py b/nipype/interfaces/diffusion_toolkit/tests/test_auto_SplineFilter.py index 0ce7d67281..6eb0ade6c2 100644 --- a/nipype/interfaces/diffusion_toolkit/tests/test_auto_SplineFilter.py +++ b/nipype/interfaces/diffusion_toolkit/tests/test_auto_SplineFilter.py @@ -20,7 +20,8 @@ def test_SplineFilter_inputs(): mandatory=True, position=1, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), track_file=dict(argstr='%s', mandatory=True, diff --git a/nipype/interfaces/diffusion_toolkit/tests/test_auto_TrackMerge.py b/nipype/interfaces/diffusion_toolkit/tests/test_auto_TrackMerge.py index 296c311663..3a31031465 100644 --- a/nipype/interfaces/diffusion_toolkit/tests/test_auto_TrackMerge.py +++ b/nipype/interfaces/diffusion_toolkit/tests/test_auto_TrackMerge.py @@ -16,7 +16,8 @@ def test_TrackMerge_inputs(): position=-1, usedefault=True, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), track_files=dict(argstr='%s...', mandatory=True, diff --git a/nipype/interfaces/elastix/tests/test_auto_AnalyzeWarp.py b/nipype/interfaces/elastix/tests/test_auto_AnalyzeWarp.py index 1be5007b28..6c93d0b54b 100644 --- a/nipype/interfaces/elastix/tests/test_auto_AnalyzeWarp.py +++ b/nipype/interfaces/elastix/tests/test_auto_AnalyzeWarp.py @@ -19,7 +19,8 @@ def test_AnalyzeWarp_inputs(): mandatory=True, usedefault=True, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), transform_file=dict(argstr='-tp %s', mandatory=True, diff --git a/nipype/interfaces/elastix/tests/test_auto_ApplyWarp.py b/nipype/interfaces/elastix/tests/test_auto_ApplyWarp.py index eb88b4c7e5..b2bef41dc4 100644 --- a/nipype/interfaces/elastix/tests/test_auto_ApplyWarp.py +++ b/nipype/interfaces/elastix/tests/test_auto_ApplyWarp.py @@ -22,7 +22,8 @@ def test_ApplyWarp_inputs(): mandatory=True, usedefault=True, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), transform_file=dict(argstr='-tp %s', mandatory=True, diff --git a/nipype/interfaces/elastix/tests/test_auto_PointsWarp.py b/nipype/interfaces/elastix/tests/test_auto_PointsWarp.py index 713f912ef7..496f00962f 100644 --- a/nipype/interfaces/elastix/tests/test_auto_PointsWarp.py +++ b/nipype/interfaces/elastix/tests/test_auto_PointsWarp.py @@ -22,7 +22,8 @@ def test_PointsWarp_inputs(): points_file=dict(argstr='-def %s', mandatory=True, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), transform_file=dict(argstr='-tp %s', mandatory=True, diff --git a/nipype/interfaces/elastix/tests/test_auto_Registration.py b/nipype/interfaces/elastix/tests/test_auto_Registration.py index b14af447c8..15b0202fe0 100644 --- a/nipype/interfaces/elastix/tests/test_auto_Registration.py +++ b/nipype/interfaces/elastix/tests/test_auto_Registration.py @@ -34,7 +34,8 @@ def test_Registration_inputs(): parameters=dict(argstr='-p %s...', mandatory=True, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = Registration.input_spec() diff --git a/nipype/interfaces/freesurfer/tests/test_auto_AddXFormToHeader.py b/nipype/interfaces/freesurfer/tests/test_auto_AddXFormToHeader.py index 5961ef84cc..0e3b028d0f 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_AddXFormToHeader.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_AddXFormToHeader.py @@ -23,7 +23,8 @@ def test_AddXFormToHeader_inputs(): usedefault=True, ), subjects_dir=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), transform=dict(argstr='%s', mandatory=True, diff --git a/nipype/interfaces/freesurfer/tests/test_auto_Aparc2Aseg.py b/nipype/interfaces/freesurfer/tests/test_auto_Aparc2Aseg.py index bcab8391db..e3222c5ecd 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_Aparc2Aseg.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_Aparc2Aseg.py @@ -52,7 +52,8 @@ def test_Aparc2Aseg_inputs(): usedefault=True, ), subjects_dir=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), volmask=dict(argstr='--volmask', ), diff --git a/nipype/interfaces/freesurfer/tests/test_auto_Apas2Aseg.py b/nipype/interfaces/freesurfer/tests/test_auto_Apas2Aseg.py index 802ebbc1d3..a4195aacf4 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_Apas2Aseg.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_Apas2Aseg.py @@ -19,7 +19,8 @@ def test_Apas2Aseg_inputs(): mandatory=True, ), subjects_dir=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = Apas2Aseg.input_spec() diff --git a/nipype/interfaces/freesurfer/tests/test_auto_ApplyMask.py b/nipype/interfaces/freesurfer/tests/test_auto_ApplyMask.py index 2910fbdc62..2d59dc9ad5 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_ApplyMask.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_ApplyMask.py @@ -34,7 +34,8 @@ def test_ApplyMask_inputs(): position=-1, ), subjects_dir=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), transfer=dict(argstr='-transfer %d', ), diff --git a/nipype/interfaces/freesurfer/tests/test_auto_ApplyVolTransform.py b/nipype/interfaces/freesurfer/tests/test_auto_ApplyVolTransform.py index e4f93a1ce2..1acd09f2df 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_ApplyVolTransform.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_ApplyVolTransform.py @@ -74,7 +74,8 @@ def test_ApplyVolTransform_inputs(): mandatory=True, xor=('target_file', 'tal', 'fs_target'), ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), transformed_file=dict(argstr='--o %s', genfile=True, diff --git a/nipype/interfaces/freesurfer/tests/test_auto_Binarize.py b/nipype/interfaces/freesurfer/tests/test_auto_Binarize.py index 4550cb071b..b40c661664 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_Binarize.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_Binarize.py @@ -60,7 +60,8 @@ def test_Binarize_inputs(): rmin=dict(argstr='--rmin %f', ), subjects_dir=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ventricles=dict(argstr='--ventricles', ), diff --git a/nipype/interfaces/freesurfer/tests/test_auto_CALabel.py b/nipype/interfaces/freesurfer/tests/test_auto_CALabel.py index 17028f990d..d7ff3ceea6 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_CALabel.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_CALabel.py @@ -42,7 +42,8 @@ def test_CALabel_inputs(): mandatory=True, position=-2, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), transform=dict(argstr='%s', mandatory=True, diff --git a/nipype/interfaces/freesurfer/tests/test_auto_CANormalize.py b/nipype/interfaces/freesurfer/tests/test_auto_CANormalize.py index ab6912accf..e9964201c6 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_CANormalize.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_CANormalize.py @@ -34,7 +34,8 @@ def test_CANormalize_inputs(): position=-1, ), subjects_dir=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), transform=dict(argstr='%s', mandatory=True, diff --git a/nipype/interfaces/freesurfer/tests/test_auto_CARegister.py b/nipype/interfaces/freesurfer/tests/test_auto_CARegister.py index e76437e24d..6bc82e630d 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_CARegister.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_CARegister.py @@ -40,7 +40,8 @@ def test_CARegister_inputs(): template=dict(argstr='%s', position=-2, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), transform=dict(argstr='-T %s', ), diff --git a/nipype/interfaces/freesurfer/tests/test_auto_CheckTalairachAlignment.py b/nipype/interfaces/freesurfer/tests/test_auto_CheckTalairachAlignment.py index 19b38b0273..305a98631a 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_CheckTalairachAlignment.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_CheckTalairachAlignment.py @@ -23,7 +23,8 @@ def test_CheckTalairachAlignment_inputs(): xor=['in_file'], ), subjects_dir=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), threshold=dict(argstr='-T %.3f', ), diff --git a/nipype/interfaces/freesurfer/tests/test_auto_Concatenate.py b/nipype/interfaces/freesurfer/tests/test_auto_Concatenate.py index 8f702078ea..2c49bcde29 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_Concatenate.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_Concatenate.py @@ -47,7 +47,8 @@ def test_Concatenate_inputs(): stats=dict(argstr='--%s', ), subjects_dir=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), vote=dict(argstr='--vote', ), diff --git a/nipype/interfaces/freesurfer/tests/test_auto_ConcatenateLTA.py b/nipype/interfaces/freesurfer/tests/test_auto_ConcatenateLTA.py index b15dfee307..acee5ec994 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_ConcatenateLTA.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_ConcatenateLTA.py @@ -28,7 +28,8 @@ def test_ConcatenateLTA_inputs(): position=-1, ), subjects_dir=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = ConcatenateLTA.input_spec() diff --git a/nipype/interfaces/freesurfer/tests/test_auto_Contrast.py b/nipype/interfaces/freesurfer/tests/test_auto_Contrast.py index 57d56b9726..033dd191c3 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_Contrast.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_Contrast.py @@ -29,7 +29,8 @@ def test_Contrast_inputs(): usedefault=True, ), subjects_dir=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), thickness=dict(mandatory=True, ), diff --git a/nipype/interfaces/freesurfer/tests/test_auto_Curvature.py b/nipype/interfaces/freesurfer/tests/test_auto_Curvature.py index 03474551d6..403012522f 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_Curvature.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_Curvature.py @@ -27,7 +27,8 @@ def test_Curvature_inputs(): save=dict(argstr='-w', ), subjects_dir=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), threshold=dict(argstr='-thresh %.3f', ), diff --git a/nipype/interfaces/freesurfer/tests/test_auto_CurvatureStats.py b/nipype/interfaces/freesurfer/tests/test_auto_CurvatureStats.py index 9bb6f9fc50..d269a87590 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_CurvatureStats.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_CurvatureStats.py @@ -40,7 +40,8 @@ def test_CurvatureStats_inputs(): subjects_dir=dict(), surface=dict(argstr='-F %s', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), values=dict(argstr='-G', ), diff --git a/nipype/interfaces/freesurfer/tests/test_auto_DICOMConvert.py b/nipype/interfaces/freesurfer/tests/test_auto_DICOMConvert.py index a0e7b0fbdb..b88f3ec1d1 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_DICOMConvert.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_DICOMConvert.py @@ -28,7 +28,8 @@ def test_DICOMConvert_inputs(): ), subject_id=dict(), subjects_dir=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = DICOMConvert.input_spec() diff --git a/nipype/interfaces/freesurfer/tests/test_auto_EMRegister.py b/nipype/interfaces/freesurfer/tests/test_auto_EMRegister.py index 97e5910c17..2050442d47 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_EMRegister.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_EMRegister.py @@ -35,7 +35,8 @@ def test_EMRegister_inputs(): mandatory=True, position=-2, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), transform=dict(argstr='-t %s', ), diff --git a/nipype/interfaces/freesurfer/tests/test_auto_EditWMwithAseg.py b/nipype/interfaces/freesurfer/tests/test_auto_EditWMwithAseg.py index 081856a5fa..bfc5818d37 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_EditWMwithAseg.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_EditWMwithAseg.py @@ -31,7 +31,8 @@ def test_EditWMwithAseg_inputs(): position=-2, ), subjects_dir=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = EditWMwithAseg.input_spec() diff --git a/nipype/interfaces/freesurfer/tests/test_auto_EulerNumber.py b/nipype/interfaces/freesurfer/tests/test_auto_EulerNumber.py index d2eba7ed16..cd3d64524b 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_EulerNumber.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_EulerNumber.py @@ -17,7 +17,8 @@ def test_EulerNumber_inputs(): position=-1, ), subjects_dir=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = EulerNumber.input_spec() diff --git a/nipype/interfaces/freesurfer/tests/test_auto_ExtractMainComponent.py b/nipype/interfaces/freesurfer/tests/test_auto_ExtractMainComponent.py index eb85cba81b..41e9c2c264 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_ExtractMainComponent.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_ExtractMainComponent.py @@ -21,7 +21,8 @@ def test_ExtractMainComponent_inputs(): name_template='%s.maincmp', position=2, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = ExtractMainComponent.input_spec() diff --git a/nipype/interfaces/freesurfer/tests/test_auto_FSCommand.py b/nipype/interfaces/freesurfer/tests/test_auto_FSCommand.py index e718c1c4cb..d56a704619 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_FSCommand.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_FSCommand.py @@ -13,7 +13,8 @@ def test_FSCommand_inputs(): usedefault=True, ), subjects_dir=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = FSCommand.input_spec() diff --git a/nipype/interfaces/freesurfer/tests/test_auto_FSCommandOpenMP.py b/nipype/interfaces/freesurfer/tests/test_auto_FSCommandOpenMP.py index 072161bd52..ee89b8242f 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_FSCommandOpenMP.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_FSCommandOpenMP.py @@ -14,7 +14,8 @@ def test_FSCommandOpenMP_inputs(): ), num_threads=dict(), subjects_dir=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = FSCommandOpenMP.input_spec() diff --git a/nipype/interfaces/freesurfer/tests/test_auto_FSScriptCommand.py b/nipype/interfaces/freesurfer/tests/test_auto_FSScriptCommand.py index b685a4d82a..45c1646355 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_FSScriptCommand.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_FSScriptCommand.py @@ -13,7 +13,8 @@ def test_FSScriptCommand_inputs(): usedefault=True, ), subjects_dir=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = FSScriptCommand.input_spec() diff --git a/nipype/interfaces/freesurfer/tests/test_auto_FitMSParams.py b/nipype/interfaces/freesurfer/tests/test_auto_FitMSParams.py index 8496ca2ae5..a5b63f9b03 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_FitMSParams.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_FitMSParams.py @@ -23,7 +23,8 @@ def test_FitMSParams_inputs(): ), subjects_dir=dict(), te_list=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), tr_list=dict(), xfm_list=dict(), diff --git a/nipype/interfaces/freesurfer/tests/test_auto_FixTopology.py b/nipype/interfaces/freesurfer/tests/test_auto_FixTopology.py index ec064372eb..7739767eb1 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_FixTopology.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_FixTopology.py @@ -40,7 +40,8 @@ def test_FixTopology_inputs(): usedefault=True, ), subjects_dir=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = FixTopology.input_spec() diff --git a/nipype/interfaces/freesurfer/tests/test_auto_FuseSegmentations.py b/nipype/interfaces/freesurfer/tests/test_auto_FuseSegmentations.py index 24c8214fba..3d713eeb63 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_FuseSegmentations.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_FuseSegmentations.py @@ -28,7 +28,8 @@ def test_FuseSegmentations_inputs(): position=-3, ), subjects_dir=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), timepoints=dict(argstr='%s', mandatory=True, diff --git a/nipype/interfaces/freesurfer/tests/test_auto_GLMFit.py b/nipype/interfaces/freesurfer/tests/test_auto_GLMFit.py index e99a1de407..e122d0dc75 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_GLMFit.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_GLMFit.py @@ -117,7 +117,8 @@ def test_GLMFit_inputs(): ), synth=dict(argstr='--synth', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), uniform=dict(argstr='--uniform %f %f', ), diff --git a/nipype/interfaces/freesurfer/tests/test_auto_ImageInfo.py b/nipype/interfaces/freesurfer/tests/test_auto_ImageInfo.py index c479c7727a..35bd042ad6 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_ImageInfo.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_ImageInfo.py @@ -16,7 +16,8 @@ def test_ImageInfo_inputs(): position=1, ), subjects_dir=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = ImageInfo.input_spec() diff --git a/nipype/interfaces/freesurfer/tests/test_auto_Jacobian.py b/nipype/interfaces/freesurfer/tests/test_auto_Jacobian.py index 4f986f6a93..270a10a460 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_Jacobian.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_Jacobian.py @@ -28,7 +28,8 @@ def test_Jacobian_inputs(): position=-1, ), subjects_dir=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = Jacobian.input_spec() diff --git a/nipype/interfaces/freesurfer/tests/test_auto_LTAConvert.py b/nipype/interfaces/freesurfer/tests/test_auto_LTAConvert.py index a7e4a121af..1b82182f63 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_LTAConvert.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_LTAConvert.py @@ -57,7 +57,8 @@ def test_LTAConvert_inputs(): ), target_file=dict(argstr='--trg %s', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = LTAConvert.input_spec() diff --git a/nipype/interfaces/freesurfer/tests/test_auto_Label2Annot.py b/nipype/interfaces/freesurfer/tests/test_auto_Label2Annot.py index bba05d8690..a8fa6e56b4 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_Label2Annot.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_Label2Annot.py @@ -33,7 +33,8 @@ def test_Label2Annot_inputs(): usedefault=True, ), subjects_dir=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), verbose_off=dict(argstr='--noverbose', ), diff --git a/nipype/interfaces/freesurfer/tests/test_auto_Label2Label.py b/nipype/interfaces/freesurfer/tests/test_auto_Label2Label.py index ab1a98f286..0b6a68ebf2 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_Label2Label.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_Label2Label.py @@ -42,7 +42,8 @@ def test_Label2Label_inputs(): usedefault=True, ), subjects_dir=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), white=dict(mandatory=True, ), diff --git a/nipype/interfaces/freesurfer/tests/test_auto_Label2Vol.py b/nipype/interfaces/freesurfer/tests/test_auto_Label2Vol.py index c58fd71532..f80602f76b 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_Label2Vol.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_Label2Vol.py @@ -66,7 +66,8 @@ def test_Label2Vol_inputs(): template_file=dict(argstr='--temp %s', mandatory=True, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), vol_label_file=dict(argstr='--o %s', genfile=True, diff --git a/nipype/interfaces/freesurfer/tests/test_auto_MNIBiasCorrection.py b/nipype/interfaces/freesurfer/tests/test_auto_MNIBiasCorrection.py index acf272a603..f10ba94ef6 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_MNIBiasCorrection.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_MNIBiasCorrection.py @@ -36,7 +36,8 @@ def test_MNIBiasCorrection_inputs(): stop=dict(argstr='--stop %f', ), subjects_dir=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), transform=dict(argstr='--uchar %s', ), diff --git a/nipype/interfaces/freesurfer/tests/test_auto_MPRtoMNI305.py b/nipype/interfaces/freesurfer/tests/test_auto_MPRtoMNI305.py index b0b1b39a36..70d4e2c89b 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_MPRtoMNI305.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_MPRtoMNI305.py @@ -22,7 +22,8 @@ def test_MPRtoMNI305_inputs(): target=dict(mandatory=True, usedefault=True, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = MPRtoMNI305.input_spec() diff --git a/nipype/interfaces/freesurfer/tests/test_auto_MRIConvert.py b/nipype/interfaces/freesurfer/tests/test_auto_MRIConvert.py index 9a1f011d77..906fadef0c 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_MRIConvert.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_MRIConvert.py @@ -170,7 +170,8 @@ def test_MRIConvert_inputs(): template_info=dict(), template_type=dict(argstr='--template_type %s', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ti=dict(argstr='-ti %d', ), diff --git a/nipype/interfaces/freesurfer/tests/test_auto_MRICoreg.py b/nipype/interfaces/freesurfer/tests/test_auto_MRICoreg.py index 5ba95570c8..12800572d9 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_MRICoreg.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_MRICoreg.py @@ -85,7 +85,8 @@ def test_MRICoreg_inputs(): ), subjects_dir=dict(argstr='--sd %s', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = MRICoreg.input_spec() diff --git a/nipype/interfaces/freesurfer/tests/test_auto_MRIFill.py b/nipype/interfaces/freesurfer/tests/test_auto_MRIFill.py index 1302f7a2dd..e1c05fd17a 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_MRIFill.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_MRIFill.py @@ -25,7 +25,8 @@ def test_MRIFill_inputs(): segmentation=dict(argstr='-segmentation %s', ), subjects_dir=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), transform=dict(argstr='-xform %s', ), diff --git a/nipype/interfaces/freesurfer/tests/test_auto_MRIMarchingCubes.py b/nipype/interfaces/freesurfer/tests/test_auto_MRIMarchingCubes.py index 13c70086df..df7cfaa11f 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_MRIMarchingCubes.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_MRIMarchingCubes.py @@ -29,7 +29,8 @@ def test_MRIMarchingCubes_inputs(): position=-2, ), subjects_dir=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = MRIMarchingCubes.input_spec() diff --git a/nipype/interfaces/freesurfer/tests/test_auto_MRIPretess.py b/nipype/interfaces/freesurfer/tests/test_auto_MRIPretess.py index 85db09eb46..1e61184ec1 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_MRIPretess.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_MRIPretess.py @@ -36,7 +36,8 @@ def test_MRIPretess_inputs(): position=-1, ), subjects_dir=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), test=dict(argstr='-test', ), diff --git a/nipype/interfaces/freesurfer/tests/test_auto_MRISPreproc.py b/nipype/interfaces/freesurfer/tests/test_auto_MRISPreproc.py index a35c091e04..21ea0de247 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_MRISPreproc.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_MRISPreproc.py @@ -60,7 +60,8 @@ def test_MRISPreproc_inputs(): target=dict(argstr='--target %s', mandatory=True, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), vol_measure_file=dict(argstr='--iv %s %s...', ), diff --git a/nipype/interfaces/freesurfer/tests/test_auto_MRISPreprocReconAll.py b/nipype/interfaces/freesurfer/tests/test_auto_MRISPreprocReconAll.py index e3a266d61a..79cd8056d0 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_MRISPreprocReconAll.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_MRISPreprocReconAll.py @@ -72,7 +72,8 @@ def test_MRISPreprocReconAll_inputs(): target=dict(argstr='--target %s', mandatory=True, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), vol_measure_file=dict(argstr='--iv %s %s...', ), diff --git a/nipype/interfaces/freesurfer/tests/test_auto_MRITessellate.py b/nipype/interfaces/freesurfer/tests/test_auto_MRITessellate.py index 58979a75a7..410d64b706 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_MRITessellate.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_MRITessellate.py @@ -25,7 +25,8 @@ def test_MRITessellate_inputs(): position=-1, ), subjects_dir=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), tesselate_all_voxels=dict(argstr='-a', ), diff --git a/nipype/interfaces/freesurfer/tests/test_auto_MRIsCALabel.py b/nipype/interfaces/freesurfer/tests/test_auto_MRIsCALabel.py index 50897b18a7..7298ab6b0c 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_MRIsCALabel.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_MRIsCALabel.py @@ -51,7 +51,8 @@ def test_MRIsCALabel_inputs(): subjects_dir=dict(), sulc=dict(mandatory=True, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = MRIsCALabel.input_spec() diff --git a/nipype/interfaces/freesurfer/tests/test_auto_MRIsCalc.py b/nipype/interfaces/freesurfer/tests/test_auto_MRIsCalc.py index ad45ba32ed..280e9e5ce0 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_MRIsCalc.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_MRIsCalc.py @@ -36,7 +36,8 @@ def test_MRIsCalc_inputs(): mandatory=True, ), subjects_dir=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = MRIsCalc.input_spec() diff --git a/nipype/interfaces/freesurfer/tests/test_auto_MRIsCombine.py b/nipype/interfaces/freesurfer/tests/test_auto_MRIsCombine.py index 2eae71deea..6262f74dbb 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_MRIsCombine.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_MRIsCombine.py @@ -22,7 +22,8 @@ def test_MRIsCombine_inputs(): position=-1, ), subjects_dir=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = MRIsCombine.input_spec() diff --git a/nipype/interfaces/freesurfer/tests/test_auto_MRIsConvert.py b/nipype/interfaces/freesurfer/tests/test_auto_MRIsConvert.py index 6d4501c8ca..a6c07208d7 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_MRIsConvert.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_MRIsConvert.py @@ -52,7 +52,8 @@ def test_MRIsConvert_inputs(): subjects_dir=dict(), talairachxfm_subjid=dict(argstr='-t %s', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), to_scanner=dict(argstr='--to-scanner', ), diff --git a/nipype/interfaces/freesurfer/tests/test_auto_MRIsExpand.py b/nipype/interfaces/freesurfer/tests/test_auto_MRIsExpand.py index c74f31bd59..995135da03 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_MRIsExpand.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_MRIsExpand.py @@ -40,7 +40,8 @@ def test_MRIsExpand_inputs(): spring=dict(argstr='-S %g', ), subjects_dir=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), thickness=dict(argstr='-thickness', ), diff --git a/nipype/interfaces/freesurfer/tests/test_auto_MRIsInflate.py b/nipype/interfaces/freesurfer/tests/test_auto_MRIsInflate.py index a2ea82a4f0..2ebe152b0a 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_MRIsInflate.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_MRIsInflate.py @@ -30,7 +30,8 @@ def test_MRIsInflate_inputs(): out_sulc=dict(xor=['no_save_sulc'], ), subjects_dir=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = MRIsInflate.input_spec() diff --git a/nipype/interfaces/freesurfer/tests/test_auto_MS_LDA.py b/nipype/interfaces/freesurfer/tests/test_auto_MS_LDA.py index cf4f27522e..86898a7bdb 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_MS_LDA.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_MS_LDA.py @@ -30,7 +30,8 @@ def test_MS_LDA_inputs(): shift=dict(argstr='-shift %d', ), subjects_dir=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), use_weights=dict(argstr='-W', ), diff --git a/nipype/interfaces/freesurfer/tests/test_auto_MakeAverageSubject.py b/nipype/interfaces/freesurfer/tests/test_auto_MakeAverageSubject.py index a230fac5f4..bc833d1d73 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_MakeAverageSubject.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_MakeAverageSubject.py @@ -20,7 +20,8 @@ def test_MakeAverageSubject_inputs(): mandatory=True, sep=' ', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = MakeAverageSubject.input_spec() diff --git a/nipype/interfaces/freesurfer/tests/test_auto_MakeSurfaces.py b/nipype/interfaces/freesurfer/tests/test_auto_MakeSurfaces.py index ff49e627ba..f90e1ca7e8 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_MakeSurfaces.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_MakeSurfaces.py @@ -55,7 +55,8 @@ def test_MakeSurfaces_inputs(): usedefault=True, ), subjects_dir=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), white=dict(argstr='-white %s', ), diff --git a/nipype/interfaces/freesurfer/tests/test_auto_Normalize.py b/nipype/interfaces/freesurfer/tests/test_auto_Normalize.py index c081e76912..efe7f34d9f 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_Normalize.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_Normalize.py @@ -31,7 +31,8 @@ def test_Normalize_inputs(): segmentation=dict(argstr='-aseg %s', ), subjects_dir=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), transform=dict(), ) diff --git a/nipype/interfaces/freesurfer/tests/test_auto_OneSampleTTest.py b/nipype/interfaces/freesurfer/tests/test_auto_OneSampleTTest.py index e5d7c18980..147a020837 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_OneSampleTTest.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_OneSampleTTest.py @@ -117,7 +117,8 @@ def test_OneSampleTTest_inputs(): ), synth=dict(argstr='--synth', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), uniform=dict(argstr='--uniform %f %f', ), diff --git a/nipype/interfaces/freesurfer/tests/test_auto_Paint.py b/nipype/interfaces/freesurfer/tests/test_auto_Paint.py index 3713464c7c..a8e2c0c582 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_Paint.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_Paint.py @@ -31,7 +31,8 @@ def test_Paint_inputs(): position=-3, ), template_param=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = Paint.input_spec() diff --git a/nipype/interfaces/freesurfer/tests/test_auto_ParcellationStats.py b/nipype/interfaces/freesurfer/tests/test_auto_ParcellationStats.py index 28de43ee39..4c51a0b2fb 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_ParcellationStats.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_ParcellationStats.py @@ -61,7 +61,8 @@ def test_ParcellationStats_inputs(): ), tabular_output=dict(argstr='-b', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), th3=dict(argstr='-th3', requires=['cortex_label'], diff --git a/nipype/interfaces/freesurfer/tests/test_auto_ParseDICOMDir.py b/nipype/interfaces/freesurfer/tests/test_auto_ParseDICOMDir.py index 54bf4467e5..ba90aa1ff2 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_ParseDICOMDir.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_ParseDICOMDir.py @@ -23,7 +23,8 @@ def test_ParseDICOMDir_inputs(): subjects_dir=dict(), summarize=dict(argstr='--summarize', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = ParseDICOMDir.input_spec() diff --git a/nipype/interfaces/freesurfer/tests/test_auto_ReconAll.py b/nipype/interfaces/freesurfer/tests/test_auto_ReconAll.py index 9a84bf9f28..d02b2b47df 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_ReconAll.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_ReconAll.py @@ -105,7 +105,8 @@ def test_ReconAll_inputs(): ), talairach=dict(xor=['expert'], ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), use_T2=dict(argstr='-T2pial', min_ver='5.3.0', diff --git a/nipype/interfaces/freesurfer/tests/test_auto_Register.py b/nipype/interfaces/freesurfer/tests/test_auto_Register.py index 33c6e0c941..8a2646faec 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_Register.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_Register.py @@ -34,7 +34,8 @@ def test_Register_inputs(): mandatory=True, position=-2, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = Register.input_spec() diff --git a/nipype/interfaces/freesurfer/tests/test_auto_RegisterAVItoTalairach.py b/nipype/interfaces/freesurfer/tests/test_auto_RegisterAVItoTalairach.py index c10b12911c..0fef6c54f1 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_RegisterAVItoTalairach.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_RegisterAVItoTalairach.py @@ -25,7 +25,8 @@ def test_RegisterAVItoTalairach_inputs(): mandatory=True, position=1, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), vox2vox=dict(argstr='%s', mandatory=True, diff --git a/nipype/interfaces/freesurfer/tests/test_auto_RelabelHypointensities.py b/nipype/interfaces/freesurfer/tests/test_auto_RelabelHypointensities.py index 4e46bbc03d..098795dc64 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_RelabelHypointensities.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_RelabelHypointensities.py @@ -34,7 +34,8 @@ def test_RelabelHypointensities_inputs(): position=-2, usedefault=True, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = RelabelHypointensities.input_spec() diff --git a/nipype/interfaces/freesurfer/tests/test_auto_RemoveIntersection.py b/nipype/interfaces/freesurfer/tests/test_auto_RemoveIntersection.py index 14a9cd8edb..cb49998f98 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_RemoveIntersection.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_RemoveIntersection.py @@ -25,7 +25,8 @@ def test_RemoveIntersection_inputs(): position=-1, ), subjects_dir=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = RemoveIntersection.input_spec() diff --git a/nipype/interfaces/freesurfer/tests/test_auto_RemoveNeck.py b/nipype/interfaces/freesurfer/tests/test_auto_RemoveNeck.py index 023bf6552a..210ebe74e0 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_RemoveNeck.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_RemoveNeck.py @@ -30,7 +30,8 @@ def test_RemoveNeck_inputs(): mandatory=True, position=-2, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), transform=dict(argstr='%s', mandatory=True, diff --git a/nipype/interfaces/freesurfer/tests/test_auto_Resample.py b/nipype/interfaces/freesurfer/tests/test_auto_Resample.py index 811fb85cde..9b275c2718 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_Resample.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_Resample.py @@ -21,7 +21,8 @@ def test_Resample_inputs(): position=-1, ), subjects_dir=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), voxel_size=dict(argstr='-vs %.2f %.2f %.2f', mandatory=True, diff --git a/nipype/interfaces/freesurfer/tests/test_auto_RobustRegister.py b/nipype/interfaces/freesurfer/tests/test_auto_RobustRegister.py index 1918061a7e..5388029eac 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_RobustRegister.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_RobustRegister.py @@ -72,7 +72,8 @@ def test_RobustRegister_inputs(): target_file=dict(argstr='--dst %s', mandatory=True, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), trans_only=dict(argstr='--transonly', ), diff --git a/nipype/interfaces/freesurfer/tests/test_auto_RobustTemplate.py b/nipype/interfaces/freesurfer/tests/test_auto_RobustTemplate.py index d2b89e3235..d9b852bb36 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_RobustTemplate.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_RobustTemplate.py @@ -47,7 +47,8 @@ def test_RobustTemplate_inputs(): subjects_dir=dict(), subsample_threshold=dict(argstr='--subsample %d', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), transform_outputs=dict(argstr='--lta %s', ), diff --git a/nipype/interfaces/freesurfer/tests/test_auto_SampleToSurface.py b/nipype/interfaces/freesurfer/tests/test_auto_SampleToSurface.py index a257fd7e2e..74239f5db0 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_SampleToSurface.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_SampleToSurface.py @@ -99,7 +99,8 @@ def test_SampleToSurface_inputs(): ), target_subject=dict(argstr='--trgsubject %s', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), vox_file=dict(argstr='--nvox %s', ), diff --git a/nipype/interfaces/freesurfer/tests/test_auto_SegStats.py b/nipype/interfaces/freesurfer/tests/test_auto_SegStats.py index 04e9f830d1..fecdc0ddb1 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_SegStats.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_SegStats.py @@ -97,7 +97,8 @@ def test_SegStats_inputs(): mandatory=True, xor=('segmentation_file', 'annot', 'surf_label'), ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), total_gray=dict(argstr='--totalgray', ), diff --git a/nipype/interfaces/freesurfer/tests/test_auto_SegStatsReconAll.py b/nipype/interfaces/freesurfer/tests/test_auto_SegStatsReconAll.py index eecc3aa4e5..8860857354 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_SegStatsReconAll.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_SegStatsReconAll.py @@ -118,7 +118,8 @@ def test_SegStatsReconAll_inputs(): mandatory=True, xor=('segmentation_file', 'annot', 'surf_label'), ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), total_gray=dict(argstr='--totalgray', ), diff --git a/nipype/interfaces/freesurfer/tests/test_auto_SegmentCC.py b/nipype/interfaces/freesurfer/tests/test_auto_SegmentCC.py index f54484b5b7..80bfca6d6d 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_SegmentCC.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_SegmentCC.py @@ -33,7 +33,8 @@ def test_SegmentCC_inputs(): usedefault=True, ), subjects_dir=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = SegmentCC.input_spec() diff --git a/nipype/interfaces/freesurfer/tests/test_auto_SegmentWM.py b/nipype/interfaces/freesurfer/tests/test_auto_SegmentWM.py index 450ad4f95b..03a9805404 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_SegmentWM.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_SegmentWM.py @@ -21,7 +21,8 @@ def test_SegmentWM_inputs(): position=-1, ), subjects_dir=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = SegmentWM.input_spec() diff --git a/nipype/interfaces/freesurfer/tests/test_auto_Smooth.py b/nipype/interfaces/freesurfer/tests/test_auto_Smooth.py index 5720c12975..41ad8650c0 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_Smooth.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_Smooth.py @@ -37,7 +37,8 @@ def test_Smooth_inputs(): requires=['reg_file'], xor=['num_iters'], ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), vol_fwhm=dict(argstr='--vol-fwhm %f', ), diff --git a/nipype/interfaces/freesurfer/tests/test_auto_SmoothTessellation.py b/nipype/interfaces/freesurfer/tests/test_auto_SmoothTessellation.py index 2419164f5f..fdcc51f755 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_SmoothTessellation.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_SmoothTessellation.py @@ -42,7 +42,8 @@ def test_SmoothTessellation_inputs(): snapshot_writing_iterations=dict(argstr='-w %d', ), subjects_dir=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), use_gaussian_curvature_smoothing=dict(argstr='-g', ), diff --git a/nipype/interfaces/freesurfer/tests/test_auto_Sphere.py b/nipype/interfaces/freesurfer/tests/test_auto_Sphere.py index 8afabb96e6..2ac074eef8 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_Sphere.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_Sphere.py @@ -31,7 +31,8 @@ def test_Sphere_inputs(): seed=dict(argstr='-seed %d', ), subjects_dir=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = Sphere.input_spec() diff --git a/nipype/interfaces/freesurfer/tests/test_auto_SphericalAverage.py b/nipype/interfaces/freesurfer/tests/test_auto_SphericalAverage.py index 928a2a5127..b16cb6154c 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_SphericalAverage.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_SphericalAverage.py @@ -40,7 +40,8 @@ def test_SphericalAverage_inputs(): mandatory=True, ), subjects_dir=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), threshold=dict(argstr='-t %.1f', ), diff --git a/nipype/interfaces/freesurfer/tests/test_auto_Surface2VolTransform.py b/nipype/interfaces/freesurfer/tests/test_auto_Surface2VolTransform.py index 2590827648..276b1157a9 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_Surface2VolTransform.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_Surface2VolTransform.py @@ -38,7 +38,8 @@ def test_Surface2VolTransform_inputs(): ), template_file=dict(argstr='--template %s', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), transformed_file=dict(argstr='--outvol %s', hash_files=False, diff --git a/nipype/interfaces/freesurfer/tests/test_auto_SurfaceSmooth.py b/nipype/interfaces/freesurfer/tests/test_auto_SurfaceSmooth.py index 835d4bc601..e85ab3409a 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_SurfaceSmooth.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_SurfaceSmooth.py @@ -36,7 +36,8 @@ def test_SurfaceSmooth_inputs(): mandatory=True, ), subjects_dir=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = SurfaceSmooth.input_spec() diff --git a/nipype/interfaces/freesurfer/tests/test_auto_SurfaceSnapshots.py b/nipype/interfaces/freesurfer/tests/test_auto_SurfaceSnapshots.py index 2043603124..c7b9a48d32 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_SurfaceSnapshots.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_SurfaceSnapshots.py @@ -88,7 +88,8 @@ def test_SurfaceSnapshots_inputs(): tcl_script=dict(argstr='%s', genfile=True, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), truncate_overlay=dict(argstr='-truncphaseflag 1', ), diff --git a/nipype/interfaces/freesurfer/tests/test_auto_SurfaceTransform.py b/nipype/interfaces/freesurfer/tests/test_auto_SurfaceTransform.py index 99c54a8f78..a414aa7d62 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_SurfaceTransform.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_SurfaceTransform.py @@ -44,7 +44,8 @@ def test_SurfaceTransform_inputs(): ), target_type=dict(argstr='--tfmt %s', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = SurfaceTransform.input_spec() diff --git a/nipype/interfaces/freesurfer/tests/test_auto_SynthesizeFLASH.py b/nipype/interfaces/freesurfer/tests/test_auto_SynthesizeFLASH.py index bc5fb23eb7..15f89133ee 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_SynthesizeFLASH.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_SynthesizeFLASH.py @@ -35,7 +35,8 @@ def test_SynthesizeFLASH_inputs(): mandatory=True, position=4, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), tr=dict(argstr='%.2f', mandatory=True, diff --git a/nipype/interfaces/freesurfer/tests/test_auto_TalairachAVI.py b/nipype/interfaces/freesurfer/tests/test_auto_TalairachAVI.py index f301168b01..37597e6973 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_TalairachAVI.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_TalairachAVI.py @@ -21,7 +21,8 @@ def test_TalairachAVI_inputs(): mandatory=True, ), subjects_dir=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = TalairachAVI.input_spec() diff --git a/nipype/interfaces/freesurfer/tests/test_auto_TalairachQC.py b/nipype/interfaces/freesurfer/tests/test_auto_TalairachQC.py index a6ae75b3ff..7c37835898 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_TalairachQC.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_TalairachQC.py @@ -17,7 +17,8 @@ def test_TalairachQC_inputs(): position=0, ), subjects_dir=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = TalairachQC.input_spec() diff --git a/nipype/interfaces/freesurfer/tests/test_auto_Tkregister2.py b/nipype/interfaces/freesurfer/tests/test_auto_Tkregister2.py index c5e3d65274..bb0c2501d8 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_Tkregister2.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_Tkregister2.py @@ -42,7 +42,8 @@ def test_Tkregister2_inputs(): target_image=dict(argstr='--targ %s', xor=['fstarg'], ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), xfm=dict(argstr='--xfm %s', ), diff --git a/nipype/interfaces/freesurfer/tests/test_auto_UnpackSDICOMDir.py b/nipype/interfaces/freesurfer/tests/test_auto_UnpackSDICOMDir.py index 8a1aecaa22..f2f442d267 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_UnpackSDICOMDir.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_UnpackSDICOMDir.py @@ -42,7 +42,8 @@ def test_UnpackSDICOMDir_inputs(): spm_zeropad=dict(argstr='-nspmzeropad %d', ), subjects_dir=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = UnpackSDICOMDir.input_spec() diff --git a/nipype/interfaces/freesurfer/tests/test_auto_VolumeMask.py b/nipype/interfaces/freesurfer/tests/test_auto_VolumeMask.py index b1bcaa4e40..f86e2dde7a 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_VolumeMask.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_VolumeMask.py @@ -46,7 +46,8 @@ def test_VolumeMask_inputs(): usedefault=True, ), subjects_dir=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = VolumeMask.input_spec() diff --git a/nipype/interfaces/freesurfer/tests/test_auto_WatershedSkullStrip.py b/nipype/interfaces/freesurfer/tests/test_auto_WatershedSkullStrip.py index 53ff443424..f7f465ffce 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_WatershedSkullStrip.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_WatershedSkullStrip.py @@ -27,7 +27,8 @@ def test_WatershedSkullStrip_inputs(): subjects_dir=dict(), t1=dict(argstr='-T1', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), transform=dict(argstr='%s', position=-3, diff --git a/nipype/interfaces/fsl/tests/test_auto_AR1Image.py b/nipype/interfaces/fsl/tests/test_auto_AR1Image.py index 2c3eda86cb..31a901ef47 100644 --- a/nipype/interfaces/fsl/tests/test_auto_AR1Image.py +++ b/nipype/interfaces/fsl/tests/test_auto_AR1Image.py @@ -35,7 +35,8 @@ def test_AR1Image_inputs(): position=-1, ), output_type=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = AR1Image.input_spec() diff --git a/nipype/interfaces/fsl/tests/test_auto_AccuracyTester.py b/nipype/interfaces/fsl/tests/test_auto_AccuracyTester.py index 1e4fb9406c..91ce98c97c 100644 --- a/nipype/interfaces/fsl/tests/test_auto_AccuracyTester.py +++ b/nipype/interfaces/fsl/tests/test_auto_AccuracyTester.py @@ -21,7 +21,8 @@ def test_AccuracyTester_inputs(): mandatory=True, position=2, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), trained_wts_file=dict(argstr='%s', mandatory=True, diff --git a/nipype/interfaces/fsl/tests/test_auto_ApplyMask.py b/nipype/interfaces/fsl/tests/test_auto_ApplyMask.py index 0a74d811c3..4df9cf40c5 100644 --- a/nipype/interfaces/fsl/tests/test_auto_ApplyMask.py +++ b/nipype/interfaces/fsl/tests/test_auto_ApplyMask.py @@ -35,7 +35,8 @@ def test_ApplyMask_inputs(): position=-1, ), output_type=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = ApplyMask.input_spec() diff --git a/nipype/interfaces/fsl/tests/test_auto_ApplyTOPUP.py b/nipype/interfaces/fsl/tests/test_auto_ApplyTOPUP.py index 7b08c18c28..837b00d06d 100644 --- a/nipype/interfaces/fsl/tests/test_auto_ApplyTOPUP.py +++ b/nipype/interfaces/fsl/tests/test_auto_ApplyTOPUP.py @@ -40,7 +40,8 @@ def test_ApplyTOPUP_inputs(): name_template='%s_corrected', ), output_type=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = ApplyTOPUP.input_spec() diff --git a/nipype/interfaces/fsl/tests/test_auto_ApplyWarp.py b/nipype/interfaces/fsl/tests/test_auto_ApplyWarp.py index bcdcc670ac..fddbab5bea 100644 --- a/nipype/interfaces/fsl/tests/test_auto_ApplyWarp.py +++ b/nipype/interfaces/fsl/tests/test_auto_ApplyWarp.py @@ -50,7 +50,8 @@ def test_ApplyWarp_inputs(): ), supersample=dict(argstr='--super', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = ApplyWarp.input_spec() diff --git a/nipype/interfaces/fsl/tests/test_auto_ApplyXFM.py b/nipype/interfaces/fsl/tests/test_auto_ApplyXFM.py index 438f4ce486..63f38443e4 100644 --- a/nipype/interfaces/fsl/tests/test_auto_ApplyXFM.py +++ b/nipype/interfaces/fsl/tests/test_auto_ApplyXFM.py @@ -128,7 +128,8 @@ def test_ApplyXFM_inputs(): ), sinc_window=dict(argstr='-sincwindow %s', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), uses_qform=dict(argstr='-usesqform', ), diff --git a/nipype/interfaces/fsl/tests/test_auto_AvScale.py b/nipype/interfaces/fsl/tests/test_auto_AvScale.py index e19577b71f..a95d7888ee 100644 --- a/nipype/interfaces/fsl/tests/test_auto_AvScale.py +++ b/nipype/interfaces/fsl/tests/test_auto_AvScale.py @@ -20,7 +20,8 @@ def test_AvScale_inputs(): ref_file=dict(argstr='%s', position=-1, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = AvScale.input_spec() diff --git a/nipype/interfaces/fsl/tests/test_auto_B0Calc.py b/nipype/interfaces/fsl/tests/test_auto_B0Calc.py index ee6b749d7e..99e661ab8e 100644 --- a/nipype/interfaces/fsl/tests/test_auto_B0Calc.py +++ b/nipype/interfaces/fsl/tests/test_auto_B0Calc.py @@ -33,7 +33,8 @@ def test_B0Calc_inputs(): position=1, ), output_type=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), x_b0=dict(argstr='--b0x=%0.2f', xor=['xyz_b0'], diff --git a/nipype/interfaces/fsl/tests/test_auto_BEDPOSTX5.py b/nipype/interfaces/fsl/tests/test_auto_BEDPOSTX5.py index 782c1a9317..db2d5c808a 100644 --- a/nipype/interfaces/fsl/tests/test_auto_BEDPOSTX5.py +++ b/nipype/interfaces/fsl/tests/test_auto_BEDPOSTX5.py @@ -75,7 +75,8 @@ def test_BEDPOSTX5_inputs(): ), seed=dict(argstr='--seed=%d', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), update_proposal_every=dict(argstr='--updateproposalevery=%d', ), diff --git a/nipype/interfaces/fsl/tests/test_auto_BET.py b/nipype/interfaces/fsl/tests/test_auto_BET.py index 98af74707d..9e0bfb356e 100644 --- a/nipype/interfaces/fsl/tests/test_auto_BET.py +++ b/nipype/interfaces/fsl/tests/test_auto_BET.py @@ -61,7 +61,8 @@ def test_BET_inputs(): t2_guided=dict(argstr='-A2 %s', xor=('functional', 'reduce_bias', 'robust', 'padding', 'remove_eyes', 'surfaces', 't2_guided'), ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), threshold=dict(argstr='-t', ), diff --git a/nipype/interfaces/fsl/tests/test_auto_BinaryMaths.py b/nipype/interfaces/fsl/tests/test_auto_BinaryMaths.py index aae4a436dd..ddb06020cb 100644 --- a/nipype/interfaces/fsl/tests/test_auto_BinaryMaths.py +++ b/nipype/interfaces/fsl/tests/test_auto_BinaryMaths.py @@ -45,7 +45,8 @@ def test_BinaryMaths_inputs(): position=-1, ), output_type=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = BinaryMaths.input_spec() diff --git a/nipype/interfaces/fsl/tests/test_auto_ChangeDataType.py b/nipype/interfaces/fsl/tests/test_auto_ChangeDataType.py index 6d2952c073..a4c3f164bb 100644 --- a/nipype/interfaces/fsl/tests/test_auto_ChangeDataType.py +++ b/nipype/interfaces/fsl/tests/test_auto_ChangeDataType.py @@ -32,7 +32,8 @@ def test_ChangeDataType_inputs(): position=-1, ), output_type=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = ChangeDataType.input_spec() diff --git a/nipype/interfaces/fsl/tests/test_auto_Classifier.py b/nipype/interfaces/fsl/tests/test_auto_Classifier.py index 713666b754..31458e74fa 100644 --- a/nipype/interfaces/fsl/tests/test_auto_Classifier.py +++ b/nipype/interfaces/fsl/tests/test_auto_Classifier.py @@ -17,7 +17,8 @@ def test_Classifier_inputs(): copyfile=False, position=1, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), thresh=dict(argstr='%d', mandatory=True, diff --git a/nipype/interfaces/fsl/tests/test_auto_Cleaner.py b/nipype/interfaces/fsl/tests/test_auto_Cleaner.py index 76487d6adc..6ec9fee3c1 100644 --- a/nipype/interfaces/fsl/tests/test_auto_Cleaner.py +++ b/nipype/interfaces/fsl/tests/test_auto_Cleaner.py @@ -35,7 +35,8 @@ def test_Cleaner_inputs(): ignore_exception=dict(nohash=True, usedefault=True, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = Cleaner.input_spec() diff --git a/nipype/interfaces/fsl/tests/test_auto_Cluster.py b/nipype/interfaces/fsl/tests/test_auto_Cluster.py index 886ef8885b..f8d58401d5 100644 --- a/nipype/interfaces/fsl/tests/test_auto_Cluster.py +++ b/nipype/interfaces/fsl/tests/test_auto_Cluster.py @@ -67,7 +67,8 @@ def test_Cluster_inputs(): ), std_space_file=dict(argstr='--stdvol=%s', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), threshold=dict(argstr='--thresh=%.10f', mandatory=True, diff --git a/nipype/interfaces/fsl/tests/test_auto_Complex.py b/nipype/interfaces/fsl/tests/test_auto_Complex.py index c0544c799d..1876cbb343 100644 --- a/nipype/interfaces/fsl/tests/test_auto_Complex.py +++ b/nipype/interfaces/fsl/tests/test_auto_Complex.py @@ -86,7 +86,8 @@ def test_Complex_inputs(): start_vol=dict(argstr='%d', position=-2, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = Complex.input_spec() diff --git a/nipype/interfaces/fsl/tests/test_auto_ContrastMgr.py b/nipype/interfaces/fsl/tests/test_auto_ContrastMgr.py index 5fa6e7828c..b5c71395c7 100644 --- a/nipype/interfaces/fsl/tests/test_auto_ContrastMgr.py +++ b/nipype/interfaces/fsl/tests/test_auto_ContrastMgr.py @@ -39,7 +39,8 @@ def test_ContrastMgr_inputs(): mandatory=True, position=-1, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = ContrastMgr.input_spec() diff --git a/nipype/interfaces/fsl/tests/test_auto_ConvertWarp.py b/nipype/interfaces/fsl/tests/test_auto_ConvertWarp.py index 97c0a06315..14a2747b5b 100644 --- a/nipype/interfaces/fsl/tests/test_auto_ConvertWarp.py +++ b/nipype/interfaces/fsl/tests/test_auto_ConvertWarp.py @@ -52,7 +52,8 @@ def test_ConvertWarp_inputs(): ), shift_in_file=dict(argstr='--shiftmap=%s', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), warp1=dict(argstr='--warp1=%s', ), diff --git a/nipype/interfaces/fsl/tests/test_auto_ConvertXFM.py b/nipype/interfaces/fsl/tests/test_auto_ConvertXFM.py index 5146d1f718..4531a6dc80 100644 --- a/nipype/interfaces/fsl/tests/test_auto_ConvertXFM.py +++ b/nipype/interfaces/fsl/tests/test_auto_ConvertXFM.py @@ -39,7 +39,8 @@ def test_ConvertXFM_inputs(): position=1, ), output_type=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = ConvertXFM.input_spec() diff --git a/nipype/interfaces/fsl/tests/test_auto_CopyGeom.py b/nipype/interfaces/fsl/tests/test_auto_CopyGeom.py index 70922a9da9..7ced6130ed 100644 --- a/nipype/interfaces/fsl/tests/test_auto_CopyGeom.py +++ b/nipype/interfaces/fsl/tests/test_auto_CopyGeom.py @@ -28,7 +28,8 @@ def test_CopyGeom_inputs(): position=0, ), output_type=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = CopyGeom.input_spec() diff --git a/nipype/interfaces/fsl/tests/test_auto_DTIFit.py b/nipype/interfaces/fsl/tests/test_auto_DTIFit.py index 4badbfb2dc..2455d040c2 100644 --- a/nipype/interfaces/fsl/tests/test_auto_DTIFit.py +++ b/nipype/interfaces/fsl/tests/test_auto_DTIFit.py @@ -55,7 +55,8 @@ def test_DTIFit_inputs(): ), sse=dict(argstr='--sse', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = DTIFit.input_spec() diff --git a/nipype/interfaces/fsl/tests/test_auto_DilateImage.py b/nipype/interfaces/fsl/tests/test_auto_DilateImage.py index 40da7affbe..69c1218cf9 100644 --- a/nipype/interfaces/fsl/tests/test_auto_DilateImage.py +++ b/nipype/interfaces/fsl/tests/test_auto_DilateImage.py @@ -46,7 +46,8 @@ def test_DilateImage_inputs(): position=-1, ), output_type=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = DilateImage.input_spec() diff --git a/nipype/interfaces/fsl/tests/test_auto_DistanceMap.py b/nipype/interfaces/fsl/tests/test_auto_DistanceMap.py index 87cde59644..2bf5805a30 100644 --- a/nipype/interfaces/fsl/tests/test_auto_DistanceMap.py +++ b/nipype/interfaces/fsl/tests/test_auto_DistanceMap.py @@ -27,7 +27,8 @@ def test_DistanceMap_inputs(): mask_file=dict(argstr='--mask=%s', ), output_type=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = DistanceMap.input_spec() diff --git a/nipype/interfaces/fsl/tests/test_auto_DualRegression.py b/nipype/interfaces/fsl/tests/test_auto_DualRegression.py index 02c68ebc24..0552cf6837 100644 --- a/nipype/interfaces/fsl/tests/test_auto_DualRegression.py +++ b/nipype/interfaces/fsl/tests/test_auto_DualRegression.py @@ -44,7 +44,8 @@ def test_DualRegression_inputs(): usedefault=True, ), output_type=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = DualRegression.input_spec() diff --git a/nipype/interfaces/fsl/tests/test_auto_EPIDeWarp.py b/nipype/interfaces/fsl/tests/test_auto_EPIDeWarp.py index 5f49d5a89e..5c52237ba7 100644 --- a/nipype/interfaces/fsl/tests/test_auto_EPIDeWarp.py +++ b/nipype/interfaces/fsl/tests/test_auto_EPIDeWarp.py @@ -44,7 +44,8 @@ def test_EPIDeWarp_inputs(): tediff=dict(argstr='--tediff %s', usedefault=True, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), tmpdir=dict(argstr='--tmpdir %s', genfile=True, diff --git a/nipype/interfaces/fsl/tests/test_auto_Eddy.py b/nipype/interfaces/fsl/tests/test_auto_Eddy.py index c5f521045f..c40deb16bf 100644 --- a/nipype/interfaces/fsl/tests/test_auto_Eddy.py +++ b/nipype/interfaces/fsl/tests/test_auto_Eddy.py @@ -74,7 +74,8 @@ def test_Eddy_inputs(): ), slm=dict(argstr='--slm=%s', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), use_cuda=dict(), ) diff --git a/nipype/interfaces/fsl/tests/test_auto_EddyCorrect.py b/nipype/interfaces/fsl/tests/test_auto_EddyCorrect.py index c7606a2cea..0f4da84475 100644 --- a/nipype/interfaces/fsl/tests/test_auto_EddyCorrect.py +++ b/nipype/interfaces/fsl/tests/test_auto_EddyCorrect.py @@ -28,7 +28,8 @@ def test_EddyCorrect_inputs(): position=2, usedefault=True, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = EddyCorrect.input_spec() diff --git a/nipype/interfaces/fsl/tests/test_auto_EpiReg.py b/nipype/interfaces/fsl/tests/test_auto_EpiReg.py index c34014dd57..cf52ba99ee 100644 --- a/nipype/interfaces/fsl/tests/test_auto_EpiReg.py +++ b/nipype/interfaces/fsl/tests/test_auto_EpiReg.py @@ -44,7 +44,8 @@ def test_EpiReg_inputs(): mandatory=True, position=-3, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), weight_image=dict(argstr='--weight=%s', ), diff --git a/nipype/interfaces/fsl/tests/test_auto_ErodeImage.py b/nipype/interfaces/fsl/tests/test_auto_ErodeImage.py index a64c6f5d9e..84ce60f014 100644 --- a/nipype/interfaces/fsl/tests/test_auto_ErodeImage.py +++ b/nipype/interfaces/fsl/tests/test_auto_ErodeImage.py @@ -46,7 +46,8 @@ def test_ErodeImage_inputs(): position=-1, ), output_type=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = ErodeImage.input_spec() diff --git a/nipype/interfaces/fsl/tests/test_auto_ExtractROI.py b/nipype/interfaces/fsl/tests/test_auto_ExtractROI.py index 77be2edb95..158a059f71 100644 --- a/nipype/interfaces/fsl/tests/test_auto_ExtractROI.py +++ b/nipype/interfaces/fsl/tests/test_auto_ExtractROI.py @@ -32,7 +32,8 @@ def test_ExtractROI_inputs(): t_size=dict(argstr='%d', position=9, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), x_min=dict(argstr='%d', position=2, diff --git a/nipype/interfaces/fsl/tests/test_auto_FAST.py b/nipype/interfaces/fsl/tests/test_auto_FAST.py index 11e6cec5de..d1410d0fcd 100644 --- a/nipype/interfaces/fsl/tests/test_auto_FAST.py +++ b/nipype/interfaces/fsl/tests/test_auto_FAST.py @@ -57,7 +57,8 @@ def test_FAST_inputs(): ), segments=dict(argstr='-g', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), use_priors=dict(argstr='-P', ), diff --git a/nipype/interfaces/fsl/tests/test_auto_FEAT.py b/nipype/interfaces/fsl/tests/test_auto_FEAT.py index f2c5e46e7e..52d990891a 100644 --- a/nipype/interfaces/fsl/tests/test_auto_FEAT.py +++ b/nipype/interfaces/fsl/tests/test_auto_FEAT.py @@ -17,7 +17,8 @@ def test_FEAT_inputs(): usedefault=True, ), output_type=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = FEAT.input_spec() diff --git a/nipype/interfaces/fsl/tests/test_auto_FEATModel.py b/nipype/interfaces/fsl/tests/test_auto_FEATModel.py index e0956ee674..f644dbbdcb 100644 --- a/nipype/interfaces/fsl/tests/test_auto_FEATModel.py +++ b/nipype/interfaces/fsl/tests/test_auto_FEATModel.py @@ -23,7 +23,8 @@ def test_FEATModel_inputs(): usedefault=True, ), output_type=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = FEATModel.input_spec() diff --git a/nipype/interfaces/fsl/tests/test_auto_FIRST.py b/nipype/interfaces/fsl/tests/test_auto_FIRST.py index 7b98ac128c..630774e9fe 100644 --- a/nipype/interfaces/fsl/tests/test_auto_FIRST.py +++ b/nipype/interfaces/fsl/tests/test_auto_FIRST.py @@ -45,7 +45,8 @@ def test_FIRST_inputs(): usedefault=True, ), output_type=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), verbose=dict(argstr='-v', position=1, diff --git a/nipype/interfaces/fsl/tests/test_auto_FLAMEO.py b/nipype/interfaces/fsl/tests/test_auto_FLAMEO.py index ed8093853d..69940790fd 100644 --- a/nipype/interfaces/fsl/tests/test_auto_FLAMEO.py +++ b/nipype/interfaces/fsl/tests/test_auto_FLAMEO.py @@ -54,7 +54,8 @@ def test_FLAMEO_inputs(): t_con_file=dict(argstr='--tcontrastsfile=%s', mandatory=True, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), var_cope_file=dict(argstr='--varcopefile=%s', ), diff --git a/nipype/interfaces/fsl/tests/test_auto_FLIRT.py b/nipype/interfaces/fsl/tests/test_auto_FLIRT.py index fabfa4054c..04448f0e0c 100644 --- a/nipype/interfaces/fsl/tests/test_auto_FLIRT.py +++ b/nipype/interfaces/fsl/tests/test_auto_FLIRT.py @@ -127,7 +127,8 @@ def test_FLIRT_inputs(): ), sinc_window=dict(argstr='-sincwindow %s', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), uses_qform=dict(argstr='-usesqform', ), diff --git a/nipype/interfaces/fsl/tests/test_auto_FNIRT.py b/nipype/interfaces/fsl/tests/test_auto_FNIRT.py index 8e4cf47fc3..7e76ff0250 100644 --- a/nipype/interfaces/fsl/tests/test_auto_FNIRT.py +++ b/nipype/interfaces/fsl/tests/test_auto_FNIRT.py @@ -114,7 +114,8 @@ def test_FNIRT_inputs(): subsampling_scheme=dict(argstr='--subsamp=%s', sep=',', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), warp_resolution=dict(argstr='--warpres=%d,%d,%d', ), diff --git a/nipype/interfaces/fsl/tests/test_auto_FSLCommand.py b/nipype/interfaces/fsl/tests/test_auto_FSLCommand.py index 2ade472bfa..d31001dd66 100644 --- a/nipype/interfaces/fsl/tests/test_auto_FSLCommand.py +++ b/nipype/interfaces/fsl/tests/test_auto_FSLCommand.py @@ -13,7 +13,8 @@ def test_FSLCommand_inputs(): usedefault=True, ), output_type=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = FSLCommand.input_spec() diff --git a/nipype/interfaces/fsl/tests/test_auto_FSLXCommand.py b/nipype/interfaces/fsl/tests/test_auto_FSLXCommand.py index 280cf3a588..25cf6ae30e 100644 --- a/nipype/interfaces/fsl/tests/test_auto_FSLXCommand.py +++ b/nipype/interfaces/fsl/tests/test_auto_FSLXCommand.py @@ -72,7 +72,8 @@ def test_FSLXCommand_inputs(): ), seed=dict(argstr='--seed=%d', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), update_proposal_every=dict(argstr='--updateproposalevery=%d', ), diff --git a/nipype/interfaces/fsl/tests/test_auto_FUGUE.py b/nipype/interfaces/fsl/tests/test_auto_FUGUE.py index 93b41ea6de..628e992e53 100644 --- a/nipype/interfaces/fsl/tests/test_auto_FUGUE.py +++ b/nipype/interfaces/fsl/tests/test_auto_FUGUE.py @@ -75,7 +75,8 @@ def test_FUGUE_inputs(): ), smooth3d=dict(argstr='--smooth3=%.2f', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), unwarp_direction=dict(argstr='--unwarpdir=%s', ), diff --git a/nipype/interfaces/fsl/tests/test_auto_FeatureExtractor.py b/nipype/interfaces/fsl/tests/test_auto_FeatureExtractor.py index c0e763640c..49aaf919f4 100644 --- a/nipype/interfaces/fsl/tests/test_auto_FeatureExtractor.py +++ b/nipype/interfaces/fsl/tests/test_auto_FeatureExtractor.py @@ -16,7 +16,8 @@ def test_FeatureExtractor_inputs(): copyfile=False, position=-1, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = FeatureExtractor.input_spec() diff --git a/nipype/interfaces/fsl/tests/test_auto_FilterRegressor.py b/nipype/interfaces/fsl/tests/test_auto_FilterRegressor.py index ac62586ec5..76829f1c2d 100644 --- a/nipype/interfaces/fsl/tests/test_auto_FilterRegressor.py +++ b/nipype/interfaces/fsl/tests/test_auto_FilterRegressor.py @@ -40,7 +40,8 @@ def test_FilterRegressor_inputs(): out_vnscales=dict(argstr='--out_vnscales', ), output_type=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), var_norm=dict(argstr='--vn', ), diff --git a/nipype/interfaces/fsl/tests/test_auto_FindTheBiggest.py b/nipype/interfaces/fsl/tests/test_auto_FindTheBiggest.py index ef7e14fcbf..82f3ac3f5b 100644 --- a/nipype/interfaces/fsl/tests/test_auto_FindTheBiggest.py +++ b/nipype/interfaces/fsl/tests/test_auto_FindTheBiggest.py @@ -22,7 +22,8 @@ def test_FindTheBiggest_inputs(): position=2, ), output_type=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = FindTheBiggest.input_spec() diff --git a/nipype/interfaces/fsl/tests/test_auto_GLM.py b/nipype/interfaces/fsl/tests/test_auto_GLM.py index d9ab6bc168..e612dec331 100644 --- a/nipype/interfaces/fsl/tests/test_auto_GLM.py +++ b/nipype/interfaces/fsl/tests/test_auto_GLM.py @@ -61,7 +61,8 @@ def test_GLM_inputs(): out_z_name=dict(argstr='--out_z=%s', ), output_type=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), var_norm=dict(argstr='--vn', ), diff --git a/nipype/interfaces/fsl/tests/test_auto_ICA_AROMA.py b/nipype/interfaces/fsl/tests/test_auto_ICA_AROMA.py index 9102d667b3..b5e6af6c3c 100644 --- a/nipype/interfaces/fsl/tests/test_auto_ICA_AROMA.py +++ b/nipype/interfaces/fsl/tests/test_auto_ICA_AROMA.py @@ -46,7 +46,8 @@ def test_ICA_AROMA_inputs(): out_dir=dict(argstr='-o %s', genfile=True, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = ICA_AROMA.input_spec() diff --git a/nipype/interfaces/fsl/tests/test_auto_ImageMaths.py b/nipype/interfaces/fsl/tests/test_auto_ImageMaths.py index 8c1aef8b5c..48b01b8025 100644 --- a/nipype/interfaces/fsl/tests/test_auto_ImageMaths.py +++ b/nipype/interfaces/fsl/tests/test_auto_ImageMaths.py @@ -32,7 +32,8 @@ def test_ImageMaths_inputs(): ), output_type=dict(), suffix=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = ImageMaths.input_spec() diff --git a/nipype/interfaces/fsl/tests/test_auto_ImageMeants.py b/nipype/interfaces/fsl/tests/test_auto_ImageMeants.py index 73deecb7e5..28bd9d465b 100644 --- a/nipype/interfaces/fsl/tests/test_auto_ImageMeants.py +++ b/nipype/interfaces/fsl/tests/test_auto_ImageMeants.py @@ -34,7 +34,8 @@ def test_ImageMeants_inputs(): ), spatial_coord=dict(argstr='-c %s', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), transpose=dict(argstr='--transpose', ), diff --git a/nipype/interfaces/fsl/tests/test_auto_ImageStats.py b/nipype/interfaces/fsl/tests/test_auto_ImageStats.py index 1a4739a320..ea0b8b5d7d 100644 --- a/nipype/interfaces/fsl/tests/test_auto_ImageStats.py +++ b/nipype/interfaces/fsl/tests/test_auto_ImageStats.py @@ -26,7 +26,8 @@ def test_ImageStats_inputs(): split_4d=dict(argstr='-t', position=1, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = ImageStats.input_spec() diff --git a/nipype/interfaces/fsl/tests/test_auto_InvWarp.py b/nipype/interfaces/fsl/tests/test_auto_InvWarp.py index 02624a6d2c..2f40af2fdd 100644 --- a/nipype/interfaces/fsl/tests/test_auto_InvWarp.py +++ b/nipype/interfaces/fsl/tests/test_auto_InvWarp.py @@ -37,7 +37,8 @@ def test_InvWarp_inputs(): relative=dict(argstr='--rel', xor=['absolute'], ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), warp=dict(argstr='--warp=%s', mandatory=True, diff --git a/nipype/interfaces/fsl/tests/test_auto_IsotropicSmooth.py b/nipype/interfaces/fsl/tests/test_auto_IsotropicSmooth.py index 0d33d852a2..e0f907222b 100644 --- a/nipype/interfaces/fsl/tests/test_auto_IsotropicSmooth.py +++ b/nipype/interfaces/fsl/tests/test_auto_IsotropicSmooth.py @@ -41,7 +41,8 @@ def test_IsotropicSmooth_inputs(): position=4, xor=['fwhm'], ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = IsotropicSmooth.input_spec() diff --git a/nipype/interfaces/fsl/tests/test_auto_MCFLIRT.py b/nipype/interfaces/fsl/tests/test_auto_MCFLIRT.py index 300f829bfa..d68b1f2606 100644 --- a/nipype/interfaces/fsl/tests/test_auto_MCFLIRT.py +++ b/nipype/interfaces/fsl/tests/test_auto_MCFLIRT.py @@ -53,7 +53,8 @@ def test_MCFLIRT_inputs(): ), stats_imgs=dict(argstr='-stats', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), use_contour=dict(argstr='-edge', ), diff --git a/nipype/interfaces/fsl/tests/test_auto_MELODIC.py b/nipype/interfaces/fsl/tests/test_auto_MELODIC.py index 1c14c441d9..eed0671d7a 100644 --- a/nipype/interfaces/fsl/tests/test_auto_MELODIC.py +++ b/nipype/interfaces/fsl/tests/test_auto_MELODIC.py @@ -107,7 +107,8 @@ def test_MELODIC_inputs(): ), t_des=dict(argstr='--Tdes=%s', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), tr_sec=dict(argstr='--tr=%f', ), diff --git a/nipype/interfaces/fsl/tests/test_auto_MakeDyadicVectors.py b/nipype/interfaces/fsl/tests/test_auto_MakeDyadicVectors.py index ed921d092a..3365cbeb7b 100644 --- a/nipype/interfaces/fsl/tests/test_auto_MakeDyadicVectors.py +++ b/nipype/interfaces/fsl/tests/test_auto_MakeDyadicVectors.py @@ -28,7 +28,8 @@ def test_MakeDyadicVectors_inputs(): mandatory=True, position=1, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), theta_vol=dict(argstr='%s', mandatory=True, diff --git a/nipype/interfaces/fsl/tests/test_auto_MathsCommand.py b/nipype/interfaces/fsl/tests/test_auto_MathsCommand.py index 1962cd5ad9..ae15b6348f 100644 --- a/nipype/interfaces/fsl/tests/test_auto_MathsCommand.py +++ b/nipype/interfaces/fsl/tests/test_auto_MathsCommand.py @@ -31,7 +31,8 @@ def test_MathsCommand_inputs(): position=-1, ), output_type=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = MathsCommand.input_spec() diff --git a/nipype/interfaces/fsl/tests/test_auto_MaxImage.py b/nipype/interfaces/fsl/tests/test_auto_MaxImage.py index 22ba2f24ad..808f49725a 100644 --- a/nipype/interfaces/fsl/tests/test_auto_MaxImage.py +++ b/nipype/interfaces/fsl/tests/test_auto_MaxImage.py @@ -35,7 +35,8 @@ def test_MaxImage_inputs(): position=-1, ), output_type=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = MaxImage.input_spec() diff --git a/nipype/interfaces/fsl/tests/test_auto_MaxnImage.py b/nipype/interfaces/fsl/tests/test_auto_MaxnImage.py index 12444f2e3b..7f90f7828f 100644 --- a/nipype/interfaces/fsl/tests/test_auto_MaxnImage.py +++ b/nipype/interfaces/fsl/tests/test_auto_MaxnImage.py @@ -35,7 +35,8 @@ def test_MaxnImage_inputs(): position=-1, ), output_type=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = MaxnImage.input_spec() diff --git a/nipype/interfaces/fsl/tests/test_auto_MeanImage.py b/nipype/interfaces/fsl/tests/test_auto_MeanImage.py index 86b23eb8b9..378417e20e 100644 --- a/nipype/interfaces/fsl/tests/test_auto_MeanImage.py +++ b/nipype/interfaces/fsl/tests/test_auto_MeanImage.py @@ -35,7 +35,8 @@ def test_MeanImage_inputs(): position=-1, ), output_type=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = MeanImage.input_spec() diff --git a/nipype/interfaces/fsl/tests/test_auto_MedianImage.py b/nipype/interfaces/fsl/tests/test_auto_MedianImage.py index c4be8d6687..1e88316ee4 100644 --- a/nipype/interfaces/fsl/tests/test_auto_MedianImage.py +++ b/nipype/interfaces/fsl/tests/test_auto_MedianImage.py @@ -35,7 +35,8 @@ def test_MedianImage_inputs(): position=-1, ), output_type=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = MedianImage.input_spec() diff --git a/nipype/interfaces/fsl/tests/test_auto_Merge.py b/nipype/interfaces/fsl/tests/test_auto_Merge.py index 32c966edaf..dfd92da57e 100644 --- a/nipype/interfaces/fsl/tests/test_auto_Merge.py +++ b/nipype/interfaces/fsl/tests/test_auto_Merge.py @@ -27,7 +27,8 @@ def test_Merge_inputs(): position=1, ), output_type=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), tr=dict(argstr='%.2f', position=-1, diff --git a/nipype/interfaces/fsl/tests/test_auto_MinImage.py b/nipype/interfaces/fsl/tests/test_auto_MinImage.py index 973bc9a369..97376366ff 100644 --- a/nipype/interfaces/fsl/tests/test_auto_MinImage.py +++ b/nipype/interfaces/fsl/tests/test_auto_MinImage.py @@ -35,7 +35,8 @@ def test_MinImage_inputs(): position=-1, ), output_type=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = MinImage.input_spec() diff --git a/nipype/interfaces/fsl/tests/test_auto_MotionOutliers.py b/nipype/interfaces/fsl/tests/test_auto_MotionOutliers.py index a4268fd930..346451e737 100644 --- a/nipype/interfaces/fsl/tests/test_auto_MotionOutliers.py +++ b/nipype/interfaces/fsl/tests/test_auto_MotionOutliers.py @@ -42,7 +42,8 @@ def test_MotionOutliers_inputs(): name_template='%s_metrics.txt', ), output_type=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), threshold=dict(argstr='--thresh=%g', ), diff --git a/nipype/interfaces/fsl/tests/test_auto_MultiImageMaths.py b/nipype/interfaces/fsl/tests/test_auto_MultiImageMaths.py index 964605e726..4416477970 100644 --- a/nipype/interfaces/fsl/tests/test_auto_MultiImageMaths.py +++ b/nipype/interfaces/fsl/tests/test_auto_MultiImageMaths.py @@ -37,7 +37,8 @@ def test_MultiImageMaths_inputs(): position=-1, ), output_type=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = MultiImageMaths.input_spec() diff --git a/nipype/interfaces/fsl/tests/test_auto_Overlay.py b/nipype/interfaces/fsl/tests/test_auto_Overlay.py index 84885f6c10..240154c74e 100644 --- a/nipype/interfaces/fsl/tests/test_auto_Overlay.py +++ b/nipype/interfaces/fsl/tests/test_auto_Overlay.py @@ -60,7 +60,8 @@ def test_Overlay_inputs(): stat_thresh2=dict(argstr='%.2f %.2f', position=10, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), transparency=dict(argstr='%s', position=1, diff --git a/nipype/interfaces/fsl/tests/test_auto_PRELUDE.py b/nipype/interfaces/fsl/tests/test_auto_PRELUDE.py index 38d8f7bdf3..dc5aaec0b5 100644 --- a/nipype/interfaces/fsl/tests/test_auto_PRELUDE.py +++ b/nipype/interfaces/fsl/tests/test_auto_PRELUDE.py @@ -52,7 +52,8 @@ def test_PRELUDE_inputs(): ), start=dict(argstr='--start=%d', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), threshold=dict(argstr='--thresh=%.10f', ), diff --git a/nipype/interfaces/fsl/tests/test_auto_PercentileImage.py b/nipype/interfaces/fsl/tests/test_auto_PercentileImage.py index 49f1ed3538..7d03bd778a 100644 --- a/nipype/interfaces/fsl/tests/test_auto_PercentileImage.py +++ b/nipype/interfaces/fsl/tests/test_auto_PercentileImage.py @@ -39,7 +39,8 @@ def test_PercentileImage_inputs(): position=5, usedefault=False, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = PercentileImage.input_spec() diff --git a/nipype/interfaces/fsl/tests/test_auto_PlotMotionParams.py b/nipype/interfaces/fsl/tests/test_auto_PlotMotionParams.py index 9dc7a30fd0..7a792847cf 100644 --- a/nipype/interfaces/fsl/tests/test_auto_PlotMotionParams.py +++ b/nipype/interfaces/fsl/tests/test_auto_PlotMotionParams.py @@ -28,7 +28,8 @@ def test_PlotMotionParams_inputs(): plot_type=dict(argstr='%s', mandatory=True, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = PlotMotionParams.input_spec() diff --git a/nipype/interfaces/fsl/tests/test_auto_PlotTimeSeries.py b/nipype/interfaces/fsl/tests/test_auto_PlotTimeSeries.py index 03467e1dcf..473332c4b3 100644 --- a/nipype/interfaces/fsl/tests/test_auto_PlotTimeSeries.py +++ b/nipype/interfaces/fsl/tests/test_auto_PlotTimeSeries.py @@ -38,7 +38,8 @@ def test_PlotTimeSeries_inputs(): ), sci_notation=dict(argstr='--sci', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), title=dict(argstr='%s', ), diff --git a/nipype/interfaces/fsl/tests/test_auto_PowerSpectrum.py b/nipype/interfaces/fsl/tests/test_auto_PowerSpectrum.py index 114feac427..451893ef41 100644 --- a/nipype/interfaces/fsl/tests/test_auto_PowerSpectrum.py +++ b/nipype/interfaces/fsl/tests/test_auto_PowerSpectrum.py @@ -22,7 +22,8 @@ def test_PowerSpectrum_inputs(): position=1, ), output_type=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = PowerSpectrum.input_spec() diff --git a/nipype/interfaces/fsl/tests/test_auto_PrepareFieldmap.py b/nipype/interfaces/fsl/tests/test_auto_PrepareFieldmap.py index 8400c376e6..7569e6622e 100644 --- a/nipype/interfaces/fsl/tests/test_auto_PrepareFieldmap.py +++ b/nipype/interfaces/fsl/tests/test_auto_PrepareFieldmap.py @@ -37,7 +37,8 @@ def test_PrepareFieldmap_inputs(): position=1, usedefault=True, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = PrepareFieldmap.input_spec() diff --git a/nipype/interfaces/fsl/tests/test_auto_ProbTrackX.py b/nipype/interfaces/fsl/tests/test_auto_ProbTrackX.py index d88ab0b0b9..ccfd85691c 100644 --- a/nipype/interfaces/fsl/tests/test_auto_ProbTrackX.py +++ b/nipype/interfaces/fsl/tests/test_auto_ProbTrackX.py @@ -83,7 +83,8 @@ def test_ProbTrackX_inputs(): ), target_masks=dict(argstr='--targetmasks=%s', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), thsamples=dict(mandatory=True, ), diff --git a/nipype/interfaces/fsl/tests/test_auto_ProbTrackX2.py b/nipype/interfaces/fsl/tests/test_auto_ProbTrackX2.py index 770eafe3cb..bbf42576a6 100644 --- a/nipype/interfaces/fsl/tests/test_auto_ProbTrackX2.py +++ b/nipype/interfaces/fsl/tests/test_auto_ProbTrackX2.py @@ -109,7 +109,8 @@ def test_ProbTrackX2_inputs(): ), target_masks=dict(argstr='--targetmasks=%s', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), thsamples=dict(mandatory=True, ), diff --git a/nipype/interfaces/fsl/tests/test_auto_ProjThresh.py b/nipype/interfaces/fsl/tests/test_auto_ProjThresh.py index 318e67c9d9..66a4509386 100644 --- a/nipype/interfaces/fsl/tests/test_auto_ProjThresh.py +++ b/nipype/interfaces/fsl/tests/test_auto_ProjThresh.py @@ -17,7 +17,8 @@ def test_ProjThresh_inputs(): position=0, ), output_type=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), threshold=dict(argstr='%d', mandatory=True, diff --git a/nipype/interfaces/fsl/tests/test_auto_Randomise.py b/nipype/interfaces/fsl/tests/test_auto_Randomise.py index 53e999893c..8483b92017 100644 --- a/nipype/interfaces/fsl/tests/test_auto_Randomise.py +++ b/nipype/interfaces/fsl/tests/test_auto_Randomise.py @@ -57,7 +57,8 @@ def test_Randomise_inputs(): tcon=dict(argstr='-t %s', position=3, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), tfce=dict(argstr='-T', ), diff --git a/nipype/interfaces/fsl/tests/test_auto_Reorient2Std.py b/nipype/interfaces/fsl/tests/test_auto_Reorient2Std.py index fd37a51ecb..1af9adf8eb 100644 --- a/nipype/interfaces/fsl/tests/test_auto_Reorient2Std.py +++ b/nipype/interfaces/fsl/tests/test_auto_Reorient2Std.py @@ -20,7 +20,8 @@ def test_Reorient2Std_inputs(): hash_files=False, ), output_type=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = Reorient2Std.input_spec() diff --git a/nipype/interfaces/fsl/tests/test_auto_RobustFOV.py b/nipype/interfaces/fsl/tests/test_auto_RobustFOV.py index 26d3c45c6f..392611182b 100644 --- a/nipype/interfaces/fsl/tests/test_auto_RobustFOV.py +++ b/nipype/interfaces/fsl/tests/test_auto_RobustFOV.py @@ -29,7 +29,8 @@ def test_RobustFOV_inputs(): name_template='%s_to_ROI', ), output_type=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = RobustFOV.input_spec() diff --git a/nipype/interfaces/fsl/tests/test_auto_SMM.py b/nipype/interfaces/fsl/tests/test_auto_SMM.py index 301a5fdd47..53a4087ec7 100644 --- a/nipype/interfaces/fsl/tests/test_auto_SMM.py +++ b/nipype/interfaces/fsl/tests/test_auto_SMM.py @@ -26,7 +26,8 @@ def test_SMM_inputs(): mandatory=True, position=0, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = SMM.input_spec() diff --git a/nipype/interfaces/fsl/tests/test_auto_SUSAN.py b/nipype/interfaces/fsl/tests/test_auto_SUSAN.py index bdaba2cad6..b97ecbf28d 100644 --- a/nipype/interfaces/fsl/tests/test_auto_SUSAN.py +++ b/nipype/interfaces/fsl/tests/test_auto_SUSAN.py @@ -34,7 +34,8 @@ def test_SUSAN_inputs(): position=-1, ), output_type=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), usans=dict(argstr='', position=6, diff --git a/nipype/interfaces/fsl/tests/test_auto_SigLoss.py b/nipype/interfaces/fsl/tests/test_auto_SigLoss.py index c2b645b540..3a013c2974 100644 --- a/nipype/interfaces/fsl/tests/test_auto_SigLoss.py +++ b/nipype/interfaces/fsl/tests/test_auto_SigLoss.py @@ -25,7 +25,8 @@ def test_SigLoss_inputs(): output_type=dict(), slice_direction=dict(argstr='-d %s', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = SigLoss.input_spec() diff --git a/nipype/interfaces/fsl/tests/test_auto_SliceTimer.py b/nipype/interfaces/fsl/tests/test_auto_SliceTimer.py index 681e9157b2..f3007825a4 100644 --- a/nipype/interfaces/fsl/tests/test_auto_SliceTimer.py +++ b/nipype/interfaces/fsl/tests/test_auto_SliceTimer.py @@ -33,7 +33,8 @@ def test_SliceTimer_inputs(): output_type=dict(), slice_direction=dict(argstr='--direction=%d', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), time_repetition=dict(argstr='--repeat=%f', ), diff --git a/nipype/interfaces/fsl/tests/test_auto_Slicer.py b/nipype/interfaces/fsl/tests/test_auto_Slicer.py index d00aeafbaf..224d9447ed 100644 --- a/nipype/interfaces/fsl/tests/test_auto_Slicer.py +++ b/nipype/interfaces/fsl/tests/test_auto_Slicer.py @@ -73,7 +73,8 @@ def test_Slicer_inputs(): slice_number=dict(argstr='-%d', position=11, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), threshold_edges=dict(argstr='-e %.3f', position=6, diff --git a/nipype/interfaces/fsl/tests/test_auto_Smooth.py b/nipype/interfaces/fsl/tests/test_auto_Smooth.py index af09615294..503282ea4a 100644 --- a/nipype/interfaces/fsl/tests/test_auto_Smooth.py +++ b/nipype/interfaces/fsl/tests/test_auto_Smooth.py @@ -33,7 +33,8 @@ def test_Smooth_inputs(): name_template='%s_smooth', position=2, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = Smooth.input_spec() diff --git a/nipype/interfaces/fsl/tests/test_auto_SmoothEstimate.py b/nipype/interfaces/fsl/tests/test_auto_SmoothEstimate.py index 066af89a60..bcc090fed1 100644 --- a/nipype/interfaces/fsl/tests/test_auto_SmoothEstimate.py +++ b/nipype/interfaces/fsl/tests/test_auto_SmoothEstimate.py @@ -23,7 +23,8 @@ def test_SmoothEstimate_inputs(): residual_fit_file=dict(argstr='--res=%s', requires=['dof'], ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), zstat_file=dict(argstr='--zstat=%s', xor=['dof'], diff --git a/nipype/interfaces/fsl/tests/test_auto_SpatialFilter.py b/nipype/interfaces/fsl/tests/test_auto_SpatialFilter.py index 949254bdcc..0457a50c2e 100644 --- a/nipype/interfaces/fsl/tests/test_auto_SpatialFilter.py +++ b/nipype/interfaces/fsl/tests/test_auto_SpatialFilter.py @@ -46,7 +46,8 @@ def test_SpatialFilter_inputs(): position=-1, ), output_type=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = SpatialFilter.input_spec() diff --git a/nipype/interfaces/fsl/tests/test_auto_Split.py b/nipype/interfaces/fsl/tests/test_auto_Split.py index 7eb80a9f12..a95770b9ee 100644 --- a/nipype/interfaces/fsl/tests/test_auto_Split.py +++ b/nipype/interfaces/fsl/tests/test_auto_Split.py @@ -24,7 +24,8 @@ def test_Split_inputs(): position=1, ), output_type=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = Split.input_spec() diff --git a/nipype/interfaces/fsl/tests/test_auto_StdImage.py b/nipype/interfaces/fsl/tests/test_auto_StdImage.py index 5fd80d2dc0..88eea8a627 100644 --- a/nipype/interfaces/fsl/tests/test_auto_StdImage.py +++ b/nipype/interfaces/fsl/tests/test_auto_StdImage.py @@ -35,7 +35,8 @@ def test_StdImage_inputs(): position=-1, ), output_type=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = StdImage.input_spec() diff --git a/nipype/interfaces/fsl/tests/test_auto_SwapDimensions.py b/nipype/interfaces/fsl/tests/test_auto_SwapDimensions.py index 1fe20d3351..710c3baa39 100644 --- a/nipype/interfaces/fsl/tests/test_auto_SwapDimensions.py +++ b/nipype/interfaces/fsl/tests/test_auto_SwapDimensions.py @@ -24,7 +24,8 @@ def test_SwapDimensions_inputs(): hash_files=False, ), output_type=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = SwapDimensions.input_spec() diff --git a/nipype/interfaces/fsl/tests/test_auto_TOPUP.py b/nipype/interfaces/fsl/tests/test_auto_TOPUP.py index 8223b5dac4..2f55bf893e 100644 --- a/nipype/interfaces/fsl/tests/test_auto_TOPUP.py +++ b/nipype/interfaces/fsl/tests/test_auto_TOPUP.py @@ -91,7 +91,8 @@ def test_TOPUP_inputs(): ), subsamp=dict(argstr='--subsamp=%d', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), warp_res=dict(argstr='--warpres=%f', ), diff --git a/nipype/interfaces/fsl/tests/test_auto_TemporalFilter.py b/nipype/interfaces/fsl/tests/test_auto_TemporalFilter.py index f5a4f5835a..230ffcba78 100644 --- a/nipype/interfaces/fsl/tests/test_auto_TemporalFilter.py +++ b/nipype/interfaces/fsl/tests/test_auto_TemporalFilter.py @@ -39,7 +39,8 @@ def test_TemporalFilter_inputs(): position=-1, ), output_type=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = TemporalFilter.input_spec() diff --git a/nipype/interfaces/fsl/tests/test_auto_Threshold.py b/nipype/interfaces/fsl/tests/test_auto_Threshold.py index bd56d6270b..8e284d67b0 100644 --- a/nipype/interfaces/fsl/tests/test_auto_Threshold.py +++ b/nipype/interfaces/fsl/tests/test_auto_Threshold.py @@ -33,7 +33,8 @@ def test_Threshold_inputs(): position=-1, ), output_type=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), thresh=dict(argstr='%s', mandatory=True, diff --git a/nipype/interfaces/fsl/tests/test_auto_TractSkeleton.py b/nipype/interfaces/fsl/tests/test_auto_TractSkeleton.py index 360a5b9b57..d578bdea8e 100644 --- a/nipype/interfaces/fsl/tests/test_auto_TractSkeleton.py +++ b/nipype/interfaces/fsl/tests/test_auto_TractSkeleton.py @@ -30,7 +30,8 @@ def test_TractSkeleton_inputs(): ), skeleton_file=dict(argstr='-o %s', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), threshold=dict(), use_cingulum_mask=dict(usedefault=True, diff --git a/nipype/interfaces/fsl/tests/test_auto_Training.py b/nipype/interfaces/fsl/tests/test_auto_Training.py index c5b1f12874..6ea6042c80 100644 --- a/nipype/interfaces/fsl/tests/test_auto_Training.py +++ b/nipype/interfaces/fsl/tests/test_auto_Training.py @@ -19,7 +19,8 @@ def test_Training_inputs(): copyfile=False, position=-1, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), trained_wts_filestem=dict(argstr='%s', position=1, diff --git a/nipype/interfaces/fsl/tests/test_auto_UnaryMaths.py b/nipype/interfaces/fsl/tests/test_auto_UnaryMaths.py index 9ac8a42d7f..4132931d57 100644 --- a/nipype/interfaces/fsl/tests/test_auto_UnaryMaths.py +++ b/nipype/interfaces/fsl/tests/test_auto_UnaryMaths.py @@ -35,7 +35,8 @@ def test_UnaryMaths_inputs(): position=-1, ), output_type=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = UnaryMaths.input_spec() diff --git a/nipype/interfaces/fsl/tests/test_auto_VecReg.py b/nipype/interfaces/fsl/tests/test_auto_VecReg.py index 9ea57c1677..48795b253a 100644 --- a/nipype/interfaces/fsl/tests/test_auto_VecReg.py +++ b/nipype/interfaces/fsl/tests/test_auto_VecReg.py @@ -35,7 +35,8 @@ def test_VecReg_inputs(): ), rotation_warp=dict(argstr='--rotwarp=%s', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), warp_field=dict(argstr='-w %s', ), diff --git a/nipype/interfaces/fsl/tests/test_auto_WarpPoints.py b/nipype/interfaces/fsl/tests/test_auto_WarpPoints.py index 3c5e999c51..738192f1b7 100644 --- a/nipype/interfaces/fsl/tests/test_auto_WarpPoints.py +++ b/nipype/interfaces/fsl/tests/test_auto_WarpPoints.py @@ -32,7 +32,8 @@ def test_WarpPoints_inputs(): src_file=dict(argstr='-src %s', mandatory=True, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), warp_file=dict(argstr='-warp %s', xor=['xfm_file'], diff --git a/nipype/interfaces/fsl/tests/test_auto_WarpPointsToStd.py b/nipype/interfaces/fsl/tests/test_auto_WarpPointsToStd.py index aa9d63ceca..23605bfeaf 100644 --- a/nipype/interfaces/fsl/tests/test_auto_WarpPointsToStd.py +++ b/nipype/interfaces/fsl/tests/test_auto_WarpPointsToStd.py @@ -34,7 +34,8 @@ def test_WarpPointsToStd_inputs(): std_file=dict(argstr='-std %s', mandatory=True, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), warp_file=dict(argstr='-warp %s', xor=['xfm_file'], diff --git a/nipype/interfaces/fsl/tests/test_auto_WarpUtils.py b/nipype/interfaces/fsl/tests/test_auto_WarpUtils.py index a32d067588..b879eb0e07 100644 --- a/nipype/interfaces/fsl/tests/test_auto_WarpUtils.py +++ b/nipype/interfaces/fsl/tests/test_auto_WarpUtils.py @@ -30,7 +30,8 @@ def test_WarpUtils_inputs(): reference=dict(argstr='--ref=%s', mandatory=True, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), warp_resolution=dict(argstr='--warpres=%0.4f,%0.4f,%0.4f', ), diff --git a/nipype/interfaces/fsl/tests/test_auto_XFibres5.py b/nipype/interfaces/fsl/tests/test_auto_XFibres5.py index 6a3022ed2d..5359c49d8d 100644 --- a/nipype/interfaces/fsl/tests/test_auto_XFibres5.py +++ b/nipype/interfaces/fsl/tests/test_auto_XFibres5.py @@ -74,7 +74,8 @@ def test_XFibres5_inputs(): ), seed=dict(argstr='--seed=%d', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), update_proposal_every=dict(argstr='--updateproposalevery=%d', ), diff --git a/nipype/interfaces/minc/tests/test_auto_Average.py b/nipype/interfaces/minc/tests/test_auto_Average.py index 5b9f60d0d3..c903c88cfc 100644 --- a/nipype/interfaces/minc/tests/test_auto_Average.py +++ b/nipype/interfaces/minc/tests/test_auto_Average.py @@ -94,7 +94,8 @@ def test_Average_inputs(): ), sdfile=dict(argstr='-sdfile %s', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), two=dict(argstr='-2', ), diff --git a/nipype/interfaces/minc/tests/test_auto_BBox.py b/nipype/interfaces/minc/tests/test_auto_BBox.py index 3ef4392a2c..e57492702c 100644 --- a/nipype/interfaces/minc/tests/test_auto_BBox.py +++ b/nipype/interfaces/minc/tests/test_auto_BBox.py @@ -35,7 +35,8 @@ def test_BBox_inputs(): name_template='%s_bbox.txt', position=-1, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), threshold=dict(argstr='-threshold', ), diff --git a/nipype/interfaces/minc/tests/test_auto_Beast.py b/nipype/interfaces/minc/tests/test_auto_Beast.py index 10a804e98f..642bd6f6ea 100644 --- a/nipype/interfaces/minc/tests/test_auto_Beast.py +++ b/nipype/interfaces/minc/tests/test_auto_Beast.py @@ -58,7 +58,8 @@ def test_Beast_inputs(): ), smoothness_factor_beta=dict(argstr='-beta %s', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), threshold_patch_selection=dict(argstr='-threshold %s', ), diff --git a/nipype/interfaces/minc/tests/test_auto_BestLinReg.py b/nipype/interfaces/minc/tests/test_auto_BestLinReg.py index 0bec968390..f8d670a9da 100644 --- a/nipype/interfaces/minc/tests/test_auto_BestLinReg.py +++ b/nipype/interfaces/minc/tests/test_auto_BestLinReg.py @@ -39,7 +39,8 @@ def test_BestLinReg_inputs(): mandatory=True, position=-3, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), verbose=dict(argstr='-verbose', ), diff --git a/nipype/interfaces/minc/tests/test_auto_BigAverage.py b/nipype/interfaces/minc/tests/test_auto_BigAverage.py index 1fc965370c..ee21ea0e32 100644 --- a/nipype/interfaces/minc/tests/test_auto_BigAverage.py +++ b/nipype/interfaces/minc/tests/test_auto_BigAverage.py @@ -36,7 +36,8 @@ def test_BigAverage_inputs(): name_source=['input_files'], name_template='%s_bigaverage_stdev.mnc', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), tmpdir=dict(argstr='-tmpdir %s', ), diff --git a/nipype/interfaces/minc/tests/test_auto_Blob.py b/nipype/interfaces/minc/tests/test_auto_Blob.py index 0f87d37bb2..8ae597fdc5 100644 --- a/nipype/interfaces/minc/tests/test_auto_Blob.py +++ b/nipype/interfaces/minc/tests/test_auto_Blob.py @@ -27,7 +27,8 @@ def test_Blob_inputs(): name_template='%s_blob.mnc', position=-1, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), trace=dict(argstr='-trace', ), diff --git a/nipype/interfaces/minc/tests/test_auto_Blur.py b/nipype/interfaces/minc/tests/test_auto_Blur.py index 77342e4f9d..95aeaef0af 100644 --- a/nipype/interfaces/minc/tests/test_auto_Blur.py +++ b/nipype/interfaces/minc/tests/test_auto_Blur.py @@ -48,7 +48,8 @@ def test_Blur_inputs(): mandatory=True, xor=('fwhm', 'fwhm3d', 'standard_dev'), ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = Blur.input_spec() diff --git a/nipype/interfaces/minc/tests/test_auto_Calc.py b/nipype/interfaces/minc/tests/test_auto_Calc.py index 6ac13c47b1..860b41a06a 100644 --- a/nipype/interfaces/minc/tests/test_auto_Calc.py +++ b/nipype/interfaces/minc/tests/test_auto_Calc.py @@ -103,7 +103,8 @@ def test_Calc_inputs(): quiet=dict(argstr='-quiet', xor=('verbose', 'quiet'), ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), two=dict(argstr='-2', ), diff --git a/nipype/interfaces/minc/tests/test_auto_Convert.py b/nipype/interfaces/minc/tests/test_auto_Convert.py index 10bbdad6a6..97ab313ffb 100644 --- a/nipype/interfaces/minc/tests/test_auto_Convert.py +++ b/nipype/interfaces/minc/tests/test_auto_Convert.py @@ -33,7 +33,8 @@ def test_Convert_inputs(): ), template=dict(argstr='-template', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), two=dict(argstr='-2', ), diff --git a/nipype/interfaces/minc/tests/test_auto_Copy.py b/nipype/interfaces/minc/tests/test_auto_Copy.py index 62fa8b7470..6923ee0639 100644 --- a/nipype/interfaces/minc/tests/test_auto_Copy.py +++ b/nipype/interfaces/minc/tests/test_auto_Copy.py @@ -29,7 +29,8 @@ def test_Copy_inputs(): real_values=dict(argstr='-real_values', xor=('pixel_values', 'real_values'), ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = Copy.input_spec() diff --git a/nipype/interfaces/minc/tests/test_auto_Dump.py b/nipype/interfaces/minc/tests/test_auto_Dump.py index 07e183e009..7066fe56c7 100644 --- a/nipype/interfaces/minc/tests/test_auto_Dump.py +++ b/nipype/interfaces/minc/tests/test_auto_Dump.py @@ -45,7 +45,8 @@ def test_Dump_inputs(): ), precision=dict(argstr='%s', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), variables=dict(argstr='-v %s', sep=',', diff --git a/nipype/interfaces/minc/tests/test_auto_Extract.py b/nipype/interfaces/minc/tests/test_auto_Extract.py index f4fb2c6e2b..feb6f338cb 100644 --- a/nipype/interfaces/minc/tests/test_auto_Extract.py +++ b/nipype/interfaces/minc/tests/test_auto_Extract.py @@ -80,7 +80,8 @@ def test_Extract_inputs(): start=dict(argstr='-start %s', sep=',', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), write_ascii=dict(argstr='-ascii', xor=('write_ascii', 'write_ascii', 'write_byte', 'write_short', 'write_int', 'write_long', 'write_float', 'write_double', 'write_signed', 'write_unsigned'), diff --git a/nipype/interfaces/minc/tests/test_auto_Gennlxfm.py b/nipype/interfaces/minc/tests/test_auto_Gennlxfm.py index 77ffe4d114..0e2720037a 100644 --- a/nipype/interfaces/minc/tests/test_auto_Gennlxfm.py +++ b/nipype/interfaces/minc/tests/test_auto_Gennlxfm.py @@ -28,7 +28,8 @@ def test_Gennlxfm_inputs(): ), step=dict(argstr='-step %s', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), verbose=dict(argstr='-verbose', ), diff --git a/nipype/interfaces/minc/tests/test_auto_Math.py b/nipype/interfaces/minc/tests/test_auto_Math.py index b12e3cd60a..60a289f391 100644 --- a/nipype/interfaces/minc/tests/test_auto_Math.py +++ b/nipype/interfaces/minc/tests/test_auto_Math.py @@ -134,7 +134,8 @@ def test_Math_inputs(): ), square=dict(argstr='-square', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), test_eq=dict(argstr='-eq', ), diff --git a/nipype/interfaces/minc/tests/test_auto_NlpFit.py b/nipype/interfaces/minc/tests/test_auto_NlpFit.py index a30e856276..bfd7586dba 100644 --- a/nipype/interfaces/minc/tests/test_auto_NlpFit.py +++ b/nipype/interfaces/minc/tests/test_auto_NlpFit.py @@ -37,7 +37,8 @@ def test_NlpFit_inputs(): mandatory=True, position=-2, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), verbose=dict(argstr='-verbose', ), diff --git a/nipype/interfaces/minc/tests/test_auto_Norm.py b/nipype/interfaces/minc/tests/test_auto_Norm.py index 410309a364..2d45f249af 100644 --- a/nipype/interfaces/minc/tests/test_auto_Norm.py +++ b/nipype/interfaces/minc/tests/test_auto_Norm.py @@ -44,7 +44,8 @@ def test_Norm_inputs(): name_source=['input_file'], name_template='%s_norm_threshold_mask.mnc', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), threshold=dict(argstr='-threshold', ), diff --git a/nipype/interfaces/minc/tests/test_auto_Pik.py b/nipype/interfaces/minc/tests/test_auto_Pik.py index b3f5e6cf78..1a15c2bb01 100644 --- a/nipype/interfaces/minc/tests/test_auto_Pik.py +++ b/nipype/interfaces/minc/tests/test_auto_Pik.py @@ -65,7 +65,8 @@ def test_Pik_inputs(): ), start=dict(argstr='--slice %s', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), tile_size=dict(argstr='--tilesize %s', ), diff --git a/nipype/interfaces/minc/tests/test_auto_Resample.py b/nipype/interfaces/minc/tests/test_auto_Resample.py index dd3e788557..1ed905fadb 100644 --- a/nipype/interfaces/minc/tests/test_auto_Resample.py +++ b/nipype/interfaces/minc/tests/test_auto_Resample.py @@ -118,7 +118,8 @@ def test_Resample_inputs(): ), talairach=dict(argstr='-talairach', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), transformation=dict(argstr='-transformation %s', ), diff --git a/nipype/interfaces/minc/tests/test_auto_Reshape.py b/nipype/interfaces/minc/tests/test_auto_Reshape.py index 11ee473e78..b55b2e896d 100644 --- a/nipype/interfaces/minc/tests/test_auto_Reshape.py +++ b/nipype/interfaces/minc/tests/test_auto_Reshape.py @@ -26,7 +26,8 @@ def test_Reshape_inputs(): name_template='%s_reshape.mnc', position=-1, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), verbose=dict(argstr='-verbose', ), diff --git a/nipype/interfaces/minc/tests/test_auto_ToEcat.py b/nipype/interfaces/minc/tests/test_auto_ToEcat.py index dea6132cdf..236bc4d9a7 100644 --- a/nipype/interfaces/minc/tests/test_auto_ToEcat.py +++ b/nipype/interfaces/minc/tests/test_auto_ToEcat.py @@ -38,7 +38,8 @@ def test_ToEcat_inputs(): name_template='%s_to_ecat.v', position=-1, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), voxels_as_integers=dict(argstr='-label', ), diff --git a/nipype/interfaces/minc/tests/test_auto_ToRaw.py b/nipype/interfaces/minc/tests/test_auto_ToRaw.py index d92ee7322b..d231faa8d6 100644 --- a/nipype/interfaces/minc/tests/test_auto_ToRaw.py +++ b/nipype/interfaces/minc/tests/test_auto_ToRaw.py @@ -32,7 +32,8 @@ def test_ToRaw_inputs(): name_template='%s.raw', position=-1, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), write_byte=dict(argstr='-byte', xor=('write_byte', 'write_short', 'write_int', 'write_long', 'write_float', 'write_double'), diff --git a/nipype/interfaces/minc/tests/test_auto_VolSymm.py b/nipype/interfaces/minc/tests/test_auto_VolSymm.py index cf0550b1b1..f6a56d153a 100644 --- a/nipype/interfaces/minc/tests/test_auto_VolSymm.py +++ b/nipype/interfaces/minc/tests/test_auto_VolSymm.py @@ -35,7 +35,8 @@ def test_VolSymm_inputs(): name_template='%s_vol_symm.mnc', position=-1, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), trans_file=dict(argstr='%s', genfile=True, diff --git a/nipype/interfaces/minc/tests/test_auto_Volcentre.py b/nipype/interfaces/minc/tests/test_auto_Volcentre.py index 89bd7bda04..c8793ff79a 100644 --- a/nipype/interfaces/minc/tests/test_auto_Volcentre.py +++ b/nipype/interfaces/minc/tests/test_auto_Volcentre.py @@ -30,7 +30,8 @@ def test_Volcentre_inputs(): name_template='%s_volcentre.mnc', position=-1, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), verbose=dict(argstr='-verbose', ), diff --git a/nipype/interfaces/minc/tests/test_auto_Voliso.py b/nipype/interfaces/minc/tests/test_auto_Voliso.py index 74efb575c1..89edd67d00 100644 --- a/nipype/interfaces/minc/tests/test_auto_Voliso.py +++ b/nipype/interfaces/minc/tests/test_auto_Voliso.py @@ -32,7 +32,8 @@ def test_Voliso_inputs(): name_template='%s_voliso.mnc', position=-1, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), verbose=dict(argstr='--verbose', ), diff --git a/nipype/interfaces/minc/tests/test_auto_Volpad.py b/nipype/interfaces/minc/tests/test_auto_Volpad.py index 063db70230..96709fe710 100644 --- a/nipype/interfaces/minc/tests/test_auto_Volpad.py +++ b/nipype/interfaces/minc/tests/test_auto_Volpad.py @@ -36,7 +36,8 @@ def test_Volpad_inputs(): ), smooth_distance=dict(argstr='-smooth_distance %s', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), verbose=dict(argstr='-verbose', ), diff --git a/nipype/interfaces/minc/tests/test_auto_XfmAvg.py b/nipype/interfaces/minc/tests/test_auto_XfmAvg.py index e90331196f..db63ccda08 100644 --- a/nipype/interfaces/minc/tests/test_auto_XfmAvg.py +++ b/nipype/interfaces/minc/tests/test_auto_XfmAvg.py @@ -33,7 +33,8 @@ def test_XfmAvg_inputs(): genfile=True, position=-1, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), verbose=dict(argstr='-verbose', ), diff --git a/nipype/interfaces/minc/tests/test_auto_XfmConcat.py b/nipype/interfaces/minc/tests/test_auto_XfmConcat.py index 1e7702b92e..3859b91538 100644 --- a/nipype/interfaces/minc/tests/test_auto_XfmConcat.py +++ b/nipype/interfaces/minc/tests/test_auto_XfmConcat.py @@ -28,7 +28,8 @@ def test_XfmConcat_inputs(): name_template='%s_xfmconcat.xfm', position=-1, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), verbose=dict(argstr='-verbose', ), diff --git a/nipype/interfaces/minc/tests/test_auto_XfmInvert.py b/nipype/interfaces/minc/tests/test_auto_XfmInvert.py index 2ee570e7fe..ee56dfb262 100644 --- a/nipype/interfaces/minc/tests/test_auto_XfmInvert.py +++ b/nipype/interfaces/minc/tests/test_auto_XfmInvert.py @@ -23,7 +23,8 @@ def test_XfmInvert_inputs(): genfile=True, position=-1, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), verbose=dict(argstr='-verbose', ), diff --git a/nipype/interfaces/mipav/tests/test_auto_JistBrainMgdmSegmentation.py b/nipype/interfaces/mipav/tests/test_auto_JistBrainMgdmSegmentation.py index 7aa5289887..c82e9b867b 100644 --- a/nipype/interfaces/mipav/tests/test_auto_JistBrainMgdmSegmentation.py +++ b/nipype/interfaces/mipav/tests/test_auto_JistBrainMgdmSegmentation.py @@ -58,7 +58,8 @@ def test_JistBrainMgdmSegmentation_inputs(): outSegmented=dict(argstr='--outSegmented %s', hash_files=False, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), xDefaultMem=dict(argstr='-xDefaultMem %d', ), diff --git a/nipype/interfaces/mipav/tests/test_auto_JistBrainMp2rageDuraEstimation.py b/nipype/interfaces/mipav/tests/test_auto_JistBrainMp2rageDuraEstimation.py index dae7e339d7..7d45f19c81 100644 --- a/nipype/interfaces/mipav/tests/test_auto_JistBrainMp2rageDuraEstimation.py +++ b/nipype/interfaces/mipav/tests/test_auto_JistBrainMp2rageDuraEstimation.py @@ -25,7 +25,8 @@ def test_JistBrainMp2rageDuraEstimation_inputs(): outDura=dict(argstr='--outDura %s', hash_files=False, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), xDefaultMem=dict(argstr='-xDefaultMem %d', ), diff --git a/nipype/interfaces/mipav/tests/test_auto_JistBrainMp2rageSkullStripping.py b/nipype/interfaces/mipav/tests/test_auto_JistBrainMp2rageSkullStripping.py index 077ec1f574..ac2f9cfbb2 100644 --- a/nipype/interfaces/mipav/tests/test_auto_JistBrainMp2rageSkullStripping.py +++ b/nipype/interfaces/mipav/tests/test_auto_JistBrainMp2rageSkullStripping.py @@ -36,7 +36,8 @@ def test_JistBrainMp2rageSkullStripping_inputs(): outMasked3=dict(argstr='--outMasked3 %s', hash_files=False, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), xDefaultMem=dict(argstr='-xDefaultMem %d', ), diff --git a/nipype/interfaces/mipav/tests/test_auto_JistBrainPartialVolumeFilter.py b/nipype/interfaces/mipav/tests/test_auto_JistBrainPartialVolumeFilter.py index 10e55ce20e..281751d399 100644 --- a/nipype/interfaces/mipav/tests/test_auto_JistBrainPartialVolumeFilter.py +++ b/nipype/interfaces/mipav/tests/test_auto_JistBrainPartialVolumeFilter.py @@ -23,7 +23,8 @@ def test_JistBrainPartialVolumeFilter_inputs(): outPartial=dict(argstr='--outPartial %s', hash_files=False, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), xDefaultMem=dict(argstr='-xDefaultMem %d', ), diff --git a/nipype/interfaces/mipav/tests/test_auto_JistCortexSurfaceMeshInflation.py b/nipype/interfaces/mipav/tests/test_auto_JistCortexSurfaceMeshInflation.py index 1fef3cc678..baa2a6c77e 100644 --- a/nipype/interfaces/mipav/tests/test_auto_JistCortexSurfaceMeshInflation.py +++ b/nipype/interfaces/mipav/tests/test_auto_JistCortexSurfaceMeshInflation.py @@ -34,7 +34,8 @@ def test_JistCortexSurfaceMeshInflation_inputs(): outOriginal=dict(argstr='--outOriginal %s', hash_files=False, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), xDefaultMem=dict(argstr='-xDefaultMem %d', ), diff --git a/nipype/interfaces/mipav/tests/test_auto_JistIntensityMp2rageMasking.py b/nipype/interfaces/mipav/tests/test_auto_JistIntensityMp2rageMasking.py index 0fd3ed52e4..86b4732d95 100644 --- a/nipype/interfaces/mipav/tests/test_auto_JistIntensityMp2rageMasking.py +++ b/nipype/interfaces/mipav/tests/test_auto_JistIntensityMp2rageMasking.py @@ -38,7 +38,8 @@ def test_JistIntensityMp2rageMasking_inputs(): outSignal2=dict(argstr='--outSignal_Mask %s', hash_files=False, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), xDefaultMem=dict(argstr='-xDefaultMem %d', ), diff --git a/nipype/interfaces/mipav/tests/test_auto_JistLaminarProfileCalculator.py b/nipype/interfaces/mipav/tests/test_auto_JistLaminarProfileCalculator.py index 54c3909e85..307b905f92 100644 --- a/nipype/interfaces/mipav/tests/test_auto_JistLaminarProfileCalculator.py +++ b/nipype/interfaces/mipav/tests/test_auto_JistLaminarProfileCalculator.py @@ -23,7 +23,8 @@ def test_JistLaminarProfileCalculator_inputs(): outResult=dict(argstr='--outResult %s', hash_files=False, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), xDefaultMem=dict(argstr='-xDefaultMem %d', ), diff --git a/nipype/interfaces/mipav/tests/test_auto_JistLaminarProfileGeometry.py b/nipype/interfaces/mipav/tests/test_auto_JistLaminarProfileGeometry.py index 34b8b80569..fa1c272e34 100644 --- a/nipype/interfaces/mipav/tests/test_auto_JistLaminarProfileGeometry.py +++ b/nipype/interfaces/mipav/tests/test_auto_JistLaminarProfileGeometry.py @@ -27,7 +27,8 @@ def test_JistLaminarProfileGeometry_inputs(): outResult=dict(argstr='--outResult %s', hash_files=False, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), xDefaultMem=dict(argstr='-xDefaultMem %d', ), diff --git a/nipype/interfaces/mipav/tests/test_auto_JistLaminarProfileSampling.py b/nipype/interfaces/mipav/tests/test_auto_JistLaminarProfileSampling.py index cc2b743f3e..f140358400 100644 --- a/nipype/interfaces/mipav/tests/test_auto_JistLaminarProfileSampling.py +++ b/nipype/interfaces/mipav/tests/test_auto_JistLaminarProfileSampling.py @@ -26,7 +26,8 @@ def test_JistLaminarProfileSampling_inputs(): outProfilemapped=dict(argstr='--outProfilemapped %s', hash_files=False, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), xDefaultMem=dict(argstr='-xDefaultMem %d', ), diff --git a/nipype/interfaces/mipav/tests/test_auto_JistLaminarROIAveraging.py b/nipype/interfaces/mipav/tests/test_auto_JistLaminarROIAveraging.py index e51df02dc1..a369b28b2c 100644 --- a/nipype/interfaces/mipav/tests/test_auto_JistLaminarROIAveraging.py +++ b/nipype/interfaces/mipav/tests/test_auto_JistLaminarROIAveraging.py @@ -25,7 +25,8 @@ def test_JistLaminarROIAveraging_inputs(): outROI3=dict(argstr='--outROI3 %s', hash_files=False, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), xDefaultMem=dict(argstr='-xDefaultMem %d', ), diff --git a/nipype/interfaces/mipav/tests/test_auto_JistLaminarVolumetricLayering.py b/nipype/interfaces/mipav/tests/test_auto_JistLaminarVolumetricLayering.py index 562e5846d0..9f5971c25f 100644 --- a/nipype/interfaces/mipav/tests/test_auto_JistLaminarVolumetricLayering.py +++ b/nipype/interfaces/mipav/tests/test_auto_JistLaminarVolumetricLayering.py @@ -45,7 +45,8 @@ def test_JistLaminarVolumetricLayering_inputs(): outLayer=dict(argstr='--outLayer %s', hash_files=False, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), xDefaultMem=dict(argstr='-xDefaultMem %d', ), diff --git a/nipype/interfaces/mipav/tests/test_auto_MedicAlgorithmImageCalculator.py b/nipype/interfaces/mipav/tests/test_auto_MedicAlgorithmImageCalculator.py index 8254b959fd..032c318472 100644 --- a/nipype/interfaces/mipav/tests/test_auto_MedicAlgorithmImageCalculator.py +++ b/nipype/interfaces/mipav/tests/test_auto_MedicAlgorithmImageCalculator.py @@ -23,7 +23,8 @@ def test_MedicAlgorithmImageCalculator_inputs(): outResult=dict(argstr='--outResult %s', hash_files=False, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), xDefaultMem=dict(argstr='-xDefaultMem %d', ), diff --git a/nipype/interfaces/mipav/tests/test_auto_MedicAlgorithmLesionToads.py b/nipype/interfaces/mipav/tests/test_auto_MedicAlgorithmLesionToads.py index 328072d54d..d97d670b7a 100644 --- a/nipype/interfaces/mipav/tests/test_auto_MedicAlgorithmLesionToads.py +++ b/nipype/interfaces/mipav/tests/test_auto_MedicAlgorithmLesionToads.py @@ -83,7 +83,8 @@ def test_MedicAlgorithmLesionToads_inputs(): outWM=dict(argstr='--outWM %s', hash_files=False, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), xDefaultMem=dict(argstr='-xDefaultMem %d', ), diff --git a/nipype/interfaces/mipav/tests/test_auto_MedicAlgorithmMipavReorient.py b/nipype/interfaces/mipav/tests/test_auto_MedicAlgorithmMipavReorient.py index 9422fda7ac..dac7501343 100644 --- a/nipype/interfaces/mipav/tests/test_auto_MedicAlgorithmMipavReorient.py +++ b/nipype/interfaces/mipav/tests/test_auto_MedicAlgorithmMipavReorient.py @@ -36,7 +36,8 @@ def test_MedicAlgorithmMipavReorient_inputs(): outReoriented=dict(argstr='--outReoriented %s', sep=';', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), xDefaultMem=dict(argstr='-xDefaultMem %d', ), diff --git a/nipype/interfaces/mipav/tests/test_auto_MedicAlgorithmN3.py b/nipype/interfaces/mipav/tests/test_auto_MedicAlgorithmN3.py index cbe6f4e2d5..279e53416f 100644 --- a/nipype/interfaces/mipav/tests/test_auto_MedicAlgorithmN3.py +++ b/nipype/interfaces/mipav/tests/test_auto_MedicAlgorithmN3.py @@ -38,7 +38,8 @@ def test_MedicAlgorithmN3_inputs(): outInhomogeneity2=dict(argstr='--outInhomogeneity2 %s', hash_files=False, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), xDefaultMem=dict(argstr='-xDefaultMem %d', ), diff --git a/nipype/interfaces/mipav/tests/test_auto_MedicAlgorithmSPECTRE2010.py b/nipype/interfaces/mipav/tests/test_auto_MedicAlgorithmSPECTRE2010.py index c273c2f223..c7a3e1bfcc 100644 --- a/nipype/interfaces/mipav/tests/test_auto_MedicAlgorithmSPECTRE2010.py +++ b/nipype/interfaces/mipav/tests/test_auto_MedicAlgorithmSPECTRE2010.py @@ -109,7 +109,8 @@ def test_MedicAlgorithmSPECTRE2010_inputs(): outd0=dict(argstr='--outd0 %s', hash_files=False, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), xDefaultMem=dict(argstr='-xDefaultMem %d', ), diff --git a/nipype/interfaces/mipav/tests/test_auto_MedicAlgorithmThresholdToBinaryMask.py b/nipype/interfaces/mipav/tests/test_auto_MedicAlgorithmThresholdToBinaryMask.py index 9b98541542..9c21194793 100644 --- a/nipype/interfaces/mipav/tests/test_auto_MedicAlgorithmThresholdToBinaryMask.py +++ b/nipype/interfaces/mipav/tests/test_auto_MedicAlgorithmThresholdToBinaryMask.py @@ -26,7 +26,8 @@ def test_MedicAlgorithmThresholdToBinaryMask_inputs(): outBinary=dict(argstr='--outBinary %s', sep=';', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), xDefaultMem=dict(argstr='-xDefaultMem %d', ), diff --git a/nipype/interfaces/mipav/tests/test_auto_RandomVol.py b/nipype/interfaces/mipav/tests/test_auto_RandomVol.py index 19ea1c4c89..3e4c22b80e 100644 --- a/nipype/interfaces/mipav/tests/test_auto_RandomVol.py +++ b/nipype/interfaces/mipav/tests/test_auto_RandomVol.py @@ -35,7 +35,8 @@ def test_RandomVol_inputs(): outRand1=dict(argstr='--outRand1 %s', hash_files=False, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), xDefaultMem=dict(argstr='-xDefaultMem %d', ), diff --git a/nipype/interfaces/mne/tests/test_auto_WatershedBEM.py b/nipype/interfaces/mne/tests/test_auto_WatershedBEM.py index 8f5f876b73..de29c86fde 100644 --- a/nipype/interfaces/mne/tests/test_auto_WatershedBEM.py +++ b/nipype/interfaces/mne/tests/test_auto_WatershedBEM.py @@ -23,7 +23,8 @@ def test_WatershedBEM_inputs(): subjects_dir=dict(mandatory=True, usedefault=True, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), volume=dict(argstr='--volume %s', usedefault=True, diff --git a/nipype/interfaces/mrtrix/tests/test_auto_ConstrainedSphericalDeconvolution.py b/nipype/interfaces/mrtrix/tests/test_auto_ConstrainedSphericalDeconvolution.py index 400f79676c..5ab7b11f6b 100644 --- a/nipype/interfaces/mrtrix/tests/test_auto_ConstrainedSphericalDeconvolution.py +++ b/nipype/interfaces/mrtrix/tests/test_auto_ConstrainedSphericalDeconvolution.py @@ -47,7 +47,8 @@ def test_ConstrainedSphericalDeconvolution_inputs(): mandatory=True, position=-2, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), threshold_value=dict(argstr='-threshold %s', ), diff --git a/nipype/interfaces/mrtrix/tests/test_auto_DWI2SphericalHarmonicsImage.py b/nipype/interfaces/mrtrix/tests/test_auto_DWI2SphericalHarmonicsImage.py index 4593e247bb..dddd1a7e95 100644 --- a/nipype/interfaces/mrtrix/tests/test_auto_DWI2SphericalHarmonicsImage.py +++ b/nipype/interfaces/mrtrix/tests/test_auto_DWI2SphericalHarmonicsImage.py @@ -29,7 +29,8 @@ def test_DWI2SphericalHarmonicsImage_inputs(): genfile=True, position=-1, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = DWI2SphericalHarmonicsImage.input_spec() diff --git a/nipype/interfaces/mrtrix/tests/test_auto_DWI2Tensor.py b/nipype/interfaces/mrtrix/tests/test_auto_DWI2Tensor.py index c7d5675bc1..28c678b671 100644 --- a/nipype/interfaces/mrtrix/tests/test_auto_DWI2Tensor.py +++ b/nipype/interfaces/mrtrix/tests/test_auto_DWI2Tensor.py @@ -39,7 +39,8 @@ def test_DWI2Tensor_inputs(): quiet=dict(argstr='-quiet', position=1, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = DWI2Tensor.input_spec() diff --git a/nipype/interfaces/mrtrix/tests/test_auto_DiffusionTensorStreamlineTrack.py b/nipype/interfaces/mrtrix/tests/test_auto_DiffusionTensorStreamlineTrack.py index 1a3dcc9edb..87af9bcc7e 100644 --- a/nipype/interfaces/mrtrix/tests/test_auto_DiffusionTensorStreamlineTrack.py +++ b/nipype/interfaces/mrtrix/tests/test_auto_DiffusionTensorStreamlineTrack.py @@ -97,7 +97,8 @@ def test_DiffusionTensorStreamlineTrack_inputs(): ), stop=dict(argstr='-stop', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), unidirectional=dict(argstr='-unidirectional', ), diff --git a/nipype/interfaces/mrtrix/tests/test_auto_Directions2Amplitude.py b/nipype/interfaces/mrtrix/tests/test_auto_Directions2Amplitude.py index 4a88fd9cb3..48fb914125 100644 --- a/nipype/interfaces/mrtrix/tests/test_auto_Directions2Amplitude.py +++ b/nipype/interfaces/mrtrix/tests/test_auto_Directions2Amplitude.py @@ -36,7 +36,8 @@ def test_Directions2Amplitude_inputs(): ), quiet_display=dict(argstr='-quiet', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = Directions2Amplitude.input_spec() diff --git a/nipype/interfaces/mrtrix/tests/test_auto_Erode.py b/nipype/interfaces/mrtrix/tests/test_auto_Erode.py index 7580cfd40c..70cdd1a691 100644 --- a/nipype/interfaces/mrtrix/tests/test_auto_Erode.py +++ b/nipype/interfaces/mrtrix/tests/test_auto_Erode.py @@ -31,7 +31,8 @@ def test_Erode_inputs(): quiet=dict(argstr='-quiet', position=1, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = Erode.input_spec() diff --git a/nipype/interfaces/mrtrix/tests/test_auto_EstimateResponseForSH.py b/nipype/interfaces/mrtrix/tests/test_auto_EstimateResponseForSH.py index b0ee191fe1..07928dfe43 100644 --- a/nipype/interfaces/mrtrix/tests/test_auto_EstimateResponseForSH.py +++ b/nipype/interfaces/mrtrix/tests/test_auto_EstimateResponseForSH.py @@ -36,7 +36,8 @@ def test_EstimateResponseForSH_inputs(): ), quiet=dict(argstr='-quiet', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = EstimateResponseForSH.input_spec() diff --git a/nipype/interfaces/mrtrix/tests/test_auto_FilterTracks.py b/nipype/interfaces/mrtrix/tests/test_auto_FilterTracks.py index 7b9dd09517..c6582da586 100644 --- a/nipype/interfaces/mrtrix/tests/test_auto_FilterTracks.py +++ b/nipype/interfaces/mrtrix/tests/test_auto_FilterTracks.py @@ -53,7 +53,8 @@ def test_FilterTracks_inputs(): quiet=dict(argstr='-quiet', position=1, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = FilterTracks.input_spec() diff --git a/nipype/interfaces/mrtrix/tests/test_auto_FindShPeaks.py b/nipype/interfaces/mrtrix/tests/test_auto_FindShPeaks.py index 5f14e69f35..68251c23c0 100644 --- a/nipype/interfaces/mrtrix/tests/test_auto_FindShPeaks.py +++ b/nipype/interfaces/mrtrix/tests/test_auto_FindShPeaks.py @@ -42,7 +42,8 @@ def test_FindShPeaks_inputs(): ), quiet_display=dict(argstr='-quiet', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = FindShPeaks.input_spec() diff --git a/nipype/interfaces/mrtrix/tests/test_auto_GenerateDirections.py b/nipype/interfaces/mrtrix/tests/test_auto_GenerateDirections.py index ab805c35cb..cd14499969 100644 --- a/nipype/interfaces/mrtrix/tests/test_auto_GenerateDirections.py +++ b/nipype/interfaces/mrtrix/tests/test_auto_GenerateDirections.py @@ -32,7 +32,8 @@ def test_GenerateDirections_inputs(): ), quiet_display=dict(argstr='-quiet', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = GenerateDirections.input_spec() diff --git a/nipype/interfaces/mrtrix/tests/test_auto_GenerateWhiteMatterMask.py b/nipype/interfaces/mrtrix/tests/test_auto_GenerateWhiteMatterMask.py index 2aa1a3cffa..c8ce15714c 100644 --- a/nipype/interfaces/mrtrix/tests/test_auto_GenerateWhiteMatterMask.py +++ b/nipype/interfaces/mrtrix/tests/test_auto_GenerateWhiteMatterMask.py @@ -30,7 +30,8 @@ def test_GenerateWhiteMatterMask_inputs(): genfile=True, position=-1, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = GenerateWhiteMatterMask.input_spec() diff --git a/nipype/interfaces/mrtrix/tests/test_auto_MRConvert.py b/nipype/interfaces/mrtrix/tests/test_auto_MRConvert.py index 7f970f0dc4..2028d9ebab 100644 --- a/nipype/interfaces/mrtrix/tests/test_auto_MRConvert.py +++ b/nipype/interfaces/mrtrix/tests/test_auto_MRConvert.py @@ -50,7 +50,8 @@ def test_MRConvert_inputs(): position=3, units='mm', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), voxel_dims=dict(argstr='-vox %s', position=3, diff --git a/nipype/interfaces/mrtrix/tests/test_auto_MRMultiply.py b/nipype/interfaces/mrtrix/tests/test_auto_MRMultiply.py index 9074271d16..61d8920633 100644 --- a/nipype/interfaces/mrtrix/tests/test_auto_MRMultiply.py +++ b/nipype/interfaces/mrtrix/tests/test_auto_MRMultiply.py @@ -26,7 +26,8 @@ def test_MRMultiply_inputs(): quiet=dict(argstr='-quiet', position=1, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = MRMultiply.input_spec() diff --git a/nipype/interfaces/mrtrix/tests/test_auto_MRTransform.py b/nipype/interfaces/mrtrix/tests/test_auto_MRTransform.py index 28985f43b2..ee3be59eff 100644 --- a/nipype/interfaces/mrtrix/tests/test_auto_MRTransform.py +++ b/nipype/interfaces/mrtrix/tests/test_auto_MRTransform.py @@ -41,7 +41,8 @@ def test_MRTransform_inputs(): template_image=dict(argstr='-template %s', position=1, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), transformation_file=dict(argstr='-transform %s', position=1, diff --git a/nipype/interfaces/mrtrix/tests/test_auto_MRTrixInfo.py b/nipype/interfaces/mrtrix/tests/test_auto_MRTrixInfo.py index 09ffc2a900..4f6784bd5c 100644 --- a/nipype/interfaces/mrtrix/tests/test_auto_MRTrixInfo.py +++ b/nipype/interfaces/mrtrix/tests/test_auto_MRTrixInfo.py @@ -16,7 +16,8 @@ def test_MRTrixInfo_inputs(): mandatory=True, position=-2, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = MRTrixInfo.input_spec() diff --git a/nipype/interfaces/mrtrix/tests/test_auto_MRTrixViewer.py b/nipype/interfaces/mrtrix/tests/test_auto_MRTrixViewer.py index a6fe757114..15ab6d4919 100644 --- a/nipype/interfaces/mrtrix/tests/test_auto_MRTrixViewer.py +++ b/nipype/interfaces/mrtrix/tests/test_auto_MRTrixViewer.py @@ -22,7 +22,8 @@ def test_MRTrixViewer_inputs(): quiet=dict(argstr='-quiet', position=1, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = MRTrixViewer.input_spec() diff --git a/nipype/interfaces/mrtrix/tests/test_auto_MedianFilter3D.py b/nipype/interfaces/mrtrix/tests/test_auto_MedianFilter3D.py index 796c607791..b56c033abb 100644 --- a/nipype/interfaces/mrtrix/tests/test_auto_MedianFilter3D.py +++ b/nipype/interfaces/mrtrix/tests/test_auto_MedianFilter3D.py @@ -26,7 +26,8 @@ def test_MedianFilter3D_inputs(): quiet=dict(argstr='-quiet', position=1, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = MedianFilter3D.input_spec() diff --git a/nipype/interfaces/mrtrix/tests/test_auto_ProbabilisticSphericallyDeconvolutedStreamlineTrack.py b/nipype/interfaces/mrtrix/tests/test_auto_ProbabilisticSphericallyDeconvolutedStreamlineTrack.py index 64605ad510..bfeaab595b 100644 --- a/nipype/interfaces/mrtrix/tests/test_auto_ProbabilisticSphericallyDeconvolutedStreamlineTrack.py +++ b/nipype/interfaces/mrtrix/tests/test_auto_ProbabilisticSphericallyDeconvolutedStreamlineTrack.py @@ -95,7 +95,8 @@ def test_ProbabilisticSphericallyDeconvolutedStreamlineTrack_inputs(): ), stop=dict(argstr='-stop', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), unidirectional=dict(argstr='-unidirectional', ), diff --git a/nipype/interfaces/mrtrix/tests/test_auto_SphericallyDeconvolutedStreamlineTrack.py b/nipype/interfaces/mrtrix/tests/test_auto_SphericallyDeconvolutedStreamlineTrack.py index fd23f4479d..05afc4dd17 100644 --- a/nipype/interfaces/mrtrix/tests/test_auto_SphericallyDeconvolutedStreamlineTrack.py +++ b/nipype/interfaces/mrtrix/tests/test_auto_SphericallyDeconvolutedStreamlineTrack.py @@ -93,7 +93,8 @@ def test_SphericallyDeconvolutedStreamlineTrack_inputs(): ), stop=dict(argstr='-stop', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), unidirectional=dict(argstr='-unidirectional', ), diff --git a/nipype/interfaces/mrtrix/tests/test_auto_StreamlineTrack.py b/nipype/interfaces/mrtrix/tests/test_auto_StreamlineTrack.py index 3e466057b0..192d0b8a6a 100644 --- a/nipype/interfaces/mrtrix/tests/test_auto_StreamlineTrack.py +++ b/nipype/interfaces/mrtrix/tests/test_auto_StreamlineTrack.py @@ -93,7 +93,8 @@ def test_StreamlineTrack_inputs(): ), stop=dict(argstr='-stop', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), unidirectional=dict(argstr='-unidirectional', ), diff --git a/nipype/interfaces/mrtrix/tests/test_auto_Tensor2ApparentDiffusion.py b/nipype/interfaces/mrtrix/tests/test_auto_Tensor2ApparentDiffusion.py index 8ffdad429f..22da9f1842 100644 --- a/nipype/interfaces/mrtrix/tests/test_auto_Tensor2ApparentDiffusion.py +++ b/nipype/interfaces/mrtrix/tests/test_auto_Tensor2ApparentDiffusion.py @@ -26,7 +26,8 @@ def test_Tensor2ApparentDiffusion_inputs(): quiet=dict(argstr='-quiet', position=1, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = Tensor2ApparentDiffusion.input_spec() diff --git a/nipype/interfaces/mrtrix/tests/test_auto_Tensor2FractionalAnisotropy.py b/nipype/interfaces/mrtrix/tests/test_auto_Tensor2FractionalAnisotropy.py index e234065864..70fb981fc9 100644 --- a/nipype/interfaces/mrtrix/tests/test_auto_Tensor2FractionalAnisotropy.py +++ b/nipype/interfaces/mrtrix/tests/test_auto_Tensor2FractionalAnisotropy.py @@ -26,7 +26,8 @@ def test_Tensor2FractionalAnisotropy_inputs(): quiet=dict(argstr='-quiet', position=1, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = Tensor2FractionalAnisotropy.input_spec() diff --git a/nipype/interfaces/mrtrix/tests/test_auto_Tensor2Vector.py b/nipype/interfaces/mrtrix/tests/test_auto_Tensor2Vector.py index 08f0837540..62bde41c8b 100644 --- a/nipype/interfaces/mrtrix/tests/test_auto_Tensor2Vector.py +++ b/nipype/interfaces/mrtrix/tests/test_auto_Tensor2Vector.py @@ -26,7 +26,8 @@ def test_Tensor2Vector_inputs(): quiet=dict(argstr='-quiet', position=1, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = Tensor2Vector.input_spec() diff --git a/nipype/interfaces/mrtrix/tests/test_auto_Threshold.py b/nipype/interfaces/mrtrix/tests/test_auto_Threshold.py index 4ff6fa9759..6668810b72 100644 --- a/nipype/interfaces/mrtrix/tests/test_auto_Threshold.py +++ b/nipype/interfaces/mrtrix/tests/test_auto_Threshold.py @@ -36,7 +36,8 @@ def test_Threshold_inputs(): replace_zeros_with_NaN=dict(argstr='-nan', position=1, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = Threshold.input_spec() diff --git a/nipype/interfaces/mrtrix/tests/test_auto_Tracks2Prob.py b/nipype/interfaces/mrtrix/tests/test_auto_Tracks2Prob.py index 079273f9e2..5265fe1ba4 100644 --- a/nipype/interfaces/mrtrix/tests/test_auto_Tracks2Prob.py +++ b/nipype/interfaces/mrtrix/tests/test_auto_Tracks2Prob.py @@ -36,7 +36,8 @@ def test_Tracks2Prob_inputs(): template_file=dict(argstr='-template %s', position=1, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), voxel_dims=dict(argstr='-vox %s', position=2, diff --git a/nipype/interfaces/mrtrix3/tests/test_auto_ACTPrepareFSL.py b/nipype/interfaces/mrtrix3/tests/test_auto_ACTPrepareFSL.py index 91af4ef87e..fa2bc2f222 100644 --- a/nipype/interfaces/mrtrix3/tests/test_auto_ACTPrepareFSL.py +++ b/nipype/interfaces/mrtrix3/tests/test_auto_ACTPrepareFSL.py @@ -21,7 +21,8 @@ def test_ACTPrepareFSL_inputs(): position=-1, usedefault=True, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = ACTPrepareFSL.input_spec() diff --git a/nipype/interfaces/mrtrix3/tests/test_auto_BrainMask.py b/nipype/interfaces/mrtrix3/tests/test_auto_BrainMask.py index 33de89ccbb..1056ecadcc 100644 --- a/nipype/interfaces/mrtrix3/tests/test_auto_BrainMask.py +++ b/nipype/interfaces/mrtrix3/tests/test_auto_BrainMask.py @@ -33,7 +33,8 @@ def test_BrainMask_inputs(): position=-1, usedefault=True, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = BrainMask.input_spec() diff --git a/nipype/interfaces/mrtrix3/tests/test_auto_BuildConnectome.py b/nipype/interfaces/mrtrix3/tests/test_auto_BuildConnectome.py index 9e44d4134a..4f12e08cfc 100644 --- a/nipype/interfaces/mrtrix3/tests/test_auto_BuildConnectome.py +++ b/nipype/interfaces/mrtrix3/tests/test_auto_BuildConnectome.py @@ -41,7 +41,8 @@ def test_BuildConnectome_inputs(): ), search_reverse=dict(argstr='-assignment_reverse_search %f', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), vox_lookup=dict(argstr='-assignment_voxel_lookup', ), diff --git a/nipype/interfaces/mrtrix3/tests/test_auto_ComputeTDI.py b/nipype/interfaces/mrtrix3/tests/test_auto_ComputeTDI.py index 18c6868538..f9dac1b48e 100644 --- a/nipype/interfaces/mrtrix3/tests/test_auto_ComputeTDI.py +++ b/nipype/interfaces/mrtrix3/tests/test_auto_ComputeTDI.py @@ -49,7 +49,8 @@ def test_ComputeTDI_inputs(): ), tck_weights=dict(argstr='-tck_weights_in %s', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), upsample=dict(argstr='-upsample %d', ), diff --git a/nipype/interfaces/mrtrix3/tests/test_auto_EstimateFOD.py b/nipype/interfaces/mrtrix3/tests/test_auto_EstimateFOD.py index daaddaceca..f645703bba 100644 --- a/nipype/interfaces/mrtrix3/tests/test_auto_EstimateFOD.py +++ b/nipype/interfaces/mrtrix3/tests/test_auto_EstimateFOD.py @@ -52,7 +52,8 @@ def test_EstimateFOD_inputs(): shell=dict(argstr='-shell %s', sep=',', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), thres=dict(argstr='-threshold %f', ), diff --git a/nipype/interfaces/mrtrix3/tests/test_auto_FitTensor.py b/nipype/interfaces/mrtrix3/tests/test_auto_FitTensor.py index fa7126432b..693e522b80 100644 --- a/nipype/interfaces/mrtrix3/tests/test_auto_FitTensor.py +++ b/nipype/interfaces/mrtrix3/tests/test_auto_FitTensor.py @@ -39,7 +39,8 @@ def test_FitTensor_inputs(): ), reg_term=dict(argstr='-regularisation %f', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = FitTensor.input_spec() diff --git a/nipype/interfaces/mrtrix3/tests/test_auto_Generate5tt.py b/nipype/interfaces/mrtrix3/tests/test_auto_Generate5tt.py index 6ad81cc00c..2afa4e46da 100644 --- a/nipype/interfaces/mrtrix3/tests/test_auto_Generate5tt.py +++ b/nipype/interfaces/mrtrix3/tests/test_auto_Generate5tt.py @@ -24,7 +24,8 @@ def test_Generate5tt_inputs(): position=-1, usedefault=True, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = Generate5tt.input_spec() diff --git a/nipype/interfaces/mrtrix3/tests/test_auto_LabelConfig.py b/nipype/interfaces/mrtrix3/tests/test_auto_LabelConfig.py index 564a986116..91463a46fb 100644 --- a/nipype/interfaces/mrtrix3/tests/test_auto_LabelConfig.py +++ b/nipype/interfaces/mrtrix3/tests/test_auto_LabelConfig.py @@ -37,7 +37,8 @@ def test_LabelConfig_inputs(): ), spine=dict(argstr='-spine %s', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = LabelConfig.input_spec() diff --git a/nipype/interfaces/mrtrix3/tests/test_auto_MRTrix3Base.py b/nipype/interfaces/mrtrix3/tests/test_auto_MRTrix3Base.py index 63de8538d0..44fc68a474 100644 --- a/nipype/interfaces/mrtrix3/tests/test_auto_MRTrix3Base.py +++ b/nipype/interfaces/mrtrix3/tests/test_auto_MRTrix3Base.py @@ -12,7 +12,8 @@ def test_MRTrix3Base_inputs(): ignore_exception=dict(nohash=True, usedefault=True, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = MRTrix3Base.input_spec() diff --git a/nipype/interfaces/mrtrix3/tests/test_auto_Mesh2PVE.py b/nipype/interfaces/mrtrix3/tests/test_auto_Mesh2PVE.py index 1e3c6983ed..6f07bd8eab 100644 --- a/nipype/interfaces/mrtrix3/tests/test_auto_Mesh2PVE.py +++ b/nipype/interfaces/mrtrix3/tests/test_auto_Mesh2PVE.py @@ -27,7 +27,8 @@ def test_Mesh2PVE_inputs(): mandatory=True, position=-2, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = Mesh2PVE.input_spec() diff --git a/nipype/interfaces/mrtrix3/tests/test_auto_ReplaceFSwithFIRST.py b/nipype/interfaces/mrtrix3/tests/test_auto_ReplaceFSwithFIRST.py index ddefa4361e..fb5f86f8d4 100644 --- a/nipype/interfaces/mrtrix3/tests/test_auto_ReplaceFSwithFIRST.py +++ b/nipype/interfaces/mrtrix3/tests/test_auto_ReplaceFSwithFIRST.py @@ -28,7 +28,8 @@ def test_ReplaceFSwithFIRST_inputs(): position=-1, usedefault=True, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = ReplaceFSwithFIRST.input_spec() diff --git a/nipype/interfaces/mrtrix3/tests/test_auto_ResponseSD.py b/nipype/interfaces/mrtrix3/tests/test_auto_ResponseSD.py index 216e905c11..4a4aeb153e 100644 --- a/nipype/interfaces/mrtrix3/tests/test_auto_ResponseSD.py +++ b/nipype/interfaces/mrtrix3/tests/test_auto_ResponseSD.py @@ -50,7 +50,8 @@ def test_ResponseSD_inputs(): shell=dict(argstr='-shell %s', sep=',', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), test_all=dict(argstr='-test_all', ), diff --git a/nipype/interfaces/mrtrix3/tests/test_auto_TCK2VTK.py b/nipype/interfaces/mrtrix3/tests/test_auto_TCK2VTK.py index 558a90df40..284235ca55 100644 --- a/nipype/interfaces/mrtrix3/tests/test_auto_TCK2VTK.py +++ b/nipype/interfaces/mrtrix3/tests/test_auto_TCK2VTK.py @@ -25,7 +25,8 @@ def test_TCK2VTK_inputs(): ), reference=dict(argstr='-image %s', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), voxel=dict(argstr='-image %s', ), diff --git a/nipype/interfaces/mrtrix3/tests/test_auto_TensorMetrics.py b/nipype/interfaces/mrtrix3/tests/test_auto_TensorMetrics.py index 2719e25ea6..0103efc7e1 100644 --- a/nipype/interfaces/mrtrix3/tests/test_auto_TensorMetrics.py +++ b/nipype/interfaces/mrtrix3/tests/test_auto_TensorMetrics.py @@ -31,7 +31,8 @@ def test_TensorMetrics_inputs(): ), out_fa=dict(argstr='-fa %s', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = TensorMetrics.input_spec() diff --git a/nipype/interfaces/mrtrix3/tests/test_auto_Tractography.py b/nipype/interfaces/mrtrix3/tests/test_auto_Tractography.py index dcbc5a0489..e1a684b8d9 100644 --- a/nipype/interfaces/mrtrix3/tests/test_auto_Tractography.py +++ b/nipype/interfaces/mrtrix3/tests/test_auto_Tractography.py @@ -101,7 +101,8 @@ def test_Tractography_inputs(): ), stop=dict(argstr='-stop', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), unidirectional=dict(argstr='-unidirectional', ), diff --git a/nipype/interfaces/niftyfit/tests/test_auto_DwiTool.py b/nipype/interfaces/niftyfit/tests/test_auto_DwiTool.py index 8d5d0e2b14..41a3d6cc5a 100644 --- a/nipype/interfaces/niftyfit/tests/test_auto_DwiTool.py +++ b/nipype/interfaces/niftyfit/tests/test_auto_DwiTool.py @@ -90,7 +90,8 @@ def test_DwiTool_inputs(): name_template='%s_syn.nii.gz', requires=['bvec_file', 'b0_file'], ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), v1map_file=dict(argstr='-v1map %s', name_source=['source_file'], diff --git a/nipype/interfaces/niftyfit/tests/test_auto_FitAsl.py b/nipype/interfaces/niftyfit/tests/test_auto_FitAsl.py index aa67c92149..d596f0f633 100644 --- a/nipype/interfaces/niftyfit/tests/test_auto_FitAsl.py +++ b/nipype/interfaces/niftyfit/tests/test_auto_FitAsl.py @@ -89,7 +89,8 @@ def test_FitAsl_inputs(): ), t_inv2=dict(argstr='-Tinv2 %f', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), wm_plasma=dict(argstr='-wmL %f', ), diff --git a/nipype/interfaces/niftyfit/tests/test_auto_FitDwi.py b/nipype/interfaces/niftyfit/tests/test_auto_FitDwi.py index e03d999463..7ca90b7304 100644 --- a/nipype/interfaces/niftyfit/tests/test_auto_FitDwi.py +++ b/nipype/interfaces/niftyfit/tests/test_auto_FitDwi.py @@ -143,7 +143,8 @@ def test_FitDwi_inputs(): name_template='%s_tenmap.nii.gz', requires=['dti_flag'], ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), v1map_file=dict(argstr='-v1map %s', name_source=['source_file'], diff --git a/nipype/interfaces/niftyfit/tests/test_auto_FitQt1.py b/nipype/interfaces/niftyfit/tests/test_auto_FitQt1.py index 86c15efaa5..3b628975f4 100644 --- a/nipype/interfaces/niftyfit/tests/test_auto_FitQt1.py +++ b/nipype/interfaces/niftyfit/tests/test_auto_FitQt1.py @@ -97,7 +97,8 @@ def test_FitQt1_inputs(): te_value=dict(argstr='-TE %f', position=4, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), tis=dict(argstr='-TIs %s', position=14, diff --git a/nipype/interfaces/niftyfit/tests/test_auto_NiftyFitCommand.py b/nipype/interfaces/niftyfit/tests/test_auto_NiftyFitCommand.py index a89cdf40ce..813a4f69b5 100644 --- a/nipype/interfaces/niftyfit/tests/test_auto_NiftyFitCommand.py +++ b/nipype/interfaces/niftyfit/tests/test_auto_NiftyFitCommand.py @@ -12,7 +12,8 @@ def test_NiftyFitCommand_inputs(): ignore_exception=dict(nohash=True, usedefault=True, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = NiftyFitCommand.input_spec() diff --git a/nipype/interfaces/niftyreg/tests/test_auto_NiftyRegCommand.py b/nipype/interfaces/niftyreg/tests/test_auto_NiftyRegCommand.py index e18211fee7..f97733e5ca 100644 --- a/nipype/interfaces/niftyreg/tests/test_auto_NiftyRegCommand.py +++ b/nipype/interfaces/niftyreg/tests/test_auto_NiftyRegCommand.py @@ -15,7 +15,8 @@ def test_NiftyRegCommand_inputs(): omp_core_val=dict(argstr='-omp %i', usedefault=True, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = NiftyRegCommand.input_spec() diff --git a/nipype/interfaces/niftyreg/tests/test_auto_RegAladin.py b/nipype/interfaces/niftyreg/tests/test_auto_RegAladin.py index b4910d1a1e..a39dad2d73 100644 --- a/nipype/interfaces/niftyreg/tests/test_auto_RegAladin.py +++ b/nipype/interfaces/niftyreg/tests/test_auto_RegAladin.py @@ -69,7 +69,8 @@ def test_RegAladin_inputs(): ), smoo_r_val=dict(argstr='-smooR %f', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), v_val=dict(argstr='-pv %d', ), diff --git a/nipype/interfaces/niftyreg/tests/test_auto_RegAverage.py b/nipype/interfaces/niftyreg/tests/test_auto_RegAverage.py index 119b6c5e82..7da4788379 100644 --- a/nipype/interfaces/niftyreg/tests/test_auto_RegAverage.py +++ b/nipype/interfaces/niftyreg/tests/test_auto_RegAverage.py @@ -49,7 +49,8 @@ def test_RegAverage_inputs(): genfile=True, position=0, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), warp_files=dict(argstr='%s', position=-1, diff --git a/nipype/interfaces/niftyreg/tests/test_auto_RegF3D.py b/nipype/interfaces/niftyreg/tests/test_auto_RegF3D.py index 660532fb15..906439f23d 100644 --- a/nipype/interfaces/niftyreg/tests/test_auto_RegF3D.py +++ b/nipype/interfaces/niftyreg/tests/test_auto_RegF3D.py @@ -117,7 +117,8 @@ def test_RegF3D_inputs(): ), sz_val=dict(argstr='-sz %f', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), vel_flag=dict(argstr='-vel', ), diff --git a/nipype/interfaces/niftyreg/tests/test_auto_RegJacobian.py b/nipype/interfaces/niftyreg/tests/test_auto_RegJacobian.py index b5eb132c39..8bcd86d85e 100644 --- a/nipype/interfaces/niftyreg/tests/test_auto_RegJacobian.py +++ b/nipype/interfaces/niftyreg/tests/test_auto_RegJacobian.py @@ -22,7 +22,8 @@ def test_RegJacobian_inputs(): ), ref_file=dict(argstr='-ref %s', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), trans_file=dict(argstr='-trans %s', mandatory=True, diff --git a/nipype/interfaces/niftyreg/tests/test_auto_RegMeasure.py b/nipype/interfaces/niftyreg/tests/test_auto_RegMeasure.py index f0504cb3dc..957442a86b 100644 --- a/nipype/interfaces/niftyreg/tests/test_auto_RegMeasure.py +++ b/nipype/interfaces/niftyreg/tests/test_auto_RegMeasure.py @@ -28,7 +28,8 @@ def test_RegMeasure_inputs(): ref_file=dict(argstr='-ref %s', mandatory=True, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = RegMeasure.input_spec() diff --git a/nipype/interfaces/niftyreg/tests/test_auto_RegResample.py b/nipype/interfaces/niftyreg/tests/test_auto_RegResample.py index e1ca405567..130c734b69 100644 --- a/nipype/interfaces/niftyreg/tests/test_auto_RegResample.py +++ b/nipype/interfaces/niftyreg/tests/test_auto_RegResample.py @@ -36,7 +36,8 @@ def test_RegResample_inputs(): ), tensor_flag=dict(argstr='-tensor ', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), trans_file=dict(argstr='-trans %s', ), diff --git a/nipype/interfaces/niftyreg/tests/test_auto_RegTools.py b/nipype/interfaces/niftyreg/tests/test_auto_RegTools.py index 495e0854d7..5485a92b4d 100644 --- a/nipype/interfaces/niftyreg/tests/test_auto_RegTools.py +++ b/nipype/interfaces/niftyreg/tests/test_auto_RegTools.py @@ -48,7 +48,8 @@ def test_RegTools_inputs(): ), sub_val=dict(argstr='-sub %s', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), thr_val=dict(argstr='-thr %f', ), diff --git a/nipype/interfaces/niftyreg/tests/test_auto_RegTransform.py b/nipype/interfaces/niftyreg/tests/test_auto_RegTransform.py index 00c017d1d3..624f07d350 100644 --- a/nipype/interfaces/niftyreg/tests/test_auto_RegTransform.py +++ b/nipype/interfaces/niftyreg/tests/test_auto_RegTransform.py @@ -70,7 +70,8 @@ def test_RegTransform_inputs(): position=1, requires=['ref1_file'], ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), upd_s_form_input=dict(argstr='-updSform %s', position=-3, diff --git a/nipype/interfaces/niftyseg/tests/test_auto_BinaryMaths.py b/nipype/interfaces/niftyseg/tests/test_auto_BinaryMaths.py index 714e201fc3..6962adcda5 100644 --- a/nipype/interfaces/niftyseg/tests/test_auto_BinaryMaths.py +++ b/nipype/interfaces/niftyseg/tests/test_auto_BinaryMaths.py @@ -43,7 +43,8 @@ def test_BinaryMaths_inputs(): output_datatype=dict(argstr='-odt %s', position=-3, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = BinaryMaths.input_spec() diff --git a/nipype/interfaces/niftyseg/tests/test_auto_BinaryMathsInteger.py b/nipype/interfaces/niftyseg/tests/test_auto_BinaryMathsInteger.py index 484f2ac3b4..1c1617d2ce 100644 --- a/nipype/interfaces/niftyseg/tests/test_auto_BinaryMathsInteger.py +++ b/nipype/interfaces/niftyseg/tests/test_auto_BinaryMathsInteger.py @@ -32,7 +32,8 @@ def test_BinaryMathsInteger_inputs(): output_datatype=dict(argstr='-odt %s', position=-3, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = BinaryMathsInteger.input_spec() diff --git a/nipype/interfaces/niftyseg/tests/test_auto_BinaryStats.py b/nipype/interfaces/niftyseg/tests/test_auto_BinaryStats.py index 14ea5463b0..a42f84f4f8 100644 --- a/nipype/interfaces/niftyseg/tests/test_auto_BinaryStats.py +++ b/nipype/interfaces/niftyseg/tests/test_auto_BinaryStats.py @@ -36,7 +36,8 @@ def test_BinaryStats_inputs(): mandatory=True, position=4, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = BinaryStats.input_spec() diff --git a/nipype/interfaces/niftyseg/tests/test_auto_CalcTopNCC.py b/nipype/interfaces/niftyseg/tests/test_auto_CalcTopNCC.py index a54501c730..00aed5210e 100644 --- a/nipype/interfaces/niftyseg/tests/test_auto_CalcTopNCC.py +++ b/nipype/interfaces/niftyseg/tests/test_auto_CalcTopNCC.py @@ -26,7 +26,8 @@ def test_CalcTopNCC_inputs(): mandatory=True, position=2, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), top_templates=dict(argstr='-n %s', mandatory=True, diff --git a/nipype/interfaces/niftyseg/tests/test_auto_EM.py b/nipype/interfaces/niftyseg/tests/test_auto_EM.py index c42acf6a70..8e76cd7dd7 100644 --- a/nipype/interfaces/niftyseg/tests/test_auto_EM.py +++ b/nipype/interfaces/niftyseg/tests/test_auto_EM.py @@ -58,7 +58,8 @@ def test_EM_inputs(): ), relax_priors=dict(argstr='-rf %s %s', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = EM.input_spec() diff --git a/nipype/interfaces/niftyseg/tests/test_auto_FillLesions.py b/nipype/interfaces/niftyseg/tests/test_auto_FillLesions.py index aae126636a..9688599c1d 100644 --- a/nipype/interfaces/niftyseg/tests/test_auto_FillLesions.py +++ b/nipype/interfaces/niftyseg/tests/test_auto_FillLesions.py @@ -45,7 +45,8 @@ def test_FillLesions_inputs(): ), smooth=dict(argstr='-smo %f', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), use_2d=dict(argstr='-2D', ), diff --git a/nipype/interfaces/niftyseg/tests/test_auto_LabelFusion.py b/nipype/interfaces/niftyseg/tests/test_auto_LabelFusion.py index b572ac940c..bf1707db6b 100644 --- a/nipype/interfaces/niftyseg/tests/test_auto_LabelFusion.py +++ b/nipype/interfaces/niftyseg/tests/test_auto_LabelFusion.py @@ -50,7 +50,8 @@ def test_LabelFusion_inputs(): ), template_file=dict(), template_num=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), unc=dict(argstr='-unc', ), diff --git a/nipype/interfaces/niftyseg/tests/test_auto_MathsCommand.py b/nipype/interfaces/niftyseg/tests/test_auto_MathsCommand.py index 640c7088bf..b16795a3d9 100644 --- a/nipype/interfaces/niftyseg/tests/test_auto_MathsCommand.py +++ b/nipype/interfaces/niftyseg/tests/test_auto_MathsCommand.py @@ -24,7 +24,8 @@ def test_MathsCommand_inputs(): output_datatype=dict(argstr='-odt %s', position=-3, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = MathsCommand.input_spec() diff --git a/nipype/interfaces/niftyseg/tests/test_auto_Merge.py b/nipype/interfaces/niftyseg/tests/test_auto_Merge.py index 3980bc9ac3..969b8f2d24 100644 --- a/nipype/interfaces/niftyseg/tests/test_auto_Merge.py +++ b/nipype/interfaces/niftyseg/tests/test_auto_Merge.py @@ -30,7 +30,8 @@ def test_Merge_inputs(): output_datatype=dict(argstr='-odt %s', position=-3, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = Merge.input_spec() diff --git a/nipype/interfaces/niftyseg/tests/test_auto_NiftySegCommand.py b/nipype/interfaces/niftyseg/tests/test_auto_NiftySegCommand.py index 55dc5d9d1d..8847241f56 100644 --- a/nipype/interfaces/niftyseg/tests/test_auto_NiftySegCommand.py +++ b/nipype/interfaces/niftyseg/tests/test_auto_NiftySegCommand.py @@ -12,7 +12,8 @@ def test_NiftySegCommand_inputs(): ignore_exception=dict(nohash=True, usedefault=True, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = NiftySegCommand.input_spec() diff --git a/nipype/interfaces/niftyseg/tests/test_auto_StatsCommand.py b/nipype/interfaces/niftyseg/tests/test_auto_StatsCommand.py index f535133dee..82daa127cd 100644 --- a/nipype/interfaces/niftyseg/tests/test_auto_StatsCommand.py +++ b/nipype/interfaces/niftyseg/tests/test_auto_StatsCommand.py @@ -22,7 +22,8 @@ def test_StatsCommand_inputs(): mask_file=dict(argstr='-m %s', position=-2, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = StatsCommand.input_spec() diff --git a/nipype/interfaces/niftyseg/tests/test_auto_TupleMaths.py b/nipype/interfaces/niftyseg/tests/test_auto_TupleMaths.py index 9bd5ca771d..108d74a072 100644 --- a/nipype/interfaces/niftyseg/tests/test_auto_TupleMaths.py +++ b/nipype/interfaces/niftyseg/tests/test_auto_TupleMaths.py @@ -48,7 +48,8 @@ def test_TupleMaths_inputs(): output_datatype=dict(argstr='-odt %s', position=-3, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = TupleMaths.input_spec() diff --git a/nipype/interfaces/niftyseg/tests/test_auto_UnaryMaths.py b/nipype/interfaces/niftyseg/tests/test_auto_UnaryMaths.py index ed98de196f..c7a2fdaf56 100644 --- a/nipype/interfaces/niftyseg/tests/test_auto_UnaryMaths.py +++ b/nipype/interfaces/niftyseg/tests/test_auto_UnaryMaths.py @@ -28,7 +28,8 @@ def test_UnaryMaths_inputs(): output_datatype=dict(argstr='-odt %s', position=-3, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = UnaryMaths.input_spec() diff --git a/nipype/interfaces/niftyseg/tests/test_auto_UnaryStats.py b/nipype/interfaces/niftyseg/tests/test_auto_UnaryStats.py index 17252084c6..fa5a17cfce 100644 --- a/nipype/interfaces/niftyseg/tests/test_auto_UnaryStats.py +++ b/nipype/interfaces/niftyseg/tests/test_auto_UnaryStats.py @@ -26,7 +26,8 @@ def test_UnaryStats_inputs(): mandatory=True, position=4, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = UnaryStats.input_spec() diff --git a/nipype/interfaces/semtools/brains/tests/test_auto_BRAINSPosteriorToContinuousClass.py b/nipype/interfaces/semtools/brains/tests/test_auto_BRAINSPosteriorToContinuousClass.py index 9c3d3928e5..89184c9325 100644 --- a/nipype/interfaces/semtools/brains/tests/test_auto_BRAINSPosteriorToContinuousClass.py +++ b/nipype/interfaces/semtools/brains/tests/test_auto_BRAINSPosteriorToContinuousClass.py @@ -29,7 +29,8 @@ def test_BRAINSPosteriorToContinuousClass_inputs(): outputVolume=dict(argstr='--outputVolume %s', hash_files=False, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = BRAINSPosteriorToContinuousClass.input_spec() diff --git a/nipype/interfaces/semtools/brains/tests/test_auto_BRAINSTalairach.py b/nipype/interfaces/semtools/brains/tests/test_auto_BRAINSTalairach.py index 273d140224..de6ae06a6f 100644 --- a/nipype/interfaces/semtools/brains/tests/test_auto_BRAINSTalairach.py +++ b/nipype/interfaces/semtools/brains/tests/test_auto_BRAINSTalairach.py @@ -40,7 +40,8 @@ def test_BRAINSTalairach_inputs(): outputGrid=dict(argstr='--outputGrid %s', hash_files=False, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = BRAINSTalairach.input_spec() diff --git a/nipype/interfaces/semtools/brains/tests/test_auto_BRAINSTalairachMask.py b/nipype/interfaces/semtools/brains/tests/test_auto_BRAINSTalairachMask.py index daee0ded09..ab262fd36b 100644 --- a/nipype/interfaces/semtools/brains/tests/test_auto_BRAINSTalairachMask.py +++ b/nipype/interfaces/semtools/brains/tests/test_auto_BRAINSTalairachMask.py @@ -25,7 +25,8 @@ def test_BRAINSTalairachMask_inputs(): ), talairachParameters=dict(argstr='--talairachParameters %s', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = BRAINSTalairachMask.input_spec() diff --git a/nipype/interfaces/semtools/brains/tests/test_auto_GenerateEdgeMapImage.py b/nipype/interfaces/semtools/brains/tests/test_auto_GenerateEdgeMapImage.py index f5275319a6..ca540e4afd 100644 --- a/nipype/interfaces/semtools/brains/tests/test_auto_GenerateEdgeMapImage.py +++ b/nipype/interfaces/semtools/brains/tests/test_auto_GenerateEdgeMapImage.py @@ -30,7 +30,8 @@ def test_GenerateEdgeMapImage_inputs(): outputMaximumGradientImage=dict(argstr='--outputMaximumGradientImage %s', hash_files=False, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), upperPercentileMatching=dict(argstr='--upperPercentileMatching %f', ), diff --git a/nipype/interfaces/semtools/brains/tests/test_auto_GeneratePurePlugMask.py b/nipype/interfaces/semtools/brains/tests/test_auto_GeneratePurePlugMask.py index 262ef2c485..5eecfc9987 100644 --- a/nipype/interfaces/semtools/brains/tests/test_auto_GeneratePurePlugMask.py +++ b/nipype/interfaces/semtools/brains/tests/test_auto_GeneratePurePlugMask.py @@ -20,7 +20,8 @@ def test_GeneratePurePlugMask_inputs(): outputMaskFile=dict(argstr='--outputMaskFile %s', hash_files=False, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), threshold=dict(argstr='--threshold %f', ), diff --git a/nipype/interfaces/semtools/brains/tests/test_auto_HistogramMatchingFilter.py b/nipype/interfaces/semtools/brains/tests/test_auto_HistogramMatchingFilter.py index c2d76581be..8e3ec9c0d4 100644 --- a/nipype/interfaces/semtools/brains/tests/test_auto_HistogramMatchingFilter.py +++ b/nipype/interfaces/semtools/brains/tests/test_auto_HistogramMatchingFilter.py @@ -29,7 +29,8 @@ def test_HistogramMatchingFilter_inputs(): ), referenceVolume=dict(argstr='--referenceVolume %s', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), verbose=dict(argstr='--verbose ', ), diff --git a/nipype/interfaces/semtools/brains/tests/test_auto_SimilarityIndex.py b/nipype/interfaces/semtools/brains/tests/test_auto_SimilarityIndex.py index c7bac4f4f6..9b9fd7c3f5 100644 --- a/nipype/interfaces/semtools/brains/tests/test_auto_SimilarityIndex.py +++ b/nipype/interfaces/semtools/brains/tests/test_auto_SimilarityIndex.py @@ -18,7 +18,8 @@ def test_SimilarityIndex_inputs(): ), outputCSVFilename=dict(argstr='--outputCSVFilename %s', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), thresholdInterval=dict(argstr='--thresholdInterval %f', ), diff --git a/nipype/interfaces/semtools/diffusion/tests/test_auto_DWIConvert.py b/nipype/interfaces/semtools/diffusion/tests/test_auto_DWIConvert.py index b355239d30..90e24fca24 100644 --- a/nipype/interfaces/semtools/diffusion/tests/test_auto_DWIConvert.py +++ b/nipype/interfaces/semtools/diffusion/tests/test_auto_DWIConvert.py @@ -45,7 +45,8 @@ def test_DWIConvert_inputs(): ), smallGradientThreshold=dict(argstr='--smallGradientThreshold %f', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), transposeInputBVectors=dict(argstr='--transposeInputBVectors ', ), diff --git a/nipype/interfaces/semtools/diffusion/tests/test_auto_compareTractInclusion.py b/nipype/interfaces/semtools/diffusion/tests/test_auto_compareTractInclusion.py index 209c267fdc..c892799709 100644 --- a/nipype/interfaces/semtools/diffusion/tests/test_auto_compareTractInclusion.py +++ b/nipype/interfaces/semtools/diffusion/tests/test_auto_compareTractInclusion.py @@ -20,7 +20,8 @@ def test_compareTractInclusion_inputs(): ), standardFiber=dict(argstr='--standardFiber %s', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), testFiber=dict(argstr='--testFiber %s', ), diff --git a/nipype/interfaces/semtools/diffusion/tests/test_auto_dtiaverage.py b/nipype/interfaces/semtools/diffusion/tests/test_auto_dtiaverage.py index c3bff362a2..a241bd583b 100644 --- a/nipype/interfaces/semtools/diffusion/tests/test_auto_dtiaverage.py +++ b/nipype/interfaces/semtools/diffusion/tests/test_auto_dtiaverage.py @@ -19,7 +19,8 @@ def test_dtiaverage_inputs(): tensor_output=dict(argstr='--tensor_output %s', hash_files=False, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), verbose=dict(argstr='--verbose ', ), diff --git a/nipype/interfaces/semtools/diffusion/tests/test_auto_dtiestim.py b/nipype/interfaces/semtools/diffusion/tests/test_auto_dtiestim.py index 74c63221dc..4f8e64f4ac 100644 --- a/nipype/interfaces/semtools/diffusion/tests/test_auto_dtiestim.py +++ b/nipype/interfaces/semtools/diffusion/tests/test_auto_dtiestim.py @@ -47,7 +47,8 @@ def test_dtiestim_inputs(): tensor_output=dict(argstr='--tensor_output %s', hash_files=False, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), threshold=dict(argstr='--threshold %d', ), diff --git a/nipype/interfaces/semtools/diffusion/tests/test_auto_dtiprocess.py b/nipype/interfaces/semtools/diffusion/tests/test_auto_dtiprocess.py index f6822c5558..6d0cd8674e 100644 --- a/nipype/interfaces/semtools/diffusion/tests/test_auto_dtiprocess.py +++ b/nipype/interfaces/semtools/diffusion/tests/test_auto_dtiprocess.py @@ -83,7 +83,8 @@ def test_dtiprocess_inputs(): ), sigma=dict(argstr='--sigma %f', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), verbose=dict(argstr='--verbose ', ), diff --git a/nipype/interfaces/semtools/diffusion/tests/test_auto_extractNrrdVectorIndex.py b/nipype/interfaces/semtools/diffusion/tests/test_auto_extractNrrdVectorIndex.py index b6a904d649..81a0de61db 100644 --- a/nipype/interfaces/semtools/diffusion/tests/test_auto_extractNrrdVectorIndex.py +++ b/nipype/interfaces/semtools/diffusion/tests/test_auto_extractNrrdVectorIndex.py @@ -21,7 +21,8 @@ def test_extractNrrdVectorIndex_inputs(): ), setImageOrientation=dict(argstr='--setImageOrientation %s', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), vectorIndex=dict(argstr='--vectorIndex %d', ), diff --git a/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractAnisotropyMap.py b/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractAnisotropyMap.py index c9a1a591cc..10f2fbf341 100644 --- a/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractAnisotropyMap.py +++ b/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractAnisotropyMap.py @@ -21,7 +21,8 @@ def test_gtractAnisotropyMap_inputs(): outputVolume=dict(argstr='--outputVolume %s', hash_files=False, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = gtractAnisotropyMap.input_spec() diff --git a/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractAverageBvalues.py b/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractAverageBvalues.py index 318ad5fea4..25825aa2dd 100644 --- a/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractAverageBvalues.py +++ b/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractAverageBvalues.py @@ -23,7 +23,8 @@ def test_gtractAverageBvalues_inputs(): outputVolume=dict(argstr='--outputVolume %s', hash_files=False, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = gtractAverageBvalues.input_spec() diff --git a/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractClipAnisotropy.py b/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractClipAnisotropy.py index 0b3f2ec979..137dd8046b 100644 --- a/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractClipAnisotropy.py +++ b/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractClipAnisotropy.py @@ -23,7 +23,8 @@ def test_gtractClipAnisotropy_inputs(): outputVolume=dict(argstr='--outputVolume %s', hash_files=False, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = gtractClipAnisotropy.input_spec() diff --git a/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractCoRegAnatomy.py b/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractCoRegAnatomy.py index 9453af96ea..494c13715d 100644 --- a/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractCoRegAnatomy.py +++ b/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractCoRegAnatomy.py @@ -50,7 +50,8 @@ def test_gtractCoRegAnatomy_inputs(): ), spatialScale=dict(argstr='--spatialScale %d', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), transformType=dict(argstr='--transformType %s', ), diff --git a/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractConcatDwi.py b/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractConcatDwi.py index 68d85d66b6..73b53789f9 100644 --- a/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractConcatDwi.py +++ b/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractConcatDwi.py @@ -21,7 +21,8 @@ def test_gtractConcatDwi_inputs(): outputVolume=dict(argstr='--outputVolume %s', hash_files=False, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = gtractConcatDwi.input_spec() diff --git a/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractCopyImageOrientation.py b/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractCopyImageOrientation.py index 13fa034804..f37d8ffbc0 100644 --- a/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractCopyImageOrientation.py +++ b/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractCopyImageOrientation.py @@ -21,7 +21,8 @@ def test_gtractCopyImageOrientation_inputs(): outputVolume=dict(argstr='--outputVolume %s', hash_files=False, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = gtractCopyImageOrientation.input_spec() diff --git a/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractCoregBvalues.py b/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractCoregBvalues.py index fa7444c2a2..6de2f18e71 100644 --- a/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractCoregBvalues.py +++ b/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractCoregBvalues.py @@ -46,7 +46,8 @@ def test_gtractCoregBvalues_inputs(): ), spatialScale=dict(argstr='--spatialScale %f', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = gtractCoregBvalues.input_spec() diff --git a/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractCostFastMarching.py b/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractCostFastMarching.py index 6cdb0ca6b8..ec54af48d1 100644 --- a/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractCostFastMarching.py +++ b/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractCostFastMarching.py @@ -34,7 +34,8 @@ def test_gtractCostFastMarching_inputs(): ), stoppingValue=dict(argstr='--stoppingValue %f', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = gtractCostFastMarching.input_spec() diff --git a/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractCreateGuideFiber.py b/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractCreateGuideFiber.py index 1d2da52d72..f607ad4ccb 100644 --- a/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractCreateGuideFiber.py +++ b/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractCreateGuideFiber.py @@ -21,7 +21,8 @@ def test_gtractCreateGuideFiber_inputs(): outputFiber=dict(argstr='--outputFiber %s', hash_files=False, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), writeXMLPolyDataFile=dict(argstr='--writeXMLPolyDataFile ', ), diff --git a/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractFastMarchingTracking.py b/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractFastMarchingTracking.py index 9b30f161c6..22cae40fed 100644 --- a/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractFastMarchingTracking.py +++ b/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractFastMarchingTracking.py @@ -37,7 +37,8 @@ def test_gtractFastMarchingTracking_inputs(): ), startingSeedsLabel=dict(argstr='--startingSeedsLabel %d', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), trackingThreshold=dict(argstr='--trackingThreshold %f', ), diff --git a/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractFiberTracking.py b/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractFiberTracking.py index e3db9ee6d2..39a22ed5aa 100644 --- a/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractFiberTracking.py +++ b/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractFiberTracking.py @@ -57,7 +57,8 @@ def test_gtractFiberTracking_inputs(): ), tendG=dict(argstr='--tendG %f', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), trackingMethod=dict(argstr='--trackingMethod %s', ), diff --git a/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractImageConformity.py b/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractImageConformity.py index a78b5bb9f9..e126e4ca38 100644 --- a/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractImageConformity.py +++ b/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractImageConformity.py @@ -21,7 +21,8 @@ def test_gtractImageConformity_inputs(): outputVolume=dict(argstr='--outputVolume %s', hash_files=False, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = gtractImageConformity.input_spec() diff --git a/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractInvertBSplineTransform.py b/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractInvertBSplineTransform.py index de662d068b..81af4d6aa5 100644 --- a/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractInvertBSplineTransform.py +++ b/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractInvertBSplineTransform.py @@ -24,7 +24,8 @@ def test_gtractInvertBSplineTransform_inputs(): outputTransform=dict(argstr='--outputTransform %s', hash_files=False, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = gtractInvertBSplineTransform.input_spec() diff --git a/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractInvertDisplacementField.py b/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractInvertDisplacementField.py index 10b14f9def..4423309e60 100644 --- a/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractInvertDisplacementField.py +++ b/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractInvertDisplacementField.py @@ -23,7 +23,8 @@ def test_gtractInvertDisplacementField_inputs(): ), subsamplingFactor=dict(argstr='--subsamplingFactor %d', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = gtractInvertDisplacementField.input_spec() diff --git a/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractInvertRigidTransform.py b/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractInvertRigidTransform.py index a995a4e4cd..966821830f 100644 --- a/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractInvertRigidTransform.py +++ b/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractInvertRigidTransform.py @@ -19,7 +19,8 @@ def test_gtractInvertRigidTransform_inputs(): outputTransform=dict(argstr='--outputTransform %s', hash_files=False, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = gtractInvertRigidTransform.input_spec() diff --git a/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractResampleAnisotropy.py b/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractResampleAnisotropy.py index e9b668a716..fec40fec57 100644 --- a/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractResampleAnisotropy.py +++ b/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractResampleAnisotropy.py @@ -23,7 +23,8 @@ def test_gtractResampleAnisotropy_inputs(): outputVolume=dict(argstr='--outputVolume %s', hash_files=False, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), transformType=dict(argstr='--transformType %s', ), diff --git a/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractResampleB0.py b/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractResampleB0.py index edc706cf4e..d7c808d474 100644 --- a/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractResampleB0.py +++ b/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractResampleB0.py @@ -23,7 +23,8 @@ def test_gtractResampleB0_inputs(): outputVolume=dict(argstr='--outputVolume %s', hash_files=False, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), transformType=dict(argstr='--transformType %s', ), diff --git a/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractResampleCodeImage.py b/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractResampleCodeImage.py index 860e96fd09..29718e9c74 100644 --- a/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractResampleCodeImage.py +++ b/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractResampleCodeImage.py @@ -23,7 +23,8 @@ def test_gtractResampleCodeImage_inputs(): outputVolume=dict(argstr='--outputVolume %s', hash_files=False, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), transformType=dict(argstr='--transformType %s', ), diff --git a/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractResampleDWIInPlace.py b/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractResampleDWIInPlace.py index 3ecd5742e5..bdc33175f3 100644 --- a/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractResampleDWIInPlace.py +++ b/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractResampleDWIInPlace.py @@ -31,7 +31,8 @@ def test_gtractResampleDWIInPlace_inputs(): ), referenceVolume=dict(argstr='--referenceVolume %s', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), warpDWITransform=dict(argstr='--warpDWITransform %s', ), diff --git a/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractResampleFibers.py b/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractResampleFibers.py index 34997e8799..b632a364e8 100644 --- a/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractResampleFibers.py +++ b/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractResampleFibers.py @@ -23,7 +23,8 @@ def test_gtractResampleFibers_inputs(): outputTract=dict(argstr='--outputTract %s', hash_files=False, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), writeXMLPolyDataFile=dict(argstr='--writeXMLPolyDataFile ', ), diff --git a/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractTensor.py b/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractTensor.py index 0cd3f101db..3024df0100 100644 --- a/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractTensor.py +++ b/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractTensor.py @@ -39,7 +39,8 @@ def test_gtractTensor_inputs(): ), size=dict(argstr='--size %f', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = gtractTensor.input_spec() diff --git a/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractTransformToDisplacementField.py b/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractTransformToDisplacementField.py index 7feeabae6f..6ee2300ce9 100644 --- a/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractTransformToDisplacementField.py +++ b/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractTransformToDisplacementField.py @@ -21,7 +21,8 @@ def test_gtractTransformToDisplacementField_inputs(): outputDeformationFieldVolume=dict(argstr='--outputDeformationFieldVolume %s', hash_files=False, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = gtractTransformToDisplacementField.input_spec() diff --git a/nipype/interfaces/semtools/diffusion/tests/test_auto_maxcurvature.py b/nipype/interfaces/semtools/diffusion/tests/test_auto_maxcurvature.py index 7ded2e168c..07eb1805dc 100644 --- a/nipype/interfaces/semtools/diffusion/tests/test_auto_maxcurvature.py +++ b/nipype/interfaces/semtools/diffusion/tests/test_auto_maxcurvature.py @@ -19,7 +19,8 @@ def test_maxcurvature_inputs(): ), sigma=dict(argstr='--sigma %f', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), verbose=dict(argstr='--verbose ', ), diff --git a/nipype/interfaces/semtools/diffusion/tractography/tests/test_auto_UKFTractography.py b/nipype/interfaces/semtools/diffusion/tractography/tests/test_auto_UKFTractography.py index 0927be112c..0ebf64b10d 100644 --- a/nipype/interfaces/semtools/diffusion/tractography/tests/test_auto_UKFTractography.py +++ b/nipype/interfaces/semtools/diffusion/tractography/tests/test_auto_UKFTractography.py @@ -71,7 +71,8 @@ def test_UKFTractography_inputs(): ), storeGlyphs=dict(argstr='--storeGlyphs ', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), tracts=dict(argstr='--tracts %s', hash_files=False, diff --git a/nipype/interfaces/semtools/diffusion/tractography/tests/test_auto_fiberprocess.py b/nipype/interfaces/semtools/diffusion/tractography/tests/test_auto_fiberprocess.py index 11c67161dc..875efafa57 100644 --- a/nipype/interfaces/semtools/diffusion/tractography/tests/test_auto_fiberprocess.py +++ b/nipype/interfaces/semtools/diffusion/tractography/tests/test_auto_fiberprocess.py @@ -33,7 +33,8 @@ def test_fiberprocess_inputs(): ), tensor_volume=dict(argstr='--tensor_volume %s', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), verbose=dict(argstr='--verbose ', ), diff --git a/nipype/interfaces/semtools/diffusion/tractography/tests/test_auto_fiberstats.py b/nipype/interfaces/semtools/diffusion/tractography/tests/test_auto_fiberstats.py index 613664bb15..1722f7a45b 100644 --- a/nipype/interfaces/semtools/diffusion/tractography/tests/test_auto_fiberstats.py +++ b/nipype/interfaces/semtools/diffusion/tractography/tests/test_auto_fiberstats.py @@ -14,7 +14,8 @@ def test_fiberstats_inputs(): ignore_exception=dict(nohash=True, usedefault=True, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), verbose=dict(argstr='--verbose ', ), diff --git a/nipype/interfaces/semtools/diffusion/tractography/tests/test_auto_fibertrack.py b/nipype/interfaces/semtools/diffusion/tractography/tests/test_auto_fibertrack.py index 3dda03843f..99ca1ab608 100644 --- a/nipype/interfaces/semtools/diffusion/tractography/tests/test_auto_fibertrack.py +++ b/nipype/interfaces/semtools/diffusion/tractography/tests/test_auto_fibertrack.py @@ -35,7 +35,8 @@ def test_fibertrack_inputs(): ), target_label=dict(argstr='--target_label %d', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), verbose=dict(argstr='--verbose ', ), diff --git a/nipype/interfaces/semtools/filtering/tests/test_auto_CannyEdge.py b/nipype/interfaces/semtools/filtering/tests/test_auto_CannyEdge.py index 446f520077..c50c1d82ba 100644 --- a/nipype/interfaces/semtools/filtering/tests/test_auto_CannyEdge.py +++ b/nipype/interfaces/semtools/filtering/tests/test_auto_CannyEdge.py @@ -19,7 +19,8 @@ def test_CannyEdge_inputs(): outputVolume=dict(argstr='--outputVolume %s', hash_files=False, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), upperThreshold=dict(argstr='--upperThreshold %f', ), diff --git a/nipype/interfaces/semtools/filtering/tests/test_auto_CannySegmentationLevelSetImageFilter.py b/nipype/interfaces/semtools/filtering/tests/test_auto_CannySegmentationLevelSetImageFilter.py index 6014c01238..51e7cc218d 100644 --- a/nipype/interfaces/semtools/filtering/tests/test_auto_CannySegmentationLevelSetImageFilter.py +++ b/nipype/interfaces/semtools/filtering/tests/test_auto_CannySegmentationLevelSetImageFilter.py @@ -32,7 +32,8 @@ def test_CannySegmentationLevelSetImageFilter_inputs(): outputVolume=dict(argstr='--outputVolume %s', hash_files=False, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = CannySegmentationLevelSetImageFilter.input_spec() diff --git a/nipype/interfaces/semtools/filtering/tests/test_auto_DilateImage.py b/nipype/interfaces/semtools/filtering/tests/test_auto_DilateImage.py index 6690a83005..2f4ef52fd5 100644 --- a/nipype/interfaces/semtools/filtering/tests/test_auto_DilateImage.py +++ b/nipype/interfaces/semtools/filtering/tests/test_auto_DilateImage.py @@ -21,7 +21,8 @@ def test_DilateImage_inputs(): outputVolume=dict(argstr='--outputVolume %s', hash_files=False, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = DilateImage.input_spec() diff --git a/nipype/interfaces/semtools/filtering/tests/test_auto_DilateMask.py b/nipype/interfaces/semtools/filtering/tests/test_auto_DilateMask.py index 80c7fe1636..b72bc65156 100644 --- a/nipype/interfaces/semtools/filtering/tests/test_auto_DilateMask.py +++ b/nipype/interfaces/semtools/filtering/tests/test_auto_DilateMask.py @@ -23,7 +23,8 @@ def test_DilateMask_inputs(): ), sizeStructuralElement=dict(argstr='--sizeStructuralElement %d', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = DilateMask.input_spec() diff --git a/nipype/interfaces/semtools/filtering/tests/test_auto_DistanceMaps.py b/nipype/interfaces/semtools/filtering/tests/test_auto_DistanceMaps.py index ad886bd5c5..1783ee8f27 100644 --- a/nipype/interfaces/semtools/filtering/tests/test_auto_DistanceMaps.py +++ b/nipype/interfaces/semtools/filtering/tests/test_auto_DistanceMaps.py @@ -21,7 +21,8 @@ def test_DistanceMaps_inputs(): outputVolume=dict(argstr='--outputVolume %s', hash_files=False, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = DistanceMaps.input_spec() diff --git a/nipype/interfaces/semtools/filtering/tests/test_auto_DumpBinaryTrainingVectors.py b/nipype/interfaces/semtools/filtering/tests/test_auto_DumpBinaryTrainingVectors.py index 017f27c3af..ddc61cd418 100644 --- a/nipype/interfaces/semtools/filtering/tests/test_auto_DumpBinaryTrainingVectors.py +++ b/nipype/interfaces/semtools/filtering/tests/test_auto_DumpBinaryTrainingVectors.py @@ -16,7 +16,8 @@ def test_DumpBinaryTrainingVectors_inputs(): ), inputVectorFilename=dict(argstr='--inputVectorFilename %s', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = DumpBinaryTrainingVectors.input_spec() diff --git a/nipype/interfaces/semtools/filtering/tests/test_auto_ErodeImage.py b/nipype/interfaces/semtools/filtering/tests/test_auto_ErodeImage.py index c5cbd6fc35..113c1e08ef 100644 --- a/nipype/interfaces/semtools/filtering/tests/test_auto_ErodeImage.py +++ b/nipype/interfaces/semtools/filtering/tests/test_auto_ErodeImage.py @@ -21,7 +21,8 @@ def test_ErodeImage_inputs(): outputVolume=dict(argstr='--outputVolume %s', hash_files=False, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = ErodeImage.input_spec() diff --git a/nipype/interfaces/semtools/filtering/tests/test_auto_FlippedDifference.py b/nipype/interfaces/semtools/filtering/tests/test_auto_FlippedDifference.py index 6e73eb584a..82ea9a31a8 100644 --- a/nipype/interfaces/semtools/filtering/tests/test_auto_FlippedDifference.py +++ b/nipype/interfaces/semtools/filtering/tests/test_auto_FlippedDifference.py @@ -19,7 +19,8 @@ def test_FlippedDifference_inputs(): outputVolume=dict(argstr='--outputVolume %s', hash_files=False, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = FlippedDifference.input_spec() diff --git a/nipype/interfaces/semtools/filtering/tests/test_auto_GenerateBrainClippedImage.py b/nipype/interfaces/semtools/filtering/tests/test_auto_GenerateBrainClippedImage.py index 5a3bcbd888..6672cd4212 100644 --- a/nipype/interfaces/semtools/filtering/tests/test_auto_GenerateBrainClippedImage.py +++ b/nipype/interfaces/semtools/filtering/tests/test_auto_GenerateBrainClippedImage.py @@ -21,7 +21,8 @@ def test_GenerateBrainClippedImage_inputs(): outputFileName=dict(argstr='--outputFileName %s', hash_files=False, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = GenerateBrainClippedImage.input_spec() diff --git a/nipype/interfaces/semtools/filtering/tests/test_auto_GenerateSummedGradientImage.py b/nipype/interfaces/semtools/filtering/tests/test_auto_GenerateSummedGradientImage.py index ddca6453e8..dd275ef4d1 100644 --- a/nipype/interfaces/semtools/filtering/tests/test_auto_GenerateSummedGradientImage.py +++ b/nipype/interfaces/semtools/filtering/tests/test_auto_GenerateSummedGradientImage.py @@ -23,7 +23,8 @@ def test_GenerateSummedGradientImage_inputs(): outputFileName=dict(argstr='--outputFileName %s', hash_files=False, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = GenerateSummedGradientImage.input_spec() diff --git a/nipype/interfaces/semtools/filtering/tests/test_auto_GenerateTestImage.py b/nipype/interfaces/semtools/filtering/tests/test_auto_GenerateTestImage.py index 09915d813c..d8fab4b6c7 100644 --- a/nipype/interfaces/semtools/filtering/tests/test_auto_GenerateTestImage.py +++ b/nipype/interfaces/semtools/filtering/tests/test_auto_GenerateTestImage.py @@ -21,7 +21,8 @@ def test_GenerateTestImage_inputs(): ), outputVolumeSize=dict(argstr='--outputVolumeSize %f', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), upperBoundOfOutputVolume=dict(argstr='--upperBoundOfOutputVolume %f', ), diff --git a/nipype/interfaces/semtools/filtering/tests/test_auto_GradientAnisotropicDiffusionImageFilter.py b/nipype/interfaces/semtools/filtering/tests/test_auto_GradientAnisotropicDiffusionImageFilter.py index 625a0fe338..694868d7b0 100644 --- a/nipype/interfaces/semtools/filtering/tests/test_auto_GradientAnisotropicDiffusionImageFilter.py +++ b/nipype/interfaces/semtools/filtering/tests/test_auto_GradientAnisotropicDiffusionImageFilter.py @@ -21,7 +21,8 @@ def test_GradientAnisotropicDiffusionImageFilter_inputs(): outputVolume=dict(argstr='--outputVolume %s', hash_files=False, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), timeStep=dict(argstr='--timeStep %f', ), diff --git a/nipype/interfaces/semtools/filtering/tests/test_auto_HammerAttributeCreator.py b/nipype/interfaces/semtools/filtering/tests/test_auto_HammerAttributeCreator.py index 128d3d62d1..434148c9cc 100644 --- a/nipype/interfaces/semtools/filtering/tests/test_auto_HammerAttributeCreator.py +++ b/nipype/interfaces/semtools/filtering/tests/test_auto_HammerAttributeCreator.py @@ -24,7 +24,8 @@ def test_HammerAttributeCreator_inputs(): ), outputVolumeBase=dict(argstr='--outputVolumeBase %s', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = HammerAttributeCreator.input_spec() diff --git a/nipype/interfaces/semtools/filtering/tests/test_auto_NeighborhoodMean.py b/nipype/interfaces/semtools/filtering/tests/test_auto_NeighborhoodMean.py index c029f33409..d920277b11 100644 --- a/nipype/interfaces/semtools/filtering/tests/test_auto_NeighborhoodMean.py +++ b/nipype/interfaces/semtools/filtering/tests/test_auto_NeighborhoodMean.py @@ -21,7 +21,8 @@ def test_NeighborhoodMean_inputs(): outputVolume=dict(argstr='--outputVolume %s', hash_files=False, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = NeighborhoodMean.input_spec() diff --git a/nipype/interfaces/semtools/filtering/tests/test_auto_NeighborhoodMedian.py b/nipype/interfaces/semtools/filtering/tests/test_auto_NeighborhoodMedian.py index 4a80af0377..1b8d035c3d 100644 --- a/nipype/interfaces/semtools/filtering/tests/test_auto_NeighborhoodMedian.py +++ b/nipype/interfaces/semtools/filtering/tests/test_auto_NeighborhoodMedian.py @@ -21,7 +21,8 @@ def test_NeighborhoodMedian_inputs(): outputVolume=dict(argstr='--outputVolume %s', hash_files=False, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = NeighborhoodMedian.input_spec() diff --git a/nipype/interfaces/semtools/filtering/tests/test_auto_STAPLEAnalysis.py b/nipype/interfaces/semtools/filtering/tests/test_auto_STAPLEAnalysis.py index 03ffe65d04..6d45bec9ca 100644 --- a/nipype/interfaces/semtools/filtering/tests/test_auto_STAPLEAnalysis.py +++ b/nipype/interfaces/semtools/filtering/tests/test_auto_STAPLEAnalysis.py @@ -19,7 +19,8 @@ def test_STAPLEAnalysis_inputs(): outputVolume=dict(argstr='--outputVolume %s', hash_files=False, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = STAPLEAnalysis.input_spec() diff --git a/nipype/interfaces/semtools/filtering/tests/test_auto_TextureFromNoiseImageFilter.py b/nipype/interfaces/semtools/filtering/tests/test_auto_TextureFromNoiseImageFilter.py index de0816897c..5bbeaa4640 100644 --- a/nipype/interfaces/semtools/filtering/tests/test_auto_TextureFromNoiseImageFilter.py +++ b/nipype/interfaces/semtools/filtering/tests/test_auto_TextureFromNoiseImageFilter.py @@ -19,7 +19,8 @@ def test_TextureFromNoiseImageFilter_inputs(): outputVolume=dict(argstr='--outputVolume %s', hash_files=False, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = TextureFromNoiseImageFilter.input_spec() diff --git a/nipype/interfaces/semtools/filtering/tests/test_auto_TextureMeasureFilter.py b/nipype/interfaces/semtools/filtering/tests/test_auto_TextureMeasureFilter.py index de8a74c45e..c6ad265663 100644 --- a/nipype/interfaces/semtools/filtering/tests/test_auto_TextureMeasureFilter.py +++ b/nipype/interfaces/semtools/filtering/tests/test_auto_TextureMeasureFilter.py @@ -23,7 +23,8 @@ def test_TextureMeasureFilter_inputs(): outputFilename=dict(argstr='--outputFilename %s', hash_files=False, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = TextureMeasureFilter.input_spec() diff --git a/nipype/interfaces/semtools/filtering/tests/test_auto_UnbiasedNonLocalMeans.py b/nipype/interfaces/semtools/filtering/tests/test_auto_UnbiasedNonLocalMeans.py index f20b6b5ca7..6aa1430502 100644 --- a/nipype/interfaces/semtools/filtering/tests/test_auto_UnbiasedNonLocalMeans.py +++ b/nipype/interfaces/semtools/filtering/tests/test_auto_UnbiasedNonLocalMeans.py @@ -31,7 +31,8 @@ def test_UnbiasedNonLocalMeans_inputs(): ), sigma=dict(argstr='--sigma %f', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = UnbiasedNonLocalMeans.input_spec() diff --git a/nipype/interfaces/semtools/legacy/tests/test_auto_scalartransform.py b/nipype/interfaces/semtools/legacy/tests/test_auto_scalartransform.py index 83aaec5ea3..64a33379eb 100644 --- a/nipype/interfaces/semtools/legacy/tests/test_auto_scalartransform.py +++ b/nipype/interfaces/semtools/legacy/tests/test_auto_scalartransform.py @@ -25,7 +25,8 @@ def test_scalartransform_inputs(): output_image=dict(argstr='--output_image %s', hash_files=False, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), transformation=dict(argstr='--transformation %s', hash_files=False, diff --git a/nipype/interfaces/semtools/registration/tests/test_auto_BRAINSDemonWarp.py b/nipype/interfaces/semtools/registration/tests/test_auto_BRAINSDemonWarp.py index 9aee3d80d1..92d51611eb 100644 --- a/nipype/interfaces/semtools/registration/tests/test_auto_BRAINSDemonWarp.py +++ b/nipype/interfaces/semtools/registration/tests/test_auto_BRAINSDemonWarp.py @@ -96,7 +96,8 @@ def test_BRAINSDemonWarp_inputs(): ), smoothDisplacementFieldSigma=dict(argstr='--smoothDisplacementFieldSigma %f', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), upFieldSmoothing=dict(argstr='--upFieldSmoothing %f', ), diff --git a/nipype/interfaces/semtools/registration/tests/test_auto_BRAINSFit.py b/nipype/interfaces/semtools/registration/tests/test_auto_BRAINSFit.py index 7447f574af..9e4bacc88f 100644 --- a/nipype/interfaces/semtools/registration/tests/test_auto_BRAINSFit.py +++ b/nipype/interfaces/semtools/registration/tests/test_auto_BRAINSFit.py @@ -130,7 +130,8 @@ def test_BRAINSFit_inputs(): strippedOutputTransform=dict(argstr='--strippedOutputTransform %s', hash_files=False, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), transformType=dict(argstr='--transformType %s', sep=',', diff --git a/nipype/interfaces/semtools/registration/tests/test_auto_BRAINSResample.py b/nipype/interfaces/semtools/registration/tests/test_auto_BRAINSResample.py index 6e10f86ca0..bb2c107ace 100644 --- a/nipype/interfaces/semtools/registration/tests/test_auto_BRAINSResample.py +++ b/nipype/interfaces/semtools/registration/tests/test_auto_BRAINSResample.py @@ -34,7 +34,8 @@ def test_BRAINSResample_inputs(): ), referenceVolume=dict(argstr='--referenceVolume %s', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), warpTransform=dict(argstr='--warpTransform %s', ), diff --git a/nipype/interfaces/semtools/registration/tests/test_auto_BRAINSResize.py b/nipype/interfaces/semtools/registration/tests/test_auto_BRAINSResize.py index 4c90eaf915..61babea6f1 100644 --- a/nipype/interfaces/semtools/registration/tests/test_auto_BRAINSResize.py +++ b/nipype/interfaces/semtools/registration/tests/test_auto_BRAINSResize.py @@ -21,7 +21,8 @@ def test_BRAINSResize_inputs(): ), scaleFactor=dict(argstr='--scaleFactor %f', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = BRAINSResize.input_spec() diff --git a/nipype/interfaces/semtools/registration/tests/test_auto_BRAINSTransformFromFiducials.py b/nipype/interfaces/semtools/registration/tests/test_auto_BRAINSTransformFromFiducials.py index bc0ead4e53..9d6f296b95 100644 --- a/nipype/interfaces/semtools/registration/tests/test_auto_BRAINSTransformFromFiducials.py +++ b/nipype/interfaces/semtools/registration/tests/test_auto_BRAINSTransformFromFiducials.py @@ -25,7 +25,8 @@ def test_BRAINSTransformFromFiducials_inputs(): saveTransform=dict(argstr='--saveTransform %s', hash_files=False, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), transformType=dict(argstr='--transformType %s', ), diff --git a/nipype/interfaces/semtools/registration/tests/test_auto_VBRAINSDemonWarp.py b/nipype/interfaces/semtools/registration/tests/test_auto_VBRAINSDemonWarp.py index 96e28abafa..3a4579cf44 100644 --- a/nipype/interfaces/semtools/registration/tests/test_auto_VBRAINSDemonWarp.py +++ b/nipype/interfaces/semtools/registration/tests/test_auto_VBRAINSDemonWarp.py @@ -96,7 +96,8 @@ def test_VBRAINSDemonWarp_inputs(): ), smoothDisplacementFieldSigma=dict(argstr='--smoothDisplacementFieldSigma %f', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), upFieldSmoothing=dict(argstr='--upFieldSmoothing %f', ), diff --git a/nipype/interfaces/semtools/segmentation/tests/test_auto_BRAINSABC.py b/nipype/interfaces/semtools/segmentation/tests/test_auto_BRAINSABC.py index 110cfcef77..4858822be0 100644 --- a/nipype/interfaces/semtools/segmentation/tests/test_auto_BRAINSABC.py +++ b/nipype/interfaces/semtools/segmentation/tests/test_auto_BRAINSABC.py @@ -84,7 +84,8 @@ def test_BRAINSABC_inputs(): ), subjectIntermodeTransformType=dict(argstr='--subjectIntermodeTransformType %s', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), useKNN=dict(argstr='--useKNN ', ), diff --git a/nipype/interfaces/semtools/segmentation/tests/test_auto_BRAINSConstellationDetector.py b/nipype/interfaces/semtools/segmentation/tests/test_auto_BRAINSConstellationDetector.py index 30ffbaa945..ebf7cf95c8 100644 --- a/nipype/interfaces/semtools/segmentation/tests/test_auto_BRAINSConstellationDetector.py +++ b/nipype/interfaces/semtools/segmentation/tests/test_auto_BRAINSConstellationDetector.py @@ -98,7 +98,8 @@ def test_BRAINSConstellationDetector_inputs(): ), rpc=dict(argstr='--rpc %f', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), trimRescaledIntensities=dict(argstr='--trimRescaledIntensities %f', ), diff --git a/nipype/interfaces/semtools/segmentation/tests/test_auto_BRAINSCreateLabelMapFromProbabilityMaps.py b/nipype/interfaces/semtools/segmentation/tests/test_auto_BRAINSCreateLabelMapFromProbabilityMaps.py index 5a8f506310..3b6424a6fe 100644 --- a/nipype/interfaces/semtools/segmentation/tests/test_auto_BRAINSCreateLabelMapFromProbabilityMaps.py +++ b/nipype/interfaces/semtools/segmentation/tests/test_auto_BRAINSCreateLabelMapFromProbabilityMaps.py @@ -30,7 +30,8 @@ def test_BRAINSCreateLabelMapFromProbabilityMaps_inputs(): priorLabelCodes=dict(argstr='--priorLabelCodes %s', sep=',', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = BRAINSCreateLabelMapFromProbabilityMaps.input_spec() diff --git a/nipype/interfaces/semtools/segmentation/tests/test_auto_BRAINSCut.py b/nipype/interfaces/semtools/segmentation/tests/test_auto_BRAINSCut.py index 6e7652979e..210194d608 100644 --- a/nipype/interfaces/semtools/segmentation/tests/test_auto_BRAINSCut.py +++ b/nipype/interfaces/semtools/segmentation/tests/test_auto_BRAINSCut.py @@ -38,7 +38,8 @@ def test_BRAINSCut_inputs(): ), randomTreeDepth=dict(argstr='--randomTreeDepth %d', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), trainModel=dict(argstr='--trainModel ', ), diff --git a/nipype/interfaces/semtools/segmentation/tests/test_auto_BRAINSMultiSTAPLE.py b/nipype/interfaces/semtools/segmentation/tests/test_auto_BRAINSMultiSTAPLE.py index 1cd57a8267..943488a385 100644 --- a/nipype/interfaces/semtools/segmentation/tests/test_auto_BRAINSMultiSTAPLE.py +++ b/nipype/interfaces/semtools/segmentation/tests/test_auto_BRAINSMultiSTAPLE.py @@ -30,7 +30,8 @@ def test_BRAINSMultiSTAPLE_inputs(): ), skipResampling=dict(argstr='--skipResampling ', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = BRAINSMultiSTAPLE.input_spec() diff --git a/nipype/interfaces/semtools/segmentation/tests/test_auto_BRAINSROIAuto.py b/nipype/interfaces/semtools/segmentation/tests/test_auto_BRAINSROIAuto.py index fe1ce50a3d..1746f5802b 100644 --- a/nipype/interfaces/semtools/segmentation/tests/test_auto_BRAINSROIAuto.py +++ b/nipype/interfaces/semtools/segmentation/tests/test_auto_BRAINSROIAuto.py @@ -34,7 +34,8 @@ def test_BRAINSROIAuto_inputs(): ), outputVolumePixelType=dict(argstr='--outputVolumePixelType %s', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), thresholdCorrectionFactor=dict(argstr='--thresholdCorrectionFactor %f', ), diff --git a/nipype/interfaces/semtools/segmentation/tests/test_auto_BinaryMaskEditorBasedOnLandmarks.py b/nipype/interfaces/semtools/segmentation/tests/test_auto_BinaryMaskEditorBasedOnLandmarks.py index 2e754dd1b1..61306ad365 100644 --- a/nipype/interfaces/semtools/segmentation/tests/test_auto_BinaryMaskEditorBasedOnLandmarks.py +++ b/nipype/interfaces/semtools/segmentation/tests/test_auto_BinaryMaskEditorBasedOnLandmarks.py @@ -31,7 +31,8 @@ def test_BinaryMaskEditorBasedOnLandmarks_inputs(): setCutDirectionForObliquePlane=dict(argstr='--setCutDirectionForObliquePlane %s', sep=',', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = BinaryMaskEditorBasedOnLandmarks.input_spec() diff --git a/nipype/interfaces/semtools/segmentation/tests/test_auto_ESLR.py b/nipype/interfaces/semtools/segmentation/tests/test_auto_ESLR.py index 4ebd23e30f..c74a10b53c 100644 --- a/nipype/interfaces/semtools/segmentation/tests/test_auto_ESLR.py +++ b/nipype/interfaces/semtools/segmentation/tests/test_auto_ESLR.py @@ -31,7 +31,8 @@ def test_ESLR_inputs(): ), safetySize=dict(argstr='--safetySize %d', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = ESLR.input_spec() diff --git a/nipype/interfaces/semtools/tests/test_auto_DWICompare.py b/nipype/interfaces/semtools/tests/test_auto_DWICompare.py index 2d50880990..559a455485 100644 --- a/nipype/interfaces/semtools/tests/test_auto_DWICompare.py +++ b/nipype/interfaces/semtools/tests/test_auto_DWICompare.py @@ -16,7 +16,8 @@ def test_DWICompare_inputs(): ), inputVolume2=dict(argstr='--inputVolume2 %s', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = DWICompare.input_spec() diff --git a/nipype/interfaces/semtools/tests/test_auto_DWISimpleCompare.py b/nipype/interfaces/semtools/tests/test_auto_DWISimpleCompare.py index 437d2d9087..6e63c9df4c 100644 --- a/nipype/interfaces/semtools/tests/test_auto_DWISimpleCompare.py +++ b/nipype/interfaces/semtools/tests/test_auto_DWISimpleCompare.py @@ -18,7 +18,8 @@ def test_DWISimpleCompare_inputs(): ), inputVolume2=dict(argstr='--inputVolume2 %s', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = DWISimpleCompare.input_spec() diff --git a/nipype/interfaces/semtools/tests/test_auto_GenerateCsfClippedFromClassifiedImage.py b/nipype/interfaces/semtools/tests/test_auto_GenerateCsfClippedFromClassifiedImage.py index 0ae702b805..c88b636252 100644 --- a/nipype/interfaces/semtools/tests/test_auto_GenerateCsfClippedFromClassifiedImage.py +++ b/nipype/interfaces/semtools/tests/test_auto_GenerateCsfClippedFromClassifiedImage.py @@ -17,7 +17,8 @@ def test_GenerateCsfClippedFromClassifiedImage_inputs(): outputVolume=dict(argstr='--outputVolume %s', hash_files=False, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = GenerateCsfClippedFromClassifiedImage.input_spec() diff --git a/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSAlignMSP.py b/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSAlignMSP.py index 9636e284f7..aced937722 100644 --- a/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSAlignMSP.py +++ b/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSAlignMSP.py @@ -33,7 +33,8 @@ def test_BRAINSAlignMSP_inputs(): resultsDir=dict(argstr='--resultsDir %s', hash_files=False, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), trimRescaledIntensities=dict(argstr='--trimRescaledIntensities %f', ), diff --git a/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSClipInferior.py b/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSClipInferior.py index d08f270b5e..a0b78adbbd 100644 --- a/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSClipInferior.py +++ b/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSClipInferior.py @@ -23,7 +23,8 @@ def test_BRAINSClipInferior_inputs(): outputVolume=dict(argstr='--outputVolume %s', hash_files=False, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = BRAINSClipInferior.input_spec() diff --git a/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSConstellationModeler.py b/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSConstellationModeler.py index ff5447109c..de684005fc 100644 --- a/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSConstellationModeler.py +++ b/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSConstellationModeler.py @@ -35,7 +35,8 @@ def test_BRAINSConstellationModeler_inputs(): ), saveOptimizedLandmarks=dict(argstr='--saveOptimizedLandmarks ', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), trimRescaledIntensities=dict(argstr='--trimRescaledIntensities %f', ), diff --git a/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSEyeDetector.py b/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSEyeDetector.py index b9286e8835..d7fc1f048b 100644 --- a/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSEyeDetector.py +++ b/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSEyeDetector.py @@ -21,7 +21,8 @@ def test_BRAINSEyeDetector_inputs(): outputVolume=dict(argstr='--outputVolume %s', hash_files=False, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = BRAINSEyeDetector.input_spec() diff --git a/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSInitializedControlPoints.py b/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSInitializedControlPoints.py index d8288ff86f..9edd6e2170 100644 --- a/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSInitializedControlPoints.py +++ b/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSInitializedControlPoints.py @@ -27,7 +27,8 @@ def test_BRAINSInitializedControlPoints_inputs(): splineGridSize=dict(argstr='--splineGridSize %s', sep=',', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = BRAINSInitializedControlPoints.input_spec() diff --git a/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSLandmarkInitializer.py b/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSLandmarkInitializer.py index 332534edf8..49db60b207 100644 --- a/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSLandmarkInitializer.py +++ b/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSLandmarkInitializer.py @@ -21,7 +21,8 @@ def test_BRAINSLandmarkInitializer_inputs(): outputTransformFilename=dict(argstr='--outputTransformFilename %s', hash_files=False, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = BRAINSLandmarkInitializer.input_spec() diff --git a/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSLinearModelerEPCA.py b/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSLinearModelerEPCA.py index 9bcf5409c7..f0b4b048a8 100644 --- a/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSLinearModelerEPCA.py +++ b/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSLinearModelerEPCA.py @@ -16,7 +16,8 @@ def test_BRAINSLinearModelerEPCA_inputs(): ), numberOfThreads=dict(argstr='--numberOfThreads %d', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = BRAINSLinearModelerEPCA.input_spec() diff --git a/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSLmkTransform.py b/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSLmkTransform.py index 048b66b32b..4cb1ca5a6a 100644 --- a/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSLmkTransform.py +++ b/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSLmkTransform.py @@ -28,7 +28,8 @@ def test_BRAINSLmkTransform_inputs(): outputResampledVolume=dict(argstr='--outputResampledVolume %s', hash_files=False, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = BRAINSLmkTransform.input_spec() diff --git a/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSMush.py b/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSMush.py index 31548abd1c..22175171aa 100644 --- a/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSMush.py +++ b/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSMush.py @@ -46,7 +46,8 @@ def test_BRAINSMush_inputs(): seed=dict(argstr='--seed %s', sep=',', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), upperThresholdFactor=dict(argstr='--upperThresholdFactor %f', ), diff --git a/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSSnapShotWriter.py b/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSSnapShotWriter.py index a4fd3abf5d..bec713100c 100644 --- a/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSSnapShotWriter.py +++ b/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSSnapShotWriter.py @@ -31,7 +31,8 @@ def test_BRAINSSnapShotWriter_inputs(): outputFilename=dict(argstr='--outputFilename %s', hash_files=False, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = BRAINSSnapShotWriter.input_spec() diff --git a/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSTransformConvert.py b/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSTransformConvert.py index 5c168fbb6a..cb66216d8d 100644 --- a/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSTransformConvert.py +++ b/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSTransformConvert.py @@ -26,7 +26,8 @@ def test_BRAINSTransformConvert_inputs(): ), referenceVolume=dict(argstr='--referenceVolume %s', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = BRAINSTransformConvert.input_spec() diff --git a/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSTrimForegroundInDirection.py b/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSTrimForegroundInDirection.py index 364747314a..3c37fbc518 100644 --- a/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSTrimForegroundInDirection.py +++ b/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSTrimForegroundInDirection.py @@ -29,7 +29,8 @@ def test_BRAINSTrimForegroundInDirection_inputs(): outputVolume=dict(argstr='--outputVolume %s', hash_files=False, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = BRAINSTrimForegroundInDirection.input_spec() diff --git a/nipype/interfaces/semtools/utilities/tests/test_auto_CleanUpOverlapLabels.py b/nipype/interfaces/semtools/utilities/tests/test_auto_CleanUpOverlapLabels.py index bf91238a1d..6b305e1d6e 100644 --- a/nipype/interfaces/semtools/utilities/tests/test_auto_CleanUpOverlapLabels.py +++ b/nipype/interfaces/semtools/utilities/tests/test_auto_CleanUpOverlapLabels.py @@ -17,7 +17,8 @@ def test_CleanUpOverlapLabels_inputs(): outputBinaryVolumes=dict(argstr='--outputBinaryVolumes %s...', hash_files=False, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = CleanUpOverlapLabels.input_spec() diff --git a/nipype/interfaces/semtools/utilities/tests/test_auto_FindCenterOfBrain.py b/nipype/interfaces/semtools/utilities/tests/test_auto_FindCenterOfBrain.py index d15f647808..3394a960fc 100644 --- a/nipype/interfaces/semtools/utilities/tests/test_auto_FindCenterOfBrain.py +++ b/nipype/interfaces/semtools/utilities/tests/test_auto_FindCenterOfBrain.py @@ -50,7 +50,8 @@ def test_FindCenterOfBrain_inputs(): ), otsuPercentileThreshold=dict(argstr='--otsuPercentileThreshold %f', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = FindCenterOfBrain.input_spec() diff --git a/nipype/interfaces/semtools/utilities/tests/test_auto_GenerateLabelMapFromProbabilityMap.py b/nipype/interfaces/semtools/utilities/tests/test_auto_GenerateLabelMapFromProbabilityMap.py index cda3720812..f66d1a8448 100644 --- a/nipype/interfaces/semtools/utilities/tests/test_auto_GenerateLabelMapFromProbabilityMap.py +++ b/nipype/interfaces/semtools/utilities/tests/test_auto_GenerateLabelMapFromProbabilityMap.py @@ -19,7 +19,8 @@ def test_GenerateLabelMapFromProbabilityMap_inputs(): outputLabelVolume=dict(argstr='--outputLabelVolume %s', hash_files=False, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = GenerateLabelMapFromProbabilityMap.input_spec() diff --git a/nipype/interfaces/semtools/utilities/tests/test_auto_ImageRegionPlotter.py b/nipype/interfaces/semtools/utilities/tests/test_auto_ImageRegionPlotter.py index 6823172b50..0dcc63ea40 100644 --- a/nipype/interfaces/semtools/utilities/tests/test_auto_ImageRegionPlotter.py +++ b/nipype/interfaces/semtools/utilities/tests/test_auto_ImageRegionPlotter.py @@ -24,7 +24,8 @@ def test_ImageRegionPlotter_inputs(): ), outputJointHistogramData=dict(argstr='--outputJointHistogramData %s', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), useIntensityForHistogram=dict(argstr='--useIntensityForHistogram ', ), diff --git a/nipype/interfaces/semtools/utilities/tests/test_auto_JointHistogram.py b/nipype/interfaces/semtools/utilities/tests/test_auto_JointHistogram.py index 9b8df83880..c46f64b679 100644 --- a/nipype/interfaces/semtools/utilities/tests/test_auto_JointHistogram.py +++ b/nipype/interfaces/semtools/utilities/tests/test_auto_JointHistogram.py @@ -22,7 +22,8 @@ def test_JointHistogram_inputs(): ), outputJointHistogramImage=dict(argstr='--outputJointHistogramImage %s', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), verbose=dict(argstr='--verbose ', ), diff --git a/nipype/interfaces/semtools/utilities/tests/test_auto_ShuffleVectorsModule.py b/nipype/interfaces/semtools/utilities/tests/test_auto_ShuffleVectorsModule.py index 1cf264afcc..ccb9afc0c2 100644 --- a/nipype/interfaces/semtools/utilities/tests/test_auto_ShuffleVectorsModule.py +++ b/nipype/interfaces/semtools/utilities/tests/test_auto_ShuffleVectorsModule.py @@ -19,7 +19,8 @@ def test_ShuffleVectorsModule_inputs(): ), resampleProportion=dict(argstr='--resampleProportion %f', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = ShuffleVectorsModule.input_spec() diff --git a/nipype/interfaces/semtools/utilities/tests/test_auto_fcsv_to_hdf5.py b/nipype/interfaces/semtools/utilities/tests/test_auto_fcsv_to_hdf5.py index 927a33fd04..1d8976faca 100644 --- a/nipype/interfaces/semtools/utilities/tests/test_auto_fcsv_to_hdf5.py +++ b/nipype/interfaces/semtools/utilities/tests/test_auto_fcsv_to_hdf5.py @@ -24,7 +24,8 @@ def test_fcsv_to_hdf5_inputs(): ), numberOfThreads=dict(argstr='--numberOfThreads %d', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), versionID=dict(argstr='--versionID %s', ), diff --git a/nipype/interfaces/semtools/utilities/tests/test_auto_insertMidACPCpoint.py b/nipype/interfaces/semtools/utilities/tests/test_auto_insertMidACPCpoint.py index abb847e478..fe413744f3 100644 --- a/nipype/interfaces/semtools/utilities/tests/test_auto_insertMidACPCpoint.py +++ b/nipype/interfaces/semtools/utilities/tests/test_auto_insertMidACPCpoint.py @@ -17,7 +17,8 @@ def test_insertMidACPCpoint_inputs(): outputLandmarkFile=dict(argstr='--outputLandmarkFile %s', hash_files=False, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = insertMidACPCpoint.input_spec() diff --git a/nipype/interfaces/semtools/utilities/tests/test_auto_landmarksConstellationAligner.py b/nipype/interfaces/semtools/utilities/tests/test_auto_landmarksConstellationAligner.py index 3122d627ed..cb2cf17a4e 100644 --- a/nipype/interfaces/semtools/utilities/tests/test_auto_landmarksConstellationAligner.py +++ b/nipype/interfaces/semtools/utilities/tests/test_auto_landmarksConstellationAligner.py @@ -17,7 +17,8 @@ def test_landmarksConstellationAligner_inputs(): outputLandmarksPaired=dict(argstr='--outputLandmarksPaired %s', hash_files=False, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = landmarksConstellationAligner.input_spec() diff --git a/nipype/interfaces/semtools/utilities/tests/test_auto_landmarksConstellationWeights.py b/nipype/interfaces/semtools/utilities/tests/test_auto_landmarksConstellationWeights.py index 49772ca873..b5b4bede05 100644 --- a/nipype/interfaces/semtools/utilities/tests/test_auto_landmarksConstellationWeights.py +++ b/nipype/interfaces/semtools/utilities/tests/test_auto_landmarksConstellationWeights.py @@ -21,7 +21,8 @@ def test_landmarksConstellationWeights_inputs(): outputWeightsList=dict(argstr='--outputWeightsList %s', hash_files=False, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = landmarksConstellationWeights.input_spec() diff --git a/nipype/interfaces/slicer/diffusion/tests/test_auto_DTIexport.py b/nipype/interfaces/slicer/diffusion/tests/test_auto_DTIexport.py index 649b1db802..a251b7f4d2 100644 --- a/nipype/interfaces/slicer/diffusion/tests/test_auto_DTIexport.py +++ b/nipype/interfaces/slicer/diffusion/tests/test_auto_DTIexport.py @@ -19,7 +19,8 @@ def test_DTIexport_inputs(): hash_files=False, position=-1, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = DTIexport.input_spec() diff --git a/nipype/interfaces/slicer/diffusion/tests/test_auto_DTIimport.py b/nipype/interfaces/slicer/diffusion/tests/test_auto_DTIimport.py index 05f18b318e..988f16ed0e 100644 --- a/nipype/interfaces/slicer/diffusion/tests/test_auto_DTIimport.py +++ b/nipype/interfaces/slicer/diffusion/tests/test_auto_DTIimport.py @@ -19,7 +19,8 @@ def test_DTIimport_inputs(): hash_files=False, position=-1, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), testingmode=dict(argstr='--testingmode ', ), diff --git a/nipype/interfaces/slicer/diffusion/tests/test_auto_DWIJointRicianLMMSEFilter.py b/nipype/interfaces/slicer/diffusion/tests/test_auto_DWIJointRicianLMMSEFilter.py index 9cf7cc1008..8e8e429125 100644 --- a/nipype/interfaces/slicer/diffusion/tests/test_auto_DWIJointRicianLMMSEFilter.py +++ b/nipype/interfaces/slicer/diffusion/tests/test_auto_DWIJointRicianLMMSEFilter.py @@ -29,7 +29,8 @@ def test_DWIJointRicianLMMSEFilter_inputs(): rf=dict(argstr='--rf %s', sep=',', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = DWIJointRicianLMMSEFilter.input_spec() diff --git a/nipype/interfaces/slicer/diffusion/tests/test_auto_DWIRicianLMMSEFilter.py b/nipype/interfaces/slicer/diffusion/tests/test_auto_DWIRicianLMMSEFilter.py index 97c015d7f4..f9a9d42b9e 100644 --- a/nipype/interfaces/slicer/diffusion/tests/test_auto_DWIRicianLMMSEFilter.py +++ b/nipype/interfaces/slicer/diffusion/tests/test_auto_DWIRicianLMMSEFilter.py @@ -39,7 +39,8 @@ def test_DWIRicianLMMSEFilter_inputs(): rf=dict(argstr='--rf %s', sep=',', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), uav=dict(argstr='--uav ', ), diff --git a/nipype/interfaces/slicer/diffusion/tests/test_auto_DWIToDTIEstimation.py b/nipype/interfaces/slicer/diffusion/tests/test_auto_DWIToDTIEstimation.py index ba807a5052..f280f0c2f2 100644 --- a/nipype/interfaces/slicer/diffusion/tests/test_auto_DWIToDTIEstimation.py +++ b/nipype/interfaces/slicer/diffusion/tests/test_auto_DWIToDTIEstimation.py @@ -29,7 +29,8 @@ def test_DWIToDTIEstimation_inputs(): ), shiftNeg=dict(argstr='--shiftNeg ', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = DWIToDTIEstimation.input_spec() diff --git a/nipype/interfaces/slicer/diffusion/tests/test_auto_DiffusionTensorScalarMeasurements.py b/nipype/interfaces/slicer/diffusion/tests/test_auto_DiffusionTensorScalarMeasurements.py index 0b997a9c40..a24b164c04 100644 --- a/nipype/interfaces/slicer/diffusion/tests/test_auto_DiffusionTensorScalarMeasurements.py +++ b/nipype/interfaces/slicer/diffusion/tests/test_auto_DiffusionTensorScalarMeasurements.py @@ -21,7 +21,8 @@ def test_DiffusionTensorScalarMeasurements_inputs(): hash_files=False, position=-1, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = DiffusionTensorScalarMeasurements.input_spec() diff --git a/nipype/interfaces/slicer/diffusion/tests/test_auto_DiffusionWeightedVolumeMasking.py b/nipype/interfaces/slicer/diffusion/tests/test_auto_DiffusionWeightedVolumeMasking.py index 0deaf6543e..e73dffce9a 100644 --- a/nipype/interfaces/slicer/diffusion/tests/test_auto_DiffusionWeightedVolumeMasking.py +++ b/nipype/interfaces/slicer/diffusion/tests/test_auto_DiffusionWeightedVolumeMasking.py @@ -23,7 +23,8 @@ def test_DiffusionWeightedVolumeMasking_inputs(): ), removeislands=dict(argstr='--removeislands ', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), thresholdMask=dict(argstr='%s', hash_files=False, diff --git a/nipype/interfaces/slicer/diffusion/tests/test_auto_ResampleDTIVolume.py b/nipype/interfaces/slicer/diffusion/tests/test_auto_ResampleDTIVolume.py index d54f99f55d..1f143c23e2 100644 --- a/nipype/interfaces/slicer/diffusion/tests/test_auto_ResampleDTIVolume.py +++ b/nipype/interfaces/slicer/diffusion/tests/test_auto_ResampleDTIVolume.py @@ -58,7 +58,8 @@ def test_ResampleDTIVolume_inputs(): ), spline_order=dict(argstr='--spline_order %d', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), transform=dict(argstr='--transform %s', ), diff --git a/nipype/interfaces/slicer/diffusion/tests/test_auto_TractographyLabelMapSeeding.py b/nipype/interfaces/slicer/diffusion/tests/test_auto_TractographyLabelMapSeeding.py index 55f127a6c9..1ea38d5eaf 100644 --- a/nipype/interfaces/slicer/diffusion/tests/test_auto_TractographyLabelMapSeeding.py +++ b/nipype/interfaces/slicer/diffusion/tests/test_auto_TractographyLabelMapSeeding.py @@ -46,7 +46,8 @@ def test_TractographyLabelMapSeeding_inputs(): ), stoppingvalue=dict(argstr='--stoppingvalue %f', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), useindexspace=dict(argstr='--useindexspace ', ), diff --git a/nipype/interfaces/slicer/filtering/tests/test_auto_AddScalarVolumes.py b/nipype/interfaces/slicer/filtering/tests/test_auto_AddScalarVolumes.py index 7914b71736..29a2a157e6 100644 --- a/nipype/interfaces/slicer/filtering/tests/test_auto_AddScalarVolumes.py +++ b/nipype/interfaces/slicer/filtering/tests/test_auto_AddScalarVolumes.py @@ -24,7 +24,8 @@ def test_AddScalarVolumes_inputs(): hash_files=False, position=-1, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = AddScalarVolumes.input_spec() diff --git a/nipype/interfaces/slicer/filtering/tests/test_auto_CastScalarVolume.py b/nipype/interfaces/slicer/filtering/tests/test_auto_CastScalarVolume.py index eed01c2996..66fbe0f2d9 100644 --- a/nipype/interfaces/slicer/filtering/tests/test_auto_CastScalarVolume.py +++ b/nipype/interfaces/slicer/filtering/tests/test_auto_CastScalarVolume.py @@ -19,7 +19,8 @@ def test_CastScalarVolume_inputs(): ignore_exception=dict(nohash=True, usedefault=True, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), type=dict(argstr='--type %s', ), diff --git a/nipype/interfaces/slicer/filtering/tests/test_auto_CheckerBoardFilter.py b/nipype/interfaces/slicer/filtering/tests/test_auto_CheckerBoardFilter.py index be6ae4ba84..2c8a3787e5 100644 --- a/nipype/interfaces/slicer/filtering/tests/test_auto_CheckerBoardFilter.py +++ b/nipype/interfaces/slicer/filtering/tests/test_auto_CheckerBoardFilter.py @@ -25,7 +25,8 @@ def test_CheckerBoardFilter_inputs(): hash_files=False, position=-1, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = CheckerBoardFilter.input_spec() diff --git a/nipype/interfaces/slicer/filtering/tests/test_auto_CurvatureAnisotropicDiffusion.py b/nipype/interfaces/slicer/filtering/tests/test_auto_CurvatureAnisotropicDiffusion.py index 01c28d842f..619404f9d2 100644 --- a/nipype/interfaces/slicer/filtering/tests/test_auto_CurvatureAnisotropicDiffusion.py +++ b/nipype/interfaces/slicer/filtering/tests/test_auto_CurvatureAnisotropicDiffusion.py @@ -23,7 +23,8 @@ def test_CurvatureAnisotropicDiffusion_inputs(): hash_files=False, position=-1, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), timeStep=dict(argstr='--timeStep %f', ), diff --git a/nipype/interfaces/slicer/filtering/tests/test_auto_ExtractSkeleton.py b/nipype/interfaces/slicer/filtering/tests/test_auto_ExtractSkeleton.py index 8ec1aa362c..9dc8f32ade 100644 --- a/nipype/interfaces/slicer/filtering/tests/test_auto_ExtractSkeleton.py +++ b/nipype/interfaces/slicer/filtering/tests/test_auto_ExtractSkeleton.py @@ -25,7 +25,8 @@ def test_ExtractSkeleton_inputs(): ), pointsFile=dict(argstr='--pointsFile %s', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), type=dict(argstr='--type %s', ), diff --git a/nipype/interfaces/slicer/filtering/tests/test_auto_GaussianBlurImageFilter.py b/nipype/interfaces/slicer/filtering/tests/test_auto_GaussianBlurImageFilter.py index c5aa979bc6..d07344f49f 100644 --- a/nipype/interfaces/slicer/filtering/tests/test_auto_GaussianBlurImageFilter.py +++ b/nipype/interfaces/slicer/filtering/tests/test_auto_GaussianBlurImageFilter.py @@ -21,7 +21,8 @@ def test_GaussianBlurImageFilter_inputs(): ), sigma=dict(argstr='--sigma %f', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = GaussianBlurImageFilter.input_spec() diff --git a/nipype/interfaces/slicer/filtering/tests/test_auto_GradientAnisotropicDiffusion.py b/nipype/interfaces/slicer/filtering/tests/test_auto_GradientAnisotropicDiffusion.py index ce307bde81..02df01486d 100644 --- a/nipype/interfaces/slicer/filtering/tests/test_auto_GradientAnisotropicDiffusion.py +++ b/nipype/interfaces/slicer/filtering/tests/test_auto_GradientAnisotropicDiffusion.py @@ -23,7 +23,8 @@ def test_GradientAnisotropicDiffusion_inputs(): hash_files=False, position=-1, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), timeStep=dict(argstr='--timeStep %f', ), diff --git a/nipype/interfaces/slicer/filtering/tests/test_auto_GrayscaleFillHoleImageFilter.py b/nipype/interfaces/slicer/filtering/tests/test_auto_GrayscaleFillHoleImageFilter.py index 115c25ceab..0579552ba7 100644 --- a/nipype/interfaces/slicer/filtering/tests/test_auto_GrayscaleFillHoleImageFilter.py +++ b/nipype/interfaces/slicer/filtering/tests/test_auto_GrayscaleFillHoleImageFilter.py @@ -19,7 +19,8 @@ def test_GrayscaleFillHoleImageFilter_inputs(): hash_files=False, position=-1, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = GrayscaleFillHoleImageFilter.input_spec() diff --git a/nipype/interfaces/slicer/filtering/tests/test_auto_GrayscaleGrindPeakImageFilter.py b/nipype/interfaces/slicer/filtering/tests/test_auto_GrayscaleGrindPeakImageFilter.py index 12c4c5402f..439c6f1fd4 100644 --- a/nipype/interfaces/slicer/filtering/tests/test_auto_GrayscaleGrindPeakImageFilter.py +++ b/nipype/interfaces/slicer/filtering/tests/test_auto_GrayscaleGrindPeakImageFilter.py @@ -19,7 +19,8 @@ def test_GrayscaleGrindPeakImageFilter_inputs(): hash_files=False, position=-1, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = GrayscaleGrindPeakImageFilter.input_spec() diff --git a/nipype/interfaces/slicer/filtering/tests/test_auto_HistogramMatching.py b/nipype/interfaces/slicer/filtering/tests/test_auto_HistogramMatching.py index 00ef1b26dc..9ed4578c95 100644 --- a/nipype/interfaces/slicer/filtering/tests/test_auto_HistogramMatching.py +++ b/nipype/interfaces/slicer/filtering/tests/test_auto_HistogramMatching.py @@ -26,7 +26,8 @@ def test_HistogramMatching_inputs(): referenceVolume=dict(argstr='%s', position=-2, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), threshold=dict(argstr='--threshold ', ), diff --git a/nipype/interfaces/slicer/filtering/tests/test_auto_ImageLabelCombine.py b/nipype/interfaces/slicer/filtering/tests/test_auto_ImageLabelCombine.py index 9640cf5457..0d19440bb9 100644 --- a/nipype/interfaces/slicer/filtering/tests/test_auto_ImageLabelCombine.py +++ b/nipype/interfaces/slicer/filtering/tests/test_auto_ImageLabelCombine.py @@ -24,7 +24,8 @@ def test_ImageLabelCombine_inputs(): ignore_exception=dict(nohash=True, usedefault=True, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = ImageLabelCombine.input_spec() diff --git a/nipype/interfaces/slicer/filtering/tests/test_auto_MaskScalarVolume.py b/nipype/interfaces/slicer/filtering/tests/test_auto_MaskScalarVolume.py index c9f6c1bd8a..13c1a90db6 100644 --- a/nipype/interfaces/slicer/filtering/tests/test_auto_MaskScalarVolume.py +++ b/nipype/interfaces/slicer/filtering/tests/test_auto_MaskScalarVolume.py @@ -26,7 +26,8 @@ def test_MaskScalarVolume_inputs(): ), replace=dict(argstr='--replace %d', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = MaskScalarVolume.input_spec() diff --git a/nipype/interfaces/slicer/filtering/tests/test_auto_MedianImageFilter.py b/nipype/interfaces/slicer/filtering/tests/test_auto_MedianImageFilter.py index 07f11bddae..81dc33b3f6 100644 --- a/nipype/interfaces/slicer/filtering/tests/test_auto_MedianImageFilter.py +++ b/nipype/interfaces/slicer/filtering/tests/test_auto_MedianImageFilter.py @@ -22,7 +22,8 @@ def test_MedianImageFilter_inputs(): hash_files=False, position=-1, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = MedianImageFilter.input_spec() diff --git a/nipype/interfaces/slicer/filtering/tests/test_auto_MultiplyScalarVolumes.py b/nipype/interfaces/slicer/filtering/tests/test_auto_MultiplyScalarVolumes.py index f53fe36ef0..ebd9d4397b 100644 --- a/nipype/interfaces/slicer/filtering/tests/test_auto_MultiplyScalarVolumes.py +++ b/nipype/interfaces/slicer/filtering/tests/test_auto_MultiplyScalarVolumes.py @@ -24,7 +24,8 @@ def test_MultiplyScalarVolumes_inputs(): hash_files=False, position=-1, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = MultiplyScalarVolumes.input_spec() diff --git a/nipype/interfaces/slicer/filtering/tests/test_auto_N4ITKBiasFieldCorrection.py b/nipype/interfaces/slicer/filtering/tests/test_auto_N4ITKBiasFieldCorrection.py index a9cf9f449d..78fe5894d7 100644 --- a/nipype/interfaces/slicer/filtering/tests/test_auto_N4ITKBiasFieldCorrection.py +++ b/nipype/interfaces/slicer/filtering/tests/test_auto_N4ITKBiasFieldCorrection.py @@ -39,7 +39,8 @@ def test_N4ITKBiasFieldCorrection_inputs(): ), splinedistance=dict(argstr='--splinedistance %f', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), weightimage=dict(argstr='--weightimage %s', ), diff --git a/nipype/interfaces/slicer/filtering/tests/test_auto_ResampleScalarVectorDWIVolume.py b/nipype/interfaces/slicer/filtering/tests/test_auto_ResampleScalarVectorDWIVolume.py index d317e139f8..da74efc236 100644 --- a/nipype/interfaces/slicer/filtering/tests/test_auto_ResampleScalarVectorDWIVolume.py +++ b/nipype/interfaces/slicer/filtering/tests/test_auto_ResampleScalarVectorDWIVolume.py @@ -56,7 +56,8 @@ def test_ResampleScalarVectorDWIVolume_inputs(): ), spline_order=dict(argstr='--spline_order %d', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), transform=dict(argstr='--transform %s', ), diff --git a/nipype/interfaces/slicer/filtering/tests/test_auto_SubtractScalarVolumes.py b/nipype/interfaces/slicer/filtering/tests/test_auto_SubtractScalarVolumes.py index 78fd010e43..0bf3e2b9bf 100644 --- a/nipype/interfaces/slicer/filtering/tests/test_auto_SubtractScalarVolumes.py +++ b/nipype/interfaces/slicer/filtering/tests/test_auto_SubtractScalarVolumes.py @@ -24,7 +24,8 @@ def test_SubtractScalarVolumes_inputs(): hash_files=False, position=-1, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = SubtractScalarVolumes.input_spec() diff --git a/nipype/interfaces/slicer/filtering/tests/test_auto_ThresholdScalarVolume.py b/nipype/interfaces/slicer/filtering/tests/test_auto_ThresholdScalarVolume.py index 840f527211..86af5dd138 100644 --- a/nipype/interfaces/slicer/filtering/tests/test_auto_ThresholdScalarVolume.py +++ b/nipype/interfaces/slicer/filtering/tests/test_auto_ThresholdScalarVolume.py @@ -23,7 +23,8 @@ def test_ThresholdScalarVolume_inputs(): ), outsidevalue=dict(argstr='--outsidevalue %d', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), threshold=dict(argstr='--threshold %d', ), diff --git a/nipype/interfaces/slicer/filtering/tests/test_auto_VotingBinaryHoleFillingImageFilter.py b/nipype/interfaces/slicer/filtering/tests/test_auto_VotingBinaryHoleFillingImageFilter.py index 9d8a717dac..153d99b00b 100644 --- a/nipype/interfaces/slicer/filtering/tests/test_auto_VotingBinaryHoleFillingImageFilter.py +++ b/nipype/interfaces/slicer/filtering/tests/test_auto_VotingBinaryHoleFillingImageFilter.py @@ -28,7 +28,8 @@ def test_VotingBinaryHoleFillingImageFilter_inputs(): radius=dict(argstr='--radius %s', sep=',', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = VotingBinaryHoleFillingImageFilter.input_spec() diff --git a/nipype/interfaces/slicer/legacy/diffusion/tests/test_auto_DWIUnbiasedNonLocalMeansFilter.py b/nipype/interfaces/slicer/legacy/diffusion/tests/test_auto_DWIUnbiasedNonLocalMeansFilter.py index de89d21763..8d27926410 100644 --- a/nipype/interfaces/slicer/legacy/diffusion/tests/test_auto_DWIUnbiasedNonLocalMeansFilter.py +++ b/nipype/interfaces/slicer/legacy/diffusion/tests/test_auto_DWIUnbiasedNonLocalMeansFilter.py @@ -32,7 +32,8 @@ def test_DWIUnbiasedNonLocalMeansFilter_inputs(): rs=dict(argstr='--rs %s', sep=',', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = DWIUnbiasedNonLocalMeansFilter.input_spec() diff --git a/nipype/interfaces/slicer/legacy/tests/test_auto_AffineRegistration.py b/nipype/interfaces/slicer/legacy/tests/test_auto_AffineRegistration.py index 1095a2169b..d8d595659a 100644 --- a/nipype/interfaces/slicer/legacy/tests/test_auto_AffineRegistration.py +++ b/nipype/interfaces/slicer/legacy/tests/test_auto_AffineRegistration.py @@ -36,7 +36,8 @@ def test_AffineRegistration_inputs(): ), spatialsamples=dict(argstr='--spatialsamples %d', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), translationscale=dict(argstr='--translationscale %f', ), diff --git a/nipype/interfaces/slicer/legacy/tests/test_auto_BSplineDeformableRegistration.py b/nipype/interfaces/slicer/legacy/tests/test_auto_BSplineDeformableRegistration.py index 2965724b45..9cb4a89979 100644 --- a/nipype/interfaces/slicer/legacy/tests/test_auto_BSplineDeformableRegistration.py +++ b/nipype/interfaces/slicer/legacy/tests/test_auto_BSplineDeformableRegistration.py @@ -43,7 +43,8 @@ def test_BSplineDeformableRegistration_inputs(): ), spatialsamples=dict(argstr='--spatialsamples %d', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = BSplineDeformableRegistration.input_spec() diff --git a/nipype/interfaces/slicer/legacy/tests/test_auto_BSplineToDeformationField.py b/nipype/interfaces/slicer/legacy/tests/test_auto_BSplineToDeformationField.py index 9b0c0cb41e..a343222138 100644 --- a/nipype/interfaces/slicer/legacy/tests/test_auto_BSplineToDeformationField.py +++ b/nipype/interfaces/slicer/legacy/tests/test_auto_BSplineToDeformationField.py @@ -17,7 +17,8 @@ def test_BSplineToDeformationField_inputs(): ), refImage=dict(argstr='--refImage %s', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), tfm=dict(argstr='--tfm %s', ), diff --git a/nipype/interfaces/slicer/legacy/tests/test_auto_ExpertAutomatedRegistration.py b/nipype/interfaces/slicer/legacy/tests/test_auto_ExpertAutomatedRegistration.py index 5c6ca38748..18b5332194 100644 --- a/nipype/interfaces/slicer/legacy/tests/test_auto_ExpertAutomatedRegistration.py +++ b/nipype/interfaces/slicer/legacy/tests/test_auto_ExpertAutomatedRegistration.py @@ -70,7 +70,8 @@ def test_ExpertAutomatedRegistration_inputs(): saveTransform=dict(argstr='--saveTransform %s', hash_files=False, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), verbosityLevel=dict(argstr='--verbosityLevel %s', ), diff --git a/nipype/interfaces/slicer/legacy/tests/test_auto_LinearRegistration.py b/nipype/interfaces/slicer/legacy/tests/test_auto_LinearRegistration.py index e62a728d7d..71578e46fc 100644 --- a/nipype/interfaces/slicer/legacy/tests/test_auto_LinearRegistration.py +++ b/nipype/interfaces/slicer/legacy/tests/test_auto_LinearRegistration.py @@ -40,7 +40,8 @@ def test_LinearRegistration_inputs(): ), spatialsamples=dict(argstr='--spatialsamples %d', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), translationscale=dict(argstr='--translationscale %f', ), diff --git a/nipype/interfaces/slicer/legacy/tests/test_auto_MultiResolutionAffineRegistration.py b/nipype/interfaces/slicer/legacy/tests/test_auto_MultiResolutionAffineRegistration.py index cea84022e4..c1f13b775d 100644 --- a/nipype/interfaces/slicer/legacy/tests/test_auto_MultiResolutionAffineRegistration.py +++ b/nipype/interfaces/slicer/legacy/tests/test_auto_MultiResolutionAffineRegistration.py @@ -38,7 +38,8 @@ def test_MultiResolutionAffineRegistration_inputs(): ), stepTolerance=dict(argstr='--stepTolerance %f', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = MultiResolutionAffineRegistration.input_spec() diff --git a/nipype/interfaces/slicer/legacy/tests/test_auto_OtsuThresholdImageFilter.py b/nipype/interfaces/slicer/legacy/tests/test_auto_OtsuThresholdImageFilter.py index a598be2eee..6922ddc50e 100644 --- a/nipype/interfaces/slicer/legacy/tests/test_auto_OtsuThresholdImageFilter.py +++ b/nipype/interfaces/slicer/legacy/tests/test_auto_OtsuThresholdImageFilter.py @@ -25,7 +25,8 @@ def test_OtsuThresholdImageFilter_inputs(): ), outsideValue=dict(argstr='--outsideValue %d', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = OtsuThresholdImageFilter.input_spec() diff --git a/nipype/interfaces/slicer/legacy/tests/test_auto_OtsuThresholdSegmentation.py b/nipype/interfaces/slicer/legacy/tests/test_auto_OtsuThresholdSegmentation.py index ee088157b2..0c03c09d24 100644 --- a/nipype/interfaces/slicer/legacy/tests/test_auto_OtsuThresholdSegmentation.py +++ b/nipype/interfaces/slicer/legacy/tests/test_auto_OtsuThresholdSegmentation.py @@ -27,7 +27,8 @@ def test_OtsuThresholdSegmentation_inputs(): hash_files=False, position=-1, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = OtsuThresholdSegmentation.input_spec() diff --git a/nipype/interfaces/slicer/legacy/tests/test_auto_ResampleScalarVolume.py b/nipype/interfaces/slicer/legacy/tests/test_auto_ResampleScalarVolume.py index 6084ba5d83..addb12fd77 100644 --- a/nipype/interfaces/slicer/legacy/tests/test_auto_ResampleScalarVolume.py +++ b/nipype/interfaces/slicer/legacy/tests/test_auto_ResampleScalarVolume.py @@ -24,7 +24,8 @@ def test_ResampleScalarVolume_inputs(): spacing=dict(argstr='--spacing %s', sep=',', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = ResampleScalarVolume.input_spec() diff --git a/nipype/interfaces/slicer/legacy/tests/test_auto_RigidRegistration.py b/nipype/interfaces/slicer/legacy/tests/test_auto_RigidRegistration.py index ef5b7f2168..ce9d3c924e 100644 --- a/nipype/interfaces/slicer/legacy/tests/test_auto_RigidRegistration.py +++ b/nipype/interfaces/slicer/legacy/tests/test_auto_RigidRegistration.py @@ -40,7 +40,8 @@ def test_RigidRegistration_inputs(): ), spatialsamples=dict(argstr='--spatialsamples %d', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), testingmode=dict(argstr='--testingmode ', ), diff --git a/nipype/interfaces/slicer/quantification/tests/test_auto_IntensityDifferenceMetric.py b/nipype/interfaces/slicer/quantification/tests/test_auto_IntensityDifferenceMetric.py index fc174efcfa..217245624d 100644 --- a/nipype/interfaces/slicer/quantification/tests/test_auto_IntensityDifferenceMetric.py +++ b/nipype/interfaces/slicer/quantification/tests/test_auto_IntensityDifferenceMetric.py @@ -32,7 +32,8 @@ def test_IntensityDifferenceMetric_inputs(): ), sensitivityThreshold=dict(argstr='--sensitivityThreshold %f', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = IntensityDifferenceMetric.input_spec() diff --git a/nipype/interfaces/slicer/quantification/tests/test_auto_PETStandardUptakeValueComputation.py b/nipype/interfaces/slicer/quantification/tests/test_auto_PETStandardUptakeValueComputation.py index 0b66af94f3..2c417eb8ed 100644 --- a/nipype/interfaces/slicer/quantification/tests/test_auto_PETStandardUptakeValueComputation.py +++ b/nipype/interfaces/slicer/quantification/tests/test_auto_PETStandardUptakeValueComputation.py @@ -33,7 +33,8 @@ def test_PETStandardUptakeValueComputation_inputs(): ), petVolume=dict(argstr='--petVolume %s', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = PETStandardUptakeValueComputation.input_spec() diff --git a/nipype/interfaces/slicer/registration/tests/test_auto_ACPCTransform.py b/nipype/interfaces/slicer/registration/tests/test_auto_ACPCTransform.py index 35e08a6db1..316a02ab09 100644 --- a/nipype/interfaces/slicer/registration/tests/test_auto_ACPCTransform.py +++ b/nipype/interfaces/slicer/registration/tests/test_auto_ACPCTransform.py @@ -21,7 +21,8 @@ def test_ACPCTransform_inputs(): outputTransform=dict(argstr='--outputTransform %s', hash_files=False, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = ACPCTransform.input_spec() diff --git a/nipype/interfaces/slicer/registration/tests/test_auto_BRAINSDemonWarp.py b/nipype/interfaces/slicer/registration/tests/test_auto_BRAINSDemonWarp.py index 9aee3d80d1..92d51611eb 100644 --- a/nipype/interfaces/slicer/registration/tests/test_auto_BRAINSDemonWarp.py +++ b/nipype/interfaces/slicer/registration/tests/test_auto_BRAINSDemonWarp.py @@ -96,7 +96,8 @@ def test_BRAINSDemonWarp_inputs(): ), smoothDisplacementFieldSigma=dict(argstr='--smoothDisplacementFieldSigma %f', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), upFieldSmoothing=dict(argstr='--upFieldSmoothing %f', ), diff --git a/nipype/interfaces/slicer/registration/tests/test_auto_BRAINSFit.py b/nipype/interfaces/slicer/registration/tests/test_auto_BRAINSFit.py index f7521f7551..93664a066d 100644 --- a/nipype/interfaces/slicer/registration/tests/test_auto_BRAINSFit.py +++ b/nipype/interfaces/slicer/registration/tests/test_auto_BRAINSFit.py @@ -124,7 +124,8 @@ def test_BRAINSFit_inputs(): strippedOutputTransform=dict(argstr='--strippedOutputTransform %s', hash_files=False, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), transformType=dict(argstr='--transformType %s', sep=',', diff --git a/nipype/interfaces/slicer/registration/tests/test_auto_BRAINSResample.py b/nipype/interfaces/slicer/registration/tests/test_auto_BRAINSResample.py index 6e10f86ca0..bb2c107ace 100644 --- a/nipype/interfaces/slicer/registration/tests/test_auto_BRAINSResample.py +++ b/nipype/interfaces/slicer/registration/tests/test_auto_BRAINSResample.py @@ -34,7 +34,8 @@ def test_BRAINSResample_inputs(): ), referenceVolume=dict(argstr='--referenceVolume %s', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), warpTransform=dict(argstr='--warpTransform %s', ), diff --git a/nipype/interfaces/slicer/registration/tests/test_auto_FiducialRegistration.py b/nipype/interfaces/slicer/registration/tests/test_auto_FiducialRegistration.py index ee3db65e07..4687ccad2b 100644 --- a/nipype/interfaces/slicer/registration/tests/test_auto_FiducialRegistration.py +++ b/nipype/interfaces/slicer/registration/tests/test_auto_FiducialRegistration.py @@ -23,7 +23,8 @@ def test_FiducialRegistration_inputs(): saveTransform=dict(argstr='--saveTransform %s', hash_files=False, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), transformType=dict(argstr='--transformType %s', ), diff --git a/nipype/interfaces/slicer/registration/tests/test_auto_VBRAINSDemonWarp.py b/nipype/interfaces/slicer/registration/tests/test_auto_VBRAINSDemonWarp.py index 96e28abafa..3a4579cf44 100644 --- a/nipype/interfaces/slicer/registration/tests/test_auto_VBRAINSDemonWarp.py +++ b/nipype/interfaces/slicer/registration/tests/test_auto_VBRAINSDemonWarp.py @@ -96,7 +96,8 @@ def test_VBRAINSDemonWarp_inputs(): ), smoothDisplacementFieldSigma=dict(argstr='--smoothDisplacementFieldSigma %f', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), upFieldSmoothing=dict(argstr='--upFieldSmoothing %f', ), diff --git a/nipype/interfaces/slicer/segmentation/tests/test_auto_BRAINSROIAuto.py b/nipype/interfaces/slicer/segmentation/tests/test_auto_BRAINSROIAuto.py index 8792856f51..f1472982ef 100644 --- a/nipype/interfaces/slicer/segmentation/tests/test_auto_BRAINSROIAuto.py +++ b/nipype/interfaces/slicer/segmentation/tests/test_auto_BRAINSROIAuto.py @@ -30,7 +30,8 @@ def test_BRAINSROIAuto_inputs(): ), outputVolumePixelType=dict(argstr='--outputVolumePixelType %s', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), thresholdCorrectionFactor=dict(argstr='--thresholdCorrectionFactor %f', ), diff --git a/nipype/interfaces/slicer/segmentation/tests/test_auto_EMSegmentCommandLine.py b/nipype/interfaces/slicer/segmentation/tests/test_auto_EMSegmentCommandLine.py index 3e51e217f2..6b9c257eda 100644 --- a/nipype/interfaces/slicer/segmentation/tests/test_auto_EMSegmentCommandLine.py +++ b/nipype/interfaces/slicer/segmentation/tests/test_auto_EMSegmentCommandLine.py @@ -55,7 +55,8 @@ def test_EMSegmentCommandLine_inputs(): ), taskPreProcessingSetting=dict(argstr='--taskPreProcessingSetting %s', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), verbose=dict(argstr='--verbose ', ), diff --git a/nipype/interfaces/slicer/segmentation/tests/test_auto_RobustStatisticsSegmenter.py b/nipype/interfaces/slicer/segmentation/tests/test_auto_RobustStatisticsSegmenter.py index 844bf8a0e0..139390ff84 100644 --- a/nipype/interfaces/slicer/segmentation/tests/test_auto_RobustStatisticsSegmenter.py +++ b/nipype/interfaces/slicer/segmentation/tests/test_auto_RobustStatisticsSegmenter.py @@ -32,7 +32,8 @@ def test_RobustStatisticsSegmenter_inputs(): hash_files=False, position=-1, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = RobustStatisticsSegmenter.input_spec() diff --git a/nipype/interfaces/slicer/segmentation/tests/test_auto_SimpleRegionGrowingSegmentation.py b/nipype/interfaces/slicer/segmentation/tests/test_auto_SimpleRegionGrowingSegmentation.py index 9600134d40..5b09910378 100644 --- a/nipype/interfaces/slicer/segmentation/tests/test_auto_SimpleRegionGrowingSegmentation.py +++ b/nipype/interfaces/slicer/segmentation/tests/test_auto_SimpleRegionGrowingSegmentation.py @@ -31,7 +31,8 @@ def test_SimpleRegionGrowingSegmentation_inputs(): ), smoothingIterations=dict(argstr='--smoothingIterations %d', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), timestep=dict(argstr='--timestep %f', ), diff --git a/nipype/interfaces/slicer/tests/test_auto_DicomToNrrdConverter.py b/nipype/interfaces/slicer/tests/test_auto_DicomToNrrdConverter.py index b533e70237..8442d7fcff 100644 --- a/nipype/interfaces/slicer/tests/test_auto_DicomToNrrdConverter.py +++ b/nipype/interfaces/slicer/tests/test_auto_DicomToNrrdConverter.py @@ -21,7 +21,8 @@ def test_DicomToNrrdConverter_inputs(): ), smallGradientThreshold=dict(argstr='--smallGradientThreshold %f', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), useBMatrixGradientDirections=dict(argstr='--useBMatrixGradientDirections ', ), diff --git a/nipype/interfaces/slicer/tests/test_auto_EMSegmentTransformToNewFormat.py b/nipype/interfaces/slicer/tests/test_auto_EMSegmentTransformToNewFormat.py index fd8a401276..32a69b3972 100644 --- a/nipype/interfaces/slicer/tests/test_auto_EMSegmentTransformToNewFormat.py +++ b/nipype/interfaces/slicer/tests/test_auto_EMSegmentTransformToNewFormat.py @@ -19,7 +19,8 @@ def test_EMSegmentTransformToNewFormat_inputs(): ), templateFlag=dict(argstr='--templateFlag ', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = EMSegmentTransformToNewFormat.input_spec() diff --git a/nipype/interfaces/slicer/tests/test_auto_GrayscaleModelMaker.py b/nipype/interfaces/slicer/tests/test_auto_GrayscaleModelMaker.py index 7c9d4b027d..ae71550fe4 100644 --- a/nipype/interfaces/slicer/tests/test_auto_GrayscaleModelMaker.py +++ b/nipype/interfaces/slicer/tests/test_auto_GrayscaleModelMaker.py @@ -29,7 +29,8 @@ def test_GrayscaleModelMaker_inputs(): ), splitnormals=dict(argstr='--splitnormals ', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), threshold=dict(argstr='--threshold %f', ), diff --git a/nipype/interfaces/slicer/tests/test_auto_LabelMapSmoothing.py b/nipype/interfaces/slicer/tests/test_auto_LabelMapSmoothing.py index b066a5081f..d5b112ea25 100644 --- a/nipype/interfaces/slicer/tests/test_auto_LabelMapSmoothing.py +++ b/nipype/interfaces/slicer/tests/test_auto_LabelMapSmoothing.py @@ -27,7 +27,8 @@ def test_LabelMapSmoothing_inputs(): hash_files=False, position=-1, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = LabelMapSmoothing.input_spec() diff --git a/nipype/interfaces/slicer/tests/test_auto_MergeModels.py b/nipype/interfaces/slicer/tests/test_auto_MergeModels.py index 2102c77cdf..90068164e9 100644 --- a/nipype/interfaces/slicer/tests/test_auto_MergeModels.py +++ b/nipype/interfaces/slicer/tests/test_auto_MergeModels.py @@ -22,7 +22,8 @@ def test_MergeModels_inputs(): ignore_exception=dict(nohash=True, usedefault=True, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = MergeModels.input_spec() diff --git a/nipype/interfaces/slicer/tests/test_auto_ModelMaker.py b/nipype/interfaces/slicer/tests/test_auto_ModelMaker.py index 4e84c252a9..4cb225c708 100644 --- a/nipype/interfaces/slicer/tests/test_auto_ModelMaker.py +++ b/nipype/interfaces/slicer/tests/test_auto_ModelMaker.py @@ -51,7 +51,8 @@ def test_ModelMaker_inputs(): ), start=dict(argstr='--start %d', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = ModelMaker.input_spec() diff --git a/nipype/interfaces/slicer/tests/test_auto_ModelToLabelMap.py b/nipype/interfaces/slicer/tests/test_auto_ModelToLabelMap.py index 1b7dcd8076..2c1c7778e7 100644 --- a/nipype/interfaces/slicer/tests/test_auto_ModelToLabelMap.py +++ b/nipype/interfaces/slicer/tests/test_auto_ModelToLabelMap.py @@ -24,7 +24,8 @@ def test_ModelToLabelMap_inputs(): surface=dict(argstr='%s', position=-2, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = ModelToLabelMap.input_spec() diff --git a/nipype/interfaces/slicer/tests/test_auto_OrientScalarVolume.py b/nipype/interfaces/slicer/tests/test_auto_OrientScalarVolume.py index a75c12d463..0f36b8172b 100644 --- a/nipype/interfaces/slicer/tests/test_auto_OrientScalarVolume.py +++ b/nipype/interfaces/slicer/tests/test_auto_OrientScalarVolume.py @@ -21,7 +21,8 @@ def test_OrientScalarVolume_inputs(): hash_files=False, position=-1, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = OrientScalarVolume.input_spec() diff --git a/nipype/interfaces/slicer/tests/test_auto_ProbeVolumeWithModel.py b/nipype/interfaces/slicer/tests/test_auto_ProbeVolumeWithModel.py index d5e50cf6c9..ad4ecb6a05 100644 --- a/nipype/interfaces/slicer/tests/test_auto_ProbeVolumeWithModel.py +++ b/nipype/interfaces/slicer/tests/test_auto_ProbeVolumeWithModel.py @@ -22,7 +22,8 @@ def test_ProbeVolumeWithModel_inputs(): ignore_exception=dict(nohash=True, usedefault=True, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = ProbeVolumeWithModel.input_spec() diff --git a/nipype/interfaces/slicer/tests/test_auto_SlicerCommandLine.py b/nipype/interfaces/slicer/tests/test_auto_SlicerCommandLine.py index 1a24d5901e..0645e5a6dc 100644 --- a/nipype/interfaces/slicer/tests/test_auto_SlicerCommandLine.py +++ b/nipype/interfaces/slicer/tests/test_auto_SlicerCommandLine.py @@ -12,7 +12,8 @@ def test_SlicerCommandLine_inputs(): ignore_exception=dict(nohash=True, usedefault=True, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = SlicerCommandLine.input_spec() diff --git a/nipype/interfaces/tests/test_auto_Bru2.py b/nipype/interfaces/tests/test_auto_Bru2.py index b67b83bf5f..8d20215ed7 100644 --- a/nipype/interfaces/tests/test_auto_Bru2.py +++ b/nipype/interfaces/tests/test_auto_Bru2.py @@ -25,7 +25,8 @@ def test_Bru2_inputs(): output_filename=dict(argstr='-o %s', genfile=True, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = Bru2.input_spec() diff --git a/nipype/interfaces/tests/test_auto_C3dAffineTool.py b/nipype/interfaces/tests/test_auto_C3dAffineTool.py index 2acfbfbaab..0aff320afe 100644 --- a/nipype/interfaces/tests/test_auto_C3dAffineTool.py +++ b/nipype/interfaces/tests/test_auto_C3dAffineTool.py @@ -25,7 +25,8 @@ def test_C3dAffineTool_inputs(): source_file=dict(argstr='-src %s', position=2, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), transform_file=dict(argstr='%s', position=3, diff --git a/nipype/interfaces/tests/test_auto_CommandLine.py b/nipype/interfaces/tests/test_auto_CommandLine.py index 01f7c8f6fb..c5904dda69 100644 --- a/nipype/interfaces/tests/test_auto_CommandLine.py +++ b/nipype/interfaces/tests/test_auto_CommandLine.py @@ -12,7 +12,8 @@ def test_CommandLine_inputs(): ignore_exception=dict(nohash=True, usedefault=True, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = CommandLine.input_spec() diff --git a/nipype/interfaces/tests/test_auto_Dcm2nii.py b/nipype/interfaces/tests/test_auto_Dcm2nii.py index eb155ff975..e5c16c79b5 100644 --- a/nipype/interfaces/tests/test_auto_Dcm2nii.py +++ b/nipype/interfaces/tests/test_auto_Dcm2nii.py @@ -67,7 +67,8 @@ def test_Dcm2nii_inputs(): spm_analyze=dict(argstr='-s', xor=['nii_output'], ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = Dcm2nii.input_spec() diff --git a/nipype/interfaces/tests/test_auto_Dcm2niix.py b/nipype/interfaces/tests/test_auto_Dcm2niix.py index a396853b70..9c92e888ac 100644 --- a/nipype/interfaces/tests/test_auto_Dcm2niix.py +++ b/nipype/interfaces/tests/test_auto_Dcm2niix.py @@ -47,7 +47,8 @@ def test_Dcm2niix_inputs(): position=-1, xor=['source_dir'], ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), verbose=dict(argstr='-v', usedefault=True, diff --git a/nipype/interfaces/tests/test_auto_MatlabCommand.py b/nipype/interfaces/tests/test_auto_MatlabCommand.py index 6801f40353..c9ec84b23b 100644 --- a/nipype/interfaces/tests/test_auto_MatlabCommand.py +++ b/nipype/interfaces/tests/test_auto_MatlabCommand.py @@ -38,7 +38,8 @@ def test_MatlabCommand_inputs(): single_comp_thread=dict(argstr='-singleCompThread', nohash=True, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), uses_mcr=dict(nohash=True, xor=['nodesktop', 'nosplash', 'single_comp_thread'], diff --git a/nipype/interfaces/tests/test_auto_MeshFix.py b/nipype/interfaces/tests/test_auto_MeshFix.py index 7abd5878a0..9f40f04355 100644 --- a/nipype/interfaces/tests/test_auto_MeshFix.py +++ b/nipype/interfaces/tests/test_auto_MeshFix.py @@ -78,7 +78,8 @@ def test_MeshFix_inputs(): ), set_intersections_to_one=dict(argstr='--intersect', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), uniform_remeshing_steps=dict(argstr='-u %d', requires=['uniform_remeshing_vertices'], diff --git a/nipype/interfaces/tests/test_auto_MpiCommandLine.py b/nipype/interfaces/tests/test_auto_MpiCommandLine.py index f1bc2486b2..3a5841e198 100644 --- a/nipype/interfaces/tests/test_auto_MpiCommandLine.py +++ b/nipype/interfaces/tests/test_auto_MpiCommandLine.py @@ -13,7 +13,8 @@ def test_MpiCommandLine_inputs(): usedefault=True, ), n_procs=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), use_mpi=dict(usedefault=True, ), diff --git a/nipype/interfaces/tests/test_auto_PETPVC.py b/nipype/interfaces/tests/test_auto_PETPVC.py index 9c62a83a23..4fadd5aa81 100644 --- a/nipype/interfaces/tests/test_auto_PETPVC.py +++ b/nipype/interfaces/tests/test_auto_PETPVC.py @@ -45,7 +45,8 @@ def test_PETPVC_inputs(): ), stop_crit=dict(argstr='-a %.4f', ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = PETPVC.input_spec() diff --git a/nipype/interfaces/tests/test_auto_Quickshear.py b/nipype/interfaces/tests/test_auto_Quickshear.py index 7debd4dd84..0f6821d228 100644 --- a/nipype/interfaces/tests/test_auto_Quickshear.py +++ b/nipype/interfaces/tests/test_auto_Quickshear.py @@ -29,7 +29,8 @@ def test_Quickshear_inputs(): name_template='%s_defaced', position=3, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = Quickshear.input_spec() diff --git a/nipype/interfaces/tests/test_auto_SEMLikeCommandLine.py b/nipype/interfaces/tests/test_auto_SEMLikeCommandLine.py index c7aee569d5..2012b9d9e1 100644 --- a/nipype/interfaces/tests/test_auto_SEMLikeCommandLine.py +++ b/nipype/interfaces/tests/test_auto_SEMLikeCommandLine.py @@ -12,7 +12,8 @@ def test_SEMLikeCommandLine_inputs(): ignore_exception=dict(nohash=True, usedefault=True, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = SEMLikeCommandLine.input_spec() diff --git a/nipype/interfaces/tests/test_auto_SlicerCommandLine.py b/nipype/interfaces/tests/test_auto_SlicerCommandLine.py index 891eff2394..70827978cc 100644 --- a/nipype/interfaces/tests/test_auto_SlicerCommandLine.py +++ b/nipype/interfaces/tests/test_auto_SlicerCommandLine.py @@ -13,7 +13,8 @@ def test_SlicerCommandLine_inputs(): usedefault=True, ), module=dict(), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = SlicerCommandLine.input_spec() diff --git a/nipype/interfaces/tests/test_auto_StdOutCommandLine.py b/nipype/interfaces/tests/test_auto_StdOutCommandLine.py index 46a0974b34..ad49a04abb 100644 --- a/nipype/interfaces/tests/test_auto_StdOutCommandLine.py +++ b/nipype/interfaces/tests/test_auto_StdOutCommandLine.py @@ -16,7 +16,8 @@ def test_StdOutCommandLine_inputs(): genfile=True, position=-1, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = StdOutCommandLine.input_spec() diff --git a/nipype/interfaces/vista/tests/test_auto_Vnifti2Image.py b/nipype/interfaces/vista/tests/test_auto_Vnifti2Image.py index 460c1eac79..805c5f0921 100644 --- a/nipype/interfaces/vista/tests/test_auto_Vnifti2Image.py +++ b/nipype/interfaces/vista/tests/test_auto_Vnifti2Image.py @@ -26,7 +26,8 @@ def test_Vnifti2Image_inputs(): name_template='%s.v', position=-1, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = Vnifti2Image.input_spec() diff --git a/nipype/interfaces/vista/tests/test_auto_VtoMat.py b/nipype/interfaces/vista/tests/test_auto_VtoMat.py index 055e665abc..2e5345d80f 100644 --- a/nipype/interfaces/vista/tests/test_auto_VtoMat.py +++ b/nipype/interfaces/vista/tests/test_auto_VtoMat.py @@ -23,7 +23,8 @@ def test_VtoMat_inputs(): name_template='%s.mat', position=-1, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = VtoMat.input_spec() From e5fc7743715be969e13d858a0a1e00d7da34a52d Mon Sep 17 00:00:00 2001 From: salma1601 Date: Fri, 6 Oct 2017 13:04:55 +0200 Subject: [PATCH 371/643] fix single line case --- nipype/interfaces/afni/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nipype/interfaces/afni/utils.py b/nipype/interfaces/afni/utils.py index 38bd1d41cc..096355f6aa 100644 --- a/nipype/interfaces/afni/utils.py +++ b/nipype/interfaces/afni/utils.py @@ -738,7 +738,7 @@ def _list_outputs(self): if len(sout) > 1: outputs['cm'] = [tuple(s) for s in sout] else: - outputs['cm'] = tuple(sout) + outputs['cm'] = tuple(sout[0]) return outputs From 1bcf9d1fa65fddeffc509c564f9f41ba5c37c65a Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Thu, 5 Oct 2017 21:09:38 -0400 Subject: [PATCH 372/643] ENH: Flesh out ConcatenateLTA --- nipype/interfaces/freesurfer/preprocess.py | 70 +++++++++++++++---- .../tests/test_auto_ConcatenateLTA.py | 22 +++++- nipype/testing/data/lta1.lta | 0 nipype/testing/data/lta2.lta | 0 4 files changed, 77 insertions(+), 15 deletions(-) create mode 100644 nipype/testing/data/lta1.lta create mode 100644 nipype/testing/data/lta2.lta diff --git a/nipype/interfaces/freesurfer/preprocess.py b/nipype/interfaces/freesurfer/preprocess.py index 2acd3fa0ff..0138062e59 100644 --- a/nipype/interfaces/freesurfer/preprocess.py +++ b/nipype/interfaces/freesurfer/preprocess.py @@ -2382,13 +2382,38 @@ def _list_outputs(self): class ConcatenateLTAInputSpec(FSTraitedSpec): # required in_lta1 = File(exists=True, mandatory=True, argstr='%s', position=-3, - desc="maps some src1 to dst1") - in_lta2 = File(exists=True, mandatory=True, argstr='%s', position=-2, - desc="maps dst1(src2) to dst2") - out_file = File(exists=False, position=-1, argstr='%s', - name_source=['in_lta1'], name_template='%s-long', - hash_files=False, keep_extension=True, - desc="the combined LTA maps: src1 to dst2 = LTA2*LTA1") + desc='maps some src1 to dst1') + in_lta2 = traits.Either( + File(exists=True), 'identity.nofile', argstr='%s', position=-2, + mandatory=True, desc='maps dst1(src2) to dst2') + out_file = File( + 'concat.lta', usedefault=True, position=-1, argstr='%s', + hash_files=False, + desc='the combined LTA maps: src1 to dst2 = LTA2*LTA1') + + # Inversion and transform type + invert_1 = traits.Bool(argstr='-invert1', + desc='invert in_lta1 before applying it') + invert_2 = traits.Bool(argstr='-invert2', + desc='invert in_lta2 before applying it') + invert_out = traits.Bool(argstr='-invertout', + desc='invert output LTA') + out_type = traits.Enum('VOX2VOX', 'RAS2RAS', argstr='-out_type %d', + desc='set final LTA type') + + # Talairach options + tal_source_file = traits.File( + exists=True, argstr='-tal %s', position=-5, + requires=['tal_template_file'], + desc='if in_lta2 is talairach.xfm, specify source for talairach') + tal_template_file = traits.File( + exists=True, argstr='%s', position=-4, requires=['tal_source_file'], + desc='if in_lta2 is talairach.xfm, specify template for talairach') + + subject = traits.Str(argstr='-subject %s', + desc='set subject in output LTA') + # Note rmsdiff would be xor out_file, and would be most easily dealt with + # in a new interface. -CJM 2017.10.05 class ConcatenateLTAOutputSpec(TraitedSpec): @@ -2397,23 +2422,44 @@ class ConcatenateLTAOutputSpec(TraitedSpec): class ConcatenateLTA(FSCommand): - """concatenates two consecutive LTA transformations - into one overall transformation, Out = LTA2*LTA1 + """ Concatenates two consecutive LTA transformations into one overall + transformation + + Out = LTA2*LTA1 Examples -------- >>> from nipype.interfaces.freesurfer import ConcatenateLTA >>> conc_lta = ConcatenateLTA() - >>> conc_lta.inputs.in_lta1 = 'trans.mat' - >>> conc_lta.inputs.in_lta2 = 'trans.mat' + >>> conc_lta.inputs.in_lta1 = 'lta1.lta' + >>> conc_lta.inputs.in_lta2 = 'lta2.lta' + >>> conc_lta.cmdline # doctest: +ALLOW_UNICODE + 'mri_concatenate_lta lta1.lta lta2.lta concat.lta' + + You can use 'identity.nofile' as the filename for in_lta2, e.g.: + + >>> conc_lta.inputs.in_lta2 = 'identity.nofile' + >>> conc_lta.inputs.invert_1 = True + >>> conc_lta.inputs.out_file = 'inv1.lta' >>> conc_lta.cmdline # doctest: +ALLOW_UNICODE - 'mri_concatenate_lta trans.mat trans.mat trans-long.mat' + 'mri_concatenate_lta -invert1 lta1.lta identity.nofile inv1.lta' + + To create a RAS2RAS transform: + + >>> conc_lta.inputs.out_type = 'RAS2RAS' + >>> conc_lta.cmdline # doctest: +ALLOW_UNICODE + 'mri_concatenate_lta -invert1 -out_type 1 lta1.lta identity.nofile inv1.lta' """ _cmd = 'mri_concatenate_lta' input_spec = ConcatenateLTAInputSpec output_spec = ConcatenateLTAOutputSpec + def _format_arg(self, name, spec, value): + if name == 'out_type': + value = {'VOX2VOX': 0, 'RAS2RAS': 1}[value] + return super(ConcatenateLTA, self)._format_arg(name, spec, value) + def _list_outputs(self): outputs = self.output_spec().get() outputs['out_file'] = os.path.abspath(self.inputs.out_file) diff --git a/nipype/interfaces/freesurfer/tests/test_auto_ConcatenateLTA.py b/nipype/interfaces/freesurfer/tests/test_auto_ConcatenateLTA.py index acee5ec994..1f957d35f4 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_ConcatenateLTA.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_ConcatenateLTA.py @@ -20,14 +20,30 @@ def test_ConcatenateLTA_inputs(): mandatory=True, position=-2, ), + invert_1=dict(argstr='-invert1', + ), + invert_2=dict(argstr='-invert2', + ), + invert_out=dict(argstr='-invertout', + ), out_file=dict(argstr='%s', hash_files=False, - keep_extension=True, - name_source=['in_lta1'], - name_template='%s-long', position=-1, + usedefault=True, + ), + out_type=dict(argstr='-out_type %d', + ), + subject=dict(argstr='-subject %s', ), subjects_dir=dict(), + tal_source_file=dict(argstr='-tal %s', + position=-5, + requires=['tal_template_file'], + ), + tal_template_file=dict(argstr='%s', + position=-4, + requires=['tal_source_file'], + ), terminal_output=dict(deprecated='1.0.0', nohash=True, ), diff --git a/nipype/testing/data/lta1.lta b/nipype/testing/data/lta1.lta new file mode 100644 index 0000000000..e69de29bb2 diff --git a/nipype/testing/data/lta2.lta b/nipype/testing/data/lta2.lta new file mode 100644 index 0000000000..e69de29bb2 From 31b4927f5c5d57ff44bdc0e5a3083fa07c6b757e Mon Sep 17 00:00:00 2001 From: salma1601 Date: Fri, 6 Oct 2017 15:52:10 +0200 Subject: [PATCH 373/643] output center of mass always as a list --- nipype/interfaces/afni/utils.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/nipype/interfaces/afni/utils.py b/nipype/interfaces/afni/utils.py index 096355f6aa..48f1303d2f 100644 --- a/nipype/interfaces/afni/utils.py +++ b/nipype/interfaces/afni/utils.py @@ -694,10 +694,8 @@ class CenterMassOutputSpec(TraitedSpec): desc='output file') cm_file = File( desc='file with the center of mass coordinates') - cm = traits.Either( + cm = traits.List( traits.Tuple(traits.Float(), traits.Float(), traits.Float()), - traits.List(traits.Tuple(traits.Float(), traits.Float(), - traits.Float())), desc='center of mass') @@ -735,10 +733,7 @@ def _list_outputs(self): outputs['out_file'] = os.path.abspath(self.inputs.in_file) outputs['cm_file'] = os.path.abspath(self.inputs.cm_file) sout = np.loadtxt(outputs['cm_file'], ndmin=2) # pylint: disable=E1101 - if len(sout) > 1: - outputs['cm'] = [tuple(s) for s in sout] - else: - outputs['cm'] = tuple(sout[0]) + outputs['cm'] = [tuple(s) for s in sout] return outputs From c650793425dc796e37e6f53146a86381327ca8f7 Mon Sep 17 00:00:00 2001 From: mathiasg Date: Fri, 6 Oct 2017 11:17:22 -0400 Subject: [PATCH 374/643] sty: pep8-ify --- nipype/algorithms/rapidart.py | 181 ++++++++++++++++++++-------------- 1 file changed, 109 insertions(+), 72 deletions(-) diff --git a/nipype/algorithms/rapidart.py b/nipype/algorithms/rapidart.py index 7516281d53..deb75dbdee 100644 --- a/nipype/algorithms/rapidart.py +++ b/nipype/algorithms/rapidart.py @@ -18,7 +18,8 @@ >>> datadir = os.path.realpath(os.path.join(filepath, '../testing/data')) >>> os.chdir(datadir) """ -from __future__ import print_function, division, unicode_literals, absolute_import +from __future__ import (print_function, division, + unicode_literals, absolute_import) from builtins import open, range, str, bytes import os @@ -160,44 +161,61 @@ def _calc_norm_affine(affines, use_differences, brain_pts=None): class ArtifactDetectInputSpec(BaseInterfaceInputSpec): realigned_files = InputMultiPath(File(exists=True), - desc="Names of realigned functional data files", + desc=("Names of realigned functional data " + "files"), mandatory=True) - realignment_parameters = InputMultiPath(File(exists=True), mandatory=True, - desc=("Names of realignment parameters" - "corresponding to the functional data files")) + realignment_parameters = InputMultiPath(File(exists=True), + mandatory=True, + desc=("Names of realignment " + "parameters corresponding to " + "the functional data files")) parameter_source = traits.Enum("SPM", "FSL", "AFNI", "NiPy", "FSFAST", desc="Source of movement parameters", mandatory=True) - use_differences = traits.ListBool([True, False], minlen=2, maxlen=2, + use_differences = traits.ListBool([True, False], + minlen=2, + maxlen=2, usedefault=True, - desc=("Use differences between successive motion (first element)" - "and intensity paramter (second element) estimates in order" - "to determine outliers. (default is [True, False])")) - use_norm = traits.Bool(requires=['norm_threshold'], + desc=("Use differences between successive" + " motion (first element) and " + "intensity parameter (second " + "element) estimates in order to " + "determine outliers. " + "(default is [True, False])")) + use_norm = traits.Bool(True, + usedefault=True, + requires=['norm_threshold'], desc=("Uses a composite of the motion parameters in " "order to determine outliers.")) - norm_threshold = traits.Float(desc=("Threshold to use to detect motion-rela" + norm_threshold = traits.Float(xor=['rotation_threshold', + 'translation_threshold'], + mandatory=True, + desc=("Threshold to use to detect motion-rela" "ted outliers when composite motion is " - "being used"), mandatory=True, - xor=['rotation_threshold', - 'translation_threshold']) - rotation_threshold = traits.Float(mandatory=True, xor=['norm_threshold'], - desc=("Threshold (in radians) to use to detect rotation-related " - "outliers")) - translation_threshold = traits.Float(mandatory=True, xor=['norm_threshold'], - desc=("Threshold (in mm) to use to detect translation-related " + "being used")) + rotation_threshold = traits.Float(mandatory=True, + xor=['norm_threshold'], + desc=("Threshold (in radians) to use to " + "detect rotation-related outliers")) + translation_threshold = traits.Float(mandatory=True, + xor=['norm_threshold'], + desc=("Threshold (in mm) to use to " + "detect translation-related " "outliers")) zintensity_threshold = traits.Float(mandatory=True, - desc=("Intensity Z-threshold use to detection images that deviate " + desc=("Intensity Z-threshold use to " + "detection images that deviate " "from the mean")) mask_type = traits.Enum('spm_global', 'file', 'thresh', - desc=("Type of mask that should be used to mask the functional " - "data. *spm_global* uses an spm_global like calculation to " - "determine the brain mask. *file* specifies a brain mask " - "file (should be an image file consisting of 0s and 1s). " - "*thresh* specifies a threshold to use. By default all voxels" - "are used, unless one of these mask types are defined."), - mandatory=True) + mandatory=True, + desc=("Type of mask that should be used to mask the" + " functional data. *spm_global* uses an " + "spm_global like calculation to determine the" + " brain mask. *file* specifies a brain mask " + "file (should be an image file consisting of " + "0s and 1s). *thresh* specifies a threshold " + "to use. By default all voxels are used," + "unless one of these mask types are defined")) mask_file = File(exists=True, desc="Mask file to be used if mask_type is 'file'.") mask_threshold = traits.Float(desc=("Mask threshold to be used if mask_type" @@ -223,28 +241,36 @@ class ArtifactDetectInputSpec(BaseInterfaceInputSpec): class ArtifactDetectOutputSpec(TraitedSpec): outlier_files = OutputMultiPath(File(exists=True), - desc=("One file for each functional run containing a list of " - "0-based indices corresponding to outlier volumes")) + desc=("One file for each functional run " + "containing a list of 0-based indices" + " corresponding to outlier volumes")) intensity_files = OutputMultiPath(File(exists=True), - desc=("One file for each functional run containing the global " - "intensity values determined from the brainmask")) + desc=("One file for each functional run " + "containing the global intensity " + "values determined from the " + "brainmask")) norm_files = OutputMultiPath(File, - desc=("One file for each functional run containing the composite " - "norm")) + desc=("One file for each functional run " + "containing the composite norm")) statistic_files = OutputMultiPath(File(exists=True), - desc=("One file for each functional run containing information " - "about the different types of artifacts and if design info is" - " provided then details of stimulus correlated motion and a " - "listing or artifacts by event type.")) + desc=("One file for each functional run " + "containing information about the " + "different types of artifacts and " + "if design info is provided then " + "details of stimulus correlated " + "motion and a listing or artifacts " + "by event type.")) plot_files = OutputMultiPath(File, - desc=("One image file for each functional run containing the " - "detected outliers")) + desc=("One image file for each functional run " + "containing the detected outliers")) mask_files = OutputMultiPath(File, - desc=("One image file for each functional run containing the mask" - "used for global signal calculation")) + desc=("One image file for each functional run " + "containing the mask used for global " + "signal calculation")) displacement_files = OutputMultiPath(File, - desc=("One image file for each functional run containing the voxel" - "displacement timeseries")) + desc=("One image file for each " + "functional run containing the " + "voxel displacement timeseries")) class ArtifactDetect(BaseInterface): @@ -314,7 +340,7 @@ def _list_outputs(self): outputs['intensity_files'] = [] outputs['statistic_files'] = [] outputs['mask_files'] = [] - if isdefined(self.inputs.norm_threshold): + if isdefined(self.inputs.use_norm) and self.inputs.use_norm: outputs['norm_files'] = [] if self.inputs.bound_by_brainmask: outputs['displacement_files'] = [] @@ -328,7 +354,7 @@ def _list_outputs(self): outputs['intensity_files'].insert(i, intensityfile) outputs['statistic_files'].insert(i, statsfile) outputs['mask_files'].insert(i, maskfile) - if isdefined(self.inputs.norm_threshold): + if isdefined(self.inputs.use_norm) and self.inputs.use_norm: outputs['norm_files'].insert(i, normfile) if self.inputs.bound_by_brainmask: outputs['displacement_files'].insert(i, displacementfile) @@ -434,7 +460,7 @@ def _detect_outliers_core(self, imgfile, motionfile, runidx, cwd=None): mask_img = Nifti1Image(mask.astype(np.uint8), affine) mask_img.to_filename(maskfile) - if isdefined(self.inputs.norm_threshold): + if self.inputs.use_norm: brain_pts = None if self.inputs.bound_by_brainmask: voxel_coords = np.nonzero(mask) @@ -477,7 +503,7 @@ def _detect_outliers_core(self, imgfile, motionfile, runidx, cwd=None): # write output to outputfile np.savetxt(artifactfile, outliers, fmt=b'%d', delimiter=' ') np.savetxt(intensityfile, g, fmt=b'%.2f', delimiter=' ') - if isdefined(self.inputs.norm_threshold): + if self.inputs.use_norm: np.savetxt(normfile, normval, fmt=b'%.4f', delimiter=' ') if isdefined(self.inputs.save_plot) and self.inputs.save_plot: @@ -485,12 +511,12 @@ def _detect_outliers_core(self, imgfile, motionfile, runidx, cwd=None): matplotlib.use(config.get("execution", "matplotlib_backend")) import matplotlib.pyplot as plt fig = plt.figure() - if isdefined(self.inputs.norm_threshold): + if isdefined(self.inputs.use_norm) and self.inputs.use_norm: plt.subplot(211) else: plt.subplot(311) self._plot_outliers_with_wave(gz, iidx, 'Intensity') - if isdefined(self.inputs.norm_threshold): + if isdefined(self.inputs.use_norm) and self.inputs.use_norm: plt.subplot(212) self._plot_outliers_with_wave(normval, np.union1d(tidx, ridx), 'Norm (mm)') @@ -515,20 +541,22 @@ def _detect_outliers_core(self, imgfile, motionfile, runidx, cwd=None): motion_outliers)), 'motion_outliers': len(np.setdiff1d(motion_outliers, iidx)), }, - {'motion': [{'using differences': self.inputs.use_differences[0]}, - {'mean': np.mean(mc_in, axis=0).tolist(), - 'min': np.min(mc_in, axis=0).tolist(), - 'max': np.max(mc_in, axis=0).tolist(), - 'std': np.std(mc_in, axis=0).tolist()}, + {'motion': [ + {'using differences': self.inputs.use_differences[0]}, + {'mean': np.mean(mc_in, axis=0).tolist(), + 'min': np.min(mc_in, axis=0).tolist(), + 'max': np.max(mc_in, axis=0).tolist(), + 'std': np.std(mc_in, axis=0).tolist()}, ]}, - {'intensity': [{'using differences': self.inputs.use_differences[1]}, - {'mean': np.mean(gz, axis=0).tolist(), - 'min': np.min(gz, axis=0).tolist(), - 'max': np.max(gz, axis=0).tolist(), - 'std': np.std(gz, axis=0).tolist()}, + {'intensity': [ + {'using differences': self.inputs.use_differences[1]}, + {'mean': np.mean(gz, axis=0).tolist(), + 'min': np.min(gz, axis=0).tolist(), + 'max': np.max(gz, axis=0).tolist(), + 'std': np.std(gz, axis=0).tolist()}, ]}, ] - if isdefined(self.inputs.norm_threshold): + if self.inputs.use_norm: stats.insert(3, {'motion_norm': {'mean': np.mean(normval, axis=0).tolist(), 'min': np.min(normval, axis=0).tolist(), @@ -549,20 +577,27 @@ def _run_interface(self, runtime): class StimCorrInputSpec(BaseInterfaceInputSpec): - realignment_parameters = InputMultiPath(File(exists=True), mandatory=True, - desc=('Names of realignment parameters corresponding to the functional ' - 'data files')) - intensity_values = InputMultiPath(File(exists=True), mandatory=True, - desc='Name of file containing intensity values') - spm_mat_file = File(exists=True, mandatory=True, - desc='SPM mat file (use pre-estimate SPM.mat file)') + realignment_parameters = InputMultiPath(File(exists=True), + mandatory=True, + desc=("Names of realignment " + "parameters corresponding to " + "the functional data files")) + intensity_values = InputMultiPath(File(exists=True), + mandatory=True, + desc=("Name of file containing intensity " + "values")) + spm_mat_file = File(exists=True, + mandatory=True, + desc="SPM mat file (use pre-estimate SPM.mat file)") concatenated_design = traits.Bool(mandatory=True, - desc='state if the design matrix contains concatenated sessions') + desc=("state if the design matrix " + "contains concatenated sessions") class StimCorrOutputSpec(TraitedSpec): stimcorr_files = OutputMultiPath(File(exists=True), - desc='List of files containing correlation values') + desc=("List of files containing " + "correlation values") class StimulusCorrelation(BaseInterface): @@ -572,8 +607,9 @@ class StimulusCorrelation(BaseInterface): Currently this class supports an SPM generated design matrix and requires intensity parameters. This implies that one must run :ref:`ArtifactDetect ` - and :ref:`Level1Design ` prior to running this or - provide an SPM.mat file and intensity parameters through some other means. + and :ref:`Level1Design ` prior to + running this or provide an SPM.mat file and intensity parameters through + some other means. Examples -------- @@ -649,7 +685,8 @@ def _get_spm_submatrix(self, spmmat, sessidx, rows=None): U = spmmat['SPM'][0][0].Sess[0][sessidx].U[0] if rows is None: rows = spmmat['SPM'][0][0].Sess[0][sessidx].row[0] - 1 - cols = spmmat['SPM'][0][0].Sess[0][sessidx].col[0][list(range(len(U)))] - 1 + cols = ( + spmmat['SPM'][0][0].Sess[0][sessidx].col[0][list(range(len(U)))]-1) outmatrix = designmatrix.take(rows.tolist(), axis=0).take(cols.tolist(), axis=1) return outmatrix From 8fe85ab6cc5c29589528380b509bc5c73451bf5f Mon Sep 17 00:00:00 2001 From: Elizabeth DuPre Date: Fri, 6 Oct 2017 11:24:05 -0400 Subject: [PATCH 375/643] Re-generate 3dSynthesize auto-test --- nipype/interfaces/afni/tests/test_auto_Synthesize.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/nipype/interfaces/afni/tests/test_auto_Synthesize.py b/nipype/interfaces/afni/tests/test_auto_Synthesize.py index 084a4ae248..a24137ed3a 100644 --- a/nipype/interfaces/afni/tests/test_auto_Synthesize.py +++ b/nipype/interfaces/afni/tests/test_auto_Synthesize.py @@ -26,6 +26,9 @@ def test_Synthesize_inputs(): copyfile=False, mandatory=True, ), + num_threads=dict(nohash=True, + usedefault=True, + ), out_file=dict(argstr='-prefix %s', name_template='syn', ), @@ -33,7 +36,8 @@ def test_Synthesize_inputs(): select=dict(argstr='-select %s', mandatory=True, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), ) inputs = Synthesize.input_spec() From d0dd7060fd18068c221e20b2991d350924817cca Mon Sep 17 00:00:00 2001 From: mathiasg Date: Fri, 6 Oct 2017 11:44:31 -0400 Subject: [PATCH 376/643] doc: how to disable artifactdetect's norm_threshold --- nipype/algorithms/rapidart.py | 8 +++++--- nipype/algorithms/tests/test_auto_ArtifactDetect.py | 1 + 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/nipype/algorithms/rapidart.py b/nipype/algorithms/rapidart.py index deb75dbdee..0ab74b7404 100644 --- a/nipype/algorithms/rapidart.py +++ b/nipype/algorithms/rapidart.py @@ -278,7 +278,9 @@ class ArtifactDetect(BaseInterface): Uses intensity and motion parameters to infer outliers. If `use_norm` is True, it computes the movement of the center of each face a cuboid centered - around the head and returns the maximal movement across the centers. + around the head and returns the maximal movement across the centers. If you + wish to use individual thresholds instead, import `Undefined` from + `nipype.interfaces.base` and set `....inputs.use_norm = Undefined` Examples @@ -591,13 +593,13 @@ class StimCorrInputSpec(BaseInterfaceInputSpec): desc="SPM mat file (use pre-estimate SPM.mat file)") concatenated_design = traits.Bool(mandatory=True, desc=("state if the design matrix " - "contains concatenated sessions") + "contains concatenated sessions")) class StimCorrOutputSpec(TraitedSpec): stimcorr_files = OutputMultiPath(File(exists=True), desc=("List of files containing " - "correlation values") + "correlation values")) class StimulusCorrelation(BaseInterface): diff --git a/nipype/algorithms/tests/test_auto_ArtifactDetect.py b/nipype/algorithms/tests/test_auto_ArtifactDetect.py index 1f2b731b02..054bc1da99 100644 --- a/nipype/algorithms/tests/test_auto_ArtifactDetect.py +++ b/nipype/algorithms/tests/test_auto_ArtifactDetect.py @@ -40,6 +40,7 @@ def test_ArtifactDetect_inputs(): usedefault=True, ), use_norm=dict(requires=['norm_threshold'], + usedefault=True, ), zintensity_threshold=dict(mandatory=True, ), From c981c56f7dd16d9c0e2d805e731f7ef5491c5a9d Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Fri, 6 Oct 2017 11:38:53 -0400 Subject: [PATCH 377/643] ENH: Add LTA in/out to Tkregister2 --- .../freesurfer/tests/test_auto_Tkregister2.py | 12 ++++- nipype/interfaces/freesurfer/utils.py | 51 ++++++++++++++++--- 2 files changed, 54 insertions(+), 9 deletions(-) diff --git a/nipype/interfaces/freesurfer/tests/test_auto_Tkregister2.py b/nipype/interfaces/freesurfer/tests/test_auto_Tkregister2.py index bb0c2501d8..d40c03d7d9 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_Tkregister2.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_Tkregister2.py @@ -14,7 +14,7 @@ def test_Tkregister2_inputs(): fsl_out=dict(argstr='--fslregout %s', ), fstal=dict(argstr='--fstal', - xor=['target_image', 'moving_image'], + xor=['target_image', 'moving_image', 'reg_file'], ), fstarg=dict(argstr='--fstarg', xor=['target_image'], @@ -22,6 +22,15 @@ def test_Tkregister2_inputs(): ignore_exception=dict(nohash=True, usedefault=True, ), + invert_lta_in=dict(requires=['lta_in'], + ), + invert_lta_out=dict(argstr='--ltaout-inv', + requires=['lta_in'], + ), + lta_in=dict(argstr='--lta %s', + ), + lta_out=dict(argstr='--ltaout %s', + ), moving_image=dict(argstr='--mov %s', mandatory=True, ), @@ -57,6 +66,7 @@ def test_Tkregister2_inputs(): def test_Tkregister2_outputs(): output_map = dict(fsl_file=dict(), + lta_file=dict(), reg_file=dict(), ) outputs = Tkregister2.output_spec() diff --git a/nipype/interfaces/freesurfer/utils.py b/nipype/interfaces/freesurfer/utils.py index 720b294eeb..e71edb3e5c 100644 --- a/nipype/interfaces/freesurfer/utils.py +++ b/nipype/interfaces/freesurfer/utils.py @@ -1349,8 +1349,23 @@ class Tkregister2InputSpec(FSTraitedSpec): moving_image = File(exists=True, mandatory=True, argstr="--mov %s", desc='moving volume') + # Input registration file options fsl_in_matrix = File(exists=True, argstr="--fsl %s", desc='fsl-style registration input matrix') + xfm = File(exists=True, argstr='--xfm %s', + desc='use a matrix in MNI coordinates as initial registration') + lta_in = File(exists=True, argstr='--lta %s', + desc='use a matrix in MNI coordinates as initial registration') + invert_lta_in = traits.Bool(requires=['lta_in'], + desc='Invert input LTA before applying') + # Output registration file options + fsl_out = traits.Either(True, File, argstr='--fslregout %s', + desc='compute an FSL-compatible resgitration matrix') + lta_out = traits.Either(True, File, argstr='--ltaout %s', + desc='output registration file (LTA format)') + invert_lta_out = traits.Bool(argstr='--ltaout-inv', requires=['lta_in'], + desc='Invert input LTA before applying') + subject_id = traits.String(argstr="--s %s", desc='freesurfer subject ID') noedit = traits.Bool(True, argstr="--noedit", usedefault=True, @@ -1361,19 +1376,16 @@ class Tkregister2InputSpec(FSTraitedSpec): reg_header = traits.Bool(False, argstr='--regheader', desc='compute regstration from headers') fstal = traits.Bool(False, argstr='--fstal', - xor=['target_image', 'moving_image'], + xor=['target_image', 'moving_image', 'reg_file'], desc='set mov to be tal and reg to be tal xfm') movscale = traits.Float(argstr='--movscale %f', desc='adjust registration matrix to scale mov') - xfm = File(exists=True, argstr='--xfm %s', - desc='use a matrix in MNI coordinates as initial registration') - fsl_out = File(argstr='--fslregout %s', - desc='compute an FSL-compatible resgitration matrix') class Tkregister2OutputSpec(TraitedSpec): reg_file = File(exists=True, desc='freesurfer-style registration file') fsl_file = File(desc='FSL-style registration file') + lta_file = File(desc='LTA-style registration file') class Tkregister2(FSCommand): @@ -1413,11 +1425,34 @@ class Tkregister2(FSCommand): input_spec = Tkregister2InputSpec output_spec = Tkregister2OutputSpec + def _format_arg(self, name, spec, value): + if name == 'lta_in' and self.inputs.invert_lta_in: + spec = '--lta-inv %s' + if name in ('fsl_out', 'lta_out') and value is True: + value = self._list_outputs()[name] + return super(Tkregister2, self)._format_arg(name, spec, value) + def _list_outputs(self): outputs = self._outputs().get() - outputs['reg_file'] = os.path.abspath(self.inputs.reg_file) - if isdefined(self.inputs.fsl_out): - outputs['fsl_file'] = os.path.abspath(self.inputs.fsl_out) + reg_file = os.path.abspath(self.inputs.reg_file) + outputs['reg_file'] = reg_file + + cwd = os.getcwd() + fsl_out = self.inputs.fsl_out + if isdefined(fsl_out): + if fsl_out is True: + outputs['fsl_file'] = fname_presuffix( + reg_file, suffix='.mat', newpath=cwd, use_ext=False) + else: + outputs['fsl_file'] = os.path.abspath(self.inputs.fsl_out) + + lta_out = self.inputs.lta_out + if isdefined(lta_out): + if lta_out is True: + outputs['lta_file'] = fname_presuffix( + reg_file, suffix='.lta', newpath=cwd, use_ext=False) + else: + outputs['lta_file'] = os.path.abspath(self.inputs.lta_out) return outputs def _gen_outfilename(self): From 74deb3849e18f5e5202bf8a40208b017dc10c345 Mon Sep 17 00:00:00 2001 From: salma1601 Date: Sun, 8 Oct 2017 20:04:53 +0200 Subject: [PATCH 378/643] allow functions in NwarpCat inputs --- nipype/interfaces/afni/__init__.py | 2 +- .../afni/tests/test_auto_NwarpCat.py | 56 ++++++++++ nipype/interfaces/afni/utils.py | 102 ++++++++++++++++++ 3 files changed, 159 insertions(+), 1 deletion(-) create mode 100644 nipype/interfaces/afni/tests/test_auto_NwarpCat.py diff --git a/nipype/interfaces/afni/__init__.py b/nipype/interfaces/afni/__init__.py index f4089e4eda..ee79c409b1 100644 --- a/nipype/interfaces/afni/__init__.py +++ b/nipype/interfaces/afni/__init__.py @@ -22,7 +22,7 @@ from .utils import (ABoverlap, AFNItoNIFTI, Autobox, Axialize, BrickStat, Bucket, Calc, Cat, CatMatvec, CenterMass, Copy, Dot, Edge3, Eval, FWHMx, MaskTool, Merge, Notes, NwarpApply, - OneDToolPy, + NwarpCat, OneDToolPy, Refit, Resample, TCat, TCatSubBrick, TStat, To3D, Unifize, Undump, ZCutUp, GCOR, Zcat, Zeropad) diff --git a/nipype/interfaces/afni/tests/test_auto_NwarpCat.py b/nipype/interfaces/afni/tests/test_auto_NwarpCat.py new file mode 100644 index 0000000000..66153be88c --- /dev/null +++ b/nipype/interfaces/afni/tests/test_auto_NwarpCat.py @@ -0,0 +1,56 @@ +# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT +from __future__ import unicode_literals +from ..utils import NwarpCat + + +def test_NwarpCat_inputs(): + input_map = dict(args=dict(argstr='%s', + ), + environ=dict(nohash=True, + usedefault=True, + ), + expad=dict(argstr='-expad %d', + ), + ignore_exception=dict(nohash=True, + usedefault=True, + ), + in_files=dict(argstr='%s', + descr='list of tuples of 3D warps and associated functions', + mandatory=True, + position=-1, + ), + interp=dict(argstr='-interp %s', + ), + inv_warp=dict(argstr='-iwarp', + ), + num_threads=dict(nohash=True, + usedefault=True, + ), + out_file=dict(argstr='-prefix %s', + name_source='in_file', + name_template='%s_Nwarp', + ), + outputtype=dict(), + space=dict(argstr='-space %s', + ), + terminal_output=dict(deprecated='1.0.0', + nohash=True, + ), + verb=dict(argstr='-verb', + ), + ) + inputs = NwarpCat.input_spec() + + for key, metadata in list(input_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(inputs.traits()[key], metakey) == value + + +def test_NwarpCat_outputs(): + output_map = dict(out_file=dict(), + ) + outputs = NwarpCat.output_spec() + + for key, metadata in list(output_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(outputs.traits()[key], metakey) == value diff --git a/nipype/interfaces/afni/utils.py b/nipype/interfaces/afni/utils.py index 48f1303d2f..112a3379f8 100644 --- a/nipype/interfaces/afni/utils.py +++ b/nipype/interfaces/afni/utils.py @@ -1588,6 +1588,108 @@ class NwarpApply(AFNICommandBase): input_spec = NwarpApplyInputSpec output_spec = AFNICommandOutputSpec + +class NwarpCatInputSpec(AFNICommandInputSpec): + in_files = traits.List( + traits.Either( + traits.File(), traits.Tuple( + traits.Enum('IDENT', 'INV', 'SQRT', 'SQRTINV'), traits.File())), + descr="list of tuples of 3D warps and associated functions", + mandatory=True, + argstr="%s", + position=-1) + space = traits.String( + desc='string to attach to the output dataset as its atlas space ' + 'marker.', + argstr='-space %s') + inv_warp = traits.Bool( + desc='invert the final warp before output', + argstr='-iwarp') + interp = traits.Enum( + 'linear', 'quintic', 'wsinc5', + desc='specify a different interpolation method than might ' + 'be used for the warp', + argstr='-interp %s', + default='wsinc5') + expad = traits.Int( + desc='Pad the nonlinear warps by the given number of voxels voxels in ' + 'all directions. The warp displacements are extended by linear ' + 'extrapolation from the faces of the input grid..', + argstr='-expad %d') + out_file = File( + name_template='%s_Nwarp', + desc='output image file name', + argstr='-prefix %s', + name_source='in_file') + verb = traits.Bool( + desc='be verbose', + argstr='-verb') + + +class NwarpCat(AFNICommand): + """Catenates (composes) 3D warps defined on a grid, OR via a matrix. + + .. note:: + + * All transformations are from DICOM xyz (in mm) to DICOM xyz. + + * Matrix warps are in files that end in '.1D' or in '.txt'. A matrix + warp file should have 12 numbers in it, as output (for example), by + '3dAllineate -1Dmatrix_save'. + + * Nonlinear warps are in dataset files (AFNI .HEAD/.BRIK or NIfTI .nii) + with 3 sub-bricks giving the DICOM order xyz grid displacements in mm. + + * If all the input warps are matrices, then the output is a matrix + and will be written to the file 'prefix.aff12.1D'. + Unless the prefix already contains the string '.1D', in which case + the filename is just the prefix. + + * If 'prefix' is just 'stdout', then the output matrix is written + to standard output. + In any of these cases, the output format is 12 numbers in one row. + + * If any of the input warps are datasets, they must all be defined on + the same 3D grid! + And of course, then the output will be a dataset on the same grid. + However, you can expand the grid using the '-expad' option. + + * The order of operations in the final (output) warp is, for the + case of 3 input warps: + + OUTPUT(x) = warp3( warp2( warp1(x) ) ) + + That is, warp1 is applied first, then warp2, et cetera. + The 3D x coordinates are taken from each grid location in the + first dataset defined on a grid. + + For complete details, see the `3dNwarpCat Documentation. + `_ + + Examples + ======== + + >>> from nipype.interfaces import afni + >>> nwarpcat = afni.NwarpCat() + >>> nwarpcat.inputs.in_files = ['Q25_warp+tlrc.HEAD', ('IDENT', 'structural.nii')] + >>> nwarpcat.inputs.out_file = 'Fred_total_WARP' + >>> nwarpcat.cmdline # doctest: +ALLOW_UNICODE + "3dNwarpCat -prefix Fred_total_WARP Q25_warp+tlrc.HEAD 'IDENT(structural.nii)'" + >>> res = nwarpcat.run() # doctest: +SKIP + + """ + _cmd = '3dNwarpCat' + input_spec = NwarpCatInputSpec + output_spec = AFNICommandOutputSpec + + def _format_arg(self, name, spec, value): + if name == 'in_files': + return spec.argstr%(' '.join(["'" + v[0] + "(" + v[1] + ")'" + if isinstance(v, tuple) else v + for v in value])) + return super(NwarpCat, self)._format_arg(name, spec, value) + + class OneDToolPyInputSpec(AFNIPythonCommandInputSpec): in_file = File( desc='input file to OneDTool', From 62fea3070f9784edc1e139e2015f0ec4777f293d Mon Sep 17 00:00:00 2001 From: Gilles de Hollander Date: Mon, 9 Oct 2017 17:00:07 +0200 Subject: [PATCH 379/643] Added spaces inside brackets for --initial-moving-transform option in cmdline --- nipype/interfaces/ants/registration.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nipype/interfaces/ants/registration.py b/nipype/interfaces/ants/registration.py index ff494227f2..464564c93b 100644 --- a/nipype/interfaces/ants/registration.py +++ b/nipype/interfaces/ants/registration.py @@ -878,7 +878,7 @@ def _get_initial_transform_filenames(self): raise Exception(("ERROR: The useInverse list must have the same number " "of entries as the transformsFileName list.")) else: - retval.append("[%s, 0] " % self.inputs.initial_moving_transform[ii]) + retval.append("[ %s, 0 ] " % self.inputs.initial_moving_transform[ii]) return " ".join(retval) def _format_arg(self, opt, spec, val): From 70970d319375d2eb8ca4aca78e9b2364d78f6d4b Mon Sep 17 00:00:00 2001 From: salma1601 Date: Mon, 9 Oct 2017 17:18:35 +0200 Subject: [PATCH 380/643] fix typo and output paths in qwarp --- nipype/interfaces/afni/preprocess.py | 30 ++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/nipype/interfaces/afni/preprocess.py b/nipype/interfaces/afni/preprocess.py index 9fdb1cbc5d..ca9b4e8414 100644 --- a/nipype/interfaces/afni/preprocess.py +++ b/nipype/interfaces/afni/preprocess.py @@ -15,7 +15,8 @@ import os import os.path as op -from ...utils.filemanip import (load_json, save_json, split_filename) +from ...utils.filemanip import (load_json, save_json, split_filename, + fname_presuffix) from ..base import ( CommandLineInputSpec, CommandLine, TraitedSpec, traits, isdefined, File, InputMultiPath, Undefined, Str) @@ -3131,7 +3132,7 @@ class QwarpInputSpec(AFNICommandInputSpec): 'Note that the source dataset in the second run is the SAME as' 'in the first run. If you don\'t see why this is necessary,' 'then you probably need to seek help from an AFNI guru.', - argstr='-inlev %d', + argstr='-inilev %d', xor=['duplo']) minpatch = traits.Int( desc='* The value of mm should be an odd integer.' @@ -3475,29 +3476,38 @@ def _list_outputs(self): if not isdefined(self.inputs.out_file): prefix = self._gen_fname(self.inputs.in_file, suffix='_QW') ext = '.HEAD' + suffix ='+tlrc' else: prefix = self.inputs.out_file ext_ind = max([prefix.lower().rfind('.nii.gz'), prefix.lower().rfind('.nii.')]) if ext_ind == -1: ext = '.HEAD' + suffix = '+tlrc' else: ext = prefix[ext_ind:] + suffix = '' print(ext,"ext") - outputs['warped_source'] = os.path.abspath(self._gen_fname(prefix, suffix='+tlrc')+ext) + outputs['warped_source'] = fname_presuffix(prefix, suffix=suffix, + use_ext=False) + ext if not self.inputs.nowarp: - outputs['source_warp'] = os.path.abspath(self._gen_fname(prefix, suffix='_WARP+tlrc')+ext) + outputs['source_warp'] = fname_presuffix(prefix, + suffix='_WARP' + suffix, use_ext=False) + ext if self.inputs.iwarp: - outputs['base_warp'] = os.path.abspath(self._gen_fname(prefix, suffix='_WARPINV+tlrc')+ext) + outputs['base_warp'] = fname_presuffix(prefix, + suffix='_WARPINV' + suffix, use_ext=False) + ext if isdefined(self.inputs.out_weight_file): outputs['weights'] = os.path.abspath(self.inputs.out_weight_file) if self.inputs.plusminus: - outputs['warped_source'] = os.path.abspath(self._gen_fname(prefix, suffix='_PLUS+tlrc')+ext) - outputs['warped_base'] = os.path.abspath(self._gen_fname(prefix, suffix='_MINUS+tlrc')+ext) - outputs['source_warp'] = os.path.abspath(self._gen_fname(prefix, suffix='_PLUS_WARP+tlrc')+ext) - outputs['base_warp'] = os.path.abspath(self._gen_fname(prefix, suffix='_MINUS_WARP+tlrc',)+ext) - + outputs['warped_source'] = fname_presuffix(prefix, + suffix='_PLUS' + suffix, use_ext=False) + ext + outputs['warped_base'] = fname_presuffix(prefix, + suffix='_MINUS' + suffix, use_ext=False) + ext + outputs['source_warp'] = fname_presuffix(prefix, + suffix='_PLUS_WARP' + suffix, use_ext=False) + ext + outputs['base_warp'] = fname_presuffix(prefix, + suffix='_MINUS_WARP' + suffix, use_ext=False) + ext return outputs def _gen_filename(self, name): From 87c1c27b65706c99b5c3533c94d149d26ddb5c73 Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Mon, 9 Oct 2017 11:27:25 -0400 Subject: [PATCH 381/643] ENH: Add SimpleInterface --- nipype/interfaces/base.py | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/nipype/interfaces/base.py b/nipype/interfaces/base.py index c63d64a7f1..2078b0783f 100644 --- a/nipype/interfaces/base.py +++ b/nipype/interfaces/base.py @@ -1212,6 +1212,41 @@ def save_inputs_to_json(self, json_file): json.dump(inputs, fhandle, indent=4, ensure_ascii=False) +class SimpleInterface(BaseInterface): + """ An interface pattern that allows outputs to be set in a dictionary + + When implementing `_run_interface`, set outputs with:: + + self._results[out_name] = out_value + + This can be a way to upgrade a ``Function`` interface to do type checking: + + >>> def double(x): + ... return 2 * x + + >>> class DoubleInputSpec(BaseInterfaceInputSpec): + ... x = traits.Float(mandatory=True) + + >>> class DoubleOutputSpec(TraitedSpec): + ... doubled = traits.Float() + + >>> class Double(SimpleInterface): + ... input_spec = DoubleInputSpec + ... output_spec = DoubleOutputSpec + ... + ... def _run_interface(self, runtime): + ... self._results['doubled'] = double(self.inputs.x) + ... return runtime + """ + def __init__(self, from_file=None, resource_monitor=None, **inputs): + super(SimpleInterface, self).__init__( + from_file=from_file, resource_monitor=resource_monitor, **inputs) + self._results = {} + + def _list_outputs(self): + return self._results + + class Stream(object): """Function to capture stdout and stderr streams with timestamps From f2f57ad1dbb3893848a101c716b874ffcdbe23b9 Mon Sep 17 00:00:00 2001 From: Gilles de Hollander Date: Mon, 9 Oct 2017 17:00:07 +0200 Subject: [PATCH 382/643] Proper --initial_moving_transform formatting --- nipype/interfaces/ants/registration.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nipype/interfaces/ants/registration.py b/nipype/interfaces/ants/registration.py index ff494227f2..7baedbeb5f 100644 --- a/nipype/interfaces/ants/registration.py +++ b/nipype/interfaces/ants/registration.py @@ -866,7 +866,7 @@ def _format_winsorize_image_intensities(self): self.inputs.winsorize_upper_quantile) def _get_initial_transform_filenames(self): - retval = ['--initial-moving-transform '] + retval = ['--initial-moving-transform'] for ii in range(len(self.inputs.initial_moving_transform)): if isdefined(self.inputs.invert_initial_moving_transform): if len(self.inputs.initial_moving_transform) == len(self.inputs.invert_initial_moving_transform): @@ -878,7 +878,7 @@ def _get_initial_transform_filenames(self): raise Exception(("ERROR: The useInverse list must have the same number " "of entries as the transformsFileName list.")) else: - retval.append("[%s, 0] " % self.inputs.initial_moving_transform[ii]) + retval.append("[ %s, 0 ] " % self.inputs.initial_moving_transform[ii]) return " ".join(retval) def _format_arg(self, opt, spec, val): From c20e1d9f4af4e9b4adba5c0abf5e13e4207b5e35 Mon Sep 17 00:00:00 2001 From: Gilles de Hollander Date: Mon, 9 Oct 2017 18:15:27 +0200 Subject: [PATCH 383/643] Fixed doctests --- nipype/interfaces/ants/registration.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/nipype/interfaces/ants/registration.py b/nipype/interfaces/ants/registration.py index 7baedbeb5f..70e311072d 100644 --- a/nipype/interfaces/ants/registration.py +++ b/nipype/interfaces/ants/registration.py @@ -673,6 +673,21 @@ class Registration(ANTSCommand): --convergence [ 100x50x30, 1e-09, 20 ] --smoothing-sigmas 2.0x1.0x0.0vox --shrink-factors 3x2x1 \ --use-estimate-learning-rate-once 1 --use-histogram-matching 1 --masks [ fixed1.nii, NULL ] \ --winsorize-image-intensities [ 0.0, 1.0 ] --write-composite-transform 1' + + >>> # Test initialization with multiple transforms matrices (e.g., unwarp and affine transform) + >>> reg10 = copy.deepcopy(reg) + >>> reg10.inputs.initial_moving_transform = ['func_to_struct.mat', 'ants_Warp.nii.gz'] + >>> reg10.inputs.invert_initial_moving_transform = [False, False] + >>> reg10.cmdline # doctest: +ALLOW_UNICODE + 'antsRegistration --collapse-output-transforms 0 --dimensionality 3 --initial-moving-transform \ +[ func_to_struct.mat, 0 ] [ ants_Warp.nii.gz, 0 ] --initialize-transforms-per-stage 0 --interpolation Linear \ +--output [ output_, output_warped_image.nii.gz ] --transform Affine[ 2.0 ] \ +--metric Mattes[ fixed1.nii, moving1.nii, 1, 32, Random, 0.05 ] --convergence [ 1500x200, 1e-08, 20 ] \ +--smoothing-sigmas 1.0x0.0vox --shrink-factors 2x1 --use-estimate-learning-rate-once 1 --use-histogram-matching 1 \ +--transform SyN[ 0.25, 3.0, 0.0 ] --metric Mattes[ fixed1.nii, moving1.nii, 1, 32 ] \ +--convergence [ 100x50x30, 1e-09, 20 ] --smoothing-sigmas 2.0x1.0x0.0vox --shrink-factors 3x2x1 \ +--use-estimate-learning-rate-once 1 --use-histogram-matching 1 --winsorize-image-intensities [ 0.0, 1.0 ] \ +--write-composite-transform 1' """ DEF_SAMPLING_STRATEGY = 'None' """The default sampling strategy argument.""" @@ -878,7 +893,7 @@ def _get_initial_transform_filenames(self): raise Exception(("ERROR: The useInverse list must have the same number " "of entries as the transformsFileName list.")) else: - retval.append("[ %s, 0 ] " % self.inputs.initial_moving_transform[ii]) + retval.append("[ %s, 0 ]" % self.inputs.initial_moving_transform[ii]) return " ".join(retval) def _format_arg(self, opt, spec, val): From 95110ee0cf4f81ec75fab79828c0ec0dbbd1171f Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Mon, 9 Oct 2017 14:38:00 -0400 Subject: [PATCH 384/643] DOC: Update docstring --- nipype/interfaces/base.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/nipype/interfaces/base.py b/nipype/interfaces/base.py index 2078b0783f..7394c6bd9c 100644 --- a/nipype/interfaces/base.py +++ b/nipype/interfaces/base.py @@ -1214,22 +1214,26 @@ def save_inputs_to_json(self, json_file): class SimpleInterface(BaseInterface): """ An interface pattern that allows outputs to be set in a dictionary + called ``_results`` that is automatically interpreted by + ``_list_outputs()`` to find the outputs. - When implementing `_run_interface`, set outputs with:: + When implementing ``_run_interface``, set outputs with:: self._results[out_name] = out_value - This can be a way to upgrade a ``Function`` interface to do type checking: + This can be a way to upgrade a ``Function`` interface to do type checking. + Examples + -------- >>> def double(x): ... return 2 * x - + ... >>> class DoubleInputSpec(BaseInterfaceInputSpec): ... x = traits.Float(mandatory=True) - + ... >>> class DoubleOutputSpec(TraitedSpec): ... doubled = traits.Float() - + ... >>> class Double(SimpleInterface): ... input_spec = DoubleInputSpec ... output_spec = DoubleOutputSpec From cba28e465e0541a6da6c4fa009acb2afa1633fce Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Mon, 9 Oct 2017 14:40:49 -0400 Subject: [PATCH 385/643] DOCTEST: Exercise __init__ and _list_outputs --- nipype/interfaces/base.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/nipype/interfaces/base.py b/nipype/interfaces/base.py index 7394c6bd9c..79812d4b19 100644 --- a/nipype/interfaces/base.py +++ b/nipype/interfaces/base.py @@ -1241,6 +1241,11 @@ class SimpleInterface(BaseInterface): ... def _run_interface(self, runtime): ... self._results['doubled'] = double(self.inputs.x) ... return runtime + + >>> dbl = Double() + >>> dbl.inputs.x = 2 + >>> dbl.run().outputs.doubled + 4.0 """ def __init__(self, from_file=None, resource_monitor=None, **inputs): super(SimpleInterface, self).__init__( From ca3e8a3f28e37faff2bac5de272a486a41823206 Mon Sep 17 00:00:00 2001 From: salma1601 Date: Mon, 9 Oct 2017 22:40:49 +0200 Subject: [PATCH 386/643] update test --- nipype/interfaces/afni/preprocess.py | 2 +- nipype/interfaces/afni/tests/test_auto_Qwarp.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nipype/interfaces/afni/preprocess.py b/nipype/interfaces/afni/preprocess.py index ca9b4e8414..736732042c 100644 --- a/nipype/interfaces/afni/preprocess.py +++ b/nipype/interfaces/afni/preprocess.py @@ -3463,7 +3463,7 @@ class Qwarp(AFNICommand): >>> qwarp2.inputs.inilev = 7 >>> qwarp2.inputs.iniwarp = ['Q25_warp+tlrc.HEAD'] >>> qwarp2.cmdline # doctest: +ALLOW_UNICODE - '3dQwarp -base mni.nii -blur 0.0 2.0 -source structural.nii -inlev 7 -iniwarp Q25_warp+tlrc.HEAD -prefix Q11' + '3dQwarp -base mni.nii -blur 0.0 2.0 -source structural.nii -inilev 7 -iniwarp Q25_warp+tlrc.HEAD -prefix Q11' >>> res2 = qwarp2.run() # doctest: +SKIP """ _cmd = '3dQwarp' diff --git a/nipype/interfaces/afni/tests/test_auto_Qwarp.py b/nipype/interfaces/afni/tests/test_auto_Qwarp.py index 2ea08c4c0e..358d80efb2 100644 --- a/nipype/interfaces/afni/tests/test_auto_Qwarp.py +++ b/nipype/interfaces/afni/tests/test_auto_Qwarp.py @@ -51,7 +51,7 @@ def test_Qwarp_inputs(): copyfile=False, mandatory=True, ), - inilev=dict(argstr='-inlev %d', + inilev=dict(argstr='-inilev %d', xor=['duplo'], ), iniwarp=dict(argstr='-iniwarp %s', From 480ba5c4e586e86180991fd4be30032ade009de7 Mon Sep 17 00:00:00 2001 From: salma1601 Date: Tue, 10 Oct 2017 14:56:20 +0200 Subject: [PATCH 387/643] fix output file generation --- nipype/interfaces/afni/utils.py | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/nipype/interfaces/afni/utils.py b/nipype/interfaces/afni/utils.py index 112a3379f8..bb0db7ab70 100644 --- a/nipype/interfaces/afni/utils.py +++ b/nipype/interfaces/afni/utils.py @@ -1617,10 +1617,10 @@ class NwarpCatInputSpec(AFNICommandInputSpec): 'extrapolation from the faces of the input grid..', argstr='-expad %d') out_file = File( - name_template='%s_Nwarp', + name_template='%s_NwarpCat', desc='output image file name', argstr='-prefix %s', - name_source='in_file') + name_source='in_files') verb = traits.Bool( desc='be verbose', argstr='-verb') @@ -1689,6 +1689,19 @@ def _format_arg(self, name, spec, value): for v in value])) return super(NwarpCat, self)._format_arg(name, spec, value) + def _gen_filename(self, name): + if name == 'out_file': + return self._gen_fname(self.inputs.in_files[0][0], suffix='_tcat') + + def _list_outputs(self): + outputs = self.output_spec().get() + if isdefined(self.inputs.out_file): + outputs['out_file'] = os.path.abspath(self.inputs.out_file) + else: + outputs['out_file'] = os.path.abspath(self._gen_fname( + self.inputs.in_files[0], suffix='_NwarpCat+tlrc', ext='.HEAD')) + return outputs + class OneDToolPyInputSpec(AFNIPythonCommandInputSpec): in_file = File( From a6ddc0cf7375d91b8d7caee126d02b62e19261b9 Mon Sep 17 00:00:00 2001 From: salma1601 Date: Tue, 10 Oct 2017 15:06:51 +0200 Subject: [PATCH 388/643] update test --- nipype/interfaces/afni/tests/test_auto_NwarpCat.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nipype/interfaces/afni/tests/test_auto_NwarpCat.py b/nipype/interfaces/afni/tests/test_auto_NwarpCat.py index 66153be88c..6e5077e645 100644 --- a/nipype/interfaces/afni/tests/test_auto_NwarpCat.py +++ b/nipype/interfaces/afni/tests/test_auto_NwarpCat.py @@ -27,8 +27,8 @@ def test_NwarpCat_inputs(): usedefault=True, ), out_file=dict(argstr='-prefix %s', - name_source='in_file', - name_template='%s_Nwarp', + name_source='in_files', + name_template='%s_NwarpCat', ), outputtype=dict(), space=dict(argstr='-space %s', From 3ea71cc120d57a2bb71e4500569410d600d6af53 Mon Sep 17 00:00:00 2001 From: Gilles de Hollander Date: Wed, 11 Oct 2017 13:41:25 +0200 Subject: [PATCH 389/643] Updated documentation --- nipype/interfaces/ants/registration.py | 131 ++++++++++++++++++++++--- 1 file changed, 118 insertions(+), 13 deletions(-) diff --git a/nipype/interfaces/ants/registration.py b/nipype/interfaces/ants/registration.py index 70e311072d..08e3ed8535 100644 --- a/nipype/interfaces/ants/registration.py +++ b/nipype/interfaces/ants/registration.py @@ -219,22 +219,26 @@ class RegistrationInputSpec(ANTSCommandInputSpec): dimension = traits.Enum(3, 2, argstr='--dimensionality %d', usedefault=True, desc='image dimension (2 or 3)') fixed_image = InputMultiPath(File(exists=True), mandatory=True, - desc='image to apply transformation to (generally a coregistered functional)') + desc='Image to which the moving_image should be transformed' + '(usually a structural image)') fixed_image_mask = File( exists=True, argstr='%s', max_ver='2.1.0', xor=['fixed_image_masks'], - desc='mask used to limit metric sampling region of the fixed image') + desc='Mask used to limit metric sampling region of the fixed image' + 'in all stages') fixed_image_masks = InputMultiPath( traits.Either('NULL', File(exists=True)), min_ver='2.2.0', xor=['fixed_image_mask'], - desc='mask used to limit metric sampling region of the fixed image ' + desc='Masks used to limit metric sampling region of the fixed image, defined per registration stage' '(Use "NULL" to omit a mask at a given stage)') moving_image = InputMultiPath(File(exists=True), mandatory=True, - desc='image to apply transformation to (generally a coregistered functional)') + desc='Image that will be registered to the space of fixed_image. This is the' + 'image on which the transformations will be applied to') moving_image_mask = File( exists=True, requires=['fixed_image_mask'], max_ver='2.1.0', xor=['moving_image_masks'], - desc='mask used to limit metric sampling region of the moving image') + desc='mask used to limit metric sampling region of the moving image' + 'in all stages') moving_image_masks = InputMultiPath( traits.Either('NULL', File(exists=True)), min_ver='2.2.0', xor=['moving_image_mask'], - desc='mask used to limit metric sampling region of the moving image ' + desc='Masks used to limit metric sampling region of the moving image, defined per registration stage' '(Use "NULL" to omit a mask at a given stage)') save_state = File(argstr='--save-state %s', exists=False, @@ -242,14 +246,24 @@ class RegistrationInputSpec(ANTSCommandInputSpec): restore_state = File(argstr='--restore-state %s', exists=True, desc='Filename for restoring the internal restorable state of the registration') - initial_moving_transform = InputMultiPath(argstr='%s', exists=True, desc='', + initial_moving_transform = InputMultiPath(argstr='%s', + exists=True, + desc='A transform or a list of transforms that should be applied' + 'before the registration begins. Note that, when a list is given,' + 'the transformations are applied in reverse order.', xor=['initial_moving_transform_com']) - invert_initial_moving_transform= InputMultiPath(traits.Bool(), requires=["initial_moving_transform"], - desc='', xor=['initial_moving_transform_com']) + invert_initial_moving_transform= InputMultiPath(traits.Bool(), + requires=["initial_moving_transform"], + desc='One boolean or a list of booleans that indicate' + 'whether the inverse(s) of the transform(s) defined' + 'in initial_moving_transform should be used.', + xor=['initial_moving_transform_com']) initial_moving_transform_com = traits.Enum(0, 1, 2, argstr='%s', default=0, xor=['initial_moving_transform'], - desc="Use center of mass for moving transform") + desc="Align the moving_image nad fixed_image befor registration using" + "the geometric center of the images (=0), the image intensities (=1)," + "or the origin of the images (=2)") metric_item_trait = traits.Enum("CC", "MeanSquares", "Demons", "GC", "MI", "Mattes") metric_stage_trait = traits.Either( @@ -291,7 +305,8 @@ class RegistrationInputSpec(ANTSCommandInputSpec): use_estimate_learning_rate_once = traits.List(traits.Bool(), desc='') use_histogram_matching = traits.Either( traits.Bool, traits.List(traits.Bool(argstr='%s')), - default=True, usedefault=True) + default=True, usedefault=True, + desc='Histogram match the images before registration.') interpolation = traits.Enum( 'Linear', 'NearestNeighbor', 'CosineWindowedSinc', 'WelchWindowedSinc', 'HammingWindowedSinc', 'LanczosWindowedSinc', 'BSpline', 'MultiLabel', 'Gaussian', @@ -421,8 +436,57 @@ class RegistrationOutputSpec(TraitedSpec): class Registration(ANTSCommand): """ + `antsRegister `_ registers a 'moving_image' to a 'fixed_image', + using a predefined (sequence of) cost function(s) and transformation operattions. + The cost function is defined using one or more 'metrics', specifically + local cross-correlation ('CC'), Mean Squares ('MeanSquares'), Demons ('Demons'), + global correlation ('GC'), or Mutual Information ('Mattes' or 'MI'). + + ANTS can use both linear ('Translation, 'Rigid', 'Affine', 'CompositeAffine', + or 'Translation') and non-linear transformations ('BSpline', 'GaussianDisplacementField', + 'TimeVaryingVelocityField', 'TimeVaryingBSplineVelocityField', 'SyN', 'BSplineSyN', + 'Exponential', or 'BSplineExponential'). Usually, registration is done in multiple + *stages*. For example first an Affine, then a Rigid, and ultimately a non-linear + (Syn)-transformation. + + antsRegistration can be initialized using one ore more transforms from moving_image + to fixed_image with the 'initial_moving_transform'-input. For example, when you + already have a warpfield that corrects for geometrical distortions in an EPI (functional) image, + that you want to apply before an Affine registration to a structural image. + You could put this transform into 'intial_moving_transform'. + + The Registration-interface can output the resulting transform(s) that map moving_image to + fixed_image in a single file as a 'composite_transform' (if write_composite_transform + is set to True), or a list of transforms as 'forwards_transforms'. It can also output + inverse transforms (from fixed_image to moving_image) in a similar fashion using + inverse_composite_transform. Note that the order of forward_transforms is in 'natural' + order: the first element should be applied first, the last element should be applied last. + + Note, however, that ANTS tools always apply lists of transformations in reverse order (the last + transformation in the list is applied first). Therefore, if the output forward_transforms + is a list, one can not directly feed it into, for example, ants.ApplyTransforms. To + make ants.ApplyTransforms apply the transformations in the same order as ants.Registration, + you have to provide the list of transformations in reverse order from forward_transforms. + reverse_forward_transforms outputs forward_transforms in reverse order and can be used for t + this purpose. Note also that, because composite_transform is always only a single file, this + output is preferred for most use-cases. + + More information can be found in the `ANTS + manual`. + + See below for some useful examples. + Examples -------- + + Set up a Registation node with some default settings. This Node registers + 'fixed1.nii' to 'moving1.nii' by first fitting a linear 'Affine' transformation, and + then a non-linear 'SyN' transformation, both using the Mutual Information-cost + metric. + + The registration is initailized by first applying the (linear) transform + trans.mat. + >>> import copy, pprint >>> from nipype.interfaces.ants import Registration >>> reg = Registration() @@ -461,6 +525,8 @@ class Registration(ANTSCommand): --use-histogram-matching 1 --winsorize-image-intensities [ 0.0, 1.0 ] --write-composite-transform 1' >>> reg.run() # doctest: +SKIP + Same as reg1, but first invert the initial transform ('trans.mat') before applying it. + >>> reg.inputs.invert_initial_moving_transform = True >>> reg1 = copy.deepcopy(reg) >>> reg1.inputs.winsorize_lower_quantile = 0.025 @@ -475,6 +541,9 @@ class Registration(ANTSCommand): --use-histogram-matching 1 --winsorize-image-intensities [ 0.025, 1.0 ] --write-composite-transform 1' >>> reg1.run() # doctest: +SKIP + Clip extremely high intensity data points using winsorize_upper_quantile. All data points + higher than the 0.975 quantile are set to the value of the 0.975 quantile. + >>> reg2 = copy.deepcopy(reg) >>> reg2.inputs.winsorize_upper_quantile = 0.975 >>> reg2.cmdline # doctest: +ALLOW_UNICODE @@ -487,6 +556,10 @@ class Registration(ANTSCommand): --smoothing-sigmas 2.0x1.0x0.0vox --shrink-factors 3x2x1 --use-estimate-learning-rate-once 1 \ --use-histogram-matching 1 --winsorize-image-intensities [ 0.0, 0.975 ] --write-composite-transform 1' + Clip extremely low intensity data points using winsorize_lower_quantile. All data points + lower than the 0.025 quantile are set to the original value at the 0.025 quantile. + + >>> reg3 = copy.deepcopy(reg) >>> reg3.inputs.winsorize_lower_quantile = 0.025 >>> reg3.inputs.winsorize_upper_quantile = 0.975 @@ -500,6 +573,8 @@ class Registration(ANTSCommand): --smoothing-sigmas 2.0x1.0x0.0vox --shrink-factors 3x2x1 --use-estimate-learning-rate-once 1 \ --use-histogram-matching 1 --winsorize-image-intensities [ 0.025, 0.975 ] --write-composite-transform 1' + Use float instead of double for computations (saves memory usage) + >>> reg3a = copy.deepcopy(reg) >>> reg3a.inputs.float = True >>> reg3a.cmdline # doctest: +ALLOW_UNICODE @@ -513,6 +588,8 @@ class Registration(ANTSCommand): --use-estimate-learning-rate-once 1 --use-histogram-matching 1 --winsorize-image-intensities [ 0.0, 1.0 ] \ --write-composite-transform 1' + Force to use double instead of float for computations (more precision and memory usage). + >>> reg3b = copy.deepcopy(reg) >>> reg3b.inputs.float = False >>> reg3b.cmdline # doctest: +ALLOW_UNICODE @@ -526,6 +603,9 @@ class Registration(ANTSCommand): --use-estimate-learning-rate-once 1 --use-histogram-matching 1 --winsorize-image-intensities [ 0.0, 1.0 ] \ --write-composite-transform 1' + 'collapse_output_transforms' can be used to put all transformation in a single 'composite_transform'- + file. Note that forward_transforms will now be an empty list. + >>> # Test collapse transforms flag >>> reg4 = copy.deepcopy(reg) >>> reg4.inputs.save_state = 'trans.mat' @@ -554,6 +634,7 @@ class Registration(ANTSCommand): --use-estimate-learning-rate-once 1 --use-histogram-matching 1 --winsorize-image-intensities [ 0.0, 1.0 ] \ --write-composite-transform 1' + >>> # Test collapse transforms flag >>> reg4b = copy.deepcopy(reg4) >>> reg4b.inputs.write_composite_transform = False @@ -567,7 +648,7 @@ class Registration(ANTSCommand): 'inverse_warped_image': , 'reverse_invert_flags': [True, False], 'reverse_transforms': ['.../nipype/testing/data/output_0GenericAffine.mat', \ -'.../nipype/testing/data/output_1InverseWarp.nii.gz'], + '.../nipype/testing/data/output_1InverseWarp.nii.gz'], 'save_state': '.../nipype/testing/data/trans.mat', 'warped_image': '.../nipype/testing/data/output_warped_image.nii.gz'} >>> reg4b.aggregate_outputs() # doctest: +SKIP @@ -582,6 +663,14 @@ class Registration(ANTSCommand): --use-estimate-learning-rate-once 1 --use-histogram-matching 1 --winsorize-image-intensities [ 0.0, 1.0 ] \ --write-composite-transform 0' + One can use multiple similarity metrics in a single registration stage.The Node below first + performs a linear registation using only the Mutual Information ('Mattes')-metric. + In a second stage, it performs a non-linear registration ('Syn') using both a + Mutual Information and a local cross-correlation ('CC')-metric. Both metrics are weighted + equally ('metric_weight' is .5 for both). The Mutual Information- metric uses 32 bins. + The local cross-correlations (correlations between every voxel's neighborhoods) is computed + with a radius of 4. + >>> # Test multiple metrics per stage >>> reg5 = copy.deepcopy(reg) >>> reg5.inputs.fixed_image = 'fixed1.nii' @@ -602,7 +691,13 @@ class Registration(ANTSCommand): --smoothing-sigmas 2.0x1.0x0.0vox --shrink-factors 3x2x1 --use-estimate-learning-rate-once 1 \ --use-histogram-matching 1 --winsorize-image-intensities [ 0.0, 1.0 ] --write-composite-transform 1' - >>> # Test multiple inputs + ANTS Registration can also use multiple modalities to perform the registration. Here it is assumed + that fixed1.nii and fixed2.nii are in the same space, and so are moving1.nii and + moving2.nii. First, a linear registration is performed matching fixed1.nii to moving1.nii, + then a non-linear registration is performed to match fixed2.nii to moving2.nii, starting from + the transformation of the first step. + + >>> # Test multiple inputS >>> reg6 = copy.deepcopy(reg5) >>> reg6.inputs.fixed_image = ['fixed1.nii', 'fixed2.nii'] >>> reg6.inputs.moving_image = ['moving1.nii', 'moving2.nii'] @@ -617,6 +712,8 @@ class Registration(ANTSCommand): --smoothing-sigmas 2.0x1.0x0.0vox --shrink-factors 3x2x1 --use-estimate-learning-rate-once 1 \ --use-histogram-matching 1 --winsorize-image-intensities [ 0.0, 1.0 ] --write-composite-transform 1' + Different methods can be used for the interpolation when applying transformations. + >>> # Test Interpolation Parameters (BSpline) >>> reg7a = copy.deepcopy(reg) >>> reg7a.inputs.interpolation = 'BSpline' @@ -646,6 +743,8 @@ class Registration(ANTSCommand): --use-estimate-learning-rate-once 1 --use-histogram-matching 1 --winsorize-image-intensities [ 0.0, 1.0 ] \ --write-composite-transform 1' + BSplineSyN non-linear registration with custom parameters. + >>> # Test Extended Transform Parameters >>> reg8 = copy.deepcopy(reg) >>> reg8.inputs.transforms = ['Affine', 'BSplineSyN'] @@ -660,6 +759,8 @@ class Registration(ANTSCommand): --smoothing-sigmas 2.0x1.0x0.0vox --shrink-factors 3x2x1 --use-estimate-learning-rate-once 1 \ --use-histogram-matching 1 --winsorize-image-intensities [ 0.0, 1.0 ] --write-composite-transform 1' + Mask the fixed image in the second stage of the registration (but not the first). + >>> # Test masking >>> reg9 = copy.deepcopy(reg) >>> reg9.inputs.fixed_image_masks = ['NULL', 'fixed1.nii'] @@ -674,6 +775,10 @@ class Registration(ANTSCommand): --use-estimate-learning-rate-once 1 --use-histogram-matching 1 --masks [ fixed1.nii, NULL ] \ --winsorize-image-intensities [ 0.0, 1.0 ] --write-composite-transform 1' + Here we use both a warpfield and a linear transformation, before registration commences. Note that + the first transformation that needs to be applied ('ants_Warp.nii.gz') is last in the list of + 'initial_moving_transform'. + >>> # Test initialization with multiple transforms matrices (e.g., unwarp and affine transform) >>> reg10 = copy.deepcopy(reg) >>> reg10.inputs.initial_moving_transform = ['func_to_struct.mat', 'ants_Warp.nii.gz'] From 4930295398c9b1999738f2046de955abac145414 Mon Sep 17 00:00:00 2001 From: Gilles de Hollander Date: Wed, 11 Oct 2017 13:52:27 +0200 Subject: [PATCH 390/643] Fixed link in ants.Registration documentation --- nipype/interfaces/ants/registration.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nipype/interfaces/ants/registration.py b/nipype/interfaces/ants/registration.py index 08e3ed8535..2991caaa27 100644 --- a/nipype/interfaces/ants/registration.py +++ b/nipype/interfaces/ants/registration.py @@ -472,7 +472,7 @@ class Registration(ANTSCommand): output is preferred for most use-cases. More information can be found in the `ANTS - manual`. + manual `_. See below for some useful examples. From 49677ec8dd0bca5d06fdb40177a01384df86388e Mon Sep 17 00:00:00 2001 From: Gilles de Hollander Date: Wed, 11 Oct 2017 21:00:27 +0200 Subject: [PATCH 391/643] autopep8 and trailing whitespace is cleaned-up --- nipype/interfaces/ants/registration.py | 210 ++++++++++++++----------- 1 file changed, 114 insertions(+), 96 deletions(-) diff --git a/nipype/interfaces/ants/registration.py b/nipype/interfaces/ants/registration.py index 2991caaa27..9507b3f0a8 100644 --- a/nipype/interfaces/ants/registration.py +++ b/nipype/interfaces/ants/registration.py @@ -52,9 +52,8 @@ class ANTSInputSpec(ANTSCommandInputSpec): metric_weight = traits.List(traits.Float(), requires=['metric'], desc='') radius = traits.List(traits.Int(), requires=['metric'], desc='') - output_transform_prefix = Str('out', usedefault=True, - argstr='--output-naming %s', - mandatory=True, desc='') + output_transform_prefix = Str('out', usedefault=True, argstr='--output-naming %s', + mandatory=True, desc='') transformation_model = traits.Enum('Diff', 'Elast', 'Exp', 'Greedy Exp', 'SyN', argstr='%s', mandatory=True, desc='') @@ -182,7 +181,8 @@ def _affine_gradient_descent_option_constructor(self): defaults[ii] = values[ii] except IndexError: break - parameters = self._format_xarray([('%g' % defaults[index]) for index in range(4)]) + parameters = self._format_xarray( + [('%g' % defaults[index]) for index in range(4)]) retval = ['--affine-gradient-descent-option', parameters] return ' '.join(retval) @@ -220,7 +220,7 @@ class RegistrationInputSpec(ANTSCommandInputSpec): usedefault=True, desc='image dimension (2 or 3)') fixed_image = InputMultiPath(File(exists=True), mandatory=True, desc='Image to which the moving_image should be transformed' - '(usually a structural image)') + '(usually a structural image)') fixed_image_mask = File( exists=True, argstr='%s', max_ver='2.1.0', xor=['fixed_image_masks'], desc='Mask used to limit metric sampling region of the fixed image' @@ -246,18 +246,19 @@ class RegistrationInputSpec(ANTSCommandInputSpec): restore_state = File(argstr='--restore-state %s', exists=True, desc='Filename for restoring the internal restorable state of the registration') - initial_moving_transform = InputMultiPath(argstr='%s', - exists=True, + initial_moving_transform = InputMultiPath(argstr='%s', + exists=True, desc='A transform or a list of transforms that should be applied' - 'before the registration begins. Note that, when a list is given,' - 'the transformations are applied in reverse order.', - xor=['initial_moving_transform_com']) - invert_initial_moving_transform= InputMultiPath(traits.Bool(), - requires=["initial_moving_transform"], - desc='One boolean or a list of booleans that indicate' - 'whether the inverse(s) of the transform(s) defined' - 'in initial_moving_transform should be used.', - xor=['initial_moving_transform_com']) + 'before the registration begins. Note that, when a list is given,' + 'the transformations are applied in reverse order.', + xor=['initial_moving_transform_com']) + invert_initial_moving_transform = InputMultiPath(traits.Bool(), + requires=[ + "initial_moving_transform"], + desc='One boolean or a list of booleans that indicate' + 'whether the inverse(s) of the transform(s) defined' + 'in initial_moving_transform should be used.', + xor=['initial_moving_transform_com']) initial_moving_transform_com = traits.Enum(0, 1, 2, argstr='%s', default=0, xor=['initial_moving_transform'], @@ -436,10 +437,10 @@ class RegistrationOutputSpec(TraitedSpec): class Registration(ANTSCommand): """ - `antsRegister `_ registers a 'moving_image' to a 'fixed_image', - using a predefined (sequence of) cost function(s) and transformation operattions. - The cost function is defined using one or more 'metrics', specifically - local cross-correlation ('CC'), Mean Squares ('MeanSquares'), Demons ('Demons'), + `antsRegistration `_ registers a 'moving_image' to a 'fixed_image', + using a predefined (sequence of) cost function(s) and transformation operattions. + The cost function is defined using one or more 'metrics', specifically + local cross-correlation ('CC'), Mean Squares ('MeanSquares'), Demons ('Demons'), global correlation ('GC'), or Mutual Information ('Mattes' or 'MI'). ANTS can use both linear ('Translation, 'Rigid', 'Affine', 'CompositeAffine', @@ -457,8 +458,8 @@ class Registration(ANTSCommand): The Registration-interface can output the resulting transform(s) that map moving_image to fixed_image in a single file as a 'composite_transform' (if write_composite_transform - is set to True), or a list of transforms as 'forwards_transforms'. It can also output - inverse transforms (from fixed_image to moving_image) in a similar fashion using + is set to True), or a list of transforms as 'forwards_transforms'. It can also output + inverse transforms (from fixed_image to moving_image) in a similar fashion using inverse_composite_transform. Note that the order of forward_transforms is in 'natural' order: the first element should be applied first, the last element should be applied last. @@ -466,13 +467,13 @@ class Registration(ANTSCommand): transformation in the list is applied first). Therefore, if the output forward_transforms is a list, one can not directly feed it into, for example, ants.ApplyTransforms. To make ants.ApplyTransforms apply the transformations in the same order as ants.Registration, - you have to provide the list of transformations in reverse order from forward_transforms. + you have to provide the list of transformations in reverse order from forward_transforms. reverse_forward_transforms outputs forward_transforms in reverse order and can be used for t this purpose. Note also that, because composite_transform is always only a single file, this output is preferred for most use-cases. - More information can be found in the `ANTS - manual `_. + More information can be found in the `ANTS + manual `_. See below for some useful examples. @@ -542,7 +543,7 @@ class Registration(ANTSCommand): >>> reg1.run() # doctest: +SKIP Clip extremely high intensity data points using winsorize_upper_quantile. All data points - higher than the 0.975 quantile are set to the value of the 0.975 quantile. + higher than the 0.975 quantile are set to the value of the 0.975 quantile. >>> reg2 = copy.deepcopy(reg) >>> reg2.inputs.winsorize_upper_quantile = 0.975 @@ -664,10 +665,10 @@ class Registration(ANTSCommand): --write-composite-transform 0' One can use multiple similarity metrics in a single registration stage.The Node below first - performs a linear registation using only the Mutual Information ('Mattes')-metric. + performs a linear registation using only the Mutual Information ('Mattes')-metric. In a second stage, it performs a non-linear registration ('Syn') using both a - Mutual Information and a local cross-correlation ('CC')-metric. Both metrics are weighted - equally ('metric_weight' is .5 for both). The Mutual Information- metric uses 32 bins. + Mutual Information and a local cross-correlation ('CC')-metric. Both metrics are weighted + equally ('metric_weight' is .5 for both). The Mutual Information- metric uses 32 bins. The local cross-correlations (correlations between every voxel's neighborhoods) is computed with a radius of 4. @@ -743,7 +744,7 @@ class Registration(ANTSCommand): --use-estimate-learning-rate-once 1 --use-histogram-matching 1 --winsorize-image-intensities [ 0.0, 1.0 ] \ --write-composite-transform 1' - BSplineSyN non-linear registration with custom parameters. + BSplineSyN non-linear registration with custom parameters. >>> # Test Extended Transform Parameters >>> reg8 = copy.deepcopy(reg) @@ -801,7 +802,8 @@ class Registration(ANTSCommand): input_spec = RegistrationInputSpec output_spec = RegistrationOutputSpec _quantilesDone = False - _linear_transform_names = ['Rigid', 'Affine', 'Translation', 'CompositeAffine', 'Similarity'] + _linear_transform_names = ['Rigid', 'Affine', + 'Translation', 'CompositeAffine', 'Similarity'] def _format_metric(self, index): """ @@ -931,14 +933,17 @@ def _format_registration(self): if any((isdefined(self.inputs.fixed_image_masks), isdefined(self.inputs.moving_image_masks))): if isdefined(self.inputs.fixed_image_masks): - fixed_masks = filename_to_list(self.inputs.fixed_image_masks) + fixed_masks = filename_to_list( + self.inputs.fixed_image_masks) fixed_mask = fixed_masks[ii if len(fixed_masks) > 1 else 0] else: fixed_mask = 'NULL' if isdefined(self.inputs.moving_image_masks): - moving_masks = filename_to_list(self.inputs.moving_image_masks) - moving_mask = moving_masks[ii if len(moving_masks) > 1 else 0] + moving_masks = filename_to_list( + self.inputs.moving_image_masks) + moving_mask = moving_masks[ii if len( + moving_masks) > 1 else 0] else: moving_mask = 'NULL' retval.append('--masks [ %s, %s ]' % (fixed_mask, moving_mask)) @@ -966,7 +971,8 @@ def _get_outputfilenames(self, inverse=False): return inv_output_filename def _format_convergence(self, ii): - convergence_iter = self._format_xarray(self.inputs.number_of_iterations[ii]) + convergence_iter = self._format_xarray( + self.inputs.number_of_iterations[ii]) if len(self.inputs.convergence_threshold) > ii: convergence_value = self.inputs.convergence_threshold[ii] else: @@ -998,7 +1004,8 @@ def _get_initial_transform_filenames(self): raise Exception(("ERROR: The useInverse list must have the same number " "of entries as the transformsFileName list.")) else: - retval.append("[ %s, 0 ]" % self.inputs.initial_moving_transform[ii]) + retval.append("[ %s, 0 ]" % + self.inputs.initial_moving_transform[ii]) return " ".join(retval) def _format_arg(self, opt, spec, val): @@ -1078,7 +1085,8 @@ def _list_outputs(self): # invert_initial_moving_transform should be always defined, even if # there's no initial transform - invert_initial_moving_transform = [False] * len(self.inputs.initial_moving_transform) + invert_initial_moving_transform = [ + False] * len(self.inputs.initial_moving_transform) if isdefined(self.inputs.invert_initial_moving_transform): invert_initial_moving_transform = self.inputs.invert_initial_moving_transform @@ -1088,14 +1096,17 @@ def _list_outputs(self): filename = self.inputs.output_transform_prefix + \ 'InverseComposite.h5' outputs['inverse_composite_transform'] = os.path.abspath(filename) - else: # If composite transforms are written, then individuals are not written (as of 2014-10-26 + # If composite transforms are written, then individuals are not written (as of 2014-10-26 + else: if not self.inputs.collapse_output_transforms: transform_count = 0 if isdefined(self.inputs.initial_moving_transform): outputs['forward_transforms'] += self.inputs.initial_moving_transform outputs['forward_invert_flags'] += invert_initial_moving_transform - outputs['reverse_transforms'] = self.inputs.initial_moving_transform + outputs['reverse_transforms'] - outputs['reverse_invert_flags'] = [not e for e in invert_initial_moving_transform] + outputs['reverse_invert_flags'] # Prepend + outputs['reverse_transforms'] = self.inputs.initial_moving_transform + \ + outputs['reverse_transforms'] + outputs['reverse_invert_flags'] = [ + not e for e in invert_initial_moving_transform] + outputs['reverse_invert_flags'] # Prepend transform_count += len(self.inputs.initial_moving_transform) elif isdefined(self.inputs.initial_moving_transform_com): forward_filename, forward_inversemode = self._output_filenames( @@ -1107,7 +1118,8 @@ def _list_outputs(self): transform_count, 'Initial', True) - outputs['forward_transforms'].append(os.path.abspath(forward_filename)) + outputs['forward_transforms'].append( + os.path.abspath(forward_filename)) outputs['forward_invert_flags'].append(False) outputs['reverse_transforms'].insert(0, os.path.abspath(reverse_filename)) @@ -1121,14 +1133,18 @@ def _list_outputs(self): reverse_filename, reverse_inversemode = self._output_filenames( self.inputs.output_transform_prefix, transform_count, self.inputs.transforms[count], True) - outputs['forward_transforms'].append(os.path.abspath(forward_filename)) + outputs['forward_transforms'].append( + os.path.abspath(forward_filename)) outputs['forward_invert_flags'].append(forward_inversemode) - outputs['reverse_transforms'].insert(0, os.path.abspath(reverse_filename)) - outputs['reverse_invert_flags'].insert(0, reverse_inversemode) + outputs['reverse_transforms'].insert( + 0, os.path.abspath(reverse_filename)) + outputs['reverse_invert_flags'].insert( + 0, reverse_inversemode) transform_count += 1 else: transform_count = 0 - is_linear = [t in self._linear_transform_names for t in self.inputs.transforms] + is_linear = [ + t in self._linear_transform_names for t in self.inputs.transforms] collapse_list = [] if isdefined(self.inputs.initial_moving_transform) or \ @@ -1152,9 +1168,11 @@ def _list_outputs(self): transform_count, transform, inverse=True) - outputs['forward_transforms'].append(os.path.abspath(forward_filename)) + outputs['forward_transforms'].append( + os.path.abspath(forward_filename)) outputs['forward_invert_flags'].append(forward_inversemode) - outputs['reverse_transforms'].append(os.path.abspath(reverse_filename)) + outputs['reverse_transforms'].append( + os.path.abspath(reverse_filename)) outputs['reverse_invert_flags'].append(reverse_inversemode) transform_count += 1 @@ -1171,51 +1189,51 @@ def _list_outputs(self): class MeasureImageSimilarityInputSpec(ANTSCommandInputSpec): dimension = traits.Enum( - 2, 3, 4, - argstr='--dimensionality %d', position=1, - desc='Dimensionality of the fixed/moving image pair', - ) + 2, 3, 4, + argstr='--dimensionality %d', position=1, + desc='Dimensionality of the fixed/moving image pair', + ) fixed_image = File( - exists=True, mandatory=True, - desc='Image to which the moving image is warped', - ) + exists=True, mandatory=True, + desc='Image to which the moving image is warped', + ) moving_image = File( - exists=True, mandatory=True, - desc='Image to apply transformation to (generally a coregistered functional)', - ) + exists=True, mandatory=True, + desc='Image to apply transformation to (generally a coregistered functional)', + ) metric = traits.Enum( - "CC", "MI", "Mattes", "MeanSquares", "Demons", "GC", - argstr="%s", mandatory=True, - ) + "CC", "MI", "Mattes", "MeanSquares", "Demons", "GC", + argstr="%s", mandatory=True, + ) metric_weight = traits.Float( - requires=['metric'], default=1.0, usedefault=True, - desc='The "metricWeight" variable is not used.', - ) + requires=['metric'], default=1.0, usedefault=True, + desc='The "metricWeight" variable is not used.', + ) radius_or_number_of_bins = traits.Int( - requires=['metric'], mandatory=True, - desc='The number of bins in each stage for the MI and Mattes metric, ' - 'or the radius for other metrics', - ) + requires=['metric'], mandatory=True, + desc='The number of bins in each stage for the MI and Mattes metric, ' + 'or the radius for other metrics', + ) sampling_strategy = traits.Enum( - "None", "Regular", "Random", - requires=['metric'], default="None", usedefault=True, - desc='Manner of choosing point set over which to optimize the metric. ' - 'Defaults to "None" (i.e. a dense sampling of one sample per voxel).' - ) + "None", "Regular", "Random", + requires=['metric'], default="None", usedefault=True, + desc='Manner of choosing point set over which to optimize the metric. ' + 'Defaults to "None" (i.e. a dense sampling of one sample per voxel).' + ) sampling_percentage = traits.Either( - traits.Range(low=0.0, high=1.0), - requires=['metric'], mandatory=True, - desc='Percentage of points accessible to the sampling strategy over which ' - 'to optimize the metric.' - ) + traits.Range(low=0.0, high=1.0), + requires=['metric'], mandatory=True, + desc='Percentage of points accessible to the sampling strategy over which ' + 'to optimize the metric.' + ) fixed_image_mask = File( exists=True, argstr='%s', desc='mask used to limit metric sampling region of the fixed image', - ) + ) moving_image_mask = File( exists=True, requires=['fixed_image_mask'], desc='mask used to limit metric sampling region of the moving image', - ) + ) class MeasureImageSimilarityOutputSpec(TraitedSpec): @@ -1251,30 +1269,30 @@ class MeasureImageSimilarity(ANTSCommand): def _metric_constructor(self): retval = '--metric {metric}["{fixed_image}","{moving_image}",{metric_weight},'\ - '{radius_or_number_of_bins},{sampling_strategy},{sampling_percentage}]'\ - .format( - metric=self.inputs.metric, - fixed_image=self.inputs.fixed_image, - moving_image=self.inputs.moving_image, - metric_weight=self.inputs.metric_weight, - radius_or_number_of_bins=self.inputs.radius_or_number_of_bins, - sampling_strategy=self.inputs.sampling_strategy, - sampling_percentage=self.inputs.sampling_percentage, - ) + '{radius_or_number_of_bins},{sampling_strategy},{sampling_percentage}]'\ + .format( + metric=self.inputs.metric, + fixed_image=self.inputs.fixed_image, + moving_image=self.inputs.moving_image, + metric_weight=self.inputs.metric_weight, + radius_or_number_of_bins=self.inputs.radius_or_number_of_bins, + sampling_strategy=self.inputs.sampling_strategy, + sampling_percentage=self.inputs.sampling_percentage, + ) return retval def _mask_constructor(self): if self.inputs.moving_image_mask: retval = '--masks ["{fixed_image_mask}","{moving_image_mask}"]'\ - .format( - fixed_image_mask=self.inputs.fixed_image_mask, - moving_image_mask=self.inputs.moving_image_mask, - ) + .format( + fixed_image_mask=self.inputs.fixed_image_mask, + moving_image_mask=self.inputs.moving_image_mask, + ) else: retval = '--masks "{fixed_image_mask}"'\ - .format( - fixed_image_mask=self.inputs.fixed_image_mask, - ) + .format( + fixed_image_mask=self.inputs.fixed_image_mask, + ) return retval def _format_arg(self, opt, spec, val): From 4dc3923c042a621bffb18719355f361f5e186151 Mon Sep 17 00:00:00 2001 From: Gilles de Hollander Date: Wed, 11 Oct 2017 21:18:53 +0200 Subject: [PATCH 392/643] Incorporated @oesteban's comments --- nipype/interfaces/ants/registration.py | 66 +++++++++++++------------- nipype/interfaces/ants/utils.py | 9 ---- 2 files changed, 32 insertions(+), 43 deletions(-) diff --git a/nipype/interfaces/ants/registration.py b/nipype/interfaces/ants/registration.py index 9507b3f0a8..5b4059c4ed 100644 --- a/nipype/interfaces/ants/registration.py +++ b/nipype/interfaces/ants/registration.py @@ -437,39 +437,39 @@ class RegistrationOutputSpec(TraitedSpec): class Registration(ANTSCommand): """ - `antsRegistration `_ registers a 'moving_image' to a 'fixed_image', - using a predefined (sequence of) cost function(s) and transformation operattions. + `antsRegistration `_ registers a ``moving_image`` to a ``fixed_image``, + using a predefined (sequence of) cost function(s) and transformation operations. The cost function is defined using one or more 'metrics', specifically - local cross-correlation ('CC'), Mean Squares ('MeanSquares'), Demons ('Demons'), - global correlation ('GC'), or Mutual Information ('Mattes' or 'MI'). + local cross-correlation (``CC``), Mean Squares (``MeanSquares``), Demons (``Demons``), + global correlation (``GC``), or Mutual Information (``Mattes`` or ``MI``). - ANTS can use both linear ('Translation, 'Rigid', 'Affine', 'CompositeAffine', - or 'Translation') and non-linear transformations ('BSpline', 'GaussianDisplacementField', - 'TimeVaryingVelocityField', 'TimeVaryingBSplineVelocityField', 'SyN', 'BSplineSyN', - 'Exponential', or 'BSplineExponential'). Usually, registration is done in multiple + ANTS can use both linear (``Translation, ``Rigid``, ``Affine``, ``CompositeAffine``, + or ``Translation``) and non-linear transformations (``BSpline``, ``GaussianDisplacementField``, + ``TimeVaryingVelocityField``, ``TimeVaryingBSplineVelocityField``, ``SyN``, ``BSplineSyN``, + ``Exponential``, or ``BSplineExponential``). Usually, registration is done in multiple *stages*. For example first an Affine, then a Rigid, and ultimately a non-linear (Syn)-transformation. antsRegistration can be initialized using one ore more transforms from moving_image - to fixed_image with the 'initial_moving_transform'-input. For example, when you + to fixed_image with the ``initial_moving_transform``-input. For example, when you already have a warpfield that corrects for geometrical distortions in an EPI (functional) image, that you want to apply before an Affine registration to a structural image. You could put this transform into 'intial_moving_transform'. The Registration-interface can output the resulting transform(s) that map moving_image to - fixed_image in a single file as a 'composite_transform' (if write_composite_transform - is set to True), or a list of transforms as 'forwards_transforms'. It can also output - inverse transforms (from fixed_image to moving_image) in a similar fashion using - inverse_composite_transform. Note that the order of forward_transforms is in 'natural' + fixed_image in a single file as a ``composite_transform`` (if ``write_composite_transform`` + is set to True), or a list of transforms as ``forwards_transforms``. It can also output + inverse transforms (from ``fixed_image`` to ``moving_image``) in a similar fashion using + ``inverse_composite_transform``. Note that the order of ``forward_transforms`` is in 'natural' order: the first element should be applied first, the last element should be applied last. Note, however, that ANTS tools always apply lists of transformations in reverse order (the last transformation in the list is applied first). Therefore, if the output forward_transforms - is a list, one can not directly feed it into, for example, ants.ApplyTransforms. To - make ants.ApplyTransforms apply the transformations in the same order as ants.Registration, - you have to provide the list of transformations in reverse order from forward_transforms. - reverse_forward_transforms outputs forward_transforms in reverse order and can be used for t - this purpose. Note also that, because composite_transform is always only a single file, this + is a list, one can not directly feed it into, for example, ``ants.ApplyTransforms``. To + make ``ants.ApplyTransforms`` apply the transformations in the same order as ``ants.Registration``, + you have to provide the list of transformations in reverse order from ``forward_transforms``. + ``reverse_forward_transforms`` outputs ``forward_transforms`` in reverse order and can be used for + this purpose. Note also that, because ``composite_transform`` is always a single file, this output is preferred for most use-cases. More information can be found in the `ANTS @@ -990,23 +990,21 @@ def _format_winsorize_image_intensities(self): self._quantilesDone = True return '--winsorize-image-intensities [ %s, %s ]' % (self.inputs.winsorize_lower_quantile, self.inputs.winsorize_upper_quantile) - def _get_initial_transform_filenames(self): - retval = ['--initial-moving-transform'] - for ii in range(len(self.inputs.initial_moving_transform)): - if isdefined(self.inputs.invert_initial_moving_transform): - if len(self.inputs.initial_moving_transform) == len(self.inputs.invert_initial_moving_transform): - invert_code = 1 if self.inputs.invert_initial_moving_transform[ - ii] else 0 - retval.append("[ %s, %d ]" % - (self.inputs.initial_moving_transform[ii], invert_code)) - else: - raise Exception(("ERROR: The useInverse list must have the same number " - "of entries as the transformsFileName list.")) - else: - retval.append("[ %s, 0 ]" % - self.inputs.initial_moving_transform[ii]) - return " ".join(retval) + n_transforms = len(self.inputs.initial_moving_transform) + + # Assume transforms should not be inverted by default + invert_flags = [0] * n_transforms + if isdefined(self.inputs.invert_initial_moving_transform): + if len(self.inputs.invert_initial_moving_transform) != n_transforms: + raise Exception( + 'Inputs "initial_moving_transform" and "invert_initial_moving_transform"' + 'should have the same length.') + invert_flags = self.inputs.invert_initial_moving_transform + + retval = ["[ %s, %d ]" % (xfm, int(flag)) for xfm, flag in zip( + self.inputs.initial_moving_transform, invert_flags)] + return " ".join(['--initial-moving-transform'] + retval) def _format_arg(self, opt, spec, val): if opt == 'fixed_image_mask': diff --git a/nipype/interfaces/ants/utils.py b/nipype/interfaces/ants/utils.py index c651b948e0..1d5d577349 100644 --- a/nipype/interfaces/ants/utils.py +++ b/nipype/interfaces/ants/utils.py @@ -255,16 +255,7 @@ class ComposeMultiTransform(ANTSCommand): 'ComposeMultiTransform 3 func_to_template.mat struct_to_template.mat func_to_struct.mat' """ _cmd = 'ComposeMultiTransform' - input_spec = ComposeMultiTransformInputSpec - output_spec = ComposeMultiTransformOutputSpec def _format_arg(self, opt, spec, val): return super(ComposeMultiTransform, self)._format_arg(opt, spec, val) - def _list_outputs(self): - outputs = self._outputs().get() - outputs['output_transform'] = os.path.abspath( - self.inputs.output_transform) - return outputs - - From addee0276ed083a695131543baf1095b5842b8d9 Mon Sep 17 00:00:00 2001 From: Gilles de Hollander Date: Wed, 11 Oct 2017 21:21:08 +0200 Subject: [PATCH 393/643] PEP8-ing that utils.py --- nipype/interfaces/ants/utils.py | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/nipype/interfaces/ants/utils.py b/nipype/interfaces/ants/utils.py index 1d5d577349..ff7b2aed1e 100644 --- a/nipype/interfaces/ants/utils.py +++ b/nipype/interfaces/ants/utils.py @@ -11,9 +11,7 @@ import os -from ...utils.filemanip import split_filename -from ..base import (TraitedSpec, File, traits, isdefined, InputMultiPath, - CommandLine, CommandLineInputSpec) +from ..base import (TraitedSpec, File, traits, isdefined, InputMultiPath) from .base import ANTSCommand, ANTSCommandInputSpec @@ -101,7 +99,8 @@ def _list_outputs(self): class MultiplyImagesInputSpec(ANTSCommandInputSpec): dimension = traits.Enum(3, 2, argstr='%d', usedefault=False, mandatory=True, position=0, desc='image dimension (2 or 3)') - first_input = File(argstr='%s', exists=True, mandatory=True, position=1, desc='image 1') + first_input = File(argstr='%s', exists=True, + mandatory=True, position=1, desc='image 1') second_input = traits.Either(File(exists=True), traits.Float, argstr='%s', mandatory=True, position=2, desc='image 2 or multiplication weight') output_product_image = File(argstr='%s', mandatory=True, position=3, @@ -138,22 +137,25 @@ def _list_outputs(self): self.inputs.output_product_image) return outputs + class CreateJacobianDeterminantImageInputSpec(ANTSCommandInputSpec): imageDimension = traits.Enum(3, 2, argstr='%d', usedefault=False, mandatory=True, - position=0, desc='image dimension (2 or 3)') + position=0, desc='image dimension (2 or 3)') deformationField = File(argstr='%s', exists=True, mandatory=True, - position=1, desc='deformation transformation file') + position=1, desc='deformation transformation file') outputImage = File(argstr='%s', mandatory=True, - position=2, - desc='output filename') + position=2, + desc='output filename') doLogJacobian = traits.Enum(0, 1, argstr='%d', position=3, - desc='return the log jacobian') + desc='return the log jacobian') useGeometric = traits.Enum(0, 1, argstr='%d', position=4, - desc='return the geometric jacobian') + desc='return the geometric jacobian') + class CreateJacobianDeterminantImageOutputSpec(TraitedSpec): jacobian_image = File(exists=True, desc='jacobian image') + class CreateJacobianDeterminantImage(ANTSCommand): """ Examples @@ -203,6 +205,7 @@ class AffineInitializerInputSpec(ANTSCommandInputSpec): desc=' determines if a local optimization is run at each search point for the set ' 'number of iterations') + class AffineInitializerOutputSpec(TraitedSpec): out_file = File(desc='output transform file') @@ -231,9 +234,10 @@ class ComposeMultiTransformInputSpec(ANTSCommandInputSpec): dimension = traits.Enum(3, 2, argstr='%d', usedefault=True, mandatory=True, position=0, desc='image dimension (2 or 3)') output_transform = File(argstr='%s', mandatory=True, position=1, - desc='Outputfname.txt: the name of the resulting transform.') + name_source=['transforms'], name_template='%s_composed', + desc='the name of the resulting transform.') reference_image = File(argstr='%s', mandatory=False, position=2, - desc='Reference image (only necessary when output is warpfield)') + desc='Reference image (only necessary when output is warpfield)') transforms = InputMultiPath(File(exists=True), argstr='%s', mandatory=True, position=3, desc='transforms to average') @@ -258,4 +262,3 @@ class ComposeMultiTransform(ANTSCommand): def _format_arg(self, opt, spec, val): return super(ComposeMultiTransform, self)._format_arg(opt, spec, val) - From cf3fc98d5968743aed61759bf7e8cbf4286ad0bf Mon Sep 17 00:00:00 2001 From: Gilles de Hollander Date: Wed, 11 Oct 2017 21:21:52 +0200 Subject: [PATCH 394/643] Auto tests --- .../interfaces/ants/tests/test_auto_ComposeMultiTransform.py | 3 ++- nipype/interfaces/ants/tests/test_auto_Registration.py | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/nipype/interfaces/ants/tests/test_auto_ComposeMultiTransform.py b/nipype/interfaces/ants/tests/test_auto_ComposeMultiTransform.py index b82a4f5d9a..8d342c1b50 100644 --- a/nipype/interfaces/ants/tests/test_auto_ComposeMultiTransform.py +++ b/nipype/interfaces/ants/tests/test_auto_ComposeMultiTransform.py @@ -28,7 +28,8 @@ def test_ComposeMultiTransform_inputs(): mandatory=False, position=2, ), - terminal_output=dict(nohash=True, + terminal_output=dict(deprecated='1.0.0', + nohash=True, ), transforms=dict(argstr='%s', mandatory=True, diff --git a/nipype/interfaces/ants/tests/test_auto_Registration.py b/nipype/interfaces/ants/tests/test_auto_Registration.py index 868ea3af8b..ae31082d72 100644 --- a/nipype/interfaces/ants/tests/test_auto_Registration.py +++ b/nipype/interfaces/ants/tests/test_auto_Registration.py @@ -36,6 +36,7 @@ def test_Registration_inputs(): usedefault=True, ), initial_moving_transform=dict(argstr='%s', + exists=True, xor=['initial_moving_transform_com'], ), initial_moving_transform_com=dict(argstr='%s', From 8c08f13f0024bb7705e5b6252aa8b65a0052978c Mon Sep 17 00:00:00 2001 From: Gilles de Hollander Date: Wed, 11 Oct 2017 21:25:21 +0200 Subject: [PATCH 395/643] input_spec and output_spec-definition seem necessary for ANTSCommand --- nipype/interfaces/ants/utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nipype/interfaces/ants/utils.py b/nipype/interfaces/ants/utils.py index ff7b2aed1e..03e4bfe198 100644 --- a/nipype/interfaces/ants/utils.py +++ b/nipype/interfaces/ants/utils.py @@ -245,7 +245,6 @@ class ComposeMultiTransformInputSpec(ANTSCommandInputSpec): class ComposeMultiTransformOutputSpec(TraitedSpec): output_transform = File(exists=True, desc='Composed transform file') - class ComposeMultiTransform(ANTSCommand): """ Examples @@ -259,6 +258,8 @@ class ComposeMultiTransform(ANTSCommand): 'ComposeMultiTransform 3 func_to_template.mat struct_to_template.mat func_to_struct.mat' """ _cmd = 'ComposeMultiTransform' + input_spec = ComposeMultiTransformInputSpec + output_spec = ComposeMultiTransformOutputSpec def _format_arg(self, opt, spec, val): return super(ComposeMultiTransform, self)._format_arg(opt, spec, val) From 12f76ce8a4aa3c7a5df644f2b0bd71ee27df0f3a Mon Sep 17 00:00:00 2001 From: Gilles de Hollander Date: Wed, 11 Oct 2017 21:28:40 +0200 Subject: [PATCH 396/643] One-line description of ComposeMultiTransform --- nipype/interfaces/ants/utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nipype/interfaces/ants/utils.py b/nipype/interfaces/ants/utils.py index 03e4bfe198..c229952bc8 100644 --- a/nipype/interfaces/ants/utils.py +++ b/nipype/interfaces/ants/utils.py @@ -247,6 +247,8 @@ class ComposeMultiTransformOutputSpec(TraitedSpec): class ComposeMultiTransform(ANTSCommand): """ + Take a set of transformations and convert them to a single transformation matrix/warpfield. + Examples -------- >>> from nipype.interfaces.ants import ComposeMultiTransform From 5d8471f95601542f05f8f31890057338f86eb8b6 Mon Sep 17 00:00:00 2001 From: Gilles de Hollander Date: Wed, 11 Oct 2017 21:29:39 +0200 Subject: [PATCH 397/643] Forgot to end --- nipype/interfaces/ants/registration.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nipype/interfaces/ants/registration.py b/nipype/interfaces/ants/registration.py index 5b4059c4ed..db7c61e121 100644 --- a/nipype/interfaces/ants/registration.py +++ b/nipype/interfaces/ants/registration.py @@ -443,7 +443,7 @@ class Registration(ANTSCommand): local cross-correlation (``CC``), Mean Squares (``MeanSquares``), Demons (``Demons``), global correlation (``GC``), or Mutual Information (``Mattes`` or ``MI``). - ANTS can use both linear (``Translation, ``Rigid``, ``Affine``, ``CompositeAffine``, + ANTS can use both linear (``Translation``, ``Rigid``, ``Affine``, ``CompositeAffine``, or ``Translation``) and non-linear transformations (``BSpline``, ``GaussianDisplacementField``, ``TimeVaryingVelocityField``, ``TimeVaryingBSplineVelocityField``, ``SyN``, ``BSplineSyN``, ``Exponential``, or ``BSplineExponential``). Usually, registration is done in multiple @@ -458,7 +458,7 @@ class Registration(ANTSCommand): The Registration-interface can output the resulting transform(s) that map moving_image to fixed_image in a single file as a ``composite_transform`` (if ``write_composite_transform`` - is set to True), or a list of transforms as ``forwards_transforms``. It can also output + is set to ``True``), or a list of transforms as ``forwards_transforms``. It can also output inverse transforms (from ``fixed_image`` to ``moving_image``) in a similar fashion using ``inverse_composite_transform``. Note that the order of ``forward_transforms`` is in 'natural' order: the first element should be applied first, the last element should be applied last. From b372a14fa6b45f4202518edb2d18fd2c74dce9a1 Mon Sep 17 00:00:00 2001 From: oesteban Date: Wed, 11 Oct 2017 16:02:04 -0700 Subject: [PATCH 398/643] address @chrisfilo's comments --- nipype/interfaces/ants/registration.py | 14 +++++++------- .../ants/tests/test_auto_Registration.py | 2 -- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/nipype/interfaces/ants/registration.py b/nipype/interfaces/ants/registration.py index 57cbdbdf91..9dd90fc536 100644 --- a/nipype/interfaces/ants/registration.py +++ b/nipype/interfaces/ants/registration.py @@ -400,8 +400,6 @@ class RegistrationInputSpec(ANTSCommandInputSpec): low=0.0, high=1.0, value=0.0, argstr='%s', usedefault=True, desc="The Lower quantile to clip image ranges") verbose = traits.Bool(argstr='-v', default=False) - profiling = traits.Bool(False, usedefault=True, - desc='generate profiling output fields') class RegistrationOutputSpec(TraitedSpec): @@ -693,15 +691,16 @@ class Registration(ANTSCommand): def __init__(self, **inputs): super(Registration, self).__init__(**inputs) - self._elapsed_time = 0.0 - self._metric_value = 0.0 + self._elapsed_time = None + self._metric_value = None def _run_interface(self, runtime, correct_return_codes=(0,)): runtime = super(Registration, self)._run_interface(runtime) # Parse some profiling info - if self.inputs.profiling: - lines = runtime.stdout.split('\n') + output = runtime.stdout or runtime.merged + if output: + lines = output.split('\n') for l in lines[::-1]: # This should be the last line if l.strip().startswith('Total elapsed time:'): @@ -1063,8 +1062,9 @@ def _list_outputs(self): outputs['inverse_warped_image'] = os.path.abspath(inv_out_filename) if len(self.inputs.save_state): outputs['save_state'] = os.path.abspath(self.inputs.save_state) - if self.inputs.profiling: + if self._metric_value: outputs['metric_value'] = self._metric_value + if self._elapsed_time: outputs['elapsed_time'] = self._elapsed_time return outputs diff --git a/nipype/interfaces/ants/tests/test_auto_Registration.py b/nipype/interfaces/ants/tests/test_auto_Registration.py index 6f2ab6d9dd..85e0171d7d 100644 --- a/nipype/interfaces/ants/tests/test_auto_Registration.py +++ b/nipype/interfaces/ants/tests/test_auto_Registration.py @@ -82,8 +82,6 @@ def test_Registration_inputs(): ), output_warped_image=dict(hash_files=False, ), - profiling=dict(usedefault=True, - ), radius_bins_item_trait=dict(), radius_bins_stage_trait=dict(), radius_or_number_of_bins=dict(requires=['metric_weight'], From e7fe8939bd9bf8f2ed1956f068a587ee9685405d Mon Sep 17 00:00:00 2001 From: oesteban Date: Wed, 11 Oct 2017 16:51:32 -0700 Subject: [PATCH 399/643] fix tests --- nipype/interfaces/ants/registration.py | 2 +- nipype/interfaces/tests/test_base.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nipype/interfaces/ants/registration.py b/nipype/interfaces/ants/registration.py index 9dd90fc536..74e940ae41 100644 --- a/nipype/interfaces/ants/registration.py +++ b/nipype/interfaces/ants/registration.py @@ -564,7 +564,7 @@ class Registration(ANTSCommand): >>> outputs = reg4b._list_outputs() >>> pprint.pprint(outputs) # doctest: +ELLIPSIS, +NORMALIZE_WHITESPACE +ALLOW_UNICODE {'composite_transform': , - 'metric_value': , + 'elapsed_time': , 'forward_invert_flags': [False, False], 'forward_transforms': ['.../nipype/testing/data/output_0GenericAffine.mat', '.../nipype/testing/data/output_1Warp.nii.gz'], diff --git a/nipype/interfaces/tests/test_base.py b/nipype/interfaces/tests/test_base.py index 5a6dc2d690..995ee2e45b 100644 --- a/nipype/interfaces/tests/test_base.py +++ b/nipype/interfaces/tests/test_base.py @@ -464,7 +464,7 @@ def __init__(self, **inputs): assert {} == check_dict(data_dict, tsthash2.inputs.get_traitsfree()) _, hashvalue = tsthash.inputs.get_hashval(hash_method='timestamp') - assert '6479ade7424f2c2920f0b4e3991259e9' == hashvalue + assert 'ec5755e07287e04a4b409e03b77a517c' == hashvalue def test_input_version(): From f1a76cb950a9cc29b9da335f8cccf960b04fb0a6 Mon Sep 17 00:00:00 2001 From: jdkent Date: Thu, 12 Oct 2017 00:04:21 -0500 Subject: [PATCH 400/643] [FIX] 3dUndump interface --- .../interfaces/afni/tests/test_auto_Undump.py | 4 +++- nipype/interfaces/afni/utils.py | 19 +++++++++++++------ 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/nipype/interfaces/afni/tests/test_auto_Undump.py b/nipype/interfaces/afni/tests/test_auto_Undump.py index a063063198..aaab0427a2 100644 --- a/nipype/interfaces/afni/tests/test_auto_Undump.py +++ b/nipype/interfaces/afni/tests/test_auto_Undump.py @@ -32,11 +32,13 @@ def test_Undump_inputs(): num_threads=dict(nohash=True, usedefault=True, ), + orient=dict(argstr='-orient %s', + ), out_file=dict(argstr='-prefix %s', name_source='in_file', ), outputtype=dict(), - srad=dict(argstr='-srad -%f', + srad=dict(argstr='-srad %f', ), terminal_output=dict(deprecated='1.0.0', nohash=True, diff --git a/nipype/interfaces/afni/utils.py b/nipype/interfaces/afni/utils.py index 48f1303d2f..f7281542a6 100644 --- a/nipype/interfaces/afni/utils.py +++ b/nipype/interfaces/afni/utils.py @@ -2096,13 +2096,20 @@ class UndumpInputSpec(AFNICommandInputSpec): desc='radius in mm of the sphere that will be filled about each input ' '(x,y,z) or (i,j,k) voxel. If the radius is not given, or is 0, ' 'then each input data line sets the value in only one voxel.', - argstr='-srad -%f') - srad = traits.Tuple( + argstr='-srad %f') + orient = traits.Tuple( traits.Enum('R', 'L'), traits.Enum('A', 'P'), traits.Enum('I', 'S'), - desc='radius in mm of the sphere that will be filled about each input ' - '(x,y,z) or (i,j,k) voxel. If the radius is not given, or is 0, ' - 'then each input data line sets the value in only one voxel.', - argstr='-srad -%f') + desc='Specifies the coordinate order used by -xyz. ' + 'The code must be 3 letters, one each from the pairs ' + '{R,L} {A,P} {I,S}. The first letter gives the ' + 'orientation of the x-axis, the second the orientation ' + 'of the y-axis, the third the z-axis: ' + 'R = right-to-left L = left-to-right ' + 'A = anterior-to-posterior P = posterior-to-anterior ' + 'I = inferior-to-superior S = superior-to-inferior ' + 'If -orient isn\'t used, then the coordinate order of the ' + '-master (in_file) dataset is used to interpret (x,y,z) inputs.', + argstr='-orient %s') head_only = traits.Bool( desc='create only the .HEAD file which gets exploited by ' 'the AFNI matlab library function New_HEAD.m', From 8bffd7a6917b49a3291ba363e8749602f039ed55 Mon Sep 17 00:00:00 2001 From: oesteban Date: Thu, 12 Oct 2017 08:50:55 -0700 Subject: [PATCH 401/643] various fixes --- nipype/interfaces/ants/utils.py | 41 ++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 19 deletions(-) diff --git a/nipype/interfaces/ants/utils.py b/nipype/interfaces/ants/utils.py index c229952bc8..88d6d219a2 100644 --- a/nipype/interfaces/ants/utils.py +++ b/nipype/interfaces/ants/utils.py @@ -11,7 +11,7 @@ import os -from ..base import (TraitedSpec, File, traits, isdefined, InputMultiPath) +from ..base import TraitedSpec, File, traits, InputMultiPath from .base import ANTSCommand, ANTSCommandInputSpec @@ -57,12 +57,16 @@ def _list_outputs(self): class AverageImagesInputSpec(ANTSCommandInputSpec): dimension = traits.Enum(3, 2, argstr='%d', mandatory=True, position=0, desc='image dimension (2 or 3)') - output_average_image = File("average.nii", argstr='%s', position=1, desc='the name of the resulting image.', - usedefault=True, hash_files=False) - normalize = traits.Bool(argstr="%d", mandatory=True, position=2, desc='Normalize: if true, the 2nd image' + - 'is divided by its mean. This will select the largest image to average into.') - images = InputMultiPath(File(exists=True), argstr='%s', mandatory=True, position=3, - desc='image to apply transformation to (generally a coregistered functional)') + output_average_image = File( + "average.nii", argstr='%s', position=1, usedefault=True, hash_files=False, + desc='the name of the resulting image.') + normalize = traits.Bool( + argstr="%d", mandatory=True, position=2, + desc='Normalize: if true, the 2nd image is divided by its mean. ' + 'This will select the largest image to average into.') + images = InputMultiPath( + File(exists=True), argstr='%s', mandatory=True, position=3, + desc='image to apply transformation to (generally a coregistered functional)') class AverageImagesOutputSpec(TraitedSpec): @@ -101,8 +105,9 @@ class MultiplyImagesInputSpec(ANTSCommandInputSpec): desc='image dimension (2 or 3)') first_input = File(argstr='%s', exists=True, mandatory=True, position=1, desc='image 1') - second_input = traits.Either(File(exists=True), traits.Float, argstr='%s', mandatory=True, position=2, - desc='image 2 or multiplication weight') + second_input = traits.Either( + File(exists=True), traits.Float, argstr='%s', mandatory=True, position=2, + desc='image 2 or multiplication weight') output_product_image = File(argstr='%s', mandatory=True, position=3, desc='Outputfname.nii.gz: the name of the resulting image.') @@ -231,12 +236,12 @@ def _list_outputs(self): class ComposeMultiTransformInputSpec(ANTSCommandInputSpec): - dimension = traits.Enum(3, 2, argstr='%d', usedefault=True, mandatory=True, - position=0, desc='image dimension (2 or 3)') - output_transform = File(argstr='%s', mandatory=True, position=1, - name_source=['transforms'], name_template='%s_composed', + dimension = traits.Enum(3, 2, argstr='%d', usedefault=True, position=0, + desc='image dimension (2 or 3)') + output_transform = File(argstr='%s', position=1, name_source=['transforms'], + name_template='%s_composed', keep_ext=True, desc='the name of the resulting transform.') - reference_image = File(argstr='%s', mandatory=False, position=2, + reference_image = File(argstr='%s', position=2, desc='Reference image (only necessary when output is warpfield)') transforms = InputMultiPath(File(exists=True), argstr='%s', mandatory=True, position=3, desc='transforms to average') @@ -245,6 +250,7 @@ class ComposeMultiTransformInputSpec(ANTSCommandInputSpec): class ComposeMultiTransformOutputSpec(TraitedSpec): output_transform = File(exists=True, desc='Composed transform file') + class ComposeMultiTransform(ANTSCommand): """ Take a set of transformations and convert them to a single transformation matrix/warpfield. @@ -255,13 +261,10 @@ class ComposeMultiTransform(ANTSCommand): >>> compose_transform = ComposeMultiTransform() >>> compose_transform.inputs.dimension = 3 >>> compose_transform.inputs.transforms = ['struct_to_template.mat', 'func_to_struct.mat'] - >>> compose_transform.inputs.output_transform = 'func_to_template.mat' >>> compose_transform.cmdline # doctest: +ALLOW_UNICODE - 'ComposeMultiTransform 3 func_to_template.mat struct_to_template.mat func_to_struct.mat' + 'ComposeMultiTransform 3 struct_to_template_composed struct_to_template.mat func_to_struct.mat' + """ _cmd = 'ComposeMultiTransform' input_spec = ComposeMultiTransformInputSpec output_spec = ComposeMultiTransformOutputSpec - - def _format_arg(self, opt, spec, val): - return super(ComposeMultiTransform, self)._format_arg(opt, spec, val) From 4269085ad89a381733b52ecde56143b128b8b9ff Mon Sep 17 00:00:00 2001 From: oesteban Date: Thu, 12 Oct 2017 09:39:17 -0700 Subject: [PATCH 402/643] Make "Closing display" message show less, and in the debug stream --- nipype/utils/config.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nipype/utils/config.py b/nipype/utils/config.py index 4113d6d8c7..1b3ad5896e 100644 --- a/nipype/utils/config.py +++ b/nipype/utils/config.py @@ -316,13 +316,13 @@ def _mock(): def stop_display(self): """Closes the display if started""" if self._display is not None: + from .. import logging self._display.stop() + logging.getLogger('interface').debug('Closing display (if virtual)') @atexit.register def free_display(): """Stop virtual display (if it is up)""" from .. import config - from .. import logging config.stop_display() - logging.getLogger('interface').info('Closing display (if virtual)') From 1045d2af1869a96554d11c6720365d3a46e49bc3 Mon Sep 17 00:00:00 2001 From: oesteban Date: Thu, 12 Oct 2017 11:58:40 -0700 Subject: [PATCH 403/643] update specs --- .../ants/tests/test_auto_ComposeMultiTransform.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nipype/interfaces/ants/tests/test_auto_ComposeMultiTransform.py b/nipype/interfaces/ants/tests/test_auto_ComposeMultiTransform.py index 8d342c1b50..5f020e7dbb 100644 --- a/nipype/interfaces/ants/tests/test_auto_ComposeMultiTransform.py +++ b/nipype/interfaces/ants/tests/test_auto_ComposeMultiTransform.py @@ -7,7 +7,6 @@ def test_ComposeMultiTransform_inputs(): input_map = dict(args=dict(argstr='%s', ), dimension=dict(argstr='%d', - mandatory=True, position=0, usedefault=True, ), @@ -21,11 +20,12 @@ def test_ComposeMultiTransform_inputs(): usedefault=True, ), output_transform=dict(argstr='%s', - mandatory=True, + keep_ext=True, + name_source=['transforms'], + name_template='%s_composed', position=1, ), reference_image=dict(argstr='%s', - mandatory=False, position=2, ), terminal_output=dict(deprecated='1.0.0', From 6909149e2ced417d0c0162179b5b901f62dbf0ee Mon Sep 17 00:00:00 2001 From: oesteban Date: Thu, 12 Oct 2017 21:32:47 -0700 Subject: [PATCH 404/643] update CHANGES [skip ci] --- CHANGES | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES b/CHANGES index c677c0584d..057bcd7005 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,7 @@ Upcoming release ================ +* ENH: Add elapsed_time and final metric_value to ants.Registration (https://github.com/nipy/nipype/pull/1985) * ENH: Improve terminal_output feature (https://github.com/nipy/nipype/pull/2209) * ENH: Simple interface to FSL std2imgcoords (https://github.com/nipy/nipype/pull/2209, prev #1398) * ENH: Centralize virtual/physical $DISPLAYs (https://github.com/nipy/nipype/pull/#2203) From 615515c846dff4d9b53478f780640d98d0a407fa Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Thu, 12 Oct 2017 16:55:21 -0400 Subject: [PATCH 405/643] ENH: More flexible BIDSDataGrabber creation --- nipype/interfaces/bids_utils.py | 34 ++++++++++++--------------------- 1 file changed, 12 insertions(+), 22 deletions(-) diff --git a/nipype/interfaces/bids_utils.py b/nipype/interfaces/bids_utils.py index e1606e7d92..0bbc895094 100644 --- a/nipype/interfaces/bids_utils.py +++ b/nipype/interfaces/bids_utils.py @@ -34,6 +34,7 @@ LOGGER = logging.getLogger('workflows') + class BIDSDataGrabberInputSpec(DynamicTraitedSpec): base_dir = Directory(exists=True, desc='Path to BIDS Directory.', @@ -91,7 +92,7 @@ class BIDSDataGrabber(BaseInterface): output_spec = DynamicTraitedSpec _always_run = True - def __init__(self, infields=None, outfields=None, **kwargs): + def __init__(self, infields=None, **kwargs): """ Parameters ---------- @@ -104,17 +105,13 @@ def __init__(self, infields=None, outfields=None, **kwargs): """ super(BIDSDataGrabber, self).__init__(**kwargs) if not have_pybids: - raise ImportError("The BIDSEventsGrabber interface requires pybids." - " Please make sure it is installed.") - - # If outfields is None use anat and func as default - if outfields is None: - outfields = ['func', 'anat'] - self.inputs.output_query = { - "func": {"modality": "func"}, - "anat": {"modality": "anat"}} - else: - self.inputs.output_query = {} + raise ImportError( + "The BIDSEventsGrabber interface requires pybids." + " Please make sure it is installed.") + + if not isdefined(self.inputs.output_query): + self.inputs.output_query = {"func": {"modality": "func"}, + "anat": {"modality": "anat"}} # If infields is None, use all BIDS entities if infields is None: @@ -123,13 +120,12 @@ def __init__(self, infields=None, outfields=None, **kwargs): infields = [i['name'] for i in bids_config['entities']] self._infields = infields - self._outfields = outfields # used for mandatory inputs check undefined_traits = {} for key in infields: self.inputs.add_trait(key, traits.Any) - undefined_traits[key] = Undefined + undefined_traits[key] = kwargs[key] if key in kwargs else Undefined self.inputs.trait_set(trait_change_notify=False, **undefined_traits) @@ -139,10 +135,6 @@ def _run_interface(self, runtime): def _list_outputs(self): layout = gb.BIDSLayout(self.inputs.base_dir) - for key in self._outfields: - if key not in self.inputs.output_query: - raise ValueError("Define query for all outputs") - # If infield is not given nm input value, silently ignore filters = {} for key in self._infields: @@ -154,11 +146,9 @@ def _list_outputs(self): for key, query in self.inputs.output_query.items(): args = query.copy() args.update(filters) - filelist = layout.get(return_type=self.inputs.return_type, - **args) + filelist = layout.get(return_type=self.inputs.return_type, **args) if len(filelist) == 0: - msg = 'Output key: %s returned no files' % ( - key) + msg = 'Output key: %s returned no files' % key if self.inputs.raise_on_empty: raise IOError(msg) else: From 425a570859f06c8f7b0f3e4803ceb983d6fae17e Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Fri, 13 Oct 2017 14:02:58 -0400 Subject: [PATCH 406/643] make specs --- .../tests/test_auto_BIDSDataGrabber.py | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 nipype/interfaces/tests/test_auto_BIDSDataGrabber.py diff --git a/nipype/interfaces/tests/test_auto_BIDSDataGrabber.py b/nipype/interfaces/tests/test_auto_BIDSDataGrabber.py new file mode 100644 index 0000000000..36d02d5fe9 --- /dev/null +++ b/nipype/interfaces/tests/test_auto_BIDSDataGrabber.py @@ -0,0 +1,28 @@ +# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT +from __future__ import unicode_literals +from ..bids_utils import BIDSDataGrabber + + +def test_BIDSDataGrabber_inputs(): + input_map = dict(base_dir=dict(mandatory=True, + ), + output_query=dict(), + raise_on_empty=dict(usedefault=True, + ), + return_type=dict(usedefault=True, + ), + ) + inputs = BIDSDataGrabber.input_spec() + + for key, metadata in list(input_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(inputs.traits()[key], metakey) == value + + +def test_BIDSDataGrabber_outputs(): + output_map = dict() + outputs = BIDSDataGrabber.output_spec() + + for key, metadata in list(output_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(outputs.traits()[key], metakey) == value From 8249094f7953178af6f34bb417761a07d0e5b5e2 Mon Sep 17 00:00:00 2001 From: Dorota Jarecka Date: Fri, 13 Oct 2017 16:26:01 -0400 Subject: [PATCH 407/643] changing _format_arg in WarpImageMultiTransform and adding simple tests (mostly copy of doctests) --- nipype/interfaces/ants/resampling.py | 4 +- .../interfaces/ants/tests/test_resampling.py | 93 +++++++++++++++++++ 2 files changed, 95 insertions(+), 2 deletions(-) create mode 100644 nipype/interfaces/ants/tests/test_resampling.py diff --git a/nipype/interfaces/ants/resampling.py b/nipype/interfaces/ants/resampling.py index 39393dc0f0..63bb5c4a16 100644 --- a/nipype/interfaces/ants/resampling.py +++ b/nipype/interfaces/ants/resampling.py @@ -86,7 +86,7 @@ def _format_arg(self, opt, spec, val): isdefined(self.inputs.invert_affine): affine_counter += 1 if affine_counter in self.inputs.invert_affine: - series += ['-i'], + series += ['-i'] series += [transformation] return ' '.join(series) return super(WarpTimeSeriesImageMultiTransform, self)._format_arg(opt, spec, val) @@ -195,7 +195,7 @@ def _format_arg(self, opt, spec, val): isdefined(self.inputs.invert_affine): affine_counter += 1 if affine_counter in self.inputs.invert_affine: - series += '-i', + series += ['-i'] series += [transformation] return ' '.join(series) return super(WarpImageMultiTransform, self)._format_arg(opt, spec, val) diff --git a/nipype/interfaces/ants/tests/test_resampling.py b/nipype/interfaces/ants/tests/test_resampling.py new file mode 100644 index 0000000000..3c13afd853 --- /dev/null +++ b/nipype/interfaces/ants/tests/test_resampling.py @@ -0,0 +1,93 @@ +# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- +# vi: set ft=python sts=4 ts=4 sw=4 et: + +from nipype.interfaces.ants import WarpImageMultiTransform, WarpTimeSeriesImageMultiTransform +import os +import pytest, pdb + + +@pytest.fixture() +def change_dir(request): + orig_dir = os.getcwd() + filepath = os.path.dirname( os.path.realpath( __file__ ) ) + datadir = os.path.realpath(os.path.join(filepath, '../../../testing/data')) + os.chdir(datadir) + + def move2orig(): + os.chdir(orig_dir) + + request.addfinalizer(move2orig) + + + +def test_WarpImageMultiTransform(change_dir): + wimt = WarpImageMultiTransform() + wimt.inputs.input_image = 'diffusion_weighted.nii' + wimt.inputs.reference_image = 'functional.nii' + wimt.inputs.transformation_series = ['func2anat_coreg_Affine.txt','func2anat_InverseWarp.nii.gz', \ + 'dwi2anat_Warp.nii.gz','dwi2anat_coreg_Affine.txt'] + assert wimt.cmdline == 'WarpImageMultiTransform 3 diffusion_weighted.nii diffusion_weighted_wimt.nii -R functional.nii \ +func2anat_coreg_Affine.txt func2anat_InverseWarp.nii.gz dwi2anat_Warp.nii.gz dwi2anat_coreg_Affine.txt' + + +def test_WarpImageMultiTransform_invaffine_1(change_dir): + wimt = WarpImageMultiTransform() + wimt.inputs.input_image = 'diffusion_weighted.nii' + wimt.inputs.reference_image = 'functional.nii' + wimt.inputs.transformation_series = ['func2anat_coreg_Affine.txt','func2anat_InverseWarp.nii.gz', \ + 'dwi2anat_Warp.nii.gz','dwi2anat_coreg_Affine.txt'] + wimt.inputs.invert_affine = [1] + assert wimt.cmdline == 'WarpImageMultiTransform 3 diffusion_weighted.nii diffusion_weighted_wimt.nii -R functional.nii \ +-i func2anat_coreg_Affine.txt func2anat_InverseWarp.nii.gz dwi2anat_Warp.nii.gz dwi2anat_coreg_Affine.txt' + + +def test_WarpImageMultiTransform_invaffine_2(change_dir): + wimt = WarpImageMultiTransform() + wimt.inputs.input_image = 'diffusion_weighted.nii' + wimt.inputs.reference_image = 'functional.nii' + wimt.inputs.transformation_series = ['func2anat_coreg_Affine.txt','func2anat_InverseWarp.nii.gz', \ + 'dwi2anat_Warp.nii.gz','dwi2anat_coreg_Affine.txt'] + wimt.inputs.invert_affine = [2] + assert wimt.cmdline == 'WarpImageMultiTransform 3 diffusion_weighted.nii diffusion_weighted_wimt.nii -R functional.nii func2anat_coreg_Affine.txt func2anat_InverseWarp.nii.gz dwi2anat_Warp.nii.gz -i dwi2anat_coreg_Affine.txt' + + +@pytest.mark.xfail(reason="dj: should it fail?") +def test_WarpImageMultiTransform_invaffine_wrong(change_dir): + wimt = WarpImageMultiTransform() + wimt.inputs.input_image = 'diffusion_weighted.nii' + wimt.inputs.reference_image = 'functional.nii' + wimt.inputs.transformation_series = ['func2anat_coreg_Affine.txt','func2anat_InverseWarp.nii.gz', \ + 'dwi2anat_Warp.nii.gz','dwi2anat_coreg_Affine.txt'] + wimt.inputs.invert_affine = [3] + with pytest.raises(Exception): + assert wimt.cmdline + + +def test_WarpTimeSeriesImageMultiTransform(change_dir): + wtsimt = WarpTimeSeriesImageMultiTransform() + wtsimt.inputs.input_image = 'resting.nii' + wtsimt.inputs.reference_image = 'ants_deformed.nii.gz' + wtsimt.inputs.transformation_series = ['ants_Warp.nii.gz','ants_Affine.txt'] + assert wtsimt.cmdline == 'WarpTimeSeriesImageMultiTransform 4 resting.nii resting_wtsimt.nii \ +-R ants_deformed.nii.gz ants_Warp.nii.gz ants_Affine.txt' + + +def test_WarpTimeSeriesImageMultiTransform_invaffine(change_dir): + wtsimt = WarpTimeSeriesImageMultiTransform() + wtsimt.inputs.input_image = 'resting.nii' + wtsimt.inputs.reference_image = 'ants_deformed.nii.gz' + wtsimt.inputs.transformation_series = ['ants_Warp.nii.gz','ants_Affine.txt'] + wtsimt.inputs.invert_affine = [1] + assert wtsimt.cmdline == 'WarpTimeSeriesImageMultiTransform 4 resting.nii resting_wtsimt.nii \ +-R ants_deformed.nii.gz ants_Warp.nii.gz -i ants_Affine.txt' + + +@pytest.mark.xfail(reason="dj: should it fail?") +def test_WarpTimeSeriesImageMultiTransform_invaffine_wrong(change_dir): + wtsimt = WarpTimeSeriesImageMultiTransform() + wtsimt.inputs.input_image = 'resting.nii' + wtsimt.inputs.reference_image = 'ants_deformed.nii.gz' + wtsimt.inputs.transformation_series = ['ants_Warp.nii.gz','ants_Affine.txt'] + wtsimt.inputs.invert_affine = [0] + with pytest.raises(Exception): + wtsimt.cmdline From fba7bfc48e832a7535bff92697354896eb82d683 Mon Sep 17 00:00:00 2001 From: Chris Filo Gorgolewski Date: Sun, 15 Oct 2017 14:28:39 -0700 Subject: [PATCH 408/643] more friendly for newbies --- CONTRIBUTING.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f985bd1101..083507547e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,3 +1,5 @@ +**Are you new to open source and GitHub?** If so reading the "[How to submit a contribution](https://opensource.guide/how-to-contribute/#how-to-submit-a-contribution)" guide will provide a great introduction to contributing to Nipype and other Open Source projects. All the Nipype specific contributing instructions listed below will make much more sense after reading this guide. + ## Contributing pull-requests (PRs) * All work is submitted via Pull Requests. @@ -20,7 +22,7 @@ * adding more information about what may have caused the error. Raise a new exception using ``raise_from(NewException("message"), oldException)`` from ``future``. Do not log this, as it creates redundant/confusing logs. -* If you are new to the project don't forget to add your name and affiliation to the `.zenodo.json` file. +* **If you are new to the project don't forget to add your name and affiliation to the `.zenodo.json` file.** ## Contributing issues From b3129ab5db2b1be229dd03ea094ab6644f257738 Mon Sep 17 00:00:00 2001 From: Chris Filo Gorgolewski Date: Sun, 15 Oct 2017 14:43:40 -0700 Subject: [PATCH 409/643] Remove file structure description it's out of date and not that useful --- README.rst | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/README.rst b/README.rst index 5064198dd6..fe58912ccd 100644 --- a/README.rst +++ b/README.rst @@ -90,33 +90,3 @@ To participate in the Nipype development related discussions please use the foll Please add *[nipype]* to the subject line when posting on the mailing list. - -Nipype structure ----------------- - -Currently Nipype consists of the following files and directories: - - INSTALL - NIPYPE prerequisites, installation, development, testing, and - troubleshooting. - - README - This document. - - THANKS - NIPYPE developers and contributors. Please keep it up to date!! - - LICENSE - NIPYPE license terms. - - doc/ - Sphinx/reST documentation - - examples/ - - nipype/ - Contains the source code. - - setup.py - Script for building and installing NIPYPE. - From 1e4da39b124d98fe24c192151b101504ae0cb2e3 Mon Sep 17 00:00:00 2001 From: Chris Filo Gorgolewski Date: Sun, 15 Oct 2017 14:51:00 -0700 Subject: [PATCH 410/643] added links to contributing guide and code of conduct --- README.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.rst b/README.rst index fe58912ccd..dcfdbc2966 100644 --- a/README.rst +++ b/README.rst @@ -90,3 +90,8 @@ To participate in the Nipype development related discussions please use the foll Please add *[nipype]* to the subject line when posting on the mailing list. +Contributing to the project +--------------------------- + +If you'd like to contribute to the project please read our [guidelines](CONTRIBUTING.md). Please also read through our [code of conduct](CODE_OF_CONDUCT.md). + From acdb4a95528fc81e75f57bd44b92a59426e44bfc Mon Sep 17 00:00:00 2001 From: Chris Filo Gorgolewski Date: Sun, 15 Oct 2017 14:55:49 -0700 Subject: [PATCH 411/643] relative links --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index dcfdbc2966..02544c6913 100644 --- a/README.rst +++ b/README.rst @@ -93,5 +93,5 @@ Please add *[nipype]* to the subject line when posting on the mailing list. Contributing to the project --------------------------- -If you'd like to contribute to the project please read our [guidelines](CONTRIBUTING.md). Please also read through our [code of conduct](CODE_OF_CONDUCT.md). +If you'd like to contribute to the project please read our [guidelines](./CONTRIBUTING.md). Please also read through our [code of conduct](./CODE_OF_CONDUCT.md). From 1555e049838ffa10f8c69e66c22e554b568aa5fa Mon Sep 17 00:00:00 2001 From: Chris Filo Gorgolewski Date: Sun, 15 Oct 2017 14:59:11 -0700 Subject: [PATCH 412/643] abs links rst does not support relative links on github (only md) --- README.rst => README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename README.rst => README.md (95%) diff --git a/README.rst b/README.md similarity index 95% rename from README.rst rename to README.md index 02544c6913..7c35c8a14d 100644 --- a/README.rst +++ b/README.md @@ -93,5 +93,5 @@ Please add *[nipype]* to the subject line when posting on the mailing list. Contributing to the project --------------------------- -If you'd like to contribute to the project please read our [guidelines](./CONTRIBUTING.md). Please also read through our [code of conduct](./CODE_OF_CONDUCT.md). +If you'd like to contribute to the project please read our [guidelines](https://github.com/nipy/nipype/blob/master/CONTRIBUTING.md). Please also read through our [code of conduct](https://github.com/nipy/nipype/blob/master/CODE_OF_CONDUCT.md). From 99c0495cb17b6a7a14f281ff5c5f7f1f24b9b165 Mon Sep 17 00:00:00 2001 From: Chris Filo Gorgolewski Date: Sun, 15 Oct 2017 15:00:34 -0700 Subject: [PATCH 413/643] back to rst --- README.md => README.rst | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename README.md => README.rst (100%) diff --git a/README.md b/README.rst similarity index 100% rename from README.md rename to README.rst From 1bafcd45f5dfd8d9569ebf48f81acd3488ffd055 Mon Sep 17 00:00:00 2001 From: Chris Filo Gorgolewski Date: Sun, 15 Oct 2017 15:22:48 -0700 Subject: [PATCH 414/643] Create CODE_OF_CONDUCT.md --- CODE_OF_CONDUCT.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 CODE_OF_CONDUCT.md diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000000..32345ae549 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,23 @@ +# Code of Conduct + +We value the participation of every member of our community and want to ensure an that every contributer has an enjoyable and fulfilling experience. Accordingly, everyone who participates in the *Brains For Publication* project is expected to show respect and courtesy to other community members at all time. + +We are dedicated to a ***harassment-free experience for everyone***, regardless of gender, gender identity and expression, sexual orientation, disability, physical appearance, body size, race, age or religion. **We do not tolerate harassment by and/or of members of our community in any form**. + +We are particularly motivated to support new and/or anxious contributers, people who are looking to learn and develop their skills, and anyone who has experienced discrimination in the past. + +To make clear what is expected, we ask all members of the community to conform to the following Code of Conduct. + +* All communication should be appropriate for a professional audience including people of many different backgrounds. Sexual language and imagery is not appropriate at any time. + +* Be kind to others. Do not insult or put down other contributers. + +* Behave professionally. Remember that harassment and sexist, racist, or exclusionary jokes are not appropriate. + +Harassment includes offensive verbal comments related to gender, sexual orientation, disability, physical appearance, body size, race, religion, sexual images in public spaces, deliberate intimidation, stalking, following, harassing photography or recording, sustained disruption of discussions, inappropriate physical contact, and unwelcome sexual attention. + +***Members of the community who are asked to stop any harassing behavior are expected to comply immediately.*** + +Members of the community who violate these rules - no matter how much they have contributed to the project, or how specialised their skill set - will be approached by the project leaders ([@satra](https://github.com/satra)) and ([@chrisfilo](https://github.com/chrisfilo)). If inappropriate behaviour persists after a discussion the contributer will be asked to discontinue their participation in the development of the project. + +**To report an issue** please contact Satrajit Ghosh <(satra@mit.edu)[mailto:satra@mit.edu]> or Chris Gorgolewski <(krzysztof.gorgolewski@gmail.com)[mailto:krzysztof.gorgolewski@gmail.com]>. All communication will be treated as confidential. From 5eedb39e6f8aa5f929a3be2036bd179a8b14970e Mon Sep 17 00:00:00 2001 From: Chris Filo Gorgolewski Date: Sun, 15 Oct 2017 15:30:51 -0700 Subject: [PATCH 415/643] Switch to contributor covenant --- CODE_OF_CONDUCT.md | 74 ++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 62 insertions(+), 12 deletions(-) diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 32345ae549..63ba6c6b65 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -1,23 +1,73 @@ -# Code of Conduct +# Contributor Covenant Code of Conduct -We value the participation of every member of our community and want to ensure an that every contributer has an enjoyable and fulfilling experience. Accordingly, everyone who participates in the *Brains For Publication* project is expected to show respect and courtesy to other community members at all time. +## Our Pledge -We are dedicated to a ***harassment-free experience for everyone***, regardless of gender, gender identity and expression, sexual orientation, disability, physical appearance, body size, race, age or religion. **We do not tolerate harassment by and/or of members of our community in any form**. +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, gender identity and expression, level of experience, +nationality, personal appearance, race, religion, or sexual identity and +orientation. -We are particularly motivated to support new and/or anxious contributers, people who are looking to learn and develop their skills, and anyone who has experienced discrimination in the past. +## Our Standards -To make clear what is expected, we ask all members of the community to conform to the following Code of Conduct. +Examples of behavior that contributes to creating a positive environment +include: -* All communication should be appropriate for a professional audience including people of many different backgrounds. Sexual language and imagery is not appropriate at any time. +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members -* Be kind to others. Do not insult or put down other contributers. +Examples of unacceptable behavior by participants include: -* Behave professionally. Remember that harassment and sexist, racist, or exclusionary jokes are not appropriate. +* The use of sexualized language or imagery and unwelcome sexual attention or + advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting -Harassment includes offensive verbal comments related to gender, sexual orientation, disability, physical appearance, body size, race, religion, sexual images in public spaces, deliberate intimidation, stalking, following, harassing photography or recording, sustained disruption of discussions, inappropriate physical contact, and unwelcome sexual attention. +## Our Responsibilities -***Members of the community who are asked to stop any harassing behavior are expected to comply immediately.*** +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. -Members of the community who violate these rules - no matter how much they have contributed to the project, or how specialised their skill set - will be approached by the project leaders ([@satra](https://github.com/satra)) and ([@chrisfilo](https://github.com/chrisfilo)). If inappropriate behaviour persists after a discussion the contributer will be asked to discontinue their participation in the development of the project. +Project maintainers have the right and responsibility to remove, edit, or +reject comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct, or to ban temporarily or +permanently any contributor for other behaviors that they deem inappropriate, +threatening, offensive, or harmful. -**To report an issue** please contact Satrajit Ghosh <(satra@mit.edu)[mailto:satra@mit.edu]> or Chris Gorgolewski <(krzysztof.gorgolewski@gmail.com)[mailto:krzysztof.gorgolewski@gmail.com]>. All communication will be treated as confidential. +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported by contacting project leaders Satrajit Ghosh <(satra@mit.edu)[mailto:satra@mit.edu]> or Chris Gorgolewski <(krzysztof.gorgolewski@gmail.com)[mailto:krzysztof.gorgolewski@gmail.com]>. All +complaints will be reviewed and investigated and will result in a response that +is deemed necessary and appropriate to the circumstances. The project leaders is +obligated to maintain confidentiality with regard to the reporter of an incident. +Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good +faith may face temporary or permanent repercussions as determined by other +members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, +available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html + +[homepage]: https://www.contributor-covenant.org From 6035adcfd7947ae86c9da793d3ea018c1c291fb0 Mon Sep 17 00:00:00 2001 From: Chris Filo Gorgolewski Date: Sun, 15 Oct 2017 15:31:32 -0700 Subject: [PATCH 416/643] fix email links --- CODE_OF_CONDUCT.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 63ba6c6b65..cd3c9feab5 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -55,7 +55,7 @@ further defined and clarified by project maintainers. ## Enforcement Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported by contacting project leaders Satrajit Ghosh <(satra@mit.edu)[mailto:satra@mit.edu]> or Chris Gorgolewski <(krzysztof.gorgolewski@gmail.com)[mailto:krzysztof.gorgolewski@gmail.com]>. All +reported by contacting project leaders Satrajit Ghosh or Chris Gorgolewski . All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project leaders is obligated to maintain confidentiality with regard to the reporter of an incident. From 998f31f2155e0d3d366da9eb3deb2703718b1a60 Mon Sep 17 00:00:00 2001 From: Chris Filo Gorgolewski Date: Sun, 15 Oct 2017 15:32:38 -0700 Subject: [PATCH 417/643] styling --- CODE_OF_CONDUCT.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index cd3c9feab5..867bb1b38e 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -55,7 +55,7 @@ further defined and clarified by project maintainers. ## Enforcement Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported by contacting project leaders Satrajit Ghosh or Chris Gorgolewski . All +reported by contacting project leaders Satrajit Ghosh <> or Chris Gorgolewski <>. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project leaders is obligated to maintain confidentiality with regard to the reporter of an incident. From bdb885fdcf5f60bb4bee3159f00088d6d5b40db2 Mon Sep 17 00:00:00 2001 From: Chris Markiewicz Date: Mon, 16 Oct 2017 09:11:25 -0400 Subject: [PATCH 418/643] DOC: README is .rst, not .md --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 7c35c8a14d..85d34a704d 100644 --- a/README.rst +++ b/README.rst @@ -93,5 +93,5 @@ Please add *[nipype]* to the subject line when posting on the mailing list. Contributing to the project --------------------------- -If you'd like to contribute to the project please read our [guidelines](https://github.com/nipy/nipype/blob/master/CONTRIBUTING.md). Please also read through our [code of conduct](https://github.com/nipy/nipype/blob/master/CODE_OF_CONDUCT.md). +If you'd like to contribute to the project please read our `guidelines `_. Please also read through our `code of conduct `_. From 42e8525cd1743bc52ec7f3beaf7518c041cecd6a Mon Sep 17 00:00:00 2001 From: jdkent Date: Tue, 17 Oct 2017 01:07:12 -0500 Subject: [PATCH 419/643] ENH: allow create_susan_smooth to take in a list of fwhms --- nipype/workflows/fmri/fsl/preprocess.py | 64 +++++++++++++++++++++---- 1 file changed, 54 insertions(+), 10 deletions(-) diff --git a/nipype/workflows/fmri/fsl/preprocess.py b/nipype/workflows/fmri/fsl/preprocess.py index ea67667294..921ceb5119 100644 --- a/nipype/workflows/fmri/fsl/preprocess.py +++ b/nipype/workflows/fmri/fsl/preprocess.py @@ -757,7 +757,7 @@ def create_featreg_preproc(name='featpreproc', highpass=True, whichvol='middle', return featpreproc -def create_susan_smooth(name="susan_smooth", separate_masks=True): +def create_susan_smooth(name="susan_smooth", separate_masks=True, list_fwhms=False): """Create a SUSAN smoothing workflow Parameters @@ -767,11 +767,12 @@ def create_susan_smooth(name="susan_smooth", separate_masks=True): name : name of workflow (default: susan_smooth) separate_masks : separate masks for each run + list_fwhms : multiple full wide half maximum smoothing kernels Inputs:: inputnode.in_files : functional runs (filename or list of filenames) - inputnode.fwhm : fwhm for smoothing with SUSAN + inputnode.fwhm : fwhm for smoothing with SUSAN (float or list of floats) inputnode.mask_file : mask used for estimating SUSAN thresholds (but not for smoothing) Outputs:: @@ -788,6 +789,18 @@ def create_susan_smooth(name="susan_smooth", separate_masks=True): >>> smooth.run() # doctest: +SKIP """ + def cartesian_product(fwhms, in_files, mask_files, merge_out, median_out): + if type(in_files) == str: + in_files = [in_files] + if type(mask_files) == str: + mask_files = [mask_files] + multi_in_files = [in_file for in_file in in_files for fwhm in fwhms] + multi_mask_files = [mask_file for mask_file in mask_files for fwhm in fwhms] + multi_fwhms = [fwhm for fwhm in fwhms for in_file in in_files] + multi_merge_out = [merge for merge in merge_out for fwhm in fwhms] + multi_median_out = [median for median in median_out for fwhm in fwhms] + + return multi_in_files, multi_mask_files, multi_fwhms, multi_merge_out, multi_median_out susan_smooth = pe.Workflow(name=name) @@ -806,10 +819,27 @@ def create_susan_smooth(name="susan_smooth", separate_masks=True): of the median value for each run and a mask consituting the mean functional """ - - smooth = pe.MapNode(interface=fsl.SUSAN(), - iterfield=['in_file', 'brightness_threshold', 'usans'], - name='smooth') + if list_fwhms: + multi_inputs = pe.Node(util.Function(input_names=['fwhms', + 'in_files', + 'mask_files', + 'merge_out', + 'median_out'], + output_names=['multi_in_files', + 'multi_mask_files', + 'multi_fwhms', + 'multi_merge_out', + 'multi_median_out'], + function=cartesian_product), + name='multi_inputs') + + smooth = pe.MapNode(interface=fsl.SUSAN(), + iterfield=['in_file', 'brightness_threshold', 'usans', 'fwhm'], + name='smooth') + else: + smooth = pe.MapNode(interface=fsl.SUSAN(), + iterfield=['in_file', 'brightness_threshold', 'usans'], + name='smooth') """ Determine the median value of the functional runs using the mask @@ -865,10 +895,24 @@ def create_susan_smooth(name="susan_smooth", separate_masks=True): """ Define a function to get the brightness threshold for SUSAN """ - susan_smooth.connect(inputnode, 'fwhm', smooth, 'fwhm') - susan_smooth.connect(inputnode, 'in_files', smooth, 'in_file') - susan_smooth.connect(median, ('out_stat', getbtthresh), smooth, 'brightness_threshold') - susan_smooth.connect(merge, ('out', getusans), smooth, 'usans') + # if you are going to iterate over multiple values of fwhm + if list_fwhms: + susan_smooth.connect([ + (inputnode, multi_inputs, [('in_files', 'in_files'), + ('fwhm', 'fwhms'), + ('mask_file', 'mask_files')]), + ]) + susan_smooth.connect(median, ('out_stat', getbtthresh), multi_inputs, 'median_out') + susan_smooth.connect(merge, ('out', getusans), multi_inputs, 'merge_out') + susan_smooth.connect(multi_inputs, 'multi_fwhms', smooth, 'fwhm') + susan_smooth.connect(multi_inputs, 'multi_in_files', smooth, 'in_file') + susan_smooth.connect(multi_inputs, 'multi_median_out', smooth, 'brightness_threshold') + susan_smooth.connect(multi_inputs, 'multi_merge_out', smooth, 'usans') + else: + susan_smooth.connect(inputnode, 'in_files', smooth, 'in_file') + susan_smooth.connect(inputnode, 'fwhm', smooth, 'fwhm') + susan_smooth.connect(median, ('out_stat', getbtthresh), smooth, 'brightness_threshold') + susan_smooth.connect(merge, ('out', getusans), smooth, 'usans') outputnode = pe.Node(interface=util.IdentityInterface(fields=['smoothed_files']), name='outputnode') From 11d6a5528fd429f90b30803f1626220a324e532d Mon Sep 17 00:00:00 2001 From: jdkent Date: Tue, 17 Oct 2017 01:11:39 -0500 Subject: [PATCH 420/643] ENH: added comment --- nipype/workflows/fmri/fsl/preprocess.py | 1 + 1 file changed, 1 insertion(+) diff --git a/nipype/workflows/fmri/fsl/preprocess.py b/nipype/workflows/fmri/fsl/preprocess.py index 921ceb5119..4e75d903c7 100644 --- a/nipype/workflows/fmri/fsl/preprocess.py +++ b/nipype/workflows/fmri/fsl/preprocess.py @@ -789,6 +789,7 @@ def create_susan_smooth(name="susan_smooth", separate_masks=True, list_fwhms=Fal >>> smooth.run() # doctest: +SKIP """ + # replaces the functionality of a "for loop" def cartesian_product(fwhms, in_files, mask_files, merge_out, median_out): if type(in_files) == str: in_files = [in_files] From ed5e1b9f69a6d0d0dbadcf98df228c0f3ceecb07 Mon Sep 17 00:00:00 2001 From: jdkent Date: Tue, 17 Oct 2017 11:51:45 -0500 Subject: [PATCH 421/643] FIX: effigies review --- nipype/workflows/fmri/fsl/preprocess.py | 89 ++++++++++--------------- 1 file changed, 35 insertions(+), 54 deletions(-) diff --git a/nipype/workflows/fmri/fsl/preprocess.py b/nipype/workflows/fmri/fsl/preprocess.py index 4e75d903c7..aa8ac03673 100644 --- a/nipype/workflows/fmri/fsl/preprocess.py +++ b/nipype/workflows/fmri/fsl/preprocess.py @@ -4,7 +4,6 @@ from __future__ import division import os - from ....interfaces import fsl as fsl # fsl from ....interfaces import utility as util # utility from ....pipeline import engine as pe # pypeline engine @@ -757,7 +756,7 @@ def create_featreg_preproc(name='featpreproc', highpass=True, whichvol='middle', return featpreproc -def create_susan_smooth(name="susan_smooth", separate_masks=True, list_fwhms=False): +def create_susan_smooth(name="susan_smooth", separate_masks=True): """Create a SUSAN smoothing workflow Parameters @@ -767,7 +766,6 @@ def create_susan_smooth(name="susan_smooth", separate_masks=True, list_fwhms=Fal name : name of workflow (default: susan_smooth) separate_masks : separate masks for each run - list_fwhms : multiple full wide half maximum smoothing kernels Inputs:: @@ -790,18 +788,18 @@ def create_susan_smooth(name="susan_smooth", separate_masks=True, list_fwhms=Fal """ # replaces the functionality of a "for loop" - def cartesian_product(fwhms, in_files, mask_files, merge_out, median_out): - if type(in_files) == str: - in_files = [in_files] - if type(mask_files) == str: - mask_files = [mask_files] - multi_in_files = [in_file for in_file in in_files for fwhm in fwhms] - multi_mask_files = [mask_file for mask_file in mask_files for fwhm in fwhms] - multi_fwhms = [fwhm for fwhm in fwhms for in_file in in_files] - multi_merge_out = [merge for merge in merge_out for fwhm in fwhms] - multi_median_out = [median for median in median_out for fwhm in fwhms] - - return multi_in_files, multi_mask_files, multi_fwhms, multi_merge_out, multi_median_out + def cartesian_product(fwhms, in_files, usans, btthresh): + from nipype.utils.filemanip import filename_to_list + # ensure all inputs are lists + in_files = filename_to_list(in_files) + fwhms = [fwhms] if isinstance(fwhms, (int, float)) else fwhms + # create cartesian product lists (s_ = single element of list) + cart_in_file = [s_in_file for s_in_file in in_files for s_fwhm in fwhms] + cart_fwhm = [s_fwhm for s_in_file in in_files for s_fwhm in fwhms] + cart_usans = [s_usans for s_usans in usans for s_fwhm in fwhms] + cart_btthresh = [s_btthresh for s_btthresh in btthresh for s_fwhm in fwhms] + + return cart_in_file, cart_fwhm, cart_usans, cart_btthresh susan_smooth = pe.Workflow(name=name) @@ -820,27 +818,17 @@ def cartesian_product(fwhms, in_files, mask_files, merge_out, median_out): of the median value for each run and a mask consituting the mean functional """ - if list_fwhms: - multi_inputs = pe.Node(util.Function(input_names=['fwhms', - 'in_files', - 'mask_files', - 'merge_out', - 'median_out'], - output_names=['multi_in_files', - 'multi_mask_files', - 'multi_fwhms', - 'multi_merge_out', - 'multi_median_out'], - function=cartesian_product), - name='multi_inputs') - - smooth = pe.MapNode(interface=fsl.SUSAN(), - iterfield=['in_file', 'brightness_threshold', 'usans', 'fwhm'], - name='smooth') - else: - smooth = pe.MapNode(interface=fsl.SUSAN(), - iterfield=['in_file', 'brightness_threshold', 'usans'], - name='smooth') + + multi_inputs = pe.Node(util.Function(function=cartesian_product, + output_names=['cart_in_file', + 'cart_fwhm', + 'cart_usans', + 'cart_btthresh']), + name='multi_inputs') + + smooth = pe.MapNode(interface=fsl.SUSAN(), + iterfield=['in_file', 'brightness_threshold', 'usans', 'fwhm'], + name='smooth') """ Determine the median value of the functional runs using the mask @@ -896,24 +884,17 @@ def cartesian_product(fwhms, in_files, mask_files, merge_out, median_out): """ Define a function to get the brightness threshold for SUSAN """ - # if you are going to iterate over multiple values of fwhm - if list_fwhms: - susan_smooth.connect([ - (inputnode, multi_inputs, [('in_files', 'in_files'), - ('fwhm', 'fwhms'), - ('mask_file', 'mask_files')]), - ]) - susan_smooth.connect(median, ('out_stat', getbtthresh), multi_inputs, 'median_out') - susan_smooth.connect(merge, ('out', getusans), multi_inputs, 'merge_out') - susan_smooth.connect(multi_inputs, 'multi_fwhms', smooth, 'fwhm') - susan_smooth.connect(multi_inputs, 'multi_in_files', smooth, 'in_file') - susan_smooth.connect(multi_inputs, 'multi_median_out', smooth, 'brightness_threshold') - susan_smooth.connect(multi_inputs, 'multi_merge_out', smooth, 'usans') - else: - susan_smooth.connect(inputnode, 'in_files', smooth, 'in_file') - susan_smooth.connect(inputnode, 'fwhm', smooth, 'fwhm') - susan_smooth.connect(median, ('out_stat', getbtthresh), smooth, 'brightness_threshold') - susan_smooth.connect(merge, ('out', getusans), smooth, 'usans') + + susan_smooth.connect([ + (inputnode, multi_inputs, [('in_files', 'in_files'), + ('fwhm', 'fwhms')]), + (median, multi_inputs, [(('out_stat', getbtthresh), 'btthresh')]), + (merge, multi_inputs, [(('out', getusans), 'usans')]), + (multi_inputs, smooth, [('cart_in_file', 'in_file'), + ('cart_fwhm', 'fwhm'), + ('cart_btthresh', 'brightness_threshold'), + ('cart_usans', 'usans')]), + ]) outputnode = pe.Node(interface=util.IdentityInterface(fields=['smoothed_files']), name='outputnode') From 29756d3445ddddaa17fb13dee2076fa3b5a239c2 Mon Sep 17 00:00:00 2001 From: Mathias Goncalves Date: Tue, 17 Oct 2017 15:35:10 -0400 Subject: [PATCH 422/643] CHANGELOG: catch up on merges... we need to be way better on this --- CHANGES | 41 ++++++++++++++++++++++++++++++++++++++--- 1 file changed, 38 insertions(+), 3 deletions(-) diff --git a/CHANGES b/CHANGES index 057bcd7005..98aab9f0d0 100644 --- a/CHANGES +++ b/CHANGES @@ -1,11 +1,46 @@ -Upcoming release +Upcoming release (0.14.0) ================ * ENH: Add elapsed_time and final metric_value to ants.Registration (https://github.com/nipy/nipype/pull/1985) * ENH: Improve terminal_output feature (https://github.com/nipy/nipype/pull/2209) * ENH: Simple interface to FSL std2imgcoords (https://github.com/nipy/nipype/pull/2209, prev #1398) -* ENH: Centralize virtual/physical $DISPLAYs (https://github.com/nipy/nipype/pull/#2203) -* ENH: New ResourceMonitor - replaces resource profiler (https://github.com/nipy/nipype/pull/#2200) +* ENH: Centralize virtual/physical $DISPLAYs (https://github.com/nipy/nipype/pull/2203, https://github.com/nipy/nipype/pull/2211) +* ENH: New ResourceMonitor - replaces resource profiler (https://github.com/nipy/nipype/pull/2200) +* ENH: Quickshear interface (https://github.com/nipy/nipype/pull/2047) +* MAINT: updated deprecated HasTraits method (https://github.com/nipy/nipype/pull/2048) +* ENH: CLI versioning (https://github.com/nipy/nipype/pull/2054) +* ENH: Dual Regression interface (https://github.com/nipy/nipype/pull/2057) +* ENH: Additional args to ANTs registration (https://github.com/nipy/nipype/pull/2062, https://github.com/nipy/nipype/pull/2078) +* FIX: Mp2rage interfaces updated for new parameter names in cbstools 3 (https://github.com/nipy/nipype/pull/2065) +* MAINT: Removed automatic nipype folder creation in HOME (https://github.com/nipy/nipype/pull/2076) +* MAINT: Additional Windows support (https://github.com/nipy/nipype/pull/2085) +* ENH: Output realignment matrices from TOPUP (https://github.com/nipy/nipype/pull/2084) +* ENH: Additional AFNI interfaces: 3dZcat, 3dZeropad, 3dedge3, 3dDeconvolve, 3dQwarp, 1dCat, 3dNwarpApply, 3daxialize, + 3dREMLfit, 3dUndump, 3dCM, 3dSynthesize + more (https://github.com/nipy/nipype/pull/2087, https://github.com/nipy/nipype/pull/2090, + https://github.com/nipy/nipype/pull/2095, https://github.com/nipy/nipype/pull/2099, https://github.com/nipy/nipype/pull/2103, + https://github.com/nipy/nipype/pull/2114, https://github.com/nipy/nipype/pull/2135, https://github.com/nipy/nipype/pull/2186, + https://github.com/nipy/nipype/pull/2201, https://github.com/nipy/nipype/pull/2210) +* MAINT: cleanup and update AFNI's Allineate (https://github.com/nipy/nipype/pull/2098) +* ENH: Add cosine-basis high-pass-filter to CompCor, allow skip of initial volumes (https://github.com/nipy/nipype/pull/2107, https://github.com/nipy/nipype/pull/#2122) +* FIX: Catch more dcm2niix DTI conversions (https://github.com/nipy/nipype/pull/2110) +* FIX: Retrieve aseg + wmparc stats properly (https://github.com/nipy/nipype/pull/2117) +* ENH: ANTs MeasureImageSimilarity Inteface (https://github.com/nipy/nipype/pull/2128) +* FIX: CompCor filter_basis of correct size, pre-filter column headers (https://github.com/nipy/nipype/pull/2136, https://github.com/nipy/nipype/pull/2138) +* ENH: FreeSurfer lta_convert and mri_coreg interfaces (https://github.com/nipy/nipype/pull/2140, https://github.com/nipy/nipype/pull/2172) +* ENH: Speed up S3DataGrabber (https://github.com/nipy/nipype/pull/2143) +* FIX: Allow S3DataGrabber to grab single file (https://github.com/nipy/nipype/pull/2147) +* FIX: Allow 4D images as inputs to buildtemplateparallel.sh and N4BiasFieldCorrection (https://github.com/nipy/nipype/pull/2151) +* MAINT: Detect and warn unconnected duplicate nodes (https://github.com/nipy/nipype/pull/2163) +* ENH: Calcmedian Interface (https://github.com/nipy/nipype/pull/2167) +* FIX: probtrackx2 outputs (https://github.com/nipy/nipype/pull/2169) +* ENH: Improve FreeSurfer registration (https://github.com/nipy/nipype/pull/2172) +* ENH: BIDSDataGrabber interface (https://github.com/nipy/nipype/pull/2174) +* MAINT: Set minimum numpy version to 1.9.0 (https://github.com/nipy/nipype/pull/2182) +* ENH: Support for multiple intial-moving-transforms (https://github.com/nipy/nipype/pull/2187) +* MAINT: Fixes for networkx and afni (https://github.com/nipy/nipype/pull/2196, https://github.com/nipy/nipype/pull/2171) +* TST: Update C3D version in Docker build (https://github.com/nipy/nipype/pull/2199) +* ENH: SimpleInterface interface (https://github.com/nipy/nipype/pull/2220) +* ENH: Add LTA to Tkregister2 (https://github.com/nipy/nipype/pull/2217) 0.13.1 (May 20, 2017) ===================== From 66411f4edbc03a43a56e49ee791652cc7d824572 Mon Sep 17 00:00:00 2001 From: Satrajit Ghosh Date: Wed, 18 Oct 2017 10:59:01 -0400 Subject: [PATCH 423/643] remove print --- nipype/scripts/utils.py | 1 - 1 file changed, 1 deletion(-) diff --git a/nipype/scripts/utils.py b/nipype/scripts/utils.py index bab1bdf899..e35f4d464e 100644 --- a/nipype/scripts/utils.py +++ b/nipype/scripts/utils.py @@ -71,7 +71,6 @@ def add_args_options(arg_parser, interface): args["default"] = getattr(inputs, name) args["action"] = 'store_true' - print(name, spec.trait_type) # current support is for simple trait types if not spec.inner_traits: if not spec.is_trait_type(traits.TraitCompound): From e1087adffb8a32c257554f74e1d5b9d27d50c37b Mon Sep 17 00:00:00 2001 From: Oscar Esteban Date: Thu, 19 Oct 2017 09:33:50 -0700 Subject: [PATCH 424/643] Use name_source in ConcatenateLTA Adds `name_source` to the `out_file` input of `ConcatenateLTA`. --- nipype/interfaces/freesurfer/preprocess.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/nipype/interfaces/freesurfer/preprocess.py b/nipype/interfaces/freesurfer/preprocess.py index 0138062e59..5f39f1cc94 100644 --- a/nipype/interfaces/freesurfer/preprocess.py +++ b/nipype/interfaces/freesurfer/preprocess.py @@ -2387,8 +2387,8 @@ class ConcatenateLTAInputSpec(FSTraitedSpec): File(exists=True), 'identity.nofile', argstr='%s', position=-2, mandatory=True, desc='maps dst1(src2) to dst2') out_file = File( - 'concat.lta', usedefault=True, position=-1, argstr='%s', - hash_files=False, + position=-1, argstr='%s', hash_files=False, name_source=['in_lta1'], + name_template='%s_concat', keep_extension=True, desc='the combined LTA maps: src1 to dst2 = LTA2*LTA1') # Inversion and transform type @@ -2434,7 +2434,7 @@ class ConcatenateLTA(FSCommand): >>> conc_lta.inputs.in_lta1 = 'lta1.lta' >>> conc_lta.inputs.in_lta2 = 'lta2.lta' >>> conc_lta.cmdline # doctest: +ALLOW_UNICODE - 'mri_concatenate_lta lta1.lta lta2.lta concat.lta' + 'mri_concatenate_lta lta1.lta lta2.lta lta1_concat.lta' You can use 'identity.nofile' as the filename for in_lta2, e.g.: @@ -2459,8 +2459,3 @@ def _format_arg(self, name, spec, value): if name == 'out_type': value = {'VOX2VOX': 0, 'RAS2RAS': 1}[value] return super(ConcatenateLTA, self)._format_arg(name, spec, value) - - def _list_outputs(self): - outputs = self.output_spec().get() - outputs['out_file'] = os.path.abspath(self.inputs.out_file) - return outputs From 0db2a31710f803b63c2f935b7b374212dcb8c396 Mon Sep 17 00:00:00 2001 From: Oscar Esteban Date: Thu, 19 Oct 2017 09:42:10 -0700 Subject: [PATCH 425/643] Replace chars when standard out can't be decoded Fixes #2235 --- nipype/interfaces/base.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/nipype/interfaces/base.py b/nipype/interfaces/base.py index 79812d4b19..61da91e7bf 100644 --- a/nipype/interfaces/base.py +++ b/nipype/interfaces/base.py @@ -1420,19 +1420,23 @@ def _process(drain=0): if output == 'allatonce': stdout, stderr = proc.communicate() - result['stdout'] = stdout.decode(default_encoding).split('\n') - result['stderr'] = stderr.decode(default_encoding).split('\n') + result['stdout'] = stdout.decode( + default_encoding, errors='replace').split('\n') + result['stderr'] = stderr.decode( + default_encoding, errors='replace').split('\n') elif output.startswith('file'): proc.wait() if outfile is not None: stdout.flush() - result['stdout'] = [line.decode(default_encoding).strip() - for line in open(outfile, 'rb').readlines()] + result['stdout'] = [ + line.decode(default_encoding, errors='replace').strip() + for line in open(outfile, 'rb').readlines()] if errfile is not None: stderr.flush() - result['stderr'] = [line.decode(default_encoding).strip() - for line in open(errfile, 'rb').readlines()] + result['stderr'] = [ + line.decode(default_encoding, errors='replace').strip() + for line in open(errfile, 'rb').readlines()] if output == 'file': result['merged'] = result['stdout'] From c4b27ddc60436c72941c8b7b8703da0efd297603 Mon Sep 17 00:00:00 2001 From: oesteban Date: Thu, 19 Oct 2017 10:09:50 -0700 Subject: [PATCH 426/643] update specs --- .../interfaces/freesurfer/tests/test_auto_ConcatenateLTA.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nipype/interfaces/freesurfer/tests/test_auto_ConcatenateLTA.py b/nipype/interfaces/freesurfer/tests/test_auto_ConcatenateLTA.py index 1f957d35f4..2357c8709b 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_ConcatenateLTA.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_ConcatenateLTA.py @@ -28,8 +28,10 @@ def test_ConcatenateLTA_inputs(): ), out_file=dict(argstr='%s', hash_files=False, + keep_extension=True, + name_source=['in_lta1'], + name_template='%s_concat', position=-1, - usedefault=True, ), out_type=dict(argstr='-out_type %d', ), From acf3a69ea533dec5e8280c01f7acc7be64de6c61 Mon Sep 17 00:00:00 2001 From: oesteban Date: Thu, 19 Oct 2017 11:04:03 -0700 Subject: [PATCH 427/643] [ENH] ants.ApplyTransform - Accept 'identity' keyword Closes #2126 --- nipype/interfaces/ants/resampling.py | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/nipype/interfaces/ants/resampling.py b/nipype/interfaces/ants/resampling.py index 39393dc0f0..6be05ecd28 100644 --- a/nipype/interfaces/ants/resampling.py +++ b/nipype/interfaces/ants/resampling.py @@ -243,13 +243,15 @@ class ApplyTransformsInputSpec(ANTSCommandInputSpec): 'Gaussian', 'BSpline', argstr='%s', usedefault=True) - interpolation_parameters = traits.Either(traits.Tuple(traits.Int()), # BSpline (order) - traits.Tuple(traits.Float(), # Gaussian/MultiLabel (sigma, alpha) - traits.Float()) - ) - transforms = InputMultiPath(File(exists=True), argstr='%s', mandatory=True, - desc='transform files: will be applied in reverse order. For ' - 'example, the last specified transform will be applied first.') + interpolation_parameters = traits.Either( + traits.Tuple(traits.Int()), # BSpline (order) + traits.Tuple(traits.Float(), # Gaussian/MultiLabel (sigma, alpha) + traits.Float()) + ) + transforms = traits.Either( + InputMultiPath(File(exists=True)), 'identity', argstr='%s', mandatory=True, + desc='transform files: will be applied in reverse order. For ' + 'example, the last specified transform will be applied first.') invert_transform_flags = InputMultiPath(traits.Bool()) default_value = traits.Float(0.0, argstr='--default-value %g', usedefault=True) print_out_composite_warp_file = traits.Bool(False, requires=["output_image"], @@ -269,6 +271,15 @@ class ApplyTransforms(ANTSCommand): -------- >>> from nipype.interfaces.ants import ApplyTransforms + >>> at = ApplyTransforms() + >>> at.inputs.input_image = 'moving1.nii' + >>> at.inputs.reference_image = 'fixed1.nii' + >>> at.inputs.transforms = 'identity' + >>> at.cmdline # doctest: +ALLOW_UNICODE + 'antsApplyTransforms --default-value 0 --input moving1.nii \ +--interpolation Linear --output moving_trans.nii \ +--reference-image fixed1.nii -t identity' + >>> at = ApplyTransforms() >>> at.inputs.dimension = 3 >>> at.inputs.input_image = 'moving1.nii' @@ -338,6 +349,8 @@ def _format_arg(self, opt, spec, val): if opt == "output_image": return self._get_output_warped_filename() elif opt == "transforms": + if val == 'identity': + return '-t identity' return self._get_transform_filenames() elif opt == 'interpolation': if self.inputs.interpolation in ['BSpline', 'MultiLabel', 'Gaussian'] and \ From da3ef21992d9fa14f052643640e884394fcd8282 Mon Sep 17 00:00:00 2001 From: oesteban Date: Thu, 19 Oct 2017 14:52:05 -0700 Subject: [PATCH 428/643] try ... except, plus test --- nipype/interfaces/base.py | 29 +++++++++++------------------ nipype/utils/filemanip.py | 29 +++++++++++++++++++++++++---- 2 files changed, 36 insertions(+), 22 deletions(-) diff --git a/nipype/interfaces/base.py b/nipype/interfaces/base.py index 61da91e7bf..f8e845d944 100644 --- a/nipype/interfaces/base.py +++ b/nipype/interfaces/base.py @@ -38,7 +38,7 @@ from ..utils.provenance import write_provenance from ..utils.misc import is_container, trim, str2bool from ..utils.filemanip import (md5, hash_infile, FileNotFoundError, hash_timestamp, - split_filename, to_str) + split_filename, to_str, read_stream) from .traits_extension import ( traits, Undefined, TraitDictObject, TraitListObject, TraitError, isdefined, File, Directory, DictStrStr, has_metadata, ImageFile) @@ -1268,9 +1268,7 @@ def __init__(self, name, impl): self._buf = '' self._rows = [] self._lastidx = 0 - self.default_encoding = locale.getdefaultlocale()[1] - if self.default_encoding is None: - self.default_encoding = 'UTF-8' + self.default_encoding = locale.getdefaultlocale()[1] or 'UTF-8' def fileno(self): "Pass-through for file descriptor." @@ -1349,10 +1347,6 @@ def run_command(runtime, output=None, timeout=0.01): cmdline = runtime.cmdline env = _canonicalize_env(runtime.environ) - default_encoding = locale.getdefaultlocale()[1] - if default_encoding is None: - default_encoding = 'UTF-8' - errfile = None outfile = None stdout = sp.PIPE @@ -1420,23 +1414,22 @@ def _process(drain=0): if output == 'allatonce': stdout, stderr = proc.communicate() - result['stdout'] = stdout.decode( - default_encoding, errors='replace').split('\n') - result['stderr'] = stderr.decode( - default_encoding, errors='replace').split('\n') + result['stdout'] = read_stream(stdout, logger=iflogger) + result['stderr'] = read_stream(stderr, logger=iflogger) elif output.startswith('file'): proc.wait() if outfile is not None: stdout.flush() - result['stdout'] = [ - line.decode(default_encoding, errors='replace').strip() - for line in open(outfile, 'rb').readlines()] + with open(outfile, 'rb') as ofh: + stdoutstr = ofh.read() + result['stdout'] = read_stream(stdoutstr, logger=iflogger) + if errfile is not None: stderr.flush() - result['stderr'] = [ - line.decode(default_encoding, errors='replace').strip() - for line in open(errfile, 'rb').readlines()] + with open(errfile, 'rb') as efh: + stderrstr = efh.read() + result['stderr'] = read_stream(stderrstr, logger=iflogger) if output == 'file': result['merged'] = result['stdout'] diff --git a/nipype/utils/filemanip.py b/nipype/utils/filemanip.py index e321a597a6..9c4657a9ea 100644 --- a/nipype/utils/filemanip.py +++ b/nipype/utils/filemanip.py @@ -5,16 +5,13 @@ """ from __future__ import print_function, division, unicode_literals, absolute_import -from builtins import str, bytes, open - -from future import standard_library -standard_library.install_aliases() import sys import pickle import subprocess import gzip import hashlib +import locale from hashlib import md5 import os import re @@ -23,10 +20,15 @@ import simplejson as json import numpy as np +from builtins import str, bytes, open + from .. import logging, config from .misc import is_container from ..interfaces.traits_extension import isdefined +from future import standard_library +standard_library.install_aliases() + fmlogger = logging.getLogger('utils') @@ -596,6 +598,25 @@ def crash2txt(filename, record): fp.write(''.join(record['traceback'])) +def read_stream(stream, logger=None, encoding=None): + """ + Robustly reads a stream, sending a warning to a logger + + >>> read_stream(bytearray([65, 0xc7, 65, 10, 66])) # doctest: +ELLIPSIS +ALLOW_UNICODE + ['A...A', 'B'] + + + """ + default_encoding = encoding or locale.getdefaultlocale()[1] or 'UTF-8' + logger = logger or fmlogger + try: + out = stream.decode(default_encoding) + except UnicodeDecodeError as err: + out = stream.decode(default_encoding, errors='replace') + logger.warning('Error decoding string: %s', err) + return out.split('\n') + + def savepkl(filename, record): if filename.endswith('pklz'): pkl_file = gzip.open(filename, 'wb') From 272e042060e5bb0749ca55c61b9ccf901907911a Mon Sep 17 00:00:00 2001 From: oesteban Date: Thu, 19 Oct 2017 14:56:12 -0700 Subject: [PATCH 429/643] cropped docstring --- nipype/utils/filemanip.py | 1 + 1 file changed, 1 insertion(+) diff --git a/nipype/utils/filemanip.py b/nipype/utils/filemanip.py index 9c4657a9ea..8156935866 100644 --- a/nipype/utils/filemanip.py +++ b/nipype/utils/filemanip.py @@ -601,6 +601,7 @@ def crash2txt(filename, record): def read_stream(stream, logger=None, encoding=None): """ Robustly reads a stream, sending a warning to a logger + if some decoding error was raised. >>> read_stream(bytearray([65, 0xc7, 65, 10, 66])) # doctest: +ELLIPSIS +ALLOW_UNICODE ['A...A', 'B'] From 5cd113d68fd330c46c63a7e3f802779ea32eb991 Mon Sep 17 00:00:00 2001 From: Oscar Esteban Date: Thu, 19 Oct 2017 21:51:46 -0700 Subject: [PATCH 430/643] fix doctest --- nipype/interfaces/ants/resampling.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nipype/interfaces/ants/resampling.py b/nipype/interfaces/ants/resampling.py index 6be05ecd28..ca2354cdc0 100644 --- a/nipype/interfaces/ants/resampling.py +++ b/nipype/interfaces/ants/resampling.py @@ -277,7 +277,7 @@ class ApplyTransforms(ANTSCommand): >>> at.inputs.transforms = 'identity' >>> at.cmdline # doctest: +ALLOW_UNICODE 'antsApplyTransforms --default-value 0 --input moving1.nii \ ---interpolation Linear --output moving_trans.nii \ +--interpolation Linear --output moving1_trans.nii \ --reference-image fixed1.nii -t identity' >>> at = ApplyTransforms() From 70ab1aa929eff2be0738d45307cc2d30bc5e4871 Mon Sep 17 00:00:00 2001 From: oesteban Date: Fri, 20 Oct 2017 08:44:23 -0700 Subject: [PATCH 431/643] use splitlines --- nipype/utils/filemanip.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nipype/utils/filemanip.py b/nipype/utils/filemanip.py index 8156935866..72cb1fc15e 100644 --- a/nipype/utils/filemanip.py +++ b/nipype/utils/filemanip.py @@ -615,7 +615,7 @@ def read_stream(stream, logger=None, encoding=None): except UnicodeDecodeError as err: out = stream.decode(default_encoding, errors='replace') logger.warning('Error decoding string: %s', err) - return out.split('\n') + return out.splitlines() def savepkl(filename, record): From 4073f39e70545eb49b91f82f6312bd8d313aa8d3 Mon Sep 17 00:00:00 2001 From: oesteban Date: Fri, 20 Oct 2017 09:14:22 -0700 Subject: [PATCH 432/643] [FIX] Resource monitoring minor bugfix Fixes #2241 --- nipype/utils/profiler.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/nipype/utils/profiler.py b/nipype/utils/profiler.py index 7dd1823d43..f9299bf87c 100644 --- a/nipype/utils/profiler.py +++ b/nipype/utils/profiler.py @@ -2,7 +2,7 @@ # @Author: oesteban # @Date: 2017-09-21 15:50:37 # @Last Modified by: oesteban -# @Last Modified time: 2017-10-02 15:44:29 +# @Last Modified time: 2017-10-20 09:12:36 """ Utilities to keep track of performance """ @@ -77,9 +77,13 @@ def _sample(self, cpu_interval=None): except psutil.NoSuchProcess: pass - # parent_mem = mem # Iterate through child processes and get number of their threads - for child in self._process.children(recursive=True): + try: + children = self._process.children(recursive=True) + except psutil.NoSuchProcess: + children = [] + + for child in children: try: with child.oneshot(): cpu += child.cpu_percent() From a28eff514fc64cbe0a039b2daf722fa6b00f16bc Mon Sep 17 00:00:00 2001 From: Dorota Jarecka Date: Fri, 20 Oct 2017 16:39:30 -0400 Subject: [PATCH 433/643] adding import error in cmtk.nbs and imprve KeyError when specific attributes of edges are required; adding simple tests --- nipype/interfaces/cmtk/nbs.py | 9 +++- nipype/interfaces/cmtk/tests/test_nbs.py | 58 ++++++++++++++++++++++++ 2 files changed, 66 insertions(+), 1 deletion(-) create mode 100644 nipype/interfaces/cmtk/tests/test_nbs.py diff --git a/nipype/interfaces/cmtk/nbs.py b/nipype/interfaces/cmtk/nbs.py index 3754484677..fde691f3c5 100644 --- a/nipype/interfaces/cmtk/nbs.py +++ b/nipype/interfaces/cmtk/nbs.py @@ -32,7 +32,10 @@ def ntwks_to_matrices(in_files, edge_key): for idx, name in enumerate(in_files): graph = nx.read_gpickle(name) for u, v, d in graph.edges(data=True): - graph[u][v]['weight'] = d[edge_key] # Setting the edge requested edge value as weight value + try: + graph[u][v]['weight'] = d[edge_key] # Setting the edge requested edge value as weight value + except: + raise KeyError("the graph edges do not have {} attribute".format(edge_key)) matrix[:, :, idx] = nx.to_numpy_matrix(graph) # Retrieve the matrix return matrix @@ -77,6 +80,10 @@ class NetworkBasedStatistic(BaseInterface): output_spec = NetworkBasedStatisticOutputSpec def _run_interface(self, runtime): + + if not have_cv: + raise ImportError("cviewer library is not available") + THRESH = self.inputs.threshold K = self.inputs.number_of_permutations TAIL = self.inputs.t_tail diff --git a/nipype/interfaces/cmtk/tests/test_nbs.py b/nipype/interfaces/cmtk/tests/test_nbs.py new file mode 100644 index 0000000000..cc4b064fc1 --- /dev/null +++ b/nipype/interfaces/cmtk/tests/test_nbs.py @@ -0,0 +1,58 @@ +from __future__ import unicode_literals +from ..nbs import NetworkBasedStatistic +from ....utils.misc import package_check +import numpy as np +import networkx as nx +import pytest + +have_cv = True +try: + package_check('cviewer') +except Exception as e: + have_cv = False + +@pytest.fixture() +def creating_graphs(tmpdir): + graphlist = [] + graphnames = ["name"+str(i) for i in range(6)] + for idx, name in enumerate(graphnames): + graph = np.random.rand(10,10) + G = nx.from_numpy_matrix(graph) + out_file = str(tmpdir) + graphnames[idx] + '.pck' + # Save as pck file + nx.write_gpickle(G, out_file) + graphlist.append(out_file) + return graphlist + + +@pytest.mark.skipif(have_cv, reason="tests for import error, cviewer available") +def test_importerror(creating_graphs): + graphlist = creating_graphs + group1 = graphlist[:3] + group2 = graphlist[3:] + + nbs = NetworkBasedStatistic() + nbs.inputs.in_group1 = group1 + nbs.inputs.in_group2 = group2 + nbs.inputs.edge_key = "weight" + + with pytest.raises(ImportError) as e: + nbs.run() + assert "cviewer library is not available" == str(e.value) + + +@pytest.mark.skipif(not have_cv, reason="cviewer has to be available") +def test_keyerror(creating_graphs): + graphlist =creating_graphs + + group1 = graphlist[:3] + group2 = graphlist[3:] + + nbs = NetworkBasedStatistic() + nbs.inputs.in_group1 = group1 + nbs.inputs.in_group2 = group2 + nbs.inputs.edge_key = "Your_edge" + + with pytest.raises(KeyError) as e: + nbs.run() + assert "the graph edges do not have Your_edge attribute" in str(e.value) From 78c15e470041be7de982474abea80e0cf2416f40 Mon Sep 17 00:00:00 2001 From: mathiasg Date: Mon, 23 Oct 2017 18:12:55 -0400 Subject: [PATCH 434/643] fix+tst: ensure no pybids does not break testing --- .travis.yml | 7 +--- nipype/interfaces/bids_utils.py | 45 ++++++++++--------------- nipype/interfaces/tests/test_bids.py | 50 ++++++++++++++++++++++++++++ nipype/utils/filemanip.py | 17 ++++++++++ 4 files changed, 85 insertions(+), 34 deletions(-) create mode 100644 nipype/interfaces/tests/test_bids.py diff --git a/.travis.yml b/.travis.yml index a7630ca911..791dc6d230 100644 --- a/.travis.yml +++ b/.travis.yml @@ -37,12 +37,7 @@ before_install: conda install python=${TRAVIS_PYTHON_VERSION} && conda config --add channels conda-forge && conda install -y nipype icu && - rm -r ${CONDA_HOME}/lib/python${TRAVIS_PYTHON_VERSION}/site-packages/nipype*; - pushd $HOME; - git clone https://github.com/INCF/pybids.git; - cd pybids; - pip install -e .; - popd; } + rm -r ${CONDA_HOME}/lib/python${TRAVIS_PYTHON_VERSION}/site-packages/nipype*; } # Add install of vtk and mayavi to test mesh (disabled): conda install -y vtk mayavi - travis_retry apt_inst - travis_retry conda_inst diff --git a/nipype/interfaces/bids_utils.py b/nipype/interfaces/bids_utils.py index 0bbc895094..6bde969153 100644 --- a/nipype/interfaces/bids_utils.py +++ b/nipype/interfaces/bids_utils.py @@ -6,15 +6,9 @@ BIDSDataGrabber: Query data from BIDS dataset using pybids grabbids. -Change directory to provide relative paths for doctests ->>> import os ->>> import bids ->>> filepath = os.path.realpath(os.path.dirname(bids.__file__)) ->>> datadir = os.path.realpath(os.path.join(filepath, 'grabbids/tests/data/')) ->>> os.chdir(datadir) - """ from os.path import join, dirname +import json from .. import logging from .base import (traits, DynamicTraitedSpec, @@ -24,13 +18,11 @@ Str, Undefined) +have_pybids = True try: from bids import grabbids as gb - import json except ImportError: have_pybids = False -else: - have_pybids = True LOGGER = logging.getLogger('workflows') @@ -56,22 +48,19 @@ class BIDSDataGrabber(BaseInterface): Examples -------- - >>> from nipype.interfaces.bids_utils import BIDSDataGrabber - >>> from os.path import basename - By default, the BIDSDataGrabber fetches anatomical and functional images from a project, and makes BIDS entities (e.g. subject) available for filtering outputs. - >>> bg = BIDSDataGrabber() - >>> bg.inputs.base_dir = 'ds005/' - >>> bg.inputs.subject = '01' - >>> results = bg.run() - >>> basename(results.outputs.anat[0]) # doctest: +ALLOW_UNICODE - 'sub-01_T1w.nii.gz' + >>> bg = BIDSDataGrabber() # doctest: +SKIP + >>> bg.inputs.base_dir = 'ds005/' # doctest: +SKIP + >>> bg.inputs.subject = '01' # doctest: +SKIP + >>> results = bg.run() # doctest # doctest: +SKIP + >>> basename(results.outputs.anat[0]) # doctest: +SKIP + 'sub-01_T1w.nii.gz' # doctest: +SKIP - >>> basename(results.outputs.func[0]) # doctest: +ALLOW_UNICODE - 'sub-01_task-mixedgamblestask_run-01_bold.nii.gz' + >>> basename(results.outputs.func[0]) # doctest: +SKIP + 'sub-01_task-mixedgamblestask_run-01_bold.nii.gz' # doctest: +SKIP Dynamically created, user-defined output fields can also be defined to @@ -79,13 +68,13 @@ class BIDSDataGrabber(BaseInterface): are filtered on common entities, which can be explicitly defined as infields. - >>> bg = BIDSDataGrabber(infields = ['subject'], outfields = ['dwi']) - >>> bg.inputs.base_dir = 'ds005/' - >>> bg.inputs.subject = '01' - >>> bg.inputs.output_query['dwi'] = dict(modality='dwi') - >>> results = bg.run() - >>> basename(results.outputs.dwi[0]) # doctest: +ALLOW_UNICODE - 'sub-01_dwi.nii.gz' + >>> bg = BIDSDataGrabber(infields = ['subject'], outfields = ['dwi']) # doctest: +SKIP + >>> bg.inputs.base_dir = 'ds005/' # doctest: +SKIP + >>> bg.inputs.subject = '01' # doctest: +SKIP + >>> bg.inputs.output_query['dwi'] = dict(modality='dwi') # doctest: +SKIP + >>> results = bg.run() # doctest: +SKIP + >>> basename(results.outputs.dwi[0]) # doctest: +SKIP + 'sub-01_dwi.nii.gz' # doctest: +SKIP """ input_spec = BIDSDataGrabberInputSpec diff --git a/nipype/interfaces/tests/test_bids.py b/nipype/interfaces/tests/test_bids.py new file mode 100644 index 0000000000..aa5bc6c359 --- /dev/null +++ b/nipype/interfaces/tests/test_bids.py @@ -0,0 +1,50 @@ +import os +import json +import sys + +import pytest +from nipype.interfaces.bids_utils import BIDSDataGrabber +from nipype.utils.filemanip import dist_is_editable + +have_pybids = True +try: + import bids + from bids import grabbids as gb + filepath = os.path.realpath(os.path.dirname(bids.__file__)) + datadir = os.path.realpath(os.path.join(filepath, 'grabbids/tests/data/')) +except ImportError: + have_pybids = False + + +# There are three reasons these tests will be skipped: +@pytest.mark.skipif(not have_pybids, + reason="Pybids is not installed") +@pytest.mark.skipif(sys.version_info < (3, 0), + reason="Pybids no longer supports Python 2") +@pytest.mark.skipif(not dist_is_editable('pybids'), + reason="Pybids is not installed in editable mode") +def test_bids_grabber(tmpdir): + tmpdir.chdir() + bg = BIDSDataGrabber() + bg.inputs.base_dir = os.path.join(datadir, 'ds005') + bg.inputs.subject = '01' + results = bg.run() + assert os.path.basename(results.outputs.anat[0]) == 'sub-01_T1w.nii.gz' + assert os.path.basename(results.outputs.func[0]) == ( + 'sub-01_task-mixedgamblestask_run-01_bold.nii.gz') + + +@pytest.mark.skipif(not have_pybids, + reason="Pybids is not installed") +@pytest.mark.skipif(sys.version_info < (3, 0), + reason="Pybids no longer supports Python 2") +@pytest.mark.skipif(not dist_is_editable('pybids'), + reason="Pybids is not installed in editable mode") +def test_bids_fields(tmpdir): + tmpdir.chdir() + bg = BIDSDataGrabber(infields = ['subject'], outfields = ['dwi']) + bg.inputs.base_dir = os.path.join(datadir, 'ds005') + bg.inputs.subject = '01' + bg.inputs.output_query['dwi'] = dict(modality='dwi') + results = bg.run() + assert os.path.basename(results.outputs.dwi[0]) == 'sub-01_dwi.nii.gz' diff --git a/nipype/utils/filemanip.py b/nipype/utils/filemanip.py index 72cb1fc15e..e8a9ea22b8 100644 --- a/nipype/utils/filemanip.py +++ b/nipype/utils/filemanip.py @@ -646,3 +646,20 @@ def write_rst_dict(info, prefix=''): for key, value in sorted(info.items()): out.append('{}* {} : {}'.format(prefix, key, str(value))) return '\n'.join(out) + '\n\n' + + +def dist_is_editable(dist): + """Is distribution an editable install? + + Parameters + ---------- + dist : string + Package name + + # Borrowed from `pip`'s' API + """ + for path_item in sys.path: + egg_link = os.path.join(path_item, dist + '.egg-link') + if os.path.isfile(egg_link): + return True + return False From 2bb213dfa3f768c41db109bedacf451ee5eef32f Mon Sep 17 00:00:00 2001 From: Michiel Cottaar Date: Tue, 24 Oct 2017 10:48:04 +0100 Subject: [PATCH 435/643] BUG: check for eddy_openmp in the right place eddy_openmp is placed in the $FSLDIR/bin directory not the $FSLDIR directory --- nipype/interfaces/fsl/epi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nipype/interfaces/fsl/epi.py b/nipype/interfaces/fsl/epi.py index 38c65efeea..5978ee492d 100644 --- a/nipype/interfaces/fsl/epi.py +++ b/nipype/interfaces/fsl/epi.py @@ -592,7 +592,7 @@ def _run_interface(self, runtime): cmd = self._cmd if all((FSLDIR != '', cmd == 'eddy_openmp', - not os.path.exists(os.path.join(FSLDIR, cmd)))): + not os.path.exists(os.path.join(FSLDIR, 'bin', cmd)))): self._cmd = 'eddy' runtime = super(Eddy, self)._run_interface(runtime) From 3fda1c75936238cf860a79ff127b16fbe918e88b Mon Sep 17 00:00:00 2001 From: mathiasg Date: Tue, 24 Oct 2017 11:44:38 -0400 Subject: [PATCH 436/643] tst: add condaforge before installing python --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 791dc6d230..13927bc520 100644 --- a/.travis.yml +++ b/.travis.yml @@ -34,8 +34,8 @@ before_install: hash -r && conda config --set always_yes yes --set changeps1 no && conda update -q conda && - conda install python=${TRAVIS_PYTHON_VERSION} && conda config --add channels conda-forge && + conda install python=${TRAVIS_PYTHON_VERSION} && conda install -y nipype icu && rm -r ${CONDA_HOME}/lib/python${TRAVIS_PYTHON_VERSION}/site-packages/nipype*; } # Add install of vtk and mayavi to test mesh (disabled): conda install -y vtk mayavi From 77fb3c436602aac5e6cd5d00f6f00190e3363dcf Mon Sep 17 00:00:00 2001 From: mathiasg Date: Tue, 24 Oct 2017 11:45:09 -0400 Subject: [PATCH 437/643] doctest: less SKIP comments --- nipype/interfaces/bids_utils.py | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/nipype/interfaces/bids_utils.py b/nipype/interfaces/bids_utils.py index 6bde969153..e8676298c7 100644 --- a/nipype/interfaces/bids_utils.py +++ b/nipype/interfaces/bids_utils.py @@ -53,14 +53,14 @@ class BIDSDataGrabber(BaseInterface): filtering outputs. >>> bg = BIDSDataGrabber() # doctest: +SKIP - >>> bg.inputs.base_dir = 'ds005/' # doctest: +SKIP - >>> bg.inputs.subject = '01' # doctest: +SKIP - >>> results = bg.run() # doctest # doctest: +SKIP - >>> basename(results.outputs.anat[0]) # doctest: +SKIP - 'sub-01_T1w.nii.gz' # doctest: +SKIP + >>> bg.inputs.base_dir = 'ds005/' + >>> bg.inputs.subject = '01' + >>> results = bg.run() # doctest + >>> basename(results.outputs.anat[0]) + 'sub-01_T1w.nii.gz' - >>> basename(results.outputs.func[0]) # doctest: +SKIP - 'sub-01_task-mixedgamblestask_run-01_bold.nii.gz' # doctest: +SKIP + >>> basename(results.outputs.func[0]) + 'sub-01_task-mixedgamblestask_run-01_bold.nii.gz' Dynamically created, user-defined output fields can also be defined to @@ -69,12 +69,12 @@ class BIDSDataGrabber(BaseInterface): infields. >>> bg = BIDSDataGrabber(infields = ['subject'], outfields = ['dwi']) # doctest: +SKIP - >>> bg.inputs.base_dir = 'ds005/' # doctest: +SKIP - >>> bg.inputs.subject = '01' # doctest: +SKIP - >>> bg.inputs.output_query['dwi'] = dict(modality='dwi') # doctest: +SKIP - >>> results = bg.run() # doctest: +SKIP - >>> basename(results.outputs.dwi[0]) # doctest: +SKIP - 'sub-01_dwi.nii.gz' # doctest: +SKIP + >>> bg.inputs.base_dir = 'ds005/' + >>> bg.inputs.subject = '01' + >>> bg.inputs.output_query['dwi'] = dict(modality='dwi') + >>> results = bg.run() + >>> basename(results.outputs.dwi[0]) + 'sub-01_dwi.nii.gz' """ input_spec = BIDSDataGrabberInputSpec From eaa1bd051f08e46f0c73bcd03ee01f3162d41754 Mon Sep 17 00:00:00 2001 From: Oscar Esteban Date: Tue, 24 Oct 2017 10:32:19 -0700 Subject: [PATCH 438/643] Improve logging message Close #2250 --- nipype/pipeline/engine/nodes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nipype/pipeline/engine/nodes.py b/nipype/pipeline/engine/nodes.py index f5a0eb0b99..f7f83f578a 100644 --- a/nipype/pipeline/engine/nodes.py +++ b/nipype/pipeline/engine/nodes.py @@ -633,7 +633,7 @@ def _run_command(self, execute, copyfiles=True): if copyfiles: self._copyfiles_to_wd(cwd, execute) - message = 'Running node "%s" (a "%s" interface)' + message = 'Running node "%s" ("%s.%s")' if issubclass(self._interface.__class__, CommandLine): try: cmd = self._interface.cmdline @@ -644,7 +644,7 @@ def _run_command(self, execute, copyfiles=True): with open(cmdfile, 'wt') as fd: print(cmd + "\n", file=fd) message += ', a CommandLine Interface with command:\n%s' % cmd - logger.info(message + '.', self.name, + logger.info(message + '.', self.name, self._interface.__module__, self._interface.__class__.__name__) try: result = self._interface.run() From 08ec2b3367a0525323cb2fa797c213da5b24dc81 Mon Sep 17 00:00:00 2001 From: mathiasg Date: Tue, 24 Oct 2017 17:23:03 -0400 Subject: [PATCH 439/643] ref+tst: allow bidsgrabber to initialize without pybids, grab dependencies from requirements.txt --- .travis.yml | 4 ++-- nipype/interfaces/bids_utils.py | 35 ++++++++++++++-------------- nipype/testing/data/ds005/filler.txt | 0 3 files changed, 19 insertions(+), 20 deletions(-) create mode 100644 nipype/testing/data/ds005/filler.txt diff --git a/.travis.yml b/.travis.yml index 13927bc520..0cbb31dff9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -36,8 +36,8 @@ before_install: conda update -q conda && conda config --add channels conda-forge && conda install python=${TRAVIS_PYTHON_VERSION} && - conda install -y nipype icu && - rm -r ${CONDA_HOME}/lib/python${TRAVIS_PYTHON_VERSION}/site-packages/nipype*; } + conda install -y icu && + pip install -r requirements.txt &&; } # Add install of vtk and mayavi to test mesh (disabled): conda install -y vtk mayavi - travis_retry apt_inst - travis_retry conda_inst diff --git a/nipype/interfaces/bids_utils.py b/nipype/interfaces/bids_utils.py index e8676298c7..282bb8d7f2 100644 --- a/nipype/interfaces/bids_utils.py +++ b/nipype/interfaces/bids_utils.py @@ -6,6 +6,12 @@ BIDSDataGrabber: Query data from BIDS dataset using pybids grabbids. + + Change directory to provide relative paths for doctests + >>> import os + >>> filepath = os.path.dirname( os.path.realpath( __file__ ) ) + >>> datadir = os.path.realpath(os.path.join(filepath, '../testing/data')) + >>> os.chdir(datadir) """ from os.path import join, dirname import json @@ -52,15 +58,10 @@ class BIDSDataGrabber(BaseInterface): from a project, and makes BIDS entities (e.g. subject) available for filtering outputs. - >>> bg = BIDSDataGrabber() # doctest: +SKIP + >>> bg = BIDSDataGrabber() >>> bg.inputs.base_dir = 'ds005/' >>> bg.inputs.subject = '01' - >>> results = bg.run() # doctest - >>> basename(results.outputs.anat[0]) - 'sub-01_T1w.nii.gz' - - >>> basename(results.outputs.func[0]) - 'sub-01_task-mixedgamblestask_run-01_bold.nii.gz' + >>> results = bg.run() # doctest: +SKIP Dynamically created, user-defined output fields can also be defined to @@ -68,20 +69,18 @@ class BIDSDataGrabber(BaseInterface): are filtered on common entities, which can be explicitly defined as infields. - >>> bg = BIDSDataGrabber(infields = ['subject'], outfields = ['dwi']) # doctest: +SKIP + >>> bg = BIDSDataGrabber(infields = ['subject'], outfields = ['dwi']) >>> bg.inputs.base_dir = 'ds005/' >>> bg.inputs.subject = '01' >>> bg.inputs.output_query['dwi'] = dict(modality='dwi') - >>> results = bg.run() - >>> basename(results.outputs.dwi[0]) - 'sub-01_dwi.nii.gz' + >>> results = bg.run() # doctest: +SKIP """ input_spec = BIDSDataGrabberInputSpec output_spec = DynamicTraitedSpec _always_run = True - def __init__(self, infields=None, **kwargs): + def __init__(self, infields=[], **kwargs): """ Parameters ---------- @@ -93,17 +92,13 @@ def __init__(self, infields=None, **kwargs): If no matching items, returns Undefined. """ super(BIDSDataGrabber, self).__init__(**kwargs) - if not have_pybids: - raise ImportError( - "The BIDSEventsGrabber interface requires pybids." - " Please make sure it is installed.") if not isdefined(self.inputs.output_query): self.inputs.output_query = {"func": {"modality": "func"}, "anat": {"modality": "anat"}} - # If infields is None, use all BIDS entities - if infields is None: + # If infields is empty, use all BIDS entities + if not infields and have_pybids: bids_config = join(dirname(gb.__file__), 'config', 'bids.json') bids_config = json.load(open(bids_config, 'r')) infields = [i['name'] for i in bids_config['entities']] @@ -119,6 +114,10 @@ def __init__(self, infields=None, **kwargs): self.inputs.trait_set(trait_change_notify=False, **undefined_traits) def _run_interface(self, runtime): + if not have_pybids: + raise ImportError( + "The BIDSEventsGrabber interface requires pybids." + " Please make sure it is installed.") return runtime def _list_outputs(self): diff --git a/nipype/testing/data/ds005/filler.txt b/nipype/testing/data/ds005/filler.txt new file mode 100644 index 0000000000..e69de29bb2 From efb43fd2e57d32250feab0789831d59344eecb10 Mon Sep 17 00:00:00 2001 From: salma1601 Date: Wed, 25 Oct 2017 17:33:44 +0200 Subject: [PATCH 440/643] add oblique_parent and verbose options to afni's Warp --- nipype/interfaces/afni/preprocess.py | 8 ++++++++ nipype/interfaces/afni/tests/test_auto_Warp.py | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/nipype/interfaces/afni/preprocess.py b/nipype/interfaces/afni/preprocess.py index 736732042c..219f19cd55 100644 --- a/nipype/interfaces/afni/preprocess.py +++ b/nipype/interfaces/afni/preprocess.py @@ -2711,6 +2711,11 @@ class WarpInputSpec(AFNICommandInputSpec): desc='apply transformation from 3dWarpDrive', argstr='-matparent %s', exists=True) + oblique_parent = File( + desc='Read in the oblique transformation matrix from an oblique ' + 'dataset and make cardinal dataset oblique to match', + argstr='-oblique_parent %s', + exists=True) deoblique = traits.Bool( desc='transform dataset from oblique to cardinal', argstr='-deoblique') @@ -2728,6 +2733,9 @@ class WarpInputSpec(AFNICommandInputSpec): zpad = traits.Int( desc='pad input dataset with N planes of zero on all sides.', argstr='-zpad %d') + verbose = traits.Bool( + desc='Print out some information along the way.', + argstr='-verb') class Warp(AFNICommand): diff --git a/nipype/interfaces/afni/tests/test_auto_Warp.py b/nipype/interfaces/afni/tests/test_auto_Warp.py index c579758afb..d37ed85676 100644 --- a/nipype/interfaces/afni/tests/test_auto_Warp.py +++ b/nipype/interfaces/afni/tests/test_auto_Warp.py @@ -32,6 +32,8 @@ def test_Warp_inputs(): num_threads=dict(nohash=True, usedefault=True, ), + oblique_parent=dict(argstr='-oblique_parent %s', + ), out_file=dict(argstr='-prefix %s', name_source='in_file', name_template='%s_warp', @@ -42,6 +44,8 @@ def test_Warp_inputs(): ), tta2mni=dict(argstr='-tta2mni', ), + verbose=dict(argstr='-verb', + ), zpad=dict(argstr='-zpad %d', ), ) From 1ae9eb84dd8ff6ed9374571ba80485032d0fc1e0 Mon Sep 17 00:00:00 2001 From: salma1601 Date: Thu, 26 Oct 2017 16:25:25 +0200 Subject: [PATCH 441/643] add allineate option inside Qwarp --- nipype/interfaces/afni/preprocess.py | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/nipype/interfaces/afni/preprocess.py b/nipype/interfaces/afni/preprocess.py index 736732042c..a3c9487d21 100644 --- a/nipype/interfaces/afni/preprocess.py +++ b/nipype/interfaces/afni/preprocess.py @@ -2929,6 +2929,17 @@ class QwarpInputSpec(AFNICommandInputSpec): '* You CAN use -resample with these 3dQwarp options:' '-plusminus -inilev -iniwarp -duplo', argstr='-resample') + allineate = traits.Bool( + desc='This option will make 3dQwarp run 3dAllineate first, to align ' + 'the source dataset to the base with an affine transformation. ' + 'It will then use that alignment as a starting point for the ' + 'nonlinear warping.', + argstr='-allineate') + allineate_opts = traits.Str( + desc='add extra options to the 3dAllineate command to be run by ' + '3dQwarp.', + argstr='-allineate_opts %s', + xand=['allineate']) nowarp = traits.Bool( desc='Do not save the _WARP file.', argstr='-nowarp') @@ -3465,7 +3476,15 @@ class Qwarp(AFNICommand): >>> qwarp2.cmdline # doctest: +ALLOW_UNICODE '3dQwarp -base mni.nii -blur 0.0 2.0 -source structural.nii -inilev 7 -iniwarp Q25_warp+tlrc.HEAD -prefix Q11' >>> res2 = qwarp2.run() # doctest: +SKIP - """ + >>> res2 = qwarp2.run() # doctest: +SKIP + >>> qwarp3 = afni.Qwarp() + >>> qwarp3.inputs.in_file = 'structural.nii' + >>> qwarp3.inputs.base_file = 'mni.nii' + >>> qwarp3.inputs.allineate = True + >>> qwarp3.inputs.allineate_opts = '-cose lpa -verb' + >>> qwarp3.cmdline # doctest: +ALLOW_UNICODE + "3dQwarp -base mni.nii -allineate -allineate_opts '-cost lpa -verb'" + >>> res3 = qwarp3.run() # doctest: +SKIP """ _cmd = '3dQwarp' input_spec = QwarpInputSpec output_spec = QwarpOutputSpec From ed2b9d960c533156e263f825d82587988461469e Mon Sep 17 00:00:00 2001 From: salma1601 Date: Thu, 26 Oct 2017 17:36:01 +0200 Subject: [PATCH 442/643] fix example --- nipype/interfaces/afni/preprocess.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/nipype/interfaces/afni/preprocess.py b/nipype/interfaces/afni/preprocess.py index a3c9487d21..7ffec1c234 100644 --- a/nipype/interfaces/afni/preprocess.py +++ b/nipype/interfaces/afni/preprocess.py @@ -3483,12 +3483,17 @@ class Qwarp(AFNICommand): >>> qwarp3.inputs.allineate = True >>> qwarp3.inputs.allineate_opts = '-cose lpa -verb' >>> qwarp3.cmdline # doctest: +ALLOW_UNICODE - "3dQwarp -base mni.nii -allineate -allineate_opts '-cost lpa -verb'" + "3dQwarp -allineate -allineate_opts '-cose lpa -verb' -base mni.nii -source structural.nii -prefix structural_QW" >>> res3 = qwarp3.run() # doctest: +SKIP """ _cmd = '3dQwarp' input_spec = QwarpInputSpec output_spec = QwarpOutputSpec + def _format_arg(self, name, spec, value): + if name == 'allineate_opts': + return spec.argstr % ("'" + value + "'") + return super(Qwarp, self)._format_arg(name, spec, value) + def _list_outputs(self): outputs = self.output_spec().get() From 9ec427cb98accbfd2a5ae794122797aefc3d8a18 Mon Sep 17 00:00:00 2001 From: salma1601 Date: Thu, 26 Oct 2017 17:36:21 +0200 Subject: [PATCH 443/643] update test --- nipype/interfaces/afni/tests/test_auto_Qwarp.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/nipype/interfaces/afni/tests/test_auto_Qwarp.py b/nipype/interfaces/afni/tests/test_auto_Qwarp.py index 358d80efb2..55015e0fbe 100644 --- a/nipype/interfaces/afni/tests/test_auto_Qwarp.py +++ b/nipype/interfaces/afni/tests/test_auto_Qwarp.py @@ -8,6 +8,11 @@ def test_Qwarp_inputs(): ), Qonly=dict(argstr='-Qonly', ), + allineate=dict(argstr='-allineate', + ), + allineate_opts=dict(argstr='-allineate_opts %s', + xand=['allineate'], + ), allsave=dict(argstr='-allsave', xor=['nopadWARP', 'duplo', 'plusminus'], ), From af459a88b96a350586a182da56b1c27592a9d542 Mon Sep 17 00:00:00 2001 From: mathiasg Date: Thu, 26 Oct 2017 15:19:26 -0400 Subject: [PATCH 444/643] tst: fix travis file --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 0cbb31dff9..a8c9f63122 100644 --- a/.travis.yml +++ b/.travis.yml @@ -37,7 +37,7 @@ before_install: conda config --add channels conda-forge && conda install python=${TRAVIS_PYTHON_VERSION} && conda install -y icu && - pip install -r requirements.txt &&; } + pip install -r requirements.txt; } # Add install of vtk and mayavi to test mesh (disabled): conda install -y vtk mayavi - travis_retry apt_inst - travis_retry conda_inst From 0b16c857ea430ecbecb8ec3d8d440e2a5a5f2526 Mon Sep 17 00:00:00 2001 From: mathiasg Date: Thu, 26 Oct 2017 15:54:38 -0400 Subject: [PATCH 445/643] rev: initiate fields as None --- nipype/interfaces/bids_utils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nipype/interfaces/bids_utils.py b/nipype/interfaces/bids_utils.py index 282bb8d7f2..6ced8061e7 100644 --- a/nipype/interfaces/bids_utils.py +++ b/nipype/interfaces/bids_utils.py @@ -80,7 +80,7 @@ class BIDSDataGrabber(BaseInterface): output_spec = DynamicTraitedSpec _always_run = True - def __init__(self, infields=[], **kwargs): + def __init__(self, infields=None, **kwargs): """ Parameters ---------- @@ -98,7 +98,7 @@ def __init__(self, infields=[], **kwargs): "anat": {"modality": "anat"}} # If infields is empty, use all BIDS entities - if not infields and have_pybids: + if not infields is None and have_pybids: bids_config = join(dirname(gb.__file__), 'config', 'bids.json') bids_config = json.load(open(bids_config, 'r')) infields = [i['name'] for i in bids_config['entities']] @@ -107,7 +107,7 @@ def __init__(self, infields=[], **kwargs): # used for mandatory inputs check undefined_traits = {} - for key in infields: + for key in infields or []: self.inputs.add_trait(key, traits.Any) undefined_traits[key] = kwargs[key] if key in kwargs else Undefined From 988b01de52279c96938cbf1f07bde30698fafc14 Mon Sep 17 00:00:00 2001 From: salma1601 Date: Fri, 27 Oct 2017 15:18:15 +0200 Subject: [PATCH 446/643] fix output default name --- nipype/interfaces/afni/utils.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/nipype/interfaces/afni/utils.py b/nipype/interfaces/afni/utils.py index bb0db7ab70..f5ed235f92 100644 --- a/nipype/interfaces/afni/utils.py +++ b/nipype/interfaces/afni/utils.py @@ -1592,8 +1592,9 @@ class NwarpApply(AFNICommandBase): class NwarpCatInputSpec(AFNICommandInputSpec): in_files = traits.List( traits.Either( - traits.File(), traits.Tuple( - traits.Enum('IDENT', 'INV', 'SQRT', 'SQRTINV'), traits.File())), + traits.File(), + traits.Tuple(traits.Enum('IDENT', 'INV', 'SQRT', 'SQRTINV'), + traits.File())), descr="list of tuples of 3D warps and associated functions", mandatory=True, argstr="%s", @@ -1684,14 +1685,15 @@ class NwarpCat(AFNICommand): def _format_arg(self, name, spec, value): if name == 'in_files': - return spec.argstr%(' '.join(["'" + v[0] + "(" + v[1] + ")'" - if isinstance(v, tuple) else v - for v in value])) + return spec.argstr % (' '.join(["'" + v[0] + "(" + v[1] + ")'" + if isinstance(v, tuple) else v + for v in value])) return super(NwarpCat, self)._format_arg(name, spec, value) def _gen_filename(self, name): if name == 'out_file': - return self._gen_fname(self.inputs.in_files[0][0], suffix='_tcat') + return self._gen_fname(self.inputs.in_files[0][0], + suffix='_NwarpCat') def _list_outputs(self): outputs = self.output_spec().get() From bb0ecff08792229235169a9ab5cc4cd400702e7a Mon Sep 17 00:00:00 2001 From: mathiasg Date: Fri, 27 Oct 2017 11:48:07 -0400 Subject: [PATCH 447/643] tst+rf: run pybids with travis, minor tweaks to interface --- .travis.yml | 7 ++++++- nipype/interfaces/bids_utils.py | 18 +++++++++--------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index a8c9f63122..681d3dd765 100644 --- a/.travis.yml +++ b/.travis.yml @@ -37,7 +37,12 @@ before_install: conda config --add channels conda-forge && conda install python=${TRAVIS_PYTHON_VERSION} && conda install -y icu && - pip install -r requirements.txt; } + pip install -r requirements.txt && + pushd $HOME; + git clone https://github.com/INCF/pybids.git; + cd pybids; + pip install -e .; + popd; } # Add install of vtk and mayavi to test mesh (disabled): conda install -y vtk mayavi - travis_retry apt_inst - travis_retry conda_inst diff --git a/nipype/interfaces/bids_utils.py b/nipype/interfaces/bids_utils.py index 6ced8061e7..a20bf331e2 100644 --- a/nipype/interfaces/bids_utils.py +++ b/nipype/interfaces/bids_utils.py @@ -103,15 +103,7 @@ def __init__(self, infields=None, **kwargs): bids_config = json.load(open(bids_config, 'r')) infields = [i['name'] for i in bids_config['entities']] - self._infields = infields - - # used for mandatory inputs check - undefined_traits = {} - for key in infields or []: - self.inputs.add_trait(key, traits.Any) - undefined_traits[key] = kwargs[key] if key in kwargs else Undefined - - self.inputs.trait_set(trait_change_notify=False, **undefined_traits) + self._infields = infields or [] def _run_interface(self, runtime): if not have_pybids: @@ -121,6 +113,14 @@ def _run_interface(self, runtime): return runtime def _list_outputs(self): + # used for mandatory inputs check + undefined_traits = {} + for key in self._infields: + self.inputs.add_trait(key, traits.Any) + undefined_traits[key] = kwargs[key] if key in kwargs else Undefined + + self.inputs.trait_set(trait_change_notify=False, **undefined_traits) + layout = gb.BIDSLayout(self.inputs.base_dir) # If infield is not given nm input value, silently ignore From ac45369c4330fc9fc376a35f97228b78e9bb88f5 Mon Sep 17 00:00:00 2001 From: mathiasg Date: Fri, 27 Oct 2017 11:54:43 -0400 Subject: [PATCH 448/643] fix: skip resource monitor test until consistent --- nipype/interfaces/tests/test_resource_monitor.py | 1 + 1 file changed, 1 insertion(+) diff --git a/nipype/interfaces/tests/test_resource_monitor.py b/nipype/interfaces/tests/test_resource_monitor.py index 660f11455e..8374ba7ace 100644 --- a/nipype/interfaces/tests/test_resource_monitor.py +++ b/nipype/interfaces/tests/test_resource_monitor.py @@ -45,6 +45,7 @@ class UseResources(CommandLine): _always_run = True +@pytest.mark.skip(reason="inconsistent readings") @pytest.mark.skipif(os.getenv('CI_SKIP_TEST', False), reason='disabled in CI tests') @pytest.mark.parametrize("mem_gb,n_procs", [(0.5, 3), (2.2, 8), (0.8, 4), (1.5, 1)]) def test_cmdline_profiling(tmpdir, mem_gb, n_procs): From c87399e11dec111d0f93bdba42c05a5905cc185d Mon Sep 17 00:00:00 2001 From: mathiasg Date: Fri, 27 Oct 2017 13:50:10 -0400 Subject: [PATCH 449/643] rev: set traits inside __init__ --- nipype/interfaces/bids_utils.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/nipype/interfaces/bids_utils.py b/nipype/interfaces/bids_utils.py index a20bf331e2..0259a80352 100644 --- a/nipype/interfaces/bids_utils.py +++ b/nipype/interfaces/bids_utils.py @@ -105,14 +105,6 @@ def __init__(self, infields=None, **kwargs): self._infields = infields or [] - def _run_interface(self, runtime): - if not have_pybids: - raise ImportError( - "The BIDSEventsGrabber interface requires pybids." - " Please make sure it is installed.") - return runtime - - def _list_outputs(self): # used for mandatory inputs check undefined_traits = {} for key in self._infields: @@ -121,6 +113,14 @@ def _list_outputs(self): self.inputs.trait_set(trait_change_notify=False, **undefined_traits) + def _run_interface(self, runtime): + if not have_pybids: + raise ImportError( + "The BIDSEventsGrabber interface requires pybids." + " Please make sure it is installed.") + return runtime + + def _list_outputs(self): layout = gb.BIDSLayout(self.inputs.base_dir) # If infield is not given nm input value, silently ignore From 0b7742d224f06ae0f6d580d4f759cee780955fc3 Mon Sep 17 00:00:00 2001 From: Dorota Jarecka Date: Fri, 27 Oct 2017 14:30:58 -0400 Subject: [PATCH 450/643] adding fixtures to test_resamplig --- .../interfaces/ants/tests/test_resampling.py | 60 ++++++++----------- 1 file changed, 26 insertions(+), 34 deletions(-) diff --git a/nipype/interfaces/ants/tests/test_resampling.py b/nipype/interfaces/ants/tests/test_resampling.py index 3c13afd853..6bbb31b24d 100644 --- a/nipype/interfaces/ants/tests/test_resampling.py +++ b/nipype/interfaces/ants/tests/test_resampling.py @@ -19,75 +19,67 @@ def move2orig(): request.addfinalizer(move2orig) - -def test_WarpImageMultiTransform(change_dir): +@pytest.fixture() +def create_wimt(): wimt = WarpImageMultiTransform() wimt.inputs.input_image = 'diffusion_weighted.nii' wimt.inputs.reference_image = 'functional.nii' wimt.inputs.transformation_series = ['func2anat_coreg_Affine.txt','func2anat_InverseWarp.nii.gz', \ 'dwi2anat_Warp.nii.gz','dwi2anat_coreg_Affine.txt'] + return wimt + +def test_WarpImageMultiTransform(change_dir, create_wimt): + wimt = create_wimt assert wimt.cmdline == 'WarpImageMultiTransform 3 diffusion_weighted.nii diffusion_weighted_wimt.nii -R functional.nii \ func2anat_coreg_Affine.txt func2anat_InverseWarp.nii.gz dwi2anat_Warp.nii.gz dwi2anat_coreg_Affine.txt' -def test_WarpImageMultiTransform_invaffine_1(change_dir): - wimt = WarpImageMultiTransform() - wimt.inputs.input_image = 'diffusion_weighted.nii' - wimt.inputs.reference_image = 'functional.nii' - wimt.inputs.transformation_series = ['func2anat_coreg_Affine.txt','func2anat_InverseWarp.nii.gz', \ - 'dwi2anat_Warp.nii.gz','dwi2anat_coreg_Affine.txt'] +def test_WarpImageMultiTransform_invaffine_1(change_dir, create_wimt): + wimt = create_wimt wimt.inputs.invert_affine = [1] assert wimt.cmdline == 'WarpImageMultiTransform 3 diffusion_weighted.nii diffusion_weighted_wimt.nii -R functional.nii \ -i func2anat_coreg_Affine.txt func2anat_InverseWarp.nii.gz dwi2anat_Warp.nii.gz dwi2anat_coreg_Affine.txt' -def test_WarpImageMultiTransform_invaffine_2(change_dir): - wimt = WarpImageMultiTransform() - wimt.inputs.input_image = 'diffusion_weighted.nii' - wimt.inputs.reference_image = 'functional.nii' - wimt.inputs.transformation_series = ['func2anat_coreg_Affine.txt','func2anat_InverseWarp.nii.gz', \ - 'dwi2anat_Warp.nii.gz','dwi2anat_coreg_Affine.txt'] +def test_WarpImageMultiTransform_invaffine_2(change_dir, create_wimt): + wimt = create_wimt wimt.inputs.invert_affine = [2] assert wimt.cmdline == 'WarpImageMultiTransform 3 diffusion_weighted.nii diffusion_weighted_wimt.nii -R functional.nii func2anat_coreg_Affine.txt func2anat_InverseWarp.nii.gz dwi2anat_Warp.nii.gz -i dwi2anat_coreg_Affine.txt' @pytest.mark.xfail(reason="dj: should it fail?") -def test_WarpImageMultiTransform_invaffine_wrong(change_dir): - wimt = WarpImageMultiTransform() - wimt.inputs.input_image = 'diffusion_weighted.nii' - wimt.inputs.reference_image = 'functional.nii' - wimt.inputs.transformation_series = ['func2anat_coreg_Affine.txt','func2anat_InverseWarp.nii.gz', \ - 'dwi2anat_Warp.nii.gz','dwi2anat_coreg_Affine.txt'] +def test_WarpImageMultiTransform_invaffine_wrong(change_dir, create_wimt): + wimt = create_wimt wimt.inputs.invert_affine = [3] with pytest.raises(Exception): assert wimt.cmdline -def test_WarpTimeSeriesImageMultiTransform(change_dir): - wtsimt = WarpTimeSeriesImageMultiTransform() - wtsimt.inputs.input_image = 'resting.nii' - wtsimt.inputs.reference_image = 'ants_deformed.nii.gz' +@pytest.fixture() +def create_wtsimt(): + wtsimt = WarpTimeSeriesImageMultiTransform() + wtsimt.inputs.input_image = 'resting.nii' + wtsimt.inputs.reference_image = 'ants_deformed.nii.gz' wtsimt.inputs.transformation_series = ['ants_Warp.nii.gz','ants_Affine.txt'] + return wtsimt + + +def test_WarpTimeSeriesImageMultiTransform(change_dir, create_wtsimt): + wtsimt = create_wtsimt assert wtsimt.cmdline == 'WarpTimeSeriesImageMultiTransform 4 resting.nii resting_wtsimt.nii \ -R ants_deformed.nii.gz ants_Warp.nii.gz ants_Affine.txt' -def test_WarpTimeSeriesImageMultiTransform_invaffine(change_dir): - wtsimt = WarpTimeSeriesImageMultiTransform() - wtsimt.inputs.input_image = 'resting.nii' - wtsimt.inputs.reference_image = 'ants_deformed.nii.gz' - wtsimt.inputs.transformation_series = ['ants_Warp.nii.gz','ants_Affine.txt'] +def test_WarpTimeSeriesImageMultiTransform_invaffine(change_dir, create_wtsimt): + wtsimt = create_wtsimt wtsimt.inputs.invert_affine = [1] assert wtsimt.cmdline == 'WarpTimeSeriesImageMultiTransform 4 resting.nii resting_wtsimt.nii \ -R ants_deformed.nii.gz ants_Warp.nii.gz -i ants_Affine.txt' @pytest.mark.xfail(reason="dj: should it fail?") -def test_WarpTimeSeriesImageMultiTransform_invaffine_wrong(change_dir): - wtsimt = WarpTimeSeriesImageMultiTransform() - wtsimt.inputs.input_image = 'resting.nii' - wtsimt.inputs.reference_image = 'ants_deformed.nii.gz' - wtsimt.inputs.transformation_series = ['ants_Warp.nii.gz','ants_Affine.txt'] +def test_WarpTimeSeriesImageMultiTransform_invaffine_wrong(change_dir, create_wtsimt): + wtsimt = create_wtsimt wtsimt.inputs.invert_affine = [0] with pytest.raises(Exception): wtsimt.cmdline From a8f32b64ddd1f34cae9d9f699609c4e24272efaa Mon Sep 17 00:00:00 2001 From: Dorota Jarecka Date: Fri, 27 Oct 2017 21:14:55 -0400 Subject: [PATCH 451/643] raising exception if the list provided as invert_affine doesnt make sense --- nipype/interfaces/ants/resampling.py | 36 +++++++++++++++++-- .../interfaces/ants/tests/test_resampling.py | 4 +-- 2 files changed, 34 insertions(+), 6 deletions(-) diff --git a/nipype/interfaces/ants/resampling.py b/nipype/interfaces/ants/resampling.py index 63bb5c4a16..29f7c6d27b 100644 --- a/nipype/interfaces/ants/resampling.py +++ b/nipype/interfaces/ants/resampling.py @@ -43,9 +43,12 @@ class WarpTimeSeriesImageMultiTransformInputSpec(ANTSCommandInputSpec): desc='transformation file(s) to be applied', mandatory=True, copyfile=False) invert_affine = traits.List(traits.Int, - desc=('List of Affine transformations to invert. ' + desc=('List of Affine transformations to invert.' 'E.g.: [1,4,5] inverts the 1st, 4th, and 5th Affines ' - 'found in transformation_series')) + 'found in transformation_series. Note that indexing ' + 'starts with 1 and does not include warp fields. Affine ' + 'transformations are distinguished ' + 'from warp fields by the word "affine" included in their filenames.')) class WarpTimeSeriesImageMultiTransformOutputSpec(TraitedSpec): @@ -67,6 +70,14 @@ class WarpTimeSeriesImageMultiTransform(ANTSCommand): 'WarpTimeSeriesImageMultiTransform 4 resting.nii resting_wtsimt.nii -R ants_deformed.nii.gz ants_Warp.nii.gz \ ants_Affine.txt' + >>> wtsimt = WarpTimeSeriesImageMultiTransform() + >>> wtsimt.inputs.input_image = 'resting.nii' + >>> wtsimt.inputs.reference_image = 'ants_deformed.nii.gz' + >>> wtsimt.inputs.transformation_series = ['ants_Warp.nii.gz','ants_Affine.txt'] + >>> wtsimt.inputs.invert_affine = [1] # # this will invert the 1st Affine file: ants_Affine.txt + >>> wtsimt.cmdline # doctest: +ALLOW_UNICODE + 'WarpTimeSeriesImageMultiTransform 4 resting.nii resting_wtsimt.nii -R ants_deformed.nii.gz ants_Warp.nii.gz \ +-i ants_Affine.txt' """ _cmd = 'WarpTimeSeriesImageMultiTransform' @@ -81,13 +92,22 @@ def _format_arg(self, opt, spec, val): if opt == 'transformation_series': series = [] affine_counter = 0 + affine_invert = [] for transformation in val: if 'Affine' in transformation and \ isdefined(self.inputs.invert_affine): affine_counter += 1 if affine_counter in self.inputs.invert_affine: series += ['-i'] + affine_invert.append(affine_counter) series += [transformation] + + if isdefined(self.inputs.invert_affine): + diff_inv = set(self.inputs.invert_affine) - set(affine_invert) + if diff_inv: + raise Exceptions("Review invert_affine, not all indexes from invert_affine were used, " + "check the description for the full definition") + return ' '.join(series) return super(WarpTimeSeriesImageMultiTransform, self)._format_arg(opt, spec, val) @@ -168,7 +188,7 @@ class WarpImageMultiTransform(ANTSCommand): >>> wimt.inputs.reference_image = 'functional.nii' >>> wimt.inputs.transformation_series = ['func2anat_coreg_Affine.txt','func2anat_InverseWarp.nii.gz', \ 'dwi2anat_Warp.nii.gz','dwi2anat_coreg_Affine.txt'] - >>> wimt.inputs.invert_affine = [1] + >>> wimt.inputs.invert_affine = [1] # this will invert the 1st Affine file: 'func2anat_coreg_Affine.txt' >>> wimt.cmdline # doctest: +ALLOW_UNICODE 'WarpImageMultiTransform 3 diffusion_weighted.nii diffusion_weighted_wimt.nii -R functional.nii \ -i func2anat_coreg_Affine.txt func2anat_InverseWarp.nii.gz dwi2anat_Warp.nii.gz dwi2anat_coreg_Affine.txt' @@ -190,14 +210,24 @@ def _format_arg(self, opt, spec, val): if opt == 'transformation_series': series = [] affine_counter = 0 + affine_invert = [] for transformation in val: if "affine" in transformation.lower() and \ isdefined(self.inputs.invert_affine): affine_counter += 1 if affine_counter in self.inputs.invert_affine: series += ['-i'] + affine_invert.append(affine_counter) series += [transformation] + + if isdefined(self.inputs.invert_affine): + diff_inv = set(self.inputs.invert_affine) - set(affine_invert) + if diff_inv: + raise Exceptions("Review invert_affine, not all indexes from invert_affine were used, " + "check the description for the full definition") + return ' '.join(series) + return super(WarpImageMultiTransform, self)._format_arg(opt, spec, val) def _list_outputs(self): diff --git a/nipype/interfaces/ants/tests/test_resampling.py b/nipype/interfaces/ants/tests/test_resampling.py index 6bbb31b24d..22dc4446e9 100644 --- a/nipype/interfaces/ants/tests/test_resampling.py +++ b/nipype/interfaces/ants/tests/test_resampling.py @@ -3,7 +3,7 @@ from nipype.interfaces.ants import WarpImageMultiTransform, WarpTimeSeriesImageMultiTransform import os -import pytest, pdb +import pytest @pytest.fixture() @@ -47,7 +47,6 @@ def test_WarpImageMultiTransform_invaffine_2(change_dir, create_wimt): assert wimt.cmdline == 'WarpImageMultiTransform 3 diffusion_weighted.nii diffusion_weighted_wimt.nii -R functional.nii func2anat_coreg_Affine.txt func2anat_InverseWarp.nii.gz dwi2anat_Warp.nii.gz -i dwi2anat_coreg_Affine.txt' -@pytest.mark.xfail(reason="dj: should it fail?") def test_WarpImageMultiTransform_invaffine_wrong(change_dir, create_wimt): wimt = create_wimt wimt.inputs.invert_affine = [3] @@ -77,7 +76,6 @@ def test_WarpTimeSeriesImageMultiTransform_invaffine(change_dir, create_wtsimt): -R ants_deformed.nii.gz ants_Warp.nii.gz -i ants_Affine.txt' -@pytest.mark.xfail(reason="dj: should it fail?") def test_WarpTimeSeriesImageMultiTransform_invaffine_wrong(change_dir, create_wtsimt): wtsimt = create_wtsimt wtsimt.inputs.invert_affine = [0] From bd7f00cc4c6135b715e425d1ab67a4e175aa77ef Mon Sep 17 00:00:00 2001 From: oesteban Date: Sat, 28 Oct 2017 10:04:39 -0700 Subject: [PATCH 452/643] [ENH] Close file descriptors When running large nipype graphs, the open file-descriptors end up provoking OSError 12 (could not allocate memory). --- nipype/interfaces/base.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/nipype/interfaces/base.py b/nipype/interfaces/base.py index f8e845d944..7f586d4923 100644 --- a/nipype/interfaces/base.py +++ b/nipype/interfaces/base.py @@ -1373,7 +1373,9 @@ def run_command(runtime, output=None, timeout=0.01): stderr=stderr, shell=True, cwd=runtime.cwd, - env=env) + env=env, + close_fds=True, + ) result = { 'stdout': [], 'stderr': [], @@ -1421,12 +1423,14 @@ def _process(drain=0): proc.wait() if outfile is not None: stdout.flush() + stdout.close() with open(outfile, 'rb') as ofh: stdoutstr = ofh.read() result['stdout'] = read_stream(stdoutstr, logger=iflogger) if errfile is not None: stderr.flush() + stderr.close() with open(errfile, 'rb') as efh: stderrstr = efh.read() result['stderr'] = read_stream(stderrstr, logger=iflogger) From ec5d3b15080c5cf10bb741befbe1c814c0a023ce Mon Sep 17 00:00:00 2001 From: Dorota Jarecka Date: Sun, 29 Oct 2017 12:01:51 -0400 Subject: [PATCH 453/643] changing some ants inputs to mandatory --- nipype/interfaces/ants/registration.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/nipype/interfaces/ants/registration.py b/nipype/interfaces/ants/registration.py index 0b0e8f581e..f70695af4b 100644 --- a/nipype/interfaces/ants/registration.py +++ b/nipype/interfaces/ants/registration.py @@ -49,8 +49,12 @@ class ANTSInputSpec(ANTSCommandInputSpec): metric = traits.List(traits.Enum('CC', 'MI', 'SMI', 'PR', 'SSD', 'MSQ', 'PSE'), mandatory=True, desc='') - metric_weight = traits.List(traits.Float(), requires=['metric'], desc='') - radius = traits.List(traits.Int(), requires=['metric'], desc='') + metric_weight = traits.List(traits.Float(), value=[1.0], usedefault=True, + requires=['metric'], mandatory=True, + desc='the metric weight(s) for each stage. ' + 'The weights must sum to 1 per stage.') + + radius = traits.List(traits.Int(), requires=['metric'], mandatory=True, desc='') output_transform_prefix = Str('out', usedefault=True, argstr='--output-naming %s', mandatory=True, desc='') From 31967269836063fd1a282da1ba9a5a4ae36123b0 Mon Sep 17 00:00:00 2001 From: Dorota Jarecka Date: Tue, 31 Oct 2017 10:30:03 -0400 Subject: [PATCH 454/643] adding description to radius --- nipype/interfaces/ants/registration.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nipype/interfaces/ants/registration.py b/nipype/interfaces/ants/registration.py index f70695af4b..f105618478 100644 --- a/nipype/interfaces/ants/registration.py +++ b/nipype/interfaces/ants/registration.py @@ -54,7 +54,9 @@ class ANTSInputSpec(ANTSCommandInputSpec): desc='the metric weight(s) for each stage. ' 'The weights must sum to 1 per stage.') - radius = traits.List(traits.Int(), requires=['metric'], mandatory=True, desc='') + radius = traits.List(traits.Int(), requires=['metric'], mandatory=True, + desc='radius of the region (i.e. number of layers around a voxel point)' + ' that is used for computing cross correlation') output_transform_prefix = Str('out', usedefault=True, argstr='--output-naming %s', mandatory=True, desc='') From 222b15ff29bfdafc352e555f47600a43e829e197 Mon Sep 17 00:00:00 2001 From: jakubk Date: Mon, 6 Nov 2017 15:48:49 -0500 Subject: [PATCH 455/643] add: cli to generate dockerfiles --- Makefile | 14 ++++- docker/generate_dockerfiles.sh | 102 +++++++++++++++++++++++++++------ 2 files changed, 95 insertions(+), 21 deletions(-) diff --git a/Makefile b/Makefile index 31f67bf500..0e1e927232 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ PYTHON ?= python NOSETESTS=`which nosetests` -.PHONY: zipdoc sdist egg upload_to_pypi trailing-spaces clean-pyc clean-so clean-build clean-ctags clean in inplace test-code test-coverage test html specs check-before-commit check +.PHONY: zipdoc sdist egg upload_to_pypi trailing-spaces clean-pyc clean-so clean-build clean-ctags clean in inplace test-code test-coverage test html specs check-before-commit check gen-base-dockerfile gen-main-dockerfile gen-dockerfiles zipdoc: html zip documentation.zip doc/_build/html @@ -61,7 +61,7 @@ test-code: in test-coverage: clean-tests in py.test --doctest-modules --cov-config .coveragerc --cov=nipype nipype - + test: tests # just another name tests: clean test-code @@ -79,3 +79,13 @@ check-before-commit: specs trailing-spaces html test @echo "built docs" @echo "ran test" @echo "generated spec tests" + +gen-base-dockerfile: + @echo "Generating base Dockerfile" + bash docker/generate_dockerfiles.sh -b + +gen-main-dockerfile: + @echo "Generating main Dockerfile" + bash docker/generate_dockerfiles.sh -m + +gen-dockerfiles: gen-base-dockerfile gen-main-dockerfile diff --git a/docker/generate_dockerfiles.sh b/docker/generate_dockerfiles.sh index 07e1aa3774..cec0f19f80 100755 --- a/docker/generate_dockerfiles.sh +++ b/docker/generate_dockerfiles.sh @@ -1,32 +1,81 @@ - #!/usr/bin/env bash +#!/usr/bin/env bash +# +# Generate base and main Dockerfiles for Nipype. + +set -e + +USAGE="usage: $(basename $0) [-h] [-b] [-m]" + +function Help { + cat <&2 + exit 1 + ;; + esac +done + + +# neurodocker version 0.3.1-19-g8d02eb4 +NEURODOCKER_IMAGE="kaczmarj/neurodocker@sha256:6b5f92f413b9710b7581e62293a8f74438b14ce7e4ab1ce68db2a09f7c64375a" + +# neurodebian:stretch-non-free pulled on November 3, 2017 +BASE_IMAGE="neurodebian@sha256:7590552afd0e7a481a33314724ae27f76ccedd05ffd7ac06ec38638872427b9b" -# kaczmarj/neurodocker:master pulled on September 13, 2017. -NEURODOCKER_IMAGE="kaczmarj/neurodocker:master" -# neurodebian/stretch-non-free:latest pulled on September 13, 2017. -BASE_IMAGE="neurodebian@sha256:b09c09faa34bca0ea096b9360ee5121e048594cb8e2d7744d7d546ade88a2996" NIPYPE_BASE_IMAGE="kaczmarj/nipype:base" PKG_MANAGER="apt" - -# Save Dockerfiles relative to this path so that this script can be run from -# any directory. https://stackoverflow.com/a/246128/5666087 DIR="$(dirname "$0")" - function generate_base_dockerfile() { docker run --rm "$NEURODOCKER_IMAGE" generate \ --base "$BASE_IMAGE" --pkg-manager "$PKG_MANAGER" \ --label maintainer="The nipype developers https://github.com/nipy/nipype" \ --spm version=12 matlab_version=R2017a \ - --afni version=latest \ + --afni version=latest install_python2=true \ --freesurfer version=6.0.0 min=true \ --run 'echo "cHJpbnRmICJrcnp5c3p0b2YuZ29yZ29sZXdza2lAZ21haWwuY29tXG41MTcyXG4gKkN2dW12RVYzelRmZ1xuRlM1Si8yYzFhZ2c0RVxuIiA+IC9vcHQvZnJlZXN1cmZlci9saWNlbnNlLnR4dAo=" | base64 -d | sh' \ - --install ants apt-utils bzip2 file fsl-core fsl-mni152-templates \ + --install ants apt-utils bzip2 convert3d file fsl-core fsl-mni152-templates \ fusefat g++ git graphviz make ruby unzip xvfb \ --add-to-entrypoint "source /etc/fsl/fsl.sh" \ --env ANTSPATH='/usr/lib/ants' PATH='/usr/lib/ants:$PATH' \ - --c3d version=1.0.0 \ - --instruction "RUN gem install fakes3" \ - --workdir /work \ + --run "gem install fakes3" \ --no-check-urls > "$DIR/Dockerfile.base" } @@ -45,12 +94,17 @@ function generate_main_dockerfile() { --env MKL_NUM_THREADS=1 OMP_NUM_THREADS=1 \ --user neuro \ --miniconda env_name=neuro \ - add_to_path=true \ + activate=true \ --copy docker/files/run_builddocs.sh docker/files/run_examples.sh \ docker/files/run_pytests.sh nipype/external/fsl_imglob.py /usr/bin/ \ --copy . /src/nipype \ --user root \ - --run "chmod 777 -R /src/nipype" \ + --run 'chown -R neuro /src +&& chmod +x /usr/bin/fsl_imglob.py /usr/bin/run_*.sh +&& . /etc/fsl/fsl.sh +&& ln -sf /usr/bin/fsl_imglob.py ${FSLDIR}/bin/imglob +&& mkdir /work +&& chown neuro /work' \ --user neuro \ --arg PYTHON_VERSION_MAJOR=3 PYTHON_VERSION_MINOR=6 BUILD_DATE VCS_REF VERSION \ --miniconda env_name=neuro \ @@ -59,6 +113,12 @@ function generate_main_dockerfile() { pandas psutil scikit-learn scipy traits=4.6.0' \ pip_opts="-e" \ pip_install="/src/nipype[all]" \ + --run-bash "mkdir -p /src/pybids + && curl -sSL --retry 5 https://github.com/INCF/pybids/tarball/master + | tar -xz -C /src/pybids --strip-components 1 + && source activate neuro + && pip install --no-cache-dir -e /src/pybids" \ + --workdir /work \ --label org.label-schema.build-date='$BUILD_DATE' \ org.label-schema.name="NIPYPE" \ org.label-schema.description="NIPYPE - Neuroimaging in Python: Pipelines and Interfaces" \ @@ -67,9 +127,13 @@ function generate_main_dockerfile() { org.label-schema.vcs-url="https://github.com/nipy/nipype" \ org.label-schema.version='$VERSION' \ org.label-schema.schema-version="1.0" \ - --no-check-urls > "$DIR/../Dockerfile" + --no-check-urls } -generate_base_dockerfile -generate_main_dockerfile +if [ "$GENERATE_BASE" == 1 ]; then + generate_base_dockerfile > "$DIR/Dockerfile.base" +fi +if [ "$GENERATE_MAIN" == 1 ]; then + generate_main_dockerfile > "$DIR/../Dockerfile" +fi From 3b81bcd838672c4a3a06bcb8f91cee62f0aa8d6f Mon Sep 17 00:00:00 2001 From: jakubk Date: Mon, 6 Nov 2017 15:49:23 -0500 Subject: [PATCH 456/643] Change default TESTPATH to /src/nipype/nipype from /src/nipype --- docker/files/run_pytests.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docker/files/run_pytests.sh b/docker/files/run_pytests.sh index 19b6fcab87..76935b42f8 100644 --- a/docker/files/run_pytests.sh +++ b/docker/files/run_pytests.sh @@ -4,7 +4,7 @@ set -x set -u -TESTPATH=${1:-/src/nipype/} +TESTPATH=${1:-/src/nipype/nipype} WORKDIR=${WORK:-/work} PYTHON_VERSION=$( python -c "import sys; print('{}{}'.format(sys.version_info[0], sys.version_info[1]))" ) @@ -34,4 +34,3 @@ find ${WORKDIR} -maxdepth 1 -name "crash-*" -exec mv {} ${WORKDIR}/crashfiles/ \ echo "Unit tests finished with exit code ${exit_code}" exit ${exit_code} - From 86d70f50feaf2c7809905209f47d22bfee2f57f5 Mon Sep 17 00:00:00 2001 From: jakubk Date: Mon, 6 Nov 2017 16:06:16 -0500 Subject: [PATCH 457/643] enh: use svg travis shield + rm whitespace --- README.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 85d34a704d..8831d11b2e 100644 --- a/README.rst +++ b/README.rst @@ -2,7 +2,7 @@ NIPYPE: Neuroimaging in Python: Pipelines and Interfaces ======================================================== -.. image:: https://travis-ci.org/nipy/nipype.png?branch=master +.. image:: https://travis-ci.org/nipy/nipype.svg?branch=master :target: https://travis-ci.org/nipy/nipype .. image:: https://circleci.com/gh/nipy/nipype/tree/master.svg?style=svg @@ -94,4 +94,3 @@ Contributing to the project --------------------------- If you'd like to contribute to the project please read our `guidelines `_. Please also read through our `code of conduct `_. - From 2d15a1ea0d4fd954218d4dca9b5e98ad981ba4b7 Mon Sep 17 00:00:00 2001 From: jakubk Date: Mon, 6 Nov 2017 16:06:41 -0500 Subject: [PATCH 458/643] update circleci config.yml - install dependency codecov - update nipype/info.py if CIRCLE_TAG is set - retry docker image builds - download test data - fix workdir permission denied issue - save all docker images to single tarball - pipe dockerhub password to `docker login` - push all docker images to docker hub on success --- .circleci/config.yml | 157 +++++++++++++++++++++++++++---------------- 1 file changed, 99 insertions(+), 58 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d0c9099617..5734e2274b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,37 +1,22 @@ -# Examples: -# https://github.com/circleci/frontend/blob/master/.circleci/config.yml -# -# Questions -# --------- -# 1. Regarding the cache: what if the base Dockerfile is reverted to a previous -# version? The cache for that Dockerfile will exist, so it will pull the -# image, which is incorrect. Include a note in generate_dockerfiles.sh to -# increase the version of the cache. - version: 2 jobs: compare_base_dockerfiles: docker: - - image: docker:17.06.2-ce-git # shell is /bin/ash (bash not available) + - image: docker:17.09.0-ce-git steps: - checkout: path: /home/circleci/nipype - run: name: Prune base Dockerfile in preparation for cache check + working_directory: /home/circleci/nipype/docker command: | mkdir -p /tmp/docker - - # Remove empty lines, comments, and the timestamp from the base - # Dockerfile. Use the sha256 sum of this pruned Dockerfile as the - # cache key. - sed -e '/\s*#.*$/d' \ - -e '/^\s*$/d' \ - -e '/generation_timestamp/d' \ - /home/circleci/nipype/docker/Dockerfile.base \ - > /tmp/docker/Dockerfile.base-pruned + # Use the sha256 sum of the pruned Dockerfile as the cache key. + ash prune_dockerfile.sh Dockerfile.base > /tmp/docker/Dockerfile.base-pruned - restore_cache: - key: dftest-v4-master-{{ checksum "/tmp/docker/Dockerfile.base-pruned" }} + # TODO: change this to 'master' after we are sure this works. + key: dftest-v5-enh/circleci-neurodocker-{{ checksum "/tmp/docker/Dockerfile.base-pruned" }} - run: name: Determine how to get base image command: | @@ -39,11 +24,11 @@ jobs: # This directory comes from the cache. if [ -d /cache/base-dockerfile ]; then - echo 'echo Pulling base image ...' > "$GET_BASE" - echo 'docker pull kaczmarj/nipype:base' >> "$GET_BASE" + echo "echo Pulling base image ..." > "$GET_BASE" + echo "docker pull kaczmarj/nipype:base" >> "$GET_BASE" else - echo 'echo Building base image ...' > "$GET_BASE" - echo 'docker build -t kaczmarj/nipype:base - < /home/circleci/nipype/docker/Dockerfile.base' >> "$GET_BASE" + echo "echo Building base image ..." > "$GET_BASE" + echo "docker build -t kaczmarj/nipype:base - < /home/circleci/nipype/docker/Dockerfile.base" >> "$GET_BASE" fi - persist_to_workspace: root: /tmp @@ -52,8 +37,7 @@ jobs: build_and_test: - parallelism: 1 - # Ideally, we could test inside the main docker image. + parallelism: 4 machine: # Ubuntu 14.04 with Docker 17.03.0-ce image: circleci/classic:201703-01 @@ -62,48 +46,92 @@ jobs: path: /home/circleci/nipype - attach_workspace: at: /tmp + - run: + name: Get test dependencies + command: | + pip install --no-cache-dir codecov + - run: + name: Modify Nipype version if necessary + working_directory: /home/circleci/nipype + command: | + if [ "$CIRCLE_TAG" != "" ]; then + sed -i -E "s/(__version__ = )'[A-Za-z0-9.-]+'/\1'$CIRCLE_TAG'/" nipype/info.py + fi - run: name: Get base image (pull or build) no_output_timeout: 60m + # TODO: remove `docker pull` once once caching works. command: | - bash /tmp/docker/get_base_image.sh + # bash /tmp/docker/get_base_image.sh + docker pull kaczmarj/nipype:base - run: - name: Build main image (latest & py36) + name: Build main image (py36) no_output_timeout: 60m + working_directory: /home/circleci/nipype command: | - cd /home/circleci/nipype - - docker build --rm=false \ - --tag kaczmarj/nipype:latest \ - --tag kaczmarj/nipype:py36 \ - --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \ - --build-arg VCS_REF=`git rev-parse --short HEAD` \ - --build-arg VERSION=$CIRCLE_TAG . + e=1 && for i in {1..5}; do + docker build \ + --rm=false \ + --tag kaczmarj/nipype:latest \ + --tag kaczmarj/nipype:py36 \ + --build-arg BUILD_DATE="$(date -u +"%Y-%m-%dT%H:%M:%SZ")" \ + --build-arg VCS_REF="$(git rev-parse --short HEAD)" \ + --build-arg VERSION="${CIRCLE_TAG}" /home/circleci/nipype \ + && e=0 && break || sleep 15 + done && [ "$e" -eq "0" ] - run: name: Build main image (py27) no_output_timeout: 60m + working_directory: /home/circleci/nipype command: | - cd /home/circleci/nipype + e=1 && for i in {1..5}; do + docker build \ + --rm=false \ + --tag kaczmarj/nipype:py27 \ + --build-arg PYTHON_VERSION_MAJOR=2 \ + --build-arg PYTHON_VERSION_MINOR=7 \ + --build-arg BUILD_DATE="$(date -u +"%Y-%m-%dT%H:%M:%SZ")" \ + --build-arg VCS_REF="$(git rev-parse --short HEAD)" \ + --build-arg VERSION="${CIRCLE_TAG}-py27" /home/circleci/nipype \ + && e=0 && break || sleep 15 + done && [ "$e" -eq "0" ] + - run: + name: Download test data + no_output_timeout: 20m + working_directory: /home/circleci/examples + environment: + OSF_NIPYPE_URL: "https://files.osf.io/v1/resources/nefdp/providers/osfstorage" + command: | + export DATA_NIPYPE_TUTORIAL_URL="${OSF_NIPYPE_URL}/57f4739cb83f6901ed94bf21" + curl -sSL --retry 5 --connect-timeout 15 "$DATA_NIPYPE_TUTORIAL_URL" | tar xj + + export DATA_NIPYPE_FSL_COURSE="${OSF_NIPYPE_URL}/57f472cf9ad5a101f977ecfe" + curl -sSL --retry 5 --connect-timeout 15 "$DATA_NIPYPE_FSL_COURSE" | tar xz - docker build --rm=false \ - --tag kaczmarj/nipype:py27 \ - --build-arg PYTHON_VERSION_MAJOR=2 \ - --build-arg PYTHON_VERSION_MINOR=7 \ - --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \ - --build-arg VCS_REF=`git rev-parse --short HEAD` \ - --build-arg VERSION=$CIRCLE_TAG-py27 /home/circleci/nipype + export DATA_NIPYPE_FSL_FEEDS="${OSF_NIPYPE_URL}/57f473066c613b01f113e7af" + curl -sSL --retry 5 --connect-timeout 15 "$DATA_NIPYPE_FSL_FEEDS" | tar xz - run: name: Run tests + no_output_timeout: 4h + environment: + WORKDIR: /home/circleci/work command: | - echo "This is node $CIRCLE_NODE_INDEX" - echo "No tests to run yet." + mkdir -p "$WORKDIR" + chmod -R 777 "$WORKDIR" + bash /home/circleci/nipype/.circleci/tests.sh + - store_artifacts: + path: /home/circleci/work/tests - run: name: Save Docker images to workspace no_output_timeout: 60m command: | if [ "$CIRCLE_NODE_INDEX" -eq "0" ]; then echo "Saving Docker images to tar.gz files ..." - docker save kaczmarj/nipype:latest kaczmarj/nipype:py36 | gzip > /tmp/docker/nipype-latest-py36.tar.gz + docker save kaczmarj/nipype:base \ + kaczmarj/nipype:latest \ + kaczmarj/nipype:py36 \ + kaczmarj/nipype:py27 > /tmp/docker/nipype-base-latest-py36-py27.tar + echo "$(du -h /tmp/docker/nipype-base-latest-py36-py27.tar)" fi - persist_to_workspace: root: /tmp @@ -113,7 +141,7 @@ jobs: deploy: docker: - - image: docker:17.06.2-ce-git + - image: docker:17.09.0-ce-git steps: - checkout - setup_remote_docker @@ -123,18 +151,27 @@ jobs: name: Load saved Docker images. no_output_timeout: 60m command: | - docker load < /tmp/docker/nipype-latest-py36.tar.gz + docker load < /tmp/docker/nipype-base-latest-py36-py27.tar - run: name: Push to DockerHub - no_output_timeout: 60m + no_output_timeout: 120m command: | - if [ "${CIRCLE_BRANCH}" == "enh/circleci-neurodocker" ]; then - docker login -u $DOCKER_USER -p $DOCKER_PASS - docker push kaczmarj/nipype:latest - docker push kaczmarj/nipype:py36 - fi -# TODO: write pruned Dockerfile to cache here. Make a shell script that will -# prune Dockerfiles + echo "$DOCKER_PASS" | docker login -u "$DOCKER_USER" --password-stdin + docker push kaczmarj/nipype:base + docker push kaczmarj/nipype:latest + docker push kaczmarj/nipype:py36 + docker push kaczmarj/nipype:py27 + - run: + name: Prune base Dockerfile to update cache + command: | + cd /home/circleci/nipype/docker + # Use the sha256 sum of the pruned Dockerfile as the cache key. + ash prune_dockerfile.sh Dockerfile.base > /tmp/docker/Dockerfile.base-pruned + - save_cache: + paths: + - /tmp/docker/Dockerfile.base-pruned + key: dftest-v5-{{ .Branch }}-{{ checksum "/tmp/docker/Dockerfile.base-pruned" }} + workflows: version: 2 @@ -145,5 +182,9 @@ workflows: requires: - compare_base_dockerfiles - deploy: + filters: + branches: + # TODO: change this to master after we are sure this works. + only: enh/circleci-neurodocker requires: - build_and_test From 70cf23074af279a07192dde6e453386f2bd33e8f Mon Sep 17 00:00:00 2001 From: jakubk Date: Mon, 6 Nov 2017 16:13:16 -0500 Subject: [PATCH 459/643] add: file to prune dockerfiles Use this file to prune Dockerfiles before getting their hash. - remove empty lines, comments, and timestamp --- docker/prune_dockerfile.sh | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 docker/prune_dockerfile.sh diff --git a/docker/prune_dockerfile.sh b/docker/prune_dockerfile.sh new file mode 100644 index 0000000000..e6b05ebbcf --- /dev/null +++ b/docker/prune_dockerfile.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +if [ -z "$1" ]; then + echo "Usage: $(basename $0) " + exit 1 +fi + +# Remove empty lines, comments, and timestamp. +sed -e '/\s*#.*$/d' -e '/^\s*$/d' -e '/generation_timestamp/d' "$1" From 1a2a3c446ac1ecf231b87a9bc6f83fb00a0f6e20 Mon Sep 17 00:00:00 2001 From: jakubk Date: Mon, 6 Nov 2017 16:15:37 -0500 Subject: [PATCH 460/643] regenerate dockerfiles --- Dockerfile | 41 +++++++++++++++++++++++-------- docker/Dockerfile.base | 45 ++++++++++------------------------ docker/generate_dockerfiles.sh | 7 ------ 3 files changed, 44 insertions(+), 49 deletions(-) diff --git a/Dockerfile b/Dockerfile index 073185f1cc..9ea5e11017 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,11 @@ -# Generated by Neurodocker v0.3.1-2-g4dfcf56. +# Generated by Neurodocker v0.3.1-19-g8d02eb4. # # Thank you for using Neurodocker. If you discover any issues # or ways to improve this software, please submit an issue or # pull request on our GitHub repository: # https://github.com/kaczmarj/neurodocker # -# Timestamp: 2017-10-02 22:55:57 +# Timestamp: 2017-11-06 21:15:09 FROM kaczmarj/nipype:base @@ -54,15 +54,14 @@ RUN echo "Downloading Miniconda installer ..." \ && conda config --system --prepend channels conda-forge \ && conda config --system --set auto_update_conda false \ && conda config --system --set show_channel_urls true \ - && conda update -y -q --all && sync \ && conda clean -tipsy && sync #------------------------- # Create conda environment #------------------------- RUN conda create -y -q --name neuro \ - && sync && conda clean -tipsy && sync -ENV PATH=/opt/conda/envs/neuro/bin:$PATH + && sync && conda clean -tipsy && sync \ + && sed -i '$isource activate neuro' $ND_ENTRYPOINT COPY ["docker/files/run_builddocs.sh", "docker/files/run_examples.sh", "docker/files/run_pytests.sh", "nipype/external/fsl_imglob.py", "/usr/bin/"] @@ -71,7 +70,12 @@ COPY [".", "/src/nipype"] USER root # User-defined instruction -RUN chmod 777 -R /src/nipype +RUN chown -R neuro /src \ + && chmod +x /usr/bin/fsl_imglob.py /usr/bin/run_*.sh \ + && . /etc/fsl/fsl.sh \ + && ln -sf /usr/bin/fsl_imglob.py ${FSLDIR}/bin/imglob \ + && mkdir /work \ + && chown neuro /work USER neuro @@ -101,6 +105,15 @@ RUN conda install -y -q --name neuro python=${PYTHON_VERSION_MAJOR}.${PYTHON_VER && pip install -q --no-cache-dir -e /src/nipype[all]" \ && sync +# User-defined BASH instruction +RUN bash -c "mkdir -p /src/pybids \ + && curl -sSL --retry 5 https://github.com/INCF/pybids/tarball/master \ + | tar -xz -C /src/pybids --strip-components 1 \ + && source activate neuro \ + && pip install --no-cache-dir -e /src/pybids" + +WORKDIR /work + LABEL org.label-schema.build-date="$BUILD_DATE" \ org.label-schema.name="NIPYPE" \ org.label-schema.description="NIPYPE - Neuroimaging in Python: Pipelines and Interfaces" \ @@ -142,7 +155,7 @@ RUN echo '{ \ \n "miniconda", \ \n { \ \n "env_name": "neuro", \ - \n "add_to_path": true \ + \n "activate": "true" \ \n } \ \n ], \ \n [ \ @@ -168,7 +181,7 @@ RUN echo '{ \ \n ], \ \n [ \ \n "run", \ - \n "chmod 777 -R /src/nipype" \ + \n "chown -R neuro /src\\n&& chmod +x /usr/bin/fsl_imglob.py /usr/bin/run_*.sh\\n&& . /etc/fsl/fsl.sh\\n&& ln -sf /usr/bin/fsl_imglob.py ${FSLDIR}/bin/imglob\\n&& mkdir /work\\n&& chown neuro /work" \ \n ], \ \n [ \ \n "user", \ @@ -194,6 +207,14 @@ RUN echo '{ \ \n } \ \n ], \ \n [ \ + \n "run_bash", \ + \n "mkdir -p /src/pybids\\n && curl -sSL --retry 5 https://github.com/INCF/pybids/tarball/master\\n | tar -xz -C /src/pybids --strip-components 1\\n && source activate neuro\\n && pip install --no-cache-dir -e /src/pybids" \ + \n ], \ + \n [ \ + \n "workdir", \ + \n "/work" \ + \n ], \ + \n [ \ \n "label", \ \n { \ \n "org.label-schema.build-date": "$BUILD_DATE", \ @@ -207,6 +228,6 @@ RUN echo '{ \ \n } \ \n ] \ \n ], \ - \n "generation_timestamp": "2017-10-02 22:55:57", \ - \n "neurodocker_version": "0.3.1-2-g4dfcf56" \ + \n "generation_timestamp": "2017-11-06 21:15:09", \ + \n "neurodocker_version": "0.3.1-19-g8d02eb4" \ \n}' > /neurodocker/neurodocker_specs.json diff --git a/docker/Dockerfile.base b/docker/Dockerfile.base index 5735c04b93..429930ca66 100644 --- a/docker/Dockerfile.base +++ b/docker/Dockerfile.base @@ -1,13 +1,13 @@ -# Generated by Neurodocker v0.3.1-2-g4dfcf56. +# Generated by Neurodocker v0.3.1-19-g8d02eb4. # # Thank you for using Neurodocker. If you discover any issues # or ways to improve this software, please submit an issue or # pull request on our GitHub repository: # https://github.com/kaczmarj/neurodocker # -# Timestamp: 2017-10-02 22:55:55 +# Timestamp: 2017-11-06 21:15:07 -FROM neurodebian@sha256:b09c09faa34bca0ea096b9360ee5121e048594cb8e2d7744d7d546ade88a2996 +FROM neurodebian@sha256:7590552afd0e7a481a33314724ae27f76ccedd05ffd7ac06ec38638872427b9b ARG DEBIAN_FRONTEND=noninteractive @@ -64,7 +64,7 @@ ENV MATLABCMD=/opt/mcr/v92/toolbox/matlab \ #-------------------- ENV PATH=/opt/afni:$PATH RUN apt-get update -qq && apt-get install -yq --no-install-recommends ed gsl-bin libglu1-mesa-dev libglib2.0-0 libglw1-mesa \ - libgomp1 libjpeg62 libxm4 netpbm tcsh xfonts-base xvfb \ + libgomp1 libjpeg62 libxm4 netpbm tcsh xfonts-base xvfb python \ && libs_path=/usr/lib/x86_64-linux-gnu \ && if [ -f $libs_path/libgsl.so.19 ]; then \ ln $libs_path/libgsl.so.19 $libs_path/libgsl.so.0; \ @@ -106,6 +106,7 @@ RUN apt-get update -qq \ && apt-get install -y -q --no-install-recommends ants \ apt-utils \ bzip2 \ + convert3d \ file \ fsl-core \ fsl-mni152-templates \ @@ -126,21 +127,9 @@ RUN sed -i '$isource /etc/fsl/fsl.sh' $ND_ENTRYPOINT ENV ANTSPATH="/usr/lib/ants" \ PATH="/usr/lib/ants:$PATH" -#------------------------ -# Install Convert3D 1.0.0 -#------------------------ -RUN echo "Downloading C3D ..." \ - && mkdir /opt/c3d \ - && curl -sSL --retry 5 https://sourceforge.net/projects/c3d/files/c3d/1.0.0/c3d-1.0.0-Linux-x86_64.tar.gz/download \ - | tar -xzC /opt/c3d --strip-components=1 -ENV C3DPATH=/opt/c3d \ - PATH=/opt/c3d/bin:$PATH - # User-defined instruction RUN gem install fakes3 -WORKDIR /work - #-------------------------------------- # Save container specifications to JSON #-------------------------------------- @@ -150,7 +139,7 @@ RUN echo '{ \ \n "instructions": [ \ \n [ \ \n "base", \ - \n "neurodebian@sha256:b09c09faa34bca0ea096b9360ee5121e048594cb8e2d7744d7d546ade88a2996" \ + \n "neurodebian@sha256:7590552afd0e7a481a33314724ae27f76ccedd05ffd7ac06ec38638872427b9b" \ \n ], \ \n [ \ \n "label", \ @@ -168,7 +157,8 @@ RUN echo '{ \ \n [ \ \n "afni", \ \n { \ - \n "version": "latest" \ + \n "version": "latest", \ + \n "install_python2": "true" \ \n } \ \n ], \ \n [ \ @@ -188,6 +178,7 @@ RUN echo '{ \ \n "ants", \ \n "apt-utils", \ \n "bzip2", \ + \n "convert3d", \ \n "file", \ \n "fsl-core", \ \n "fsl-mni152-templates", \ @@ -215,20 +206,10 @@ RUN echo '{ \ \n } \ \n ], \ \n [ \ - \n "c3d", \ - \n { \ - \n "version": "1.0.0" \ - \n } \ - \n ], \ - \n [ \ - \n "instruction", \ - \n "RUN gem install fakes3" \ - \n ], \ - \n [ \ - \n "workdir", \ - \n "/work" \ + \n "run", \ + \n "gem install fakes3" \ \n ] \ \n ], \ - \n "generation_timestamp": "2017-10-02 22:55:55", \ - \n "neurodocker_version": "0.3.1-2-g4dfcf56" \ + \n "generation_timestamp": "2017-11-06 21:15:07", \ + \n "neurodocker_version": "0.3.1-19-g8d02eb4" \ \n}' > /neurodocker/neurodocker_specs.json diff --git a/docker/generate_dockerfiles.sh b/docker/generate_dockerfiles.sh index cec0f19f80..4478bca4a1 100755 --- a/docker/generate_dockerfiles.sh +++ b/docker/generate_dockerfiles.sh @@ -80,13 +80,6 @@ function generate_base_dockerfile() { } -# The Dockerfile ADD/COPY instructions do not honor the current user, so the -# owner of the directories has to be manually changed to user neuro. -# See https://github.com/moby/moby/issues/6119 for more information on this -# behavior. -# Docker plans on changing this behavior by added a `--chown` flag to the -# ADD/COPY commands. See https://github.com/moby/moby/pull/34263. - function generate_main_dockerfile() { docker run --rm "$NEURODOCKER_IMAGE" generate \ --base "$NIPYPE_BASE_IMAGE" --pkg-manager "$PKG_MANAGER" \ From 9e0571c815b0be5e61f0ba270d4be23ce5695363 Mon Sep 17 00:00:00 2001 From: jakubk Date: Mon, 6 Nov 2017 16:32:36 -0500 Subject: [PATCH 461/643] enh: update codecov call + reformat --- .circleci/tests.sh | 38 +++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/.circleci/tests.sh b/.circleci/tests.sh index 0178ab91dd..0eaffcce93 100644 --- a/.circleci/tests.sh +++ b/.circleci/tests.sh @@ -13,39 +13,43 @@ if [ "${CIRCLE_NODE_TOTAL:-}" != "4" ]; then exit 1 fi -# These tests are manually balanced based on previous build timings. +# TODO: change this image name +DOCKER_IMAGE="kaczmarj/nipype" + +# These tests are manually balanced based on previous build timings. # They may need to be rebalanced in the future. case ${CIRCLE_NODE_INDEX} in 0) - docker run --rm=false -it -e CI_SKIP_TEST=1 -e NIPYPE_RESOURCE_MONITOR=1 -e FSL_COURSE_DATA="/data/examples/nipype-fsl_course_data" -v $HOME/examples:/data/examples:ro -v $WORKDIR:/work -w /work nipype/nipype:py36 /usr/bin/run_pytests.sh && \ - docker run --rm=false -it -e CI_SKIP_TEST=1 -e NIPYPE_RESOURCE_MONITOR=1 -e FSL_COURSE_DATA="/data/examples/nipype-fsl_course_data" -v $HOME/examples:/data/examples:ro -v $WORKDIR:/work -w /work nipype/nipype:py27 /usr/bin/run_pytests.sh && \ - docker run --rm=false -it -v $WORKDIR:/work -w /src/nipype/doc --entrypoint=/usr/bin/run_builddocs.sh nipype/nipype:py36 /usr/bin/run_builddocs.sh && \ - docker run --rm=false -it -v $HOME/examples:/data/examples:ro -v $WORKDIR:/work -w /work nipype/nipype:py36 /usr/bin/run_examples.sh test_spm Linear /data/examples/ workflow3d && \ - docker run --rm=false -it -v $HOME/examples:/data/examples:ro -v $WORKDIR:/work -w /work nipype/nipype:py36 /usr/bin/run_examples.sh test_spm Linear /data/examples/ workflow4d + docker run --rm=false -t -v $WORKDIR:/work -v $HOME/examples:/data/examples:ro -w /work -e CI_SKIP_TEST=1 -e NIPYPE_RESOURCE_MONITOR=1 -e FSL_COURSE_DATA="/data/examples/nipype-fsl_course_data" "${DOCKER_IMAGE}:py36" /usr/bin/run_pytests.sh \ + && docker run --rm=false -t -v $WORKDIR:/work -v $HOME/examples:/data/examples:ro -w /work -e CI_SKIP_TEST=1 -e NIPYPE_RESOURCE_MONITOR=1 -e FSL_COURSE_DATA="/data/examples/nipype-fsl_course_data" "${DOCKER_IMAGE}:py27" /usr/bin/run_pytests.sh \ + && docker run --rm=false -t -v $WORKDIR:/work -v $HOME/examples:/data/examples:ro -w /src/nipype/doc "${DOCKER_IMAGE}:py36" /usr/bin/run_builddocs.sh \ + && docker run --rm=false -t -v $WORKDIR:/work -v $HOME/examples:/data/examples:ro -w /work "${DOCKER_IMAGE}:py36" /usr/bin/run_examples.sh test_spm Linear /data/examples/ workflow3d \ + && docker run --rm=false -t -v $WORKDIR:/work -v $HOME/examples:/data/examples:ro -w /work "${DOCKER_IMAGE}:py36" /usr/bin/run_examples.sh test_spm Linear /data/examples/ workflow4d exitcode=$? ;; 1) - docker run --rm=false -it -v $HOME/examples:/data/examples:ro -v $WORKDIR:/work -w /work nipype/nipype:py36 /usr/bin/run_examples.sh fmri_spm_dartel Linear /data/examples/ level1 && \ - docker run --rm=false -it -v $HOME/examples:/data/examples:ro -v $WORKDIR:/work -w /work nipype/nipype:py36 /usr/bin/run_examples.sh fmri_spm_dartel Linear /data/examples/ l2pipeline + docker run --rm=false -t -v $WORKDIR:/work -v $HOME/examples:/data/examples:ro -w /work "${DOCKER_IMAGE}:py36" /usr/bin/run_examples.sh fmri_spm_dartel Linear /data/examples/ level1 \ + && docker run --rm=false -t -v $WORKDIR:/work -v $HOME/examples:/data/examples:ro -w /work "${DOCKER_IMAGE}:py36" /usr/bin/run_examples.sh fmri_spm_dartel Linear /data/examples/ l2pipeline exitcode=$? ;; 2) - docker run --rm=false -it -e NIPYPE_NUMBER_OF_CPUS=4 -v $HOME/examples:/data/examples:ro -v $WORKDIR:/work -w /work nipype/nipype:py36 /usr/bin/run_examples.sh fmri_spm_nested MultiProc /data/examples/ level1 && \ - docker run --rm=false -it -e NIPYPE_NUMBER_OF_CPUS=4 -e NIPYPE_RESOURCE_MONITOR=1 -v $HOME/examples:/data/examples:ro -v $WORKDIR:/work -w /work nipype/nipype:py27 /usr/bin/run_examples.sh fmri_spm_nested MultiProc /data/examples/ l2pipeline + docker run --rm=false -t -v $WORKDIR:/work -v $HOME/examples:/data/examples:ro -w /work -e NIPYPE_NUMBER_OF_CPUS=4 "${DOCKER_IMAGE}:py36" /usr/bin/run_examples.sh fmri_spm_nested MultiProc /data/examples/ level1 \ + && docker run --rm=false -t -v $WORKDIR:/work -v $HOME/examples:/data/examples:ro -w /work -e NIPYPE_NUMBER_OF_CPUS=4 -e NIPYPE_RESOURCE_MONITOR=1 "${DOCKER_IMAGE}:py27" /usr/bin/run_examples.sh fmri_spm_nested MultiProc /data/examples/ l2pipeline exitcode=$? ;; 3) - docker run --rm=false -it -e NIPYPE_NUMBER_OF_CPUS=4 -v $HOME/examples:/data/examples:ro -v $WORKDIR:/work -w /work nipype/nipype:py36 /usr/bin/run_examples.sh fmri_spm_nested MultiProc /data/examples/ level1 && \ - docker run --rm=false -it -v $HOME/examples:/data/examples:ro -v $WORKDIR:/work -w /work nipype/nipype:py36 /usr/bin/run_examples.sh fmri_fsl_feeds Linear /data/examples/ l1pipeline && \ - docker run --rm=false -it -v $HOME/examples:/data/examples:ro -v $WORKDIR:/work -w /work nipype/nipype:py36 /usr/bin/run_examples.sh fmri_fsl_reuse Linear /data/examples/ level1_workflow + docker run --rm=false -t -v $WORKDIR:/work -v $HOME/examples:/data/examples:ro -w /work -e NIPYPE_NUMBER_OF_CPUS=4 "${DOCKER_IMAGE}:py36" /usr/bin/run_examples.sh fmri_spm_nested MultiProc /data/examples/ level1 \ + && docker run --rm=false -t -v $WORKDIR:/work -v $HOME/examples:/data/examples:ro -w /work "${DOCKER_IMAGE}:py36" /usr/bin/run_examples.sh fmri_fsl_feeds Linear /data/examples/ l1pipeline \ + && docker run --rm=false -t -v $WORKDIR:/work -v $HOME/examples:/data/examples:ro -w /work "${DOCKER_IMAGE}:py36" /usr/bin/run_examples.sh fmri_fsl_reuse Linear /data/examples/ level1_workflow exitcode=$? ;; esac -cp ${WORKDIR}/tests/*.xml ${CIRCLE_TEST_REPORTS}/tests/ - # Exit with error if any of the tests failed if [ "$exitcode" != "0" ]; then exit 1; fi -codecov -f "coverage*.xml" -s "${WORKDIR}/tests/" -R "${HOME}/nipype/" -F unittests -e CIRCLE_NODE_INDEX -codecov -f "smoketest*.xml" -s "${WORKDIR}/tests/" -R "${HOME}/nipype/" -F smoketests -e CIRCLE_NODE_INDEX +codecov --file "${WORKDIR}/tests/coverage*.xml" \ + --root "${HOME}/nipype/" --flags unittests -e CIRCLE_NODE_INDEX + +codecov --file "${WORKDIR}/tests/smoketest*.xml" \ + --root "${HOME}/nipype/" --flags smoketests -e CIRCLE_NODE_INDEX From 97b4048135068b90260caf13f8bea628f97b4f46 Mon Sep 17 00:00:00 2001 From: jakubk Date: Mon, 6 Nov 2017 18:43:34 -0500 Subject: [PATCH 462/643] fix path when updating dockerfile cache --- .circleci/config.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5734e2274b..22ba0bfbd4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -126,12 +126,10 @@ jobs: no_output_timeout: 60m command: | if [ "$CIRCLE_NODE_INDEX" -eq "0" ]; then - echo "Saving Docker images to tar.gz files ..." docker save kaczmarj/nipype:base \ kaczmarj/nipype:latest \ kaczmarj/nipype:py36 \ kaczmarj/nipype:py27 > /tmp/docker/nipype-base-latest-py36-py27.tar - echo "$(du -h /tmp/docker/nipype-base-latest-py36-py27.tar)" fi - persist_to_workspace: root: /tmp @@ -143,7 +141,8 @@ jobs: docker: - image: docker:17.09.0-ce-git steps: - - checkout + - checkout: + path: /home/circleci/nipype - setup_remote_docker - attach_workspace: at: /tmp @@ -163,8 +162,9 @@ jobs: docker push kaczmarj/nipype:py27 - run: name: Prune base Dockerfile to update cache + working_directory: /home/circleci/nipype/docker command: | - cd /home/circleci/nipype/docker + mkdir -p /tmp/docker # Use the sha256 sum of the pruned Dockerfile as the cache key. ash prune_dockerfile.sh Dockerfile.base > /tmp/docker/Dockerfile.base-pruned - save_cache: From 7a721b821786bf6467b6ed52ae83ffb87968d232 Mon Sep 17 00:00:00 2001 From: Dorota Jarecka Date: Tue, 7 Nov 2017 13:04:46 -0500 Subject: [PATCH 463/643] pytest cleaning (#2252) * changing str(tmpdir) to tmpdir.strpath in tests * using tmpdir.join where its possible (nibabel doesnt like py.path.local) * using tmpdir.join().strpath in tests with nibabel or other funcions that dont take path.local * moving doctest ALLOW_UNICODE to pytest.ini, so doesnt have to be included in the docstrings * fixin one test * Revert "moving doctest ALLOW_UNICODE to pytest.ini, so doesnt have to be included in the docstrings" This reverts commit 952fdc93ab6bc32f1aad135e04948c7e614ba311. My script removed to many things from doctest, will update it. * moving doctest ALLOW_UNICODE and NORMALIZE_WHITESPACE to pytest.ini, so doesnt have to be included in the docstrings * moving to temporary directories, so tests can be run in readonly; adding conftest.py with datadir variable and some basic libraries (so you dont have to import them in doctests) * removing almost all reminders of tempfile package, one test doesn work(TODO) * more cleaning: mostly moving to tmpdir.chdir and tmpdir.check * small fix * small fix * changing 4 more tests to avoid errors on read-only * changing crashfile dir in one test to avoid read-only problems * fixing the DataSink test so it doesnt go to recursive loop (problem related to tmpdir that is the same in fixtures and test functions, DataSInk was trying copy dir to subdir etc.) * adding testsetup directives to remove some parts from documentation --- conftest.py | 12 +++ nipype/algorithms/tests/test_compcor.py | 3 +- nipype/algorithms/tests/test_confounds.py | 7 +- nipype/algorithms/tests/test_errormap.py | 23 +++-- nipype/algorithms/tests/test_mesh_ops.py | 15 ++- nipype/algorithms/tests/test_modelgen.py | 17 ++-- nipype/algorithms/tests/test_moments.py | 22 ++--- .../algorithms/tests/test_normalize_tpms.py | 5 +- nipype/algorithms/tests/test_overlap.py | 2 +- nipype/algorithms/tests/test_splitmerge.py | 4 +- nipype/algorithms/tests/test_tsnr.py | 3 +- nipype/caching/tests/test_memory.py | 2 +- nipype/interfaces/afni/model.py | 6 +- nipype/interfaces/afni/preprocess.py | 86 ++++++++--------- nipype/interfaces/afni/utils.py | 74 +++++++-------- nipype/interfaces/ants/legacy.py | 4 +- nipype/interfaces/ants/registration.py | 38 ++++---- nipype/interfaces/ants/resampling.py | 14 +-- nipype/interfaces/ants/segmentation.py | 40 ++++---- nipype/interfaces/ants/utils.py | 12 +-- nipype/interfaces/ants/visualization.py | 4 +- nipype/interfaces/base.py | 41 +++++--- nipype/interfaces/bru2nii.py | 2 +- nipype/interfaces/c3.py | 2 +- nipype/interfaces/cmtk/tests/test_nbs.py | 5 +- nipype/interfaces/dcm2nii.py | 20 +++- nipype/interfaces/elastix/registration.py | 8 +- nipype/interfaces/freesurfer/longitudinal.py | 10 +- nipype/interfaces/freesurfer/model.py | 22 ++--- nipype/interfaces/freesurfer/preprocess.py | 62 ++++++------- nipype/interfaces/freesurfer/registration.py | 14 +-- .../interfaces/freesurfer/tests/test_model.py | 20 ++-- nipype/interfaces/freesurfer/utils.py | 54 +++++------ nipype/interfaces/fsl/aroma.py | 2 +- nipype/interfaces/fsl/dti.py | 14 +-- nipype/interfaces/fsl/epi.py | 18 ++-- nipype/interfaces/fsl/maths.py | 2 +- nipype/interfaces/fsl/model.py | 14 +-- nipype/interfaces/fsl/possum.py | 2 +- nipype/interfaces/fsl/preprocess.py | 14 +-- .../fsl/tests/test_Level1Design_functions.py | 3 +- nipype/interfaces/fsl/tests/test_model.py | 6 +- .../interfaces/fsl/tests/test_preprocess.py | 45 +++++---- nipype/interfaces/fsl/tests/test_utils.py | 2 - nipype/interfaces/fsl/utils.py | 24 ++--- nipype/interfaces/io.py | 18 +++- nipype/interfaces/meshfix.py | 2 +- nipype/interfaces/minc/base.py | 4 +- nipype/interfaces/mne/base.py | 2 +- nipype/interfaces/mrtrix/preprocess.py | 2 +- nipype/interfaces/mrtrix/tracking.py | 2 +- nipype/interfaces/mrtrix3/connectivity.py | 4 +- nipype/interfaces/mrtrix3/preprocess.py | 6 +- nipype/interfaces/mrtrix3/reconst.py | 4 +- nipype/interfaces/mrtrix3/tracking.py | 2 +- nipype/interfaces/mrtrix3/utils.py | 12 +-- nipype/interfaces/niftyfit/asl.py | 2 +- nipype/interfaces/niftyfit/dwi.py | 4 +- nipype/interfaces/niftyfit/qt1.py | 2 +- nipype/interfaces/niftyreg/reg.py | 4 +- nipype/interfaces/niftyreg/regutils.py | 24 +++-- nipype/interfaces/niftyseg/em.py | 2 +- nipype/interfaces/niftyseg/label_fusion.py | 4 +- nipype/interfaces/niftyseg/lesions.py | 2 +- nipype/interfaces/niftyseg/maths.py | 32 +++---- nipype/interfaces/niftyseg/patchmatch.py | 2 +- nipype/interfaces/niftyseg/stats.py | 12 +-- nipype/interfaces/nitime/tests/test_nitime.py | 3 +- nipype/interfaces/quickshear.py | 2 +- nipype/interfaces/slicer/generate_classes.py | 4 +- nipype/interfaces/tests/test_base.py | 12 +-- nipype/interfaces/tests/test_io.py | 57 ++++++------ nipype/interfaces/tests/test_matlab.py | 15 +-- nipype/interfaces/tests/test_nilearn.py | 18 ++-- nipype/interfaces/utility/base.py | 20 ++-- nipype/interfaces/utility/tests/test_base.py | 10 +- nipype/interfaces/utility/tests/test_csv.py | 2 +- .../interfaces/utility/tests/test_wrappers.py | 12 +-- nipype/interfaces/utility/wrappers.py | 15 +-- nipype/interfaces/vista/vista.py | 4 +- nipype/pipeline/engine/nodes.py | 2 +- nipype/pipeline/engine/tests/test_engine.py | 2 +- nipype/pipeline/engine/tests/test_join.py | 28 +++--- nipype/pipeline/engine/tests/test_utils.py | 93 ++++++++----------- nipype/pipeline/plugins/sge.py | 4 +- .../pipeline/plugins/tests/test_callback.py | 6 +- nipype/pipeline/plugins/tests/test_debug.py | 2 +- nipype/pipeline/plugins/tests/test_linear.py | 2 +- .../pipeline/plugins/tests/test_somaflow.py | 2 +- nipype/testing/fixtures.py | 54 +++++------ nipype/testing/tests/test_utils.py | 4 +- nipype/utils/filemanip.py | 10 +- nipype/utils/tests/test_filemanip.py | 17 ++-- nipype/utils/tests/test_provenance.py | 6 +- nipype/workflows/dmri/fsl/tests/test_dti.py | 7 +- nipype/workflows/dmri/fsl/tests/test_epi.py | 7 +- nipype/workflows/dmri/fsl/tests/test_tbss.py | 4 +- .../rsfmri/fsl/tests/test_resting.py | 2 +- pytest.ini | 3 +- tools/apigen.py | 6 +- tools/interfacedocgen.py | 6 +- 101 files changed, 687 insertions(+), 701 deletions(-) create mode 100644 conftest.py diff --git a/conftest.py b/conftest.py new file mode 100644 index 0000000000..f2d52f5f85 --- /dev/null +++ b/conftest.py @@ -0,0 +1,12 @@ +import pytest +import numpy, os + +@pytest.fixture(autouse=True) +def add_np(doctest_namespace): + doctest_namespace['np'] = numpy + doctest_namespace['os'] = os + + + filepath = os.path.dirname(os.path.realpath(__file__)) + datadir = os.path.realpath(os.path.join(filepath, 'nipype/testing/data')) + doctest_namespace["datadir"] = datadir diff --git a/nipype/algorithms/tests/test_compcor.py b/nipype/algorithms/tests/test_compcor.py index a458e8a0a6..9407e6ef0d 100644 --- a/nipype/algorithms/tests/test_compcor.py +++ b/nipype/algorithms/tests/test_compcor.py @@ -21,8 +21,7 @@ class TestCompCor(): @pytest.fixture(autouse=True) def setup_class(self, tmpdir): # setup - self.temp_dir = str(tmpdir) - os.chdir(self.temp_dir) + tmpdir.chdir() noise = np.fromfunction(self.fake_noise_fun, self.fake_data.shape) self.realigned_file = utils.save_toy_nii(self.fake_data + noise, self.filenames['functionalnii']) diff --git a/nipype/algorithms/tests/test_confounds.py b/nipype/algorithms/tests/test_confounds.py index 7d6eff1283..8c2626457e 100644 --- a/nipype/algorithms/tests/test_confounds.py +++ b/nipype/algorithms/tests/test_confounds.py @@ -20,7 +20,7 @@ def test_fd(tmpdir): - tempdir = str(tmpdir) + tempdir = tmpdir.strpath ground_truth = np.loadtxt(example_data('fsl_motion_outliers_fd.txt')) fdisplacement = FramewiseDisplacement(in_file=example_data('fsl_mcflirt_movpar.txt'), out_file=tempdir + '/fd.txt', @@ -43,7 +43,7 @@ def test_dvars(tmpdir): in_mask=example_data('ds003_sub-01_mc_brainmask.nii.gz'), save_all=True, intensity_normalization=0) - os.chdir(str(tmpdir)) + tmpdir.chdir() res = dvars.run() dv1 = np.loadtxt(res.outputs.out_all, skiprows=1) @@ -66,7 +66,8 @@ def test_dvars(tmpdir): assert (np.abs(dv1[:, 2] - ground_truth[:, 2]).sum() / len(dv1)) < 0.05 -def test_outliers(tmpdir): + +def test_outliers(): np.random.seed(0) in_data = np.random.randn(100) in_data[0] += 10 diff --git a/nipype/algorithms/tests/test_errormap.py b/nipype/algorithms/tests/test_errormap.py index a700725e41..4b40d14907 100644 --- a/nipype/algorithms/tests/test_errormap.py +++ b/nipype/algorithms/tests/test_errormap.py @@ -11,7 +11,6 @@ def test_errormap(tmpdir): - tempdir = str(tmpdir) # Single-Spectual # Make two fake 2*2*2 voxel volumes volume1 = np.array([[[2.0, 8.0], [1.0, 2.0]], [[1.0, 9.0], [0.0, 3.0]]]) # John von Neumann's birthday @@ -22,15 +21,15 @@ def test_errormap(tmpdir): img2 = nb.Nifti1Image(volume2, np.eye(4)) maskimg = nb.Nifti1Image(mask, np.eye(4)) - nb.save(img1, os.path.join(tempdir, 'von.nii.gz')) - nb.save(img2, os.path.join(tempdir, 'alan.nii.gz')) - nb.save(maskimg, os.path.join(tempdir, 'mask.nii.gz')) + nb.save(img1, tmpdir.join('von.nii.gz').strpath) + nb.save(img2, tmpdir.join('alan.nii.gz').strpath) + nb.save(maskimg, tmpdir.join('mask.nii.gz').strpath) # Default metric errmap = ErrorMap() - errmap.inputs.in_tst = os.path.join(tempdir, 'von.nii.gz') - errmap.inputs.in_ref = os.path.join(tempdir, 'alan.nii.gz') - errmap.out_map = os.path.join(tempdir, 'out_map.nii.gz') + errmap.inputs.in_tst = tmpdir.join('von.nii.gz').strpath + errmap.inputs.in_ref = tmpdir.join('alan.nii.gz').strpath + errmap.out_map = tmpdir.join('out_map.nii.gz').strpath result = errmap.run() assert result.outputs.distance == 1.125 @@ -45,7 +44,7 @@ def test_errormap(tmpdir): assert result.outputs.distance == 0.875 # Masked - errmap.inputs.mask = os.path.join(tempdir, 'mask.nii.gz') + errmap.inputs.mask = tmpdir.join('mask.nii.gz').strpath result = errmap.run() assert result.outputs.distance == 1.0 @@ -62,11 +61,11 @@ def test_errormap(tmpdir): msvolume2[:, :, :, 1] = volume1 msimg2 = nb.Nifti1Image(msvolume2, np.eye(4)) - nb.save(msimg1, os.path.join(tempdir, 'von-ray.nii.gz')) - nb.save(msimg2, os.path.join(tempdir, 'alan-ray.nii.gz')) + nb.save(msimg1, tmpdir.join('von-ray.nii.gz').strpath) + nb.save(msimg2, tmpdir.join('alan-ray.nii.gz').strpath) - errmap.inputs.in_tst = os.path.join(tempdir, 'von-ray.nii.gz') - errmap.inputs.in_ref = os.path.join(tempdir, 'alan-ray.nii.gz') + errmap.inputs.in_tst = tmpdir.join('von-ray.nii.gz').strpath + errmap.inputs.in_ref = tmpdir.join('alan-ray.nii.gz').strpath errmap.inputs.metric = 'sqeuclidean' result = errmap.run() assert result.outputs.distance == 5.5 diff --git a/nipype/algorithms/tests/test_mesh_ops.py b/nipype/algorithms/tests/test_mesh_ops.py index fa7ebebe54..9d510dee2b 100644 --- a/nipype/algorithms/tests/test_mesh_ops.py +++ b/nipype/algorithms/tests/test_mesh_ops.py @@ -15,14 +15,13 @@ @pytest.mark.skipif(VTKInfo.no_tvtk(), reason="tvtk is not installed") def test_ident_distances(tmpdir): - tempdir = str(tmpdir) - os.chdir(tempdir) + tmpdir.chdir() in_surf = example_data('surf01.vtk') dist_ident = m.ComputeMeshWarp() dist_ident.inputs.surface1 = in_surf dist_ident.inputs.surface2 = in_surf - dist_ident.inputs.out_file = os.path.join(tempdir, 'distance.npy') + dist_ident.inputs.out_file = tmpdir.join('distance.npy') res = dist_ident.run() assert res.outputs.distance == 0.0 @@ -33,11 +32,11 @@ def test_ident_distances(tmpdir): @pytest.mark.skipif(VTKInfo.no_tvtk(), reason="tvtk is not installed") def test_trans_distances(tmpdir): - tempdir = str(tmpdir) + tempdir = tmpdir.strpath from ...interfaces.vtkbase import tvtk in_surf = example_data('surf01.vtk') - warped_surf = os.path.join(tempdir, 'warped.vtk') + warped_surf = tmpdir.join('warped.vtk') inc = np.array([0.7, 0.3, -0.2]) @@ -53,7 +52,7 @@ def test_trans_distances(tmpdir): dist = m.ComputeMeshWarp() dist.inputs.surface1 = in_surf dist.inputs.surface2 = warped_surf - dist.inputs.out_file = os.path.join(tempdir, 'distance.npy') + dist.inputs.out_file = tmpdir.join('distance.npy') res = dist.run() assert np.allclose(res.outputs.distance, np.linalg.norm(inc), 4) dist.inputs.weighting = 'area' @@ -63,14 +62,14 @@ def test_trans_distances(tmpdir): @pytest.mark.skipif(VTKInfo.no_tvtk(), reason="tvtk is not installed") def test_warppoints(tmpdir): - os.chdir(str(tmpdir)) + tmpdir.chdir() # TODO: include regression tests for when tvtk is installed @pytest.mark.skipif(VTKInfo.no_tvtk(), reason="tvtk is not installed") def test_meshwarpmaths(tmpdir): - os.chdir(str(tmpdir)) + tmpdir.chdir() # TODO: include regression tests for when tvtk is installed diff --git a/nipype/algorithms/tests/test_modelgen.py b/nipype/algorithms/tests/test_modelgen.py index cb10304fea..3c9ec4096b 100644 --- a/nipype/algorithms/tests/test_modelgen.py +++ b/nipype/algorithms/tests/test_modelgen.py @@ -17,9 +17,8 @@ def test_modelgen1(tmpdir): - tempdir = str(tmpdir) - filename1 = os.path.join(tempdir, 'test1.nii') - filename2 = os.path.join(tempdir, 'test2.nii') + filename1 = tmpdir.join('test1.nii').strpath + filename2 = tmpdir.join('test2.nii').strpath Nifti1Image(np.random.rand(10, 10, 10, 200), np.eye(4)).to_filename(filename1) Nifti1Image(np.random.rand(10, 10, 10, 200), np.eye(4)).to_filename(filename2) s = SpecifyModel() @@ -56,9 +55,8 @@ def test_modelgen1(tmpdir): def test_modelgen_spm_concat(tmpdir): - tempdir = str(tmpdir) - filename1 = os.path.join(tempdir, 'test1.nii') - filename2 = os.path.join(tempdir, 'test2.nii') + filename1 = tmpdir.join('test1.nii').strpath + filename2 = tmpdir.join('test2.nii').strpath Nifti1Image(np.random.rand(10, 10, 10, 30), np.eye(4)).to_filename(filename1) Nifti1Image(np.random.rand(10, 10, 10, 30), np.eye(4)).to_filename(filename2) @@ -97,7 +95,7 @@ def test_modelgen_spm_concat(tmpdir): npt.assert_almost_equal(np.array(res.outputs.session_info[0]['cond'][0]['onset']), np.array([2.0, 50.0, 100.0, 170.0])) # Test case for variable number of events in separate runs, sometimes unique. - filename3 = os.path.join(tempdir, 'test3.nii') + filename3 = tmpdir.join('test3.nii').strpath Nifti1Image(np.random.rand(10, 10, 10, 30), np.eye(4)).to_filename(filename3) s.inputs.functional_runs = [filename1, filename2, filename3] info = [Bunch(conditions=['cond1', 'cond2'], onsets=[[2, 3], [2]], durations=[[1, 1], [1]]), @@ -122,9 +120,8 @@ def test_modelgen_spm_concat(tmpdir): def test_modelgen_sparse(tmpdir): - tempdir = str(tmpdir) - filename1 = os.path.join(tempdir, 'test1.nii') - filename2 = os.path.join(tempdir, 'test2.nii') + filename1 = tmpdir.join('test1.nii').strpath + filename2 = tmpdir.join('test2.nii').strpath Nifti1Image(np.random.rand(10, 10, 10, 50), np.eye(4)).to_filename(filename1) Nifti1Image(np.random.rand(10, 10, 10, 50), np.eye(4)).to_filename(filename2) s = SpecifySparseModel() diff --git a/nipype/algorithms/tests/test_moments.py b/nipype/algorithms/tests/test_moments.py index 12de44750a..17c8e922b2 100644 --- a/nipype/algorithms/tests/test_moments.py +++ b/nipype/algorithms/tests/test_moments.py @@ -1,10 +1,9 @@ # -*- coding: utf-8 -*- import numpy as np -import tempfile from nipype.algorithms.misc import calc_moments -def test_skew(): +def test_skew(tmpdir): data = """14.62418305 5.916396751 -1.658088086 4.71113546 1.598428608 5.612553811 -5.004056368 -4.057513911 11.16365251 17.32688599 -3.099920667 2.630189741 2.389709914 0.379332731 -0.2899694205 -4.363591482 2.059205599 23.90705054 0.7180462297 -1.976963652 7.487682025 -5.583986129 1.094800525 -2.319858134 @@ -126,13 +125,12 @@ def test_skew(): -0.5057854071 -2.415896554 -9.663571931 -5.714041661 -6.037933426 8.673756933 10.03557773 8.629816199 3.622185659 0.4716627142 -10.92515308 -3.705286841 -2.776089545 2.271920902 9.251504922 5.744980887 """ - with tempfile.NamedTemporaryFile(mode='w', delete=True) as f: - f.write(data) - f.flush() - skewness = calc_moments(f.name, 3) - assert np.allclose(skewness, np.array( - [-0.23418937314622, 0.2946365564954823, -0.05781002053540932, - -0.3512508282578762, - - 0.07035664150233077, - - 0.01935867699166935, - 0.00483863369427428, 0.21879460029850167])) + f = tmpdir.join("filetest") + f.write(data) + skewness = calc_moments(f.strpath, 3) + assert np.allclose(skewness, np.array( + [-0.23418937314622, 0.2946365564954823, -0.05781002053540932, + -0.3512508282578762, - + 0.07035664150233077, - + 0.01935867699166935, + 0.00483863369427428, 0.21879460029850167])) diff --git a/nipype/algorithms/tests/test_normalize_tpms.py b/nipype/algorithms/tests/test_normalize_tpms.py index 19a183bee0..5d0fc5c47b 100644 --- a/nipype/algorithms/tests/test_normalize_tpms.py +++ b/nipype/algorithms/tests/test_normalize_tpms.py @@ -18,7 +18,6 @@ def test_normalize_tpms(tmpdir): - tempdir = str(tmpdir) in_mask = example_data('tpms_msk.nii.gz') mskdata = nb.load(in_mask, mmap=NUMPY_MMAP).get_data() @@ -30,8 +29,8 @@ def test_normalize_tpms(tmpdir): for i in range(3): mapname = example_data('tpm_%02d.nii.gz' % i) - filename = os.path.join(tempdir, 'modtpm_%02d.nii.gz' % i) - out_files.append(os.path.join(tempdir, 'normtpm_%02d.nii.gz' % i)) + filename = tmpdir.join('modtpm_%02d.nii.gz' % i).strpath + out_files.append(tmpdir.join('normtpm_%02d.nii.gz' % i).strpath) im = nb.load(mapname, mmap=NUMPY_MMAP) data = im.get_data() diff --git a/nipype/algorithms/tests/test_overlap.py b/nipype/algorithms/tests/test_overlap.py index ab0f564b1a..e0ec5bcfcb 100644 --- a/nipype/algorithms/tests/test_overlap.py +++ b/nipype/algorithms/tests/test_overlap.py @@ -20,7 +20,7 @@ def check_close(val1, val2): in1 = example_data('segmentation0.nii.gz') in2 = example_data('segmentation1.nii.gz') - os.chdir(str(tmpdir)) + tmpdir.chdir() overlap = Overlap() overlap.inputs.volume1 = in1 overlap.inputs.volume2 = in1 diff --git a/nipype/algorithms/tests/test_splitmerge.py b/nipype/algorithms/tests/test_splitmerge.py index e122fef077..d7e98a47ba 100644 --- a/nipype/algorithms/tests/test_splitmerge.py +++ b/nipype/algorithms/tests/test_splitmerge.py @@ -14,13 +14,13 @@ def test_split_and_merge(tmpdir): from nipype.algorithms.misc import split_rois, merge_rois in_mask = example_data('tpms_msk.nii.gz') - dwfile = op.join(str(tmpdir), 'dwi.nii.gz') + dwfile = tmpdir.join('dwi.nii.gz').strpath mskdata = nb.load(in_mask, mmap=NUMPY_MMAP).get_data() aff = nb.load(in_mask, mmap=NUMPY_MMAP).affine dwshape = (mskdata.shape[0], mskdata.shape[1], mskdata.shape[2], 6) dwdata = np.random.normal(size=dwshape) - os.chdir(str(tmpdir)) + tmpdir.chdir() nb.Nifti1Image(dwdata.astype(np.float32), aff, None).to_filename(dwfile) diff --git a/nipype/algorithms/tests/test_tsnr.py b/nipype/algorithms/tests/test_tsnr.py index e53ffd2f34..f4bac9a17d 100644 --- a/nipype/algorithms/tests/test_tsnr.py +++ b/nipype/algorithms/tests/test_tsnr.py @@ -30,8 +30,7 @@ class TestTSNR(): @pytest.fixture(autouse=True) def setup_class(self, tmpdir): # setup temp folder - self.temp_dir = str(tmpdir) - os.chdir(self.temp_dir) + tmpdir.chdir() utils.save_toy_nii(self.fake_data, self.in_filenames['in_file']) diff --git a/nipype/caching/tests/test_memory.py b/nipype/caching/tests/test_memory.py index d2968ae3f2..50f56d4700 100644 --- a/nipype/caching/tests/test_memory.py +++ b/nipype/caching/tests/test_memory.py @@ -25,7 +25,7 @@ def test_caching(tmpdir): try: # Prevent rerun to check that evaluation is computed only once config.set('execution', 'stop_on_first_rerun', 'true') - mem = Memory(str(tmpdir)) + mem = Memory(tmpdir.strpath) first_nb_run = nb_runs results = mem.cache(SideEffectInterface)(input1=2, input2=1) assert nb_runs == first_nb_run + 1 diff --git a/nipype/interfaces/afni/model.py b/nipype/interfaces/afni/model.py index 4fdc533a1b..d5730d15f9 100644 --- a/nipype/interfaces/afni/model.py +++ b/nipype/interfaces/afni/model.py @@ -260,7 +260,7 @@ class Deconvolve(AFNICommand): >>> deconvolve.inputs.stim_label = [(1, 'Houses')] >>> deconvolve.inputs.gltsym = ['SYM: +Houses'] >>> deconvolve.inputs.glt_label = [(1, 'Houses')] - >>> deconvolve.cmdline # doctest: +ALLOW_UNICODE + >>> deconvolve.cmdline "3dDeconvolve -input functional.nii functional2.nii -bucket output.nii -x1D output.1D -num_stimts 1 -stim_times 1 timeseries.txt 'SPMG1(4)' -stim_label 1 Houses -num_glt 1 -gltsym 'SYM: +Houses' -glt_label 1 Houses" >>> res = deconvolve.run() # doctest: +SKIP """ @@ -574,7 +574,7 @@ class Remlfit(AFNICommand): >>> remlfit.inputs.out_file = 'output.nii' >>> remlfit.inputs.matrix = 'output.1D' >>> remlfit.inputs.gltsym = [('SYM: +Lab1 -Lab2', 'TestSYM'), ('timeseries.txt', 'TestFile')] - >>> remlfit.cmdline # doctest: +ALLOW_UNICODE + >>> remlfit.cmdline '3dREMLfit -gltsym "SYM: +Lab1 -Lab2" TestSYM -gltsym "timeseries.txt" TestFile -input "functional.nii functional2.nii" -matrix output.1D -Rbuck output.nii' >>> res = remlfit.run() # doctest: +SKIP """ @@ -660,7 +660,7 @@ class Synthesize(AFNICommand): >>> synthesize.inputs.cbucket = 'functional.nii' >>> synthesize.inputs.matrix = 'output.1D' >>> synthesize.inputs.select = ['baseline'] - >>> synthesize.cmdline # doctest: +ALLOW_UNICODE + >>> synthesize.cmdline '3dSynthesize -cbucket functional.nii -matrix output.1D -select baseline' >>> syn = synthesize.run() # doctest: +SKIP """ diff --git a/nipype/interfaces/afni/preprocess.py b/nipype/interfaces/afni/preprocess.py index a769811df1..e46c9689c2 100644 --- a/nipype/interfaces/afni/preprocess.py +++ b/nipype/interfaces/afni/preprocess.py @@ -169,7 +169,7 @@ class AlignEpiAnatPy(AFNIPythonCommand): >>> al_ea.inputs.volreg = 'off' >>> al_ea.inputs.tshift = 'off' >>> al_ea.inputs.save_skullstrip = True - >>> al_ea.cmdline # doctest: +ALLOW_UNICODE +ELLIPSIS + >>> al_ea.cmdline # doctest: +ELLIPSIS 'python2 ...align_epi_anat.py -anat structural.nii -epi_base 0 -epi_strip 3dAutomask -epi functional.nii -save_skullstrip -suffix _al -tshift off -volreg off' >>> res = allineate.run() # doctest: +SKIP """ @@ -462,7 +462,7 @@ class Allineate(AFNICommand): >>> allineate.inputs.in_file = 'functional.nii' >>> allineate.inputs.out_file = 'functional_allineate.nii' >>> allineate.inputs.in_matrix = 'cmatrix.mat' - >>> allineate.cmdline # doctest: +ALLOW_UNICODE + >>> allineate.cmdline '3dAllineate -source functional.nii -prefix functional_allineate.nii -1Dmatrix_apply cmatrix.mat' >>> res = allineate.run() # doctest: +SKIP @@ -471,7 +471,7 @@ class Allineate(AFNICommand): >>> allineate.inputs.in_file = 'functional.nii' >>> allineate.inputs.reference = 'structural.nii' >>> allineate.inputs.allcostx = 'out.allcostX.txt' - >>> allineate.cmdline # doctest: +ALLOW_UNICODE + >>> allineate.cmdline '3dAllineate -source functional.nii -base structural.nii -allcostx |& tee out.allcostX.txt' >>> res = allineate.run() # doctest: +SKIP """ @@ -574,7 +574,7 @@ class AutoTcorrelate(AFNICommand): >>> corr.inputs.eta2 = True >>> corr.inputs.mask = 'mask.nii' >>> corr.inputs.mask_only_targets = True - >>> corr.cmdline # doctest: +ELLIPSIS +NORMALIZE_WHITESPACE +ALLOW_UNICODE + >>> corr.cmdline # doctest: +ELLIPSIS '3dAutoTcorrelate -eta2 -mask mask.nii -mask_only_targets -prefix functional_similarity_matrix.1D -polort -1 functional.nii' >>> res = corr.run() # doctest: +SKIP """ @@ -643,7 +643,7 @@ class Automask(AFNICommand): >>> automask.inputs.in_file = 'functional.nii' >>> automask.inputs.dilate = 1 >>> automask.inputs.outputtype = 'NIFTI' - >>> automask.cmdline # doctest: +ELLIPSIS +ALLOW_UNICODE + >>> automask.cmdline # doctest: +ELLIPSIS '3dAutomask -apply_prefix functional_masked.nii -dilate 1 -prefix functional_mask.nii functional.nii' >>> res = automask.run() # doctest: +SKIP @@ -737,7 +737,7 @@ class AutoTLRC(AFNICommand): >>> autoTLRC.inputs.in_file = 'structural.nii' >>> autoTLRC.inputs.no_ss = True >>> autoTLRC.inputs.base = "TT_N27+tlrc" - >>> autoTLRC.cmdline # doctest: +ALLOW_UNICODE + >>> autoTLRC.cmdline '@auto_tlrc -base TT_N27+tlrc -input structural.nii -no_ss' >>> res = autoTLRC.run() # doctest: +SKIP @@ -849,7 +849,7 @@ class Bandpass(AFNICommand): >>> bandpass.inputs.in_file = 'functional.nii' >>> bandpass.inputs.highpass = 0.005 >>> bandpass.inputs.lowpass = 0.1 - >>> bandpass.cmdline # doctest: +ALLOW_UNICODE + >>> bandpass.cmdline '3dBandpass -prefix functional_bp 0.005000 0.100000 functional.nii' >>> res = bandpass.run() # doctest: +SKIP @@ -917,7 +917,7 @@ class BlurInMask(AFNICommand): >>> bim.inputs.in_file = 'functional.nii' >>> bim.inputs.mask = 'mask.nii' >>> bim.inputs.fwhm = 5.0 - >>> bim.cmdline # doctest: +ELLIPSIS +ALLOW_UNICODE + >>> bim.cmdline # doctest: +ELLIPSIS '3dBlurInMask -input functional.nii -FWHM 5.000000 -mask mask.nii -prefix functional_blur' >>> res = bim.run() # doctest: +SKIP @@ -968,7 +968,7 @@ class BlurToFWHM(AFNICommand): >>> blur = afni.preprocess.BlurToFWHM() >>> blur.inputs.in_file = 'epi.nii' >>> blur.inputs.fwhm = 2.5 - >>> blur.cmdline # doctest: +ELLIPSIS +ALLOW_UNICODE + >>> blur.cmdline # doctest: +ELLIPSIS '3dBlurToFWHM -FWHM 2.500000 -input epi.nii -prefix epi_afni' >>> res = blur.run() # doctest: +SKIP @@ -1019,7 +1019,7 @@ class ClipLevel(AFNICommandBase): >>> from nipype.interfaces.afni import preprocess >>> cliplevel = preprocess.ClipLevel() >>> cliplevel.inputs.in_file = 'anatomical.nii' - >>> cliplevel.cmdline # doctest: +ALLOW_UNICODE + >>> cliplevel.cmdline '3dClipLevel anatomical.nii' >>> res = cliplevel.run() # doctest: +SKIP @@ -1102,7 +1102,7 @@ class DegreeCentrality(AFNICommand): >>> degree.inputs.mask = 'mask.nii' >>> degree.inputs.sparsity = 1 # keep the top one percent of connections >>> degree.inputs.out_file = 'out.nii' - >>> degree.cmdline # doctest: +ALLOW_UNICODE + >>> degree.cmdline '3dDegreeCentrality -mask mask.nii -prefix out.nii -sparsity 1.000000 functional.nii' >>> res = degree.run() # doctest: +SKIP @@ -1152,7 +1152,7 @@ class Despike(AFNICommand): >>> from nipype.interfaces import afni >>> despike = afni.Despike() >>> despike.inputs.in_file = 'functional.nii' - >>> despike.cmdline # doctest: +ALLOW_UNICODE + >>> despike.cmdline '3dDespike -prefix functional_despike functional.nii' >>> res = despike.run() # doctest: +SKIP @@ -1193,7 +1193,7 @@ class Detrend(AFNICommand): >>> detrend.inputs.in_file = 'functional.nii' >>> detrend.inputs.args = '-polort 2' >>> detrend.inputs.outputtype = 'AFNI' - >>> detrend.cmdline # doctest: +ALLOW_UNICODE + >>> detrend.cmdline '3dDetrend -polort 2 -prefix functional_detrend functional.nii' >>> res = detrend.run() # doctest: +SKIP @@ -1265,7 +1265,7 @@ class ECM(AFNICommand): >>> ecm.inputs.mask = 'mask.nii' >>> ecm.inputs.sparsity = 0.1 # keep top 0.1% of connections >>> ecm.inputs.out_file = 'out.nii' - >>> ecm.cmdline # doctest: +ALLOW_UNICODE + >>> ecm.cmdline '3dECM -mask mask.nii -prefix out.nii -sparsity 0.100000 functional.nii' >>> res = ecm.run() # doctest: +SKIP @@ -1322,7 +1322,7 @@ class Fim(AFNICommand): >>> fim.inputs.out_file = 'functional_corr.nii' >>> fim.inputs.out = 'Correlation' >>> fim.inputs.fim_thr = 0.0009 - >>> fim.cmdline # doctest: +ALLOW_UNICODE + >>> fim.cmdline '3dfim+ -input functional.nii -ideal_file seed.1D -fim_thr 0.000900 -out Correlation -bucket functional_corr.nii' >>> res = fim.run() # doctest: +SKIP @@ -1376,7 +1376,7 @@ class Fourier(AFNICommand): >>> fourier.inputs.retrend = True >>> fourier.inputs.highpass = 0.005 >>> fourier.inputs.lowpass = 0.1 - >>> fourier.cmdline # doctest: +ALLOW_UNICODE + >>> fourier.cmdline '3dFourier -highpass 0.005000 -lowpass 0.100000 -prefix functional_fourier -retrend functional.nii' >>> res = fourier.run() # doctest: +SKIP @@ -1449,7 +1449,7 @@ class Hist(AFNICommandBase): >>> from nipype.interfaces import afni >>> hist = afni.Hist() >>> hist.inputs.in_file = 'functional.nii' - >>> hist.cmdline # doctest: +ALLOW_UNICODE + >>> hist.cmdline '3dHist -input functional.nii -prefix functional_hist' >>> res = hist.run() # doctest: +SKIP @@ -1513,7 +1513,7 @@ class LFCD(AFNICommand): >>> lfcd.inputs.mask = 'mask.nii' >>> lfcd.inputs.thresh = 0.8 # keep all connections with corr >= 0.8 >>> lfcd.inputs.out_file = 'out.nii' - >>> lfcd.cmdline # doctest: +ALLOW_UNICODE + >>> lfcd.cmdline '3dLFCD -mask mask.nii -prefix out.nii -thresh 0.800000 functional.nii' >>> res = lfcd.run() # doctest: +SKIP """ @@ -1564,7 +1564,7 @@ class Maskave(AFNICommand): >>> maskave.inputs.in_file = 'functional.nii' >>> maskave.inputs.mask= 'seed_mask.nii' >>> maskave.inputs.quiet= True - >>> maskave.cmdline # doctest: +ELLIPSIS +ALLOW_UNICODE + >>> maskave.cmdline # doctest: +ELLIPSIS '3dmaskave -mask seed_mask.nii -quiet functional.nii > functional_maskave.1D' >>> res = maskave.run() # doctest: +SKIP @@ -1635,7 +1635,7 @@ class Means(AFNICommand): >>> means.inputs.in_file_a = 'im1.nii' >>> means.inputs.in_file_b = 'im2.nii' >>> means.inputs.out_file = 'output.nii' - >>> means.cmdline # doctest: +ALLOW_UNICODE + >>> means.cmdline '3dMean -prefix output.nii im1.nii im2.nii' >>> res = means.run() # doctest: +SKIP @@ -1644,7 +1644,7 @@ class Means(AFNICommand): >>> means.inputs.in_file_a = 'im1.nii' >>> means.inputs.out_file = 'output.nii' >>> means.inputs.datum = 'short' - >>> means.cmdline # doctest: +ALLOW_UNICODE + >>> means.cmdline '3dMean -datum short -prefix output.nii im1.nii' >>> res = means.run() # doctest: +SKIP @@ -1742,7 +1742,7 @@ class OutlierCount(CommandLine): >>> from nipype.interfaces import afni >>> toutcount = afni.OutlierCount() >>> toutcount.inputs.in_file = 'functional.nii' - >>> toutcount.cmdline # doctest: +ELLIPSIS +ALLOW_UNICODE + >>> toutcount.cmdline # doctest: +ELLIPSIS '3dToutcount functional.nii' >>> res = toutcount.run() # doctest: +SKIP @@ -1855,7 +1855,7 @@ class QualityIndex(CommandLine): >>> from nipype.interfaces import afni >>> tqual = afni.QualityIndex() >>> tqual.inputs.in_file = 'functional.nii' - >>> tqual.cmdline # doctest: +ELLIPSIS +ALLOW_UNICODE + >>> tqual.cmdline # doctest: +ELLIPSIS '3dTqual functional.nii > functional_tqual' >>> res = tqual.run() # doctest: +SKIP @@ -1912,7 +1912,7 @@ class ROIStats(AFNICommandBase): >>> roistats.inputs.in_file = 'functional.nii' >>> roistats.inputs.mask = 'skeleton_mask.nii.gz' >>> roistats.inputs.quiet = True - >>> roistats.cmdline # doctest: +ALLOW_UNICODE + >>> roistats.cmdline '3dROIstats -quiet -mask skeleton_mask.nii.gz functional.nii' >>> res = roistats.run() # doctest: +SKIP @@ -2007,7 +2007,7 @@ class Retroicor(AFNICommand): >>> ret.inputs.card = 'mask.1D' >>> ret.inputs.resp = 'resp.1D' >>> ret.inputs.outputtype = 'NIFTI' - >>> ret.cmdline # doctest: +ALLOW_UNICODE + >>> ret.cmdline '3dretroicor -prefix functional_retroicor.nii -resp resp.1D -card mask.1D functional.nii' >>> res = ret.run() # doctest: +SKIP @@ -2090,7 +2090,7 @@ class Seg(AFNICommandBase): >>> seg = preprocess.Seg() >>> seg.inputs.in_file = 'structural.nii' >>> seg.inputs.mask = 'AUTO' - >>> seg.cmdline # doctest: +ALLOW_UNICODE + >>> seg.cmdline '3dSeg -mask AUTO -anat structural.nii' >>> res = seg.run() # doctest: +SKIP @@ -2146,7 +2146,7 @@ class SkullStrip(AFNICommand): >>> skullstrip = afni.SkullStrip() >>> skullstrip.inputs.in_file = 'functional.nii' >>> skullstrip.inputs.args = '-o_ply' - >>> skullstrip.cmdline # doctest: +ALLOW_UNICODE + >>> skullstrip.cmdline '3dSkullStrip -input functional.nii -o_ply -prefix functional_skullstrip' >>> res = skullstrip.run() # doctest: +SKIP @@ -2225,7 +2225,7 @@ class TCorr1D(AFNICommand): >>> tcorr1D = afni.TCorr1D() >>> tcorr1D.inputs.xset= 'u_rc1s1_Template.nii' >>> tcorr1D.inputs.y_1d = 'seed.1D' - >>> tcorr1D.cmdline # doctest: +ALLOW_UNICODE + >>> tcorr1D.cmdline '3dTcorr1D -prefix u_rc1s1_Template_correlation.nii.gz u_rc1s1_Template.nii seed.1D' >>> res = tcorr1D.run() # doctest: +SKIP @@ -2367,7 +2367,7 @@ class TCorrMap(AFNICommand): >>> tcm.inputs.in_file = 'functional.nii' >>> tcm.inputs.mask = 'mask.nii' >>> tcm.mean_file = 'functional_meancorr.nii' - >>> tcm.cmdline # doctest: +ALLOW_UNICODE +SKIP + >>> tcm.cmdline # doctest: +SKIP '3dTcorrMap -input functional.nii -mask mask.nii -Mean functional_meancorr.nii' >>> res = tcm.run() # doctest: +SKIP @@ -2435,7 +2435,7 @@ class TCorrelate(AFNICommand): >>> tcorrelate.inputs.out_file = 'functional_tcorrelate.nii.gz' >>> tcorrelate.inputs.polort = -1 >>> tcorrelate.inputs.pearson = True - >>> tcorrelate.cmdline # doctest: +ALLOW_UNICODE + >>> tcorrelate.cmdline '3dTcorrelate -prefix functional_tcorrelate.nii.gz -pearson -polort -1 u_rc1s1_Template.nii u_rc1s2_Template.nii' >>> res = tcarrelate.run() # doctest: +SKIP @@ -2497,7 +2497,7 @@ class TNorm(AFNICommand): >>> tnorm.inputs.in_file = 'functional.nii' >>> tnorm.inputs.norm2 = True >>> tnorm.inputs.out_file = 'rm.errts.unit errts+tlrc' - >>> tnorm.cmdline # doctest: +ALLOW_UNICODE + >>> tnorm.cmdline '3dTnorm -norm2 -prefix rm.errts.unit errts+tlrc functional.nii' >>> res = tshift.run() # doctest: +SKIP @@ -2567,7 +2567,7 @@ class TShift(AFNICommand): >>> tshift.inputs.in_file = 'functional.nii' >>> tshift.inputs.tpattern = 'alt+z' >>> tshift.inputs.tzero = 0.0 - >>> tshift.cmdline # doctest: +ALLOW_UNICODE + >>> tshift.cmdline '3dTshift -prefix functional_tshift -tpattern alt+z -tzero 0.0 functional.nii' >>> res = tshift.run() # doctest: +SKIP @@ -2663,7 +2663,7 @@ class Volreg(AFNICommand): >>> volreg.inputs.args = '-Fourier -twopass' >>> volreg.inputs.zpad = 4 >>> volreg.inputs.outputtype = 'NIFTI' - >>> volreg.cmdline # doctest: +ELLIPSIS +ALLOW_UNICODE + >>> volreg.cmdline # doctest: +ELLIPSIS '3dvolreg -Fourier -twopass -1Dfile functional.1D -1Dmatrix_save functional.aff12.1D -prefix functional_volreg.nii -zpad 4 -maxdisp1D functional_md.1D functional.nii' >>> res = volreg.run() # doctest: +SKIP @@ -2677,7 +2677,7 @@ class Volreg(AFNICommand): >>> volreg.inputs.out_file = 'rm.epi.volreg.r1' >>> volreg.inputs.oned_file = 'dfile.r1.1D' >>> volreg.inputs.oned_matrix_save = 'mat.r1.tshift+orig.1D' - >>> volreg.cmdline # doctest: +ALLOW_UNICODE + >>> volreg.cmdline '3dvolreg -cubic -1Dfile dfile.r1.1D -1Dmatrix_save mat.r1.tshift+orig.1D -prefix rm.epi.volreg.r1 -verbose -base functional.nii -zpad 1 -maxdisp1D functional_md.1D functional.nii' >>> res = volreg.run() # doctest: +SKIP @@ -2752,7 +2752,7 @@ class Warp(AFNICommand): >>> warp.inputs.in_file = 'structural.nii' >>> warp.inputs.deoblique = True >>> warp.inputs.out_file = 'trans.nii.gz' - >>> warp.cmdline # doctest: +ALLOW_UNICODE + >>> warp.cmdline '3dWarp -deoblique -prefix trans.nii.gz structural.nii' >>> res = warp.run() # doctest: +SKIP @@ -2760,7 +2760,7 @@ class Warp(AFNICommand): >>> warp_2.inputs.in_file = 'structural.nii' >>> warp_2.inputs.newgrid = 1.0 >>> warp_2.inputs.out_file = 'trans.nii.gz' - >>> warp_2.cmdline # doctest: +ALLOW_UNICODE + >>> warp_2.cmdline '3dWarp -newgrid 1.000000 -prefix trans.nii.gz structural.nii' >>> res = warp_2.run() # doctest: +SKIP @@ -2854,7 +2854,7 @@ class QwarpPlusMinus(CommandLine): >>> qwarp.inputs.source_file = 'sub-01_dir-LR_epi.nii.gz' >>> qwarp.inputs.nopadWARP = True >>> qwarp.inputs.base_file = 'sub-01_dir-RL_epi.nii.gz' - >>> qwarp.cmdline # doctest: +ALLOW_UNICODE + >>> qwarp.cmdline '3dQwarp -prefix Qwarp.nii.gz -plusminus -base sub-01_dir-RL_epi.nii.gz -nopadWARP -source sub-01_dir-LR_epi.nii.gz' >>> res = warp.run() # doctest: +SKIP @@ -3426,7 +3426,7 @@ class Qwarp(AFNICommand): >>> qwarp.inputs.nopadWARP = True >>> qwarp.inputs.base_file = 'sub-01_dir-RL_epi.nii.gz' >>> qwarp.inputs.plusminus = True - >>> qwarp.cmdline # doctest: +ALLOW_UNICODE + >>> qwarp.cmdline '3dQwarp -base sub-01_dir-RL_epi.nii.gz -source sub-01_dir-LR_epi.nii.gz -nopadWARP -prefix sub-01_dir-LR_epi_QW -plusminus' >>> res = qwarp.run() # doctest: +SKIP @@ -3435,7 +3435,7 @@ class Qwarp(AFNICommand): >>> qwarp.inputs.in_file = 'structural.nii' >>> qwarp.inputs.base_file = 'mni.nii' >>> qwarp.inputs.resample = True - >>> qwarp.cmdline # doctest: +ALLOW_UNICODE + >>> qwarp.cmdline '3dQwarp -base mni.nii -source structural.nii -prefix structural_QW -resample' >>> res = qwarp.run() # doctest: +SKIP @@ -3449,7 +3449,7 @@ class Qwarp(AFNICommand): >>> qwarp.inputs.verb = True >>> qwarp.inputs.iwarp = True >>> qwarp.inputs.blur = [0,3] - >>> qwarp.cmdline # doctest: +ALLOW_UNICODE + >>> qwarp.cmdline '3dQwarp -base epi.nii -blur 0.0 3.0 -source structural.nii -iwarp -prefix anatSSQ.nii.gz -resample -verb -lpc' >>> res = qwarp.run() # doctest: +SKIP @@ -3459,7 +3459,7 @@ class Qwarp(AFNICommand): >>> qwarp.inputs.base_file = 'mni.nii' >>> qwarp.inputs.duplo = True >>> qwarp.inputs.blur = [0,3] - >>> qwarp.cmdline # doctest: +ALLOW_UNICODE + >>> qwarp.cmdline '3dQwarp -base mni.nii -blur 0.0 3.0 -duplo -source structural.nii -prefix structural_QW' >>> res = qwarp.run() # doctest: +SKIP @@ -3471,7 +3471,7 @@ class Qwarp(AFNICommand): >>> qwarp.inputs.minpatch = 25 >>> qwarp.inputs.blur = [0,3] >>> qwarp.inputs.out_file = 'Q25' - >>> qwarp.cmdline # doctest: +ALLOW_UNICODE + >>> qwarp.cmdline '3dQwarp -base mni.nii -blur 0.0 3.0 -duplo -source structural.nii -minpatch 25 -prefix Q25' >>> res = qwarp.run() # doctest: +SKIP >>> qwarp2 = afni.Qwarp() @@ -3481,7 +3481,7 @@ class Qwarp(AFNICommand): >>> qwarp2.inputs.out_file = 'Q11' >>> qwarp2.inputs.inilev = 7 >>> qwarp2.inputs.iniwarp = ['Q25_warp+tlrc.HEAD'] - >>> qwarp2.cmdline # doctest: +ALLOW_UNICODE + >>> qwarp2.cmdline '3dQwarp -base mni.nii -blur 0.0 2.0 -source structural.nii -inilev 7 -iniwarp Q25_warp+tlrc.HEAD -prefix Q11' >>> res2 = qwarp2.run() # doctest: +SKIP >>> res2 = qwarp2.run() # doctest: +SKIP diff --git a/nipype/interfaces/afni/utils.py b/nipype/interfaces/afni/utils.py index 8245578780..4c1da45b50 100644 --- a/nipype/interfaces/afni/utils.py +++ b/nipype/interfaces/afni/utils.py @@ -74,7 +74,7 @@ class ABoverlap(AFNICommand): >>> aboverlap.inputs.in_file_a = 'functional.nii' >>> aboverlap.inputs.in_file_b = 'structural.nii' >>> aboverlap.inputs.out_file = 'out.mask_ae_overlap.txt' - >>> aboverlap.cmdline # doctest: +ALLOW_UNICODE + >>> aboverlap.cmdline '3dABoverlap functional.nii structural.nii |& tee out.mask_ae_overlap.txt' >>> res = aboverlap.run() # doctest: +SKIP @@ -139,7 +139,7 @@ class AFNItoNIFTI(AFNICommand): >>> a2n = afni.AFNItoNIFTI() >>> a2n.inputs.in_file = 'afni_output.3D' >>> a2n.inputs.out_file = 'afni_output.nii' - >>> a2n.cmdline # doctest: +ALLOW_UNICODE + >>> a2n.cmdline '3dAFNItoNIFTI -prefix afni_output.nii afni_output.3D' >>> res = a2n.run() # doctest: +SKIP @@ -207,7 +207,7 @@ class Autobox(AFNICommand): >>> abox = afni.Autobox() >>> abox.inputs.in_file = 'structural.nii' >>> abox.inputs.padding = 5 - >>> abox.cmdline # doctest: +ALLOW_UNICODE + >>> abox.cmdline '3dAutobox -input structural.nii -prefix structural_autobox -npad 5' >>> res = abox.run() # doctest: +SKIP @@ -288,7 +288,7 @@ class BrickStat(AFNICommandBase): >>> brickstat.inputs.in_file = 'functional.nii' >>> brickstat.inputs.mask = 'skeleton_mask.nii.gz' >>> brickstat.inputs.min = True - >>> brickstat.cmdline # doctest: +ALLOW_UNICODE + >>> brickstat.cmdline '3dBrickStat -min -mask skeleton_mask.nii.gz functional.nii' >>> res = brickstat.run() # doctest: +SKIP @@ -395,7 +395,7 @@ class Bucket(AFNICommand): >>> bucket = afni.Bucket() >>> bucket.inputs.in_file = [('functional.nii',"{2..$}"), ('functional.nii',"{1}")] >>> bucket.inputs.out_file = 'vr_base' - >>> bucket.cmdline # doctest: +ALLOW_UNICODE + >>> bucket.cmdline "3dbucket -prefix vr_base functional.nii'{2..$}' functional.nii'{1}'" >>> res = bucket.run() # doctest: +SKIP @@ -469,7 +469,7 @@ class Calc(AFNICommand): >>> calc.inputs.expr='a*b' >>> calc.inputs.out_file = 'functional_calc.nii.gz' >>> calc.inputs.outputtype = 'NIFTI' - >>> calc.cmdline # doctest: +ELLIPSIS +ALLOW_UNICODE + >>> calc.cmdline # doctest: +ELLIPSIS '3dcalc -a functional.nii -b functional2.nii -expr "a*b" -prefix functional_calc.nii.gz' >>> res = calc.run() # doctest: +SKIP @@ -479,7 +479,7 @@ class Calc(AFNICommand): >>> calc.inputs.expr = '1' >>> calc.inputs.out_file = 'rm.epi.all1' >>> calc.inputs.overwrite = True - >>> calc.cmdline # doctest: +ALLOW_UNICODE + >>> calc.cmdline '3dcalc -a functional.nii -expr "1" -prefix rm.epi.all1 -overwrite' >>> res = calc.run() # doctest: +SKIP @@ -574,7 +574,7 @@ class Cat(AFNICommand): >>> cat1d.inputs.sel = "'[0,2]'" >>> cat1d.inputs.in_files = ['f1.1D', 'f2.1D'] >>> cat1d.inputs.out_file = 'catout.1d' - >>> cat1d.cmdline # doctest: +ALLOW_UNICODE + >>> cat1d.cmdline "1dcat -sel '[0,2]' f1.1D f2.1D > catout.1d" >>> res = cat1d.run() # doctest: +SKIP @@ -627,7 +627,7 @@ class CatMatvec(AFNICommand): >>> cmv = afni.CatMatvec() >>> cmv.inputs.in_file = [('structural.BRIK::WARP_DATA','I')] >>> cmv.inputs.out_file = 'warp.anat.Xat.1D' - >>> cmv.cmdline # doctest: +ALLOW_UNICODE + >>> cmv.cmdline 'cat_matvec structural.BRIK::WARP_DATA -I > warp.anat.Xat.1D' >>> res = cmv.run() # doctest: +SKIP @@ -719,7 +719,7 @@ class CenterMass(AFNICommandBase): >>> cm.inputs.in_file = 'structural.nii' >>> cm.inputs.cm_file = 'cm.txt' >>> cm.inputs.roi_vals = [2, 10] - >>> cm.cmdline # doctest: +ALLOW_UNICODE + >>> cm.cmdline '3dCM -roi_vals 2 10 structural.nii > cm.txt' >>> res = 3dcm.run() # doctest: +SKIP """ @@ -766,26 +766,26 @@ class Copy(AFNICommand): >>> from nipype.interfaces import afni >>> copy3d = afni.Copy() >>> copy3d.inputs.in_file = 'functional.nii' - >>> copy3d.cmdline # doctest: +ALLOW_UNICODE + >>> copy3d.cmdline '3dcopy functional.nii functional_copy' >>> res = copy3d.run() # doctest: +SKIP >>> from copy import deepcopy >>> copy3d_2 = deepcopy(copy3d) >>> copy3d_2.inputs.outputtype = 'NIFTI' - >>> copy3d_2.cmdline # doctest: +ALLOW_UNICODE + >>> copy3d_2.cmdline '3dcopy functional.nii functional_copy.nii' >>> res = copy3d_2.run() # doctest: +SKIP >>> copy3d_3 = deepcopy(copy3d) >>> copy3d_3.inputs.outputtype = 'NIFTI_GZ' - >>> copy3d_3.cmdline # doctest: +ALLOW_UNICODE + >>> copy3d_3.cmdline '3dcopy functional.nii functional_copy.nii.gz' >>> res = copy3d_3.run() # doctest: +SKIP >>> copy3d_4 = deepcopy(copy3d) >>> copy3d_4.inputs.out_file = 'new_func.nii' - >>> copy3d_4.cmdline # doctest: +ALLOW_UNICODE + >>> copy3d_4.cmdline '3dcopy functional.nii new_func.nii' >>> res = copy3d_4.run() # doctest: +SKIP @@ -857,7 +857,7 @@ class Dot(AFNICommand): >>> dot.inputs.in_files = ['functional.nii[0]', 'structural.nii'] >>> dot.inputs.dodice = True >>> dot.inputs.out_file = 'out.mask_ae_dice.txt' - >>> dot.cmdline # doctest: +ALLOW_UNICODE + >>> dot.cmdline '3dDot -dodice functional.nii[0] structural.nii |& tee out.mask_ae_dice.txt' >>> res = copy3d.run() # doctest: +SKIP @@ -948,7 +948,7 @@ class Edge3(AFNICommand): >>> edge3.inputs.in_file = 'functional.nii' >>> edge3.inputs.out_file = 'edges.nii' >>> edge3.inputs.datum = 'byte' - >>> edge3.cmdline # doctest: +ALLOW_UNICODE + >>> edge3.cmdline '3dedge3 -input functional.nii -datum byte -prefix edges.nii' >>> res = edge3.run() # doctest: +SKIP @@ -1019,7 +1019,7 @@ class Eval(AFNICommand): >>> eval.inputs.expr = 'a*b' >>> eval.inputs.out1D = True >>> eval.inputs.out_file = 'data_calc.1D' - >>> eval.cmdline # doctest: +ALLOW_UNICODE + >>> eval.cmdline '1deval -a seed.1D -b resp.1D -expr "a*b" -1D -prefix data_calc.1D' >>> res = eval.run() # doctest: +SKIP @@ -1170,7 +1170,7 @@ class FWHMx(AFNICommandBase): >>> from nipype.interfaces import afni >>> fwhm = afni.FWHMx() >>> fwhm.inputs.in_file = 'functional.nii' - >>> fwhm.cmdline # doctest: +ALLOW_UNICODE + >>> fwhm.cmdline '3dFWHMx -input functional.nii -out functional_subbricks.out > functional_fwhmx.out' >>> res = fwhm.run() # doctest: +SKIP @@ -1397,7 +1397,7 @@ class MaskTool(AFNICommand): >>> masktool = afni.MaskTool() >>> masktool.inputs.in_file = 'functional.nii' >>> masktool.inputs.outputtype = 'NIFTI' - >>> masktool.cmdline # doctest: +ALLOW_UNICODE + >>> masktool.cmdline '3dmask_tool -prefix functional_mask.nii -input functional.nii' >>> res = automask.run() # doctest: +SKIP @@ -1446,7 +1446,7 @@ class Merge(AFNICommand): >>> merge.inputs.blurfwhm = 4 >>> merge.inputs.doall = True >>> merge.inputs.out_file = 'e7.nii' - >>> merge.cmdline # doctest: +ALLOW_UNICODE + >>> merge.cmdline '3dmerge -1blur_fwhm 4 -doall -prefix e7.nii functional.nii functional2.nii' >>> res = merge.run() # doctest: +SKIP @@ -1501,7 +1501,7 @@ class Notes(CommandLine): >>> notes.inputs.in_file = 'functional.HEAD' >>> notes.inputs.add = 'This note is added.' >>> notes.inputs.add_history = 'This note is added to history.' - >>> notes.cmdline # doctest: +ALLOW_UNICODE + >>> notes.cmdline '3dNotes -a "This note is added." -h "This note is added to history." functional.HEAD' >>> res = notes.run() # doctest: +SKIP """ @@ -1579,7 +1579,7 @@ class NwarpApply(AFNICommandBase): >>> nwarp.inputs.in_file = 'Fred+orig' >>> nwarp.inputs.master = 'NWARP' >>> nwarp.inputs.warp = "'Fred_WARP+tlrc Fred.Xaff12.1D'" - >>> nwarp.cmdline # doctest: +ALLOW_UNICODE + >>> nwarp.cmdline "3dNwarpApply -source Fred+orig -master NWARP -prefix Fred+orig_Nwarp -nwarp \'Fred_WARP+tlrc Fred.Xaff12.1D\'" >>> res = nwarp.run() # doctest: +SKIP @@ -1766,7 +1766,7 @@ class OneDToolPy(AFNIPythonCommand): >>> odt.inputs.set_nruns = 3 >>> odt.inputs.demean = True >>> odt.inputs.out_file = 'motion_dmean.1D' - >>> odt.cmdline # doctest: +ALLOW_UNICODE +ELLIPSIS + >>> odt.cmdline # doctest: +ELLIPSIS 'python2 ...1d_tool.py -demean -infile f1.1D -write motion_dmean.1D -set_nruns 3' >>> res = odt.run() # doctest: +SKIP """ @@ -1881,14 +1881,14 @@ class Refit(AFNICommandBase): >>> refit = afni.Refit() >>> refit.inputs.in_file = 'structural.nii' >>> refit.inputs.deoblique = True - >>> refit.cmdline # doctest: +ALLOW_UNICODE + >>> refit.cmdline '3drefit -deoblique structural.nii' >>> res = refit.run() # doctest: +SKIP >>> refit_2 = afni.Refit() >>> refit_2.inputs.in_file = 'structural.nii' >>> refit_2.inputs.atrfloat = ("IJK_TO_DICOM_REAL", "'1 0.2 0 0 -0.2 1 0 0 0 0 1 0'") - >>> refit_2.cmdline # doctest: +ALLOW_UNICODE + >>> refit_2.cmdline "3drefit -atrfloat IJK_TO_DICOM_REAL '1 0.2 0 0 -0.2 1 0 0 0 0 1 0' structural.nii" >>> res = refit_2.run() # doctest: +SKIP """ @@ -1948,7 +1948,7 @@ class Resample(AFNICommand): >>> resample.inputs.in_file = 'functional.nii' >>> resample.inputs.orientation= 'RPI' >>> resample.inputs.outputtype = 'NIFTI' - >>> resample.cmdline # doctest: +ALLOW_UNICODE + >>> resample.cmdline '3dresample -orient RPI -prefix functional_resample.nii -inset functional.nii' >>> res = resample.run() # doctest: +SKIP @@ -2001,7 +2001,7 @@ class TCat(AFNICommand): >>> tcat.inputs.in_files = ['functional.nii', 'functional2.nii'] >>> tcat.inputs.out_file= 'functional_tcat.nii' >>> tcat.inputs.rlt = '+' - >>> tcat.cmdline # doctest: +ALLOW_UNICODE +NORMALIZE_WHITESPACE + >>> tcat.cmdline '3dTcat -rlt+ -prefix functional_tcat.nii functional.nii functional2.nii' >>> res = tcat.run() # doctest: +SKIP @@ -2051,7 +2051,7 @@ class TCatSubBrick(AFNICommand): >>> tcsb.inputs.in_files = [('functional.nii', "'{2..$}'"), ('functional2.nii', "'{2..$}'")] >>> tcsb.inputs.out_file= 'functional_tcat.nii' >>> tcsb.inputs.rlt = '+' - >>> tcsb.cmdline # doctest: +ALLOW_UNICODE +NORMALIZE_WHITESPACE + >>> tcsb.cmdline "3dTcat -rlt+ -prefix functional_tcat.nii functional.nii'{2..$}' functional2.nii'{2..$}' " >>> res = tcsb.run() # doctest: +SKIP @@ -2102,7 +2102,7 @@ class TStat(AFNICommand): >>> tstat.inputs.in_file = 'functional.nii' >>> tstat.inputs.args = '-mean' >>> tstat.inputs.out_file = 'stats' - >>> tstat.cmdline # doctest: +ALLOW_UNICODE + >>> tstat.cmdline '3dTstat -mean -prefix stats functional.nii' >>> res = tstat.run() # doctest: +SKIP @@ -2164,7 +2164,7 @@ class To3D(AFNICommand): >>> to3d.inputs.in_folder = '.' >>> to3d.inputs.out_file = 'dicomdir.nii' >>> to3d.inputs.filetype = 'anat' - >>> to3d.cmdline # doctest: +ELLIPSIS +ALLOW_UNICODE + >>> to3d.cmdline # doctest: +ELLIPSIS 'to3d -datum float -anat -prefix dicomdir.nii ./*.dcm' >>> res = to3d.run() # doctest: +SKIP @@ -2268,7 +2268,7 @@ class Undump(AFNICommand): >>> unndump = afni.Undump() >>> unndump.inputs.in_file = 'structural.nii' >>> unndump.inputs.out_file = 'structural_undumped.nii' - >>> unndump.cmdline # doctest: +ALLOW_UNICODE + >>> unndump.cmdline '3dUndump -prefix structural_undumped.nii -master structural.nii' >>> res = unndump.run() # doctest: +SKIP @@ -2371,7 +2371,7 @@ class Unifize(AFNICommand): >>> unifize = afni.Unifize() >>> unifize.inputs.in_file = 'structural.nii' >>> unifize.inputs.out_file = 'structural_unifized.nii' - >>> unifize.cmdline # doctest: +ALLOW_UNICODE + >>> unifize.cmdline '3dUnifize -prefix structural_unifized.nii -input structural.nii' >>> res = unifize.run() # doctest: +SKIP @@ -2414,7 +2414,7 @@ class ZCutUp(AFNICommand): >>> zcutup.inputs.in_file = 'functional.nii' >>> zcutup.inputs.out_file = 'functional_zcutup.nii' >>> zcutup.inputs.keep= '0 10' - >>> zcutup.cmdline # doctest: +ALLOW_UNICODE + >>> zcutup.cmdline '3dZcutup -keep 0 10 -prefix functional_zcutup.nii functional.nii' >>> res = zcutup.run() # doctest: +SKIP @@ -2466,7 +2466,7 @@ class GCOR(CommandLine): >>> gcor = afni.GCOR() >>> gcor.inputs.in_file = 'structural.nii' >>> gcor.inputs.nfirst = 4 - >>> gcor.cmdline # doctest: +ALLOW_UNICODE + >>> gcor.cmdline '@compute_gcor -nfirst 4 -input structural.nii' >>> res = gcor.run() # doctest: +SKIP @@ -2538,7 +2538,7 @@ class Axialize(AFNICommand): >>> axial3d = afni.Axialize() >>> axial3d.inputs.in_file = 'functional.nii' >>> axial3d.inputs.out_file = 'axialized.nii' - >>> axial3d.cmdline # doctest: +ALLOW_UNICODE + >>> axial3d.cmdline '3daxialize -prefix axialized.nii functional.nii' >>> res = axial3d.run() # doctest: +SKIP @@ -2600,7 +2600,7 @@ class Zcat(AFNICommand): >>> zcat = afni.Zcat() >>> zcat.inputs.in_files = ['functional2.nii', 'functional3.nii'] >>> zcat.inputs.out_file = 'cat_functional.nii' - >>> zcat.cmdline # doctest: +ALLOW_UNICODE + >>> zcat.cmdline '3dZcat -prefix cat_functional.nii functional2.nii functional3.nii' >>> res = zcat.run() # doctest: +SKIP """ @@ -2702,7 +2702,7 @@ class Zeropad(AFNICommand): >>> zeropad.inputs.P = 10 >>> zeropad.inputs.R = 10 >>> zeropad.inputs.L = 10 - >>> zeropad.cmdline # doctest: +ALLOW_UNICODE + >>> zeropad.cmdline '3dZeropad -A 10 -I 10 -L 10 -P 10 -R 10 -S 10 -prefix pad_functional.nii functional.nii' >>> res = zeropad.run() # doctest: +SKIP """ diff --git a/nipype/interfaces/ants/legacy.py b/nipype/interfaces/ants/legacy.py index f545f3ed08..7df1731fa1 100644 --- a/nipype/interfaces/ants/legacy.py +++ b/nipype/interfaces/ants/legacy.py @@ -86,7 +86,7 @@ class antsIntroduction(ANTSCommand): >>> warp.inputs.reference_image = 'Template_6.nii' >>> warp.inputs.input_image = 'structural.nii' >>> warp.inputs.max_iterations = [30,90,20] - >>> warp.cmdline # doctest: +ALLOW_UNICODE + >>> warp.cmdline 'antsIntroduction.sh -d 3 -i structural.nii -m 30x90x20 -o ants_ -r Template_6.nii -t GR' """ @@ -204,7 +204,7 @@ class buildtemplateparallel(ANTSCommand): >>> tmpl = buildtemplateparallel() >>> tmpl.inputs.in_files = ['T1.nii', 'structural.nii'] >>> tmpl.inputs.max_iterations = [30, 90, 20] - >>> tmpl.cmdline # doctest: +ALLOW_UNICODE + >>> tmpl.cmdline 'buildtemplateparallel.sh -d 3 -i 4 -m 30x90x20 -o antsTMPL_ -c 0 -t GR T1.nii structural.nii' """ diff --git a/nipype/interfaces/ants/registration.py b/nipype/interfaces/ants/registration.py index 0b0e8f581e..c166bec792 100644 --- a/nipype/interfaces/ants/registration.py +++ b/nipype/interfaces/ants/registration.py @@ -119,7 +119,7 @@ class ANTS(ANTSCommand): >>> ants.inputs.regularization_gradient_field_sigma = 3 >>> ants.inputs.regularization_deformation_field_sigma = 0 >>> ants.inputs.number_of_affine_iterations = [10000,10000,10000,10000,10000] - >>> ants.cmdline # doctest: +ALLOW_UNICODE + >>> ants.cmdline 'ANTS 3 --MI-option 32x16000 --image-metric CC[ T1.nii, resting.nii, 1, 5 ] --number-of-affine-iterations \ 10000x10000x10000x10000x10000 --number-of-iterations 50x35x15 --output-naming MY --regularization Gauss[3.0,0.0] \ --transformation-model SyN[0.25] --use-Histogram-Matching 1' @@ -517,7 +517,7 @@ class Registration(ANTSCommand): >>> reg.inputs.use_estimate_learning_rate_once = [True, True] >>> reg.inputs.use_histogram_matching = [True, True] # This is the default >>> reg.inputs.output_warped_image = 'output_warped_image.nii.gz' - >>> reg.cmdline # doctest: +ALLOW_UNICODE + >>> reg.cmdline 'antsRegistration --collapse-output-transforms 0 --dimensionality 3 --initial-moving-transform [ trans.mat, 0 ] \ --initialize-transforms-per-stage 0 --interpolation Linear --output [ output_, output_warped_image.nii.gz ] \ --transform Affine[ 2.0 ] --metric Mattes[ fixed1.nii, moving1.nii, 1, 32, Random, 0.05 ] \ @@ -533,7 +533,7 @@ class Registration(ANTSCommand): >>> reg.inputs.invert_initial_moving_transform = True >>> reg1 = copy.deepcopy(reg) >>> reg1.inputs.winsorize_lower_quantile = 0.025 - >>> reg1.cmdline # doctest: +ALLOW_UNICODE + >>> reg1.cmdline 'antsRegistration --collapse-output-transforms 0 --dimensionality 3 --initial-moving-transform [ trans.mat, 1 ] \ --initialize-transforms-per-stage 0 --interpolation Linear --output [ output_, output_warped_image.nii.gz ] \ --transform Affine[ 2.0 ] --metric Mattes[ fixed1.nii, moving1.nii, 1, 32, Random, 0.05 ] \ @@ -549,7 +549,7 @@ class Registration(ANTSCommand): >>> reg2 = copy.deepcopy(reg) >>> reg2.inputs.winsorize_upper_quantile = 0.975 - >>> reg2.cmdline # doctest: +ALLOW_UNICODE + >>> reg2.cmdline 'antsRegistration --collapse-output-transforms 0 --dimensionality 3 --initial-moving-transform [ trans.mat, 1 ] \ --initialize-transforms-per-stage 0 --interpolation Linear --output [ output_, output_warped_image.nii.gz ] \ --transform Affine[ 2.0 ] --metric Mattes[ fixed1.nii, moving1.nii, 1, 32, Random, 0.05 ] \ @@ -566,7 +566,7 @@ class Registration(ANTSCommand): >>> reg3 = copy.deepcopy(reg) >>> reg3.inputs.winsorize_lower_quantile = 0.025 >>> reg3.inputs.winsorize_upper_quantile = 0.975 - >>> reg3.cmdline # doctest: +ALLOW_UNICODE + >>> reg3.cmdline 'antsRegistration --collapse-output-transforms 0 --dimensionality 3 --initial-moving-transform [ trans.mat, 1 ] \ --initialize-transforms-per-stage 0 --interpolation Linear --output [ output_, output_warped_image.nii.gz ] \ --transform Affine[ 2.0 ] --metric Mattes[ fixed1.nii, moving1.nii, 1, 32, Random, 0.05 ] \ @@ -580,7 +580,7 @@ class Registration(ANTSCommand): >>> reg3a = copy.deepcopy(reg) >>> reg3a.inputs.float = True - >>> reg3a.cmdline # doctest: +ALLOW_UNICODE + >>> reg3a.cmdline 'antsRegistration --collapse-output-transforms 0 --dimensionality 3 --float 1 \ --initial-moving-transform [ trans.mat, 1 ] --initialize-transforms-per-stage 0 --interpolation Linear \ --output [ output_, output_warped_image.nii.gz ] --transform Affine[ 2.0 ] \ @@ -595,7 +595,7 @@ class Registration(ANTSCommand): >>> reg3b = copy.deepcopy(reg) >>> reg3b.inputs.float = False - >>> reg3b.cmdline # doctest: +ALLOW_UNICODE + >>> reg3b.cmdline 'antsRegistration --collapse-output-transforms 0 --dimensionality 3 --float 0 \ --initial-moving-transform [ trans.mat, 1 ] --initialize-transforms-per-stage 0 --interpolation Linear \ --output [ output_, output_warped_image.nii.gz ] --transform Affine[ 2.0 ] \ @@ -616,7 +616,7 @@ class Registration(ANTSCommand): >>> reg4.inputs.initialize_transforms_per_stage = True >>> reg4.inputs.collapse_output_transforms = True >>> outputs = reg4._list_outputs() - >>> pprint.pprint(outputs) # doctest: +ELLIPSIS, +NORMALIZE_WHITESPACE +ALLOW_UNICODE + >>> pprint.pprint(outputs) # doctest: +ELLIPSIS, {'composite_transform': '.../nipype/testing/data/output_Composite.h5', 'elapsed_time': , 'forward_invert_flags': [], @@ -628,7 +628,7 @@ class Registration(ANTSCommand): 'reverse_transforms': [], 'save_state': '.../nipype/testing/data/trans.mat', 'warped_image': '.../nipype/testing/data/output_warped_image.nii.gz'} - >>> reg4.cmdline # doctest: +ALLOW_UNICODE + >>> reg4.cmdline 'antsRegistration --collapse-output-transforms 1 --dimensionality 3 --initial-moving-transform [ trans.mat, 1 ] \ --initialize-transforms-per-stage 1 --interpolation Linear --output [ output_, output_warped_image.nii.gz ] \ --restore-state trans.mat --save-state trans.mat --transform Affine[ 2.0 ] \ @@ -644,7 +644,7 @@ class Registration(ANTSCommand): >>> reg4b = copy.deepcopy(reg4) >>> reg4b.inputs.write_composite_transform = False >>> outputs = reg4b._list_outputs() - >>> pprint.pprint(outputs) # doctest: +ELLIPSIS, +NORMALIZE_WHITESPACE +ALLOW_UNICODE + >>> pprint.pprint(outputs) # doctest: +ELLIPSIS, {'composite_transform': , 'elapsed_time': , 'forward_invert_flags': [False, False], @@ -659,7 +659,7 @@ class Registration(ANTSCommand): 'save_state': '.../nipype/testing/data/trans.mat', 'warped_image': '.../nipype/testing/data/output_warped_image.nii.gz'} >>> reg4b.aggregate_outputs() # doctest: +SKIP - >>> reg4b.cmdline # doctest: +ALLOW_UNICODE + >>> reg4b.cmdline 'antsRegistration --collapse-output-transforms 1 --dimensionality 3 --initial-moving-transform [ trans.mat, 1 ] \ --initialize-transforms-per-stage 1 --interpolation Linear --output [ output_, output_warped_image.nii.gz ] \ --restore-state trans.mat --save-state trans.mat --transform Affine[ 2.0 ] \ @@ -687,7 +687,7 @@ class Registration(ANTSCommand): >>> reg5.inputs.radius_or_number_of_bins = [32, [32, 4] ] >>> reg5.inputs.sampling_strategy = ['Random', None] # use default strategy in second stage >>> reg5.inputs.sampling_percentage = [0.05, [0.05, 0.10]] - >>> reg5.cmdline # doctest: +ALLOW_UNICODE + >>> reg5.cmdline 'antsRegistration --collapse-output-transforms 0 --dimensionality 3 --initial-moving-transform [ trans.mat, 1 ] \ --initialize-transforms-per-stage 0 --interpolation Linear --output [ output_, output_warped_image.nii.gz ] \ --transform Affine[ 2.0 ] --metric Mattes[ fixed1.nii, moving1.nii, 1, 32, Random, 0.05 ] \ @@ -708,7 +708,7 @@ class Registration(ANTSCommand): >>> reg6 = copy.deepcopy(reg5) >>> reg6.inputs.fixed_image = ['fixed1.nii', 'fixed2.nii'] >>> reg6.inputs.moving_image = ['moving1.nii', 'moving2.nii'] - >>> reg6.cmdline # doctest: +ALLOW_UNICODE + >>> reg6.cmdline 'antsRegistration --collapse-output-transforms 0 --dimensionality 3 --initial-moving-transform [ trans.mat, 1 ] \ --initialize-transforms-per-stage 0 --interpolation Linear --output [ output_, output_warped_image.nii.gz ] \ --transform Affine[ 2.0 ] --metric Mattes[ fixed1.nii, moving1.nii, 1, 32, Random, 0.05 ] \ @@ -725,7 +725,7 @@ class Registration(ANTSCommand): >>> reg7a = copy.deepcopy(reg) >>> reg7a.inputs.interpolation = 'BSpline' >>> reg7a.inputs.interpolation_parameters = (3,) - >>> reg7a.cmdline # doctest: +ALLOW_UNICODE + >>> reg7a.cmdline 'antsRegistration --collapse-output-transforms 0 --dimensionality 3 --initial-moving-transform [ trans.mat, 1 ] \ --initialize-transforms-per-stage 0 --interpolation BSpline[ 3 ] --output [ output_, output_warped_image.nii.gz ] \ --transform Affine[ 2.0 ] --metric Mattes[ fixed1.nii, moving1.nii, 1, 32, Random, 0.05 ] \ @@ -739,7 +739,7 @@ class Registration(ANTSCommand): >>> reg7b = copy.deepcopy(reg) >>> reg7b.inputs.interpolation = 'Gaussian' >>> reg7b.inputs.interpolation_parameters = (1.0, 1.0) - >>> reg7b.cmdline # doctest: +ALLOW_UNICODE + >>> reg7b.cmdline 'antsRegistration --collapse-output-transforms 0 --dimensionality 3 --initial-moving-transform [ trans.mat, 1 ] \ --initialize-transforms-per-stage 0 --interpolation Gaussian[ 1.0, 1.0 ] \ --output [ output_, output_warped_image.nii.gz ] --transform Affine[ 2.0 ] \ @@ -756,7 +756,7 @@ class Registration(ANTSCommand): >>> reg8 = copy.deepcopy(reg) >>> reg8.inputs.transforms = ['Affine', 'BSplineSyN'] >>> reg8.inputs.transform_parameters = [(2.0,), (0.25, 26, 0, 3)] - >>> reg8.cmdline # doctest: +ALLOW_UNICODE + >>> reg8.cmdline 'antsRegistration --collapse-output-transforms 0 --dimensionality 3 --initial-moving-transform [ trans.mat, 1 ] \ --initialize-transforms-per-stage 0 --interpolation Linear --output [ output_, output_warped_image.nii.gz ] \ --transform Affine[ 2.0 ] --metric Mattes[ fixed1.nii, moving1.nii, 1, 32, Random, 0.05 ] \ @@ -771,7 +771,7 @@ class Registration(ANTSCommand): >>> # Test masking >>> reg9 = copy.deepcopy(reg) >>> reg9.inputs.fixed_image_masks = ['NULL', 'fixed1.nii'] - >>> reg9.cmdline # doctest: +ALLOW_UNICODE + >>> reg9.cmdline 'antsRegistration --collapse-output-transforms 0 --dimensionality 3 --initial-moving-transform [ trans.mat, 1 ] \ --initialize-transforms-per-stage 0 --interpolation Linear --output [ output_, output_warped_image.nii.gz ] \ --transform Affine[ 2.0 ] --metric Mattes[ fixed1.nii, moving1.nii, 1, 32, Random, 0.05 ] \ @@ -790,7 +790,7 @@ class Registration(ANTSCommand): >>> reg10 = copy.deepcopy(reg) >>> reg10.inputs.initial_moving_transform = ['func_to_struct.mat', 'ants_Warp.nii.gz'] >>> reg10.inputs.invert_initial_moving_transform = [False, False] - >>> reg10.cmdline # doctest: +ALLOW_UNICODE + >>> reg10.cmdline 'antsRegistration --collapse-output-transforms 0 --dimensionality 3 --initial-moving-transform \ [ func_to_struct.mat, 0 ] [ ants_Warp.nii.gz, 0 ] --initialize-transforms-per-stage 0 --interpolation Linear \ --output [ output_, output_warped_image.nii.gz ] --transform Affine[ 2.0 ] \ @@ -1290,7 +1290,7 @@ class MeasureImageSimilarity(ANTSCommand): >>> sim.inputs.sampling_percentage = 1.0 >>> sim.inputs.fixed_image_mask = 'mask.nii' >>> sim.inputs.moving_image_mask = 'mask.nii.gz' - >>> sim.cmdline # doctest: +ALLOW_UNICODE + >>> sim.cmdline u'MeasureImageSimilarity --dimensionality 3 --masks ["mask.nii","mask.nii.gz"] \ --metric MI["T1.nii","resting.nii",1.0,5,Regular,1.0]' """ diff --git a/nipype/interfaces/ants/resampling.py b/nipype/interfaces/ants/resampling.py index 9ee9243a61..e268cb43e2 100644 --- a/nipype/interfaces/ants/resampling.py +++ b/nipype/interfaces/ants/resampling.py @@ -66,7 +66,7 @@ class WarpTimeSeriesImageMultiTransform(ANTSCommand): >>> wtsimt.inputs.input_image = 'resting.nii' >>> wtsimt.inputs.reference_image = 'ants_deformed.nii.gz' >>> wtsimt.inputs.transformation_series = ['ants_Warp.nii.gz','ants_Affine.txt'] - >>> wtsimt.cmdline # doctest: +ALLOW_UNICODE + >>> wtsimt.cmdline 'WarpTimeSeriesImageMultiTransform 4 resting.nii resting_wtsimt.nii -R ants_deformed.nii.gz ants_Warp.nii.gz \ ants_Affine.txt' @@ -179,7 +179,7 @@ class WarpImageMultiTransform(ANTSCommand): >>> wimt.inputs.input_image = 'structural.nii' >>> wimt.inputs.reference_image = 'ants_deformed.nii.gz' >>> wimt.inputs.transformation_series = ['ants_Warp.nii.gz','ants_Affine.txt'] - >>> wimt.cmdline # doctest: +ALLOW_UNICODE + >>> wimt.cmdline 'WarpImageMultiTransform 3 structural.nii structural_wimt.nii -R ants_deformed.nii.gz ants_Warp.nii.gz \ ants_Affine.txt' @@ -189,7 +189,7 @@ class WarpImageMultiTransform(ANTSCommand): >>> wimt.inputs.transformation_series = ['func2anat_coreg_Affine.txt','func2anat_InverseWarp.nii.gz', \ 'dwi2anat_Warp.nii.gz','dwi2anat_coreg_Affine.txt'] >>> wimt.inputs.invert_affine = [1] # this will invert the 1st Affine file: 'func2anat_coreg_Affine.txt' - >>> wimt.cmdline # doctest: +ALLOW_UNICODE + >>> wimt.cmdline 'WarpImageMultiTransform 3 diffusion_weighted.nii diffusion_weighted_wimt.nii -R functional.nii \ -i func2anat_coreg_Affine.txt func2anat_InverseWarp.nii.gz dwi2anat_Warp.nii.gz dwi2anat_coreg_Affine.txt' @@ -305,7 +305,7 @@ class ApplyTransforms(ANTSCommand): >>> at.inputs.input_image = 'moving1.nii' >>> at.inputs.reference_image = 'fixed1.nii' >>> at.inputs.transforms = 'identity' - >>> at.cmdline # doctest: +ALLOW_UNICODE + >>> at.cmdline 'antsApplyTransforms --default-value 0 --input moving1.nii \ --interpolation Linear --output moving1_trans.nii \ --reference-image fixed1.nii -t identity' @@ -319,7 +319,7 @@ class ApplyTransforms(ANTSCommand): >>> at.inputs.default_value = 0 >>> at.inputs.transforms = ['ants_Warp.nii.gz', 'trans.mat'] >>> at.inputs.invert_transform_flags = [False, False] - >>> at.cmdline # doctest: +ALLOW_UNICODE + >>> at.cmdline 'antsApplyTransforms --default-value 0 --dimensionality 3 --input moving1.nii --interpolation Linear \ --output deformed_moving1.nii --reference-image fixed1.nii --transform [ ants_Warp.nii.gz, 0 ] \ --transform [ trans.mat, 0 ]' @@ -334,7 +334,7 @@ class ApplyTransforms(ANTSCommand): >>> at1.inputs.default_value = 0 >>> at1.inputs.transforms = ['ants_Warp.nii.gz', 'trans.mat'] >>> at1.inputs.invert_transform_flags = [False, False] - >>> at1.cmdline # doctest: +ALLOW_UNICODE + >>> at1.cmdline 'antsApplyTransforms --default-value 0 --dimensionality 3 --input moving1.nii --interpolation BSpline[ 5 ] \ --output deformed_moving1.nii --reference-image fixed1.nii --transform [ ants_Warp.nii.gz, 0 ] \ --transform [ trans.mat, 0 ]' @@ -442,7 +442,7 @@ class ApplyTransformsToPoints(ANTSCommand): >>> at.inputs.input_file = 'moving.csv' >>> at.inputs.transforms = ['trans.mat', 'ants_Warp.nii.gz'] >>> at.inputs.invert_transform_flags = [False, False] - >>> at.cmdline # doctest: +ALLOW_UNICODE + >>> at.cmdline 'antsApplyTransformsToPoints --dimensionality 3 --input moving.csv --output moving_transformed.csv \ --transform [ trans.mat, 0 ] --transform [ ants_Warp.nii.gz, 0 ]' diff --git a/nipype/interfaces/ants/segmentation.py b/nipype/interfaces/ants/segmentation.py index 042303227a..64ca7205ca 100644 --- a/nipype/interfaces/ants/segmentation.py +++ b/nipype/interfaces/ants/segmentation.py @@ -91,7 +91,7 @@ class Atropos(ANTSCommand): >>> at.inputs.posterior_formulation = 'Socrates' >>> at.inputs.use_mixture_model_proportions = True >>> at.inputs.save_posteriors = True - >>> at.cmdline # doctest: +ALLOW_UNICODE + >>> at.cmdline 'Atropos --image-dimensionality 3 --icm [1,1] \ --initialization PriorProbabilityImages[2,priors/priorProbImages%02d.nii,0.8,1e-07] --intensity-image structural.nii \ --likelihood-model Gaussian --mask-image mask.nii --mrf [0.2,1x1x1] --convergence [5,1e-06] \ @@ -209,7 +209,7 @@ class LaplacianThickness(ANTSCommand): >>> cort_thick.inputs.input_wm = 'white_matter.nii.gz' >>> cort_thick.inputs.input_gm = 'gray_matter.nii.gz' >>> cort_thick.inputs.output_image = 'output_thickness.nii.gz' - >>> cort_thick.cmdline # doctest: +ALLOW_UNICODE + >>> cort_thick.cmdline 'LaplacianThickness white_matter.nii.gz gray_matter.nii.gz output_thickness.nii.gz' """ @@ -294,7 +294,7 @@ class N4BiasFieldCorrection(ANTSCommand): >>> n4.inputs.bspline_fitting_distance = 300 >>> n4.inputs.shrink_factor = 3 >>> n4.inputs.n_iterations = [50,50,30,20] - >>> n4.cmdline # doctest: +ALLOW_UNICODE + >>> n4.cmdline 'N4BiasFieldCorrection --bspline-fitting [ 300 ] \ -d 3 --input-image structural.nii \ --convergence [ 50x50x30x20 ] --output structural_corrected.nii \ @@ -302,7 +302,7 @@ class N4BiasFieldCorrection(ANTSCommand): >>> n4_2 = copy.deepcopy(n4) >>> n4_2.inputs.convergence_threshold = 1e-6 - >>> n4_2.cmdline # doctest: +ALLOW_UNICODE + >>> n4_2.cmdline 'N4BiasFieldCorrection --bspline-fitting [ 300 ] \ -d 3 --input-image structural.nii \ --convergence [ 50x50x30x20, 1e-06 ] --output structural_corrected.nii \ @@ -310,7 +310,7 @@ class N4BiasFieldCorrection(ANTSCommand): >>> n4_3 = copy.deepcopy(n4_2) >>> n4_3.inputs.bspline_order = 5 - >>> n4_3.cmdline # doctest: +ALLOW_UNICODE + >>> n4_3.cmdline 'N4BiasFieldCorrection --bspline-fitting [ 300, 5 ] \ -d 3 --input-image structural.nii \ --convergence [ 50x50x30x20, 1e-06 ] --output structural_corrected.nii \ @@ -320,7 +320,7 @@ class N4BiasFieldCorrection(ANTSCommand): >>> n4_4.inputs.input_image = 'structural.nii' >>> n4_4.inputs.save_bias = True >>> n4_4.inputs.dimension = 3 - >>> n4_4.cmdline # doctest: +ALLOW_UNICODE + >>> n4_4.cmdline 'N4BiasFieldCorrection -d 3 --input-image structural.nii \ --output [ structural_corrected.nii, structural_bias.nii ]' """ @@ -530,7 +530,7 @@ class CorticalThickness(ANTSCommand): ... 'BrainSegmentationPrior03.nii.gz', ... 'BrainSegmentationPrior04.nii.gz'] >>> corticalthickness.inputs.t1_registration_template = 'brain_study_template.nii.gz' - >>> corticalthickness.cmdline # doctest: +ALLOW_UNICODE + >>> corticalthickness.cmdline 'antsCorticalThickness.sh -a T1.nii.gz -m ProbabilityMaskOfStudyTemplate.nii.gz -e study_template.nii.gz -d 3 \ -s nii.gz -o antsCT_ -p nipype_priors/BrainSegmentationPrior%02d.nii.gz -t brain_study_template.nii.gz' @@ -709,7 +709,7 @@ class BrainExtraction(ANTSCommand): >>> brainextraction.inputs.anatomical_image ='T1.nii.gz' >>> brainextraction.inputs.brain_template = 'study_template.nii.gz' >>> brainextraction.inputs.brain_probability_mask ='ProbabilityMaskOfStudyTemplate.nii.gz' - >>> brainextraction.cmdline # doctest: +ALLOW_UNICODE + >>> brainextraction.cmdline 'antsBrainExtraction.sh -a T1.nii.gz -m ProbabilityMaskOfStudyTemplate.nii.gz -e study_template.nii.gz -d 3 \ -s nii.gz -o highres001_' """ @@ -900,7 +900,7 @@ class JointFusion(ANTSCommand): ... 'segmentation1.nii.gz', ... 'segmentation1.nii.gz'] >>> at.inputs.target_image = 'T1.nii' - >>> at.cmdline # doctest: +ALLOW_UNICODE + >>> at.cmdline 'jointfusion 3 1 -m Joint[0.1,2] -tg T1.nii -g im1.nii -g im2.nii -g im3.nii -l segmentation0.nii.gz \ -l segmentation1.nii.gz -l segmentation1.nii.gz fusion_labelimage_output.nii' @@ -909,7 +909,7 @@ class JointFusion(ANTSCommand): >>> at.inputs.beta = 1 >>> at.inputs.patch_radius = [3,2,1] >>> at.inputs.search_radius = [1,2,3] - >>> at.cmdline # doctest: +ALLOW_UNICODE + >>> at.cmdline 'jointfusion 3 1 -m Joint[0.5,1] -rp 3x2x1 -rs 1x2x3 -tg T1.nii -g im1.nii -g im2.nii -g im3.nii \ -l segmentation0.nii.gz -l segmentation1.nii.gz -l segmentation1.nii.gz fusion_labelimage_output.nii' """ @@ -986,20 +986,20 @@ class DenoiseImage(ANTSCommand): >>> denoise = DenoiseImage() >>> denoise.inputs.dimension = 3 >>> denoise.inputs.input_image = 'im1.nii' - >>> denoise.cmdline # doctest: +ALLOW_UNICODE + >>> denoise.cmdline 'DenoiseImage -d 3 -i im1.nii -n Gaussian -o im1_noise_corrected.nii -s 1' >>> denoise_2 = copy.deepcopy(denoise) >>> denoise_2.inputs.output_image = 'output_corrected_image.nii.gz' >>> denoise_2.inputs.noise_model = 'Rician' >>> denoise_2.inputs.shrink_factor = 2 - >>> denoise_2.cmdline # doctest: +ALLOW_UNICODE + >>> denoise_2.cmdline 'DenoiseImage -d 3 -i im1.nii -n Rician -o output_corrected_image.nii.gz -s 2' >>> denoise_3 = DenoiseImage() >>> denoise_3.inputs.input_image = 'im1.nii' >>> denoise_3.inputs.save_noise = True - >>> denoise_3.cmdline # doctest: +ALLOW_UNICODE + >>> denoise_3.cmdline 'DenoiseImage -i im1.nii -n Gaussian -o [ im1_noise_corrected.nii, im1_noise.nii ] -s 1' """ input_spec = DenoiseImageInputSpec @@ -1103,12 +1103,12 @@ class AntsJointFusion(ANTSCommand): >>> antsjointfusion.inputs.atlas_image = [ ['rc1s1.nii','rc1s2.nii'] ] >>> antsjointfusion.inputs.atlas_segmentation_image = ['segmentation0.nii.gz'] >>> antsjointfusion.inputs.target_image = ['im1.nii'] - >>> antsjointfusion.cmdline # doctest: +ALLOW_UNICODE + >>> antsjointfusion.cmdline "antsJointFusion -a 0.1 -g ['rc1s1.nii', 'rc1s2.nii'] -l segmentation0.nii.gz \ -b 2.0 -o ants_fusion_label_output.nii -s 3x3x3 -t ['im1.nii']" >>> antsjointfusion.inputs.target_image = [ ['im1.nii', 'im2.nii'] ] - >>> antsjointfusion.cmdline # doctest: +ALLOW_UNICODE + >>> antsjointfusion.cmdline "antsJointFusion -a 0.1 -g ['rc1s1.nii', 'rc1s2.nii'] -l segmentation0.nii.gz \ -b 2.0 -o ants_fusion_label_output.nii -s 3x3x3 -t ['im1.nii', 'im2.nii']" @@ -1116,7 +1116,7 @@ class AntsJointFusion(ANTSCommand): ... ['rc2s1.nii','rc2s2.nii'] ] >>> antsjointfusion.inputs.atlas_segmentation_image = ['segmentation0.nii.gz', ... 'segmentation1.nii.gz'] - >>> antsjointfusion.cmdline # doctest: +ALLOW_UNICODE + >>> antsjointfusion.cmdline "antsJointFusion -a 0.1 -g ['rc1s1.nii', 'rc1s2.nii'] -g ['rc2s1.nii', 'rc2s2.nii'] \ -l segmentation0.nii.gz -l segmentation1.nii.gz -b 2.0 -o ants_fusion_label_output.nii \ -s 3x3x3 -t ['im1.nii', 'im2.nii']" @@ -1126,7 +1126,7 @@ class AntsJointFusion(ANTSCommand): >>> antsjointfusion.inputs.beta = 1.0 >>> antsjointfusion.inputs.patch_radius = [3,2,1] >>> antsjointfusion.inputs.search_radius = [3] - >>> antsjointfusion.cmdline # doctest: +ALLOW_UNICODE + >>> antsjointfusion.cmdline "antsJointFusion -a 0.5 -g ['rc1s1.nii', 'rc1s2.nii'] -g ['rc2s1.nii', 'rc2s2.nii'] \ -l segmentation0.nii.gz -l segmentation1.nii.gz -b 1.0 -d 3 -o ants_fusion_label_output.nii \ -p 3x2x1 -s 3 -t ['im1.nii', 'im2.nii']" @@ -1135,7 +1135,7 @@ class AntsJointFusion(ANTSCommand): >>> antsjointfusion.inputs.verbose = True >>> antsjointfusion.inputs.exclusion_image = ['roi01.nii', 'roi02.nii'] >>> antsjointfusion.inputs.exclusion_image_label = ['1','2'] - >>> antsjointfusion.cmdline # doctest: +ALLOW_UNICODE + >>> antsjointfusion.cmdline "antsJointFusion -a 0.5 -g ['rc1s1.nii', 'rc1s2.nii'] -g ['rc2s1.nii', 'rc2s2.nii'] \ -l segmentation0.nii.gz -l segmentation1.nii.gz -b 1.0 -d 3 -e 1[roi01.nii] -e 2[roi02.nii] \ -o ants_fusion_label_output.nii -p 3x2x1 -s mask.nii -t ['im1.nii', 'im2.nii'] -v" @@ -1144,7 +1144,7 @@ class AntsJointFusion(ANTSCommand): >>> antsjointfusion.inputs.out_intensity_fusion_name_format = 'ants_joint_fusion_intensity_%d.nii.gz' >>> antsjointfusion.inputs.out_label_post_prob_name_format = 'ants_joint_fusion_posterior_%d.nii.gz' >>> antsjointfusion.inputs.out_atlas_voting_weight_name_format = 'ants_joint_fusion_voting_weight_%d.nii.gz' - >>> antsjointfusion.cmdline # doctest: +ALLOW_UNICODE + >>> antsjointfusion.cmdline "antsJointFusion -a 0.5 -g ['rc1s1.nii', 'rc1s2.nii'] -g ['rc2s1.nii', 'rc2s2.nii'] \ -l segmentation0.nii.gz -l segmentation1.nii.gz -b 1.0 -d 3 -e 1[roi01.nii] -e 2[roi02.nii] \ -o [ants_fusion_label_output.nii, ants_joint_fusion_intensity_%d.nii.gz, \ @@ -1323,7 +1323,7 @@ class KellyKapowski(ANTSCommand): >>> #kk.inputs.use_bspline_smoothing = False >>> kk.inputs.number_integration_points = 10 >>> kk.inputs.thickness_prior_estimate = 10 - >>> kk.cmdline # doctest: +ALLOW_UNICODE + >>> kk.cmdline u'KellyKapowski --convergence "[45,0.0,10]" \ --output "[segmentation0_cortical_thickness.nii.gz,segmentation0_warped_white_matter.nii.gz]" \ --image-dimensionality 3 --gradient-step 0.025000 --number-of-integration-points 10 \ diff --git a/nipype/interfaces/ants/utils.py b/nipype/interfaces/ants/utils.py index 88d6d219a2..0ba918ee27 100644 --- a/nipype/interfaces/ants/utils.py +++ b/nipype/interfaces/ants/utils.py @@ -37,7 +37,7 @@ class AverageAffineTransform(ANTSCommand): >>> avg.inputs.dimension = 3 >>> avg.inputs.transforms = ['trans.mat', 'func_to_struct.mat'] >>> avg.inputs.output_affine_transform = 'MYtemplatewarp.mat' - >>> avg.cmdline # doctest: +ALLOW_UNICODE + >>> avg.cmdline 'AverageAffineTransform 3 MYtemplatewarp.mat trans.mat func_to_struct.mat' """ _cmd = 'AverageAffineTransform' @@ -83,7 +83,7 @@ class AverageImages(ANTSCommand): >>> avg.inputs.output_average_image = "average.nii.gz" >>> avg.inputs.normalize = True >>> avg.inputs.images = ['rc1s1.nii', 'rc1s1.nii'] - >>> avg.cmdline # doctest: +ALLOW_UNICODE + >>> avg.cmdline 'AverageImages 3 average.nii.gz 1 rc1s1.nii rc1s1.nii' """ _cmd = 'AverageImages' @@ -126,7 +126,7 @@ class MultiplyImages(ANTSCommand): >>> test.inputs.first_input = 'moving2.nii' >>> test.inputs.second_input = 0.25 >>> test.inputs.output_product_image = "out.nii" - >>> test.cmdline # doctest: +ALLOW_UNICODE + >>> test.cmdline 'MultiplyImages 3 moving2.nii 0.25 out.nii' """ _cmd = 'MultiplyImages' @@ -170,7 +170,7 @@ class CreateJacobianDeterminantImage(ANTSCommand): >>> jacobian.inputs.imageDimension = 3 >>> jacobian.inputs.deformationField = 'ants_Warp.nii.gz' >>> jacobian.inputs.outputImage = 'out_name.nii.gz' - >>> jacobian.cmdline # doctest: +ALLOW_UNICODE + >>> jacobian.cmdline 'CreateJacobianDeterminantImage 3 ants_Warp.nii.gz out_name.nii.gz' """ @@ -223,7 +223,7 @@ class AffineInitializer(ANTSCommand): >>> init = AffineInitializer() >>> init.inputs.fixed_image = 'fixed1.nii' >>> init.inputs.moving_image = 'moving1.nii' - >>> init.cmdline # doctest: +ALLOW_UNICODE + >>> init.cmdline 'antsAffineInitializer 3 fixed1.nii moving1.nii transform.mat 15.000000 0.100000 0 10' """ @@ -261,7 +261,7 @@ class ComposeMultiTransform(ANTSCommand): >>> compose_transform = ComposeMultiTransform() >>> compose_transform.inputs.dimension = 3 >>> compose_transform.inputs.transforms = ['struct_to_template.mat', 'func_to_struct.mat'] - >>> compose_transform.cmdline # doctest: +ALLOW_UNICODE + >>> compose_transform.cmdline 'ComposeMultiTransform 3 struct_to_template_composed struct_to_template.mat func_to_struct.mat' """ diff --git a/nipype/interfaces/ants/visualization.py b/nipype/interfaces/ants/visualization.py index ef51914e6c..07cf8af086 100644 --- a/nipype/interfaces/ants/visualization.py +++ b/nipype/interfaces/ants/visualization.py @@ -57,7 +57,7 @@ class ConvertScalarImageToRGB(ANTSCommand): >>> converter.inputs.colormap = 'jet' >>> converter.inputs.minimum_input = 0 >>> converter.inputs.maximum_input = 6 - >>> converter.cmdline # doctest: +ALLOW_UNICODE + >>> converter.cmdline 'ConvertScalarImageToRGB 3 T1.nii.gz rgb.nii.gz none jet none 0 6 0 255' """ _cmd = 'ConvertScalarImageToRGB' @@ -143,7 +143,7 @@ class CreateTiledMosaic(ANTSCommand): >>> mosaic_slicer.inputs.direction = 2 >>> mosaic_slicer.inputs.pad_or_crop = '[ -15x -50 , -15x -30 ,0]' >>> mosaic_slicer.inputs.slices = '[2 ,100 ,160]' - >>> mosaic_slicer.cmdline # doctest: +ALLOW_UNICODE + >>> mosaic_slicer.cmdline 'CreateTiledMosaic -a 0.50 -d 2 -i T1.nii.gz -x mask.nii.gz -o output.png -p [ -15x -50 , -15x -30 ,0] \ -r rgb.nii.gz -s [2 ,100 ,160]' """ diff --git a/nipype/interfaces/base.py b/nipype/interfaces/base.py index 7f586d4923..0fa9559718 100644 --- a/nipype/interfaces/base.py +++ b/nipype/interfaces/base.py @@ -123,10 +123,10 @@ class Bunch(object): -------- >>> from nipype.interfaces.base import Bunch >>> inputs = Bunch(infile='subj.nii', fwhm=6.0, register_to_mean=True) - >>> inputs # doctest: +ALLOW_UNICODE + >>> inputs Bunch(fwhm=6.0, infile='subj.nii', register_to_mean=True) >>> inputs.register_to_mean = False - >>> inputs # doctest: +ALLOW_UNICODE + >>> inputs Bunch(fwhm=6.0, infile='subj.nii', register_to_mean=False) @@ -1225,6 +1225,14 @@ class SimpleInterface(BaseInterface): Examples -------- + + .. testsetup:: + + >>> tmp = getfixture('tmpdir') + >>> old = tmp.chdir() # changing to a temporary directory + + .. doctest:: + >>> def double(x): ... return 2 * x ... @@ -1246,6 +1254,11 @@ class SimpleInterface(BaseInterface): >>> dbl.inputs.x = 2 >>> dbl.run().outputs.doubled 4.0 + + .. testsetup:: + + >>> os.chdir(old.strpath) + """ def __init__(self, from_file=None, resource_monitor=None, **inputs): super(SimpleInterface, self).__init__( @@ -1509,18 +1522,18 @@ class must be instantiated with a command argument >>> from nipype.interfaces.base import CommandLine >>> cli = CommandLine(command='ls', environ={'DISPLAY': ':1'}) >>> cli.inputs.args = '-al' - >>> cli.cmdline # doctest: +ALLOW_UNICODE + >>> cli.cmdline 'ls -al' # Use get_traitsfree() to check all inputs set - >>> pprint.pprint(cli.inputs.get_traitsfree()) # doctest: +NORMALIZE_WHITESPACE +ALLOW_UNICODE + >>> pprint.pprint(cli.inputs.get_traitsfree()) # doctest: {'args': '-al', 'environ': {'DISPLAY': ':1'}, 'ignore_exception': False} - >>> cli.inputs.get_hashval()[0][0] # doctest: +ALLOW_UNICODE + >>> cli.inputs.get_hashval()[0][0] ('args', '-al') - >>> cli.inputs.get_hashval()[1] # doctest: +ALLOW_UNICODE + >>> cli.inputs.get_hashval()[1] '11c37f97649cd61627f4afe5136af8c0' """ @@ -1850,12 +1863,12 @@ class MpiCommandLine(CommandLine): >>> from nipype.interfaces.base import MpiCommandLine >>> mpi_cli = MpiCommandLine(command='my_mpi_prog') >>> mpi_cli.inputs.args = '-v' - >>> mpi_cli.cmdline # doctest: +ALLOW_UNICODE + >>> mpi_cli.cmdline 'my_mpi_prog -v' >>> mpi_cli.inputs.use_mpi = True >>> mpi_cli.inputs.n_procs = 8 - >>> mpi_cli.cmdline # doctest: +ALLOW_UNICODE + >>> mpi_cli.cmdline 'mpiexec -n 8 my_mpi_prog -v' """ input_spec = MpiCommandLineInputSpec @@ -1965,15 +1978,15 @@ class OutputMultiPath(MultiPath): >>> a.foo = '/software/temp/foo.txt' - >>> a.foo # doctest: +ALLOW_UNICODE + >>> a.foo '/software/temp/foo.txt' >>> a.foo = ['/software/temp/foo.txt'] - >>> a.foo # doctest: +ALLOW_UNICODE + >>> a.foo '/software/temp/foo.txt' >>> a.foo = ['/software/temp/foo.txt', '/software/temp/goo.txt'] - >>> a.foo # doctest: +ALLOW_UNICODE + >>> a.foo ['/software/temp/foo.txt', '/software/temp/goo.txt'] """ @@ -2010,15 +2023,15 @@ class InputMultiPath(MultiPath): >>> a.foo = '/software/temp/foo.txt' - >>> a.foo # doctest: +ALLOW_UNICODE + >>> a.foo ['/software/temp/foo.txt'] >>> a.foo = ['/software/temp/foo.txt'] - >>> a.foo # doctest: +ALLOW_UNICODE + >>> a.foo ['/software/temp/foo.txt'] >>> a.foo = ['/software/temp/foo.txt', '/software/temp/goo.txt'] - >>> a.foo # doctest: +ALLOW_UNICODE + >>> a.foo ['/software/temp/foo.txt', '/software/temp/goo.txt'] """ diff --git a/nipype/interfaces/bru2nii.py b/nipype/interfaces/bru2nii.py index d469f8bda6..579b5229b9 100644 --- a/nipype/interfaces/bru2nii.py +++ b/nipype/interfaces/bru2nii.py @@ -42,7 +42,7 @@ class Bru2(CommandLine): >>> from nipype.interfaces.bru2nii import Bru2 >>> converter = Bru2() >>> converter.inputs.input_dir = "brukerdir" - >>> converter.cmdline # doctest: +ELLIPSIS +ALLOW_UNICODE + >>> converter.cmdline # doctest: +ELLIPSIS 'Bru2 -o .../nipype/testing/data/brukerdir brukerdir' """ input_spec = Bru2InputSpec diff --git a/nipype/interfaces/c3.py b/nipype/interfaces/c3.py index 8288ab3b17..334500874c 100644 --- a/nipype/interfaces/c3.py +++ b/nipype/interfaces/c3.py @@ -38,7 +38,7 @@ class C3dAffineTool(SEMLikeCommandLine): >>> c3.inputs.source_file = 'cmatrix.mat' >>> c3.inputs.itk_transform = 'affine.txt' >>> c3.inputs.fsl2ras = True - >>> c3.cmdline # doctest: +ALLOW_UNICODE + >>> c3.cmdline 'c3d_affine_tool -src cmatrix.mat -fsl2ras -oitk affine.txt' """ input_spec = C3dAffineToolInputSpec diff --git a/nipype/interfaces/cmtk/tests/test_nbs.py b/nipype/interfaces/cmtk/tests/test_nbs.py index cc4b064fc1..0516390b02 100644 --- a/nipype/interfaces/cmtk/tests/test_nbs.py +++ b/nipype/interfaces/cmtk/tests/test_nbs.py @@ -18,7 +18,7 @@ def creating_graphs(tmpdir): for idx, name in enumerate(graphnames): graph = np.random.rand(10,10) G = nx.from_numpy_matrix(graph) - out_file = str(tmpdir) + graphnames[idx] + '.pck' + out_file = tmpdir.strpath + graphnames[idx] + '.pck' # Save as pck file nx.write_gpickle(G, out_file) graphlist.append(out_file) @@ -26,7 +26,8 @@ def creating_graphs(tmpdir): @pytest.mark.skipif(have_cv, reason="tests for import error, cviewer available") -def test_importerror(creating_graphs): +def test_importerror(creating_graphs, tmpdir): + tmpdir.chdir() graphlist = creating_graphs group1 = graphlist[:3] group2 = graphlist[3:] diff --git a/nipype/interfaces/dcm2nii.py b/nipype/interfaces/dcm2nii.py index 8379834b81..22e9375609 100644 --- a/nipype/interfaces/dcm2nii.py +++ b/nipype/interfaces/dcm2nii.py @@ -70,13 +70,25 @@ class Dcm2nii(CommandLine): Examples ======== + .. testsetup:: + + >>> tmp = getfixture('tmpdir') + >>> old = tmp.chdir() # changing to a temporary directory + + .. doctest:: + >>> from nipype.interfaces.dcm2nii import Dcm2nii >>> converter = Dcm2nii() - >>> converter.inputs.source_names = ['functional_1.dcm', 'functional_2.dcm'] + >>> converter.inputs.source_names = [os.path.join(datadir, 'functional_1.dcm'), os.path.join(datadir, 'functional_2.dcm')] >>> converter.inputs.gzip_output = True >>> converter.inputs.output_dir = '.' - >>> converter.cmdline # doctest: +ALLOW_UNICODE - 'dcm2nii -a y -c y -b config.ini -v y -d y -e y -g y -i n -n y -o . -p y -x n -f n functional_1.dcm' + >>> converter.cmdline #doctest: +ELLIPSIS + 'dcm2nii -a y -c y -b config.ini -v y -d y -e y -g y -i n -n y -o . -p y -x n -f n ...functional_1.dcm' + + .. testsetup:: + + >>> os.chdir(old.strpath) + """ input_spec = Dcm2niiInputSpec @@ -250,7 +262,7 @@ class Dcm2niix(CommandLine): 'dcm2niix -b y -z i -x n -t n -m n -f %t%p -o . -s y -v n functional_1.dcm' >>> flags = '-'.join([val.strip() + ' ' for val in sorted(' '.join(converter.cmdline.split()[1:-1]).split('-'))]) - >>> flags # doctest: +ALLOW_UNICODE + >>> flags ' -b y -f %t%p -m n -o . -s y -t n -v n -x n -z i ' """ diff --git a/nipype/interfaces/elastix/registration.py b/nipype/interfaces/elastix/registration.py index 205346ed80..77b868c76c 100644 --- a/nipype/interfaces/elastix/registration.py +++ b/nipype/interfaces/elastix/registration.py @@ -55,7 +55,7 @@ class Registration(CommandLine): >>> reg.inputs.fixed_image = 'fixed1.nii' >>> reg.inputs.moving_image = 'moving1.nii' >>> reg.inputs.parameters = ['elastix.txt'] - >>> reg.cmdline # doctest: +ALLOW_UNICODE + >>> reg.cmdline 'elastix -f fixed1.nii -m moving1.nii -out ./ -p elastix.txt' @@ -147,7 +147,7 @@ class ApplyWarp(CommandLine): >>> reg = ApplyWarp() >>> reg.inputs.moving_image = 'moving1.nii' >>> reg.inputs.transform_file = 'TransformParameters.0.txt' - >>> reg.cmdline # doctest: +ALLOW_UNICODE + >>> reg.cmdline 'transformix -in moving1.nii -out ./ -tp TransformParameters.0.txt' @@ -187,7 +187,7 @@ class AnalyzeWarp(CommandLine): >>> from nipype.interfaces.elastix import AnalyzeWarp >>> reg = AnalyzeWarp() >>> reg.inputs.transform_file = 'TransformParameters.0.txt' - >>> reg.cmdline # doctest: +ALLOW_UNICODE + >>> reg.cmdline 'transformix -def all -jac all -jacmat all -out ./ -tp TransformParameters.0.txt' @@ -228,7 +228,7 @@ class PointsWarp(CommandLine): >>> reg = PointsWarp() >>> reg.inputs.points_file = 'surf1.vtk' >>> reg.inputs.transform_file = 'TransformParameters.0.txt' - >>> reg.cmdline # doctest: +ALLOW_UNICODE + >>> reg.cmdline 'transformix -out ./ -def surf1.vtk -tp TransformParameters.0.txt' diff --git a/nipype/interfaces/freesurfer/longitudinal.py b/nipype/interfaces/freesurfer/longitudinal.py index 1292109060..84559c90d9 100644 --- a/nipype/interfaces/freesurfer/longitudinal.py +++ b/nipype/interfaces/freesurfer/longitudinal.py @@ -98,22 +98,22 @@ class RobustTemplate(FSCommandOpenMP): >>> template.inputs.fixed_timepoint = True >>> template.inputs.no_iteration = True >>> template.inputs.subsample_threshold = 200 - >>> template.cmdline #doctest: +NORMALIZE_WHITESPACE +ALLOW_UNICODE + >>> template.cmdline #doctest: 'mri_robust_template --satit --average 0 --fixtp --mov structural.nii functional.nii --inittp 1 --noit --template mri_robust_template_out.mgz --subsample 200' >>> template.inputs.out_file = 'T1.nii' - >>> template.cmdline #doctest: +NORMALIZE_WHITESPACE +ALLOW_UNICODE + >>> template.cmdline #doctest: 'mri_robust_template --satit --average 0 --fixtp --mov structural.nii functional.nii --inittp 1 --noit --template T1.nii --subsample 200' >>> template.inputs.transform_outputs = ['structural.lta', ... 'functional.lta'] >>> template.inputs.scaled_intensity_outputs = ['structural-iscale.txt', ... 'functional-iscale.txt'] - >>> template.cmdline #doctest: +NORMALIZE_WHITESPACE +ALLOW_UNICODE +ELLIPSIS + >>> template.cmdline #doctest: +ELLIPSIS 'mri_robust_template --satit --average 0 --fixtp --mov structural.nii functional.nii --inittp 1 --noit --template T1.nii --iscaleout .../structural-iscale.txt .../functional-iscale.txt --subsample 200 --lta .../structural.lta .../functional.lta' >>> template.inputs.transform_outputs = True >>> template.inputs.scaled_intensity_outputs = True - >>> template.cmdline #doctest: +NORMALIZE_WHITESPACE +ALLOW_UNICODE +ELLIPSIS + >>> template.cmdline #doctest: +ELLIPSIS 'mri_robust_template --satit --average 0 --fixtp --mov structural.nii functional.nii --inittp 1 --noit --template T1.nii --iscaleout .../is1.txt .../is2.txt --subsample 200 --lta .../tp1.lta .../tp2.lta' >>> template.run() #doctest: +SKIP @@ -199,7 +199,7 @@ class FuseSegmentations(FSCommand): >>> fuse.inputs.in_segmentations = ['aseg.mgz', 'aseg.mgz'] >>> fuse.inputs.in_segmentations_noCC = ['aseg.mgz', 'aseg.mgz'] >>> fuse.inputs.in_norms = ['norm.mgz', 'norm.mgz', 'norm.mgz'] - >>> fuse.cmdline # doctest: +ALLOW_UNICODE + >>> fuse.cmdline 'mri_fuse_segmentations -n norm.mgz -a aseg.mgz -c aseg.mgz tp.long.A.template tp1 tp2' """ diff --git a/nipype/interfaces/freesurfer/model.py b/nipype/interfaces/freesurfer/model.py index 007d30ac3c..e2eba23196 100644 --- a/nipype/interfaces/freesurfer/model.py +++ b/nipype/interfaces/freesurfer/model.py @@ -91,7 +91,7 @@ class MRISPreproc(FSCommand): >>> preproc.inputs.vol_measure_file = [('cont1.nii', 'register.dat'), \ ('cont1a.nii', 'register.dat')] >>> preproc.inputs.out_file = 'concatenated_file.mgz' - >>> preproc.cmdline # doctest: +ALLOW_UNICODE + >>> preproc.cmdline 'mris_preproc --hemi lh --out concatenated_file.mgz --target fsaverage --iv cont1.nii register.dat --iv cont1a.nii register.dat' """ @@ -148,7 +148,7 @@ class MRISPreprocReconAll(MRISPreproc): >>> preproc.inputs.vol_measure_file = [('cont1.nii', 'register.dat'), \ ('cont1a.nii', 'register.dat')] >>> preproc.inputs.out_file = 'concatenated_file.mgz' - >>> preproc.cmdline # doctest: +ALLOW_UNICODE + >>> preproc.cmdline 'mris_preproc --hemi lh --out concatenated_file.mgz --s subject_id --target fsaverage --iv cont1.nii register.dat --iv cont1a.nii register.dat' """ @@ -486,7 +486,7 @@ class Binarize(FSCommand): -------- >>> binvol = Binarize(in_file='structural.nii', min=10, binary_file='foo_out.nii') - >>> binvol.cmdline # doctest: +ALLOW_UNICODE + >>> binvol.cmdline 'mri_binarize --o foo_out.nii --i structural.nii --min 10.000000' """ @@ -595,7 +595,7 @@ class Concatenate(FSCommand): >>> concat = Concatenate() >>> concat.inputs.in_files = ['cont1.nii', 'cont2.nii'] >>> concat.inputs.concatenated_file = 'bar.nii' - >>> concat.cmdline # doctest: +ALLOW_UNICODE + >>> concat.cmdline 'mri_concat --o bar.nii --i cont1.nii --i cont2.nii' """ @@ -719,7 +719,7 @@ class SegStats(FSCommand): >>> ss.inputs.subjects_dir = '.' >>> ss.inputs.avgwf_txt_file = 'avgwf.txt' >>> ss.inputs.summary_file = 'summary.stats' - >>> ss.cmdline # doctest: +ALLOW_UNICODE + >>> ss.cmdline 'mri_segstats --annot PWS04 lh aparc --avgwf ./avgwf.txt --i functional.nii --sum ./summary.stats' """ @@ -841,7 +841,7 @@ class SegStatsReconAll(SegStats): >>> segstatsreconall.inputs.total_gray = True >>> segstatsreconall.inputs.euler = True >>> segstatsreconall.inputs.exclude_id = 0 - >>> segstatsreconall.cmdline # doctest: +ALLOW_UNICODE + >>> segstatsreconall.cmdline 'mri_segstats --annot PWS04 lh aparc --avgwf ./avgwf.txt --brain-vol-from-seg --surf-ctx-vol --empty --etiv --euler --excl-ctxgmwm --excludeid 0 --subcortgray --subject 10335 --supratent --totalgray --surf-wm-vol --sum ./summary.stats' """ input_spec = SegStatsReconAllInputSpec @@ -953,7 +953,7 @@ class Label2Vol(FSCommand): -------- >>> binvol = Label2Vol(label_file='cortex.label', template_file='structural.nii', reg_file='register.dat', fill_thresh=0.5, vol_label_file='foo_out.nii') - >>> binvol.cmdline # doctest: +ALLOW_UNICODE + >>> binvol.cmdline 'mri_label2vol --fillthresh 0 --label cortex.label --reg register.dat --temp structural.nii --o foo_out.nii' """ @@ -1032,7 +1032,7 @@ class MS_LDA(FSCommand): shift=zero_value, vol_synth_file='synth_out.mgz', \ conform=True, use_weights=True, \ images=['FLASH1.mgz', 'FLASH2.mgz', 'FLASH3.mgz']) - >>> optimalWeights.cmdline # doctest: +ALLOW_UNICODE + >>> optimalWeights.cmdline 'mri_ms_LDA -conform -label label.mgz -lda 2 3 -shift 1 -W -synth synth_out.mgz -weight weights.txt FLASH1.mgz FLASH2.mgz FLASH3.mgz' """ @@ -1124,7 +1124,7 @@ class Label2Label(FSCommand): >>> l2l.inputs.source_label = 'lh-pial.stl' >>> l2l.inputs.source_white = 'lh.pial' >>> l2l.inputs.source_sphere_reg = 'lh.pial' - >>> l2l.cmdline # doctest: +ALLOW_UNICODE + >>> l2l.cmdline 'mri_label2label --hemi lh --trglabel lh-pial_converted.stl --regmethod surface --srclabel lh-pial.stl --srcsubject fsaverage --trgsubject 10335' """ @@ -1208,7 +1208,7 @@ class Label2Annot(FSCommand): >>> l2a.inputs.in_labels = ['lh.aparc.label'] >>> l2a.inputs.orig = 'lh.pial' >>> l2a.inputs.out_annot = 'test' - >>> l2a.cmdline # doctest: +ALLOW_UNICODE + >>> l2a.cmdline 'mris_label2annot --hemi lh --l lh.aparc.label --a test --s 10335' """ @@ -1289,7 +1289,7 @@ class SphericalAverage(FSCommand): >>> sphericalavg.inputs.subject_id = '10335' >>> sphericalavg.inputs.erode = 2 >>> sphericalavg.inputs.threshold = 5 - >>> sphericalavg.cmdline # doctest: +ALLOW_UNICODE + >>> sphericalavg.cmdline 'mris_spherical_average -erode 2 -o 10335 -t 5.0 label lh.entorhinal lh pial . test.out' """ diff --git a/nipype/interfaces/freesurfer/preprocess.py b/nipype/interfaces/freesurfer/preprocess.py index 5f39f1cc94..6b408304d3 100644 --- a/nipype/interfaces/freesurfer/preprocess.py +++ b/nipype/interfaces/freesurfer/preprocess.py @@ -67,7 +67,7 @@ class ParseDICOMDir(FSCommand): >>> dcminfo.inputs.dicom_dir = '.' >>> dcminfo.inputs.sortbyrun = True >>> dcminfo.inputs.summarize = True - >>> dcminfo.cmdline # doctest: +ALLOW_UNICODE + >>> dcminfo.cmdline 'mri_parse_sdcmdir --d . --o dicominfo.txt --sortbyrun --summarize' """ @@ -131,7 +131,7 @@ class UnpackSDICOMDir(FSCommand): >>> unpack.inputs.output_dir = '.' >>> unpack.inputs.run_info = (5, 'mprage', 'nii', 'struct') >>> unpack.inputs.dir_structure = 'generic' - >>> unpack.cmdline # doctest: +ALLOW_UNICODE + >>> unpack.cmdline 'unpacksdcmdir -generic -targ . -run 5 mprage nii struct -src .' """ _cmd = 'unpacksdcmdir' @@ -353,7 +353,7 @@ class MRIConvert(FSCommand): >>> mc.inputs.in_file = 'structural.nii' >>> mc.inputs.out_file = 'outfile.mgz' >>> mc.inputs.out_type = 'mgz' - >>> mc.cmdline # doctest: +ALLOW_UNICODE + >>> mc.cmdline 'mri_convert --out_type mgz --input_volume structural.nii --output_volume outfile.mgz' """ @@ -579,7 +579,7 @@ class Resample(FSCommand): >>> resampler.inputs.in_file = 'structural.nii' >>> resampler.inputs.resampled_file = 'resampled.nii' >>> resampler.inputs.voxel_size = (2.1, 2.1, 2.1) - >>> resampler.cmdline # doctest: +ALLOW_UNICODE + >>> resampler.cmdline 'mri_convert -vs 2.10 2.10 2.10 -i structural.nii -o resampled.nii' """ @@ -709,27 +709,27 @@ class ReconAll(CommandLine): >>> reconall.inputs.directive = 'all' >>> reconall.inputs.subjects_dir = '.' >>> reconall.inputs.T1_files = 'structural.nii' - >>> reconall.cmdline # doctest: +ALLOW_UNICODE + >>> reconall.cmdline 'recon-all -all -i structural.nii -subjid foo -sd .' >>> reconall.inputs.flags = "-qcache" - >>> reconall.cmdline # doctest: +ALLOW_UNICODE + >>> reconall.cmdline 'recon-all -all -i structural.nii -qcache -subjid foo -sd .' >>> reconall.inputs.flags = ["-cw256", "-qcache"] - >>> reconall.cmdline # doctest: +ALLOW_UNICODE + >>> reconall.cmdline 'recon-all -all -i structural.nii -cw256 -qcache -subjid foo -sd .' Hemisphere may be specified regardless of directive: >>> reconall.inputs.flags = [] >>> reconall.inputs.hemi = 'lh' - >>> reconall.cmdline # doctest: +ALLOW_UNICODE + >>> reconall.cmdline 'recon-all -all -i structural.nii -hemi lh -subjid foo -sd .' ``-autorecon-hemi`` uses the ``-hemi`` input to specify the hemisphere to operate upon: >>> reconall.inputs.directive = 'autorecon-hemi' - >>> reconall.cmdline # doctest: +ALLOW_UNICODE + >>> reconall.cmdline 'recon-all -autorecon-hemi lh -i structural.nii -subjid foo -sd .' Hippocampal subfields can accept T1 and T2 images: @@ -740,14 +740,14 @@ class ReconAll(CommandLine): >>> reconall_subfields.inputs.subjects_dir = '.' >>> reconall_subfields.inputs.T1_files = 'structural.nii' >>> reconall_subfields.inputs.hippocampal_subfields_T1 = True - >>> reconall_subfields.cmdline # doctest: +ALLOW_UNICODE + >>> reconall_subfields.cmdline 'recon-all -all -i structural.nii -hippocampal-subfields-T1 -subjid foo -sd .' >>> reconall_subfields.inputs.hippocampal_subfields_T2 = ( ... 'structural.nii', 'test') - >>> reconall_subfields.cmdline # doctest: +ALLOW_UNICODE + >>> reconall_subfields.cmdline 'recon-all -all -i structural.nii -hippocampal-subfields-T1T2 structural.nii test -subjid foo -sd .' >>> reconall_subfields.inputs.hippocampal_subfields_T1 = False - >>> reconall_subfields.cmdline # doctest: +ALLOW_UNICODE + >>> reconall_subfields.cmdline 'recon-all -all -i structural.nii -hippocampal-subfields-T2 structural.nii test -subjid foo -sd .' """ @@ -1193,7 +1193,7 @@ class BBRegister(FSCommand): >>> from nipype.interfaces.freesurfer import BBRegister >>> bbreg = BBRegister(subject_id='me', source_file='structural.nii', init='header', contrast_type='t2') - >>> bbreg.cmdline # doctest: +ALLOW_UNICODE + >>> bbreg.cmdline 'bbregister --t2 --init-header --reg structural_bbreg_me.dat --mov structural.nii --s me' """ @@ -1351,7 +1351,7 @@ class ApplyVolTransform(FSCommand): >>> applyreg.inputs.reg_file = 'register.dat' >>> applyreg.inputs.transformed_file = 'struct_warped.nii' >>> applyreg.inputs.fs_target = True - >>> applyreg.cmdline # doctest: +ALLOW_UNICODE + >>> applyreg.cmdline 'mri_vol2vol --fstarg --reg register.dat --mov structural.nii --o struct_warped.nii' """ @@ -1431,7 +1431,7 @@ class Smooth(FSCommand): >>> from nipype.interfaces.freesurfer import Smooth >>> smoothvol = Smooth(in_file='functional.nii', smoothed_file = 'foo_out.nii', reg_file='register.dat', surface_fwhm=10, vol_fwhm=6) - >>> smoothvol.cmdline # doctest: +ALLOW_UNICODE + >>> smoothvol.cmdline 'mris_volsmooth --i functional.nii --reg register.dat --o foo_out.nii --fwhm 10.000000 --vol-fwhm 6.000000' """ @@ -1562,7 +1562,7 @@ class RobustRegister(FSCommand): >>> reg.inputs.target_file = 'T1.nii' >>> reg.inputs.auto_sens = True >>> reg.inputs.init_orient = True - >>> reg.cmdline # doctest: +ALLOW_UNICODE +ELLIPSIS + >>> reg.cmdline # doctest: +ELLIPSIS 'mri_robust_register --satit --initorient --lta .../structural_robustreg.lta --mov structural.nii --dst T1.nii' References @@ -1639,7 +1639,7 @@ class FitMSParams(FSCommand): >>> msfit = FitMSParams() >>> msfit.inputs.in_files = ['flash_05.mgz', 'flash_30.mgz'] >>> msfit.inputs.out_dir = 'flash_parameters' - >>> msfit.cmdline # doctest: +ALLOW_UNICODE + >>> msfit.cmdline 'mri_ms_fitparms flash_05.mgz flash_30.mgz flash_parameters' """ @@ -1712,7 +1712,7 @@ class SynthesizeFLASH(FSCommand): >>> syn.inputs.t1_image = 'T1.mgz' >>> syn.inputs.pd_image = 'PD.mgz' >>> syn.inputs.out_file = 'flash_30syn.mgz' - >>> syn.cmdline # doctest: +ALLOW_UNICODE + >>> syn.cmdline 'mri_synthesize 20.00 30.00 3.000 T1.mgz PD.mgz flash_30syn.mgz' """ @@ -1785,7 +1785,7 @@ class MNIBiasCorrection(FSCommand): >>> correct.inputs.iterations = 6 >>> correct.inputs.protocol_iterations = 1000 >>> correct.inputs.distance = 50 - >>> correct.cmdline # doctest: +ALLOW_UNICODE + >>> correct.cmdline 'mri_nu_correct.mni --distance 50 --i norm.mgz --n 6 --o norm_output.mgz --proto-iters 1000' References: @@ -1842,7 +1842,7 @@ class WatershedSkullStrip(FSCommand): >>> skullstrip.inputs.t1 = True >>> skullstrip.inputs.transform = "transforms/talairach_with_skull.lta" >>> skullstrip.inputs.out_file = "brainmask.auto.mgz" - >>> skullstrip.cmdline # doctest: +ALLOW_UNICODE + >>> skullstrip.cmdline 'mri_watershed -T1 transforms/talairach_with_skull.lta T1.mgz brainmask.auto.mgz' """ _cmd = 'mri_watershed' @@ -1890,7 +1890,7 @@ class Normalize(FSCommand): >>> normalize = freesurfer.Normalize() >>> normalize.inputs.in_file = "T1.mgz" >>> normalize.inputs.gradient = 1 - >>> normalize.cmdline # doctest: +ALLOW_UNICODE + >>> normalize.cmdline 'mri_normalize -g 1 T1.mgz T1_norm.mgz' """ _cmd = "mri_normalize" @@ -1942,7 +1942,7 @@ class CANormalize(FSCommand): >>> ca_normalize.inputs.in_file = "T1.mgz" >>> ca_normalize.inputs.atlas = "atlas.nii.gz" # in practice use .gca atlases >>> ca_normalize.inputs.transform = "trans.mat" # in practice use .lta transforms - >>> ca_normalize.cmdline # doctest: +ALLOW_UNICODE + >>> ca_normalize.cmdline 'mri_ca_normalize T1.mgz atlas.nii.gz trans.mat T1_norm.mgz' """ _cmd = "mri_ca_normalize" @@ -2000,7 +2000,7 @@ class CARegister(FSCommandOpenMP): >>> ca_register = freesurfer.CARegister() >>> ca_register.inputs.in_file = "norm.mgz" >>> ca_register.inputs.out_file = "talairach.m3z" - >>> ca_register.cmdline # doctest: +ALLOW_UNICODE + >>> ca_register.cmdline 'mri_ca_register norm.mgz talairach.m3z' """ _cmd = "mri_ca_register" @@ -2071,7 +2071,7 @@ class CALabel(FSCommandOpenMP): >>> ca_label.inputs.out_file = "out.mgz" >>> ca_label.inputs.transform = "trans.mat" >>> ca_label.inputs.template = "Template_6.nii" # in practice use .gcs extension - >>> ca_label.cmdline # doctest: +ALLOW_UNICODE + >>> ca_label.cmdline 'mri_ca_label norm.mgz trans.mat Template_6.nii out.mgz' """ _cmd = "mri_ca_label" @@ -2145,7 +2145,7 @@ class MRIsCALabel(FSCommandOpenMP): >>> ca_label.inputs.sulc = "lh.pial" >>> ca_label.inputs.classifier = "im1.nii" # in pracice, use .gcs extension >>> ca_label.inputs.smoothwm = "lh.pial" - >>> ca_label.cmdline # doctest: +ALLOW_UNICODE + >>> ca_label.cmdline 'mris_ca_label test lh lh.pial im1.nii lh.aparc.annot' """ _cmd = "mris_ca_label" @@ -2231,7 +2231,7 @@ class SegmentCC(FSCommand): >>> SegmentCC_node.inputs.in_norm = "norm.mgz" >>> SegmentCC_node.inputs.out_rotation = "cc.lta" >>> SegmentCC_node.inputs.subject_id = "test" - >>> SegmentCC_node.cmdline # doctest: +ALLOW_UNICODE + >>> SegmentCC_node.cmdline 'mri_cc -aseg aseg.mgz -o aseg.auto.mgz -lta cc.lta test' """ @@ -2322,7 +2322,7 @@ class SegmentWM(FSCommand): >>> SegmentWM_node = freesurfer.SegmentWM() >>> SegmentWM_node.inputs.in_file = "norm.mgz" >>> SegmentWM_node.inputs.out_file = "wm.seg.mgz" - >>> SegmentWM_node.cmdline # doctest: +ALLOW_UNICODE + >>> SegmentWM_node.cmdline 'mri_segment norm.mgz wm.seg.mgz' """ @@ -2366,7 +2366,7 @@ class EditWMwithAseg(FSCommand): >>> editwm.inputs.seg_file = "aseg.mgz" >>> editwm.inputs.out_file = "wm.asegedit.mgz" >>> editwm.inputs.keep_in = True - >>> editwm.cmdline # doctest: +ALLOW_UNICODE + >>> editwm.cmdline 'mri_edit_wm_with_aseg -keep-in T1.mgz norm.mgz aseg.mgz wm.asegedit.mgz' """ _cmd = 'mri_edit_wm_with_aseg' @@ -2433,7 +2433,7 @@ class ConcatenateLTA(FSCommand): >>> conc_lta = ConcatenateLTA() >>> conc_lta.inputs.in_lta1 = 'lta1.lta' >>> conc_lta.inputs.in_lta2 = 'lta2.lta' - >>> conc_lta.cmdline # doctest: +ALLOW_UNICODE + >>> conc_lta.cmdline 'mri_concatenate_lta lta1.lta lta2.lta lta1_concat.lta' You can use 'identity.nofile' as the filename for in_lta2, e.g.: @@ -2441,13 +2441,13 @@ class ConcatenateLTA(FSCommand): >>> conc_lta.inputs.in_lta2 = 'identity.nofile' >>> conc_lta.inputs.invert_1 = True >>> conc_lta.inputs.out_file = 'inv1.lta' - >>> conc_lta.cmdline # doctest: +ALLOW_UNICODE + >>> conc_lta.cmdline 'mri_concatenate_lta -invert1 lta1.lta identity.nofile inv1.lta' To create a RAS2RAS transform: >>> conc_lta.inputs.out_type = 'RAS2RAS' - >>> conc_lta.cmdline # doctest: +ALLOW_UNICODE + >>> conc_lta.cmdline 'mri_concatenate_lta -invert1 -out_type 1 lta1.lta identity.nofile inv1.lta' """ diff --git a/nipype/interfaces/freesurfer/registration.py b/nipype/interfaces/freesurfer/registration.py index 72a3fdb0ee..60a10b4c11 100644 --- a/nipype/interfaces/freesurfer/registration.py +++ b/nipype/interfaces/freesurfer/registration.py @@ -204,7 +204,7 @@ class EMRegister(FSCommandOpenMP): >>> register.inputs.out_file = 'norm_transform.lta' >>> register.inputs.skull = True >>> register.inputs.nbrspacing = 9 - >>> register.cmdline # doctest: +ALLOW_UNICODE + >>> register.cmdline 'mri_em_register -uns 9 -skull norm.mgz aseg.mgz norm_transform.lta' """ _cmd = 'mri_em_register' @@ -254,7 +254,7 @@ class Register(FSCommand): >>> register.inputs.target = 'aseg.mgz' >>> register.inputs.out_file = 'lh.pial.reg' >>> register.inputs.curv = True - >>> register.cmdline # doctest: +ALLOW_UNICODE + >>> register.cmdline 'mris_register -curv lh.pial aseg.mgz lh.pial.reg' """ @@ -320,7 +320,7 @@ class Paint(FSCommand): >>> paint.inputs.template = 'aseg.mgz' >>> paint.inputs.averages = 5 >>> paint.inputs.out_file = 'lh.avg_curv' - >>> paint.cmdline # doctest: +ALLOW_UNICODE + >>> paint.cmdline 'mrisp_paint -a 5 aseg.mgz lh.pial lh.avg_curv' """ @@ -437,7 +437,7 @@ class MRICoreg(FSCommand): >>> coreg.inputs.source_file = 'moving1.nii' >>> coreg.inputs.reference_file = 'fixed1.nii' >>> coreg.inputs.subjects_dir = '.' - >>> coreg.cmdline # doctest: +ALLOW_UNICODE +ELLIPSIS + >>> coreg.cmdline # doctest: +ELLIPSIS 'mri_coreg --lta .../registration.lta --ref fixed1.nii --mov moving1.nii --sd .' If passing a subject ID, the reference mask may be disabled: @@ -447,17 +447,17 @@ class MRICoreg(FSCommand): >>> coreg.inputs.subjects_dir = '.' >>> coreg.inputs.subject_id = 'fsaverage' >>> coreg.inputs.reference_mask = False - >>> coreg.cmdline # doctest: +ALLOW_UNICODE +ELLIPSIS + >>> coreg.cmdline # doctest: +ELLIPSIS 'mri_coreg --s fsaverage --no-ref-mask --lta .../registration.lta --mov moving1.nii --sd .' Spatial scales may be specified as a list of one or two separations: >>> coreg.inputs.sep = [4] - >>> coreg.cmdline # doctest: +ALLOW_UNICODE +ELLIPSIS + >>> coreg.cmdline # doctest: +ELLIPSIS 'mri_coreg --s fsaverage --no-ref-mask --lta .../registration.lta --sep 4 --mov moving1.nii --sd .' >>> coreg.inputs.sep = [4, 5] - >>> coreg.cmdline # doctest: +ALLOW_UNICODE +ELLIPSIS + >>> coreg.cmdline # doctest: +ELLIPSIS 'mri_coreg --s fsaverage --no-ref-mask --lta .../registration.lta --sep 4 --sep 5 --mov moving1.nii --sd .' """ diff --git a/nipype/interfaces/freesurfer/tests/test_model.py b/nipype/interfaces/freesurfer/tests/test_model.py index 28e49401e0..a30a29b0ac 100644 --- a/nipype/interfaces/freesurfer/tests/test_model.py +++ b/nipype/interfaces/freesurfer/tests/test_model.py @@ -15,10 +15,10 @@ @pytest.mark.skipif(no_freesurfer(), reason="freesurfer is not installed") def test_concatenate(tmpdir): - tempdir = str(tmpdir) - os.chdir(tempdir) - in1 = os.path.join(tempdir, 'cont1.nii') - in2 = os.path.join(tempdir, 'cont2.nii') + tmpdir.chdir() + + in1 = tmpdir.join('cont1.nii').strpath + in2 = tmpdir.join('cont2.nii').strpath out = 'bar.nii' data1 = np.zeros((3, 3, 3, 1), dtype=np.float32) @@ -31,24 +31,24 @@ def test_concatenate(tmpdir): # Test default behavior res = model.Concatenate(in_files=[in1, in2]).run() - assert res.outputs.concatenated_file == os.path.join(tempdir, 'concat_output.nii.gz') + assert res.outputs.concatenated_file == tmpdir.join('concat_output.nii.gz').strpath assert np.allclose(nb.load('concat_output.nii.gz').get_data(), out_data) # Test specified concatenated_file res = model.Concatenate(in_files=[in1, in2], concatenated_file=out).run() - assert res.outputs.concatenated_file == os.path.join(tempdir, out) + assert res.outputs.concatenated_file == tmpdir.join(out).strpath assert np.allclose(nb.load(out, mmap=NUMPY_MMAP).get_data(), out_data) # Test in workflow - wf = pe.Workflow('test_concatenate', base_dir=tempdir) + wf = pe.Workflow('test_concatenate', base_dir=tmpdir.strpath) concat = pe.Node(model.Concatenate(in_files=[in1, in2], concatenated_file=out), name='concat') wf.add_nodes([concat]) wf.run() - assert np.allclose(nb.load(os.path.join(tempdir, - 'test_concatenate', - 'concat', out)).get_data(), + assert np.allclose(nb.load(tmpdir.join( + 'test_concatenate', + 'concat', out).strpath).get_data(), out_data) # Test a simple statistic diff --git a/nipype/interfaces/freesurfer/utils.py b/nipype/interfaces/freesurfer/utils.py index e71edb3e5c..b5cd404b30 100644 --- a/nipype/interfaces/freesurfer/utils.py +++ b/nipype/interfaces/freesurfer/utils.py @@ -196,7 +196,7 @@ class SampleToSurface(FSCommand): >>> sampler.inputs.sampling_method = "average" >>> sampler.inputs.sampling_range = 1 >>> sampler.inputs.sampling_units = "frac" - >>> sampler.cmdline # doctest: +ELLIPSIS +ALLOW_UNICODE + >>> sampler.cmdline # doctest: +ELLIPSIS 'mri_vol2surf --hemi lh --o ...lh.cope1.mgz --reg register.dat --projfrac-avg 1.000 --mov cope1.nii.gz' >>> res = sampler.run() # doctest: +SKIP @@ -326,7 +326,7 @@ class SurfaceSmooth(FSCommand): >>> smoother.inputs.subject_id = "subj_1" >>> smoother.inputs.hemi = "lh" >>> smoother.inputs.fwhm = 5 - >>> smoother.cmdline # doctest: +ELLIPSIS +ALLOW_UNICODE + >>> smoother.cmdline # doctest: +ELLIPSIS 'mri_surf2surf --cortex --fwhm 5.0000 --hemi lh --sval lh.cope1.mgz --tval ...lh.cope1_smooth5.mgz --s subj_1' >>> smoother.run() # doctest: +SKIP @@ -518,7 +518,7 @@ class Surface2VolTransform(FSCommand): >>> xfm2vol.inputs.hemi = 'lh' >>> xfm2vol.inputs.template_file = 'cope1.nii.gz' >>> xfm2vol.inputs.subjects_dir = '.' - >>> xfm2vol.cmdline # doctest: +ALLOW_UNICODE + >>> xfm2vol.cmdline 'mri_surf2vol --hemi lh --volreg register.mat --surfval lh.cope1.mgz --sd . --template cope1.nii.gz --outvol lh.cope1_asVol.nii --vtxvol lh.cope1_asVol_vertex.nii' >>> res = xfm2vol.run()# doctest: +SKIP @@ -995,7 +995,7 @@ class MRIsCombine(FSSurfaceCommand): >>> mris = fs.MRIsCombine() >>> mris.inputs.in_files = ['lh.pial', 'rh.pial'] >>> mris.inputs.out_file = 'bh.pial' - >>> mris.cmdline # doctest: +ALLOW_UNICODE + >>> mris.cmdline 'mris_convert --combinesurfs lh.pial rh.pial bh.pial' >>> mris.run() # doctest: +SKIP """ @@ -1124,7 +1124,7 @@ class MRIPretess(FSCommand): >>> pretess.inputs.in_filled = 'wm.mgz' >>> pretess.inputs.in_norm = 'norm.mgz' >>> pretess.inputs.nocorners = True - >>> pretess.cmdline # doctest: +ALLOW_UNICODE + >>> pretess.cmdline 'mri_pretess -nocorners wm.mgz wm norm.mgz wm_pretesswm.mgz' >>> pretess.run() # doctest: +SKIP @@ -1294,7 +1294,7 @@ class MakeAverageSubject(FSCommand): >>> from nipype.interfaces.freesurfer import MakeAverageSubject >>> avg = MakeAverageSubject(subjects_ids=['s1', 's2']) - >>> avg.cmdline # doctest: +ALLOW_UNICODE + >>> avg.cmdline 'make_average_subject --out average --subjects s1 s2' """ @@ -1329,7 +1329,7 @@ class ExtractMainComponent(CommandLine): >>> from nipype.interfaces.freesurfer import ExtractMainComponent >>> mcmp = ExtractMainComponent(in_file='lh.pial') - >>> mcmp.cmdline # doctest: +ALLOW_UNICODE + >>> mcmp.cmdline 'mris_extract_main_component lh.pial lh.maincmp' """ @@ -1404,7 +1404,7 @@ class Tkregister2(FSCommand): >>> tk2.inputs.moving_image = 'T1.mgz' >>> tk2.inputs.target_image = 'structural.nii' >>> tk2.inputs.reg_header = True - >>> tk2.cmdline # doctest: +ALLOW_UNICODE + >>> tk2.cmdline 'tkregister2 --mov T1.mgz --noedit --reg T1_to_native.dat --regheader \ --targ structural.nii' >>> tk2.run() # doctest: +SKIP @@ -1417,7 +1417,7 @@ class Tkregister2(FSCommand): >>> tk2 = Tkregister2() >>> tk2.inputs.moving_image = 'epi.nii' >>> tk2.inputs.fsl_in_matrix = 'flirt.mat' - >>> tk2.cmdline # doctest: +ALLOW_UNICODE + >>> tk2.cmdline 'tkregister2 --fsl flirt.mat --mov epi.nii --noedit --reg register.dat' >>> tk2.run() # doctest: +SKIP """ @@ -1494,11 +1494,11 @@ class AddXFormToHeader(FSCommand): >>> adder = AddXFormToHeader() >>> adder.inputs.in_file = 'norm.mgz' >>> adder.inputs.transform = 'trans.mat' - >>> adder.cmdline # doctest: +ALLOW_UNICODE + >>> adder.cmdline 'mri_add_xform_to_header trans.mat norm.mgz output.mgz' >>> adder.inputs.copy_name = True - >>> adder.cmdline # doctest: +ALLOW_UNICODE + >>> adder.cmdline 'mri_add_xform_to_header -c trans.mat norm.mgz output.mgz' >>> adder.run() # doctest: +SKIP @@ -1552,7 +1552,7 @@ class CheckTalairachAlignment(FSCommand): >>> checker.inputs.in_file = 'trans.mat' >>> checker.inputs.threshold = 0.005 - >>> checker.cmdline # doctest: +ALLOW_UNICODE + >>> checker.cmdline 'talairach_afd -T 0.005 -xfm trans.mat' >>> checker.run() # doctest: +SKIP @@ -1601,7 +1601,7 @@ class TalairachAVI(FSCommand): >>> example = TalairachAVI() >>> example.inputs.in_file = 'norm.mgz' >>> example.inputs.out_file = 'trans.mat' - >>> example.cmdline # doctest: +ALLOW_UNICODE + >>> example.cmdline 'talairach_avi --i norm.mgz --xfm trans.mat' >>> example.run() # doctest: +SKIP @@ -1632,7 +1632,7 @@ class TalairachQC(FSScriptCommand): >>> from nipype.interfaces.freesurfer import TalairachQC >>> qc = TalairachQC() >>> qc.inputs.log_file = 'dirs.txt' - >>> qc.cmdline # doctest: +ALLOW_UNICODE + >>> qc.cmdline 'tal_QC_AZS dirs.txt' """ _cmd = "tal_QC_AZS" @@ -1671,7 +1671,7 @@ class RemoveNeck(FSCommand): >>> remove_neck.inputs.in_file = 'norm.mgz' >>> remove_neck.inputs.transform = 'trans.mat' >>> remove_neck.inputs.template = 'trans.mat' - >>> remove_neck.cmdline # doctest: +ALLOW_UNICODE + >>> remove_neck.cmdline 'mri_remove_neck norm.mgz trans.mat trans.mat norm_noneck.mgz' """ _cmd = "mri_remove_neck" @@ -1811,7 +1811,7 @@ class Sphere(FSCommandOpenMP): >>> from nipype.interfaces.freesurfer import Sphere >>> sphere = Sphere() >>> sphere.inputs.in_file = 'lh.pial' - >>> sphere.cmdline # doctest: +ALLOW_UNICODE + >>> sphere.cmdline 'mris_sphere lh.pial lh.sphere' """ _cmd = 'mris_sphere' @@ -1935,7 +1935,7 @@ class EulerNumber(FSCommand): >>> from nipype.interfaces.freesurfer import EulerNumber >>> ft = EulerNumber() >>> ft.inputs.in_file = 'lh.pial' - >>> ft.cmdline # doctest: +ALLOW_UNICODE + >>> ft.cmdline 'mris_euler_number lh.pial' """ _cmd = 'mris_euler_number' @@ -1971,7 +1971,7 @@ class RemoveIntersection(FSCommand): >>> from nipype.interfaces.freesurfer import RemoveIntersection >>> ri = RemoveIntersection() >>> ri.inputs.in_file = 'lh.pial' - >>> ri.cmdline # doctest: +ALLOW_UNICODE + >>> ri.cmdline 'mris_remove_intersection lh.pial lh.pial' """ @@ -2067,7 +2067,7 @@ class MakeSurfaces(FSCommand): >>> makesurfaces.inputs.in_label = 'aparc+aseg.nii' >>> makesurfaces.inputs.in_T1 = 'T1.mgz' >>> makesurfaces.inputs.orig_pial = 'lh.pial' - >>> makesurfaces.cmdline # doctest: +ALLOW_UNICODE + >>> makesurfaces.cmdline 'mris_make_surfaces -T1 T1.mgz -orig pial -orig_pial pial 10335 lh' """ @@ -2200,7 +2200,7 @@ class Curvature(FSCommand): >>> curv = Curvature() >>> curv.inputs.in_file = 'lh.pial' >>> curv.inputs.save = True - >>> curv.cmdline # doctest: +ALLOW_UNICODE + >>> curv.cmdline 'mris_curvature -w lh.pial' """ @@ -2294,7 +2294,7 @@ class CurvatureStats(FSCommand): >>> curvstats.inputs.values = True >>> curvstats.inputs.min_max = True >>> curvstats.inputs.write = True - >>> curvstats.cmdline # doctest: +ALLOW_UNICODE + >>> curvstats.cmdline 'mris_curvature_stats -m -o lh.curv.stats -F pial -G --writeCurvatureFiles subject_id lh pial pial' """ @@ -2351,7 +2351,7 @@ class Jacobian(FSCommand): >>> jacobian = Jacobian() >>> jacobian.inputs.in_origsurf = 'lh.pial' >>> jacobian.inputs.in_mappedsurf = 'lh.pial' - >>> jacobian.cmdline # doctest: +ALLOW_UNICODE + >>> jacobian.cmdline 'mris_jacobian lh.pial lh.pial lh.jacobian' """ @@ -2488,7 +2488,7 @@ class VolumeMask(FSCommand): >>> volmask.inputs.rh_white = 'lh.pial' >>> volmask.inputs.subject_id = '10335' >>> volmask.inputs.save_ribbon = True - >>> volmask.cmdline # doctest: +ALLOW_UNICODE + >>> volmask.cmdline 'mris_volmask --label_left_ribbon 3 --label_left_white 2 --label_right_ribbon 42 --label_right_white 41 --save_ribbon 10335' """ @@ -2828,7 +2828,7 @@ class RelabelHypointensities(FSCommand): >>> relabelhypos.inputs.rh_white = 'lh.pial' >>> relabelhypos.inputs.surf_directory = '.' >>> relabelhypos.inputs.aseg = 'aseg.mgz' - >>> relabelhypos.cmdline # doctest: +ALLOW_UNICODE + >>> relabelhypos.cmdline 'mri_relabel_hypointensities aseg.mgz . aseg.hypos.mgz' """ @@ -2999,7 +2999,7 @@ class Apas2Aseg(FSCommand): >>> apas2aseg = Apas2Aseg() >>> apas2aseg.inputs.in_file = 'aseg.mgz' >>> apas2aseg.inputs.out_file = 'output.mgz' - >>> apas2aseg.cmdline # doctest: +ALLOW_UNICODE + >>> apas2aseg.cmdline 'apas2aseg --i aseg.mgz --o output.mgz' """ @@ -3081,10 +3081,10 @@ class MRIsExpand(FSSurfaceCommand): >>> from nipype.interfaces.freesurfer import MRIsExpand >>> mris_expand = MRIsExpand(thickness=True, distance=0.5) >>> mris_expand.inputs.in_file = 'lh.white' - >>> mris_expand.cmdline # doctest: +ALLOW_UNICODE + >>> mris_expand.cmdline 'mris_expand -thickness lh.white 0.5 expanded' >>> mris_expand.inputs.out_name = 'graymid' - >>> mris_expand.cmdline # doctest: +ALLOW_UNICODE + >>> mris_expand.cmdline 'mris_expand -thickness lh.white 0.5 graymid' """ _cmd = 'mris_expand' diff --git a/nipype/interfaces/fsl/aroma.py b/nipype/interfaces/fsl/aroma.py index 02df37d9a2..fb8dc82bd8 100644 --- a/nipype/interfaces/fsl/aroma.py +++ b/nipype/interfaces/fsl/aroma.py @@ -95,7 +95,7 @@ class ICA_AROMA(CommandLine): >>> AROMA_obj.inputs.mask = 'mask.nii.gz' >>> AROMA_obj.inputs.denoise_type = 'both' >>> AROMA_obj.inputs.out_dir = 'ICA_testout' - >>> AROMA_obj.cmdline # doctest: +ALLOW_UNICODE + >>> AROMA_obj.cmdline 'ICA_AROMA.py -den both -warp warpfield.nii -i functional.nii -m mask.nii.gz -affmat func_to_struct.mat -mc fsl_mcflirt_movpar.txt -o ICA_testout' """ _cmd = 'ICA_AROMA.py' diff --git a/nipype/interfaces/fsl/dti.py b/nipype/interfaces/fsl/dti.py index 9d74a3fafe..812515fcda 100644 --- a/nipype/interfaces/fsl/dti.py +++ b/nipype/interfaces/fsl/dti.py @@ -85,7 +85,7 @@ class DTIFit(FSLCommand): >>> dti.inputs.bvals = 'bvals' >>> dti.inputs.base_name = 'TP' >>> dti.inputs.mask = 'mask.nii' - >>> dti.cmdline # doctest: +ALLOW_UNICODE + >>> dti.cmdline 'dtifit -k diffusion.nii -o TP -m mask.nii -r bvecs -b bvals' """ @@ -327,7 +327,7 @@ class BEDPOSTX5(FSLXCommand): >>> from nipype.interfaces import fsl >>> bedp = fsl.BEDPOSTX5(bvecs='bvecs', bvals='bvals', dwi='diffusion.nii', ... mask='mask.nii', n_fibres=1) - >>> bedp.cmdline # doctest: +ALLOW_UNICODE + >>> bedp.cmdline 'bedpostx bedpostx --forcedir -n 1' """ @@ -583,7 +583,7 @@ class ProbTrackX(FSLCommand): target_masks = ['targets_MASK1.nii', 'targets_MASK2.nii'], \ thsamples='merged_thsamples.nii', fsamples='merged_fsamples.nii', phsamples='merged_phsamples.nii', \ out_dir='.') - >>> pbx.cmdline # doctest: +ALLOW_UNICODE + >>> pbx.cmdline 'probtrackx --forcedir -m mask.nii --mode=seedmask --nsamples=3 --nsteps=10 --opd --os2t --dir=. --samples=merged --seed=MASK_average_thal_right.nii --targetmasks=targets.txt --xfm=trans.mat' """ @@ -780,7 +780,7 @@ class ProbTrackX2(ProbTrackX): >>> pbx2.inputs.out_dir = '.' >>> pbx2.inputs.n_samples = 3 >>> pbx2.inputs.n_steps = 10 - >>> pbx2.cmdline # doctest: +ALLOW_UNICODE + >>> pbx2.cmdline 'probtrackx2 --forcedir -m nodif_brain_mask.nii.gz --nsamples=3 --nsteps=10 --opd --dir=. --samples=merged --seed=seed_source.nii.gz' """ _cmd = 'probtrackx2' @@ -871,7 +871,7 @@ class VecReg(FSLCommand): affine_mat='trans.mat', \ ref_vol='mni.nii', \ out_file='diffusion_vreg.nii') - >>> vreg.cmdline # doctest: +ALLOW_UNICODE + >>> vreg.cmdline 'vecreg -t trans.mat -i diffusion.nii -o diffusion_vreg.nii -r mni.nii' """ @@ -932,7 +932,7 @@ class ProjThresh(FSLCommand): >>> from nipype.interfaces import fsl >>> ldir = ['seeds_to_M1.nii', 'seeds_to_M2.nii'] >>> pThresh = fsl.ProjThresh(in_files=ldir, threshold=3) - >>> pThresh.cmdline # doctest: +ALLOW_UNICODE + >>> pThresh.cmdline 'proj_thresh seeds_to_M1.nii seeds_to_M2.nii 3' """ @@ -980,7 +980,7 @@ class FindTheBiggest(FSLCommand): >>> from nipype.interfaces import fsl >>> ldir = ['seeds_to_M1.nii', 'seeds_to_M2.nii'] >>> fBig = fsl.FindTheBiggest(in_files=ldir, out_file='biggestSegmentation') - >>> fBig.cmdline # doctest: +ALLOW_UNICODE + >>> fBig.cmdline 'find_the_biggest seeds_to_M1.nii seeds_to_M2.nii biggestSegmentation' """ diff --git a/nipype/interfaces/fsl/epi.py b/nipype/interfaces/fsl/epi.py index 5978ee492d..0beb60b3c0 100644 --- a/nipype/interfaces/fsl/epi.py +++ b/nipype/interfaces/fsl/epi.py @@ -71,7 +71,7 @@ class PrepareFieldmap(FSLCommand): >>> prepare.inputs.in_phase = "phase.nii" >>> prepare.inputs.in_magnitude = "magnitude.nii" >>> prepare.inputs.output_type = "NIFTI_GZ" - >>> prepare.cmdline # doctest: +ELLIPSIS +ALLOW_UNICODE + >>> prepare.cmdline # doctest: +ELLIPSIS 'fsl_prepare_fieldmap SIEMENS phase.nii magnitude.nii \ .../phase_fslprepared.nii.gz 2.460000' >>> res = prepare.run() # doctest: +SKIP @@ -247,7 +247,7 @@ class TOPUP(FSLCommand): >>> topup.inputs.in_file = "b0_b0rev.nii" >>> topup.inputs.encoding_file = "topup_encoding.txt" >>> topup.inputs.output_type = "NIFTI_GZ" - >>> topup.cmdline # doctest: +ELLIPSIS +ALLOW_UNICODE + >>> topup.cmdline # doctest: +ELLIPSIS 'topup --config=b02b0.cnf --datain=topup_encoding.txt \ --imain=b0_b0rev.nii --out=b0_b0rev_base --iout=b0_b0rev_corrected.nii.gz \ --fout=b0_b0rev_field.nii.gz --jacout=jac --logout=b0_b0rev_topup.log \ @@ -389,7 +389,7 @@ class ApplyTOPUP(FSLCommand): >>> applytopup.inputs.in_topup_fieldcoef = "topup_fieldcoef.nii.gz" >>> applytopup.inputs.in_topup_movpar = "topup_movpar.txt" >>> applytopup.inputs.output_type = "NIFTI_GZ" - >>> applytopup.cmdline # doctest: +ELLIPSIS +ALLOW_UNICODE + >>> applytopup.cmdline # doctest: +ELLIPSIS 'applytopup --datain=topup_encoding.txt --imain=epi.nii,epi_rev.nii \ --inindex=1,2 --topup=topup --out=epi_corrected.nii.gz' >>> res = applytopup.run() # doctest: +SKIP @@ -545,12 +545,12 @@ class Eddy(FSLCommand): >>> eddy.inputs.in_bvec = 'bvecs.scheme' >>> eddy.inputs.in_bval = 'bvals.scheme' >>> eddy.inputs.use_cuda = True - >>> eddy.cmdline # doctest: +ELLIPSIS +ALLOW_UNICODE + >>> eddy.cmdline # doctest: +ELLIPSIS 'eddy_cuda --acqp=epi_acqp.txt --bvals=bvals.scheme --bvecs=bvecs.scheme \ --imain=epi.nii --index=epi_index.txt --mask=epi_mask.nii \ --out=.../eddy_corrected' >>> eddy.inputs.use_cuda = False - >>> eddy.cmdline # doctest: +ELLIPSIS +ALLOW_UNICODE + >>> eddy.cmdline # doctest: +ELLIPSIS 'eddy_openmp --acqp=epi_acqp.txt --bvals=bvals.scheme \ --bvecs=bvecs.scheme --imain=epi.nii --index=epi_index.txt \ --mask=epi_mask.nii --out=.../eddy_corrected' @@ -679,7 +679,7 @@ class SigLoss(FSLCommand): >>> sigloss.inputs.in_file = "phase.nii" >>> sigloss.inputs.echo_time = 0.03 >>> sigloss.inputs.output_type = "NIFTI_GZ" - >>> sigloss.cmdline # doctest: +ELLIPSIS +ALLOW_UNICODE + >>> sigloss.cmdline # doctest: +ELLIPSIS 'sigloss --te=0.030000 -i phase.nii -s .../phase_sigloss.nii.gz' >>> res = sigloss.run() # doctest: +SKIP @@ -784,7 +784,7 @@ class EpiReg(FSLCommand): >>> epireg.inputs.fmapmagbrain='fieldmap_mag_brain.nii' >>> epireg.inputs.echospacing=0.00067 >>> epireg.inputs.pedir='y' - >>> epireg.cmdline # doctest: +ELLIPSIS +ALLOW_UNICODE + >>> epireg.cmdline # doctest: +ELLIPSIS 'epi_reg --echospacing=0.000670 --fmap=fieldmap_phase_fslprepared.nii \ --fmapmag=fieldmap_mag.nii --fmapmagbrain=fieldmap_mag_brain.nii --noclean \ --pedir=y --epi=epi.nii --t1=T1.nii --t1brain=T1_brain.nii --out=epi2struct' @@ -895,7 +895,7 @@ class EPIDeWarp(FSLCommand): >>> dewarp.inputs.mag_file = "magnitude.nii" >>> dewarp.inputs.dph_file = "phase.nii" >>> dewarp.inputs.output_type = "NIFTI_GZ" - >>> dewarp.cmdline # doctest: +ELLIPSIS +ALLOW_UNICODE + >>> dewarp.cmdline # doctest: +ELLIPSIS 'epidewarp.fsl --mag magnitude.nii --dph phase.nii --epi functional.nii \ --esp 0.58 --exfdw .../exfdw.nii.gz --nocleanup --sigma 2 --tediff 2.46 \ --tmpdir .../temp --vsm .../vsm.nii.gz' @@ -988,7 +988,7 @@ class EddyCorrect(FSLCommand): >>> from nipype.interfaces.fsl import EddyCorrect >>> eddyc = EddyCorrect(in_file='diffusion.nii', ... out_file="diffusion_edc.nii", ref_num=0) - >>> eddyc.cmdline # doctest: +ALLOW_UNICODE + >>> eddyc.cmdline 'eddy_correct diffusion.nii diffusion_edc.nii 0' """ diff --git a/nipype/interfaces/fsl/maths.py b/nipype/interfaces/fsl/maths.py index 588f7caf95..f403c5c402 100644 --- a/nipype/interfaces/fsl/maths.py +++ b/nipype/interfaces/fsl/maths.py @@ -439,7 +439,7 @@ class MultiImageMaths(MathsCommand): >>> maths.inputs.op_string = "-add %s -mul -1 -div %s" >>> maths.inputs.operand_files = ["functional2.nii", "functional3.nii"] >>> maths.inputs.out_file = "functional4.nii" - >>> maths.cmdline # doctest: +ALLOW_UNICODE + >>> maths.cmdline 'fslmaths functional.nii -add functional2.nii -mul -1 -div functional3.nii functional4.nii' """ diff --git a/nipype/interfaces/fsl/model.py b/nipype/interfaces/fsl/model.py index b4d3fb56f8..701ee757db 100644 --- a/nipype/interfaces/fsl/model.py +++ b/nipype/interfaces/fsl/model.py @@ -934,7 +934,7 @@ class FLAMEO(FSLCommand): >>> flameo.inputs.t_con_file = 'design.con' >>> flameo.inputs.mask_file = 'mask.nii' >>> flameo.inputs.run_mode = 'fe' - >>> flameo.cmdline # doctest: +ALLOW_UNICODE + >>> flameo.cmdline 'flameo --copefile=cope.nii.gz --covsplitfile=cov_split.mat --designfile=design.mat --ld=stats --maskfile=mask.nii --runmode=fe --tcontrastsfile=design.con --varcopefile=varcope.nii.gz' """ @@ -1601,7 +1601,7 @@ class MELODIC(FSLCommand): >>> melodic_setup.inputs.s_des = 'subjectDesign.mat' >>> melodic_setup.inputs.s_con = 'subjectDesign.con' >>> melodic_setup.inputs.out_dir = 'groupICA.out' - >>> melodic_setup.cmdline # doctest: +ALLOW_UNICODE + >>> melodic_setup.cmdline 'melodic -i functional.nii,functional2.nii,functional3.nii -a tica --bgthreshold=10.000000 --mmthresh=0.500000 --nobet -o groupICA.out --Ostats --Scon=subjectDesign.con --Sdes=subjectDesign.mat --Tcon=timeDesign.con --Tdes=timeDesign.mat --tr=1.500000' >>> melodic_setup.run() # doctest: +SKIP @@ -1657,7 +1657,7 @@ class SmoothEstimate(FSLCommand): >>> est = SmoothEstimate() >>> est.inputs.zstat_file = 'zstat1.nii.gz' >>> est.inputs.mask_file = 'mask.nii' - >>> est.cmdline # doctest: +ALLOW_UNICODE + >>> est.cmdline 'smoothest --mask=mask.nii --zstat=zstat1.nii.gz' """ @@ -1773,7 +1773,7 @@ class Cluster(FSLCommand): >>> cl.inputs.in_file = 'zstat1.nii.gz' >>> cl.inputs.out_localmax_txt_file = 'stats.txt' >>> cl.inputs.use_mm = True - >>> cl.cmdline # doctest: +ALLOW_UNICODE + >>> cl.cmdline 'cluster --in=zstat1.nii.gz --olmax=stats.txt --thresh=2.3000000000 --mm' """ @@ -1859,7 +1859,7 @@ class DualRegression(FSLCommand): >>> dual_regression.inputs.one_sample_group_mean = True >>> dual_regression.inputs.n_perm = 10 >>> dual_regression.inputs.out_dir = "my_output_directory" - >>> dual_regression.cmdline # doctest: +ALLOW_UNICODE + >>> dual_regression.cmdline u'dual_regression allFA.nii 0 -1 10 my_output_directory functional.nii functional2.nii functional3.nii' >>> dual_regression.run() # doctest: +SKIP @@ -1977,7 +1977,7 @@ class Randomise(FSLCommand): ------- >>> import nipype.interfaces.fsl as fsl >>> rand = fsl.Randomise(in_file='allFA.nii', mask = 'mask.nii', tcon='design.con', design_mat='design.mat') - >>> rand.cmdline # doctest: +ALLOW_UNICODE + >>> rand.cmdline 'randomise -i allFA.nii -o "tbss_" -d design.mat -t design.con -m mask.nii' """ @@ -2122,7 +2122,7 @@ class GLM(FSLCommand): ------- >>> import nipype.interfaces.fsl as fsl >>> glm = fsl.GLM(in_file='functional.nii', design='maps.nii', output_type='NIFTI') - >>> glm.cmdline # doctest: +ALLOW_UNICODE + >>> glm.cmdline 'fsl_glm -i functional.nii -d maps.nii -o functional_glm.nii' """ diff --git a/nipype/interfaces/fsl/possum.py b/nipype/interfaces/fsl/possum.py index 20efefbf2c..1c2b10e1d2 100644 --- a/nipype/interfaces/fsl/possum.py +++ b/nipype/interfaces/fsl/possum.py @@ -80,7 +80,7 @@ class B0Calc(FSLCommand): >>> b0calc.inputs.in_file = 'tissue+air_map.nii' >>> b0calc.inputs.z_b0 = 3.0 >>> b0calc.inputs.output_type = "NIFTI_GZ" - >>> b0calc.cmdline # doctest: +ALLOW_UNICODE + >>> b0calc.cmdline 'b0calc -i tissue+air_map.nii -o tissue+air_map_b0field.nii.gz --b0=3.00' """ diff --git a/nipype/interfaces/fsl/preprocess.py b/nipype/interfaces/fsl/preprocess.py index b96c0b6acd..4ffeead842 100644 --- a/nipype/interfaces/fsl/preprocess.py +++ b/nipype/interfaces/fsl/preprocess.py @@ -127,7 +127,7 @@ class BET(FSLCommand): >>> btr.inputs.in_file = 'structural.nii' >>> btr.inputs.frac = 0.7 >>> btr.inputs.out_file = 'brain_anat.nii' - >>> btr.cmdline # doctest: +ALLOW_UNICODE + >>> btr.cmdline 'bet structural.nii brain_anat.nii -f 0.70' >>> res = btr.run() # doctest: +SKIP @@ -298,7 +298,7 @@ class FAST(FSLCommand): >>> fastr = fsl.FAST() >>> fastr.inputs.in_files = 'structural.nii' >>> fastr.inputs.out_basename = 'fast_' - >>> fastr.cmdline # doctest: +ALLOW_UNICODE + >>> fastr.cmdline 'fast -o fast_ -S 1 structural.nii' >>> out = fastr.run() # doctest: +SKIP @@ -541,7 +541,7 @@ class FLIRT(FSLCommand): >>> flt.inputs.in_file = 'structural.nii' >>> flt.inputs.reference = 'mni.nii' >>> flt.inputs.output_type = "NIFTI_GZ" - >>> flt.cmdline # doctest: +ELLIPSIS +ALLOW_UNICODE + >>> flt.cmdline # doctest: +ELLIPSIS 'flirt -in structural.nii -ref mni.nii -out structural_flirt.nii.gz -omat structural_flirt.mat -bins 640 -searchcost mutualinfo' >>> res = flt.run() #doctest: +SKIP @@ -674,7 +674,7 @@ class MCFLIRT(FSLCommand): >>> mcflt.inputs.in_file = 'functional.nii' >>> mcflt.inputs.cost = 'mutualinfo' >>> mcflt.inputs.out_file = 'moco.nii' - >>> mcflt.cmdline # doctest: +ALLOW_UNICODE + >>> mcflt.cmdline 'mcflirt -in functional.nii -cost mutualinfo -out moco.nii' >>> res = mcflt.run() # doctest: +SKIP @@ -1397,7 +1397,7 @@ class FUGUE(FSLCommand): >>> fugue.inputs.shift_in_file = 'vsm.nii' # Previously computed with fugue as well >>> fugue.inputs.unwarp_direction = 'y' >>> fugue.inputs.output_type = "NIFTI_GZ" - >>> fugue.cmdline # doctest: +ELLIPSIS +ALLOW_UNICODE + >>> fugue.cmdline # doctest: +ELLIPSIS 'fugue --in=epi.nii --mask=epi_mask.nii --loadshift=vsm.nii --unwarpdir=y --unwarp=epi_unwarped.nii.gz' >>> fugue.run() #doctest: +SKIP @@ -1412,7 +1412,7 @@ class FUGUE(FSLCommand): >>> fugue.inputs.shift_in_file = 'vsm.nii' # Previously computed with fugue as well >>> fugue.inputs.unwarp_direction = 'y' >>> fugue.inputs.output_type = "NIFTI_GZ" - >>> fugue.cmdline # doctest: +ELLIPSIS +ALLOW_UNICODE + >>> fugue.cmdline # doctest: +ELLIPSIS 'fugue --in=epi.nii --mask=epi_mask.nii --loadshift=vsm.nii --unwarpdir=y --warp=epi_warped.nii.gz' >>> fugue.run() #doctest: +SKIP @@ -1427,7 +1427,7 @@ class FUGUE(FSLCommand): >>> fugue.inputs.unwarp_direction = 'y' >>> fugue.inputs.save_shift = True >>> fugue.inputs.output_type = "NIFTI_GZ" - >>> fugue.cmdline # doctest: +ELLIPSIS +ALLOW_UNICODE + >>> fugue.cmdline # doctest: +ELLIPSIS 'fugue --dwelltoasym=0.9390243902 --mask=epi_mask.nii --phasemap=epi_phasediff.nii --saveshift=epi_phasediff_vsm.nii.gz --unwarpdir=y' >>> fugue.run() #doctest: +SKIP diff --git a/nipype/interfaces/fsl/tests/test_Level1Design_functions.py b/nipype/interfaces/fsl/tests/test_Level1Design_functions.py index 56fdecd0b4..b7573f7454 100644 --- a/nipype/interfaces/fsl/tests/test_Level1Design_functions.py +++ b/nipype/interfaces/fsl/tests/test_Level1Design_functions.py @@ -4,7 +4,8 @@ from ..model import Level1Design -def test_level1design(): +def test_level1design(tmpdir): + old = tmpdir.chdir() l = Level1Design() runinfo = dict(cond=[{'name': 'test_condition', 'onset': [0, 10], 'duration':[10, 10]}],regress=[]) diff --git a/nipype/interfaces/fsl/tests/test_model.py b/nipype/interfaces/fsl/tests/test_model.py index 667e9033c9..b2e3f8571c 100644 --- a/nipype/interfaces/fsl/tests/test_model.py +++ b/nipype/interfaces/fsl/tests/test_model.py @@ -13,7 +13,7 @@ @pytest.mark.skipif(no_fsl(), reason="fsl is not installed") def test_MultipleRegressDesign(tmpdir): - os.chdir(str(tmpdir)) + tmpdir.chdir() foo = fsl.MultipleRegressDesign() foo.inputs.regressors = dict(voice_stenght=[1, 1, 1], age=[0.2, 0.4, 0.5], BMI=[1, -1, 2]) con1 = ['voice_and_age', 'T', ['age', 'voice_stenght'], [0.5, 0.5]] @@ -22,7 +22,7 @@ def test_MultipleRegressDesign(tmpdir): res = foo.run() for ii in ["mat", "con", "fts", "grp"]: - assert getattr(res.outputs, "design_"+ii) == os.path.join(os.getcwd(), 'design.'+ii) + assert getattr(res.outputs, "design_"+ii) == tmpdir.join('design.'+ii).strpath design_mat_expected_content = """/NumWaves 3 /NumPoints 3 @@ -62,6 +62,6 @@ def test_MultipleRegressDesign(tmpdir): 1 """ for ii in ["mat", "con", "fts", "grp"]: - assert open(os.path.join(os.getcwd(), 'design.'+ii), 'r').read() == eval("design_"+ii+"_expected_content") + assert tmpdir.join('design.'+ii).read() == eval("design_"+ii+"_expected_content") diff --git a/nipype/interfaces/fsl/tests/test_preprocess.py b/nipype/interfaces/fsl/tests/test_preprocess.py index 32f0266ddb..3d75d514a6 100644 --- a/nipype/interfaces/fsl/tests/test_preprocess.py +++ b/nipype/interfaces/fsl/tests/test_preprocess.py @@ -6,10 +6,9 @@ from builtins import open, open import os -import tempfile from copy import deepcopy -import pytest +import pytest, pdb from nipype.utils.filemanip import split_filename, filename_to_list from .. import preprocess as fsl from nipype.interfaces.fsl import Info @@ -27,11 +26,9 @@ def fsl_name(obj, fname): @pytest.fixture() def setup_infile(tmpdir): ext = Info.output_type_to_ext(Info.output_type()) - tmp_dir = str(tmpdir) - tmp_infile = os.path.join(tmp_dir, 'foo' + ext) - open(tmp_infile, 'w') - - return (tmp_infile, tmp_dir) + tmp_infile = tmpdir.join('foo' + ext) + tmp_infile.open("w") + return (tmp_infile.strpath, tmpdir.strpath) @pytest.mark.skipif(no_fsl(), reason="fsl is not installed") @@ -153,7 +150,7 @@ def test_fast(setup_infile): @pytest.mark.skipif(no_fsl(), reason="fsl is not installed") -def test_fast_list_outputs(setup_infile): +def test_fast_list_outputs(setup_infile, tmpdir): ''' By default (no -o), FSL's fast command outputs files into the same directory as the input files. If the flag -o is set, it outputs files into the cwd ''' @@ -166,9 +163,9 @@ def _run_and_test(opts, output_base): # set up tmp_infile, indir = setup_infile - cwd = tempfile.mkdtemp() - os.chdir(cwd) - assert indir != cwd + cwd = tmpdir.mkdir("new") + cwd.chdir() + assert indir != cwd.strpath out_basename = 'a_basename' # run and test @@ -177,17 +174,17 @@ def _run_and_test(opts, output_base): _run_and_test(opts, os.path.join(input_path, input_filename)) opts['out_basename'] = out_basename - _run_and_test(opts, os.path.join(cwd, out_basename)) + _run_and_test(opts, os.path.join(cwd.strpath, out_basename)) @pytest.fixture() def setup_flirt(tmpdir): ext = Info.output_type_to_ext(Info.output_type()) - tmp_dir = str(tmpdir) - _, infile = tempfile.mkstemp(suffix=ext, dir=tmp_dir) - _, reffile = tempfile.mkstemp(suffix=ext, dir=tmp_dir) - - return (tmp_dir, infile, reffile) + infile = tmpdir.join("infile"+ext) + infile.open("w") + reffile = tmpdir.join("reffile"+ext) + reffile.open("w") + return (tmpdir, infile.strpath, reffile.strpath) @pytest.mark.skipif(no_fsl(), reason="fsl is not installed") @@ -205,6 +202,7 @@ def test_flirt(setup_flirt): out_file='outfile', out_matrix_file='outmat.mat', bins=256, cost='mutualinfo') + flirt_est = fsl.FLIRT(in_file=infile, reference=reffile, out_matrix_file='outmat.mat', bins=256, @@ -249,8 +247,8 @@ def test_flirt(setup_flirt): axfm2.inputs.in_matrix_file = reffile assert axfm2.cmdline == (realcmd + ' -applyxfm -init %s' % reffile) - - _, tmpfile = tempfile.mkstemp(suffix='.nii', dir=tmpdir) + tmpfile = tmpdir.join("file4test.nii") + tmpfile.open("w") # Loop over all inputs, set a reasonable value and make sure the # cmdline is updated correctly. for key, trait_spec in sorted(fsl.FLIRT.input_spec().traits().items()): @@ -267,7 +265,7 @@ def test_flirt(setup_flirt): param = '-v' value = '-v' elif isinstance(trait_spec.trait_type, File): - value = tmpfile + value = tmpfile.strpath param = trait_spec.argstr % value elif trait_spec.default is False: param = trait_spec.argstr @@ -383,7 +381,7 @@ def test_mcflirt_noinput(): def test_fnirt(setup_flirt): tmpdir, infile, reffile = setup_flirt - os.chdir(tmpdir) + tmpdir.chdir() fnirt = fsl.FNIRT() assert fnirt.cmd == 'fnirt' @@ -549,11 +547,10 @@ def setup_fugue(tmpdir): import os.path as op d = np.ones((80, 80, 80)) - tmp_dir = str(tmpdir) - infile = op.join(tmp_dir, 'dumbfile.nii.gz') + infile = tmpdir.join('dumbfile.nii.gz').strpath nb.Nifti1Image(d, None, None).to_filename(infile) - return (tmp_dir, infile) + return (tmpdir, infile) @pytest.mark.skipif(no_fsl(), reason="fsl is not installed") diff --git a/nipype/interfaces/fsl/tests/test_utils.py b/nipype/interfaces/fsl/tests/test_utils.py index 9196d6d8d9..66b91cf96f 100644 --- a/nipype/interfaces/fsl/tests/test_utils.py +++ b/nipype/interfaces/fsl/tests/test_utils.py @@ -3,8 +3,6 @@ # vi: set ft=python sts=4 ts=4 sw=4 et: import os -from tempfile import mkdtemp -from shutil import rmtree import numpy as np diff --git a/nipype/interfaces/fsl/utils.py b/nipype/interfaces/fsl/utils.py index 072895a719..b28a4df425 100644 --- a/nipype/interfaces/fsl/utils.py +++ b/nipype/interfaces/fsl/utils.py @@ -191,7 +191,7 @@ class Smooth(FSLCommand): >>> sm.inputs.output_type = 'NIFTI_GZ' >>> sm.inputs.in_file = 'functional2.nii' >>> sm.inputs.sigma = 8.0 - >>> sm.cmdline # doctest: +ELLIPSIS +ALLOW_UNICODE + >>> sm.cmdline # doctest: +ELLIPSIS 'fslmaths functional2.nii -kernel gauss 8.000 -fmean functional2_smooth.nii.gz' Setting the kernel width using fwhm: @@ -200,7 +200,7 @@ class Smooth(FSLCommand): >>> sm.inputs.output_type = 'NIFTI_GZ' >>> sm.inputs.in_file = 'functional2.nii' >>> sm.inputs.fwhm = 8.0 - >>> sm.cmdline # doctest: +ELLIPSIS +ALLOW_UNICODE + >>> sm.cmdline # doctest: +ELLIPSIS 'fslmaths functional2.nii -kernel gauss 3.397 -fmean functional2_smooth.nii.gz' One of sigma or fwhm must be set: @@ -263,10 +263,10 @@ class Merge(FSLCommand): >>> merger.inputs.in_files = ['functional2.nii', 'functional3.nii'] >>> merger.inputs.dimension = 't' >>> merger.inputs.output_type = 'NIFTI_GZ' - >>> merger.cmdline # doctest: +ALLOW_UNICODE + >>> merger.cmdline 'fslmerge -t functional2_merged.nii.gz functional2.nii functional3.nii' >>> merger.inputs.tr = 2.25 - >>> merger.cmdline # doctest: +ALLOW_UNICODE + >>> merger.cmdline 'fslmerge -tr functional2_merged.nii.gz functional2.nii functional3.nii 2.25' @@ -1187,7 +1187,7 @@ class ConvertXFM(FSLCommand): >>> invt.inputs.in_file = "flirt.mat" >>> invt.inputs.invert_xfm = True >>> invt.inputs.out_file = 'flirt_inv.mat' - >>> invt.cmdline # doctest: +ALLOW_UNICODE + >>> invt.cmdline 'convert_xfm -omat flirt_inv.mat -inverse flirt.mat' @@ -1492,7 +1492,7 @@ class InvWarp(FSLCommand): >>> invwarp.inputs.warp = "struct2mni.nii" >>> invwarp.inputs.reference = "anatomical.nii" >>> invwarp.inputs.output_type = "NIFTI_GZ" - >>> invwarp.cmdline # doctest: +ALLOW_UNICODE + >>> invwarp.cmdline 'invwarp --out=struct2mni_inverse.nii.gz --ref=anatomical.nii --warp=struct2mni.nii' >>> res = invwarp.run() # doctest: +SKIP @@ -1728,7 +1728,7 @@ class WarpUtils(FSLCommand): >>> warputils.inputs.out_format = 'spline' >>> warputils.inputs.warp_resolution = (10,10,10) >>> warputils.inputs.output_type = "NIFTI_GZ" - >>> warputils.cmdline # doctest: +ELLIPSIS +ALLOW_UNICODE + >>> warputils.cmdline # doctest: +ELLIPSIS 'fnirtfileutils --in=warpfield.nii --outformat=spline --ref=T1.nii --warpres=10.0000,10.0000,10.0000 --out=warpfield_coeffs.nii.gz' >>> res = invwarp.run() # doctest: +SKIP @@ -1880,7 +1880,7 @@ class ConvertWarp(FSLCommand): >>> warputils.inputs.reference = "T1.nii" >>> warputils.inputs.relwarp = True >>> warputils.inputs.output_type = "NIFTI_GZ" - >>> warputils.cmdline # doctest: +ELLIPSIS +ALLOW_UNICODE + >>> warputils.cmdline # doctest: +ELLIPSIS 'convertwarp --ref=T1.nii --rel --warp1=warpfield.nii --out=T1_concatwarp.nii.gz' >>> res = warputils.run() # doctest: +SKIP @@ -1940,7 +1940,7 @@ class WarpPoints(CommandLine): >>> warppoints.inputs.dest_file = 'T1.nii' >>> warppoints.inputs.warp_file = 'warpfield.nii' >>> warppoints.inputs.coord_mm = True - >>> warppoints.cmdline # doctest: +ELLIPSIS +ALLOW_UNICODE + >>> warppoints.cmdline # doctest: +ELLIPSIS 'img2imgcoord -mm -dest T1.nii -src epi.nii -warp warpfield.nii surf.txt' >>> res = warppoints.run() # doctest: +SKIP @@ -2100,7 +2100,7 @@ class WarpPointsToStd(WarpPoints): >>> warppoints.inputs.std_file = 'mni.nii' >>> warppoints.inputs.warp_file = 'warpfield.nii' >>> warppoints.inputs.coord_mm = True - >>> warppoints.cmdline # doctest: +ELLIPSIS +ALLOW_UNICODE + >>> warppoints.cmdline # doctest: +ELLIPSIS 'img2stdcoord -mm -img T1.nii -std mni.nii -warp warpfield.nii surf.txt' >>> res = warppoints.run() # doctest: +SKIP @@ -2148,7 +2148,7 @@ class WarpPointsFromStd(CommandLine): >>> warppoints.inputs.std_file = 'mni.nii' >>> warppoints.inputs.warp_file = 'warpfield.nii' >>> warppoints.inputs.coord_mm = True - >>> warppoints.cmdline # doctest: +ELLIPSIS +ALLOW_UNICODE + >>> warppoints.cmdline # doctest: +ELLIPSIS 'std2imgcoord -mm -img T1.nii -std mni.nii -warp warpfield.nii surf.txt' >>> res = warppoints.run() # doctest: +SKIP @@ -2217,7 +2217,7 @@ class MotionOutliers(FSLCommand): >>> from nipype.interfaces.fsl import MotionOutliers >>> mo = MotionOutliers() >>> mo.inputs.in_file = "epi.nii" - >>> mo.cmdline # doctest: +ELLIPSIS +ALLOW_UNICODE + >>> mo.cmdline # doctest: +ELLIPSIS 'fsl_motion_outliers -i epi.nii -o epi_outliers.txt -p epi_metrics.png -s epi_metrics.txt' >>> res = mo.run() # doctest: +SKIP """ diff --git a/nipype/interfaces/io.py b/nipype/interfaces/io.py index 4d3220b044..f02f655cf1 100644 --- a/nipype/interfaces/io.py +++ b/nipype/interfaces/io.py @@ -1222,7 +1222,7 @@ class SelectFiles(IOBase): ... "epi": "{subject_id}/func/f[0, 1].nii"} >>> dg = Node(SelectFiles(templates), "selectfiles") >>> dg.inputs.subject_id = "subj1" - >>> pprint.pprint(dg.outputs.get()) # doctest: +NORMALIZE_WHITESPACE +ALLOW_UNICODE + >>> pprint.pprint(dg.outputs.get()) # doctest: {'T1': , 'epi': } The same thing with dynamic grabbing of specific files: @@ -2477,18 +2477,28 @@ class JSONFileGrabber(IOBase): Example ------- + .. testsetup:: + + >>> tmp = getfixture('tmpdir') + >>> old = tmp.chdir() # changing to a temporary directory + + .. doctest:: + >>> import pprint >>> from nipype.interfaces.io import JSONFileGrabber >>> jsonSource = JSONFileGrabber() >>> jsonSource.inputs.defaults = {'param1': 'overrideMe', 'param3': 1.0} >>> res = jsonSource.run() - >>> pprint.pprint(res.outputs.get()) # doctest: +ALLOW_UNICODE + >>> pprint.pprint(res.outputs.get()) {'param1': 'overrideMe', 'param3': 1.0} - >>> jsonSource.inputs.in_file = 'jsongrabber.txt' + >>> jsonSource.inputs.in_file = os.path.join(datadir, 'jsongrabber.txt') >>> res = jsonSource.run() - >>> pprint.pprint(res.outputs.get()) # doctest: +NORMALIZE_WHITESPACE, +ELLIPSIS +ALLOW_UNICODE + >>> pprint.pprint(res.outputs.get()) # doctest:, +ELLIPSIS {'param1': 'exampleStr', 'param2': 4, 'param3': 1.0} + .. testsetup:: + + >>> os.chdir(old.strpath) """ input_spec = JSONFileGrabberInputSpec diff --git a/nipype/interfaces/meshfix.py b/nipype/interfaces/meshfix.py index 6ae1859459..466190468a 100644 --- a/nipype/interfaces/meshfix.py +++ b/nipype/interfaces/meshfix.py @@ -105,7 +105,7 @@ class MeshFix(CommandLine): >>> fix.inputs.in_file1 = 'lh-pial.stl' >>> fix.inputs.in_file2 = 'rh-pial.stl' >>> fix.run() # doctest: +SKIP - >>> fix.cmdline # doctest: +ALLOW_UNICODE + >>> fix.cmdline 'meshfix lh-pial.stl rh-pial.stl -o lh-pial_fixed.off' """ _cmd = 'meshfix' diff --git a/nipype/interfaces/minc/base.py b/nipype/interfaces/minc/base.py index 6348e4ee0f..e4b8592adf 100644 --- a/nipype/interfaces/minc/base.py +++ b/nipype/interfaces/minc/base.py @@ -109,11 +109,11 @@ def aggregate_filename(files, new_suffix): >>> from nipype.interfaces.minc.base import aggregate_filename >>> f = aggregate_filename(['/tmp/foo1.mnc', '/tmp/foo2.mnc', '/tmp/foo3.mnc'], 'averaged') - >>> os.path.split(f)[1] # This has a full path, so just check the filename. # doctest: +ALLOW_UNICODE + >>> os.path.split(f)[1] # This has a full path, so just check the filename. 'foo_averaged.mnc' >>> f = aggregate_filename(['/tmp/foo1.mnc', '/tmp/blah1.mnc'], 'averaged') - >>> os.path.split(f)[1] # This has a full path, so just check the filename. # doctest: +ALLOW_UNICODE + >>> os.path.split(f)[1] # This has a full path, so just check the filename. 'foo1_averaged.mnc' """ diff --git a/nipype/interfaces/mne/base.py b/nipype/interfaces/mne/base.py index f2f3a70641..5196ddf5be 100644 --- a/nipype/interfaces/mne/base.py +++ b/nipype/interfaces/mne/base.py @@ -55,7 +55,7 @@ class WatershedBEM(FSCommand): >>> bem = WatershedBEM() >>> bem.inputs.subject_id = 'subj1' >>> bem.inputs.subjects_dir = '.' - >>> bem.cmdline # doctest: +ALLOW_UNICODE + >>> bem.cmdline 'mne_watershed_bem --overwrite --subject subj1 --volume T1' >>> bem.run() # doctest: +SKIP diff --git a/nipype/interfaces/mrtrix/preprocess.py b/nipype/interfaces/mrtrix/preprocess.py index 7ca6abd1fb..becee5088f 100644 --- a/nipype/interfaces/mrtrix/preprocess.py +++ b/nipype/interfaces/mrtrix/preprocess.py @@ -144,7 +144,7 @@ class DWI2Tensor(CommandLine): >>> dwi2tensor = mrt.DWI2Tensor() >>> dwi2tensor.inputs.in_file = 'dwi.mif' >>> dwi2tensor.inputs.encoding_file = 'encoding.txt' - >>> dwi2tensor.cmdline # doctest: +ALLOW_UNICODE + >>> dwi2tensor.cmdline 'dwi2tensor -grad encoding.txt dwi.mif dwi_tensor.mif' >>> dwi2tensor.run() # doctest: +SKIP """ diff --git a/nipype/interfaces/mrtrix/tracking.py b/nipype/interfaces/mrtrix/tracking.py index 5fa39d38d3..5570a9b8d1 100644 --- a/nipype/interfaces/mrtrix/tracking.py +++ b/nipype/interfaces/mrtrix/tracking.py @@ -210,7 +210,7 @@ class StreamlineTrack(CommandLine): >>> strack.inputs.in_file = 'data.Bfloat' >>> strack.inputs.seed_file = 'seed_mask.nii' >>> strack.inputs.mask_file = 'mask.nii' - >>> strack.cmdline # doctest: +ALLOW_UNICODE + >>> strack.cmdline 'streamtrack -mask mask.nii -seed seed_mask.nii SD_PROB data.Bfloat data_tracked.tck' >>> strack.run() # doctest: +SKIP """ diff --git a/nipype/interfaces/mrtrix3/connectivity.py b/nipype/interfaces/mrtrix3/connectivity.py index a2e7db355d..caa510e6e1 100644 --- a/nipype/interfaces/mrtrix3/connectivity.py +++ b/nipype/interfaces/mrtrix3/connectivity.py @@ -96,7 +96,7 @@ class BuildConnectome(MRTrix3Base): >>> mat = mrt.BuildConnectome() >>> mat.inputs.in_file = 'tracks.tck' >>> mat.inputs.in_parc = 'aparc+aseg.nii' - >>> mat.cmdline # doctest: +ELLIPSIS +ALLOW_UNICODE + >>> mat.cmdline # doctest: +ELLIPSIS 'tck2connectome tracks.tck aparc+aseg.nii connectome.csv' >>> mat.run() # doctest: +SKIP """ @@ -155,7 +155,7 @@ class LabelConfig(MRTrix3Base): >>> labels = mrt.LabelConfig() >>> labels.inputs.in_file = 'aparc+aseg.nii' >>> labels.inputs.in_config = 'mrtrix3_labelconfig.txt' - >>> labels.cmdline # doctest: +ELLIPSIS +ALLOW_UNICODE + >>> labels.cmdline # doctest: +ELLIPSIS 'labelconfig aparc+aseg.nii mrtrix3_labelconfig.txt parcellation.mif' >>> labels.run() # doctest: +SKIP """ diff --git a/nipype/interfaces/mrtrix3/preprocess.py b/nipype/interfaces/mrtrix3/preprocess.py index 91ec44d1f0..141325e25b 100644 --- a/nipype/interfaces/mrtrix3/preprocess.py +++ b/nipype/interfaces/mrtrix3/preprocess.py @@ -96,7 +96,7 @@ class ResponseSD(MRTrix3Base): >>> resp.inputs.in_file = 'dwi.mif' >>> resp.inputs.in_mask = 'mask.nii.gz' >>> resp.inputs.grad_fsl = ('bvecs', 'bvals') - >>> resp.cmdline # doctest: +ELLIPSIS +ALLOW_UNICODE + >>> resp.cmdline # doctest: +ELLIPSIS 'dwi2response -fslgrad bvecs bvals -mask mask.nii.gz dwi.mif response.txt' >>> resp.run() # doctest: +SKIP """ @@ -139,7 +139,7 @@ class ACTPrepareFSL(CommandLine): >>> import nipype.interfaces.mrtrix3 as mrt >>> prep = mrt.ACTPrepareFSL() >>> prep.inputs.in_file = 'T1.nii.gz' - >>> prep.cmdline # doctest: +ELLIPSIS +ALLOW_UNICODE + >>> prep.cmdline # doctest: +ELLIPSIS 'act_anat_prepare_fsl T1.nii.gz act_5tt.mif' >>> prep.run() # doctest: +SKIP """ @@ -185,7 +185,7 @@ class ReplaceFSwithFIRST(CommandLine): >>> prep.inputs.in_file = 'aparc+aseg.nii' >>> prep.inputs.in_t1w = 'T1.nii.gz' >>> prep.inputs.in_config = 'mrtrix3_labelconfig.txt' - >>> prep.cmdline # doctest: +ELLIPSIS +ALLOW_UNICODE + >>> prep.cmdline # doctest: +ELLIPSIS 'fs_parc_replace_sgm_first aparc+aseg.nii T1.nii.gz \ mrtrix3_labelconfig.txt aparc+first.mif' >>> prep.run() # doctest: +SKIP diff --git a/nipype/interfaces/mrtrix3/reconst.py b/nipype/interfaces/mrtrix3/reconst.py index b1f71dd572..b608c5514c 100644 --- a/nipype/interfaces/mrtrix3/reconst.py +++ b/nipype/interfaces/mrtrix3/reconst.py @@ -58,7 +58,7 @@ class FitTensor(MRTrix3Base): >>> tsr.inputs.in_file = 'dwi.mif' >>> tsr.inputs.in_mask = 'mask.nii.gz' >>> tsr.inputs.grad_fsl = ('bvecs', 'bvals') - >>> tsr.cmdline # doctest: +ELLIPSIS +ALLOW_UNICODE + >>> tsr.cmdline # doctest: +ELLIPSIS 'dwi2tensor -fslgrad bvecs bvals -mask mask.nii.gz dwi.mif dti.mif' >>> tsr.run() # doctest: +SKIP """ @@ -173,7 +173,7 @@ class EstimateFOD(MRTrix3Base): >>> fod.inputs.response = 'response.txt' >>> fod.inputs.in_mask = 'mask.nii.gz' >>> fod.inputs.grad_fsl = ('bvecs', 'bvals') - >>> fod.cmdline # doctest: +ELLIPSIS +ALLOW_UNICODE + >>> fod.cmdline # doctest: +ELLIPSIS 'dwi2fod -fslgrad bvecs bvals -mask mask.nii.gz dwi.mif response.txt\ fods.mif' >>> fod.run() # doctest: +SKIP diff --git a/nipype/interfaces/mrtrix3/tracking.py b/nipype/interfaces/mrtrix3/tracking.py index 82c7294cfc..f2cc9c7c75 100644 --- a/nipype/interfaces/mrtrix3/tracking.py +++ b/nipype/interfaces/mrtrix3/tracking.py @@ -227,7 +227,7 @@ class Tractography(MRTrix3Base): >>> tk.inputs.in_file = 'fods.mif' >>> tk.inputs.roi_mask = 'mask.nii.gz' >>> tk.inputs.seed_sphere = (80, 100, 70, 10) - >>> tk.cmdline # doctest: +ELLIPSIS +ALLOW_UNICODE + >>> tk.cmdline # doctest: +ELLIPSIS 'tckgen -algorithm iFOD2 -mask mask.nii.gz -seed_sphere \ 80.000000,100.000000,70.000000,10.000000 fods.mif tracked.tck' >>> tk.run() # doctest: +SKIP diff --git a/nipype/interfaces/mrtrix3/utils.py b/nipype/interfaces/mrtrix3/utils.py index 99f308bd18..42f3d0c6fd 100644 --- a/nipype/interfaces/mrtrix3/utils.py +++ b/nipype/interfaces/mrtrix3/utils.py @@ -46,7 +46,7 @@ class BrainMask(CommandLine): >>> import nipype.interfaces.mrtrix3 as mrt >>> bmsk = mrt.BrainMask() >>> bmsk.inputs.in_file = 'dwi.mif' - >>> bmsk.cmdline # doctest: +ELLIPSIS +ALLOW_UNICODE + >>> bmsk.cmdline # doctest: +ELLIPSIS 'dwi2mask dwi.mif brainmask.mif' >>> bmsk.run() # doctest: +SKIP """ @@ -93,7 +93,7 @@ class Mesh2PVE(CommandLine): >>> m2p.inputs.in_file = 'surf1.vtk' >>> m2p.inputs.reference = 'dwi.mif' >>> m2p.inputs.in_first = 'T1.nii.gz' - >>> m2p.cmdline # doctest: +ELLIPSIS +ALLOW_UNICODE + >>> m2p.cmdline # doctest: +ELLIPSIS 'mesh2pve -first T1.nii.gz surf1.vtk dwi.mif mesh2volume.nii.gz' >>> m2p.run() # doctest: +SKIP """ @@ -139,7 +139,7 @@ class Generate5tt(CommandLine): >>> seg.inputs.in_fast = ['tpm_00.nii.gz', ... 'tpm_01.nii.gz', 'tpm_02.nii.gz'] >>> seg.inputs.in_first = 'first_merged.nii.gz' - >>> seg.cmdline # doctest: +ELLIPSIS +ALLOW_UNICODE + >>> seg.cmdline # doctest: +ELLIPSIS '5ttgen tpm_00.nii.gz tpm_01.nii.gz tpm_02.nii.gz first_merged.nii.gz\ act-5tt.mif' >>> seg.run() # doctest: +SKIP @@ -197,7 +197,7 @@ class TensorMetrics(CommandLine): >>> comp = mrt.TensorMetrics() >>> comp.inputs.in_file = 'dti.mif' >>> comp.inputs.out_fa = 'fa.mif' - >>> comp.cmdline # doctest: +ELLIPSIS +ALLOW_UNICODE + >>> comp.cmdline # doctest: +ELLIPSIS 'tensor2metric -fa fa.mif dti.mif' >>> comp.run() # doctest: +SKIP """ @@ -337,7 +337,7 @@ class ComputeTDI(MRTrix3Base): >>> import nipype.interfaces.mrtrix3 as mrt >>> tdi = mrt.ComputeTDI() >>> tdi.inputs.in_file = 'dti.mif' - >>> tdi.cmdline # doctest: +ELLIPSIS +ALLOW_UNICODE + >>> tdi.cmdline # doctest: +ELLIPSIS 'tckmap dti.mif tdi.mif' >>> tdi.run() # doctest: +SKIP """ @@ -388,7 +388,7 @@ class TCK2VTK(MRTrix3Base): >>> vtk = mrt.TCK2VTK() >>> vtk.inputs.in_file = 'tracks.tck' >>> vtk.inputs.reference = 'b0.nii' - >>> vtk.cmdline # doctest: +ELLIPSIS +ALLOW_UNICODE + >>> vtk.cmdline # doctest: +ELLIPSIS 'tck2vtk -image b0.nii tracks.tck tracks.vtk' >>> vtk.run() # doctest: +SKIP """ diff --git a/nipype/interfaces/niftyfit/asl.py b/nipype/interfaces/niftyfit/asl.py index f0cc8bc19b..366f9a6eca 100644 --- a/nipype/interfaces/niftyfit/asl.py +++ b/nipype/interfaces/niftyfit/asl.py @@ -147,7 +147,7 @@ class FitAsl(NiftyFitCommand): >>> from nipype.interfaces import niftyfit >>> node = niftyfit.FitAsl() >>> node.inputs.source_file = 'asl.nii.gz' - >>> node.cmdline # doctest: +ALLOW_UNICODE + >>> node.cmdline 'fit_asl -source asl.nii.gz -cbf asl_cbf.nii.gz -error asl_error.nii.gz \ -syn asl_syn.nii.gz' diff --git a/nipype/interfaces/niftyfit/dwi.py b/nipype/interfaces/niftyfit/dwi.py index e368726656..67c5444bbe 100644 --- a/nipype/interfaces/niftyfit/dwi.py +++ b/nipype/interfaces/niftyfit/dwi.py @@ -248,7 +248,7 @@ class FitDwi(NiftyFitCommand): >>> fit_dwi.inputs.bvec_file = 'bvecs' >>> fit_dwi.inputs.bval_file = 'bvals' >>> fit_dwi.inputs.rgbmap_file = 'rgb.nii.gz' - >>> fit_dwi.cmdline # doctest: +ALLOW_UNICODE + >>> fit_dwi.cmdline 'fit_dwi -source dwi.nii.gz -bval bvals -bvec bvecs -dti \ -error dwi_error.nii.gz -famap dwi_famap.nii.gz -mcmap dwi_mcmap.nii.gz \ -mcout dwi_mcout.txt -mdmap dwi_mdmap.nii.gz -nodiff dwi_no_diff.nii.gz \ @@ -427,7 +427,7 @@ class DwiTool(NiftyFitCommand): >>> dwi_tool.inputs.mask_file = 'mask.nii.gz' >>> dwi_tool.inputs.b0_file = 'b0.nii.gz' >>> dwi_tool.inputs.rgbmap_file = 'rgb_map.nii.gz' - >>> dwi_tool.cmdline # doctest: +ALLOW_UNICODE + >>> dwi_tool.cmdline 'dwi_tool -source dwi.nii.gz -bval bvals -bvec bvecs -b0 b0.nii.gz \ -mask mask.nii.gz -dti -famap dwi_famap.nii.gz -logdti2 dwi_logdti2.nii.gz \ -mcmap dwi_mcmap.nii.gz -mdmap dwi_mdmap.nii.gz -rgbmap rgb_map.nii.gz \ diff --git a/nipype/interfaces/niftyfit/qt1.py b/nipype/interfaces/niftyfit/qt1.py index 6cb0cf7da1..b5ccfed88b 100644 --- a/nipype/interfaces/niftyfit/qt1.py +++ b/nipype/interfaces/niftyfit/qt1.py @@ -165,7 +165,7 @@ class FitQt1(NiftyFitCommand): >>> from nipype.interfaces.niftyfit import FitQt1 >>> fit_qt1 = FitQt1() >>> fit_qt1.inputs.source_file = 'TI4D.nii.gz' - >>> fit_qt1.cmdline # doctest: +ALLOW_UNICODE + >>> fit_qt1.cmdline 'fit_qt1 -source TI4D.nii.gz -comp TI4D_comp.nii.gz \ -error TI4D_error.nii.gz -m0map TI4D_m0map.nii.gz -mcmap TI4D_mcmap.nii.gz \ -res TI4D_res.nii.gz -syn TI4D_syn.nii.gz -t1map TI4D_t1map.nii.gz' diff --git a/nipype/interfaces/niftyreg/reg.py b/nipype/interfaces/niftyreg/reg.py index e8ad87e3ee..fa4a1701ee 100644 --- a/nipype/interfaces/niftyreg/reg.py +++ b/nipype/interfaces/niftyreg/reg.py @@ -156,7 +156,7 @@ class RegAladin(NiftyRegCommand): >>> node.inputs.flo_file = 'im2.nii' >>> node.inputs.rmask_file = 'mask.nii' >>> node.inputs.omp_core_val = 4 - >>> node.cmdline # doctest: +ALLOW_UNICODE + >>> node.cmdline 'reg_aladin -aff im2_aff.txt -flo im2.nii -omp 4 -ref im1.nii \ -res im2_res.nii.gz -rmask mask.nii' @@ -367,7 +367,7 @@ class RegF3D(NiftyRegCommand): >>> node.inputs.flo_file = 'im2.nii' >>> node.inputs.rmask_file = 'mask.nii' >>> node.inputs.omp_core_val = 4 - >>> node.cmdline # doctest: +ALLOW_UNICODE + >>> node.cmdline 'reg_f3d -cpp im2_cpp.nii.gz -flo im2.nii -omp 4 -ref im1.nii \ -res im2_res.nii.gz -rmask mask.nii' diff --git a/nipype/interfaces/niftyreg/regutils.py b/nipype/interfaces/niftyreg/regutils.py index 9c2ddc055d..214ccc9a45 100644 --- a/nipype/interfaces/niftyreg/regutils.py +++ b/nipype/interfaces/niftyreg/regutils.py @@ -106,7 +106,7 @@ class RegResample(NiftyRegCommand): >>> node.inputs.trans_file = 'warpfield.nii' >>> node.inputs.inter_val = 'LIN' >>> node.inputs.omp_core_val = 4 - >>> node.cmdline # doctest: +ALLOW_UNICODE + >>> node.cmdline 'reg_resample -flo im2.nii -inter 1 -omp 4 -ref im1.nii -trans \ warpfield.nii -res im2_res.nii.gz' @@ -173,7 +173,7 @@ class RegJacobian(NiftyRegCommand): >>> node.inputs.ref_file = 'im1.nii' >>> node.inputs.trans_file = 'warpfield.nii' >>> node.inputs.omp_core_val = 4 - >>> node.cmdline # doctest: +ALLOW_UNICODE + >>> node.cmdline 'reg_jacobian -omp 4 -ref im1.nii -trans warpfield.nii -jac \ warpfield_jac.nii.gz' @@ -289,7 +289,7 @@ class RegTools(NiftyRegCommand): >>> node.inputs.in_file = 'im1.nii' >>> node.inputs.mul_val = 4 >>> node.inputs.omp_core_val = 4 - >>> node.cmdline # doctest: +ALLOW_UNICODE + >>> node.cmdline 'reg_tools -in im1.nii -mul 4.0 -omp 4 -out im1_tools.nii.gz' """ @@ -391,15 +391,27 @@ class RegAverage(NiftyRegCommand): Examples -------- + + .. testsetup:: + + >>> tmp = getfixture('tmpdir') + >>> old = tmp.chdir() # changing to temporary file + + .. doctest:: + >>> from nipype.interfaces import niftyreg >>> node = niftyreg.RegAverage() >>> one_file = 'im1.nii' >>> two_file = 'im2.nii' >>> three_file = 'im3.nii' >>> node.inputs.avg_files = [one_file, two_file, three_file] - >>> node.cmdline # doctest: +ELLIPSIS +ALLOW_UNICODE + >>> node.cmdline # doctest: +ELLIPSIS 'reg_average --cmd_file .../reg_average_cmd' + .. testsetup:: + + >>> os.chdir(old.strpath) + """ _cmd = get_custom_path('reg_average') input_spec = RegAverageInputSpec @@ -602,7 +614,7 @@ class RegTransform(NiftyRegCommand): >>> node = niftyreg.RegTransform() >>> node.inputs.def_input = 'warpfield.nii' >>> node.inputs.omp_core_val = 4 - >>> node.cmdline # doctest: +ELLIPSIS +ALLOW_UNICODE + >>> node.cmdline # doctest: +ELLIPSIS 'reg_transform -omp 4 -def warpfield.nii .../warpfield_trans.nii.gz' """ @@ -714,7 +726,7 @@ class RegMeasure(NiftyRegCommand): >>> node.inputs.flo_file = 'im2.nii' >>> node.inputs.measure_type = 'lncc' >>> node.inputs.omp_core_val = 4 - >>> node.cmdline # doctest: +ALLOW_UNICODE + >>> node.cmdline 'reg_measure -flo im2.nii -lncc -omp 4 -out im2_lncc.txt -ref im1.nii' """ diff --git a/nipype/interfaces/niftyseg/em.py b/nipype/interfaces/niftyseg/em.py index be39f7775b..f2e7359677 100644 --- a/nipype/interfaces/niftyseg/em.py +++ b/nipype/interfaces/niftyseg/em.py @@ -127,7 +127,7 @@ class EM(NiftySegCommand): >>> node = niftyseg.EM() >>> node.inputs.in_file = 'im1.nii' >>> node.inputs.no_prior = 4 - >>> node.cmdline # doctest: +ALLOW_UNICODE + >>> node.cmdline 'seg_EM -in im1.nii -nopriors 4 -bc_out im1_bc_em.nii.gz -out im1_em.nii.gz -out_outlier im1_outlier_em.nii.gz' """ diff --git a/nipype/interfaces/niftyseg/label_fusion.py b/nipype/interfaces/niftyseg/label_fusion.py index 82b19d1f3b..c1637cb258 100644 --- a/nipype/interfaces/niftyseg/label_fusion.py +++ b/nipype/interfaces/niftyseg/label_fusion.py @@ -147,7 +147,7 @@ class LabelFusion(NiftySegCommand): >>> node.inputs.template_file = 'im3.nii' >>> node.inputs.template_num = 2 >>> node.inputs.classifier_type = 'STEPS' - >>> node.cmdline # doctest: +ALLOW_UNICODE + >>> node.cmdline 'seg_LabFusion -in im1.nii -STEPS 2.000000 2 im2.nii im3.nii -out im1_steps.nii' """ @@ -298,7 +298,7 @@ class CalcTopNCC(NiftySegCommand): >>> node.inputs.num_templates = 2 >>> node.inputs.in_templates = ['im2.nii', 'im3.nii'] >>> node.inputs.top_templates = 1 - >>> node.cmdline # doctest: +ALLOW_UNICODE + >>> node.cmdline 'seg_CalcTopNCC -target im1.nii -templates 2 im2.nii im3.nii -n 1' """ diff --git a/nipype/interfaces/niftyseg/lesions.py b/nipype/interfaces/niftyseg/lesions.py index d531b5c464..489837e6dd 100644 --- a/nipype/interfaces/niftyseg/lesions.py +++ b/nipype/interfaces/niftyseg/lesions.py @@ -109,7 +109,7 @@ class FillLesions(NiftySegCommand): >>> node = niftyseg.FillLesions() >>> node.inputs.in_file = 'im1.nii' >>> node.inputs.lesion_mask = 'im2.nii' - >>> node.cmdline # doctest: +ALLOW_UNICODE + >>> node.cmdline 'seg_FillLesions -i im1.nii -l im2.nii -o im1_lesions_filled.nii.gz' """ diff --git a/nipype/interfaces/niftyseg/maths.py b/nipype/interfaces/niftyseg/maths.py index bd05ab5df3..b8a5c0a1b8 100644 --- a/nipype/interfaces/niftyseg/maths.py +++ b/nipype/interfaces/niftyseg/maths.py @@ -169,31 +169,31 @@ class UnaryMaths(MathsCommand): >>> # Test sqrt operation >>> unary_sqrt = copy.deepcopy(unary) >>> unary_sqrt.inputs.operation = 'sqrt' - >>> unary_sqrt.cmdline # doctest: +ALLOW_UNICODE + >>> unary_sqrt.cmdline 'seg_maths im1.nii -sqrt -odt float im1_sqrt.nii' >>> unary_sqrt.run() # doctest: +SKIP >>> # Test sqrt operation >>> unary_abs = copy.deepcopy(unary) >>> unary_abs.inputs.operation = 'abs' - >>> unary_abs.cmdline # doctest: +ALLOW_UNICODE + >>> unary_abs.cmdline 'seg_maths im1.nii -abs -odt float im1_abs.nii' >>> unary_abs.run() # doctest: +SKIP >>> # Test bin operation >>> unary_bin = copy.deepcopy(unary) >>> unary_bin.inputs.operation = 'bin' - >>> unary_bin.cmdline # doctest: +ALLOW_UNICODE + >>> unary_bin.cmdline 'seg_maths im1.nii -bin -odt float im1_bin.nii' >>> unary_bin.run() # doctest: +SKIP >>> # Test otsu operation >>> unary_otsu = copy.deepcopy(unary) >>> unary_otsu.inputs.operation = 'otsu' - >>> unary_otsu.cmdline # doctest: +ALLOW_UNICODE + >>> unary_otsu.cmdline 'seg_maths im1.nii -otsu -odt float im1_otsu.nii' >>> unary_otsu.run() # doctest: +SKIP >>> # Test isnan operation >>> unary_isnan = copy.deepcopy(unary) >>> unary_isnan.inputs.operation = 'isnan' - >>> unary_isnan.cmdline # doctest: +ALLOW_UNICODE + >>> unary_isnan.cmdline 'seg_maths im1.nii -isnan -odt float im1_isnan.nii' >>> unary_isnan.run() # doctest: +SKIP @@ -302,28 +302,28 @@ class BinaryMaths(MathsCommand): >>> binary_sub = copy.deepcopy(binary) >>> binary_sub.inputs.operation = 'sub' >>> binary_sub.inputs.operand_file = 'im2.nii' - >>> binary_sub.cmdline # doctest: +ALLOW_UNICODE + >>> binary_sub.cmdline 'seg_maths im1.nii -sub im2.nii -odt float im1_sub.nii' >>> binary_sub.run() # doctest: +SKIP >>> # Test mul operation >>> binary_mul = copy.deepcopy(binary) >>> binary_mul.inputs.operation = 'mul' >>> binary_mul.inputs.operand_value = 2.0 - >>> binary_mul.cmdline # doctest: +ALLOW_UNICODE + >>> binary_mul.cmdline 'seg_maths im1.nii -mul 2.00000000 -odt float im1_mul.nii' >>> binary_mul.run() # doctest: +SKIP >>> # Test llsnorm operation >>> binary_llsnorm = copy.deepcopy(binary) >>> binary_llsnorm.inputs.operation = 'llsnorm' >>> binary_llsnorm.inputs.operand_file = 'im2.nii' - >>> binary_llsnorm.cmdline # doctest: +ALLOW_UNICODE + >>> binary_llsnorm.cmdline 'seg_maths im1.nii -llsnorm im2.nii -odt float im1_llsnorm.nii' >>> binary_llsnorm.run() # doctest: +SKIP >>> # Test splitinter operation >>> binary_splitinter = copy.deepcopy(binary) >>> binary_splitinter.inputs.operation = 'splitinter' >>> binary_splitinter.inputs.operand_str = 'z' - >>> binary_splitinter.cmdline # doctest: +ALLOW_UNICODE + >>> binary_splitinter.cmdline 'seg_maths im1.nii -splitinter z -odt float im1_splitinter.nii' >>> binary_splitinter.run() # doctest: +SKIP @@ -419,21 +419,21 @@ class BinaryMathsInteger(MathsCommand): >>> binaryi_dil = copy.deepcopy(binaryi) >>> binaryi_dil.inputs.operation = 'dil' >>> binaryi_dil.inputs.operand_value = 2 - >>> binaryi_dil.cmdline # doctest: +ALLOW_UNICODE + >>> binaryi_dil.cmdline 'seg_maths im1.nii -dil 2 -odt float im1_dil.nii' >>> binaryi_dil.run() # doctest: +SKIP >>> # Test dil operation >>> binaryi_ero = copy.deepcopy(binaryi) >>> binaryi_ero.inputs.operation = 'ero' >>> binaryi_ero.inputs.operand_value = 1 - >>> binaryi_ero.cmdline # doctest: +ALLOW_UNICODE + >>> binaryi_ero.cmdline 'seg_maths im1.nii -ero 1 -odt float im1_ero.nii' >>> binaryi_ero.run() # doctest: +SKIP >>> # Test pad operation >>> binaryi_pad = copy.deepcopy(binaryi) >>> binaryi_pad.inputs.operation = 'pad' >>> binaryi_pad.inputs.operand_value = 4 - >>> binaryi_pad.cmdline # doctest: +ALLOW_UNICODE + >>> binaryi_pad.cmdline 'seg_maths im1.nii -pad 4 -odt float im1_pad.nii' >>> binaryi_pad.run() # doctest: +SKIP @@ -512,7 +512,7 @@ class TupleMaths(MathsCommand): >>> tuple_lncc.inputs.operation = 'lncc' >>> tuple_lncc.inputs.operand_file1 = 'im2.nii' >>> tuple_lncc.inputs.operand_value2 = 2.0 - >>> tuple_lncc.cmdline # doctest: +ALLOW_UNICODE + >>> tuple_lncc.cmdline 'seg_maths im1.nii -lncc im2.nii 2.00000000 -odt float im1_lncc.nii' >>> tuple_lncc.run() # doctest: +SKIP @@ -521,7 +521,7 @@ class TupleMaths(MathsCommand): >>> tuple_lssd.inputs.operation = 'lssd' >>> tuple_lssd.inputs.operand_file1 = 'im2.nii' >>> tuple_lssd.inputs.operand_value2 = 1.0 - >>> tuple_lssd.cmdline # doctest: +ALLOW_UNICODE + >>> tuple_lssd.cmdline 'seg_maths im1.nii -lssd im2.nii 1.00000000 -odt float im1_lssd.nii' >>> tuple_lssd.run() # doctest: +SKIP @@ -530,7 +530,7 @@ class TupleMaths(MathsCommand): >>> tuple_lltsnorm.inputs.operation = 'lltsnorm' >>> tuple_lltsnorm.inputs.operand_file1 = 'im2.nii' >>> tuple_lltsnorm.inputs.operand_value2 = 0.01 - >>> tuple_lltsnorm.cmdline # doctest: +ALLOW_UNICODE + >>> tuple_lltsnorm.cmdline 'seg_maths im1.nii -lltsnorm im2.nii 0.01000000 -odt float \ im1_lltsnorm.nii' >>> tuple_lltsnorm.run() # doctest: +SKIP @@ -575,7 +575,7 @@ class Merge(MathsCommand): >>> node.inputs.merge_files = files >>> node.inputs.dimension = 2 >>> node.inputs.output_datatype = 'float' - >>> node.cmdline # doctest: +ALLOW_UNICODE + >>> node.cmdline 'seg_maths im1.nii -merge 2 2 im2.nii im3.nii -odt float im1_merged.nii' """ diff --git a/nipype/interfaces/niftyseg/patchmatch.py b/nipype/interfaces/niftyseg/patchmatch.py index d598a08928..207764f086 100644 --- a/nipype/interfaces/niftyseg/patchmatch.py +++ b/nipype/interfaces/niftyseg/patchmatch.py @@ -102,7 +102,7 @@ class PatchMatch(NiftySegCommand): >>> node.inputs.in_file = 'im1.nii' >>> node.inputs.mask_file = 'im2.nii' >>> node.inputs.database_file = 'db.xml' - >>> node.cmdline # doctest: +ALLOW_UNICODE + >>> node.cmdline 'seg_PatchMatch -i im1.nii -m im2.nii -db db.xml -o im1_pm.nii.gz' """ diff --git a/nipype/interfaces/niftyseg/stats.py b/nipype/interfaces/niftyseg/stats.py index e2e7781aa6..cef03b6177 100644 --- a/nipype/interfaces/niftyseg/stats.py +++ b/nipype/interfaces/niftyseg/stats.py @@ -154,19 +154,19 @@ class UnaryStats(StatsCommand): >>> # Test v operation >>> unary_v = copy.deepcopy(unary) >>> unary_v.inputs.operation = 'v' - >>> unary_v.cmdline # doctest: +ALLOW_UNICODE + >>> unary_v.cmdline 'seg_stats im1.nii -v' >>> unary_v.run() # doctest: +SKIP >>> # Test vl operation >>> unary_vl = copy.deepcopy(unary) >>> unary_vl.inputs.operation = 'vl' - >>> unary_vl.cmdline # doctest: +ALLOW_UNICODE + >>> unary_vl.cmdline 'seg_stats im1.nii -vl' >>> unary_vl.run() # doctest: +SKIP >>> # Test x operation >>> unary_x = copy.deepcopy(unary) >>> unary_x.inputs.operation = 'x' - >>> unary_x.cmdline # doctest: +ALLOW_UNICODE + >>> unary_x.cmdline 'seg_stats im1.nii -x' >>> unary_x.run() # doctest: +SKIP @@ -243,21 +243,21 @@ class BinaryStats(StatsCommand): >>> binary_sa = copy.deepcopy(binary) >>> binary_sa.inputs.operation = 'sa' >>> binary_sa.inputs.operand_value = 2.0 - >>> binary_sa.cmdline # doctest: +ALLOW_UNICODE + >>> binary_sa.cmdline 'seg_stats im1.nii -sa 2.00000000' >>> binary_sa.run() # doctest: +SKIP >>> # Test ncc operation >>> binary_ncc = copy.deepcopy(binary) >>> binary_ncc.inputs.operation = 'ncc' >>> binary_ncc.inputs.operand_file = 'im2.nii' - >>> binary_ncc.cmdline # doctest: +ALLOW_UNICODE + >>> binary_ncc.cmdline 'seg_stats im1.nii -ncc im2.nii' >>> binary_ncc.run() # doctest: +SKIP >>> # Test Nl operation >>> binary_nl = copy.deepcopy(binary) >>> binary_nl.inputs.operation = 'Nl' >>> binary_nl.inputs.operand_file = 'output.csv' - >>> binary_nl.cmdline # doctest: +ALLOW_UNICODE + >>> binary_nl.cmdline 'seg_stats im1.nii -Nl output.csv' >>> binary_nl.run() # doctest: +SKIP diff --git a/nipype/interfaces/nitime/tests/test_nitime.py b/nipype/interfaces/nitime/tests/test_nitime.py index fa6ace4014..d37fea4f4f 100644 --- a/nipype/interfaces/nitime/tests/test_nitime.py +++ b/nipype/interfaces/nitime/tests/test_nitime.py @@ -30,11 +30,12 @@ def test_read_csv(): @pytest.mark.skipif(no_nitime, reason="nitime is not installed") -def test_coherence_analysis(): +def test_coherence_analysis(tmpdir): """Test that the coherence analyzer works """ import nitime.analysis as nta import nitime.timeseries as ts + tmpdir.chdir() # This is the nipype interface analysis: CA = nitime.CoherenceAnalyzer() CA.inputs.TR = 1.89 diff --git a/nipype/interfaces/quickshear.py b/nipype/interfaces/quickshear.py index d1782d5755..a0e9c79a1c 100644 --- a/nipype/interfaces/quickshear.py +++ b/nipype/interfaces/quickshear.py @@ -40,7 +40,7 @@ class Quickshear(CommandLine): >>> from nipype.interfaces.quickshear import Quickshear >>> qs = Quickshear(in_file='T1.nii', mask_file='brain_mask.nii') - >>> qs.cmdline # doctest: +ALLOW_UNICODE + >>> qs.cmdline 'quickshear T1.nii brain_mask.nii T1_defaced.nii' In the absence of a precomputed mask, a simple pipeline can be generated diff --git a/nipype/interfaces/slicer/generate_classes.py b/nipype/interfaces/slicer/generate_classes.py index 77a633f5f8..f0bc8274bb 100644 --- a/nipype/interfaces/slicer/generate_classes.py +++ b/nipype/interfaces/slicer/generate_classes.py @@ -18,9 +18,9 @@ def force_to_valid_python_variable_name(old_name): """ Valid c++ names are not always valid in python, so provide alternate naming - >>> force_to_valid_python_variable_name('lambda') # doctest: +ALLOW_UNICODE + >>> force_to_valid_python_variable_name('lambda') 'opt_lambda' - >>> force_to_valid_python_variable_name('inputVolume') # doctest: +ALLOW_UNICODE + >>> force_to_valid_python_variable_name('inputVolume') 'inputVolume' """ new_name = old_name diff --git a/nipype/interfaces/tests/test_base.py b/nipype/interfaces/tests/test_base.py index 995ee2e45b..48a44ad6a4 100644 --- a/nipype/interfaces/tests/test_base.py +++ b/nipype/interfaces/tests/test_base.py @@ -70,14 +70,14 @@ def test_bunch_hash(): @pytest.fixture(scope="module") def setup_file(request, tmpdir_factory): - tmp_dir = str(tmpdir_factory.mktemp('files')) - tmp_infile = os.path.join(tmp_dir, 'foo.txt') - with open(tmp_infile, 'w') as fp: + tmp_dir = tmpdir_factory.mktemp('files') + tmp_infile = tmp_dir.join('foo.txt') + with tmp_infile.open('w') as fp: fp.writelines([u'123456789']) - os.chdir(tmp_dir) + tmp_dir.chdir() - return tmp_infile + return tmp_infile.strpath def test_TraitedSpec(): @@ -412,7 +412,7 @@ def _run_interface(self, runtime): def test_BaseInterface_load_save_inputs(tmpdir): - tmp_json = os.path.join(str(tmpdir), 'settings.json') + tmp_json = tmpdir.join('settings.json').strpath class InputSpec(nib.TraitedSpec): input1 = nib.traits.Int() diff --git a/nipype/interfaces/tests/test_io.py b/nipype/interfaces/tests/test_io.py index 4fade26800..ff56c9ec9d 100644 --- a/nipype/interfaces/tests/test_io.py +++ b/nipype/interfaces/tests/test_io.py @@ -43,7 +43,6 @@ except CalledProcessError: fakes3 = False -from tempfile import mkstemp, mkdtemp def test_datagrabber(): dg = nio.DataGrabber() @@ -117,7 +116,7 @@ def test_s3datagrabber_communication(tmpdir): dg.inputs.anon = True dg.inputs.bucket = 'openfmri' dg.inputs.bucket_path = 'ds001/' - dg.inputs.local_directory = str(tmpdir) + dg.inputs.local_directory = tmpdir.strpath dg.inputs.sort_filelist = True dg.inputs.template = '*' dg.inputs.field_template = dict(func='%s/BOLD/task001_%s/bold.nii.gz', @@ -147,7 +146,7 @@ def test_datagrabber_order(tmpdir): tmpdir.join(file_name).open('a').close() dg = nio.DataGrabber(infields=['sid']) - dg.inputs.base_directory = str(tmpdir) + dg.inputs.base_directory = tmpdir.strpath dg.inputs.template = '%s_L%d_R*.q*' dg.inputs.template_args = {'outfiles': [['sid', 1], ['sid', 2], ['sid', 3]]} @@ -185,6 +184,7 @@ def dummy_input(request, tmpdir_factory): Function to create a dummy file ''' # Init variables + input_path = tmpdir_factory.mktemp('input_data').join('datasink_test_s3.txt') # Create input file @@ -208,7 +208,7 @@ def test_datasink_to_s3(dummy_input, tmpdir): attr_folder = 'text_file' output_dir = 's3://' + bucket_name # Local temporary filepaths for testing - fakes3_dir = str(tmpdir) + fakes3_dir = tmpdir.strpath input_path = dummy_input # Start up fake-S3 server @@ -280,7 +280,7 @@ def test_datasink_localcopy(dummy_input, tmpdir): ''' # Init variables - local_dir = str(tmpdir) + local_dir = tmpdir.strpath container = 'outputs' attr_folder = 'text_file' @@ -335,42 +335,41 @@ def test_datasink_substitutions(tmpdir): x in glob.glob(os.path.join(str(outdir), '*'))]) \ == ['!-yz-b.n', 'ABABAB.n'] # so we got re used 2nd and both patterns - -def _temp_analyze_files(): +@pytest.fixture() +def _temp_analyze_files(tmpdir): """Generate temporary analyze file pair.""" - fd, orig_img = mkstemp(suffix='.img', dir=mkdtemp()) - orig_hdr = orig_img[:-4] + '.hdr' - fp = open(orig_hdr, 'w+') - fp.close() - return orig_img, orig_hdr + img_dir = tmpdir.mkdir("img") + orig_img = img_dir.join("orig.img") + orig_hdr = img_dir.join("orig.hdr") + orig_img.open('w') + orig_hdr.open('w') + return orig_img.strpath, orig_hdr.strpath -def test_datasink_copydir(): - orig_img, orig_hdr = _temp_analyze_files() - outdir = mkdtemp() +def test_datasink_copydir_1(_temp_analyze_files, tmpdir): + orig_img, orig_hdr = _temp_analyze_files + outdir = tmpdir pth, fname = os.path.split(orig_img) - ds = nio.DataSink(base_directory=outdir, parameterization=False) + ds = nio.DataSink(base_directory=outdir.mkdir("basedir").strpath, parameterization=False) setattr(ds.inputs, '@outdir', pth) ds.run() sep = os.path.sep - file_exists = lambda: os.path.exists(os.path.join(outdir, - pth.split(sep)[-1], - fname)) - assert file_exists() - shutil.rmtree(pth) + assert tmpdir.join('basedir', pth.split(sep)[-1], fname).check() - orig_img, orig_hdr = _temp_analyze_files() +def test_datasink_copydir_2(_temp_analyze_files, tmpdir): + orig_img, orig_hdr = _temp_analyze_files pth, fname = os.path.split(orig_img) + ds = nio.DataSink(base_directory=tmpdir.mkdir("basedir").strpath, parameterization=False) ds.inputs.remove_dest_dir = True setattr(ds.inputs, 'outdir', pth) ds.run() - assert not file_exists() - shutil.rmtree(outdir) - shutil.rmtree(pth) + sep = os.path.sep + assert not tmpdir.join('basedir', pth.split(sep)[-1], fname).check() + assert tmpdir.join('basedir', 'outdir', pth.split(sep)[-1], fname).check() def test_datafinder_depth(tmpdir): - outdir = str(tmpdir) + outdir = tmpdir.strpath os.makedirs(os.path.join(outdir, '0', '1', '2', '3')) df = nio.DataFinder() @@ -387,7 +386,7 @@ def test_datafinder_depth(tmpdir): def test_datafinder_unpack(tmpdir): - outdir = str(tmpdir) + outdir = tmpdir.strpath single_res = os.path.join(outdir, "findme.txt") open(single_res, 'a').close() open(os.path.join(outdir, "dontfindme"), 'a').close() @@ -408,7 +407,7 @@ def test_freesurfersource(): assert fss.inputs.subjects_dir == Undefined -def test_jsonsink_input(tmpdir): +def test_jsonsink_input(): ds = nio.JSONFileSink() assert ds.inputs._outputs == {} @@ -425,7 +424,7 @@ def test_jsonsink_input(tmpdir): {'new_entry' : 'someValue', 'test' : 'testInfields'} ]) def test_jsonsink(tmpdir, inputs_attributes): - os.chdir(str(tmpdir)) + tmpdir.chdir() js = nio.JSONFileSink(infields=['test'], in_dict={'foo': 'var'}) setattr(js.inputs, 'contrasts.alt', 'someNestedValue') expected_data = {"contrasts": {"alt": "someNestedValue"}, "foo": "var"} diff --git a/nipype/interfaces/tests/test_matlab.py b/nipype/interfaces/tests/test_matlab.py index 33f80c0fa1..25b5ac964f 100644 --- a/nipype/interfaces/tests/test_matlab.py +++ b/nipype/interfaces/tests/test_matlab.py @@ -2,8 +2,6 @@ # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: import os -from tempfile import mkdtemp -from shutil import rmtree import pytest import nipype.interfaces.matlab as mlab @@ -70,7 +68,7 @@ def test_mlab_init(): @pytest.mark.skipif(no_matlab, reason="matlab is not available") -def test_run_interface(): +def test_run_interface(tmpdir): default_script_file = clean_workspace_and_get_default_script_file() mc = mlab.MatlabCommand(matlab_cmd='foo_m') @@ -89,12 +87,10 @@ def test_run_interface(): if os.path.exists(default_script_file): # cleanup os.remove(default_script_file) - cwd = os.getcwd() - basedir = mkdtemp() - os.chdir(basedir) + cwd = tmpdir.chdir() # bypasses ubuntu dash issue - mc = mlab.MatlabCommand(script='foo;', paths=[basedir], mfile=True) + mc = mlab.MatlabCommand(script='foo;', paths=[tmpdir.strpath], mfile=True) assert not os.path.exists(default_script_file), 'scriptfile should not exist 4.' with pytest.raises(RuntimeError): mc.run() @@ -103,11 +99,10 @@ def test_run_interface(): os.remove(default_script_file) # bypasses ubuntu dash issue - res = mlab.MatlabCommand(script='a=1;', paths=[basedir], mfile=True).run() + res = mlab.MatlabCommand(script='a=1;', paths=[tmpdir.strpath], mfile=True).run() assert res.runtime.returncode == 0 assert os.path.exists(default_script_file), 'scriptfile should exist 5.' - os.chdir(cwd) - rmtree(basedir) + cwd.chdir() @pytest.mark.skipif(no_matlab, reason="matlab is not available") diff --git a/nipype/interfaces/tests/test_nilearn.py b/nipype/interfaces/tests/test_nilearn.py index 4e8299aa74..ce3846a6d3 100644 --- a/nipype/interfaces/tests/test_nilearn.py +++ b/nipype/interfaces/tests/test_nilearn.py @@ -1,8 +1,6 @@ # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: import os -import tempfile -import shutil import numpy as np @@ -33,13 +31,14 @@ class TestSignalExtraction(): labels = ['CSF', 'GrayMatter', 'WhiteMatter'] global_labels = ['GlobalSignal'] + labels - def setup_class(self): - self.orig_dir = os.getcwd() - self.temp_dir = tempfile.mkdtemp() - os.chdir(self.temp_dir) + @pytest.fixture(autouse=True, scope='class') + def setup_class(self, tmpdir_factory): + tempdir = tmpdir_factory.mktemp("test") + self.orig_dir = tempdir.chdir() utils.save_toy_nii(self.fake_fmri_data, self.filenames['in_file']) utils.save_toy_nii(self.fake_label_data, self.filenames['label_files']) + def test_signal_extract_no_shared(self): # run iface.SignalExtraction(in_file=self.filenames['in_file'], @@ -151,10 +150,9 @@ def assert_expected_output(self, labels, wanted): for j, segment in enumerate(time): npt.assert_almost_equal(segment, wanted[i][j], decimal=1) - - def teardown_class(self): - os.chdir(self.orig_dir) - shutil.rmtree(self.temp_dir) +#dj: self doesnt have orig_dir at this point, not sure how to change it. should work without it +# def teardown_class(self): +# self.orig_dir.chdir() fake_fmri_data = np.array([[[[2, -1, 4, -2, 3], diff --git a/nipype/interfaces/utility/base.py b/nipype/interfaces/utility/base.py index 60e4c4aa3f..ec744d9fce 100644 --- a/nipype/interfaces/utility/base.py +++ b/nipype/interfaces/utility/base.py @@ -2,15 +2,9 @@ # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """ -Various utilities - - Change directory to provide relative paths for doctests - >>> import os - >>> filepath = os.path.dirname(os.path.realpath(__file__)) - >>> datadir = os.path.realpath(os.path.join(filepath, - ... '../../testing/data')) - >>> os.chdir(datadir) - + # changing to temporary directories + >>> tmp = getfixture('tmpdir') + >>> old = tmp.chdir() """ from __future__ import print_function, division, unicode_literals, absolute_import from builtins import range @@ -47,7 +41,7 @@ class IdentityInterface(IOBase): >>> out = ii.run() - >>> out.outputs.a # doctest: +ALLOW_UNICODE + >>> out.outputs.a 'foo' >>> ii2 = IdentityInterface(fields=['a', 'b'], mandatory_inputs=True) @@ -231,14 +225,14 @@ class Rename(IOBase): >>> from nipype.interfaces.utility import Rename >>> rename1 = Rename() - >>> rename1.inputs.in_file = "zstat1.nii.gz" + >>> rename1.inputs.in_file = os.path.join(datadir, "zstat1.nii.gz") # datadir is a directory with exemplary files, defined in conftest.py >>> rename1.inputs.format_string = "Faces-Scenes.nii.gz" >>> res = rename1.run() # doctest: +SKIP >>> res.outputs.out_file # doctest: +SKIP 'Faces-Scenes.nii.gz" # doctest: +SKIP >>> rename2 = Rename(format_string="%(subject_id)s_func_run%(run)02d") - >>> rename2.inputs.in_file = "functional.nii" + >>> rename2.inputs.in_file = os.path.join(datadir, "functional.nii") >>> rename2.inputs.keep_ext = True >>> rename2.inputs.subject_id = "subj_201" >>> rename2.inputs.run = 2 @@ -247,7 +241,7 @@ class Rename(IOBase): 'subj_201_func_run02.nii' # doctest: +SKIP >>> rename3 = Rename(format_string="%(subject_id)s_%(seq)s_run%(run)02d.nii") - >>> rename3.inputs.in_file = "func_epi_1_1.nii" + >>> rename3.inputs.in_file = os.path.join(datadir, "func_epi_1_1.nii") >>> rename3.inputs.parse_string = "func_(?P\w*)_.*" >>> rename3.inputs.subject_id = "subj_201" >>> rename3.inputs.run = 2 diff --git a/nipype/interfaces/utility/tests/test_base.py b/nipype/interfaces/utility/tests/test_base.py index 3d2fbd2b5f..3e66f827d2 100644 --- a/nipype/interfaces/utility/tests/test_base.py +++ b/nipype/interfaces/utility/tests/test_base.py @@ -11,13 +11,13 @@ def test_rename(tmpdir): - os.chdir(str(tmpdir)) + tmpdir.chdir() # Test very simple rename _ = open("file.txt", "w").close() rn = utility.Rename(in_file="file.txt", format_string="test_file1.txt") res = rn.run() - outfile = str(tmpdir.join("test_file1.txt")) + outfile = tmpdir.join("test_file1.txt").strpath assert res.outputs.out_file == outfile assert os.path.exists(outfile) @@ -31,7 +31,7 @@ def test_rename(tmpdir): rn.inputs.field1 = "test" rn.inputs.field2 = 2 res = rn.run() - outfile = str(tmpdir.join("test_file2.txt")) + outfile = tmpdir.join("test_file2.txt").strpath assert res.outputs.out_file == outfile assert os.path.exists(outfile) @@ -41,7 +41,7 @@ def test_rename(tmpdir): ({"squeeze" : True}, (0 , [1,2,3])) ]) def test_split(tmpdir, args, expected): - os.chdir(str(tmpdir)) + tmpdir.chdir() node = pe.Node(utility.Split(inlist=list(range(4)), splits=[1, 3], @@ -64,7 +64,7 @@ def test_split(tmpdir, args, expected): [[0, 2, 4], [1, 3, 5]]), ]) def test_merge(tmpdir, args, kwargs, in_lists, expected): - os.chdir(str(tmpdir)) + tmpdir.chdir() node = pe.Node(utility.Merge(*args, **kwargs), name='merge') diff --git a/nipype/interfaces/utility/tests/test_csv.py b/nipype/interfaces/utility/tests/test_csv.py index 86ac95a371..f0101b4da7 100644 --- a/nipype/interfaces/utility/tests/test_csv.py +++ b/nipype/interfaces/utility/tests/test_csv.py @@ -12,7 +12,7 @@ def test_csvReader(tmpdir): "bar,world,5\n", "baz,goodbye,0.3\n"] for x in range(2): - name = str(tmpdir.join("testfile.csv")) + name = tmpdir.join("testfile.csv").strpath with open(name, 'w') as fid: reader = utility.CSVReader() if x % 2 == 0: diff --git a/nipype/interfaces/utility/tests/test_wrappers.py b/nipype/interfaces/utility/tests/test_wrappers.py index 3384a5865c..b995dc27ad 100644 --- a/nipype/interfaces/utility/tests/test_wrappers.py +++ b/nipype/interfaces/utility/tests/test_wrappers.py @@ -16,7 +16,7 @@ def concat_sort(in_arrays): """ def test_function(tmpdir): - os.chdir(str(tmpdir)) + tmpdir.chdir() def gen_random_array(size): import numpy as np @@ -46,8 +46,8 @@ def make_random_array(size): return np.random.randn(size, size) -def should_fail(tmpdir): - os.chdir(tmpdir) +def should_fail(tmp): + tmp.chdir() node = pe.Node(utility.Function(input_names=["size"], output_names=["random_array"], @@ -59,11 +59,11 @@ def should_fail(tmpdir): def test_should_fail(tmpdir): with pytest.raises(NameError): - should_fail(str(tmpdir)) + should_fail(tmpdir) def test_function_with_imports(tmpdir): - os.chdir(str(tmpdir)) + tmpdir.chdir() node = pe.Node(utility.Function(input_names=["size"], output_names=["random_array"], @@ -79,7 +79,7 @@ def test_aux_connect_function(tmpdir): """ This tests excution nodes with multiple inputs and auxiliary function inside the Workflow connect function. """ - os.chdir(str(tmpdir)) + tmpdir.chdir() wf = pe.Workflow(name="test_workflow") diff --git a/nipype/interfaces/utility/wrappers.py b/nipype/interfaces/utility/wrappers.py index 2a5e163e7d..4684acba42 100644 --- a/nipype/interfaces/utility/wrappers.py +++ b/nipype/interfaces/utility/wrappers.py @@ -1,17 +1,12 @@ # -*- coding: utf-8 -*- # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: -"""Various utilities - - Change directory to provide relative paths for doctests - >>> import os - >>> filepath = os.path.dirname(os.path.realpath(__file__)) - >>> datadir = os.path.realpath(os.path.join(filepath, - ... '../../testing/data')) - >>> os.chdir(datadir) - - """ +# changing to temporary directories + >>> tmp = getfixture('tmpdir') + >>> old = tmp.chdir() +""" + from __future__ import print_function, division, unicode_literals, absolute_import from future import standard_library diff --git a/nipype/interfaces/vista/vista.py b/nipype/interfaces/vista/vista.py index e898956d65..e8928ae24a 100644 --- a/nipype/interfaces/vista/vista.py +++ b/nipype/interfaces/vista/vista.py @@ -34,7 +34,7 @@ class Vnifti2Image(CommandLine): >>> vimage = Vnifti2Image() >>> vimage.inputs.in_file = 'image.nii' - >>> vimage.cmdline # doctest: +ALLOW_UNICODE + >>> vimage.cmdline 'vnifti2image -in image.nii -out image.v' >>> vimage.run() # doctest: +SKIP """ @@ -63,7 +63,7 @@ class VtoMat(CommandLine): >>> vimage = VtoMat() >>> vimage.inputs.in_file = 'image.v' - >>> vimage.cmdline # doctest: +ALLOW_UNICODE + >>> vimage.cmdline 'vtomat -in image.v -out image.mat' >>> vimage.run() # doctest: +SKIP """ diff --git a/nipype/pipeline/engine/nodes.py b/nipype/pipeline/engine/nodes.py index f7f83f578a..36d3ba1b40 100644 --- a/nipype/pipeline/engine/nodes.py +++ b/nipype/pipeline/engine/nodes.py @@ -887,7 +887,7 @@ def _add_join_item_fields(self): ... name='inputspec'), >>> join = JoinNode(IdentityInterface(fields=['images', 'mask']), ... joinsource='inputspec', joinfield='images', name='join') - >>> join._add_join_item_fields() # doctest: +ALLOW_UNICODE + >>> join._add_join_item_fields() {'images': 'imagesJ1'} Return the {base field: slot field} dictionary diff --git a/nipype/pipeline/engine/tests/test_engine.py b/nipype/pipeline/engine/tests/test_engine.py index 6bfffdfbeb..8b4d559ec0 100644 --- a/nipype/pipeline/engine/tests/test_engine.py +++ b/nipype/pipeline/engine/tests/test_engine.py @@ -661,7 +661,7 @@ def test_parameterize_dirs_false(tmpdir): n2 = pe.Node(IdentityInterface(fields='in1'), name='Node2') wf = pe.Workflow(name='Test') - wf.base_dir = str(tmpdir) + wf.base_dir = tmpdir.strpath wf.config['execution']['parameterize_dirs'] = False wf.connect([(n1, n2, [('output1', 'in1')])]) diff --git a/nipype/pipeline/engine/tests/test_join.py b/nipype/pipeline/engine/tests/test_join.py index 87dafeee0f..a77745eb03 100644 --- a/nipype/pipeline/engine/tests/test_join.py +++ b/nipype/pipeline/engine/tests/test_join.py @@ -149,7 +149,7 @@ def _list_outputs(self): def test_join_expansion(tmpdir): - os.chdir(str(tmpdir)) + tmpdir.chdir() # Make the workflow. wf = pe.Workflow(name='test') @@ -196,7 +196,7 @@ def test_join_expansion(tmpdir): def test_node_joinsource(tmpdir): """Test setting the joinsource to a Node.""" - os.chdir(str(tmpdir)) + tmpdir.chdir() # Make the workflow. wf = pe.Workflow(name='test') @@ -214,7 +214,7 @@ def test_node_joinsource(tmpdir): def test_set_join_node(tmpdir): """Test collecting join inputs to a set.""" - os.chdir(str(tmpdir)) + tmpdir.chdir() # Make the workflow. wf = pe.Workflow(name='test') @@ -240,7 +240,7 @@ def test_unique_join_node(tmpdir): """Test join with the ``unique`` flag set to True.""" global _sum_operands _sum_operands = [] - os.chdir(str(tmpdir)) + tmpdir.chdir() # Make the workflow. wf = pe.Workflow(name='test') @@ -265,7 +265,7 @@ def test_multiple_join_nodes(tmpdir): """Test two join nodes, one downstream of the other.""" global _products _products = [] - os.chdir(str(tmpdir)) + tmpdir.chdir() # Make the workflow. wf = pe.Workflow(name='test') @@ -318,7 +318,7 @@ def test_identity_join_node(tmpdir): """Test an IdentityInterface join.""" global _sum_operands _sum_operands = [] - os.chdir(str(tmpdir)) + tmpdir.chdir() # Make the workflow. wf = pe.Workflow(name='test') @@ -353,7 +353,7 @@ def test_multifield_join_node(tmpdir): """Test join on several fields.""" global _products _products = [] - os.chdir(str(tmpdir)) + tmpdir.chdir() # Make the workflow. wf = pe.Workflow(name='test') @@ -393,7 +393,7 @@ def test_synchronize_join_node(tmpdir): """Test join on an input node which has the ``synchronize`` flag set to True.""" global _products _products = [] - os.chdir(str(tmpdir)) + tmpdir.chdir() # Make the workflow. wf = pe.Workflow(name='test') @@ -430,7 +430,7 @@ def test_synchronize_join_node(tmpdir): def test_itersource_join_source_node(tmpdir): """Test join on an input node which has an ``itersource``.""" - os.chdir(str(tmpdir)) + tmpdir.chdir() # Make the workflow. wf = pe.Workflow(name='test') @@ -484,7 +484,7 @@ def test_itersource_join_source_node(tmpdir): def test_itersource_two_join_nodes(tmpdir): """Test join with a midstream ``itersource`` and an upstream iterable.""" - os.chdir(str(tmpdir)) + tmpdir.chdir() # Make the workflow. wf = pe.Workflow(name='test') @@ -524,8 +524,7 @@ def test_itersource_two_join_nodes(tmpdir): def test_set_join_node_file_input(tmpdir): """Test collecting join inputs to a set.""" - wd = str(tmpdir) - os.chdir(wd) + tmpdir.chdir() open('test.nii', 'w+').close() open('test2.nii', 'w+').close() @@ -533,7 +532,7 @@ def test_set_join_node_file_input(tmpdir): wf = pe.Workflow(name='test') # the iterated input node inputspec = pe.Node(IdentityInterface(fields=['n']), name='inputspec') - inputspec.iterables = [('n', [os.path.join(wd, 'test.nii'), os.path.join(wd, 'test2.nii')])] + inputspec.iterables = [('n', [tmpdir.join('test.nii').strpath, tmpdir.join('test2.nii').strpath])] # a pre-join node in the iterated path pre_join1 = pe.Node(IdentityInterface(fields=['n']), name='pre_join1') wf.connect(inputspec, 'n', pre_join1, 'n') @@ -547,8 +546,7 @@ def test_set_join_node_file_input(tmpdir): def test_nested_workflow_join(tmpdir): """Test collecting join inputs within a nested workflow""" - wd = str(tmpdir) - os.chdir(wd) + tmpdir.chdir() # Make the nested workflow def nested_wf(i, name='smallwf'): diff --git a/nipype/pipeline/engine/tests/test_utils.py b/nipype/pipeline/engine/tests/test_utils.py index 7aa20b9302..34ec45cfa8 100644 --- a/nipype/pipeline/engine/tests/test_utils.py +++ b/nipype/pipeline/engine/tests/test_utils.py @@ -18,27 +18,28 @@ from ..utils import merge_dict, clean_working_directory, write_workflow_prov -def test_identitynode_removal(): +def test_identitynode_removal(tmpdir): def test_function(arg1, arg2, arg3): import numpy as np return (np.array(arg1) + arg2 + arg3).tolist() + - wf = pe.Workflow(name="testidentity") + wf = pe.Workflow(name="testidentity", base_dir=tmpdir.strpath) - n1 = pe.Node(niu.IdentityInterface(fields=['a', 'b']), name='src') + n1 = pe.Node(niu.IdentityInterface(fields=['a', 'b']), name='src', base_dir=tmpdir.strpath) n1.iterables = ('b', [0, 1, 2, 3]) n1.inputs.a = [0, 1, 2, 3] - n2 = pe.Node(niu.Select(), name='selector') + n2 = pe.Node(niu.Select(), name='selector', base_dir=tmpdir.strpath) wf.connect(n1, ('a', test_function, 1, -1), n2, 'inlist') wf.connect(n1, 'b', n2, 'index') - n3 = pe.Node(niu.IdentityInterface(fields=['c', 'd']), name='passer') + n3 = pe.Node(niu.IdentityInterface(fields=['c', 'd']), name='passer', base_dir=tmpdir.strpath) n3.inputs.c = [1, 2, 3, 4] wf.connect(n2, 'out', n3, 'd') - n4 = pe.Node(niu.Select(), name='selector2') + n4 = pe.Node(niu.Select(), name='selector2', base_dir=tmpdir.strpath) wf.connect(n3, ('c', test_function, 1, -1), n4, 'inlist') wf.connect(n3, 'd', n4, 'index') @@ -58,15 +59,13 @@ class InputSpec(nib.TraitedSpec): outputs = OutputSpec() inputs = InputSpec() - wd = str(tmpdir) filenames = ['file.hdr', 'file.img', 'file.BRIK', 'file.HEAD', '_0x1234.json', 'foo.txt'] outfiles = [] for filename in filenames: - outfile = os.path.join(wd, filename) - with open(outfile, 'wt') as fp: - fp.writelines('dummy') - outfiles.append(outfile) + outfile = tmpdir.join(filename) + outfile.write('dummy') + outfiles.append(outfile.strpath) outputs.files = outfiles[:4:2] outputs.others = outfiles[5] inputs.infile = outfiles[-1] @@ -75,12 +74,12 @@ class InputSpec(nib.TraitedSpec): assert os.path.exists(outfiles[5]) config.set_default_config() config.set('execution', 'remove_unnecessary_outputs', False) - out = clean_working_directory(outputs, wd, inputs, needed_outputs, + out = clean_working_directory(outputs, tmpdir.strpath, inputs, needed_outputs, deepcopy(config._sections)) assert os.path.exists(outfiles[5]) assert out.others == outfiles[5] config.set('execution', 'remove_unnecessary_outputs', True) - out = clean_working_directory(outputs, wd, inputs, needed_outputs, + out = clean_working_directory(outputs, tmpdir.strpath, inputs, needed_outputs, deepcopy(config._sections)) assert os.path.exists(outfiles[1]) assert os.path.exists(outfiles[3]) @@ -105,30 +104,21 @@ def test_function(arg1): fp.close() return file1, file2 - out_dir = str(tmpdir) n1 = pe.Node(niu.Function(input_names=['arg1'], output_names=['file1', 'file2'], function=test_function), - base_dir=out_dir, + base_dir=tmpdir.strpath, name='testoutputs') n1.inputs.arg1 = 1 n1.config = {'execution': {'remove_unnecessary_outputs': True}} n1.config = merge_dict(deepcopy(config._sections), n1.config) n1.run() - assert os.path.exists(os.path.join(out_dir, - n1.name, - 'file1.txt')) - assert os.path.exists(os.path.join(out_dir, - n1.name, - 'file2.txt')) + assert tmpdir.join(n1.name,'file1.txt').check() + assert tmpdir.join(n1.name,'file1.txt').check() n1.needed_outputs = ['file2'] n1.run() - assert not os.path.exists(os.path.join(out_dir, - n1.name, - 'file1.txt')) - assert os.path.exists(os.path.join(out_dir, - n1.name, - 'file2.txt')) + assert not tmpdir.join(n1.name,'file1.txt').check() + assert tmpdir.join(n1.name,'file2.txt').check() class InputSpec(nib.TraitedSpec): @@ -154,29 +144,22 @@ def _list_outputs(self): def test_inputs_removal(tmpdir): - out_dir = str(tmpdir) - file1 = os.path.join(out_dir, 'file1.txt') - fp = open(file1, 'wt') - fp.write('dummy_file') - fp.close() + file1 = tmpdir.join('file1.txt') + file1.write('dummy_file') n1 = pe.Node(UtilsTestInterface(), - base_dir=out_dir, + base_dir=tmpdir.strpath, name='testinputs') - n1.inputs.in_file = file1 + n1.inputs.in_file = file1.strpath n1.config = {'execution': {'keep_inputs': True}} n1.config = merge_dict(deepcopy(config._sections), n1.config) n1.run() - assert os.path.exists(os.path.join(out_dir, - n1.name, - 'file1.txt')) - n1.inputs.in_file = file1 + assert tmpdir.join(n1.name,'file1.txt').check() + n1.inputs.in_file = file1.strpath n1.config = {'execution': {'keep_inputs': False}} n1.config = merge_dict(deepcopy(config._sections), n1.config) n1.overwrite = True n1.run() - assert not os.path.exists(os.path.join(out_dir, - n1.name, - 'file1.txt')) + assert not tmpdir.join(n1.name,'file1.txt').check() def test_outputs_removal_wf(tmpdir): @@ -210,27 +193,26 @@ def test_function3(arg): import os return arg - out_dir = str(tmpdir) for plugin in ('Linear',): # , 'MultiProc'): n1 = pe.Node(niu.Function(input_names=['arg1'], output_names=['out_file1', 'out_file2', 'dir'], function=test_function), - name='n1') + name='n1', base_dir=tmpdir.strpath) n1.inputs.arg1 = 1 n2 = pe.Node(niu.Function(input_names=['in_file', 'arg'], output_names=['out_file1', 'out_file2', 'n'], function=test_function2), - name='n2') + name='n2', base_dir=tmpdir.strpath) n2.inputs.arg = 2 n3 = pe.Node(niu.Function(input_names=['arg'], output_names=['n'], function=test_function3), - name='n3') + name='n3', base_dir=tmpdir.strpath) - wf = pe.Workflow(name="node_rem_test" + plugin, base_dir=out_dir) + wf = pe.Workflow(name="node_rem_test" + plugin, base_dir=tmpdir.strpath) wf.connect(n1, "out_file1", n2, "in_file") wf.run(plugin='Linear') @@ -271,7 +253,7 @@ def test_function3(arg): n2.name, 'file3.txt')) != remove_unnecessary_outputs - n4 = pe.Node(UtilsTestInterface(), name='n4') + n4 = pe.Node(UtilsTestInterface(), name='n4', base_dir=tmpdir.strpath) wf.connect(n2, "out_file1", n4, "in_file") def pick_first(l): @@ -320,20 +302,18 @@ def create_wf(name): def test_multi_disconnected_iterable(tmpdir): metawf = pe.Workflow(name='meta') - metawf.base_dir = str(tmpdir) + metawf.base_dir = tmpdir.strpath metawf.add_nodes([create_wf('wf%d' % i) for i in range(30)]) eg = metawf.run(plugin='Linear') assert len(eg.nodes()) == 60 def test_provenance(tmpdir): - out_dir = str(tmpdir) metawf = pe.Workflow(name='meta') - metawf.base_dir = out_dir + metawf.base_dir = tmpdir.strpath metawf.add_nodes([create_wf('wf%d' % i) for i in range(1)]) eg = metawf.run(plugin='Linear') - prov_base = os.path.join(out_dir, - 'workflow_provenance_test') + prov_base = tmpdir.join('workflow_provenance_test').strpath psg = write_workflow_prov(eg, prov_base, format='all') assert len(psg.bundles) == 2 assert len(psg.get_records()) == 7 @@ -356,7 +336,7 @@ def test_mapnode_crash(tmpdir): node.inputs.WRONG = ['string{}'.format(i) for i in range(3)] node.config = deepcopy(config._sections) node.config['execution']['stop_on_first_crash'] = True - node.base_dir = str(tmpdir) + node.base_dir = tmpdir.strpath with pytest.raises(TypeError): node.run() os.chdir(cwd) @@ -373,7 +353,7 @@ def test_mapnode_crash2(tmpdir): iterfield=['WRONG'], name='myfunc') node.inputs.WRONG = ['string{}'.format(i) for i in range(3)] - node.base_dir = str(tmpdir) + node.base_dir = tmpdir.strpath with pytest.raises(Exception): node.run() @@ -384,6 +364,7 @@ def test_mapnode_crash2(tmpdir): reason="the famous segfault #1788") def test_mapnode_crash3(tmpdir): """Test mapnode crash when mapnode is embedded in a workflow""" + tmpdir.chdir() node = pe.MapNode(niu.Function(input_names=['WRONG'], output_names=['newstring'], function=dummy_func), @@ -392,6 +373,8 @@ def test_mapnode_crash3(tmpdir): node.inputs.WRONG = ['string{}'.format(i) for i in range(3)] wf = pe.Workflow('testmapnodecrash') wf.add_nodes([node]) - wf.base_dir = str(tmpdir) + wf.base_dir = tmpdir.strpath + #changing crashdump dir to cwl (to avoid problems with read-only systems) + wf.config["execution"]["crashdump_dir"] = os.getcwd() with pytest.raises(RuntimeError): wf.run(plugin='Linear') diff --git a/nipype/pipeline/plugins/sge.py b/nipype/pipeline/plugins/sge.py index 6d448df3df..42aa4bc915 100644 --- a/nipype/pipeline/plugins/sge.py +++ b/nipype/pipeline/plugins/sge.py @@ -313,9 +313,9 @@ def qsub_sanitize_job_name(testjobname): Numbers and punctuation are not allowed. - >>> qsub_sanitize_job_name('01') # doctest: +ALLOW_UNICODE + >>> qsub_sanitize_job_name('01') 'J01' - >>> qsub_sanitize_job_name('a01') # doctest: +ALLOW_UNICODE + >>> qsub_sanitize_job_name('a01') 'a01' """ if testjobname[0].isalpha(): diff --git a/nipype/pipeline/plugins/tests/test_callback.py b/nipype/pipeline/plugins/tests/test_callback.py index bfe03463d1..46f3608746 100644 --- a/nipype/pipeline/plugins/tests/test_callback.py +++ b/nipype/pipeline/plugins/tests/test_callback.py @@ -32,7 +32,7 @@ def callback(self, node, status, result=None): def test_callback_normal(tmpdir): so = Status() - wf = pe.Workflow(name='test', base_dir=str(tmpdir)) + wf = pe.Workflow(name='test', base_dir=tmpdir.strpath) f_node = pe.Node(niu.Function(function=func, input_names=[], output_names=[]), name='f_node') @@ -48,7 +48,7 @@ def test_callback_normal(tmpdir): def test_callback_exception(tmpdir): so = Status() - wf = pe.Workflow(name='test', base_dir=str(tmpdir)) + wf = pe.Workflow(name='test', base_dir=tmpdir.strpath) f_node = pe.Node(niu.Function(function=bad_func, input_names=[], output_names=[]), name='f_node') @@ -66,7 +66,7 @@ def test_callback_exception(tmpdir): def test_callback_multiproc_normal(tmpdir): so = Status() - wf = pe.Workflow(name='test', base_dir=str(tmpdir)) + wf = pe.Workflow(name='test', base_dir=tmpdir.strpath) f_node = pe.Node(niu.Function(function=func, input_names=[], output_names=[]), name='f_node') diff --git a/nipype/pipeline/plugins/tests/test_debug.py b/nipype/pipeline/plugins/tests/test_debug.py index 3e03abcf90..e7997ba7f0 100644 --- a/nipype/pipeline/plugins/tests/test_debug.py +++ b/nipype/pipeline/plugins/tests/test_debug.py @@ -34,7 +34,7 @@ def callme(node, graph): def test_debug(tmpdir): - os.chdir(str(tmpdir)) + tmpdir.chdir() pipe = pe.Workflow(name='pipe') mod1 = pe.Node(DebugTestInterface(), name='mod1') diff --git a/nipype/pipeline/plugins/tests/test_linear.py b/nipype/pipeline/plugins/tests/test_linear.py index 2e2fead4eb..afb916f6eb 100644 --- a/nipype/pipeline/plugins/tests/test_linear.py +++ b/nipype/pipeline/plugins/tests/test_linear.py @@ -29,7 +29,7 @@ def _list_outputs(self): def test_run_in_series(tmpdir): - os.chdir(str(tmpdir)) + tmpdir.chdir() pipe = pe.Workflow(name='pipe') mod1 = pe.Node(interface=LinearTestInterface(), name='mod1') diff --git a/nipype/pipeline/plugins/tests/test_somaflow.py b/nipype/pipeline/plugins/tests/test_somaflow.py index f2d5c945fb..7449d0d3ae 100644 --- a/nipype/pipeline/plugins/tests/test_somaflow.py +++ b/nipype/pipeline/plugins/tests/test_somaflow.py @@ -34,7 +34,7 @@ def _list_outputs(self): @pytest.mark.skipif(soma_not_loaded, reason="soma not loaded") def test_run_somaflow(tmpdir): - os.chdir(str(tmpdir)) + tmpdir.chdir() pipe = pe.Workflow(name='pipe') mod1 = pe.Node(interface=SomaTestInterface(), name='mod1') diff --git a/nipype/testing/fixtures.py b/nipype/testing/fixtures.py index 2a405742f7..550346d1db 100644 --- a/nipype/testing/fixtures.py +++ b/nipype/testing/fixtures.py @@ -39,66 +39,57 @@ def nifti_image_files(outdir, filelist, shape): @pytest.fixture() def create_files_in_directory(request, tmpdir): - outdir = str(tmpdir) - cwd = os.getcwd() - os.chdir(outdir) + cwd = tmpdir.chdir() filelist = ['a.nii', 'b.nii'] - nifti_image_files(outdir, filelist, shape=(3,3,3,4)) + nifti_image_files(tmpdir.strpath, filelist, shape=(3,3,3,4)) def change_directory(): - os.chdir(cwd) + cwd.chdir() request.addfinalizer(change_directory) - return (filelist, outdir) + return (filelist, tmpdir.strpath) @pytest.fixture() def create_analyze_pair_file_in_directory(request, tmpdir): - outdir = str(tmpdir) - cwd = os.getcwd() - os.chdir(outdir) + cwd = tmpdir.chdir() filelist = ['a.hdr'] - analyze_pair_image_files(outdir, filelist, shape=(3, 3, 3, 4)) + analyze_pair_image_files(tmpdir.strpath, filelist, shape=(3, 3, 3, 4)) def change_directory(): - os.chdir(cwd) + cwd.chdir() request.addfinalizer(change_directory) - return (filelist, outdir) + return (filelist, tmpdir.strpath) @pytest.fixture() def create_files_in_directory_plus_dummy_file(request, tmpdir): - outdir = str(tmpdir) - cwd = os.getcwd() - os.chdir(outdir) + cwd = tmpdir.chdir() filelist = ['a.nii', 'b.nii'] - nifti_image_files(outdir, filelist, shape=(3,3,3,4)) + nifti_image_files(tmpdir.strpath, filelist, shape=(3,3,3,4)) - with open(os.path.join(outdir, 'reg.dat'), 'wt') as fp: - fp.write('dummy file') + tmpdir.join('reg.dat').write('dummy file') filelist.append('reg.dat') def change_directory(): - os.chdir(cwd) + cwd.chdir() request.addfinalizer(change_directory) - return (filelist, outdir) + return (filelist, tmpdir.strpath) @pytest.fixture() def create_surf_file_in_directory(request, tmpdir): - outdir = str(tmpdir) - cwd = os.getcwd() - os.chdir(outdir) + cwd = tmpdir.chdir() surf = 'lh.a.nii' - nifti_image_files(outdir, filelist=surf, shape=(1, 100, 1)) + nifti_image_files(tmpdir.strpath, filelist=surf, shape=(1, 100, 1)) def change_directory(): - os.chdir(cwd) + cwd.chdir() request.addfinalizer(change_directory) - return (surf, outdir) + return (surf, tmpdir.strpath) def set_output_type(fsl_output_type): @@ -115,18 +106,15 @@ def set_output_type(fsl_output_type): @pytest.fixture(params=[None]+list(Info.ftypes)) def create_files_in_directory_plus_output_type(request, tmpdir): func_prev_type = set_output_type(request.param) - - testdir = str(tmpdir) - origdir = os.getcwd() - os.chdir(testdir) + origdir = tmpdir.chdir() filelist = ['a.nii', 'b.nii'] - nifti_image_files(testdir, filelist, shape=(3,3,3,4)) + nifti_image_files(tmpdir.strpath, filelist, shape=(3,3,3,4)) out_ext = Info.output_type_to_ext(Info.output_type()) def fin(): set_output_type(func_prev_type) - os.chdir(origdir) + origdir.chdir() request.addfinalizer(fin) - return (filelist, testdir, out_ext) + return (filelist, tmpdir.strpath, out_ext) diff --git a/nipype/testing/tests/test_utils.py b/nipype/testing/tests/test_utils.py index e2ca3a32de..838c3d167a 100644 --- a/nipype/testing/tests/test_utils.py +++ b/nipype/testing/tests/test_utils.py @@ -17,8 +17,8 @@ def test_tempfatfs(): except (IOError, OSError): warnings.warn("Cannot mount FAT filesystems with FUSE") else: - with fatfs as tmpdir: - assert os.path.exists(tmpdir) + with fatfs as tmp_dir: + assert os.path.exists(tmp_dir) @patch('subprocess.check_call', MagicMock( side_effect=subprocess.CalledProcessError('',''))) diff --git a/nipype/utils/filemanip.py b/nipype/utils/filemanip.py index e8a9ea22b8..be71424a5a 100644 --- a/nipype/utils/filemanip.py +++ b/nipype/utils/filemanip.py @@ -64,13 +64,13 @@ def split_filename(fname): -------- >>> from nipype.utils.filemanip import split_filename >>> pth, fname, ext = split_filename('/home/data/subject.nii.gz') - >>> pth # doctest: +ALLOW_UNICODE + >>> pth '/home/data' - >>> fname # doctest: +ALLOW_UNICODE + >>> fname 'subject' - >>> ext # doctest: +ALLOW_UNICODE + >>> ext '.nii.gz' """ @@ -171,7 +171,7 @@ def fname_presuffix(fname, prefix='', suffix='', newpath=None, use_ext=True): >>> from nipype.utils.filemanip import fname_presuffix >>> fname = 'foo.nii.gz' - >>> fname_presuffix(fname,'pre','post','/tmp') # doctest: +ALLOW_UNICODE + >>> fname_presuffix(fname,'pre','post','/tmp') '/tmp/prefoopost.nii.gz' """ @@ -603,7 +603,7 @@ def read_stream(stream, logger=None, encoding=None): Robustly reads a stream, sending a warning to a logger if some decoding error was raised. - >>> read_stream(bytearray([65, 0xc7, 65, 10, 66])) # doctest: +ELLIPSIS +ALLOW_UNICODE + >>> read_stream(bytearray([65, 0xc7, 65, 10, 66])) # doctest: +ELLIPSIS ['A...A', 'B'] diff --git a/nipype/utils/tests/test_filemanip.py b/nipype/utils/tests/test_filemanip.py index 9e0f3abb78..d50bef355a 100644 --- a/nipype/utils/tests/test_filemanip.py +++ b/nipype/utils/tests/test_filemanip.py @@ -6,8 +6,6 @@ import os import time -from tempfile import mkstemp, mkdtemp -import shutil import warnings import pytest @@ -93,7 +91,7 @@ def _temp_analyze_files_prime(tmpdir): orig_hdr = tmpdir.join("orig_prime.hdr") orig_img.open('w+').close() orig_hdr.open('w+').close() - return str(orig_img), str(orig_hdr) + return orig_img.strpath, orig_hdr.strpath def test_copyfile(_temp_analyze_files): @@ -275,15 +273,14 @@ def test_list_to_filename(list, expected): assert x == expected -def test_check_depends(): +def test_check_depends(tmpdir): def touch(fname): with open(fname, 'a'): os.utime(fname, None) - tmpdir = mkdtemp() - dependencies = [os.path.join(tmpdir, str(i)) for i in range(3)] - targets = [os.path.join(tmpdir, str(i)) for i in range(3, 6)] + dependencies = [tmpdir.join(str(i)).strpath for i in range(3)] + targets = [tmpdir.join(str(i)).strpath for i in range(3, 6)] # Targets newer than dependencies for dep in dependencies: @@ -307,13 +304,11 @@ def touch(fname): else: assert False, "Should raise OSError on missing dependency" - shutil.rmtree(tmpdir) - -def test_json(): +def test_json(tmpdir): # Simple roundtrip test of json files, just a sanity check. adict = dict(a='one', c='three', b='two') - fd, name = mkstemp(suffix='.json') + name = tmpdir.join('test.json').strpath save_json(name, adict) # save_json closes the file new_dict = load_json(name) os.unlink(name) diff --git a/nipype/utils/tests/test_provenance.py b/nipype/utils/tests/test_provenance.py index 270774dcf5..ce35a95aac 100644 --- a/nipype/utils/tests/test_provenance.py +++ b/nipype/utils/tests/test_provenance.py @@ -21,8 +21,7 @@ def test_provenance(): assert 'echo hello' in provn def test_provenance_exists(tmpdir): - tempdir = str(tmpdir) - os.chdir(tempdir) + tmpdir.chdir() from nipype import config from nipype.interfaces.base import CommandLine provenance_state = config.get('execution', 'write_provenance') @@ -31,8 +30,7 @@ def test_provenance_exists(tmpdir): CommandLine('echo hello').run() config.set('execution', 'write_provenance', provenance_state) config.set('execution', 'hash_method', hash_state) - provenance_exists = os.path.exists(os.path.join(tempdir, 'provenance.provn')) - assert provenance_exists + assert tmpdir.join('provenance.provn').check() def test_safe_encode(): a = '\xc3\xa9lg' diff --git a/nipype/workflows/dmri/fsl/tests/test_dti.py b/nipype/workflows/dmri/fsl/tests/test_dti.py index 9a8ed4ca13..7c5a7a4426 100644 --- a/nipype/workflows/dmri/fsl/tests/test_dti.py +++ b/nipype/workflows/dmri/fsl/tests/test_dti.py @@ -9,15 +9,13 @@ import nipype.pipeline.engine as pe import warnings -import tempfile -import shutil from nipype.workflows.dmri.fsl.dti import create_bedpostx_pipeline from nipype.utils.filemanip import list_to_filename @pytest.mark.skipif(no_fsl(), reason="fsl is not installed") @pytest.mark.skipif(no_fsl_course_data(), reason="fsl data not available") -def test_create_bedpostx_pipeline(): +def test_create_bedpostx_pipeline(tmpdir): fsl_course_dir = os.path.abspath(os.environ['FSL_COURSE_DATA']) mask_file = os.path.join(fsl_course_dir, "fdt2/subj1.bedpostX/nodif_brain_mask.nii.gz") @@ -72,7 +70,7 @@ def test_create_bedpostx_pipeline(): test_f1 = pe.Node(util.AssertEqual(), name="mean_f1_test") pipeline = pe.Workflow(name="test_bedpostx") - pipeline.base_dir = tempfile.mkdtemp(prefix="nipype_test_bedpostx_") + pipeline.base_dir = tmpdir.mkdir("nipype_test_bedpostx_").strpath pipeline.connect([(slice_mask, original_bedpostx, [("roi_file", "mask")]), (slice_mask, nipype_bedpostx, [("roi_file", "inputnode.mask")]), @@ -85,4 +83,3 @@ def test_create_bedpostx_pipeline(): ]) pipeline.run(plugin='Linear') - shutil.rmtree(pipeline.base_dir) diff --git a/nipype/workflows/dmri/fsl/tests/test_epi.py b/nipype/workflows/dmri/fsl/tests/test_epi.py index f7b349b442..eeb36ee409 100644 --- a/nipype/workflows/dmri/fsl/tests/test_epi.py +++ b/nipype/workflows/dmri/fsl/tests/test_epi.py @@ -9,14 +9,12 @@ import nipype.pipeline.engine as pe import warnings -import tempfile -import shutil from nipype.workflows.dmri.fsl.epi import create_eddy_correct_pipeline @pytest.mark.skipif(no_fsl(), reason="fsl is not installed") @pytest.mark.skipif(no_fsl_course_data(), reason="fsl data not available") -def test_create_eddy_correct_pipeline(): +def test_create_eddy_correct_pipeline(tmpdir): fsl_course_dir = os.path.abspath(os.environ['FSL_COURSE_DATA']) dwi_file = os.path.join(fsl_course_dir, "fdt1/subj1/data.nii.gz") @@ -36,7 +34,7 @@ def test_create_eddy_correct_pipeline(): test = pe.Node(util.AssertEqual(), name="eddy_corrected_dwi_test") pipeline = pe.Workflow(name="test_eddycorrect") - pipeline.base_dir = tempfile.mkdtemp(prefix="nipype_test_eddycorrect_") + pipeline.base_dir = tmpdir.mkdir("nipype_test_eddycorrect_").strpath pipeline.connect([(trim_dwi, original_eddycorrect, [("roi_file", "in_file")]), (trim_dwi, nipype_eddycorrect, [("roi_file", "inputnode.in_file")]), @@ -45,4 +43,3 @@ def test_create_eddy_correct_pipeline(): ]) pipeline.run(plugin='Linear') - shutil.rmtree(pipeline.base_dir) diff --git a/nipype/workflows/dmri/fsl/tests/test_tbss.py b/nipype/workflows/dmri/fsl/tests/test_tbss.py index 20f7331fda..9cf2c9fe50 100644 --- a/nipype/workflows/dmri/fsl/tests/test_tbss.py +++ b/nipype/workflows/dmri/fsl/tests/test_tbss.py @@ -126,7 +126,7 @@ def _tbss_test_helper(estimate_skeleton): @pytest.mark.skipif(no_fsl(), reason="fsl is not installed") @pytest.mark.skipif(no_fsl_course_data(), reason="fsl data not available") -def disabled_tbss_est_skeleton(): +def test_disabled_tbss_est_skeleton(): _tbss_test_helper(True) # this test is disabled until we figure out what is wrong with TBSS in 5.0.9 @@ -134,5 +134,5 @@ def disabled_tbss_est_skeleton(): @pytest.mark.skipif(no_fsl(), reason="fsl is not installed") @pytest.mark.skipif(no_fsl_course_data(), reason="fsl data not available") -def disabled_tbss_est_skeleton_use_precomputed_skeleton(): +def test_disabled_tbss_est_skeleton_use_precomputed_skeleton(): _tbss_test_helper(False) diff --git a/nipype/workflows/rsfmri/fsl/tests/test_resting.py b/nipype/workflows/rsfmri/fsl/tests/test_resting.py index 7ae4483b55..68e62d7ee8 100644 --- a/nipype/workflows/rsfmri/fsl/tests/test_resting.py +++ b/nipype/workflows/rsfmri/fsl/tests/test_resting.py @@ -51,7 +51,7 @@ class TestResting(): @pytest.fixture(autouse=True) def setup_class(self, tmpdir): # setup temp folder - os.chdir(str(tmpdir)) + tmpdir.chdir() self.in_filenames = {key: os.path.abspath(value) for key, value in self.in_filenames.items()} diff --git a/pytest.ini b/pytest.ini index 6247b04cca..ea149d6ed1 100644 --- a/pytest.ini +++ b/pytest.ini @@ -1,3 +1,4 @@ [pytest] norecursedirs = .git build dist doc nipype/external tools examples src -addopts = --doctest-modules \ No newline at end of file +addopts = --doctest-modules +doctest_optionflags = ALLOW_UNICODE NORMALIZE_WHITESPACE \ No newline at end of file diff --git a/tools/apigen.py b/tools/apigen.py index d3a732d881..c594042f71 100644 --- a/tools/apigen.py +++ b/tools/apigen.py @@ -103,11 +103,11 @@ def set_package_name(self, package_name): def _get_object_name(self, line): ''' Get second token in line >>> docwriter = ApiDocWriter('sphinx') - >>> docwriter._get_object_name(" def func(): ") # doctest: +ALLOW_UNICODE + >>> docwriter._get_object_name(" def func(): ") u'func' - >>> docwriter._get_object_name(" class Klass(object): ") # doctest: +ALLOW_UNICODE + >>> docwriter._get_object_name(" class Klass(object): ") 'Klass' - >>> docwriter._get_object_name(" class Klass: ") # doctest: +ALLOW_UNICODE + >>> docwriter._get_object_name(" class Klass: ") 'Klass' ''' name = line.split()[1].split('(')[0].strip() diff --git a/tools/interfacedocgen.py b/tools/interfacedocgen.py index 3eb7467c4b..80356d3ded 100644 --- a/tools/interfacedocgen.py +++ b/tools/interfacedocgen.py @@ -124,11 +124,11 @@ def set_package_name(self, package_name): def _get_object_name(self, line): ''' Get second token in line >>> docwriter = ApiDocWriter('sphinx') - >>> docwriter._get_object_name(" def func(): ") # doctest: +ALLOW_UNICODE + >>> docwriter._get_object_name(" def func(): ") u'func' - >>> docwriter._get_object_name(" class Klass(object): ") # doctest: +ALLOW_UNICODE + >>> docwriter._get_object_name(" class Klass(object): ") 'Klass' - >>> docwriter._get_object_name(" class Klass: ") # doctest: +ALLOW_UNICODE + >>> docwriter._get_object_name(" class Klass: ") 'Klass' ''' name = line.split()[1].split('(')[0].strip() From 8ce4b9bab071e6d4de96cd25d2e2a4050200c511 Mon Sep 17 00:00:00 2001 From: Mathias Goncalves Date: Tue, 7 Nov 2017 13:07:05 -0500 Subject: [PATCH 464/643] update changeform --- CHANGES | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES b/CHANGES index 98aab9f0d0..f7761f7b91 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,7 @@ Upcoming release (0.14.0) ================ +* FIX: Testing maintainance and improvements (https://github.com/nipy/nipype/pull/2252) * ENH: Add elapsed_time and final metric_value to ants.Registration (https://github.com/nipy/nipype/pull/1985) * ENH: Improve terminal_output feature (https://github.com/nipy/nipype/pull/2209) * ENH: Simple interface to FSL std2imgcoords (https://github.com/nipy/nipype/pull/2209, prev #1398) From c2807b2664f9d6217a26a048c6b12d27325f8f35 Mon Sep 17 00:00:00 2001 From: salma1601 Date: Fri, 10 Nov 2017 12:02:12 +0100 Subject: [PATCH 465/643] add xyz scale to AFNI refit --- nipype/interfaces/afni/tests/test_auto_Refit.py | 2 ++ nipype/interfaces/afni/utils.py | 3 +++ 2 files changed, 5 insertions(+) diff --git a/nipype/interfaces/afni/tests/test_auto_Refit.py b/nipype/interfaces/afni/tests/test_auto_Refit.py index 06c5f98255..63ab824617 100644 --- a/nipype/interfaces/afni/tests/test_auto_Refit.py +++ b/nipype/interfaces/afni/tests/test_auto_Refit.py @@ -42,6 +42,8 @@ def test_Refit_inputs(): ), xorigin=dict(argstr='-xorigin %s', ), + xyzscale=dict(argstr='-xyzscale %f', + ), ydel=dict(argstr='-ydel %f', ), yorigin=dict(argstr='-yorigin %s', diff --git a/nipype/interfaces/afni/utils.py b/nipype/interfaces/afni/utils.py index 4c1da45b50..e492b39d47 100644 --- a/nipype/interfaces/afni/utils.py +++ b/nipype/interfaces/afni/utils.py @@ -1821,6 +1821,9 @@ class RefitInputSpec(CommandLineInputSpec): zdel = traits.Float( desc='new z voxel dimension in mm', argstr='-zdel %f') + xyzscale = traits.Float( + desc='Scale the size of the dataset voxels by the given factor', + argstr='-xyzscale %f') space = traits.Enum( 'TLRC', 'MNI', 'ORIG', argstr='-space %s', From 1ba3b318aebc6adf469af1e4aa840d4fa575fa99 Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Fri, 10 Nov 2017 13:14:32 -0800 Subject: [PATCH 466/643] RF: Add PackageInfo class to standardize version parsing --- nipype/interfaces/afni/base.py | 31 +++++-------------------- nipype/interfaces/ants/base.py | 41 +++++++++++++--------------------- nipype/interfaces/base.py | 22 ++++++++++++++++++ 3 files changed, 43 insertions(+), 51 deletions(-) diff --git a/nipype/interfaces/afni/base.py b/nipype/interfaces/afni/base.py index 3405f96cfa..1097a28d46 100644 --- a/nipype/interfaces/afni/base.py +++ b/nipype/interfaces/afni/base.py @@ -14,45 +14,26 @@ from ...utils.filemanip import split_filename, fname_presuffix from ..base import ( - CommandLine, traits, CommandLineInputSpec, isdefined, File, TraitedSpec) + CommandLine, traits, CommandLineInputSpec, isdefined, File, TraitedSpec, + PackageInfo) from ...external.due import BibTeX # Use nipype's logging system IFLOGGER = logging.getLogger('interface') -class Info(object): +class Info(PackageInfo): """Handle afni output type and version information. """ __outputtype = 'AFNI' ftypes = {'NIFTI': '.nii', 'AFNI': '', 'NIFTI_GZ': '.nii.gz'} + version_cmd = 'afni --version' @staticmethod - def version(): - """Check for afni version on system - - Parameters - ---------- - None - - Returns - ------- - version : str - Version number as string or None if AFNI not found - - """ - try: - clout = CommandLine(command='afni --version', - resource_monitor=False, - terminal_output='allatonce').run() - except IOError: - # If afni_vcheck is not present, return None - IFLOGGER.warn('afni executable not found.') - return None - - version_stamp = clout.runtime.stdout.split('\n')[0].split('Version ')[1] + def parse_version(raw_info): + version_stamp = raw_info.split('\n')[0].split('Version ')[1] if version_stamp.startswith('AFNI'): version_stamp = version_stamp.split('AFNI_')[1] elif version_stamp.startswith('Debian'): diff --git a/nipype/interfaces/ants/base.py b/nipype/interfaces/ants/base.py index 3ab50a24f5..0baabf4968 100644 --- a/nipype/interfaces/ants/base.py +++ b/nipype/interfaces/ants/base.py @@ -6,11 +6,11 @@ from builtins import str import os -import subprocess # Local imports from ... import logging, LooseVersion -from ..base import CommandLine, CommandLineInputSpec, traits, isdefined +from ..base import (CommandLine, CommandLineInputSpec, traits, isdefined, + PackageInfo) logger = logging.getLogger('interface') # -Using -1 gives primary responsibilty to ITKv4 to do the correct @@ -29,32 +29,21 @@ ALT_ITKv4_THREAD_LIMIT_VARIABLE = 'ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS' -class Info(object): - _version = None +class Info(PackageInfo): + version_cmd = os.path.join(os.getenv('ANTSPATH', ''), + 'antsRegistration') + ' --version' - @property - def version(self): - if self._version is None: - try: - basedir = os.environ['ANTSPATH'] - except KeyError: - return None - - cmd = os.path.join(basedir, 'antsRegistration') - try: - res = subprocess.check_output([cmd, '--version']).decode('utf-8') - except OSError: - return None - - for line in res.splitlines(): - if line.startswith('ANTs Version: '): - self._version = line.split()[2] - break - else: - return None + @staticmethod + def parse_version(raw_info): + for line in raw_info.splitlines(): + if line.startswith('ANTs Version: '): + v_string = line.split()[2] + break + else: + return None # -githash may or may not be appended - v_string = self._version.split('-')[0] + v_string = v_string.split('-')[0] # 2.2.0-equivalent version string if 'post' in v_string and LooseVersion(v_string) >= LooseVersion('2.1.0.post789'): @@ -125,4 +114,4 @@ def set_default_num_threads(cls, num_threads): @property def version(self): - return Info().version + return Info.version() diff --git a/nipype/interfaces/base.py b/nipype/interfaces/base.py index 0fa9559718..c608fdff7e 100644 --- a/nipype/interfaces/base.py +++ b/nipype/interfaces/base.py @@ -1924,6 +1924,28 @@ def _format_arg(self, name, spec, value): return super(SEMLikeCommandLine, self)._format_arg(name, spec, value) +class PackageInfo(object): + _version = None + version_cmd = None + + @classmethod + def version(klass): + if klass._version is None: + try: + clout = CommandLine(command=klass.version_cmd, + resource_monitor=False, + terminal_output='allatonce').run() + except OSError: + return None + + klass._version = klass.parse_version(raw_info) + return klass._version + + @staticmethod + def parse_version(raw_info): + raise NotImplementedError + + class MultiPath(traits.List): """ Abstract class - shared functionality of input and output MultiPath """ From 1a65959e9b237fdbf0fe0a9790d8b2bc1344daf7 Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Fri, 10 Nov 2017 13:34:22 -0800 Subject: [PATCH 467/643] ENH: Get version from file (e.g. FreeSurfer) --- nipype/interfaces/base.py | 22 ++++++++++++++---- nipype/interfaces/freesurfer/base.py | 34 +++++++--------------------- 2 files changed, 25 insertions(+), 31 deletions(-) diff --git a/nipype/interfaces/base.py b/nipype/interfaces/base.py index c608fdff7e..aadb9c333d 100644 --- a/nipype/interfaces/base.py +++ b/nipype/interfaces/base.py @@ -1927,15 +1927,27 @@ def _format_arg(self, name, spec, value): class PackageInfo(object): _version = None version_cmd = None + version_file = None @classmethod def version(klass): if klass._version is None: - try: - clout = CommandLine(command=klass.version_cmd, - resource_monitor=False, - terminal_output='allatonce').run() - except OSError: + if klass.version_cmd is not None: + try: + clout = CommandLine(command=klass.version_cmd, + resource_monitor=False, + terminal_output='allatonce').run() + except OSError: + return None + + raw_info = clout.runtime.stdout + elif klass.version_file is not None: + try: + with open(klass.version_file, 'rt') as fobj: + raw_info = fobj.read() + except OSError: + return None + else: return None klass._version = klass.parse_version(raw_info) diff --git a/nipype/interfaces/freesurfer/base.py b/nipype/interfaces/freesurfer/base.py index 4d87cdf9e7..56a4d5df77 100644 --- a/nipype/interfaces/freesurfer/base.py +++ b/nipype/interfaces/freesurfer/base.py @@ -23,12 +23,13 @@ from ...utils.filemanip import fname_presuffix from ..base import (CommandLine, Directory, CommandLineInputSpec, isdefined, - traits, TraitedSpec, File) + traits, TraitedSpec, File, + PackageInfo) __docformat__ = 'restructuredtext' -class Info(object): +class Info(PackageInfo): """ Freesurfer subject directory and version information. Examples @@ -39,32 +40,13 @@ class Info(object): >>> Info.subjectsdir() # doctest: +SKIP """ + if os.getenv('FREESURFER_HOME'): + version_file = os.path.join(os.getenv('FREESURFER_HOME'), + 'build-stamp.txt') @staticmethod - def version(): - """Check for freesurfer version on system - - Find which freesurfer is being used....and get version from - /path/to/freesurfer/build-stamp.txt - - Returns - ------- - - version : string - version number as string - or None if freesurfer version not found - - """ - fs_home = os.getenv('FREESURFER_HOME') - if fs_home is None: - return None - versionfile = os.path.join(fs_home, 'build-stamp.txt') - if not os.path.exists(versionfile): - return None - fid = open(versionfile, 'rt') - version = fid.readline() - fid.close() - return version + def parse_version(raw_info): + return raw_info.splitlines()[0] @classmethod def looseversion(cls): From ca1b0044ced7f6425a5d89cc3e4f5dedb54205aa Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Fri, 10 Nov 2017 13:39:56 -0800 Subject: [PATCH 468/643] FIX: CommandLine generates IOError, not OSError --- nipype/interfaces/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nipype/interfaces/base.py b/nipype/interfaces/base.py index aadb9c333d..ee058df18f 100644 --- a/nipype/interfaces/base.py +++ b/nipype/interfaces/base.py @@ -1937,7 +1937,7 @@ def version(klass): clout = CommandLine(command=klass.version_cmd, resource_monitor=False, terminal_output='allatonce').run() - except OSError: + except IOError: return None raw_info = clout.runtime.stdout From adf5a353f765d7f20f20291f0aeb7d57f4f95690 Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Fri, 10 Nov 2017 15:15:11 -0800 Subject: [PATCH 469/643] FIX: Indentation --- nipype/interfaces/base.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nipype/interfaces/base.py b/nipype/interfaces/base.py index ee058df18f..facafa5fc9 100644 --- a/nipype/interfaces/base.py +++ b/nipype/interfaces/base.py @@ -1950,7 +1950,8 @@ def version(klass): else: return None - klass._version = klass.parse_version(raw_info) + klass._version = klass.parse_version(raw_info) + return klass._version @staticmethod From eecfd960e9e165c6f181a5cef82109946df93b84 Mon Sep 17 00:00:00 2001 From: salma1601 Date: Sat, 11 Nov 2017 19:56:41 +0100 Subject: [PATCH 470/643] remove printing --- nipype/interfaces/afni/preprocess.py | 1 - 1 file changed, 1 deletion(-) diff --git a/nipype/interfaces/afni/preprocess.py b/nipype/interfaces/afni/preprocess.py index e46c9689c2..3d7d47c673 100644 --- a/nipype/interfaces/afni/preprocess.py +++ b/nipype/interfaces/afni/preprocess.py @@ -3519,7 +3519,6 @@ def _list_outputs(self): else: ext = prefix[ext_ind:] suffix = '' - print(ext,"ext") outputs['warped_source'] = fname_presuffix(prefix, suffix=suffix, use_ext=False) + ext if not self.inputs.nowarp: From 3a437c022f03a569318971c64583f37c9e0dd8a5 Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Sat, 11 Nov 2017 22:18:35 -0500 Subject: [PATCH 471/643] Fix logging formatting in several interfaces. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix logging formatting in ants, cmtk, elastic, freesurfer, fsl, mrtrix, mrtrix3, nilearn, and spm interfaces. Okay, it was mostly in cmtk, io, and mrtrix. - In nipype/interfaces/io.py logging is imported multiple times, and iflogger is redefined a couple of times. Not sure if that’s the right way to go. - Is this okay: - `iflogger.debug('saving inputs {}', inputs)` (nipype/interfaces/base.py#L1210) - Also caught a couple of things in nipype/interfaces/cmtk/nx.py. Namely a couple of unused variables and at one point redefining `file`. --- nipype/interfaces/ants/base.py | 2 +- nipype/interfaces/ants/registration.py | 2 +- nipype/interfaces/cmtk/cmtk.py | 76 ++++++++++++---------- nipype/interfaces/cmtk/nbs.py | 7 +- nipype/interfaces/cmtk/nx.py | 42 ++++++------ nipype/interfaces/cmtk/parcellation.py | 35 +++++----- nipype/interfaces/elastix/base.py | 2 +- nipype/interfaces/elastix/registration.py | 2 +- nipype/interfaces/elastix/utils.py | 2 +- nipype/interfaces/freesurfer/preprocess.py | 2 +- nipype/interfaces/freesurfer/utils.py | 9 +-- nipype/interfaces/fsl/base.py | 6 +- nipype/interfaces/io.py | 35 +++++----- nipype/interfaces/mrtrix/convert.py | 28 ++++---- nipype/interfaces/mrtrix3/base.py | 4 +- nipype/interfaces/nilearn.py | 2 +- nipype/interfaces/spm/model.py | 2 +- 17 files changed, 135 insertions(+), 123 deletions(-) diff --git a/nipype/interfaces/ants/base.py b/nipype/interfaces/ants/base.py index 3ab50a24f5..193e80a0fc 100644 --- a/nipype/interfaces/ants/base.py +++ b/nipype/interfaces/ants/base.py @@ -11,7 +11,7 @@ # Local imports from ... import logging, LooseVersion from ..base import CommandLine, CommandLineInputSpec, traits, isdefined -logger = logging.getLogger('interface') +iflogger = logging.getLogger('interface') # -Using -1 gives primary responsibilty to ITKv4 to do the correct # thread limitings. diff --git a/nipype/interfaces/ants/registration.py b/nipype/interfaces/ants/registration.py index c166bec792..6d82a2e9f1 100644 --- a/nipype/interfaces/ants/registration.py +++ b/nipype/interfaces/ants/registration.py @@ -672,7 +672,7 @@ class Registration(ANTSCommand): One can use multiple similarity metrics in a single registration stage.The Node below first performs a linear registation using only the Mutual Information ('Mattes')-metric. - In a second stage, it performs a non-linear registration ('Syn') using both a + In a second stage, it performs a non-linear registration ('Syn') using both a Mutual Information and a local cross-correlation ('CC')-metric. Both metrics are weighted equally ('metric_weight' is .5 for both). The Mutual Information- metric uses 32 bins. The local cross-correlations (correlations between every voxel's neighborhoods) is computed diff --git a/nipype/interfaces/cmtk/cmtk.py b/nipype/interfaces/cmtk/cmtk.py index 4eeec3e370..2f29bbb2e2 100644 --- a/nipype/interfaces/cmtk/cmtk.py +++ b/nipype/interfaces/cmtk/cmtk.py @@ -120,8 +120,11 @@ def create_allpoints_cmat(streamlines, roiData, voxelSize, n_rois): connectivity_matrix = get_connectivity_matrix(n_rois, list_of_roi_crossed_lists) dis = n_fib - len(final_fiber_ids) - iflogger.info("Found %i (%f percent out of %i fibers) fibers that start or terminate in a voxel which is not labeled. (orphans)" % (dis, dis * 100.0 / n_fib, n_fib)) - iflogger.info("Valid fibers: %i (%f percent)" % (n_fib - dis, 100 - dis * 100.0 / n_fib)) + iflogger.info('Found %i (%f percent out of %i fibers) fibers that start or ' + 'terminate in a voxel which is not labeled. (orphans)', + dis, dis * 100.0 / n_fib, n_fib) + iflogger.info('Valid fibers: %i (%f percent)', n_fib - dis, + 100 - dis * 100.0 / n_fib) iflogger.info('Returning the intersecting point connectivity matrix') return connectivity_matrix, final_fiber_ids @@ -181,7 +184,7 @@ def cmat(track_file, roi_file, resolution_network_file, matrix_name, matrix_mat_ en_fname = op.abspath(endpoint_name + '_endpoints.npy') en_fnamemm = op.abspath(endpoint_name + '_endpointsmm.npy') - iflogger.info('Reading Trackvis file {trk}'.format(trk=track_file)) + iflogger.info('Reading Trackvis file %s', track_file) fib, hdr = nb.trackvis.read(track_file, False) stats['orig_n_fib'] = len(fib) @@ -191,13 +194,13 @@ def cmat(track_file, roi_file, resolution_network_file, matrix_name, matrix_mat_ (endpoints, endpointsmm) = create_endpoints_array(fib, roiVoxelSize) # Output endpoint arrays - iflogger.info('Saving endpoint array: {array}'.format(array=en_fname)) + iflogger.info('Saving endpoint array: %s', en_fname) np.save(en_fname, endpoints) - iflogger.info('Saving endpoint array in mm: {array}'.format(array=en_fnamemm)) + iflogger.info('Saving endpoint array in mm: %s', en_fnamemm) np.save(en_fnamemm, endpointsmm) n = len(fib) - iflogger.info('Number of fibers {num}'.format(num=n)) + iflogger.info('Number of fibers: %i', n) # Create empty fiber label array fiberlabels = np.zeros((n, 2)) @@ -244,7 +247,8 @@ def cmat(track_file, roi_file, resolution_network_file, matrix_name, matrix_mat_ startROI = int(roiData[endpoints[i, 0, 0], endpoints[i, 0, 1], endpoints[i, 0, 2]]) endROI = int(roiData[endpoints[i, 1, 0], endpoints[i, 1, 1], endpoints[i, 1, 2]]) except IndexError: - iflogger.error(("AN INDEXERROR EXCEPTION OCCURED FOR FIBER %s. PLEASE CHECK ENDPOINT GENERATION" % i)) + iflogger.error('AN INDEXERROR EXCEPTION OCCURED FOR FIBER %s. ' + 'PLEASE CHECK ENDPOINT GENERATION', i) break # Filter @@ -256,7 +260,7 @@ def cmat(track_file, roi_file, resolution_network_file, matrix_name, matrix_mat_ if startROI > nROIs or endROI > nROIs: iflogger.error("Start or endpoint of fiber terminate in a voxel which is labeled higher") iflogger.error("than is expected by the parcellation node information.") - iflogger.error("Start ROI: %i, End ROI: %i" % (startROI, endROI)) + iflogger.error("Start ROI: %i, End ROI: %i", startROI, endROI) iflogger.error("This needs bugfixing!") continue @@ -296,8 +300,10 @@ def cmat(track_file, roi_file, resolution_network_file, matrix_name, matrix_mat_ # make final fiber labels as array final_fiberlabels_array = np.array(final_fiberlabels, dtype=int) - iflogger.info("Found %i (%f percent out of %i fibers) fibers that start or terminate in a voxel which is not labeled. (orphans)" % (dis, dis * 100.0 / n, n)) - iflogger.info("Valid fibers: %i (%f percent)" % (n - dis, 100 - dis * 100.0 / n)) + iflogger.info('Found %i (%f percent out of %i fibers) fibers that start or ' + 'terminate in a voxel which is not labeled. (orphans)', + dis, dis * 100.0 / n, n) + iflogger.info('Valid fibers: %i (%f%%)', n - dis, 100 - dis * 100.0 / n) numfib = nx.Graph() numfib.add_nodes_from(G) @@ -326,7 +332,7 @@ def cmat(track_file, roi_file, resolution_network_file, matrix_name, matrix_mat_ fibmedian.add_edge(u, v, weight=di['fiber_length_median']) fibdev.add_edge(u, v, weight=di['fiber_length_std']) - iflogger.info('Writing network as {ntwk}'.format(ntwk=matrix_name)) + iflogger.info('Writing network as %s', matrix_name) nx.write_gpickle(G, op.abspath(matrix_name)) numfib_mlab = nx.to_numpy_matrix(numfib, dtype=int) @@ -341,7 +347,7 @@ def cmat(track_file, roi_file, resolution_network_file, matrix_name, matrix_mat_ if intersections: path, name, ext = split_filename(matrix_name) intersection_matrix_name = op.abspath(name + '_intersections') + ext - iflogger.info('Writing intersection network as {ntwk}'.format(ntwk=intersection_matrix_name)) + iflogger.info('Writing intersection network as %s', intersection_matrix_name) nx.write_gpickle(I, intersection_matrix_name) path, name, ext = split_filename(matrix_mat_name) @@ -349,37 +355,41 @@ def cmat(track_file, roi_file, resolution_network_file, matrix_name, matrix_mat_ ext = '.mat' matrix_mat_name = matrix_mat_name + ext - iflogger.info('Writing matlab matrix as {mat}'.format(mat=matrix_mat_name)) + iflogger.info('Writing matlab matrix as %s', matrix_mat_name) sio.savemat(matrix_mat_name, numfib_dict) if intersections: intersect_dict = {'intersections': intersection_matrix} intersection_matrix_mat_name = op.abspath(name + '_intersections') + ext - iflogger.info('Writing intersection matrix as {mat}'.format(mat=intersection_matrix_mat_name)) + iflogger.info('Writing intersection matrix as %s', intersection_matrix_mat_name) sio.savemat(intersection_matrix_mat_name, intersect_dict) mean_fiber_length_matrix_name = op.abspath(name + '_mean_fiber_length') + ext - iflogger.info('Writing matlab mean fiber length matrix as {mat}'.format(mat=mean_fiber_length_matrix_name)) + iflogger.info('Writing matlab mean fiber length matrix as %s', + mean_fiber_length_matrix_name) sio.savemat(mean_fiber_length_matrix_name, fibmean_dict) median_fiber_length_matrix_name = op.abspath(name + '_median_fiber_length') + ext - iflogger.info('Writing matlab median fiber length matrix as {mat}'.format(mat=median_fiber_length_matrix_name)) + iflogger.info('Writing matlab median fiber length matrix as %s', + median_fiber_length_matrix_name) sio.savemat(median_fiber_length_matrix_name, fibmedian_dict) fiber_length_std_matrix_name = op.abspath(name + '_fiber_length_std') + ext - iflogger.info('Writing matlab fiber length deviation matrix as {mat}'.format(mat=fiber_length_std_matrix_name)) + iflogger.info('Writing matlab fiber length deviation matrix as %s', + fiber_length_std_matrix_name) sio.savemat(fiber_length_std_matrix_name, fibdev_dict) fiberlengths_fname = op.abspath(endpoint_name + '_final_fiberslength.npy') - iflogger.info("Storing final fiber length array as %s" % fiberlengths_fname) + iflogger.info('Storing final fiber length array as %s', fiberlengths_fname) np.save(fiberlengths_fname, final_fiberlength_array) fiberlabels_fname = op.abspath(endpoint_name + '_filtered_fiberslabel.npy') - iflogger.info("Storing all fiber labels (with orphans) as %s" % fiberlabels_fname) + iflogger.info('Storing all fiber labels (with orphans) as %s', fiberlabels_fname) np.save(fiberlabels_fname, np.array(fiberlabels, dtype=np.int32),) fiberlabels_noorphans_fname = op.abspath(endpoint_name + '_final_fiberslabels.npy') - iflogger.info("Storing final fiber labels (no orphans) as %s" % fiberlabels_noorphans_fname) + iflogger.info('Storing final fiber labels (no orphans) as %s', + fiberlabels_noorphans_fname) np.save(fiberlabels_noorphans_fname, final_fiberlabels_array) iflogger.info("Filtering tractography - keeping only no orphan fibers") @@ -389,7 +399,7 @@ def cmat(track_file, roi_file, resolution_network_file, matrix_name, matrix_mat_ stats['intersections_percent'] = float(stats['intersections_n_fib']) / float(stats['orig_n_fib']) * 100 out_stats_file = op.abspath(endpoint_name + '_statistics.mat') - iflogger.info("Saving matrix creation statistics as %s" % out_stats_file) + iflogger.info('Saving matrix creation statistics as %s', out_stats_file) sio.savemat(out_stats_file, stats) @@ -401,7 +411,7 @@ def save_fibers(oldhdr, oldfib, fname, indices): outstreams.append(oldfib[i]) n_fib_out = len(outstreams) hdrnew['n_count'] = n_fib_out - iflogger.info("Writing final non-orphan fibers as %s" % fname) + iflogger.info('Writing final non-orphan fibers as %s', fname) nb.trackvis.write(fname, outstreams, hdrnew) return n_fib_out @@ -620,22 +630,22 @@ class ROIGen(BaseInterface): def _run_interface(self, runtime): aparc_aseg_file = self.inputs.aparc_aseg_file aparcpath, aparcname, aparcext = split_filename(aparc_aseg_file) - iflogger.info('Using Aparc+Aseg file: {name}'.format(name=aparcname + aparcext)) + iflogger.info('Using Aparc+Aseg file: %s', aparcname + aparcext) niiAPARCimg = nb.load(aparc_aseg_file, mmap=NUMPY_MMAP) niiAPARCdata = niiAPARCimg.get_data() niiDataLabels = np.unique(niiAPARCdata) numDataLabels = np.size(niiDataLabels) - iflogger.info('Number of labels in image: {n}'.format(n=numDataLabels)) + iflogger.info('Number of labels in image: %s', numDataLabels) write_dict = True if self.inputs.use_freesurfer_LUT: self.LUT_file = self.inputs.freesurfer_dir + '/FreeSurferColorLUT.txt' - iflogger.info('Using Freesurfer LUT: {name}'.format(name=self.LUT_file)) + iflogger.info('Using Freesurfer LUT: %s', self.LUT_file) prefix = 'fsLUT' elif not self.inputs.use_freesurfer_LUT and isdefined(self.inputs.LUT_file): self.LUT_file = op.abspath(self.inputs.LUT_file) lutpath, lutname, lutext = split_filename(self.LUT_file) - iflogger.info('Using Custom LUT file: {name}'.format(name=lutname + lutext)) + iflogger.info('Using Custom LUT file: %s', lutname + lutext) prefix = lutname else: prefix = 'hardcoded' @@ -652,14 +662,14 @@ def _run_interface(self, runtime): dict_file = op.abspath(prefix + '_' + aparcname + '.pck') if write_dict: - iflogger.info('Lookup table: {name}'.format(name=op.abspath(self.LUT_file))) + iflogger.info('Lookup table: %s', op.abspath(self.LUT_file)) LUTlabelsRGBA = np.loadtxt(self.LUT_file, skiprows=4, usecols=[0, 1, 2, 3, 4, 5], comments='#', dtype={'names': ('index', 'label', 'R', 'G', 'B', 'A'), 'formats': ('int', '|S30', 'int', 'int', 'int', 'int')}) numLUTLabels = np.size(LUTlabelsRGBA) if numLUTLabels < numDataLabels: iflogger.error('LUT file provided does not contain all of the regions in the image') iflogger.error('Removing unmapped regions') - iflogger.info('Number of labels in LUT: {n}'.format(n=numLUTLabels)) + iflogger.info('Number of labels in LUT: %s', numLUTLabels) LUTlabelDict = {} """ Create dictionary for input LUT table""" @@ -687,7 +697,7 @@ def _run_interface(self, runtime): iflogger.info('Grey matter mask created') greyMaskLabels = np.unique(niiGM) numGMLabels = np.size(greyMaskLabels) - iflogger.info('Number of grey matter labels: {num}'.format(num=numGMLabels)) + iflogger.info('Number of grey matter labels: %s', numGMLabels) labelDict = {} GMlabelDict = {} @@ -697,7 +707,7 @@ def _run_interface(self, runtime): if write_dict: GMlabelDict['originalID'] = mapDict[label] except: - iflogger.info('Label {lbl} not in provided mapping'.format(lbl=label)) + iflogger.info('Label %s not in provided mapping', label) if write_dict: del GMlabelDict GMlabelDict = {} @@ -708,11 +718,11 @@ def _run_interface(self, runtime): roi_image = nb.Nifti1Image(niiGM, niiAPARCimg.affine, niiAPARCimg.header) - iflogger.info('Saving ROI File to {path}'.format(path=roi_file)) + iflogger.info('Saving ROI File to %s', roi_file) nb.save(roi_image, roi_file) if write_dict: - iflogger.info('Saving Dictionary File to {path} in Pickle format'.format(path=dict_file)) + iflogger.info('Saving Dictionary File to %s in Pickle format', dict_file) with open(dict_file, 'w') as f: pickle.dump(labelDict, f) return runtime @@ -785,7 +795,7 @@ class CreateNodes(BaseInterface): def _run_interface(self, runtime): iflogger.info('Creating nodes...') create_nodes(self.inputs.roi_file, self.inputs.resolution_network_file, self.inputs.out_filename) - iflogger.info('Saving node network to {path}'.format(path=op.abspath(self.inputs.out_filename))) + iflogger.info('Saving node network to %s', op.abspath(self.inputs.out_filename)) return runtime def _list_outputs(self): diff --git a/nipype/interfaces/cmtk/nbs.py b/nipype/interfaces/cmtk/nbs.py index fde691f3c5..7410227565 100644 --- a/nipype/interfaces/cmtk/nbs.py +++ b/nipype/interfaces/cmtk/nbs.py @@ -118,7 +118,8 @@ def _run_interface(self, runtime): node_ntwk_name = self.inputs.in_group1[0] node_network = nx.read_gpickle(node_ntwk_name) - iflogger.info('Populating node dictionaries with attributes from {node}'.format(node=node_ntwk_name)) + iflogger.info('Populating node dictionaries with attributes from %s', + node_ntwk_name) for nid, ndata in node_network.nodes(data=True): nbsgraph.nodes[nid] = ndata @@ -127,12 +128,12 @@ def _run_interface(self, runtime): path = op.abspath('NBS_Result_' + details) iflogger.info(path) nx.write_gpickle(nbsgraph, path) - iflogger.info('Saving output NBS edge network as {out}'.format(out=path)) + iflogger.info('Saving output NBS edge network as %s', path) pval_path = op.abspath('NBS_P_vals_' + details) iflogger.info(pval_path) nx.write_gpickle(nbs_pval_graph, pval_path) - iflogger.info('Saving output p-value network as {out}'.format(out=pval_path)) + iflogger.info('Saving output p-value network as %s', pval_path) return runtime def _list_outputs(self): diff --git a/nipype/interfaces/cmtk/nx.py b/nipype/interfaces/cmtk/nx.py index c2f6d7c361..ec3c01336c 100644 --- a/nipype/interfaces/cmtk/nx.py +++ b/nipype/interfaces/cmtk/nx.py @@ -38,7 +38,7 @@ def read_unknown_ntwk(ntwk): if not isinstance(ntwk, nx.classes.graph.Graph): - path, name, ext = split_filename(ntwk) + _, _, ext = split_filename(ntwk) if ext == '.pck': ntwk = nx.read_gpickle(ntwk) elif ext == '.graphml': @@ -104,27 +104,24 @@ def average_networks(in_files, ntwk_res_file, group_id): """ import networkx as nx import os.path as op - iflogger.info(("Creating average network for group: " - "{grp}").format(grp=group_id)) + iflogger.info('Creating average network for group: %s', group_id) matlab_network_list = [] if len(in_files) == 1: avg_ntwk = read_unknown_ntwk(in_files[0]) else: count_to_keep_edge = np.round(len(in_files) / 2.0) - iflogger.info(("Number of networks: {L}, an edge must occur in at " - "least {c} to remain in the " - "average network").format(L=len(in_files), - c=count_to_keep_edge)) + iflogger.info('Number of networks: %i, an edge must occur in at ' + 'least %i to remain in the average network', + len(in_files), count_to_keep_edge) ntwk_res_file = read_unknown_ntwk(ntwk_res_file) - iflogger.info(("{n} Nodes found in network resolution " - "file").format(n=ntwk_res_file.number_of_nodes())) + iflogger.info('%i nodes found in network resolution file', + ntwk_res_file.number_of_nodes()) ntwk = remove_all_edges(ntwk_res_file) counting_ntwk = ntwk.copy() # Sums all the relevant variables for index, subject in enumerate(in_files): tmp = nx.read_gpickle(subject) - iflogger.info(('File {s} has {n} ' - 'edges').format(s=subject, n=tmp.number_of_edges())) + iflogger.info('File %s has %i edges', subject, tmp.number_of_edges()) edges = list(tmp.edges()) for edge in edges: data = {} @@ -146,8 +143,7 @@ def average_networks(in_files, ntwk_res_file, group_id): # Divides each value by the number of files nodes = list(ntwk.nodes()) edges = list(ntwk.edges()) - iflogger.info(('Total network has {n} ' - 'edges').format(n=ntwk.number_of_edges())) + iflogger.info('Total network has %i edges', ntwk.number_of_edges()) avg_ntwk = nx.Graph() newdata = {} for node in nodes: @@ -171,7 +167,8 @@ def average_networks(in_files, ntwk_res_file, group_id): avg_ntwk.add_edge(edge[0], edge[1], **data) edge_dict['count'][edge[0] - 1][edge[1] - 1] = ntwk.edge[edge[0]][edge[1]]['count'] - iflogger.info('After thresholding, the average network has has {n} edges'.format(n=avg_ntwk.number_of_edges())) + iflogger.info('After thresholding, the average network has %i edges', + avg_ntwk.number_of_edges()) avg_edges = avg_ntwk.edges() for edge in avg_edges: @@ -187,16 +184,17 @@ def average_networks(in_files, ntwk_res_file, group_id): matlab_network_list.append(op.abspath(network_name)) tmp[key] = edge_dict[key] sio.savemat(op.abspath(network_name), tmp) - iflogger.info('Saving average network for key: {k} as {out}'.format(k=key, out=op.abspath(network_name))) + iflogger.info('Saving average network for key: %s as %s', key, + op.abspath(network_name)) # Writes the networks and returns the name network_name = group_id + '_average.pck' nx.write_gpickle(avg_ntwk, op.abspath(network_name)) - iflogger.info('Saving average network as {out}'.format(out=op.abspath(network_name))) + iflogger.info('Saving average network as %s', op.abspath(network_name)) avg_ntwk = fix_keys_for_gexf(avg_ntwk) network_name = group_id + '_average.gexf' nx.write_gexf(avg_ntwk, op.abspath(network_name)) - iflogger.info('Saving average network as {out}'.format(out=op.abspath(network_name))) + iflogger.info('Saving average network as %s', op.abspath(network_name)) return network_name, matlab_network_list @@ -453,12 +451,12 @@ def _run_interface(self, runtime): out_pickled_extra_measures = op.abspath(self._gen_outfilename(self.inputs.out_pickled_extra_measures, 'pck')) dict_measures = compute_dict_measures(ntwk) - iflogger.info('Saving extra measure file to {path} in Pickle format'.format(path=op.abspath(out_pickled_extra_measures))) - file = open(out_pickled_extra_measures, 'w') - pickle.dump(dict_measures, file) - file.close() + iflogger.info('Saving extra measure file to %s in Pickle format', + op.abspath(out_pickled_extra_measures)) + with open(out_pickled_extra_measures, 'w') as fo: + pickle.dump(dict_measures, fo) - iflogger.info('Saving MATLAB measures as {m}'.format(m=matlab)) + iflogger.info('Saving MATLAB measures as %s', matlab) # Loops through the measures which return a dictionary, # converts the keys and values to a Numpy array, diff --git a/nipype/interfaces/cmtk/parcellation.py b/nipype/interfaces/cmtk/parcellation.py index 7a2340cb4d..22214c0036 100644 --- a/nipype/interfaces/cmtk/parcellation.py +++ b/nipype/interfaces/cmtk/parcellation.py @@ -223,22 +223,22 @@ def create_roi(subject_id, subjects_dir, fs_dir, parcellation_name, dilation): hemi = 'rh' if brv['dn_region'] == 'subcortical': iflogger.info(brv) - iflogger.info("---------------------") - iflogger.info("Work on brain region: %s" % (brv['dn_region'])) - iflogger.info("Freesurfer Name: %s" % brv['dn_fsname']) - iflogger.info("Region %s of %s " % (count, pg.number_of_nodes())) - iflogger.info("---------------------") + iflogger.info('---------------------') + iflogger.info('Work on brain region: %s', brv['dn_region']) + iflogger.info('Freesurfer Name: %s', brv['dn_fsname']) + iflogger.info('Region %s of %s', count, pg.number_of_nodes()) + iflogger.info('---------------------') # if it is subcortical, retrieve roi from aseg idx = np.where(asegd == int(brv['dn_fs_aseg_val'])) rois[idx] = int(brv['dn_correspondence_id']) elif brv['dn_region'] == 'cortical': iflogger.info(brv) - iflogger.info("---------------------") - iflogger.info("Work on brain region: %s" % (brv['dn_region'])) - iflogger.info("Freesurfer Name: %s" % brv['dn_fsname']) - iflogger.info("Region %s of %s " % (count, pg.number_of_nodes())) - iflogger.info("---------------------") + iflogger.info('---------------------') + iflogger.info('Work on brain region: %s', brv['dn_region']) + iflogger.info('Freesurfer Name: %s', brv['dn_fsname']) + iflogger.info('Region %s of %s', count, pg.number_of_nodes()) + iflogger.info('---------------------') labelpath = op.join( output_dir, parval['fs_label_subdir_name'] % hemi) @@ -294,7 +294,7 @@ def create_roi(subject_id, subjects_dir, fs_dir, parcellation_name, dilation): # store volume eg in ROIv_scale33.nii.gz out_roi = op.abspath('ROIv_%s.nii.gz' % parcellation_name) - iflogger.info("Save output image to %s" % out_roi) + iflogger.info('Save output image to %s', out_roi) img = nb.Nifti1Image(rois, aseg.affine, hdr2) nb.save(img, out_roi) @@ -424,22 +424,23 @@ def create_wm_mask(subject_id, subjects_dir, fs_dir, parcellation_name): wmmask[idx] = 1 # check if we should subtract the cortical rois from this parcellation - iflogger.info("Loading %s to subtract cortical ROIs from white matter mask" % ('ROI_%s.nii.gz' % parcellation_name)) + iflogger.info('Loading ROI_%s.nii.gz to subtract cortical ROIs from white ' + 'matter mask', parcellation_name) roi = nb.load(op.join(op.curdir, 'ROI_%s.nii.gz' % parcellation_name)) roid = roi.get_data() assert roid.shape[0] == wmmask.shape[0] pg = nx.read_graphml(pgpath) for brk, brv in pg.nodes(data=True): if brv['dn_region'] == 'cortical': - iflogger.info("Subtracting region %s with intensity value %s" % - (brv['dn_region'], brv['dn_correspondence_id'])) + iflogger.info('Subtracting region %s with intensity value %s', + brv['dn_region'], brv['dn_correspondence_id']) idx = np.where(roid == int(brv['dn_correspondence_id'])) wmmask[idx] = 0 # output white matter mask. crop and move it afterwards wm_out = op.join(fs_dir, 'mri', 'fsmask_1mm.nii.gz') img = nb.Nifti1Image(wmmask, fsmask.affine, fsmask.header) - iflogger.info("Save white matter mask: %s" % wm_out) + iflogger.info('Save white matter mask: %s', wm_out) nb.save(img, wm_out) @@ -450,7 +451,7 @@ def crop_and_move_datasets(subject_id, subjects_dir, fs_dir, parcellation_name, log = cmp_config.get_logger() output_dir = op.abspath(op.curdir) - iflogger.info("Cropping and moving datasets to %s" % output_dir) + iflogger.info('Cropping and moving datasets to %s', output_dir) ds = [ (op.join(fs_dir, 'mri', 'aseg.nii.gz'), op.abspath('aseg.nii.gz')), @@ -469,7 +470,7 @@ def crop_and_move_datasets(subject_id, subjects_dir, fs_dir, parcellation_name, op.abspath('ROIv_HR_th.nii.gz'))) orig = op.join(fs_dir, 'mri', 'orig', '001.mgz') for d in ds: - iflogger.info("Processing %s:" % d[0]) + iflogger.info('Processing %s:', d[0]) if not op.exists(d[0]): raise Exception('File %s does not exist.' % d[0]) # reslice to original volume because the roi creation with freesurfer diff --git a/nipype/interfaces/elastix/base.py b/nipype/interfaces/elastix/base.py index afdb0a1ff4..746e571f3f 100644 --- a/nipype/interfaces/elastix/base.py +++ b/nipype/interfaces/elastix/base.py @@ -14,7 +14,7 @@ from ... import logging from ..base import CommandLineInputSpec, Directory, traits -logger = logging.getLogger('interface') +iflogger = logging.getLogger('interface') class ElastixBaseInputSpec(CommandLineInputSpec): diff --git a/nipype/interfaces/elastix/registration.py b/nipype/interfaces/elastix/registration.py index 77b868c76c..5038447465 100644 --- a/nipype/interfaces/elastix/registration.py +++ b/nipype/interfaces/elastix/registration.py @@ -18,7 +18,7 @@ from .base import ElastixBaseInputSpec from ..base import CommandLine, TraitedSpec, File, traits, InputMultiPath -logger = logging.getLogger('interface') +iflogger = logging.getLogger('interface') class RegistrationInputSpec(ElastixBaseInputSpec): diff --git a/nipype/interfaces/elastix/utils.py b/nipype/interfaces/elastix/utils.py index 42fab68377..718f5310fd 100644 --- a/nipype/interfaces/elastix/utils.py +++ b/nipype/interfaces/elastix/utils.py @@ -16,7 +16,7 @@ from ... import logging from ..base import (BaseInterface, BaseInterfaceInputSpec, isdefined, TraitedSpec, File, traits) -logger = logging.getLogger('interface') +iflogger = logging.getLogger('interface') class EditTransformInputSpec(BaseInterfaceInputSpec): diff --git a/nipype/interfaces/freesurfer/preprocess.py b/nipype/interfaces/freesurfer/preprocess.py index 6b408304d3..2f8b432bb3 100644 --- a/nipype/interfaces/freesurfer/preprocess.py +++ b/nipype/interfaces/freesurfer/preprocess.py @@ -1079,7 +1079,7 @@ def cmdline(self): return "echo recon-all: nothing to do" cmd += ' ' + ' '.join(flags) - iflogger.info('resume recon-all : %s' % cmd) + iflogger.info('resume recon-all : %s', cmd) return cmd def _prep_expert_file(self): diff --git a/nipype/interfaces/freesurfer/utils.py b/nipype/interfaces/freesurfer/utils.py index b5cd404b30..a5568ebbcb 100644 --- a/nipype/interfaces/freesurfer/utils.py +++ b/nipype/interfaces/freesurfer/utils.py @@ -233,8 +233,9 @@ def _format_arg(self, name, spec, value): "Cannot create {} file with extension " "{}".format(value, ext)) else: - logger.warn("Creating {} file with extension {}: " - "{}{}".format(value, ext, base, ext)) + logger.warn('Creating %s file with extension %s: %s%s', + value, ext, base, ext) + if value in implicit_filetypes: return "" return super(SampleToSurface, self)._format_arg(name, spec, value) @@ -423,8 +424,8 @@ def _format_arg(self, name, spec, value): "Cannot create {} file with extension " "{}".format(value, ext)) else: - logger.warn("Creating {} file with extension {}: " - "{}{}".format(value, ext, base, ext)) + logger.warn('Creating %s file with extension %s: %s%s', + value, ext, base, ext) if value in implicit_filetypes: return "" return super(SurfaceTransform, self)._format_arg(name, spec, value) diff --git a/nipype/interfaces/fsl/base.py b/nipype/interfaces/fsl/base.py index f5353f2b06..6d16817e09 100644 --- a/nipype/interfaces/fsl/base.py +++ b/nipype/interfaces/fsl/base.py @@ -36,7 +36,7 @@ from ..base import traits, isdefined, CommandLine, CommandLineInputSpec from ...external.due import BibTeX -LOGGER = logging.getLogger('interface') +IFLOGGER = logging.getLogger('interface') class Info(object): @@ -113,8 +113,8 @@ def output_type(cls): try: return os.environ['FSLOUTPUTTYPE'] except KeyError: - LOGGER.warn('FSLOUTPUTTYPE environment variable is not set. ' - 'Setting FSLOUTPUTTYPE=NIFTI') + IFLOGGER.warn('FSLOUTPUTTYPE environment variable is not set. ' + 'Setting FSLOUTPUTTYPE=NIFTI') return 'NIFTI' @staticmethod diff --git a/nipype/interfaces/io.py b/nipype/interfaces/io.py index f02f655cf1..0793b955bd 100644 --- a/nipype/interfaces/io.py +++ b/nipype/interfaces/io.py @@ -351,17 +351,17 @@ def _substitute(self, pathstr): oldpathstr = pathstr pathstr = pathstr.replace(key, val) if pathstr != oldpathstr: - iflogger.debug('sub.str: %s -> %s using %r -> %r' - % (oldpathstr, pathstr, key, val)) + iflogger.debug('sub.str: %s -> %s using %r -> %r', + oldpathstr, pathstr, key, val) if isdefined(self.inputs.regexp_substitutions): for key, val in self.inputs.regexp_substitutions: oldpathstr = pathstr pathstr, _ = re.subn(key, val, pathstr) if pathstr != oldpathstr: - iflogger.debug('sub.regexp: %s -> %s using %r -> %r' - % (oldpathstr, pathstr, key, val)) + iflogger.debug('sub.regexp: %s -> %s using %r -> %r', + oldpathstr, pathstr, key, val) if pathstr_ != pathstr: - iflogger.info('sub: %s -> %s' % (pathstr_, pathstr)) + iflogger.info('sub: %s -> %s', pathstr_, pathstr) return pathstr # Check for s3 in base directory @@ -514,8 +514,8 @@ def _fetch_bucket(self, bucket_name): # Try and get AWS credentials if a creds_path is specified if aws_access_key_id and aws_secret_access_key: # Init connection - iflogger.info('Connecting to S3 bucket: %s with credentials...'\ - % bucket_name) + iflogger.info('Connecting to S3 bucket: %s with credentials...', + bucket_name) # Use individual session for each instance of DataSink # Better when datasinks are being used in multi-threading, see: # http://boto3.readthedocs.org/en/latest/guide/resources.html#multithreading @@ -525,8 +525,7 @@ def _fetch_bucket(self, bucket_name): # Otherwise, connect anonymously else: - iflogger.info('Connecting to AWS: %s anonymously...'\ - % bucket_name) + iflogger.info('Connecting to AWS: %s anonymously...', bucket_name) session = boto3.session.Session() s3_resource = session.resource('s3', use_ssl=True) s3_resource.meta.client.meta.events.register('choose-signer.s3.*', @@ -611,7 +610,7 @@ def _upload_to_s3(self, bucket, src, dst): src_md5 = hashlib.md5(src_read).hexdigest() # Move to next loop iteration if dst_md5 == src_md5: - iflogger.info('File %s already exists on S3, skipping...' % dst_f) + iflogger.info('File %s already exists on S3, skipping...', dst_f) continue else: iflogger.info('Overwriting previous S3 file...') @@ -620,8 +619,8 @@ def _upload_to_s3(self, bucket, src, dst): iflogger.info('New file to S3') # Copy file up to S3 (either encrypted or not) - iflogger.info('Uploading %s to S3 bucket, %s, as %s...'\ - % (src_f, bucket.name, dst_f)) + iflogger.info('Uploading %s to S3 bucket, %s, as %s...', src_f, + bucket.name, dst_f) if self.inputs.encrypt_bucket_keys: extra_args = {'ServerSideEncryption' : 'AES256'} else: @@ -671,7 +670,7 @@ def _list_outputs(self): outdir = local_out_exception # Log local copying directory iflogger.info('Access to S3 failed! Storing outputs locally at: '\ - '%s\nError: %s' %(outdir, exc)) + '%s\nError: %s', outdir, exc) else: s3dir = '' @@ -697,7 +696,7 @@ def _list_outputs(self): for key, files in list(self.inputs._outputs.items()): if not isdefined(files): continue - iflogger.debug("key: %s files: %s" % (key, str(files))) + iflogger.debug("key: %s files: %s", key, str(files)) files = filename_to_list(files) tempoutdir = outdir if s3_flag: @@ -745,16 +744,16 @@ def _list_outputs(self): raise(inst) # If src is a file, copy it to dst if os.path.isfile(src): - iflogger.debug('copyfile: %s %s' % (src, dst)) + iflogger.debug('copyfile: %s %s', src, dst) copyfile(src, dst, copy=True, hashmethod='content', use_hardlink=use_hardlink) out_files.append(dst) # If src is a directory, copy entire contents to dst dir elif os.path.isdir(src): if os.path.exists(dst) and self.inputs.remove_dest_dir: - iflogger.debug('removing: %s' % dst) + iflogger.debug('removing: %s', dst) shutil.rmtree(dst) - iflogger.debug('copydir: %s %s' % (src, dst)) + iflogger.debug('copydir: %s %s', src, dst) copytree(src, dst) out_files.append(dst) @@ -2430,7 +2429,7 @@ def _list_outputs(self): try: sftp.get(os.path.join(filledtemplate_dir, f), f) except IOError: - iflogger.info('remote file %s not found' % f) + iflogger.info('remote file %s not found', f) if any([val is None for val in outputs[key]]): outputs[key] = [] if len(outputs[key]) == 0: diff --git a/nipype/interfaces/mrtrix/convert.py b/nipype/interfaces/mrtrix/convert.py index 00e87ec0dd..eb34de974e 100644 --- a/nipype/interfaces/mrtrix/convert.py +++ b/nipype/interfaces/mrtrix/convert.py @@ -68,7 +68,7 @@ def read_mrtrix_header(in_file): key = line.split(': ')[0] value = line.split(': ')[1] header[key] = value - iflogger.info('...adding "{v}" to header for key "{k}"'.format(v=value, k=key)) + iflogger.info('...adding "%s" to header for key "%s"', value, key) fileobj.close() header['count'] = int(header['count'].replace('\n', '')) header['offset'] = int(header['file'].replace('.', '')) @@ -118,8 +118,8 @@ def track_gen(track_points): raise HeaderError( 'Expecting %s points, found only %s' % ( stream_count, n_streams)) - iflogger.error('Expecting %s points, found only %s' % ( - stream_count, n_streams)) + iflogger.error('Expecting %s points, found only %s', + stream_count, n_streams) break pts = np.ndarray( shape=(n_pts, pt_cols), @@ -136,16 +136,15 @@ def track_gen(track_points): yield xyz n_streams += 1 if n_streams == stream_count: - iflogger.info('100% : {n} tracks read'.format(n=n_streams)) + iflogger.info('100%% : %i tracks read', n_streams) raise StopIteration try: if n_streams % int(stream_count / 100) == 0: percent = int(float(n_streams) / float(stream_count) * 100) - iflogger.info('{p}% : {n} tracks read'.format(p=percent, - n=n_streams)) + iflogger.info('%i%% : %i tracks read', percent, n_streams) except ZeroDivisionError: - iflogger.info('{} stream read out of {}'.format(n_streams, - stream_count)) + iflogger.info('%i stream read out of %i', n_streams, + stream_count) track_points, nonfinite_list = points_per_track(offset) fileobj.seek(offset) streamlines = track_gen(track_points) @@ -200,14 +199,16 @@ def _run_interface(self, runtime): trk_header['n_count'] = header['count'] if isdefined(self.inputs.matrix_file) and isdefined(self.inputs.registration_image_file): - iflogger.info('Applying transformation from matrix file {m}'.format(m=self.inputs.matrix_file)) + iflogger.info('Applying transformation from matrix file %s', + self.inputs.matrix_file) xfm = np.genfromtxt(self.inputs.matrix_file) iflogger.info(xfm) registration_image_file = nb.load(self.inputs.registration_image_file) reg_affine = registration_image_file.affine r_dx, r_dy, r_dz = get_data_dims(self.inputs.registration_image_file) r_vx, r_vy, r_vz = get_vox_dims(self.inputs.registration_image_file) - iflogger.info('Using affine from registration image file {r}'.format(r=self.inputs.registration_image_file)) + iflogger.info('Using affine from registration image file %s', + self.inputs.registration_image_file) iflogger.info(reg_affine) trk_header['vox_to_ras'] = reg_affine trk_header['dim'] = [r_dx, r_dy, r_dz] @@ -225,18 +226,19 @@ def _run_interface(self, runtime): final_streamlines = move_streamlines(transformed_streamlines, aff) trk_tracks = ((ii, None, None) for ii in final_streamlines) trk.write(out_filename, trk_tracks, trk_header) - iflogger.info('Saving transformed Trackvis file as {out}'.format(out=out_filename)) + iflogger.info('Saving transformed Trackvis file as %s', out_filename) iflogger.info('New TrackVis Header:') iflogger.info(trk_header) else: - iflogger.info('Applying transformation from scanner coordinates to {img}'.format(img=self.inputs.image_file)) + iflogger.info('Applying transformation from scanner coordinates to %s', + self.inputs.image_file) axcode = aff2axcodes(affine) trk_header['voxel_order'] = axcode[0] + axcode[1] + axcode[2] trk_header['vox_to_ras'] = affine transformed_streamlines = transform_to_affine(streamlines, trk_header, affine) trk_tracks = ((ii, None, None) for ii in transformed_streamlines) trk.write(out_filename, trk_tracks, trk_header) - iflogger.info('Saving Trackvis file as {out}'.format(out=out_filename)) + iflogger.info('Saving Trackvis file as %s', out_filename) iflogger.info('TrackVis Header:') iflogger.info(trk_header) return runtime diff --git a/nipype/interfaces/mrtrix3/base.py b/nipype/interfaces/mrtrix3/base.py index ab982b816a..a9890d9653 100644 --- a/nipype/interfaces/mrtrix3/base.py +++ b/nipype/interfaces/mrtrix3/base.py @@ -16,7 +16,7 @@ from ... import logging from ..traits_extension import isdefined from ..base import (CommandLineInputSpec, CommandLine, traits, File) -logger = logging.getLogger('interface') +iflogger = logging.getLogger('interface') class MRTrix3BaseInputSpec(CommandLineInputSpec): @@ -52,7 +52,7 @@ def _format_arg(self, name, trait_spec, value): from multiprocessing import cpu_count value = cpu_count() except: - logger.warn('Number of threads could not be computed') + iflogger.warn('Number of threads could not be computed') pass return trait_spec.argstr % value diff --git a/nipype/interfaces/nilearn.py b/nipype/interfaces/nilearn.py index e7984c654a..db47b57e8b 100644 --- a/nipype/interfaces/nilearn.py +++ b/nipype/interfaces/nilearn.py @@ -21,7 +21,7 @@ from .. import logging from ..interfaces.base import (traits, TraitedSpec, BaseInterface, BaseInterfaceInputSpec, File, InputMultiPath) -IFLOG = logging.getLogger('interface') +IFLOGGER = logging.getLogger('interface') class SignalExtractionInputSpec(BaseInterfaceInputSpec): in_file = File(exists=True, mandatory=True, desc='4-D fMRI nii file') diff --git a/nipype/interfaces/spm/model.py b/nipype/interfaces/spm/model.py index ddf35ef449..8ddc06a9b0 100644 --- a/nipype/interfaces/spm/model.py +++ b/nipype/interfaces/spm/model.py @@ -32,7 +32,7 @@ scans_for_fnames, ImageFileSPM) __docformat__ = 'restructuredtext' -logger = logging.getLogger('interface') +iflogger = logging.getLogger('interface') class Level1DesignInputSpec(SPMCommandInputSpec): From 01de3a406c255ad077cd9d7edfc9cf0f41a9e541 Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Sat, 11 Nov 2017 22:29:26 -0500 Subject: [PATCH 472/643] Fix logging in dipy interface. --- nipype/interfaces/dipy/anisotropic_power.py | 2 +- nipype/interfaces/dipy/preprocess.py | 6 +++--- nipype/interfaces/dipy/reconstruction.py | 22 ++++++++++----------- nipype/interfaces/dipy/simulate.py | 6 +++--- nipype/interfaces/dipy/tensors.py | 6 +++--- nipype/interfaces/dipy/tracks.py | 20 +++++++++---------- nipype/interfaces/utility/wrappers.py | 2 +- 7 files changed, 30 insertions(+), 34 deletions(-) diff --git a/nipype/interfaces/dipy/anisotropic_power.py b/nipype/interfaces/dipy/anisotropic_power.py index f1d41ab118..2a678dfd1f 100644 --- a/nipype/interfaces/dipy/anisotropic_power.py +++ b/nipype/interfaces/dipy/anisotropic_power.py @@ -67,7 +67,7 @@ def _run_interface(self, runtime): apm = shm.anisotropic_power(peaks.shm_coeff) out_file = self._gen_filename('apm') nb.Nifti1Image(apm.astype("float32"), affine).to_filename(out_file) - IFLOGGER.info('APM qball image saved as {i}'.format(i=out_file)) + IFLOGGER.info('APM qball image saved as %s', out_file) return runtime diff --git a/nipype/interfaces/dipy/preprocess.py b/nipype/interfaces/dipy/preprocess.py index 19b76b800b..bfe197cae2 100644 --- a/nipype/interfaces/dipy/preprocess.py +++ b/nipype/interfaces/dipy/preprocess.py @@ -68,7 +68,7 @@ def _run_interface(self, runtime): resample_proxy(self.inputs.in_file, order=order, new_zooms=vox_size, out_file=out_file) - IFLOGGER.info('Resliced image saved as {i}'.format(i=out_file)) + IFLOGGER.info('Resliced image saved as %s', out_file) return runtime def _list_outputs(self): @@ -159,8 +159,8 @@ def _run_interface(self, runtime): smask=signal_mask, nmask=noise_mask, out_file=out_file) - IFLOGGER.info(('Denoised image saved as {i}, estimated ' - 'SNR={s}').format(i=out_file, s=str(s))) + IFLOGGER.info('Denoised image saved as %s, estimated SNR=%s', + out_file, str(s)) return runtime def _list_outputs(self): diff --git a/nipype/interfaces/dipy/reconstruction.py b/nipype/interfaces/dipy/reconstruction.py index ee3fffce9a..d10e51dede 100644 --- a/nipype/interfaces/dipy/reconstruction.py +++ b/nipype/interfaces/dipy/reconstruction.py @@ -123,13 +123,12 @@ def _run_interface(self, runtime): sigma = mean_std * (1 + bias) if sigma == 0: - IFLOGGER.warn( - ('Noise std is 0.0, looks like data was masked and noise' - ' cannot be estimated correctly. Using default tensor ' - 'model instead of RESTORE.')) + IFLOGGER.warn('Noise std is 0.0, looks like data was masked and noise ' + 'cannot be estimated correctly. Using default tensor ' + 'model instead of RESTORE.') dti = TensorModel(gtab) else: - IFLOGGER.info(('Performing RESTORE with noise std=%.4f.') % sigma) + IFLOGGER.info('Performing RESTORE with noise std=%.4f.', sigma) dti = TensorModel(gtab, fit_method='RESTORE', sigma=sigma) try: @@ -252,14 +251,13 @@ def _run_interface(self, runtime): ratio = abs(response[1] / response[0]) if ratio > 0.25: - IFLOGGER.warn(('Estimated response is not prolate enough. ' - 'Ratio=%0.3f.') % ratio) + IFLOGGER.warn('Estimated response is not prolate enough. ' + 'Ratio=%0.3f.', ratio) elif ratio < 1.e-5 or np.any(np.isnan(response)): response = np.array([1.8e-3, 3.6e-4, 3.6e-4, S0]) - IFLOGGER.warn( - ('Estimated response is not valid, using a default one')) + IFLOGGER.warn('Estimated response is not valid, using a default one') else: - IFLOGGER.info(('Estimated response: %s') % str(response[:3])) + IFLOGGER.info('Estimated response: %s', str(response[:3])) np.savetxt(op.abspath(self.inputs.response), response) @@ -343,8 +341,8 @@ def _run_interface(self, runtime): ratio = response[0][1] / response[0][0] if abs(ratio - 0.2) > 0.1: - IFLOGGER.warn(('Estimated response is not prolate enough. ' - 'Ratio=%0.3f.') % ratio) + IFLOGGER.warn('Estimated response is not prolate enough. ' + 'Ratio=%0.3f.', ratio) csd_model = ConstrainedSphericalDeconvModel( gtab, response, sh_order=self.inputs.sh_order) diff --git a/nipype/interfaces/dipy/simulate.py b/nipype/interfaces/dipy/simulate.py index 0331171811..f008948c97 100644 --- a/nipype/interfaces/dipy/simulate.py +++ b/nipype/interfaces/dipy/simulate.py @@ -10,6 +10,7 @@ import os.path as op from builtins import range +import numpy as np import nibabel as nb from ... import logging @@ -227,8 +228,8 @@ def _run_interface(self, runtime): pool = Pool(processes=n_proc) # Simulate sticks using dipy - IFLOGGER.info(('Starting simulation of %d voxels, %d diffusion' - ' directions.') % (len(args), ndirs)) + IFLOGGER.info('Starting simulation of %d voxels, %d diffusion directions.', + len(args), ndirs) result = np.array(pool.map(_compute_voxel, args)) if np.shape(result)[1] != ndirs: raise RuntimeError(('Computed directions do not match number' @@ -288,7 +289,6 @@ def _compute_voxel(args): angles=args['sticks'], fractions=ffs, snr=snr) except Exception as e: pass - # IFLOGGER.warn('Exception simulating dwi signal: %s' % e) return signal.tolist() diff --git a/nipype/interfaces/dipy/tensors.py b/nipype/interfaces/dipy/tensors.py index 7d9ab3867f..e5518f4ea0 100644 --- a/nipype/interfaces/dipy/tensors.py +++ b/nipype/interfaces/dipy/tensors.py @@ -65,14 +65,14 @@ def _run_interface(self, runtime): img = nifti1_symmat(lower_triangular, affine) out_file = self._gen_filename('dti') nb.save(img, out_file) - IFLOGGER.info('DTI parameters image saved as {i}'.format(i=out_file)) + IFLOGGER.info('DTI parameters image saved as %s', out_file) #FA MD RD and AD for metric in ["fa", "md", "rd", "ad"]: data = getattr(ten_fit,metric).astype("float32") out_name = self._gen_filename(metric) nb.Nifti1Image(data, affine).to_filename(out_name) - IFLOGGER.info('DTI {metric} image saved as {i}'.format(i=out_name, metric=metric)) + IFLOGGER.info('DTI %s image saved as %s', metric, out_name) return runtime @@ -147,7 +147,7 @@ def _run_interface(self, runtime): img = nb.Nifti1Image(mode_data, affine) out_file = self._gen_filename('mode') nb.save(img, out_file) - IFLOGGER.info('Tensor mode image saved as {i}'.format(i=out_file)) + IFLOGGER.info('Tensor mode image saved as %s', out_file) return runtime def _list_outputs(self): diff --git a/nipype/interfaces/dipy/tracks.py b/nipype/interfaces/dipy/tracks.py index 4a74b36b53..bd52fe937e 100644 --- a/nipype/interfaces/dipy/tracks.py +++ b/nipype/interfaces/dipy/tracks.py @@ -71,9 +71,8 @@ def _run_interface(self, runtime): data_dims = refnii.shape[:3] kwargs = dict(affine=affine) else: - IFLOGGER.warn( - 'voxel_dims and data_dims are deprecated as of dipy 0.7.1. Please use reference ' - 'input instead') + IFLOGGER.warn('voxel_dims and data_dims are deprecated as of dipy ' + '0.7.1. Please use reference input instead') if not isdefined(self.inputs.data_dims): data_dims = header['dim'] @@ -93,9 +92,8 @@ def _run_interface(self, runtime): out_file = op.abspath(self.inputs.out_filename) nb.save(img, out_file) - IFLOGGER.info( - 'Track density map saved as %s, size=%s, dimensions=%s', - out_file, img.shape, img.header.get_zooms()) + IFLOGGER.info('Track density map saved as %s, size=%s, dimensions=%s', + out_file, img.shape, img.header.get_zooms()) return runtime @@ -238,12 +236,12 @@ def _run_interface(self, runtime): seedps = np.array(np.where(seedmsk == 1), dtype=np.float32).T vseeds = seedps.shape[0] nsperv = (seeds // vseeds) + 1 - IFLOGGER.info(('Seed mask is provided (%d voxels inside ' - 'mask), computing seeds (%d seeds/voxel).') % - (vseeds, nsperv)) + IFLOGGER.info('Seed mask is provided (%d voxels inside ' + 'mask), computing seeds (%d seeds/voxel).', + vseeds, nsperv) if nsperv > 1: - IFLOGGER.info(('Needed %d seeds per selected voxel ' - '(total %d).') % (nsperv, vseeds)) + IFLOGGER.info('Needed %d seeds per selected voxel (total %d).', + nsperv, vseeds) seedps = np.vstack(np.array([seedps] * nsperv)) voxcoord = seedps + np.random.uniform(-1, 1, size=seedps.shape) nseeds = voxcoord.shape[0] diff --git a/nipype/interfaces/utility/wrappers.py b/nipype/interfaces/utility/wrappers.py index 4684acba42..9999c4af6a 100644 --- a/nipype/interfaces/utility/wrappers.py +++ b/nipype/interfaces/utility/wrappers.py @@ -21,7 +21,7 @@ from ...utils.filemanip import filename_to_list from ...utils.functions import getsource, create_function_from_source -logger = logging.getLogger('interface') +iflogger = logging.getLogger('interface') class FunctionInputSpec(DynamicTraitedSpec, BaseInterfaceInputSpec): function_str = traits.Str(mandatory=True, desc='code for function') From 05bf324c5ffc84f817c9ff0260287b9943598c3f Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Sat, 11 Nov 2017 22:44:27 -0500 Subject: [PATCH 473/643] Fix logging in utils and algorithms. --- nipype/algorithms/confounds.py | 13 ++++++----- nipype/algorithms/misc.py | 42 +++++++++++++++------------------- nipype/algorithms/modelgen.py | 14 ++++++------ nipype/utils/filemanip.py | 14 ++++++------ 4 files changed, 39 insertions(+), 44 deletions(-) diff --git a/nipype/algorithms/confounds.py b/nipype/algorithms/confounds.py index 1d31f2ab6c..39cafebe8c 100644 --- a/nipype/algorithms/confounds.py +++ b/nipype/algorithms/confounds.py @@ -30,7 +30,7 @@ from ..utils import NUMPY_MMAP from ..utils.misc import normalize_mc_params -IFLOG = logging.getLogger('interface') +IFLOGGER = logging.getLogger('interface') class ComputeDVARSInputSpec(BaseInterfaceInputSpec): @@ -286,7 +286,7 @@ def _run_interface(self, runtime): tr = self.inputs.series_tr if self.inputs.normalize and tr is None: - IFLOG.warn('FD plot cannot be normalized if TR is not set') + IFLOGGER.warn('FD plot cannot be normalized if TR is not set') self._results['out_figure'] = op.abspath(self.inputs.out_figure) fig = plot_confound(fd_res, self.inputs.figsize, 'FD', units='mm', @@ -601,8 +601,8 @@ def _process_masks(self, mask_images, timeseries=None): # save mask mask_file = os.path.abspath('mask_{:03d}.nii.gz'.format(i)) out_image.to_filename(mask_file) - IFLOG.debug('tCompcor computed and saved mask of shape {} to ' - 'mask_file {}'.format(mask.shape, mask_file)) + IFLOGGER.debug('tCompcor computed and saved mask of shape %s to ' + 'mask_file %s', str(mask.shape), mask_file) self._mask_files.append(mask_file) out_images.append(out_image) return out_images @@ -919,7 +919,8 @@ def regress_poly(degree, data, remove_mean=True, axis=-1): :param int axis: numpy array axes along which regression is performed """ - IFLOG.debug('Performing polynomial regression on data of shape ' + str(data.shape)) + IFLOGGER.debug('Performing polynomial regression on data of shape %s', + str(data.shape)) datashape = data.shape timepoints = datashape[axis] @@ -1147,7 +1148,7 @@ def _full_rank(X, cmax=1e15): c = smax / smin if c < cmax: return X, c - IFLOG.warn('Matrix is singular at working precision, regularizing...') + IFLOGGER.warn('Matrix is singular at working precision, regularizing...') lda = (smax - cmax * smin) / (cmax - 1) s = s + lda X = np.dot(U, np.dot(np.diag(s), V)) diff --git a/nipype/algorithms/misc.py b/nipype/algorithms/misc.py index f1cd8179fa..a16507bf36 100644 --- a/nipype/algorithms/misc.py +++ b/nipype/algorithms/misc.py @@ -362,26 +362,23 @@ def _run_interface(self, runtime): if isinstance(in_dict[key][0], np.ndarray): saved_variables.append(key) else: - iflogger.info('One of the keys in the input file, {k}, is not a Numpy array'.format(k=key)) + iflogger.info('One of the keys in the input file, %s, is ' + 'not a Numpy array', key) if len(saved_variables) > 1: - iflogger.info( - '{N} variables found:'.format(N=len(saved_variables))) + iflogger.info('%i variables found:', len(saved_variables)) iflogger.info(saved_variables) for variable in saved_variables: - iflogger.info( - '...Converting {var} - type {ty} - to\ - CSV'.format(var=variable, ty=type(in_dict[variable])) - ) - matlab2csv( - in_dict[variable], variable, self.inputs.reshape_matrix) + iflogger.info('...Converting %s - type %s - to CSV', + variable, type(in_dict[variable])) + matlab2csv(in_dict[variable], variable, self.inputs.reshape_matrix) elif len(saved_variables) == 1: _, name, _ = split_filename(self.inputs.in_file) variable = saved_variables[0] - iflogger.info('Single variable found {var}, type {ty}:'.format( - var=variable, ty=type(in_dict[variable]))) - iflogger.info('...Converting {var} to CSV from {f}'.format( - var=variable, f=self.inputs.in_file)) + iflogger.info('Single variable found %s, type %s:', variable, + type(in_dict[variable])) + iflogger.info('...Converting %s to CSV from %s', variable, + self.inputs.in_file) matlab2csv(in_dict[variable], name, self.inputs.reshape_matrix) else: iflogger.error('No values in the MATLAB file?!') @@ -396,8 +393,8 @@ def _list_outputs(self): if isinstance(in_dict[key][0], np.ndarray): saved_variables.append(key) else: - iflogger.error('One of the keys in the input file, {k}, is\ - not a Numpy array'.format(k=key)) + iflogger.error('One of the keys in the input file, %s, is ' + 'not a Numpy array', key) if len(saved_variables) > 1: outputs['csv_files'] = replaceext(saved_variables, '.csv') @@ -555,19 +552,16 @@ def _run_interface(self, runtime): iflogger.info('Column headings have been provided:') headings = self.inputs.column_headings else: - iflogger.info( - 'Column headings not provided! Pulled from input filenames:') + iflogger.info('Column headings not provided! Pulled from input filenames:') headings = remove_identical_paths(self.inputs.in_files) if isdefined(self.inputs.extra_field): if isdefined(self.inputs.extra_column_heading): extraheading = self.inputs.extra_column_heading - iflogger.info('Extra column heading provided: {col}'.format( - col=extraheading)) + iflogger.info('Extra column heading provided: %s', extraheading) else: extraheading = 'type' - iflogger.info( - 'Extra column heading was not defined. Using "type"') + iflogger.info('Extra column heading was not defined. Using "type"') headings.append(extraheading) extraheadingBool = True @@ -575,8 +569,8 @@ def _run_interface(self, runtime): iflogger.warn('Only one file input!') if isdefined(self.inputs.row_headings): - iflogger.info('Row headings have been provided. Adding "labels"\ - column header.') + iflogger.info('Row headings have been provided. Adding "labels"' + 'column header.') prefix = '"{p}","'.format(p=self.inputs.row_heading_title) csv_headings = prefix + '","'.join(itertools.chain( headings)) + '"\n' @@ -1310,7 +1304,7 @@ def merge_rois(in_files, in_idxs, in_ref, # to avoid memory errors if op.splitext(in_ref)[1] == '.gz': try: - iflogger.info('uncompress %i' % in_ref) + iflogger.info('uncompress %i', in_ref) sp.check_call(['gunzip', in_ref], stdout=sp.PIPE, shell=True) in_ref = op.splitext(in_ref)[0] except: diff --git a/nipype/algorithms/modelgen.py b/nipype/algorithms/modelgen.py index 87367f7955..2c994bf20d 100644 --- a/nipype/algorithms/modelgen.py +++ b/nipype/algorithms/modelgen.py @@ -374,9 +374,9 @@ def _generate_standard_design(self, infolist, functional_runs=None, for f in filename_to_list(sessinfo[i]['scans']): shape = load(f, mmap=NUMPY_MMAP).shape if len(shape) == 3 or shape[3] == 1: - iflogger.warning(('You are using 3D instead of 4D ' - 'files. Are you sure this was ' - 'intended?')) + iflogger.warning('You are using 3D instead of 4D ' + 'files. Are you sure this was ' + 'intended?') numscans += 1 else: numscans += shape[3] @@ -686,7 +686,7 @@ def _gen_regress(self, i_onsets, i_durations, i_amplitudes, nscans): if dt < 1: raise Exception('Time multiple less than 1 ms') - iflogger.info('Setting dt = %d ms\n' % dt) + iflogger.info('Setting dt = %d ms\n', dt) npts = int(np.ceil(total_time / dt)) times = np.arange(0, total_time, dt) * 1e-3 timeline = np.zeros((npts)) @@ -705,9 +705,9 @@ def _gen_regress(self, i_onsets, i_durations, i_amplitudes, nscans): if isdefined(self.inputs.model_hrf) and self.inputs.model_hrf: response = np.convolve(boxcar, hrf) reg_scale = 1.0 / response.max() - iflogger.info('response sum: %.4f max: %.4f' % (response.sum(), - response.max())) - iflogger.info('reg_scale: %.4f' % reg_scale) + iflogger.info('response sum: %.4f max: %.4f', response.sum(), + response.max()) + iflogger.info('reg_scale: %.4f', reg_scale) for i, t in enumerate(onsets): idx = int(np.round(t / dt)) diff --git a/nipype/utils/filemanip.py b/nipype/utils/filemanip.py index be71424a5a..16eabbb69c 100644 --- a/nipype/utils/filemanip.py +++ b/nipype/utils/filemanip.py @@ -368,13 +368,13 @@ def copyfile(originalfile, newfile, copy=False, create_new=False, elif hashmethod == 'content': hashfn = hash_infile newhash = hashfn(newfile) - fmlogger.debug("File: %s already exists,%s, copy:%d" % - (newfile, newhash, copy)) + fmlogger.debug('File: %s already exists,%s, copy:%d', newfile, + newhash, copy) orighash = hashfn(originalfile) keep = newhash == orighash if keep: - fmlogger.debug("File: %s already exists, not overwriting, copy:%d" - % (newfile, copy)) + fmlogger.debug('File: %s already exists, not overwriting, copy:%d', + newfile, copy) else: os.unlink(newfile) @@ -385,7 +385,7 @@ def copyfile(originalfile, newfile, copy=False, create_new=False, # ~hardlink & ~symlink => copy if not keep and use_hardlink: try: - fmlogger.debug("Linking File: %s->%s" % (newfile, originalfile)) + fmlogger.debug('Linking File: %s->%s', newfile, originalfile) # Use realpath to avoid hardlinking symlinks os.link(os.path.realpath(originalfile), newfile) except OSError: @@ -395,7 +395,7 @@ def copyfile(originalfile, newfile, copy=False, create_new=False, if not keep and not copy and os.name == 'posix': try: - fmlogger.debug("Symlinking File: %s->%s" % (newfile, originalfile)) + fmlogger.debug('Symlinking File: %s->%s', newfile, originalfile) os.symlink(originalfile, newfile) except OSError: copy = True # Disable symlink for associated files @@ -404,7 +404,7 @@ def copyfile(originalfile, newfile, copy=False, create_new=False, if not keep: try: - fmlogger.debug("Copying File: %s->%s" % (newfile, originalfile)) + fmlogger.debug('Copying File: %s->%s', newfile, originalfile) shutil.copyfile(originalfile, newfile) except shutil.Error as e: fmlogger.warn(e.message) From a1d62ca9a3fa0c69da36e0129ddfa3ab009b3904 Mon Sep 17 00:00:00 2001 From: Dorota Jarecka Date: Sun, 12 Nov 2017 14:00:24 -0500 Subject: [PATCH 474/643] adding a simple example to test issue 2245 --- .../ants/tests/test_registration.py | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 nipype/interfaces/ants/tests/test_registration.py diff --git a/nipype/interfaces/ants/tests/test_registration.py b/nipype/interfaces/ants/tests/test_registration.py new file mode 100644 index 0000000000..3957e6da55 --- /dev/null +++ b/nipype/interfaces/ants/tests/test_registration.py @@ -0,0 +1,21 @@ +# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- +# vi: set ft=python sts=4 ts=4 sw=4 et: + +from nipype.interfaces.ants import registration +import os +import pytest + +def test_ants_mand(): + filepath = os.path.dirname( os.path.realpath( __file__ ) ) + datadir = os.path.realpath(os.path.join(filepath, '../../../testing/data')) + + ants = registration.ANTS() + ants.inputs.transformation_model= "SyN" + ants.inputs.moving_image = [os.path.join(datadir, 'resting.nii')] + ants.inputs.fixed_image = [os.path.join(datadir, 'T1.nii')] + ants.inputs.metric = [u'MI'] + + with pytest.raises(ValueError) as er: + ants.run() + assert "ANTS requires a value for input 'radius'" in str(er.value) + From edece6e1b4b45218cf7116106efb21eb3c5d229c Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Mon, 13 Nov 2017 10:14:44 -0500 Subject: [PATCH 475/643] ENH: Enable recon-all -FLAIR/-FLAIRpial --- nipype/interfaces/freesurfer/preprocess.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/nipype/interfaces/freesurfer/preprocess.py b/nipype/interfaces/freesurfer/preprocess.py index 2f8b432bb3..a516a21fec 100644 --- a/nipype/interfaces/freesurfer/preprocess.py +++ b/nipype/interfaces/freesurfer/preprocess.py @@ -628,10 +628,17 @@ class ReconAllInputSpec(CommandLineInputSpec): argstr="-hemi %s") T1_files = InputMultiPath(File(exists=True), argstr='-i %s...', desc='name of T1 file to process') - T2_file = File(exists=True, argstr="-T2 %s", min_ver='5.3.0', + T2_file = File(exists=True, argstr="-T2 %s", + min_ver='5.3.0', xor=['FLAIR_file'], desc='Convert T2 image to orig directory') - use_T2 = traits.Bool(argstr="-T2pial", min_ver='5.3.0', - desc='Use converted T2 to refine the cortical surface') + FLAIR_file = File(exists=True, argstr="-FLAIR %s", + min_ver='5.3.0', xor=['T2_file'], + desc='Convert FLAIR image to orig directory') + use_T2 = traits.Bool(argstr="-T2pial", min_ver='5.3.0', xor=['use_FLAIR'], + desc='Use T2 image to refine the pial surface') + use_FLAIR = traits.Bool(argstr="-FLAIRpial", + min_ver='5.3.0', xor=['use_T2'], + desc='Use FLAIR image to refine the pial surface') openmp = traits.Int(argstr="-openmp %d", desc="Number of processors to use in parallel") parallel = traits.Bool(argstr="-parallel", From 56e9613189e7557c713359b3ee493509567e5f7a Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Mon, 13 Nov 2017 10:15:18 -0500 Subject: [PATCH 476/643] make specs --- .../freesurfer/tests/test_auto_ReconAll.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/nipype/interfaces/freesurfer/tests/test_auto_ReconAll.py b/nipype/interfaces/freesurfer/tests/test_auto_ReconAll.py index d02b2b47df..ff4ab603eb 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_ReconAll.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_ReconAll.py @@ -4,10 +4,15 @@ def test_ReconAll_inputs(): - input_map = dict(T1_files=dict(argstr='-i %s...', + input_map = dict(FLAIR_file=dict(argstr='-FLAIR %s', + min_ver='5.3.0', + xor=['T2_file'], + ), + T1_files=dict(argstr='-i %s...', ), T2_file=dict(argstr='-T2 %s', min_ver='5.3.0', + xor=['FLAIR_file'], ), args=dict(argstr='%s', ), @@ -108,8 +113,13 @@ def test_ReconAll_inputs(): terminal_output=dict(deprecated='1.0.0', nohash=True, ), + use_FLAIR=dict(argstr='-FLAIRpial', + min_ver='5.3.0', + xor=['use_T2'], + ), use_T2=dict(argstr='-T2pial', min_ver='5.3.0', + xor=['use_FLAIR'], ), xopts=dict(argstr='-xopts-%s', ), From 77f5bd4cfe1137d749424d680c3b90e49f6869fe Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Mon, 13 Nov 2017 10:18:05 -0500 Subject: [PATCH 477/643] FIX: T2/FLAIR inputs not mutually exclusive --- nipype/interfaces/freesurfer/preprocess.py | 4 ++-- nipype/interfaces/freesurfer/tests/test_auto_ReconAll.py | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/nipype/interfaces/freesurfer/preprocess.py b/nipype/interfaces/freesurfer/preprocess.py index a516a21fec..1d209c3022 100644 --- a/nipype/interfaces/freesurfer/preprocess.py +++ b/nipype/interfaces/freesurfer/preprocess.py @@ -629,10 +629,10 @@ class ReconAllInputSpec(CommandLineInputSpec): T1_files = InputMultiPath(File(exists=True), argstr='-i %s...', desc='name of T1 file to process') T2_file = File(exists=True, argstr="-T2 %s", - min_ver='5.3.0', xor=['FLAIR_file'], + min_ver='5.3.0', desc='Convert T2 image to orig directory') FLAIR_file = File(exists=True, argstr="-FLAIR %s", - min_ver='5.3.0', xor=['T2_file'], + min_ver='5.3.0', desc='Convert FLAIR image to orig directory') use_T2 = traits.Bool(argstr="-T2pial", min_ver='5.3.0', xor=['use_FLAIR'], desc='Use T2 image to refine the pial surface') diff --git a/nipype/interfaces/freesurfer/tests/test_auto_ReconAll.py b/nipype/interfaces/freesurfer/tests/test_auto_ReconAll.py index ff4ab603eb..f823855333 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_ReconAll.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_ReconAll.py @@ -6,13 +6,11 @@ def test_ReconAll_inputs(): input_map = dict(FLAIR_file=dict(argstr='-FLAIR %s', min_ver='5.3.0', - xor=['T2_file'], ), T1_files=dict(argstr='-i %s...', ), T2_file=dict(argstr='-T2 %s', min_ver='5.3.0', - xor=['FLAIR_file'], ), args=dict(argstr='%s', ), From 637f0335e0e02d96f53fbad7f13f409892196ea9 Mon Sep 17 00:00:00 2001 From: jakubk Date: Mon, 13 Nov 2017 11:27:08 -0500 Subject: [PATCH 478/643] regenerate dockerfiles with base nipype/nipype:base --- Dockerfile | 8 ++++---- docker/Dockerfile.base | 4 ++-- docker/generate_dockerfiles.sh | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9ea5e11017..65ebfac9ca 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,9 +5,9 @@ # pull request on our GitHub repository: # https://github.com/kaczmarj/neurodocker # -# Timestamp: 2017-11-06 21:15:09 +# Timestamp: 2017-11-13 16:22:04 -FROM kaczmarj/nipype:base +FROM nipype/nipype:base ARG DEBIAN_FRONTEND=noninteractive @@ -132,7 +132,7 @@ RUN echo '{ \ \n "instructions": [ \ \n [ \ \n "base", \ - \n "kaczmarj/nipype:base" \ + \n "nipype/nipype:base" \ \n ], \ \n [ \ \n "label", \ @@ -228,6 +228,6 @@ RUN echo '{ \ \n } \ \n ] \ \n ], \ - \n "generation_timestamp": "2017-11-06 21:15:09", \ + \n "generation_timestamp": "2017-11-13 16:22:04", \ \n "neurodocker_version": "0.3.1-19-g8d02eb4" \ \n}' > /neurodocker/neurodocker_specs.json diff --git a/docker/Dockerfile.base b/docker/Dockerfile.base index 429930ca66..de82e111e8 100644 --- a/docker/Dockerfile.base +++ b/docker/Dockerfile.base @@ -5,7 +5,7 @@ # pull request on our GitHub repository: # https://github.com/kaczmarj/neurodocker # -# Timestamp: 2017-11-06 21:15:07 +# Timestamp: 2017-11-13 16:22:02 FROM neurodebian@sha256:7590552afd0e7a481a33314724ae27f76ccedd05ffd7ac06ec38638872427b9b @@ -210,6 +210,6 @@ RUN echo '{ \ \n "gem install fakes3" \ \n ] \ \n ], \ - \n "generation_timestamp": "2017-11-06 21:15:07", \ + \n "generation_timestamp": "2017-11-13 16:22:02", \ \n "neurodocker_version": "0.3.1-19-g8d02eb4" \ \n}' > /neurodocker/neurodocker_specs.json diff --git a/docker/generate_dockerfiles.sh b/docker/generate_dockerfiles.sh index 4478bca4a1..52eee8a1e6 100755 --- a/docker/generate_dockerfiles.sh +++ b/docker/generate_dockerfiles.sh @@ -59,7 +59,7 @@ NEURODOCKER_IMAGE="kaczmarj/neurodocker@sha256:6b5f92f413b9710b7581e62293a8f7443 # neurodebian:stretch-non-free pulled on November 3, 2017 BASE_IMAGE="neurodebian@sha256:7590552afd0e7a481a33314724ae27f76ccedd05ffd7ac06ec38638872427b9b" -NIPYPE_BASE_IMAGE="kaczmarj/nipype:base" +NIPYPE_BASE_IMAGE="nipype/nipype:base" PKG_MANAGER="apt" DIR="$(dirname "$0")" From a29400b66137d6842d4376ea874afcdf8a7b5fb6 Mon Sep 17 00:00:00 2001 From: jakubk Date: Mon, 13 Nov 2017 11:27:32 -0500 Subject: [PATCH 479/643] enh: optimize + use nipype/nipype dockerhub repo - use master branch for caching - replace kaczmarj/nipype with nipype/nipype - reset cache prefixes - use latest docker (v17.10.0-ce) containers and machine - use environment variable to determine whether to pull or build base image - save docker images to tar.gz if on master branch (deploying) - use fastest gzip compression (gives good ratio of speed/compression) --- .circleci/config.yml | 85 ++++++++++++++++++++++++-------------------- 1 file changed, 47 insertions(+), 38 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 22ba0bfbd4..2a7f11698e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,7 +3,7 @@ jobs: compare_base_dockerfiles: docker: - - image: docker:17.09.0-ce-git + - image: docker:17.10.0-ce-git steps: - checkout: path: /home/circleci/nipype @@ -15,32 +15,28 @@ jobs: # Use the sha256 sum of the pruned Dockerfile as the cache key. ash prune_dockerfile.sh Dockerfile.base > /tmp/docker/Dockerfile.base-pruned - restore_cache: - # TODO: change this to 'master' after we are sure this works. - key: dftest-v5-enh/circleci-neurodocker-{{ checksum "/tmp/docker/Dockerfile.base-pruned" }} + key: dockerfile-cache-v1-master-{{ checksum "/tmp/docker/Dockerfile.base-pruned" }} - run: name: Determine how to get base image command: | - GET_BASE="/tmp/docker/get_base_image.sh" - - # This directory comes from the cache. - if [ -d /cache/base-dockerfile ]; then - echo "echo Pulling base image ..." > "$GET_BASE" - echo "docker pull kaczmarj/nipype:base" >> "$GET_BASE" + if [ -f /tmp/docker/cache/Dockerfile.base-pruned ]; then + echo "Cache found. Will pull base image." + echo 'export GET_BASE=PULL' > /tmp/docker/get_base_image.sh else - echo "echo Building base image ..." > "$GET_BASE" - echo "docker build -t kaczmarj/nipype:base - < /home/circleci/nipype/docker/Dockerfile.base" >> "$GET_BASE" + echo "Cache not found. Will build base image." + echo 'export GET_BASE=BUILD' > /tmp/docker/get_base_image.sh fi - persist_to_workspace: root: /tmp paths: - - docker/* + - docker/get_base_image.sh build_and_test: parallelism: 4 machine: - # Ubuntu 14.04 with Docker 17.03.0-ce - image: circleci/classic:201703-01 + # Ubuntu 14.04 with Docker 17.10.0-ce + image: circleci/classic:201710-02 steps: - checkout: path: /home/circleci/nipype @@ -60,10 +56,19 @@ jobs: - run: name: Get base image (pull or build) no_output_timeout: 60m - # TODO: remove `docker pull` once once caching works. + working_directory: /home/circleci/nipype command: | - # bash /tmp/docker/get_base_image.sh - docker pull kaczmarj/nipype:base + source /tmp/docker/get_base_image.sh + if [ "$GET_BASE" == "PULL" ]; then + echo "Pulling base image ..." + docker pull nipype/nipype:base + elif [ "$GET_BASE" == "BUILD" ]; then + echo "Building base image ..." + docker build -t nipype/nipype:base - < docker/Dockerfile.base + else + echo "Error: method to get base image not understood" + exit 1 + fi - run: name: Build main image (py36) no_output_timeout: 60m @@ -72,8 +77,8 @@ jobs: e=1 && for i in {1..5}; do docker build \ --rm=false \ - --tag kaczmarj/nipype:latest \ - --tag kaczmarj/nipype:py36 \ + --tag nipype/nipype:latest \ + --tag nipype/nipype:py36 \ --build-arg BUILD_DATE="$(date -u +"%Y-%m-%dT%H:%M:%SZ")" \ --build-arg VCS_REF="$(git rev-parse --short HEAD)" \ --build-arg VERSION="${CIRCLE_TAG}" /home/circleci/nipype \ @@ -87,7 +92,7 @@ jobs: e=1 && for i in {1..5}; do docker build \ --rm=false \ - --tag kaczmarj/nipype:py27 \ + --tag nipype/nipype:py27 \ --build-arg PYTHON_VERSION_MAJOR=2 \ --build-arg PYTHON_VERSION_MINOR=7 \ --build-arg BUILD_DATE="$(date -u +"%Y-%m-%dT%H:%M:%SZ")" \ @@ -125,21 +130,26 @@ jobs: name: Save Docker images to workspace no_output_timeout: 60m command: | - if [ "$CIRCLE_NODE_INDEX" -eq "0" ]; then - docker save kaczmarj/nipype:base \ - kaczmarj/nipype:latest \ - kaczmarj/nipype:py36 \ - kaczmarj/nipype:py27 > /tmp/docker/nipype-base-latest-py36-py27.tar + if [ "$CIRCLE_NODE_INDEX" -eq "0" ] && [ "$CIRCLE_BRANCH" == "master" ]; then + docker save nipype/nipype:base \ + nipype/nipype:latest \ + nipype/nipype:py36 \ + nipype/nipype:py27 | gzip -1 > /tmp/docker/nipype-base-latest-py36-py27.tar.gz + du -h /tmp/docker/nipype-base-latest-py36-py27.tar.gz + else + # Workaround for `persist_to_workspace` to succeed when we are + # not deploying Docker images. + touch /tmp/docker/nipype-base-latest-py36-py27.tar.gz fi - persist_to_workspace: root: /tmp paths: - - docker/* + - docker/nipype-base-latest-py36-py27.tar.gz deploy: docker: - - image: docker:17.09.0-ce-git + - image: docker:17.10.0-ce-git steps: - checkout: path: /home/circleci/nipype @@ -150,27 +160,27 @@ jobs: name: Load saved Docker images. no_output_timeout: 60m command: | - docker load < /tmp/docker/nipype-base-latest-py36-py27.tar + docker load < /tmp/docker/nipype-base-latest-py36-py27.tar.gz - run: name: Push to DockerHub no_output_timeout: 120m command: | echo "$DOCKER_PASS" | docker login -u "$DOCKER_USER" --password-stdin - docker push kaczmarj/nipype:base - docker push kaczmarj/nipype:latest - docker push kaczmarj/nipype:py36 - docker push kaczmarj/nipype:py27 + docker push nipype/nipype:base + docker push nipype/nipype:latest + docker push nipype/nipype:py36 + docker push nipype/nipype:py27 - run: name: Prune base Dockerfile to update cache working_directory: /home/circleci/nipype/docker command: | - mkdir -p /tmp/docker + mkdir -p /tmp/docker/cache # Use the sha256 sum of the pruned Dockerfile as the cache key. - ash prune_dockerfile.sh Dockerfile.base > /tmp/docker/Dockerfile.base-pruned + ash prune_dockerfile.sh Dockerfile.base > /tmp/docker/cache/Dockerfile.base-pruned - save_cache: paths: - - /tmp/docker/Dockerfile.base-pruned - key: dftest-v5-{{ .Branch }}-{{ checksum "/tmp/docker/Dockerfile.base-pruned" }} + - /tmp/docker/cache/Dockerfile.base-pruned + key: dockerfile-cache-v1-{{ .Branch }}-{{ checksum "/tmp/docker/cache/Dockerfile.base-pruned" }} workflows: @@ -184,7 +194,6 @@ workflows: - deploy: filters: branches: - # TODO: change this to master after we are sure this works. - only: enh/circleci-neurodocker + only: master requires: - build_and_test From 399fe166a9565cd642a765bcc855e79e4122ca1b Mon Sep 17 00:00:00 2001 From: jakubk Date: Mon, 13 Nov 2017 11:33:05 -0500 Subject: [PATCH 480/643] use nipype/nipype repo instead of kaczmarj/nipype --- .circleci/tests.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.circleci/tests.sh b/.circleci/tests.sh index 0eaffcce93..f55a3249d7 100644 --- a/.circleci/tests.sh +++ b/.circleci/tests.sh @@ -13,8 +13,7 @@ if [ "${CIRCLE_NODE_TOTAL:-}" != "4" ]; then exit 1 fi -# TODO: change this image name -DOCKER_IMAGE="kaczmarj/nipype" +DOCKER_IMAGE="nipype/nipype" # These tests are manually balanced based on previous build timings. # They may need to be rebalanced in the future. From 38f8b6351eb6736bcf65012e376053e9e333b608 Mon Sep 17 00:00:00 2001 From: mathiasg Date: Mon, 13 Nov 2017 13:29:28 -0500 Subject: [PATCH 481/643] fix: testing for non-developer installation --- conftest.py => nipype/conftest.py | 2 +- pytest.ini => nipype/pytest.ini | 0 setup.py | 4 +++- 3 files changed, 4 insertions(+), 2 deletions(-) rename conftest.py => nipype/conftest.py (77%) rename pytest.ini => nipype/pytest.ini (100%) diff --git a/conftest.py b/nipype/conftest.py similarity index 77% rename from conftest.py rename to nipype/conftest.py index f2d52f5f85..27a3789ea4 100644 --- a/conftest.py +++ b/nipype/conftest.py @@ -8,5 +8,5 @@ def add_np(doctest_namespace): filepath = os.path.dirname(os.path.realpath(__file__)) - datadir = os.path.realpath(os.path.join(filepath, 'nipype/testing/data')) + datadir = os.path.realpath(os.path.join(filepath, 'testing/data')) doctest_namespace["datadir"] = datadir diff --git a/pytest.ini b/nipype/pytest.ini similarity index 100% rename from pytest.ini rename to nipype/pytest.ini diff --git a/setup.py b/setup.py index 331fa5905b..599c3ce60c 100755 --- a/setup.py +++ b/setup.py @@ -101,14 +101,16 @@ def main(): pjoin('testing', 'data', 'bedpostxout', '*'), pjoin('testing', 'data', 'tbss_dir', '*'), pjoin('testing', 'data', 'brukerdir', '*'), - pjoin('testing', 'data', 'brukerdir', 'pdata', '*'), pjoin('testing', 'data', 'brukerdir', 'pdata', '1', '*'), + pjoin('testing', 'data', 'ds005', '*') pjoin('workflows', 'data', '*'), pjoin('pipeline', 'engine', 'report_template.html'), pjoin('external', 'd3.js'), pjoin('interfaces', 'script_templates', '*'), pjoin('interfaces', 'tests', 'realign_json.json'), pjoin('interfaces', 'tests', 'use_resources'), + 'pytest.ini', + 'conftest.py', ] # Python 3: use a locals dictionary From 0f4a1900ff3ab1caf31da7a9f8a7f5977deafda7 Mon Sep 17 00:00:00 2001 From: mathiasg Date: Mon, 13 Nov 2017 13:37:27 -0500 Subject: [PATCH 482/643] fix: missing comma --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 599c3ce60c..8260a846ee 100755 --- a/setup.py +++ b/setup.py @@ -102,7 +102,7 @@ def main(): pjoin('testing', 'data', 'tbss_dir', '*'), pjoin('testing', 'data', 'brukerdir', '*'), pjoin('testing', 'data', 'brukerdir', 'pdata', '1', '*'), - pjoin('testing', 'data', 'ds005', '*') + pjoin('testing', 'data', 'ds005', '*'), pjoin('workflows', 'data', '*'), pjoin('pipeline', 'engine', 'report_template.html'), pjoin('external', 'd3.js'), From 4a6351bc028958db5ccde379e197fa0273ae7d3f Mon Sep 17 00:00:00 2001 From: Mathias Goncalves Date: Mon, 13 Nov 2017 15:13:05 -0500 Subject: [PATCH 483/643] fix: included testing data earlier setuptools did not like mixing directories and files --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 8260a846ee..8bca901a4a 100755 --- a/setup.py +++ b/setup.py @@ -100,7 +100,7 @@ def main(): pjoin('testing', 'data', 'dicomdir', '*'), pjoin('testing', 'data', 'bedpostxout', '*'), pjoin('testing', 'data', 'tbss_dir', '*'), - pjoin('testing', 'data', 'brukerdir', '*'), + pjoin('testing', 'data', 'brukerdir', 'fid'), pjoin('testing', 'data', 'brukerdir', 'pdata', '1', '*'), pjoin('testing', 'data', 'ds005', '*'), pjoin('workflows', 'data', '*'), From e50226e34260f3f7c61e8cb2b76e9b927fef8e1c Mon Sep 17 00:00:00 2001 From: Oscar Esteban Date: Mon, 13 Nov 2017 23:31:29 -0800 Subject: [PATCH 484/643] [FIX] Do not break when building profiling summary Throw a warning instead. --- nipype/pipeline/engine/utils.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/nipype/pipeline/engine/utils.py b/nipype/pipeline/engine/utils.py index 05c5345a12..feed93006c 100644 --- a/nipype/pipeline/engine/utils.py +++ b/nipype/pipeline/engine/utils.py @@ -1337,7 +1337,13 @@ def write_workflow_resources(graph, filename=None): rt_list = [rt_list] for subidx, runtime in enumerate(rt_list): - nsamples = len(runtime.prof_dict['time']) + try: + nsamples = len(runtime.prof_dict['time']) + except AttributeError: + logger.warning( + 'Could not retrieve profiling information for node "%s" ' + '(mapflow %d/%d).', nodename, subidx + 1, len(rt_list)) + continue for key in ['time', 'mem_gb', 'cpus']: big_dict[key] += runtime.prof_dict[key] From 28547ccf8d3d9ddd068ba3d57ee8bc217f61de54 Mon Sep 17 00:00:00 2001 From: jakubk Date: Tue, 14 Nov 2017 21:23:47 -0500 Subject: [PATCH 485/643] generate dockerfiles in ci + rm dockerfiles - do not store dockerfiles in repo - cache base dockerfile in deploy step that was generated in `compare_base_dockerfiles` step - use global `working_directory` --- .circleci/config.yml | 24 ++--- Dockerfile | 233 ----------------------------------------- docker/Dockerfile.base | 215 ------------------------------------- 3 files changed, 11 insertions(+), 461 deletions(-) delete mode 100644 Dockerfile delete mode 100644 docker/Dockerfile.base diff --git a/.circleci/config.yml b/.circleci/config.yml index 2a7f11698e..bd09e99e84 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -7,11 +7,14 @@ jobs: steps: - checkout: path: /home/circleci/nipype + - setup_remote_docker - run: - name: Prune base Dockerfile in preparation for cache check + name: Generate and prune base Dockerfile in preparation for cache check working_directory: /home/circleci/nipype/docker command: | mkdir -p /tmp/docker + ash ./generate_dockerfiles.sh -b + # Use the sha256 sum of the pruned Dockerfile as the cache key. ash prune_dockerfile.sh Dockerfile.base > /tmp/docker/Dockerfile.base-pruned - restore_cache: @@ -29,6 +32,7 @@ jobs: - persist_to_workspace: root: /tmp paths: + - docker/Dockerfile.base-pruned - docker/get_base_image.sh @@ -37,18 +41,19 @@ jobs: machine: # Ubuntu 14.04 with Docker 17.10.0-ce image: circleci/classic:201710-02 + working_directory: /home/circleci/nipype steps: - checkout: path: /home/circleci/nipype - attach_workspace: at: /tmp - run: - name: Get test dependencies + name: Get test dependencies and generate Dockerfiles command: | pip install --no-cache-dir codecov + make gen-dockerfiles - run: name: Modify Nipype version if necessary - working_directory: /home/circleci/nipype command: | if [ "$CIRCLE_TAG" != "" ]; then sed -i -E "s/(__version__ = )'[A-Za-z0-9.-]+'/\1'$CIRCLE_TAG'/" nipype/info.py @@ -56,7 +61,6 @@ jobs: - run: name: Get base image (pull or build) no_output_timeout: 60m - working_directory: /home/circleci/nipype command: | source /tmp/docker/get_base_image.sh if [ "$GET_BASE" == "PULL" ]; then @@ -72,7 +76,6 @@ jobs: - run: name: Build main image (py36) no_output_timeout: 60m - working_directory: /home/circleci/nipype command: | e=1 && for i in {1..5}; do docker build \ @@ -87,7 +90,6 @@ jobs: - run: name: Build main image (py27) no_output_timeout: 60m - working_directory: /home/circleci/nipype command: | e=1 && for i in {1..5}; do docker build \ @@ -151,8 +153,6 @@ jobs: docker: - image: docker:17.10.0-ce-git steps: - - checkout: - path: /home/circleci/nipype - setup_remote_docker - attach_workspace: at: /tmp @@ -171,12 +171,10 @@ jobs: docker push nipype/nipype:py36 docker push nipype/nipype:py27 - run: - name: Prune base Dockerfile to update cache - working_directory: /home/circleci/nipype/docker + name: Move pruned Dockerfile to /tmp/docker/cache directory command: | - mkdir -p /tmp/docker/cache - # Use the sha256 sum of the pruned Dockerfile as the cache key. - ash prune_dockerfile.sh Dockerfile.base > /tmp/docker/cache/Dockerfile.base-pruned + mkdir -p /tmp/docker/cache/ + mv /tmp/docker/Dockerfile.base-pruned /tmp/docker/cache/Dockerfile.base-pruned - save_cache: paths: - /tmp/docker/cache/Dockerfile.base-pruned diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 65ebfac9ca..0000000000 --- a/Dockerfile +++ /dev/null @@ -1,233 +0,0 @@ -# Generated by Neurodocker v0.3.1-19-g8d02eb4. -# -# Thank you for using Neurodocker. If you discover any issues -# or ways to improve this software, please submit an issue or -# pull request on our GitHub repository: -# https://github.com/kaczmarj/neurodocker -# -# Timestamp: 2017-11-13 16:22:04 - -FROM nipype/nipype:base - -ARG DEBIAN_FRONTEND=noninteractive - -#---------------------------------------------------------- -# Install common dependencies and create default entrypoint -#---------------------------------------------------------- -ENV LANG="en_US.UTF-8" \ - LC_ALL="C.UTF-8" \ - ND_ENTRYPOINT="/neurodocker/startup.sh" -RUN apt-get update -qq && apt-get install -yq --no-install-recommends \ - apt-utils bzip2 ca-certificates curl locales unzip \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \ - && localedef --force --inputfile=en_US --charmap=UTF-8 C.UTF-8 \ - && chmod 777 /opt && chmod a+s /opt \ - && mkdir -p /neurodocker \ - && if [ ! -f "$ND_ENTRYPOINT" ]; then \ - echo '#!/usr/bin/env bash' >> $ND_ENTRYPOINT \ - && echo 'set +x' >> $ND_ENTRYPOINT \ - && echo 'if [ -z "$*" ]; then /usr/bin/env bash; else $*; fi' >> $ND_ENTRYPOINT; \ - fi \ - && chmod -R 777 /neurodocker && chmod a+s /neurodocker -ENTRYPOINT ["/neurodocker/startup.sh"] - -LABEL maintainer="The nipype developers https://github.com/nipy/nipype" - -ENV MKL_NUM_THREADS="1" \ - OMP_NUM_THREADS="1" - -# Create new user: neuro -RUN useradd --no-user-group --create-home --shell /bin/bash neuro -USER neuro - -#------------------ -# Install Miniconda -#------------------ -ENV CONDA_DIR=/opt/conda \ - PATH=/opt/conda/bin:$PATH -RUN echo "Downloading Miniconda installer ..." \ - && miniconda_installer=/tmp/miniconda.sh \ - && curl -sSL -o $miniconda_installer https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh \ - && /bin/bash $miniconda_installer -b -p $CONDA_DIR \ - && rm -f $miniconda_installer \ - && conda config --system --prepend channels conda-forge \ - && conda config --system --set auto_update_conda false \ - && conda config --system --set show_channel_urls true \ - && conda clean -tipsy && sync - -#------------------------- -# Create conda environment -#------------------------- -RUN conda create -y -q --name neuro \ - && sync && conda clean -tipsy && sync \ - && sed -i '$isource activate neuro' $ND_ENTRYPOINT - -COPY ["docker/files/run_builddocs.sh", "docker/files/run_examples.sh", "docker/files/run_pytests.sh", "nipype/external/fsl_imglob.py", "/usr/bin/"] - -COPY [".", "/src/nipype"] - -USER root - -# User-defined instruction -RUN chown -R neuro /src \ - && chmod +x /usr/bin/fsl_imglob.py /usr/bin/run_*.sh \ - && . /etc/fsl/fsl.sh \ - && ln -sf /usr/bin/fsl_imglob.py ${FSLDIR}/bin/imglob \ - && mkdir /work \ - && chown neuro /work - -USER neuro - -ARG PYTHON_VERSION_MAJOR="3" -ARG PYTHON_VERSION_MINOR="6" -ARG BUILD_DATE -ARG VCS_REF -ARG VERSION - -#------------------------- -# Update conda environment -#------------------------- -RUN conda install -y -q --name neuro python=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} \ - icu=58.1 \ - libxml2 \ - libxslt \ - matplotlib \ - mkl \ - numpy \ - pandas \ - psutil \ - scikit-learn \ - scipy \ - traits=4.6.0 \ - && sync && conda clean -tipsy && sync \ - && /bin/bash -c "source activate neuro \ - && pip install -q --no-cache-dir -e /src/nipype[all]" \ - && sync - -# User-defined BASH instruction -RUN bash -c "mkdir -p /src/pybids \ - && curl -sSL --retry 5 https://github.com/INCF/pybids/tarball/master \ - | tar -xz -C /src/pybids --strip-components 1 \ - && source activate neuro \ - && pip install --no-cache-dir -e /src/pybids" - -WORKDIR /work - -LABEL org.label-schema.build-date="$BUILD_DATE" \ - org.label-schema.name="NIPYPE" \ - org.label-schema.description="NIPYPE - Neuroimaging in Python: Pipelines and Interfaces" \ - org.label-schema.url="http://nipype.readthedocs.io" \ - org.label-schema.vcs-ref="$VCS_REF" \ - org.label-schema.vcs-url="https://github.com/nipy/nipype" \ - org.label-schema.version="$VERSION" \ - org.label-schema.schema-version="1.0" - -#-------------------------------------- -# Save container specifications to JSON -#-------------------------------------- -RUN echo '{ \ - \n "pkg_manager": "apt", \ - \n "check_urls": false, \ - \n "instructions": [ \ - \n [ \ - \n "base", \ - \n "nipype/nipype:base" \ - \n ], \ - \n [ \ - \n "label", \ - \n { \ - \n "maintainer": "The nipype developers https://github.com/nipy/nipype" \ - \n } \ - \n ], \ - \n [ \ - \n "env", \ - \n { \ - \n "MKL_NUM_THREADS": "1", \ - \n "OMP_NUM_THREADS": "1" \ - \n } \ - \n ], \ - \n [ \ - \n "user", \ - \n "neuro" \ - \n ], \ - \n [ \ - \n "miniconda", \ - \n { \ - \n "env_name": "neuro", \ - \n "activate": "true" \ - \n } \ - \n ], \ - \n [ \ - \n "copy", \ - \n [ \ - \n "docker/files/run_builddocs.sh", \ - \n "docker/files/run_examples.sh", \ - \n "docker/files/run_pytests.sh", \ - \n "nipype/external/fsl_imglob.py", \ - \n "/usr/bin/" \ - \n ] \ - \n ], \ - \n [ \ - \n "copy", \ - \n [ \ - \n ".", \ - \n "/src/nipype" \ - \n ] \ - \n ], \ - \n [ \ - \n "user", \ - \n "root" \ - \n ], \ - \n [ \ - \n "run", \ - \n "chown -R neuro /src\\n&& chmod +x /usr/bin/fsl_imglob.py /usr/bin/run_*.sh\\n&& . /etc/fsl/fsl.sh\\n&& ln -sf /usr/bin/fsl_imglob.py ${FSLDIR}/bin/imglob\\n&& mkdir /work\\n&& chown neuro /work" \ - \n ], \ - \n [ \ - \n "user", \ - \n "neuro" \ - \n ], \ - \n [ \ - \n "arg", \ - \n { \ - \n "PYTHON_VERSION_MAJOR": "3", \ - \n "PYTHON_VERSION_MINOR": "6", \ - \n "BUILD_DATE": "", \ - \n "VCS_REF": "", \ - \n "VERSION": "" \ - \n } \ - \n ], \ - \n [ \ - \n "miniconda", \ - \n { \ - \n "env_name": "neuro", \ - \n "conda_install": "python=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} icu=58.1 libxml2 libxslt matplotlib mkl numpy pandas psutil scikit-learn scipy traits=4.6.0", \ - \n "pip_opts": "-e", \ - \n "pip_install": "/src/nipype[all]" \ - \n } \ - \n ], \ - \n [ \ - \n "run_bash", \ - \n "mkdir -p /src/pybids\\n && curl -sSL --retry 5 https://github.com/INCF/pybids/tarball/master\\n | tar -xz -C /src/pybids --strip-components 1\\n && source activate neuro\\n && pip install --no-cache-dir -e /src/pybids" \ - \n ], \ - \n [ \ - \n "workdir", \ - \n "/work" \ - \n ], \ - \n [ \ - \n "label", \ - \n { \ - \n "org.label-schema.build-date": "$BUILD_DATE", \ - \n "org.label-schema.name": "NIPYPE", \ - \n "org.label-schema.description": "NIPYPE - Neuroimaging in Python: Pipelines and Interfaces", \ - \n "org.label-schema.url": "http://nipype.readthedocs.io", \ - \n "org.label-schema.vcs-ref": "$VCS_REF", \ - \n "org.label-schema.vcs-url": "https://github.com/nipy/nipype", \ - \n "org.label-schema.version": "$VERSION", \ - \n "org.label-schema.schema-version": "1.0" \ - \n } \ - \n ] \ - \n ], \ - \n "generation_timestamp": "2017-11-13 16:22:04", \ - \n "neurodocker_version": "0.3.1-19-g8d02eb4" \ - \n}' > /neurodocker/neurodocker_specs.json diff --git a/docker/Dockerfile.base b/docker/Dockerfile.base deleted file mode 100644 index de82e111e8..0000000000 --- a/docker/Dockerfile.base +++ /dev/null @@ -1,215 +0,0 @@ -# Generated by Neurodocker v0.3.1-19-g8d02eb4. -# -# Thank you for using Neurodocker. If you discover any issues -# or ways to improve this software, please submit an issue or -# pull request on our GitHub repository: -# https://github.com/kaczmarj/neurodocker -# -# Timestamp: 2017-11-13 16:22:02 - -FROM neurodebian@sha256:7590552afd0e7a481a33314724ae27f76ccedd05ffd7ac06ec38638872427b9b - -ARG DEBIAN_FRONTEND=noninteractive - -#---------------------------------------------------------- -# Install common dependencies and create default entrypoint -#---------------------------------------------------------- -ENV LANG="en_US.UTF-8" \ - LC_ALL="C.UTF-8" \ - ND_ENTRYPOINT="/neurodocker/startup.sh" -RUN apt-get update -qq && apt-get install -yq --no-install-recommends \ - apt-utils bzip2 ca-certificates curl locales unzip \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \ - && localedef --force --inputfile=en_US --charmap=UTF-8 C.UTF-8 \ - && chmod 777 /opt && chmod a+s /opt \ - && mkdir -p /neurodocker \ - && if [ ! -f "$ND_ENTRYPOINT" ]; then \ - echo '#!/usr/bin/env bash' >> $ND_ENTRYPOINT \ - && echo 'set +x' >> $ND_ENTRYPOINT \ - && echo 'if [ -z "$*" ]; then /usr/bin/env bash; else $*; fi' >> $ND_ENTRYPOINT; \ - fi \ - && chmod -R 777 /neurodocker && chmod a+s /neurodocker -ENTRYPOINT ["/neurodocker/startup.sh"] - -LABEL maintainer="The nipype developers https://github.com/nipy/nipype" - -#---------------------- -# Install MCR and SPM12 -#---------------------- -# Install MATLAB Compiler Runtime -RUN apt-get update -qq && apt-get install -yq --no-install-recommends libxext6 libxt6 \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \ - && echo "Downloading MATLAB Compiler Runtime ..." \ - && curl -sSL -o /tmp/mcr.zip https://www.mathworks.com/supportfiles/downloads/R2017a/deployment_files/R2017a/installers/glnxa64/MCR_R2017a_glnxa64_installer.zip \ - && unzip -q /tmp/mcr.zip -d /tmp/mcrtmp \ - && /tmp/mcrtmp/install -destinationFolder /opt/mcr -mode silent -agreeToLicense yes \ - && rm -rf /tmp/* - -# Install standalone SPM -RUN echo "Downloading standalone SPM ..." \ - && curl -sSL -o spm.zip http://www.fil.ion.ucl.ac.uk/spm/download/restricted/utopia/dev/spm12_latest_Linux_R2017a.zip \ - && unzip -q spm.zip -d /opt \ - && chmod -R 777 /opt/spm* \ - && rm -rf spm.zip \ - && /opt/spm12/run_spm12.sh /opt/mcr/v92/ quit \ - && sed -i '$iexport SPMMCRCMD=\"/opt/spm12/run_spm12.sh /opt/mcr/v92/ script\"' $ND_ENTRYPOINT -ENV MATLABCMD=/opt/mcr/v92/toolbox/matlab \ - FORCE_SPMMCR=1 \ - LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:/opt/mcr/v92/runtime/glnxa64:/opt/mcr/v92/bin/glnxa64:/opt/mcr/v92/sys/os/glnxa64:$LD_LIBRARY_PATH - -#-------------------- -# Install AFNI latest -#-------------------- -ENV PATH=/opt/afni:$PATH -RUN apt-get update -qq && apt-get install -yq --no-install-recommends ed gsl-bin libglu1-mesa-dev libglib2.0-0 libglw1-mesa \ - libgomp1 libjpeg62 libxm4 netpbm tcsh xfonts-base xvfb python \ - && libs_path=/usr/lib/x86_64-linux-gnu \ - && if [ -f $libs_path/libgsl.so.19 ]; then \ - ln $libs_path/libgsl.so.19 $libs_path/libgsl.so.0; \ - fi \ - && echo "Install libxp (not in all ubuntu/debian repositories)" \ - && apt-get install -yq --no-install-recommends libxp6 \ - || /bin/bash -c " \ - curl --retry 5 -o /tmp/libxp6.deb -sSL http://mirrors.kernel.org/debian/pool/main/libx/libxp/libxp6_1.0.2-2_amd64.deb \ - && dpkg -i /tmp/libxp6.deb && rm -f /tmp/libxp6.deb" \ - && echo "Install libpng12 (not in all ubuntu/debian repositories" \ - && apt-get install -yq --no-install-recommends libpng12-0 \ - || /bin/bash -c " \ - curl -o /tmp/libpng12.deb -sSL http://mirrors.kernel.org/debian/pool/main/libp/libpng/libpng12-0_1.2.49-1%2Bdeb7u2_amd64.deb \ - && dpkg -i /tmp/libpng12.deb && rm -f /tmp/libpng12.deb" \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \ - && echo "Downloading AFNI ..." \ - && mkdir -p /opt/afni \ - && curl -sSL --retry 5 https://afni.nimh.nih.gov/pub/dist/tgz/linux_openmp_64.tgz \ - | tar zx -C /opt/afni --strip-components=1 - -#-------------------------- -# Install FreeSurfer v6.0.0 -#-------------------------- -# Install version minimized for recon-all -# See https://github.com/freesurfer/freesurfer/issues/70 -RUN apt-get update -qq && apt-get install -yq --no-install-recommends bc libgomp1 libxmu6 libxt6 tcsh perl \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \ - && echo "Downloading minimized FreeSurfer ..." \ - && curl -sSL https://dl.dropbox.com/s/nnzcfttc41qvt31/recon-all-freesurfer6-3.min.tgz | tar xz -C /opt \ - && sed -i '$isource $FREESURFER_HOME/SetUpFreeSurfer.sh' $ND_ENTRYPOINT -ENV FREESURFER_HOME=/opt/freesurfer - -# User-defined instruction -RUN echo "cHJpbnRmICJrcnp5c3p0b2YuZ29yZ29sZXdza2lAZ21haWwuY29tXG41MTcyXG4gKkN2dW12RVYzelRmZ1xuRlM1Si8yYzFhZ2c0RVxuIiA+IC9vcHQvZnJlZXN1cmZlci9saWNlbnNlLnR4dAo=" | base64 -d | sh - -RUN apt-get update -qq \ - && apt-get install -y -q --no-install-recommends ants \ - apt-utils \ - bzip2 \ - convert3d \ - file \ - fsl-core \ - fsl-mni152-templates \ - fusefat \ - g++ \ - git \ - graphviz \ - make \ - ruby \ - unzip \ - xvfb \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* - -# Add command(s) to entrypoint -RUN sed -i '$isource /etc/fsl/fsl.sh' $ND_ENTRYPOINT - -ENV ANTSPATH="/usr/lib/ants" \ - PATH="/usr/lib/ants:$PATH" - -# User-defined instruction -RUN gem install fakes3 - -#-------------------------------------- -# Save container specifications to JSON -#-------------------------------------- -RUN echo '{ \ - \n "pkg_manager": "apt", \ - \n "check_urls": false, \ - \n "instructions": [ \ - \n [ \ - \n "base", \ - \n "neurodebian@sha256:7590552afd0e7a481a33314724ae27f76ccedd05ffd7ac06ec38638872427b9b" \ - \n ], \ - \n [ \ - \n "label", \ - \n { \ - \n "maintainer": "The nipype developers https://github.com/nipy/nipype" \ - \n } \ - \n ], \ - \n [ \ - \n "spm", \ - \n { \ - \n "version": "12", \ - \n "matlab_version": "R2017a" \ - \n } \ - \n ], \ - \n [ \ - \n "afni", \ - \n { \ - \n "version": "latest", \ - \n "install_python2": "true" \ - \n } \ - \n ], \ - \n [ \ - \n "freesurfer", \ - \n { \ - \n "version": "6.0.0", \ - \n "min": true \ - \n } \ - \n ], \ - \n [ \ - \n "run", \ - \n "echo \"cHJpbnRmICJrcnp5c3p0b2YuZ29yZ29sZXdza2lAZ21haWwuY29tXG41MTcyXG4gKkN2dW12RVYzelRmZ1xuRlM1Si8yYzFhZ2c0RVxuIiA+IC9vcHQvZnJlZXN1cmZlci9saWNlbnNlLnR4dAo=\" | base64 -d | sh" \ - \n ], \ - \n [ \ - \n "install", \ - \n [ \ - \n "ants", \ - \n "apt-utils", \ - \n "bzip2", \ - \n "convert3d", \ - \n "file", \ - \n "fsl-core", \ - \n "fsl-mni152-templates", \ - \n "fusefat", \ - \n "g++", \ - \n "git", \ - \n "graphviz", \ - \n "make", \ - \n "ruby", \ - \n "unzip", \ - \n "xvfb" \ - \n ] \ - \n ], \ - \n [ \ - \n "add_to_entrypoint", \ - \n [ \ - \n "source /etc/fsl/fsl.sh" \ - \n ] \ - \n ], \ - \n [ \ - \n "env", \ - \n { \ - \n "ANTSPATH": "/usr/lib/ants", \ - \n "PATH": "/usr/lib/ants:$PATH" \ - \n } \ - \n ], \ - \n [ \ - \n "run", \ - \n "gem install fakes3" \ - \n ] \ - \n ], \ - \n "generation_timestamp": "2017-11-13 16:22:02", \ - \n "neurodocker_version": "0.3.1-19-g8d02eb4" \ - \n}' > /neurodocker/neurodocker_specs.json From 56838b98e9470f7d38284c3f4481d8d28593ba19 Mon Sep 17 00:00:00 2001 From: jakubk Date: Wed, 15 Nov 2017 10:37:24 -0500 Subject: [PATCH 486/643] add jakub kaczmarzyk (mit) --- .zenodo.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.zenodo.json b/.zenodo.json index 2fb6b63d61..41497da6d8 100644 --- a/.zenodo.json +++ b/.zenodo.json @@ -533,6 +533,11 @@ "affiliation": "University of Texas at Austin", "name": "De La Vega, Alejandro", "orcid": "0000-0001-9062-3778" + }, + { + "affiliation": "MIT", + "name": "Kaczmarzyk, Jakub", + "orcid": "0000-0002-5544-7577" } ], "keywords": [ From bba7a7ccd6770d7c7e189601c1d1cf221b2fc996 Mon Sep 17 00:00:00 2001 From: mathiasg Date: Wed, 15 Nov 2017 11:20:58 -0500 Subject: [PATCH 487/643] sty: whitespaces --- doc/users/config_file.rst | 8 ++++---- nipype/algorithms/tests/test_mesh_ops.py | 2 +- nipype/interfaces/ants/tests/test_resampling.py | 4 ++-- nipype/interfaces/cmtk/tests/test_nbs.py | 4 ++-- nipype/interfaces/niftyfit/asl.py | 2 +- nipype/pipeline/engine/tests/test_utils.py | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/doc/users/config_file.rst b/doc/users/config_file.rst index b196047e97..7c10a381c8 100644 --- a/doc/users/config_file.rst +++ b/doc/users/config_file.rst @@ -74,11 +74,11 @@ Execution *display_variable* Override the ``$DISPLAY`` environment variable for interfaces that require - an X server. This option is useful if there is a running X server, but - ``$DISPLAY`` was not defined in nipype's environment. For example, if an X + an X server. This option is useful if there is a running X server, but + ``$DISPLAY`` was not defined in nipype's environment. For example, if an X server is listening on the default port of 6000, set ``display_variable = :0`` - to enable nipype interfaces to use it. It may also point to displays provided - by VNC, `xnest `_ + to enable nipype interfaces to use it. It may also point to displays provided + by VNC, `xnest `_ or `Xvfb `_. If neither ``display_variable`` nor the ``$DISPLAY`` environment variable are set, nipype will try to configure a new virtual server using Xvfb. diff --git a/nipype/algorithms/tests/test_mesh_ops.py b/nipype/algorithms/tests/test_mesh_ops.py index 9d510dee2b..d5fbc56825 100644 --- a/nipype/algorithms/tests/test_mesh_ops.py +++ b/nipype/algorithms/tests/test_mesh_ops.py @@ -15,7 +15,7 @@ @pytest.mark.skipif(VTKInfo.no_tvtk(), reason="tvtk is not installed") def test_ident_distances(tmpdir): - tmpdir.chdir() + tmpdir.chdir() in_surf = example_data('surf01.vtk') dist_ident = m.ComputeMeshWarp() diff --git a/nipype/interfaces/ants/tests/test_resampling.py b/nipype/interfaces/ants/tests/test_resampling.py index 22dc4446e9..509ebfe844 100644 --- a/nipype/interfaces/ants/tests/test_resampling.py +++ b/nipype/interfaces/ants/tests/test_resampling.py @@ -1,5 +1,5 @@ # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- -# vi: set ft=python sts=4 ts=4 sw=4 et: +# vi: set ft=python sts=4 ts=4 sw=4 et: from nipype.interfaces.ants import WarpImageMultiTransform, WarpTimeSeriesImageMultiTransform import os @@ -66,7 +66,7 @@ def create_wtsimt(): def test_WarpTimeSeriesImageMultiTransform(change_dir, create_wtsimt): wtsimt = create_wtsimt assert wtsimt.cmdline == 'WarpTimeSeriesImageMultiTransform 4 resting.nii resting_wtsimt.nii \ --R ants_deformed.nii.gz ants_Warp.nii.gz ants_Affine.txt' +-R ants_deformed.nii.gz ants_Warp.nii.gz ants_Affine.txt' def test_WarpTimeSeriesImageMultiTransform_invaffine(change_dir, create_wtsimt): diff --git a/nipype/interfaces/cmtk/tests/test_nbs.py b/nipype/interfaces/cmtk/tests/test_nbs.py index 0516390b02..03a7aa8619 100644 --- a/nipype/interfaces/cmtk/tests/test_nbs.py +++ b/nipype/interfaces/cmtk/tests/test_nbs.py @@ -31,12 +31,12 @@ def test_importerror(creating_graphs, tmpdir): graphlist = creating_graphs group1 = graphlist[:3] group2 = graphlist[3:] - + nbs = NetworkBasedStatistic() nbs.inputs.in_group1 = group1 nbs.inputs.in_group2 = group2 nbs.inputs.edge_key = "weight" - + with pytest.raises(ImportError) as e: nbs.run() assert "cviewer library is not available" == str(e.value) diff --git a/nipype/interfaces/niftyfit/asl.py b/nipype/interfaces/niftyfit/asl.py index 366f9a6eca..8f95a48192 100644 --- a/nipype/interfaces/niftyfit/asl.py +++ b/nipype/interfaces/niftyfit/asl.py @@ -147,7 +147,7 @@ class FitAsl(NiftyFitCommand): >>> from nipype.interfaces import niftyfit >>> node = niftyfit.FitAsl() >>> node.inputs.source_file = 'asl.nii.gz' - >>> node.cmdline + >>> node.cmdline 'fit_asl -source asl.nii.gz -cbf asl_cbf.nii.gz -error asl_error.nii.gz \ -syn asl_syn.nii.gz' diff --git a/nipype/pipeline/engine/tests/test_utils.py b/nipype/pipeline/engine/tests/test_utils.py index 34ec45cfa8..23c7a16fc6 100644 --- a/nipype/pipeline/engine/tests/test_utils.py +++ b/nipype/pipeline/engine/tests/test_utils.py @@ -23,7 +23,7 @@ def test_identitynode_removal(tmpdir): def test_function(arg1, arg2, arg3): import numpy as np return (np.array(arg1) + arg2 + arg3).tolist() - + wf = pe.Workflow(name="testidentity", base_dir=tmpdir.strpath) From d7a2d161b3f6ff09fb83ae0918f046b34cccc73c Mon Sep 17 00:00:00 2001 From: oesteban Date: Wed, 15 Nov 2017 09:37:05 -0800 Subject: [PATCH 488/643] enable reuse of resource_monitor.json, write it in base_dir --- nipype/pipeline/engine/utils.py | 11 +++++++++-- nipype/pipeline/engine/workflows.py | 5 ++++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/nipype/pipeline/engine/utils.py b/nipype/pipeline/engine/utils.py index 5d2291b6fa..e917568b34 100644 --- a/nipype/pipeline/engine/utils.py +++ b/nipype/pipeline/engine/utils.py @@ -1297,7 +1297,7 @@ def write_workflow_prov(graph, filename=None, format='all'): return ps.g -def write_workflow_resources(graph, filename=None): +def write_workflow_resources(graph, filename=None, append=True): """ Generate a JSON file with profiling traces that can be loaded in a pandas DataFrame or processed with JavaScript like D3.js @@ -1316,6 +1316,13 @@ def write_workflow_resources(graph, filename=None): 'params': [], } + # If file exists, just append new profile information + # If we append different runs, then we will see different + # "bursts" of timestamps corresponding to those executions. + if append and os.path.isfile(filename): + with open(filename, 'r' if PY3 else 'rb') as rsf: + big_dict = json.load(rsf) + for idx, node in enumerate(graph.nodes()): nodename = node.fullname classname = node._interface.__class__.__name__ @@ -1323,7 +1330,7 @@ def write_workflow_resources(graph, filename=None): params = '' if node.parameterization: params = '_'.join(['{}'.format(p) - for p in node.parameterization]) + for p in node.parameterization]) try: rt_list = node.result.runtime diff --git a/nipype/pipeline/engine/workflows.py b/nipype/pipeline/engine/workflows.py index 35f1f7df3b..0397e78f53 100644 --- a/nipype/pipeline/engine/workflows.py +++ b/nipype/pipeline/engine/workflows.py @@ -596,7 +596,10 @@ def run(self, plugin=None, plugin_args=None, updatehash=False): write_workflow_prov(execgraph, prov_base, format='all') if config.resource_monitor: - write_workflow_resources(execgraph) + write_workflow_resources( + execgraph, + filename=op.join(self.base_dir, self.name, 'resource_monitor.json') + ) return execgraph # PRIVATE API AND FUNCTIONS From b72f9aa296b9c82606ee53feddb771448012f1b8 Mon Sep 17 00:00:00 2001 From: oesteban Date: Wed, 15 Nov 2017 10:43:21 -0800 Subject: [PATCH 489/643] allow disable resource_monitor appending with nipype option --- doc/users/config_file.rst | 5 +++++ nipype/pipeline/engine/utils.py | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/doc/users/config_file.rst b/doc/users/config_file.rst index b196047e97..65f3d373d1 100644 --- a/doc/users/config_file.rst +++ b/doc/users/config_file.rst @@ -162,6 +162,11 @@ Execution being used by an interface. Requires ``resource_monitor`` to be ``true``. (default value: ``1``) +*resource_monitor_append* + Append to an existing ``resource_monitor.json`` in the workflow ``base_dir``. + (unset by default, possible values: ``true``, ``false``, + will append unless explicitly set to ``false``). + Example ~~~~~~~ diff --git a/nipype/pipeline/engine/utils.py b/nipype/pipeline/engine/utils.py index cb36049337..26d3606105 100644 --- a/nipype/pipeline/engine/utils.py +++ b/nipype/pipeline/engine/utils.py @@ -1298,7 +1298,7 @@ def write_workflow_prov(graph, filename=None, format='all'): return ps.g -def write_workflow_resources(graph, filename=None, append=True): +def write_workflow_resources(graph, filename=None, append=None): """ Generate a JSON file with profiling traces that can be loaded in a pandas DataFrame or processed with JavaScript like D3.js @@ -1307,6 +1307,10 @@ def write_workflow_resources(graph, filename=None, append=True): if not filename: filename = os.path.join(os.getcwd(), 'resource_monitor.json') + if append is None: + append = str2bool(config.get( + 'execution', 'resource_monitor_append', 'true')) + big_dict = { 'time': [], 'name': [], From cd46847d250558424f760aef0a2f7830d14e75f6 Mon Sep 17 00:00:00 2001 From: oesteban Date: Wed, 15 Nov 2017 10:43:55 -0800 Subject: [PATCH 490/643] allow disable resource_monitor appending with nipype option (amend to last commit) --- doc/users/config_file.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/users/config_file.rst b/doc/users/config_file.rst index 65f3d373d1..776edaceab 100644 --- a/doc/users/config_file.rst +++ b/doc/users/config_file.rst @@ -164,7 +164,7 @@ Execution *resource_monitor_append* Append to an existing ``resource_monitor.json`` in the workflow ``base_dir``. - (unset by default, possible values: ``true``, ``false``, + (unset by default, possible values: ``true`` or ``false``, will append unless explicitly set to ``false``). Example From 8e792590585d873cd4a72cd1fd65c5dfe11df395 Mon Sep 17 00:00:00 2001 From: oesteban Date: Wed, 15 Nov 2017 10:46:25 -0800 Subject: [PATCH 491/643] improving documentation of new config entry --- doc/users/config_file.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/users/config_file.rst b/doc/users/config_file.rst index 776edaceab..f4dc6706cc 100644 --- a/doc/users/config_file.rst +++ b/doc/users/config_file.rst @@ -164,8 +164,9 @@ Execution *resource_monitor_append* Append to an existing ``resource_monitor.json`` in the workflow ``base_dir``. - (unset by default, possible values: ``true`` or ``false``, - will append unless explicitly set to ``false``). + Requires ``resource_monitor`` to be ``true``. (unset by default, + possible values: ``true`` or ``false``, the resource monitor will append + unless explicitly set to ``false``). Example ~~~~~~~ From afa63dc73a41742a779f6409bb9e0b3e1bd6e03c Mon Sep 17 00:00:00 2001 From: oesteban Date: Wed, 15 Nov 2017 11:17:58 -0800 Subject: [PATCH 492/643] add new [monitoring] section to nipype config --- doc/users/config_file.rst | 32 +++++++++++++------ docker/files/run_examples.sh | 5 +-- .../interfaces/tests/test_resource_monitor.py | 4 +-- nipype/utils/config.py | 29 +++++++++-------- nipype/utils/profiler.py | 6 ++-- 5 files changed, 46 insertions(+), 30 deletions(-) diff --git a/doc/users/config_file.rst b/doc/users/config_file.rst index f4dc6706cc..de4c615b0a 100644 --- a/doc/users/config_file.rst +++ b/doc/users/config_file.rst @@ -153,20 +153,28 @@ Execution crashfiles allow portability across machines and shorter load time. (possible values: ``pklz`` and ``txt``; default value: ``pklz``) -*resource_monitor* + +Resource Monitor +~~~~~~~~~~~~~~~~ + +*enabled* Enables monitoring the resources occupation (possible values: ``true`` and - ``false``; default value: ``false``) + ``false``; default value: ``false``). All the following options will be + dismissed if the resource monitor is not enabled. -*resource_monitor_frequency* +*sample_frequency* Sampling period (in seconds) between measurements of resources (memory, cpus) - being used by an interface. Requires ``resource_monitor`` to be ``true``. - (default value: ``1``) + being used by an interface (default value: ``1``) -*resource_monitor_append* - Append to an existing ``resource_monitor.json`` in the workflow ``base_dir``. - Requires ``resource_monitor`` to be ``true``. (unset by default, - possible values: ``true`` or ``false``, the resource monitor will append - unless explicitly set to ``false``). +*summary_path* + Path where the summary ``resource_monitor.json`` should be stored, when running + a workflow (``summary_path`` does not apply to interfaces run independently). + (unset by default, in which case the summary file will be written out to + ``/resource_monitor.json`` of the top-level workflow). + +*summary_append* + Append to an existing summary file (only applies to workflows). + (default value: ``true``, possible values: ``true`` or ``false``). Example ~~~~~~~ @@ -181,6 +189,10 @@ Example hash_method = timestamp display_variable = :1 + [monitoring] + enabled = false + + Workflow.config property has a form of a nested dictionary reflecting the structure of the .cfg file. diff --git a/docker/files/run_examples.sh b/docker/files/run_examples.sh index d8fc17b512..6163e314a9 100644 --- a/docker/files/run_examples.sh +++ b/docker/files/run_examples.sh @@ -20,8 +20,9 @@ echo '[execution]' >> ${HOME}/.nipype/nipype.cfg echo 'crashfile_format = txt' >> ${HOME}/.nipype/nipype.cfg if [[ "${NIPYPE_RESOURCE_MONITOR:-0}" == "1" ]]; then - echo 'resource_monitor = true' >> ${HOME}/.nipype/nipype.cfg - echo 'resource_monitor_frequency = 3' >> ${HOME}/.nipype/nipype.cfg + echo '[monitoring]' >> ${HOME}/.nipype/nipype.cfg + echo 'enabled = true' >> ${HOME}/.nipype/nipype.cfg + echo 'sample_frequency = 3' >> ${HOME}/.nipype/nipype.cfg fi # Set up coverage diff --git a/nipype/interfaces/tests/test_resource_monitor.py b/nipype/interfaces/tests/test_resource_monitor.py index 8374ba7ace..a8b2b41a9e 100644 --- a/nipype/interfaces/tests/test_resource_monitor.py +++ b/nipype/interfaces/tests/test_resource_monitor.py @@ -54,7 +54,7 @@ def test_cmdline_profiling(tmpdir, mem_gb, n_procs): of a CommandLine-derived interface """ from nipype import config - config.set('execution', 'resource_monitor_frequency', '0.2') # Force sampling fast + config.set('monitoring', 'sample_frequency', '0.2') # Force sampling fast tmpdir.chdir() iface = UseResources(mem_gb=mem_gb, n_procs=n_procs) @@ -72,7 +72,7 @@ def test_function_profiling(tmpdir, mem_gb, n_procs): of a Function interface """ from nipype import config - config.set('execution', 'resource_monitor_frequency', '0.2') # Force sampling fast + config.set('monitoring', 'sample_frequency', '0.2') # Force sampling fast tmpdir.chdir() iface = niu.Function(function=_use_resources) diff --git a/nipype/utils/config.py b/nipype/utils/config.py index 1b3ad5896e..3c9218f2a6 100644 --- a/nipype/utils/config.py +++ b/nipype/utils/config.py @@ -31,8 +31,8 @@ CONFIG_DEPRECATIONS = { - 'profile_runtime': ('resource_monitor', '1.0'), - 'filemanip_level': ('utils_level', '1.0'), + 'profile_runtime': ('monitoring.enabled', '1.0'), + 'filemanip_level': ('logging.utils_level', '1.0'), } NUMPY_MMAP = LooseVersion(np.__version__) >= LooseVersion('1.12.0') @@ -71,8 +71,11 @@ parameterize_dirs = true poll_sleep_duration = 2 xvfb_max_wait = 10 -resource_monitor = false -resource_monitor_frequency = 1 + +[monitoring] +enabled = false +sample_frequency = 1 +summary_append = true [check] interval = 1209600 @@ -105,12 +108,12 @@ def __init__(self, *args, **kwargs): self._config.read([config_file, 'nipype.cfg']) for option in CONFIG_DEPRECATIONS: - for section in ['execution', 'logging']: + for section in ['execution', 'logging', 'monitoring']: if self.has_option(section, option): - new_option = CONFIG_DEPRECATIONS[option][0] - if not self.has_option(section, new_option): + new_section, new_option = CONFIG_DEPRECATIONS[option][0].split('.') + if not self.has_option(new_section, new_option): # Warn implicit in get - self.set(section, new_option, self.get(section, option)) + self.set(new_section, new_option, self.get(section, option)) def set_default_config(self): self._config.readfp(StringIO(default_cfg)) @@ -138,7 +141,7 @@ def get(self, section, option, default=None): '"%s" instead.') % (option, CONFIG_DEPRECATIONS[option][1], CONFIG_DEPRECATIONS[option][0]) warn(msg) - option = CONFIG_DEPRECATIONS[option][0] + section, option = CONFIG_DEPRECATIONS[option][0].split('.') if self._config.has_option(section, option): return self._config.get(section, option) @@ -154,7 +157,7 @@ def set(self, section, option, value): '"%s" instead.') % (option, CONFIG_DEPRECATIONS[option][1], CONFIG_DEPRECATIONS[option][0]) warn(msg) - option = CONFIG_DEPRECATIONS[option][0] + section, option = CONFIG_DEPRECATIONS[option][0].split('.') return self._config.set(section, option, value) @@ -222,8 +225,8 @@ def resource_monitor(self): return self._resource_monitor # Cache config from nipype config - self.resource_monitor = self._config.get( - 'execution', 'resource_monitor') or False + self.resource_monitor = str2bool(self._config.get( + 'monitoring', 'enabled')) or False return self._resource_monitor @resource_monitor.setter @@ -248,7 +251,7 @@ def resource_monitor(self, value): if not self._resource_monitor: warn('Could not enable the resource monitor: psutil>=5.0' ' could not be imported.') - self._config.set('execution', 'resource_monitor', + self._config.set('monitoring', 'enabled', ('%s' % self._resource_monitor).lower()) def enable_resource_monitor(self): diff --git a/nipype/utils/profiler.py b/nipype/utils/profiler.py index f9299bf87c..67e5606c44 100644 --- a/nipype/utils/profiler.py +++ b/nipype/utils/profiler.py @@ -2,7 +2,7 @@ # @Author: oesteban # @Date: 2017-09-21 15:50:37 # @Last Modified by: oesteban -# @Last Modified time: 2017-10-20 09:12:36 +# @Last Modified time: 2017-11-15 11:14:07 """ Utilities to keep track of performance """ @@ -202,8 +202,8 @@ def get_max_resources_used(pid, mem_mb, num_threads, pyfunc=False): """ if not resource_monitor: - raise RuntimeError('Attempted to measure resources with ' - '"resource_monitor" set off.') + raise RuntimeError('Attempted to measure resources with option ' + '"monitoring.enabled" set off.') try: mem_mb = max(mem_mb, _get_ram_mb(pid, pyfunc=pyfunc)) From 0100135fc8efe222a0990f5add75e2f7ecc745e8 Mon Sep 17 00:00:00 2001 From: oesteban Date: Wed, 15 Nov 2017 11:32:41 -0800 Subject: [PATCH 493/643] read new monitoring.summary_file option --- doc/users/config_file.rst | 7 ++++--- nipype/pipeline/engine/utils.py | 7 ++++++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/doc/users/config_file.rst b/doc/users/config_file.rst index de4c615b0a..060549b01e 100644 --- a/doc/users/config_file.rst +++ b/doc/users/config_file.rst @@ -166,9 +166,10 @@ Resource Monitor Sampling period (in seconds) between measurements of resources (memory, cpus) being used by an interface (default value: ``1``) -*summary_path* - Path where the summary ``resource_monitor.json`` should be stored, when running - a workflow (``summary_path`` does not apply to interfaces run independently). +*summary_file* + Indicates where the summary file collecting all profiling information from the + resource monitor should be stored after execution of a workflow. + The ``summary_file`` does not apply to interfaces run independently. (unset by default, in which case the summary file will be written out to ``/resource_monitor.json`` of the top-level workflow). diff --git a/nipype/pipeline/engine/utils.py b/nipype/pipeline/engine/utils.py index 26d3606105..7a730b817c 100644 --- a/nipype/pipeline/engine/utils.py +++ b/nipype/pipeline/engine/utils.py @@ -1304,12 +1304,17 @@ def write_workflow_resources(graph, filename=None, append=None): in a pandas DataFrame or processed with JavaScript like D3.js """ import simplejson as json + + # Overwrite filename if nipype config is set + filename = config.get('monitoring', 'summary_file', filename) + + # If filename still does not make sense, store in $PWD if not filename: filename = os.path.join(os.getcwd(), 'resource_monitor.json') if append is None: append = str2bool(config.get( - 'execution', 'resource_monitor_append', 'true')) + 'monitoring', 'summary_append', 'true')) big_dict = { 'time': [], From a2d28b65ec345b2750f430218145b7b5935ca2f6 Mon Sep 17 00:00:00 2001 From: mathiasg Date: Wed, 15 Nov 2017 15:23:27 -0500 Subject: [PATCH 494/643] fix: ensure encoding when opening commit info --- nipype/pkg_info.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/nipype/pkg_info.py b/nipype/pkg_info.py index 2adb7ecba7..f1323750a1 100644 --- a/nipype/pkg_info.py +++ b/nipype/pkg_info.py @@ -3,14 +3,13 @@ from future import standard_library standard_library.install_aliases() +from builtins import open import configparser import os import sys import subprocess -from .info import VERSION - COMMIT_INFO_FNAME = 'COMMIT_INFO.txt' PY3 = sys.version_info[0] >= 3 @@ -52,7 +51,8 @@ def pkg_commit_hash(pkg_path): cfg_parser = configparser.RawConfigParser() else: cfg_parser = configparser.ConfigParser() - cfg_parser.read(pth) + with open(pth, encoding='utf-8') as fp: + cfg_parser.readfp(fp) archive_subst = cfg_parser.get('commit hash', 'archive_subst_hash') if not archive_subst.startswith('$Format'): # it has been substituted return 'archive substitution', archive_subst @@ -86,6 +86,9 @@ def get_pkg_info(pkg_path): with named parameters of interest ''' src, hsh = pkg_commit_hash(pkg_path) + from .info import VERSION + if not PY3: + src, hsh, VERSION = src.encode(), hsh.encode(), VERSION.encode() import networkx import nibabel import numpy From 612ed03632153e80c2c9113200b4e894859251ea Mon Sep 17 00:00:00 2001 From: oesteban Date: Wed, 15 Nov 2017 12:40:05 -0800 Subject: [PATCH 495/643] fix tests --- nipype/pipeline/engine/workflows.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nipype/pipeline/engine/workflows.py b/nipype/pipeline/engine/workflows.py index 876b53ffda..d40b6bba13 100644 --- a/nipype/pipeline/engine/workflows.py +++ b/nipype/pipeline/engine/workflows.py @@ -597,9 +597,10 @@ def run(self, plugin=None, plugin_args=None, updatehash=False): write_workflow_prov(execgraph, prov_base, format='all') if config.resource_monitor: + base_dir = self.base_dir or os.getcwd() write_workflow_resources( execgraph, - filename=op.join(self.base_dir, self.name, 'resource_monitor.json') + filename=op.join(base_dir, self.name, 'resource_monitor.json') ) return execgraph From be7f6b45721b03ce99e221fe6550e56ce080165f Mon Sep 17 00:00:00 2001 From: oesteban Date: Wed, 15 Nov 2017 15:48:19 -0800 Subject: [PATCH 496/643] [skip ci] clean header up, fix two pep8 warnings --- nipype/utils/profiler.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/nipype/utils/profiler.py b/nipype/utils/profiler.py index 67e5606c44..82855db43c 100644 --- a/nipype/utils/profiler.py +++ b/nipype/utils/profiler.py @@ -1,8 +1,6 @@ # -*- coding: utf-8 -*- -# @Author: oesteban -# @Date: 2017-09-21 15:50:37 -# @Last Modified by: oesteban -# @Last Modified time: 2017-11-15 11:14:07 +# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- +# vi: set ft=python sts=4 ts=4 sw=4 et: """ Utilities to keep track of performance """ @@ -320,7 +318,8 @@ def _use_cpu(x): ctr = 0 while ctr < 1e7: ctr += 1 - x*x + x * x + # Spin multiple threads def _use_resources(n_procs, mem_gb): From fd43693d635915483cd6250694183e51be0f09f1 Mon Sep 17 00:00:00 2001 From: oesteban Date: Wed, 15 Nov 2017 17:00:39 -0800 Subject: [PATCH 497/643] [ENH] Set maxtasksperchild in MultiProc Pool To avoid the workers to grow too big. Offer one new plugin_args to modify this option. --- doc/users/plugins.rst | 4 ++++ nipype/pipeline/plugins/multiproc.py | 13 ++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/doc/users/plugins.rst b/doc/users/plugins.rst index 4c0960c554..90e326b736 100644 --- a/doc/users/plugins.rst +++ b/doc/users/plugins.rst @@ -82,6 +82,10 @@ Optional arguments:: exceed the total amount of resources available (memory and threads), when ``False`` (default), only a warning will be issued. + maxtasksperchild : refresh the workers after this specific number of nodes + run (default: 10). + + To distribute processing on a multicore machine, simply call:: workflow.run(plugin='MultiProc') diff --git a/nipype/pipeline/plugins/multiproc.py b/nipype/pipeline/plugins/multiproc.py index ebed261185..d65d516c0f 100644 --- a/nipype/pipeline/plugins/multiproc.py +++ b/nipype/pipeline/plugins/multiproc.py @@ -60,6 +60,7 @@ def run_node(node, updatehash, taskid): class NonDaemonProcess(Process): """A non-daemon process to support internal multiprocessing. """ + def _get_daemon(self): return False @@ -104,6 +105,8 @@ class MultiProcPlugin(DistributedPluginBase): - scheduler: sort jobs topologically (``'tsort'``, default value) or prioritize jobs by, first, memory consumption and, second, number of threads (``'mem_thread'`` option). + - maxtasksperchild: refresh workers after a certain amount of tasks + run (and release resources). """ @@ -116,6 +119,7 @@ def __init__(self, plugin_args=None): # Read in options or set defaults. non_daemon = self.plugin_args.get('non_daemon', True) + maxtasks = self.plugin_args.get('maxtasksperchild', 10) self.processors = self.plugin_args.get('n_procs', cpu_count()) self.memory_gb = self.plugin_args.get('memory_gb', # Allocate 90% of system memory get_system_total_memory_gb() * 0.9) @@ -124,7 +128,14 @@ def __init__(self, plugin_args=None): # Instantiate different thread pools for non-daemon processes logger.debug('MultiProcPlugin starting in "%sdaemon" mode (n_procs=%d, mem_gb=%0.2f)', 'non' if non_daemon else '', self.processors, self.memory_gb) - self.pool = (NonDaemonPool if non_daemon else Pool)(processes=self.processors) + + NipypePool = NonDaemonPool if non_daemon else Pool + try: + self.pool = NipypePool(processes=self.processors, + maxtasksperchild=maxtasks) + except TypeError: + self.pool = NipypePool(processes=self.processors) + self._stats = None def _async_callback(self, args): From cfdf07f4cba78b14fcb08930b2958003b4bfdc36 Mon Sep 17 00:00:00 2001 From: oesteban Date: Thu, 16 Nov 2017 10:39:16 -0800 Subject: [PATCH 498/643] [skip ci] clarify `new plugin_arg` description --- doc/users/plugins.rst | 4 ++-- nipype/pipeline/plugins/multiproc.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/users/plugins.rst b/doc/users/plugins.rst index 90e326b736..501e7aa1d6 100644 --- a/doc/users/plugins.rst +++ b/doc/users/plugins.rst @@ -82,8 +82,8 @@ Optional arguments:: exceed the total amount of resources available (memory and threads), when ``False`` (default), only a warning will be issued. - maxtasksperchild : refresh the workers after this specific number of nodes - run (default: 10). + maxtasksperchild : number of nodes to run on each process before refreshing + the worker (default: 10). To distribute processing on a multicore machine, simply call:: diff --git a/nipype/pipeline/plugins/multiproc.py b/nipype/pipeline/plugins/multiproc.py index d65d516c0f..595b0e1947 100644 --- a/nipype/pipeline/plugins/multiproc.py +++ b/nipype/pipeline/plugins/multiproc.py @@ -105,8 +105,8 @@ class MultiProcPlugin(DistributedPluginBase): - scheduler: sort jobs topologically (``'tsort'``, default value) or prioritize jobs by, first, memory consumption and, second, number of threads (``'mem_thread'`` option). - - maxtasksperchild: refresh workers after a certain amount of tasks - run (and release resources). + - maxtasksperchild: number of nodes to run on each process before + refreshing the worker (default: 10). """ From b0828e0a4ea83fa3a6ebb9efae7d70d38eae82b3 Mon Sep 17 00:00:00 2001 From: oesteban Date: Thu, 16 Nov 2017 11:31:52 -0800 Subject: [PATCH 499/643] [ENH] Revising use of subprocess.Popen Make sure everything is tidied up after using Popen. --- nipype/interfaces/base.py | 96 +++++++++++++--------------- nipype/pipeline/engine/workflows.py | 13 ++-- nipype/pipeline/plugins/multiproc.py | 3 +- 3 files changed, 55 insertions(+), 57 deletions(-) diff --git a/nipype/interfaces/base.py b/nipype/interfaces/base.py index facafa5fc9..3f32e6537a 100644 --- a/nipype/interfaces/base.py +++ b/nipype/interfaces/base.py @@ -9,11 +9,10 @@ Requires Packages to be installed """ from __future__ import print_function, division, unicode_literals, absolute_import -from future import standard_library -standard_library.install_aliases() +import gc + from builtins import range, object, open, str, bytes -from configparser import NoOptionError from copy import deepcopy import datetime from datetime import datetime as dt @@ -26,7 +25,6 @@ import select import subprocess as sp import sys -import time from textwrap import wrap from warnings import warn import simplejson as json @@ -43,6 +41,8 @@ traits, Undefined, TraitDictObject, TraitListObject, TraitError, isdefined, File, Directory, DictStrStr, has_metadata, ImageFile) from ..external.due import due +from future import standard_library +standard_library.install_aliases() nipype_version = Version(__version__) iflogger = logging.getLogger('interface') @@ -58,6 +58,7 @@ class Str(traits.Unicode): """Replacement for the default traits.Str based in bytes""" + traits.Str = Str @@ -634,16 +635,16 @@ def __deepcopy__(self, memo): return memo[id_self] dup_dict = deepcopy(self.get(), memo) # access all keys - for key in self.copyable_trait_names(): - if key in self.__dict__.keys(): - _ = getattr(self, key) + # for key in self.copyable_trait_names(): + # if key in self.__dict__.keys(): + # _ = getattr(self, key) # clone once dup = self.clone_traits(memo=memo) - for key in self.copyable_trait_names(): - try: - _ = getattr(dup, key) - except: - pass + # for key in self.copyable_trait_names(): + # try: + # _ = getattr(dup, key) + # except: + # pass # clone twice dup = self.clone_traits(memo=memo) dup.trait_set(**dup_dict) @@ -1260,6 +1261,7 @@ class SimpleInterface(BaseInterface): >>> os.chdir(old.strpath) """ + def __init__(self, from_file=None, resource_monitor=None, **inputs): super(SimpleInterface, self).__init__( from_file=from_file, resource_monitor=resource_monitor, **inputs) @@ -1387,8 +1389,7 @@ def run_command(runtime, output=None, timeout=0.01): shell=True, cwd=runtime.cwd, env=env, - close_fds=True, - ) + close_fds=True) result = { 'stdout': [], 'stderr': [], @@ -1427,12 +1428,7 @@ def _process(drain=0): temp.sort() result['merged'] = [r[1] for r in temp] - if output == 'allatonce': - stdout, stderr = proc.communicate() - result['stdout'] = read_stream(stdout, logger=iflogger) - result['stderr'] = read_stream(stderr, logger=iflogger) - - elif output.startswith('file'): + if output.startswith('file'): proc.wait() if outfile is not None: stdout.flush() @@ -1452,12 +1448,18 @@ def _process(drain=0): result['merged'] = result['stdout'] result['stdout'] = [] else: - proc.communicate() # Discard stdout and stderr + stdout, stderr = proc.communicate() + if output == 'allatonce': # Discard stdout and stderr otherwise + result['stdout'] = read_stream(stdout, logger=iflogger) + result['stderr'] = read_stream(stderr, logger=iflogger) + + runtime.returncode = proc.returncode + proc.terminate() # Ensure we are done + gc.collect() # Force GC for a cleanup runtime.stderr = '\n'.join(result['stderr']) runtime.stdout = '\n'.join(result['stdout']) runtime.merged = '\n'.join(result['merged']) - runtime.returncode = proc.returncode return runtime @@ -1467,21 +1469,26 @@ def get_dependencies(name, environ): Uses otool on darwin, ldd on linux. Currently doesn't support windows. """ + cmd = None if sys.platform == 'darwin': - proc = sp.Popen('otool -L `which %s`' % name, - stdout=sp.PIPE, - stderr=sp.PIPE, - shell=True, - env=environ) + cmd = 'otool -L `which {}`'.format elif 'linux' in sys.platform: - proc = sp.Popen('ldd `which %s`' % name, - stdout=sp.PIPE, - stderr=sp.PIPE, - shell=True, - env=environ) - else: + cmd = 'ldd -L `which {}`'.format + + if cmd is None: return 'Platform %s not supported' % sys.platform - o, e = proc.communicate() + + try: + proc = sp.Popen( + cmd(name), stdout=sp.PIPE, stderr=sp.PIPE, shell=True, + env=environ, close_fds=True) + o, e = proc.communicate() + proc.terminate() + gc.collect() + except: + iflogger.warning( + 'Could not get linked libraries for "%s".', name) + return 'Failed collecting dependencies' return o.rstrip() @@ -1572,6 +1579,9 @@ def __init__(self, command=None, terminal_output=None, **inputs): # Set command. Input argument takes precedence self._cmd = command or getattr(self, '_cmd', None) + # Store dependencies in runtime object + self._ldd = str2bool(config.get('execution', 'get_linked_libs', 'true')) + if self._cmd is None: raise Exception("Missing command") @@ -1619,21 +1629,6 @@ def raise_exception(self, runtime): def _get_environ(self): return getattr(self.inputs, 'environ', {}) - def version_from_command(self, flag='-v'): - cmdname = self.cmd.split()[0] - env = dict(os.environ) - if _exists_in_path(cmdname, env): - out_environ = self._get_environ() - env.update(out_environ) - proc = sp.Popen(' '.join((cmdname, flag)), - shell=True, - env=env, - stdout=sp.PIPE, - stderr=sp.PIPE, - ) - o, e = proc.communicate() - return o - def _run_interface(self, runtime, correct_return_codes=(0,)): """Execute command via subprocess @@ -1664,7 +1659,8 @@ def _run_interface(self, runtime, correct_return_codes=(0,)): (self.cmd.split()[0], runtime.hostname)) runtime.command_path = cmd_path - runtime.dependencies = get_dependencies(executable_name, runtime.environ) + runtime.dependencies = (get_dependencies(executable_name, runtime.environ) + if self._ldd else '') runtime = run_command(runtime, output=self.terminal_output) if runtime.returncode is None or \ runtime.returncode not in correct_return_codes: diff --git a/nipype/pipeline/engine/workflows.py b/nipype/pipeline/engine/workflows.py index cd50bb72b3..7734dcb37c 100644 --- a/nipype/pipeline/engine/workflows.py +++ b/nipype/pipeline/engine/workflows.py @@ -62,6 +62,7 @@ logger = logging.getLogger('workflow') + class Workflow(EngineBase): """Controls the setup and execution of a pipeline of processes.""" @@ -196,7 +197,7 @@ def connect(self, *args, **kwargs): # determine their inputs/outputs depending on # connection settings. Skip these modules in the check if dest in connected_ports[destnode]: - raise Exception(""" + raise Exception("""\ Trying to connect %s:%s to %s:%s but input '%s' of node '%s' is already connected. """ % (srcnode, source, destnode, dest, dest, destnode)) @@ -297,7 +298,7 @@ def disconnect(self, *args): remove = [] for edge in conn: if edge in ed_conns: - idx = ed_conns.index(edge) + # idx = ed_conns.index(edge) remove.append((edge[0], edge[1])) logger.debug('disconnect(): remove list %s', to_str(remove)) @@ -426,7 +427,7 @@ def write_graph(self, dotfilename='graph.dot', graph2use='hierarchical', base_dir = os.getcwd() base_dir = make_output_dir(base_dir) if graph2use in ['hierarchical', 'colored']: - if self.name[:1].isdigit(): # these graphs break if int + if self.name[:1].isdigit(): # these graphs break if int raise ValueError('{} graph failed, workflow name cannot begin ' 'with a number'.format(graph2use)) dotfilename = op.join(base_dir, dotfilename) @@ -646,7 +647,7 @@ def _write_report_info(self, workingdir, name, graph): # Avoid RuntimeWarning: divide by zero encountered in log10 num_nodes = len(nodes) if num_nodes > 0: - index_name = np.ceil(np.log10(num_nodes)).astype(int) + index_name = np.ceil(np.log10(num_nodes)).astype(int) else: index_name = 0 template = '%%0%dd_' % index_name @@ -794,10 +795,10 @@ def _get_outputs(self): setattr(outputdict, node.name, outputs) return outputdict - def _set_input(self, object, name, newvalue): + def _set_input(self, objekt, name, newvalue): """Trait callback function to update a node input """ - object.traits()[name].node.set_input(name, newvalue) + objekt.traits()[name].node.set_input(name, newvalue) def _set_node_input(self, node, param, source, sourceinfo): """Set inputs of a node given the edge connection""" diff --git a/nipype/pipeline/plugins/multiproc.py b/nipype/pipeline/plugins/multiproc.py index ebed261185..6a9fdcafa6 100644 --- a/nipype/pipeline/plugins/multiproc.py +++ b/nipype/pipeline/plugins/multiproc.py @@ -60,6 +60,7 @@ def run_node(node, updatehash, taskid): class NonDaemonProcess(Process): """A non-daemon process to support internal multiprocessing. """ + def _get_daemon(self): return False @@ -123,7 +124,7 @@ def __init__(self, plugin_args=None): # Instantiate different thread pools for non-daemon processes logger.debug('MultiProcPlugin starting in "%sdaemon" mode (n_procs=%d, mem_gb=%0.2f)', - 'non' if non_daemon else '', self.processors, self.memory_gb) + 'non' * int(non_daemon), self.processors, self.memory_gb) self.pool = (NonDaemonPool if non_daemon else Pool)(processes=self.processors) self._stats = None From f07707d8027534e121eddf48bce9c42d03e13a65 Mon Sep 17 00:00:00 2001 From: kaczmarj Date: Thu, 16 Nov 2017 15:45:39 -0500 Subject: [PATCH 500/643] fix: use gzip compression -6 instead of -1 The lowest amount of compression created a tar.gz file of over 5.0 GB. Persisting this to the CircleCI workspace did not show errors, however, tar.gz file in the next step of the workflow would be empty. This caused `docker load` to fail. More compression leads to a tar.gz file that is about 4.7 GB. This relatively smaller file can be loaded in the next step of the CircleCI workflow. In a future PR, the Nipype container will be minimized with ReproZip. This will create smaller containers and alleviate the issue that this commit aims to fix. --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index bd09e99e84..b2c351dc35 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -136,7 +136,7 @@ jobs: docker save nipype/nipype:base \ nipype/nipype:latest \ nipype/nipype:py36 \ - nipype/nipype:py27 | gzip -1 > /tmp/docker/nipype-base-latest-py36-py27.tar.gz + nipype/nipype:py27 | gzip -6 > /tmp/docker/nipype-base-latest-py36-py27.tar.gz du -h /tmp/docker/nipype-base-latest-py36-py27.tar.gz else # Workaround for `persist_to_workspace` to succeed when we are From 13e454f360356a067c4d333d3c0a7b60a005908c Mon Sep 17 00:00:00 2001 From: mathiasg Date: Thu, 16 Nov 2017 18:12:10 -0500 Subject: [PATCH 501/643] add: missing autotests and updated mailmap --- .mailmap | 376 +++++++++++++----- .../afni/tests/test_auto_TCatSubBrick.py | 48 +++ .../tests/test_auto_SimpleInterface.py | 16 + 3 files changed, 334 insertions(+), 106 deletions(-) create mode 100644 nipype/interfaces/afni/tests/test_auto_TCatSubBrick.py create mode 100644 nipype/interfaces/tests/test_auto_SimpleInterface.py diff --git a/.mailmap b/.mailmap index f7d32274fb..8624dfc3f7 100644 --- a/.mailmap +++ b/.mailmap @@ -1,106 +1,270 @@ -Aimi Watanabe stymy -Aimi Watanabe stymy -Alexander Schaefer Alexander Schaefer -Alexander Schaefer alexschaefer83 -Alexander Schaefer aschaefer -Alexandre M. Savio Alexandre M. S -Alexandre M. Savio Alexandre M. S -Alexandre M. Savio Alexandre Manhaes Savio -Anisha Keshavan Anisha Keshavan -Anisha Keshavan akeshavan -Ariel Rokem arokem -Ariel Rokem arokem -Arman Eshaghi armaneshaghi -Ashely Gillman Ashley Gillman -Ashely Gillman ashgillman -Basille Pinsard bpinsard -Basille Pinsard bpinsard -Ben Cipollini Ben Cipollini -Benjamin Yvernault Benjamin Yvernault -Benjamin Yvernault byvernault -Blake Dewey Blake Dewey -Blake Dewey blakedewey -Blake Dewey blakedewey -Brendan Moloney moloney -Chris Filo Gorgolewski Chris Filo Gorgolewski -Chris Filo Gorgolewski Chris Filo Gorgolewski -Chris Filo Gorgolewski Chris Filo Gorgolewski -Chris Filo Gorgolewski Chris Gorgolewski -Chris Filo Gorgolewski Krzysztof Gorgolewski -Chris Filo Gorgolewski filo -Chris Filo Gorgolewski filo -Chris Filo Gorgolewski filo -Christopher J. Markiewicz Chris Markiewicz -Christopher J. Markiewicz Christopher J. Johnson -Christopher J. Markiewicz Christopher J. Markiewicz -Christopher J. Markiewicz Christopher J. Markiewicz -Cindee Madison cindeem -Cindee Madison cindeem <> -Colin Buchanan Colin Buchanan -Colin Buchanan colinbuchanan -Daniel Clark dclark87 -Daniel Ginsburg danginsburg -Daniel McNamee danmc -David Ellis David Ellis -David Ellis David Ellis -David Welch David Welch -Dmytro belevtsoff -Erik Ziegler Erik -Erik Ziegler Erik Ziegler -Erik Ziegler erik -Erik Ziegler erikz -Erik Ziegler swederik -Fernando Pérez-García Fernando -Franz Liem fliem -Franz Liem fliem -Gael Varoquaux GaelVaroquaux -Gael Varoquaux GaelVaroquaux -Gavin Cooper gjcooper -Hans Johnson Hans Johnson -Hans Johnson hjmjohnson -Horea Christian Horea Christian -Isaac Schwabacher ischwabacher -James Kent jdkent -Jason Wong Jason -Jason Wong jason -Jason Wong Jason W -Jason Wong Jason W -Jason Wong jason-wg -Jens Kleesiek JensNRAD -Joerg Stadler Joerg Stadler -Joerg Stadler Jörg Stadler -Joke Durnez jokedurnez -Josh Warner Josh Warner (Mac) -Kai Schlamp medihack Jessica Forbes jessicaforbes -Leonie Lampe Leonie Lmape -Mathias Goncalves mathiasg -Michael Dayan Michael -Michael Dayan Michael -Michael Dayan mick-d -Michael Clark Clark -Michael Notter miykael -Michael Waskom Michael Waskom -Michael Waskom Michael Waskom -Michael Waskom mwaskom -Michael Waskom mwaskom -Michael Waskom mwaskom -Oscar Esteban Oscar Esteban -Oscar Esteban oesteban -Russell Poldrack Russ Poldrack -Russell Poldrack poldrack -Satrajit Ghosh Satrajit Ghosh -Shariq Iqbal shariqiqbal2810 -Shariq Iqbal shariqiqbal2810 -Shoshana Berleant Shoshana Berleant -Shoshana Berleant Shoshana Berleant -Simon R Simon Rothmeier -Siqi Liu siqi liu -Siqi Liu sql -Steven Giavasis Steven Giavasis -Steven Giavasis sgiavasis -Steven Giavasis sgiavasis -Tristan Glatard Tristan Glatard -Victor Saase vsaase -William Triplett William Triplett -Yaroslav Halchenko Yaroslav Halchenko -pipolose pipolose +62442katieb 62442katieb +Aaron Mattfeld Aaron Mattfeld +adelavega adelavega +afloren afloren +Aimi Watanabe Aimi Watanabe +akeshavan akeshavan +Alejandro de la Vega Alejandro de la Vega +Alejandro Weinstein Alejandro Weinstein +Alexander Schaefer Alexander Schaefer +Alexandre Gramfort Alexandre Gramfort +Alexandre Manhaes Savio Alexandre Manhaes Savio +Alexandre M. S Alexandre M. S +Alexandre M. S Alexandre M. S +Alexandre M. Savio Alexandre M. Savio +alexschaefer83 alexschaefer83 +Ali Ghayoor Ali Ghayoor +Ana Marina Ana Marina +Andrew Davison Andrew Davison +Anisha Keshavan Anisha Keshavan +Anne Park Anne Park +arielletambini arielletambini +Ari Kahn Ari Kahn +armaneshaghi armaneshaghi +Arman Eshaghi Arman Eshaghi +arokem arokem +arokem arokem +aschaefer aschaefer +Ashely Gillman Ashely Gillman +ashgillman ashgillman +Ashley Gillman Ashley Gillman +belevtsoff belevtsoff +Ben Acland Ben Acland +Ben Cipollini Ben Cipollini +Ben Cipollini Ben Cipollini +Benjamin Yvernault Benjamin Yvernault +Benjamin Yvernault Benjamin Yvernault +Blake Dewey Blake Dewey +Blake Dewey Blake Dewey +blakedewey blakedewey +blakedewey blakedewey +bnucon bnucon +bpinsard bpinsard +bpinsard bpinsard +Brendan Moloney Brendan Moloney +Brian Cheung Brian Cheung +byvernault byvernault +Cameron Craddock Cameron Craddock +Carlo Hamalainen Carlo Hamalainen +Carlos Correa Carlos Correa +carolFrohlich carolFrohlich +Caroline Froehlich Caroline Froehlich +cdla cdla +Chad Cumba Chad Cumba +Charl Linssen Charl Linssen +Chris Filo Gorgolewski Chris Filo Gorgolewski +Chris Filo Gorgolewski Chris Filo Gorgolewski +Chris Filo Gorgolewski Chris Filo Gorgolewski +Chris Filo Gorgolewski Chris Filo Gorgolewski +Chris Gorgolewski Chris Gorgolewski +Chris Markiewicz Chris Markiewicz +Chris Steele Chris Steele +Christian Haselgrove Christian Haselgrove +Christopher Burns Christopher Burns +Christopher J. Johnson Christopher J. Johnson +Christopher J. Markiewicz Christopher J. Markiewicz +Christopher J. Markiewicz Christopher J. Markiewicz +Christopher J. Markiewicz Christopher J. Markiewicz +Cindee Madison Cindee Madison +cindeem cindeem +CindeeM CindeeM +Claire Tarbert Claire Tarbert +Clark Clark +Colin Buchanan Colin Buchanan +colinbuchanan colinbuchanan +Colin Buchanan Colin Buchanan +Conor McDermottroe Conor McDermottroe +Dale Zhou Dale Zhou +danginsburg danginsburg +Daniel Clark Daniel Clark +daniel-ge daniel-ge +Daniel Ginsburg Daniel Ginsburg +Daniel Haehn Daniel Haehn +Daniel Margulies Daniel Margulies +danmc danmc +Dav Clark Dav Clark +David Ellis David Ellis +David Ellis David Ellis +David Ellis David Ellis +David Welch David Welch +David Welch David Welch +dclark87 dclark87 +Demian Wassermann Demian Wassermann +Dimitri Papadopoulos Dimitri Papadopoulos +Dimitri Papadopoulos Orfanos Dimitri Papadopoulos Orfanos +Dmitry Shachnev Dmitry Shachnev +dmordom dmordom +Dmytro Dmytro +Dorota Jarecka Dorota Jarecka +Drew Erickson Drew Erickson +Dylan Dylan +Dylan Nielson Dylan Nielson +Elizabeth DuPre Elizabeth DuPre +emdupre emdupre +erik erik +Erik Erik +Erik Kastman Erik Kastman +erikz erikz +Erik Ziegler Erik Ziegler +Félix C. Morency Félix C. Morency +Fernando Fernando +filo filo +filo filo +filo filo +fliem fliem +fliem fliem +FredLoney FredLoney +Fred Mertz Fred Mertz +Gael varoquaux Gael varoquaux +GaelVaroquaux GaelVaroquaux +Gavin Cooper Gavin Cooper +Gilles de Hollander Gilles de Hollander +gjcooper gjcooper +Guillaume Guillaume +Hans Johnson Hans Johnson +Hans Johnson Hans Johnson +hjmjohnson hjmjohnson +Horea Christian Horea Christian +Horea Christian Horea Christian +Ian Malone Ian Malone +ischwabacher ischwabacher +Ivan Gonzalez Ivan Gonzalez +Jaime Arias Jaime Arias +jakubk jakubk +James Kent James Kent +Janosch Linkersdörfer Janosch Linkersdörfer +Januzz Januzz +Jan Varada Jan Varada +Jarrod Millman Jarrod Millman +jason jason +Jason Jason +jason-wg jason-wg +Jason W Jason W +Jason W Jason W +jdkent jdkent +JDWarner JDWarner +Jeff Lai Jeff Lai +JensNRAD JensNRAD +jessicaforbes jessicaforbes +Jessica Forbes Jessica Forbes +Joerg Stadler Joerg Stadler +Joerg Stadler Joerg Stadler +john anthony lee john anthony lee +John Pellman John Pellman +John Salvatore John Salvatore +jokedurnez jokedurnez +Joke Durnez Joke Durnez +Jörg Stadler Jörg Stadler +Josh Warner (Mac) Josh Warner (Mac) +Josh Warner Josh Warner +Julia Huntenburg Julia Huntenburg +Katie Bottenhorn Katie Bottenhorn +kesshijordan kesshijordan +Kesshi Jordan Kesshi Jordan +Kesshi jordan Kesshi jordan +k.matsubara91 k.matsubara91 +Kornelius Kornelius +Krzysztof Gorgolewski Krzysztof Gorgolewski +Leonie Lampe Leonie Lampe +Leonie Lmape Leonie Lmape +Lijie Huang Lijie Huang +Lukas Snoek Lukas Snoek +maedoc maedoc +MANDY RENFRO MANDY RENFRO +mankind mankind +Marcel Falkiewicz Marcel Falkiewicz +Marc Modat Marc Modat +Martin Luessi Martin Luessi +Martin Martin +mathiasg mathiasg +Mathias Goncalves Mathias Goncalves +Mathieu Dubois Mathieu Dubois +Mathieu Saboye Mathieu Saboye +Matteo Visconti dOC Matteo Visconti dOC +Matthew Brett Matthew Brett +Maxime Noel Maxime Noel +medihack medihack +Michael Clark Michael Clark +Michael Hallquist Michael Hallquist +Michael Hanke Michael Hanke +michael michael +Michael Michael +Michael Michael +Michael Notter Michael Notter +Michael Waskom Michael Waskom +Michael Waskom Michael Waskom +Michael Waskom Michael Waskom +Michael Waskom Michael Waskom +Michiel Cottaar Michiel Cottaar +mick-d mick-d +miykael miykael +moloney moloney +mwaskom mwaskom +mwaskom mwaskom +Nathan Perkins Nathan Perkins +Nicolas Pannetier Nicolas Pannetier +Nolan Nichols Nolan Nichols +oesteban oesteban +Oliver Contier Oliver Contier +oliver-contier oliver-contier +Oliver Hinds Oliver Hinds +Oscar Esteban Oscar Esteban +Oscar Esteban Oscar Esteban +pipolose pipolose +pipolose pipolose +poldrack poldrack +psharp1289 psharp1289 +RanjitK RanjitK +Regina Kim Regina Kim +Rene Kuettner Rene Kuettner +Robbert Harms Robbert Harms +Rosalia Tungaraza Rosalia Tungaraza +Ross Blair Ross Blair +Ross Markello Ross Markello +Ross Markello Ross Markello +Russell Poldrack Russell Poldrack +Russ Poldrack Russ Poldrack +salma1601 salma1601 +Salma BOUGACHA Salma BOUGACHA +salma salma +Sami Andberg Sami Andberg +Satrajit Ghosh Satrajit Ghosh +Satrajit Ghosh Satrajit Ghosh +sebastian sebastian +sgiavasis sgiavasis +sgiavasis sgiavasis +shariqiqbal2810 shariqiqbal2810 +shariqiqbal2810 shariqiqbal2810 +Shoshana Berleant Shoshana Berleant +Shoshana Berleant Shoshana Berleant +Shoshana Berleant Shoshana Berleant +Simon Rothmeier Simon Rothmeier +Simon R Simon R +siqi liu siqi liu +Siqi Liu Siqi Liu +sitek sitek +Souheil Inati Souheil Inati +sql sql +ssikka ssikka +Stephan Gerhard Stephan Gerhard +Steven Giavasis Steven Giavasis +stymy stymy +stymy stymy +swederik swederik +Taylor Salo Taylor Salo +Thomas Nickson Thomas Nickson +Tristan Glatard Tristan Glatard +Tristan Glatard Tristan Glatard +Ubuntu Ubuntu +Valentin Haenel Valentin Haenel +Victor Saase Victor Saase +vsaase vsaase +William F. Broderick William F. Broderick +William Triplett William Triplett +William Triplett William Triplett +Wolfgang Pauli Wolfgang Pauli +Xiangzhen Kong Xiangzhen Kong +Xu Wang Xu Wang +Yannick Schwartz Yannick Schwartz +Yaroslav Halchenko Yaroslav Halchenko +Yaroslav Halchenko Yaroslav Halchenko diff --git a/nipype/interfaces/afni/tests/test_auto_TCatSubBrick.py b/nipype/interfaces/afni/tests/test_auto_TCatSubBrick.py new file mode 100644 index 0000000000..da3b0fb383 --- /dev/null +++ b/nipype/interfaces/afni/tests/test_auto_TCatSubBrick.py @@ -0,0 +1,48 @@ +# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT +from __future__ import unicode_literals +from ..utils import TCatSubBrick + + +def test_TCatSubBrick_inputs(): + input_map = dict(args=dict(argstr='%s', + ), + environ=dict(nohash=True, + usedefault=True, + ), + ignore_exception=dict(nohash=True, + usedefault=True, + ), + in_files=dict(argstr='%s%s ...', + copyfile=False, + mandatory=True, + position=-1, + ), + num_threads=dict(nohash=True, + usedefault=True, + ), + out_file=dict(argstr='-prefix %s', + genfile=True, + ), + outputtype=dict(), + rlt=dict(argstr='-rlt%s', + position=1, + ), + terminal_output=dict(deprecated='1.0.0', + nohash=True, + ), + ) + inputs = TCatSubBrick.input_spec() + + for key, metadata in list(input_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(inputs.traits()[key], metakey) == value + + +def test_TCatSubBrick_outputs(): + output_map = dict(out_file=dict(), + ) + outputs = TCatSubBrick.output_spec() + + for key, metadata in list(output_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(outputs.traits()[key], metakey) == value diff --git a/nipype/interfaces/tests/test_auto_SimpleInterface.py b/nipype/interfaces/tests/test_auto_SimpleInterface.py new file mode 100644 index 0000000000..b00d1f9a3c --- /dev/null +++ b/nipype/interfaces/tests/test_auto_SimpleInterface.py @@ -0,0 +1,16 @@ +# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT +from __future__ import unicode_literals +from ..base import SimpleInterface + + +def test_SimpleInterface_inputs(): + input_map = dict(ignore_exception=dict(nohash=True, + usedefault=True, + ), + ) + inputs = SimpleInterface.input_spec() + + for key, metadata in list(input_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(inputs.traits()[key], metakey) == value + From 71a85e03c802fa8b22deb641be20905edb79a979 Mon Sep 17 00:00:00 2001 From: jakubk Date: Thu, 16 Nov 2017 18:52:18 -0500 Subject: [PATCH 502/643] tst+enh: update neurodocker version + retry building base image - Add `--retry 5` to curl commands for AFNI and FreeSurfer. - Try building base image at most 5 times. --- .circleci/config.yml | 5 +++-- docker/generate_dockerfiles.sh | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b2c351dc35..dedbf1c167 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -67,8 +67,9 @@ jobs: echo "Pulling base image ..." docker pull nipype/nipype:base elif [ "$GET_BASE" == "BUILD" ]; then - echo "Building base image ..." - docker build -t nipype/nipype:base - < docker/Dockerfile.base + e=1 && for i in {1..5}; do + docker build -t nipype/nipype:base - < docker/Dockerfile.base && e=0 && break || sleep 15 + done && [ "$e" -eq "0" ] else echo "Error: method to get base image not understood" exit 1 diff --git a/docker/generate_dockerfiles.sh b/docker/generate_dockerfiles.sh index 52eee8a1e6..5baa9f52e6 100755 --- a/docker/generate_dockerfiles.sh +++ b/docker/generate_dockerfiles.sh @@ -53,8 +53,8 @@ do done -# neurodocker version 0.3.1-19-g8d02eb4 -NEURODOCKER_IMAGE="kaczmarj/neurodocker@sha256:6b5f92f413b9710b7581e62293a8f74438b14ce7e4ab1ce68db2a09f7c64375a" +# neurodocker version 0.3.1-22-gb0ee069 +NEURODOCKER_IMAGE="kaczmarj/neurodocker@sha256:c670ec2e0666a63d4e017a73780f66554283e294f3b12250928ee74b8a48bc59" # neurodebian:stretch-non-free pulled on November 3, 2017 BASE_IMAGE="neurodebian@sha256:7590552afd0e7a481a33314724ae27f76ccedd05ffd7ac06ec38638872427b9b" From 1913dca23eb084bc95440c8bc83dda165ac7d524 Mon Sep 17 00:00:00 2001 From: oesteban Date: Fri, 17 Nov 2017 09:30:16 -0800 Subject: [PATCH 503/643] fix tests, address @effigies' comments --- nipype/interfaces/base.py | 33 ++++++++++++++++++++++++++++++--- 1 file changed, 30 insertions(+), 3 deletions(-) diff --git a/nipype/interfaces/base.py b/nipype/interfaces/base.py index 3f32e6537a..5e9dd181c1 100644 --- a/nipype/interfaces/base.py +++ b/nipype/interfaces/base.py @@ -1454,8 +1454,18 @@ def _process(drain=0): result['stderr'] = read_stream(stderr, logger=iflogger) runtime.returncode = proc.returncode - proc.terminate() # Ensure we are done - gc.collect() # Force GC for a cleanup + try: + proc.terminate() # Ensure we are done + except OSError as error: + # Python 2 raises when the process is already gone + if error.errno != errno.ESRCH: + raise + + # Dereference & force GC for a cleanup + del proc + del stdout + del stderr + gc.collect() runtime.stderr = '\n'.join(result['stderr']) runtime.stdout = '\n'.join(result['stdout']) @@ -1482,7 +1492,7 @@ def get_dependencies(name, environ): proc = sp.Popen( cmd(name), stdout=sp.PIPE, stderr=sp.PIPE, shell=True, env=environ, close_fds=True) - o, e = proc.communicate() + o, _ = proc.communicate() proc.terminate() gc.collect() except: @@ -1629,6 +1639,23 @@ def raise_exception(self, runtime): def _get_environ(self): return getattr(self.inputs, 'environ', {}) + def version_from_command(self, flag='-v'): + iflogger.warning('version_from_command member of CommandLine was ' + 'Deprecated in nipype-1.0.0 and deleted in 2.0.0') + cmdname = self.cmd.split()[0] + env = dict(os.environ) + if _exists_in_path(cmdname, env): + out_environ = self._get_environ() + env.update(out_environ) + proc = sp.Popen(' '.join((cmdname, flag)), + shell=True, + env=env, + stdout=sp.PIPE, + stderr=sp.PIPE, + ) + o, e = proc.communicate() + return o + def _run_interface(self, runtime, correct_return_codes=(0,)): """Execute command via subprocess From dac651d8942710bc8b6c917cef4273b68486d488 Mon Sep 17 00:00:00 2001 From: jakubk Date: Fri, 17 Nov 2017 13:56:18 -0500 Subject: [PATCH 504/643] tst+fix: do not save empty tar.gz file + use fastest gzip compression - Previously, an empty tar.gz file was created on containers 1-3 to avoid errors when persisting to workspace. Container 0 saves the Docker images to tar.gz, but the empty tar.gz file would sometimes overwrite the tar.gz with the Docker images. Consequently, the deploy step would try to load Docker images from an empty tar.gz file and would fail. - To avoid errors on `persist_to_workspace`, save docker/* instead of docker/nipype-base-latest-py36-py27.tar.gz. --- .circleci/config.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index dedbf1c167..e922b37520 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -137,17 +137,13 @@ jobs: docker save nipype/nipype:base \ nipype/nipype:latest \ nipype/nipype:py36 \ - nipype/nipype:py27 | gzip -6 > /tmp/docker/nipype-base-latest-py36-py27.tar.gz + nipype/nipype:py27 | gzip -1 > /tmp/docker/nipype-base-latest-py36-py27.tar.gz du -h /tmp/docker/nipype-base-latest-py36-py27.tar.gz - else - # Workaround for `persist_to_workspace` to succeed when we are - # not deploying Docker images. - touch /tmp/docker/nipype-base-latest-py36-py27.tar.gz fi - persist_to_workspace: root: /tmp paths: - - docker/nipype-base-latest-py36-py27.tar.gz + - docker/* deploy: From e420ceb51e8a21cc242568475cfa443d879bd8f8 Mon Sep 17 00:00:00 2001 From: oesteban Date: Fri, 17 Nov 2017 15:50:03 -0800 Subject: [PATCH 505/643] [REF] Clean-up class Node code --- nipype/pipeline/engine/nodes.py | 312 ++++++++++++++++---------------- nipype/pipeline/engine/utils.py | 20 -- nipype/utils/filemanip.py | 49 +++++ 3 files changed, 202 insertions(+), 179 deletions(-) diff --git a/nipype/pipeline/engine/nodes.py b/nipype/pipeline/engine/nodes.py index 36d3ba1b40..4ac300d3be 100644 --- a/nipype/pipeline/engine/nodes.py +++ b/nipype/pipeline/engine/nodes.py @@ -15,10 +15,8 @@ """ from __future__ import print_function, division, unicode_literals, absolute_import -from builtins import range, object, str, bytes, open +from builtins import range, str, bytes, open -from future import standard_library -standard_library.install_aliases() from collections import OrderedDict from copy import deepcopy @@ -28,7 +26,6 @@ import os import os.path as op import shutil -import errno import socket from shutil import rmtree import sys @@ -40,19 +37,20 @@ from ...utils.filemanip import (save_json, FileNotFoundError, filename_to_list, list_to_filename, copyfiles, fnames_presuffix, loadpkl, - split_filename, load_json, savepkl, - write_rst_header, write_rst_dict, - write_rst_list, to_str) + split_filename, load_json, makedirs, + emptydirs, savepkl, write_rst_header, + write_rst_dict, write_rst_list, to_str) from ...interfaces.base import (traits, InputMultiPath, CommandLine, - Undefined, TraitedSpec, DynamicTraitedSpec, + Undefined, DynamicTraitedSpec, Bunch, InterfaceResult, md5, Interface, - TraitDictObject, TraitListObject, isdefined) -from .utils import (generate_expanded_graph, modify_paths, - export_graph, make_output_dir, write_workflow_prov, - clean_working_directory, format_dot, topological_sort, + isdefined) +from .utils import (modify_paths, clean_working_directory, get_print_name, merge_dict, evaluate_connect_function) from .base import EngineBase +from future import standard_library +standard_library.install_aliases() + logger = logging.getLogger('workflow') @@ -162,6 +160,7 @@ def __init__(self, interface, name, iterables=None, itersource=None, self._interface = interface self.name = name + self._output_dir = None self._result = None self.iterables = iterables self.synchronize = synchronize @@ -189,12 +188,11 @@ def interface(self): @property def result(self): - if self._result: - return self._result - else: - cwd = self.output_dir() - result, _, _ = self._load_resultfile(cwd) - return result + # Cache first + if not self._result: + self._result = self._load_resultfile(self.output_dir())[0] + + return self._result @property def inputs(self): @@ -222,7 +220,7 @@ def n_procs(self): if self._n_procs is not None: return self._n_procs elif hasattr(self._interface.inputs, 'num_threads') and isdefined( - self._interface.inputs.num_threads): + self._interface.inputs.num_threads): return self._interface.inputs.num_threads else: return 1 @@ -238,6 +236,11 @@ def n_procs(self, value): def output_dir(self): """Return the location of the output directory for the node""" + # Output dir is cached + if self._output_dir: + return self._output_dir + + # Calculate & cache otherwise if self.base_dir is None: self.base_dir = mkdtemp() outputdir = self.base_dir @@ -248,7 +251,9 @@ def output_dir(self): if not str2bool(self.config['execution']['parameterize_dirs']): params_str = [self._parameterization_dir(p) for p in params_str] outputdir = op.join(outputdir, *params_str) - return op.abspath(op.join(outputdir, self.name)) + + self._output_dir = op.abspath(op.join(outputdir, self.name)) + return self._output_dir def set_input(self, parameter, val): """ Set interface input value""" @@ -258,15 +263,7 @@ def set_input(self, parameter, val): def get_output(self, parameter): """Retrieve a particular output of the node""" - val = None - if self._result: - val = getattr(self._result.outputs, parameter) - else: - cwd = self.output_dir() - result, _, _ = self._load_resultfile(cwd) - if result and result.outputs: - val = getattr(result.outputs, parameter) - return val + return getattr(self.result.outputs, parameter, None) def help(self): """ Print interface help""" @@ -277,23 +274,29 @@ def hash_exists(self, updatehash=False): # of the dictionary itself. hashed_inputs, hashvalue = self._get_hashval() outdir = self.output_dir() - if op.exists(outdir): - logger.debug('Output dir: %s', to_str(os.listdir(outdir))) - hashfiles = glob(op.join(outdir, '_0x*.json')) - logger.debug('Found hashfiles: %s', to_str(hashfiles)) - if len(hashfiles) > 1: - logger.info(hashfiles) - logger.info('Removing multiple hashfiles and forcing node to rerun') - for hashfile in hashfiles: - os.unlink(hashfile) hashfile = op.join(outdir, '_0x%s.json' % hashvalue) - logger.debug('Final hashfile: %s', hashfile) - if updatehash and op.exists(outdir): - logger.debug("Updating hash: %s", hashvalue) - for file in glob(op.join(outdir, '_0x*.json')): - os.remove(file) - self._save_hashfile(hashfile, hashed_inputs) - return op.exists(hashfile), hashvalue, hashfile, hashed_inputs + logger.debug('Node hash value: %s', hashvalue) + + if op.exists(outdir): + # Find previous hashfiles + hashfiles = glob(op.join(outdir, '_0x*.json')) + if len(hashfiles) > 1: # Remove hashfiles if more than one found + logger.info('Removing hashfiles (%s) and forcing node to rerun', + ', '.join(['"%s"' % op.basename(h) for h in hashfiles])) + for hf in hashfiles: + os.remove(hf) + + if updatehash and len(hashfiles) == 1: + logger.debug("Updating hash: %s", hashvalue) + os.remove(hashfiles[0]) + self._save_hashfile(hashfile, hashed_inputs) + + hash_exists = op.exists(hashfile) + logger.debug( + 'updatehash=%s, overwrite=%s, always_run=%s, hash_exists=%s, ' + 'hash_method=%s', updatehash, self.overwrite, self._interface.always_run, + hash_exists, self.config['execution']['hash_method'].lower()) + return hash_exists, hashvalue, hashfile, hashed_inputs def run(self, updatehash=False): """Execute the node in its directory. @@ -304,123 +307,113 @@ def run(self, updatehash=False): updatehash: boolean Update the hash stored in the output directory """ - # check to see if output directory and hash exist + cwd = os.getcwd() if self.config is None: - self.config = deepcopy(config._sections) - else: - self.config = merge_dict(deepcopy(config._sections), self.config) + self.config = {} + self.config = merge_dict(deepcopy(config._sections), self.config) + if not self._got_inputs: self._get_inputs() self._got_inputs = True + + # Check if output directory exists outdir = self.output_dir() - logger.info("Executing node %s in dir: %s", self.fullname, outdir) if op.exists(outdir): - logger.debug('Output dir: %s', to_str(os.listdir(outdir))) + logger.debug('Output directory (%s) exists and is %sempty,', + outdir, 'not ' * bool(os.listdir(outdir))) + + # Make sure outdir is created + makedirs(outdir, exist_ok=True) + os.chdir(outdir) + + logger.info('[Node] Executing "%s" (%s)', self.fullname, outdir) hash_info = self.hash_exists(updatehash=updatehash) hash_exists, hashvalue, hashfile, hashed_inputs = hash_info - logger.debug( - 'updatehash=%s, overwrite=%s, always_run=%s, hash_exists=%s', - updatehash, self.overwrite, self._interface.always_run, hash_exists) - if (not updatehash and (((self.overwrite is None and - self._interface.always_run) or - self.overwrite) or not - hash_exists)): - logger.debug("Node hash: %s", hashvalue) - - # by rerunning we mean only nodes that did finish to run previously - json_pat = op.join(outdir, '_0x*.json') - json_unfinished_pat = op.join(outdir, '_0x*_unfinished.json') - need_rerun = (op.exists(outdir) and not - isinstance(self, MapNode) and - len(glob(json_pat)) != 0 and - len(glob(json_unfinished_pat)) == 0) - if need_rerun: - logger.debug( - "Rerunning node:\n" - "updatehash = %s, self.overwrite = %s, self._interface.always_run = %s, " - "os.path.exists(%s) = %s, hash_method = %s", updatehash, self.overwrite, - self._interface.always_run, hashfile, op.exists(hashfile), - self.config['execution']['hash_method'].lower()) - log_debug = config.get('logging', 'workflow_level') == 'DEBUG' - if log_debug and not op.exists(hashfile): - exp_hash_paths = glob(json_pat) - if len(exp_hash_paths) == 1: - split_out = split_filename(exp_hash_paths[0]) - exp_hash_file_base = split_out[1] - exp_hash = exp_hash_file_base[len('_0x'):] - logger.debug("Previous node hash = %s", exp_hash) - try: - prev_inputs = load_json(exp_hash_paths[0]) - except: - pass - else: - logging.logdebug_dict_differences(prev_inputs, - hashed_inputs) - cannot_rerun = (str2bool( - self.config['execution']['stop_on_first_rerun']) and not - (self.overwrite is None and self._interface.always_run)) - if cannot_rerun: - raise Exception(("Cannot rerun when 'stop_on_first_rerun' " - "is set to True")) - hashfile_unfinished = op.join(outdir, - '_0x%s_unfinished.json' % - hashvalue) - if op.exists(hashfile): - os.remove(hashfile) - rm_outdir = (op.exists(outdir) and not - (op.exists(hashfile_unfinished) and - self._interface.can_resume) and not - isinstance(self, MapNode)) - if rm_outdir: - logger.debug("Removing old %s and its contents", outdir) - try: - rmtree(outdir) - except OSError as ex: - outdircont = os.listdir(outdir) - if ((ex.errno == errno.ENOTEMPTY) and (len(outdircont) == 0)): - logger.warn( - 'An exception was raised trying to remove old %s, but the path ' - 'seems empty. Is it an NFS mount?. Passing the exception.', outdir) - elif ((ex.errno == errno.ENOTEMPTY) and (len(outdircont) != 0)): - logger.debug( - 'Folder contents (%d items): %s', len(outdircont), outdircont) - raise ex - else: - raise ex + force_run = self.overwrite or (self.overwrite is None and self._interface.always_run) + + # If the node is cached, set-up pklz files and exit + if updatehash or (hash_exists and not force_run): + logger.debug("Only updating node hashes or skipping execution") + inputs_file = op.join(outdir, '_inputs.pklz') + if not op.exists(inputs_file): + logger.debug('Creating inputs file %s', inputs_file) + savepkl(inputs_file, self.inputs.get_traitsfree()) + + node_file = op.join(outdir, '_node.pklz') + if not op.exists(node_file): + logger.debug('Creating node file %s', node_file) + savepkl(node_file, self) - else: - logger.debug( - "%s found and can_resume is True or Node is a MapNode - resuming execution", - hashfile_unfinished) - if isinstance(self, MapNode): - # remove old json files - for filename in glob(op.join(outdir, '_0x*.json')): - os.unlink(filename) - outdir = make_output_dir(outdir) - self._save_hashfile(hashfile_unfinished, hashed_inputs) - self.write_report(report_type='preexec', cwd=outdir) - savepkl(op.join(outdir, '_node.pklz'), self) - savepkl(op.join(outdir, '_inputs.pklz'), - self.inputs.get_traitsfree()) - try: - self._run_interface() - except: - os.remove(hashfile_unfinished) - raise - shutil.move(hashfile_unfinished, hashfile) - self.write_report(report_type='postexec', cwd=outdir) - else: - if not op.exists(op.join(outdir, '_inputs.pklz')): - logger.debug('%s: creating inputs file', self.name) - savepkl(op.join(outdir, '_inputs.pklz'), - self.inputs.get_traitsfree()) - if not op.exists(op.join(outdir, '_node.pklz')): - logger.debug('%s: creating node file', self.name) - savepkl(op.join(outdir, '_node.pklz'), self) - logger.debug("Hashfile exists. Skipping execution") self._run_interface(execute=False, updatehash=updatehash) - logger.debug('Finished running %s in dir: %s\n', self._id, outdir) + logger.info('[Node] Cached "%s" (%s)\n', self.fullname, outdir) + os.chdir(cwd) + return self.result + + # by rerunning we mean only nodes that did finish to run previously + json_pat = op.join(outdir, '_0x*.json') + json_unfinished_pat = op.join(outdir, '_0x*_unfinished.json') + is_mapnode = isinstance(self, MapNode) + need_rerun = (not is_mapnode and + glob(json_pat) and not glob(json_unfinished_pat)) + if need_rerun: + log_debug = config.get('logging', 'workflow_level') == 'DEBUG' + logger.debug('[Node] Rerunning "%s"', self.fullname) + if log_debug and not hash_exists: + exp_hash_paths = glob(json_pat) + if len(exp_hash_paths) == 1: + split_out = split_filename(exp_hash_paths[0]) + exp_hash_file_base = split_out[1] + exp_hash = exp_hash_file_base[len('_0x'):] + logger.debug("Previous node hash = %s", exp_hash) + try: + prev_inputs = load_json(exp_hash_paths[0]) + except: + pass + else: + logging.logdebug_dict_differences(prev_inputs, + hashed_inputs) + if not force_run and str2bool(self.config['execution']['stop_on_first_rerun']): + raise Exception('Cannot rerun when "stop_on_first_rerun" is set to True') + hashfile_unfinished = op.join(outdir, + '_0x%s_unfinished.json' % + hashvalue) + if op.exists(hashfile): + os.remove(hashfile) + + # Delete directory contents if this is not a MapNode or can't resume + rm_outdir = not is_mapnode and not ( + self._interface.can_resume and op.isfile(hashfile_unfinished)) + + if rm_outdir: + emptydirs(outdir) + else: + logger.debug( + "%s hashfile=%s", '[MapNode] Resume -' if is_mapnode + else '[Node] Resume - can_resume=True,', hashfile_unfinished) + if is_mapnode: + # remove old json files + for filename in glob(op.join(outdir, '_0x*.json')): + os.remove(filename) + + self._save_hashfile(hashfile_unfinished, hashed_inputs) + self.write_report(report_type='preexec', cwd=outdir) + savepkl(op.join(outdir, '_node.pklz'), self) + savepkl(op.join(outdir, '_inputs.pklz'), + self.inputs.get_traitsfree()) + try: + self._run_interface(execute=True) + except: + logger.warning('[Node] Exception "%s" (%s)', self.fullname, outdir) + os.remove(hashfile_unfinished) + os.chdir(cwd) + raise + + # Tear-up + shutil.move(hashfile_unfinished, hashfile) + self.write_report(report_type='postexec', cwd=outdir) + logger.info('[Node] Completed "%s" (%s)', self.fullname, outdir) + os.chdir(cwd) return self._result # Private functions @@ -512,10 +505,7 @@ def _get_inputs(self): def _run_interface(self, execute=True, updatehash=False): if updatehash: return - old_cwd = os.getcwd() - os.chdir(self.output_dir()) self._result = self._run_command(execute) - os.chdir(old_cwd) def _save_results(self, result, cwd): resultsfile = op.join(cwd, 'result_%s.pklz' % self.name) @@ -967,7 +957,8 @@ def _collate_join_field_inputs(self): try: setattr(self._interface.inputs, field, val) except Exception as e: - raise ValueError(">>JN %s %s %s %s %s: %s" % (self, field, val, self.inputs.copyable_trait_names(), self.joinfield, e)) + raise ValueError(">>JN %s %s %s %s %s: %s" % ( + self, field, val, self.inputs.copyable_trait_names(), self.joinfield, e)) elif hasattr(self._interface.inputs, field): # copy the non-join field val = getattr(self._inputs, field) @@ -1039,10 +1030,12 @@ def __init__(self, interface, iterfield, name, serial=False, nested=False, **kwa name : alphanumeric string node specific name serial : boolean - flag to enforce executing the jobs of the mapnode in a serial manner rather than parallel + flag to enforce executing the jobs of the mapnode in a serial + manner rather than parallel nested : boolea - support for nested lists, if set the input list will be flattened before running, and the - nested list structure of the outputs will be resored + support for nested lists, if set the input list will be flattened + before running, and the nested list structure of the outputs will + be resored See Node docstring for additional keyword arguments. """ @@ -1219,7 +1212,8 @@ def _collate_results(self, nodes): for key, _ in list(self.outputs.items()): values = getattr(self._result.outputs, key) if isdefined(values): - values = unflatten(values, filename_to_list(getattr(self.inputs, self.iterfield[0]))) + values = unflatten(values, filename_to_list( + getattr(self.inputs, self.iterfield[0]))) setattr(self._result.outputs, key, values) if returncode and any([code is not None for code in returncode]): diff --git a/nipype/pipeline/engine/utils.py b/nipype/pipeline/engine/utils.py index 05c5345a12..12da40c5ec 100644 --- a/nipype/pipeline/engine/utils.py +++ b/nipype/pipeline/engine/utils.py @@ -1067,26 +1067,6 @@ def format_dot(dotfilename, format='png'): return dotfilename -def make_output_dir(outdir): - """Make the output_dir if it doesn't exist. - - Parameters - ---------- - outdir : output directory to create - - """ - # this odd approach deals with concurrent directory cureation - try: - if not os.path.exists(os.path.abspath(outdir)): - logger.debug("Creating %s", outdir) - os.makedirs(outdir) - except OSError: - logger.debug("Problem creating %s", outdir) - if not os.path.exists(outdir): - raise OSError('Could not create %s' % outdir) - return outdir - - def get_all_files(infile): files = [infile] if infile.endswith(".img"): diff --git a/nipype/utils/filemanip.py b/nipype/utils/filemanip.py index 16eabbb69c..6a367ab4d7 100644 --- a/nipype/utils/filemanip.py +++ b/nipype/utils/filemanip.py @@ -8,6 +8,7 @@ import sys import pickle +import errno import subprocess import gzip import hashlib @@ -663,3 +664,51 @@ def dist_is_editable(dist): if os.path.isfile(egg_link): return True return False + + +def makedirs(path, exist_ok=False): + """ + Create path, if it doesn't exist. + + Parameters + ---------- + path : output directory to create + + """ + if not exist_ok: # The old makedirs + os.makedirs(path) + return path + + # this odd approach deals with concurrent directory cureation + try: + if not os.path.exists(os.path.abspath(path)): + fmlogger.debug("Creating directory %s", path) + os.makedirs(path) + except OSError: + fmlogger.debug("Problem creating directory %s", path) + if not os.path.exists(path): + raise OSError('Could not create directory %s' % path) + return path + + +def emptydirs(path): + fmlogger.debug("Removing contents of %s", path) + pathconts = os.listdir(path) + + if not pathconts: + return True + + for el in pathconts: + try: + shutil.rmtree(el) + except OSError as ex: + elcont = os.listdir(el) + if ex.errno == errno.ENOTEMPTY and not elcont: + fmlogger.warning( + 'An exception was raised trying to remove old %s, but the path ' + 'seems empty. Is it an NFS mount?. Passing the exception.', el) + elif ex.errno == errno.ENOTEMPTY and elcont: + fmlogger.debug('Folder %s contents (%d items).', el, len(elcont)) + raise ex + else: + raise ex From a5ba8131d2e7d793be82f72ad191ee0d8aa0638b Mon Sep 17 00:00:00 2001 From: oesteban Date: Fri, 17 Nov 2017 18:26:27 -0800 Subject: [PATCH 506/643] general cleanup --- nipype/pipeline/engine/nodes.py | 8 ++++---- nipype/pipeline/engine/workflows.py | 6 +++--- nipype/pipeline/plugins/base.py | 9 +++++---- nipype/pipeline/plugins/multiproc.py | 23 +++++++++++++++------- nipype/utils/filemanip.py | 29 +++++++++++++++------------- 5 files changed, 44 insertions(+), 31 deletions(-) diff --git a/nipype/pipeline/engine/nodes.py b/nipype/pipeline/engine/nodes.py index 4ac300d3be..527e592c10 100644 --- a/nipype/pipeline/engine/nodes.py +++ b/nipype/pipeline/engine/nodes.py @@ -327,7 +327,7 @@ def run(self, updatehash=False): makedirs(outdir, exist_ok=True) os.chdir(outdir) - logger.info('[Node] Executing "%s" (%s)', self.fullname, outdir) + logger.info('[Node] Setting-up "%s" in "%s".', self.fullname, outdir) hash_info = self.hash_exists(updatehash=updatehash) hash_exists, hashvalue, hashfile, hashed_inputs = hash_info force_run = self.overwrite or (self.overwrite is None and self._interface.always_run) @@ -346,7 +346,7 @@ def run(self, updatehash=False): savepkl(node_file, self) self._run_interface(execute=False, updatehash=updatehash) - logger.info('[Node] Cached "%s" (%s)\n', self.fullname, outdir) + logger.info('[Node] Cached "%s".', self.fullname) os.chdir(cwd) return self.result @@ -412,7 +412,7 @@ def run(self, updatehash=False): # Tear-up shutil.move(hashfile_unfinished, hashfile) self.write_report(report_type='postexec', cwd=outdir) - logger.info('[Node] Completed "%s" (%s)', self.fullname, outdir) + logger.info('[Node] Finished "%s".', self.fullname) os.chdir(cwd) return self._result @@ -623,7 +623,7 @@ def _run_command(self, execute, copyfiles=True): if copyfiles: self._copyfiles_to_wd(cwd, execute) - message = 'Running node "%s" ("%s.%s")' + message = '[Node] Running "%s" ("%s.%s")' if issubclass(self._interface.__class__, CommandLine): try: cmd = self._interface.cmdline diff --git a/nipype/pipeline/engine/workflows.py b/nipype/pipeline/engine/workflows.py index cd50bb72b3..8522e4ee30 100644 --- a/nipype/pipeline/engine/workflows.py +++ b/nipype/pipeline/engine/workflows.py @@ -47,11 +47,11 @@ from ...utils.filemanip import (save_json, FileNotFoundError, filename_to_list, list_to_filename, copyfiles, fnames_presuffix, loadpkl, - split_filename, load_json, savepkl, + split_filename, load_json, makedirs, savepkl, write_rst_header, write_rst_dict, write_rst_list, to_str) from .utils import (generate_expanded_graph, modify_paths, - export_graph, make_output_dir, write_workflow_prov, + export_graph, write_workflow_prov, write_workflow_resources, clean_working_directory, format_dot, topological_sort, get_print_name, merge_dict, evaluate_connect_function, @@ -424,7 +424,7 @@ def write_graph(self, dotfilename='graph.dot', graph2use='hierarchical', base_dir = op.join(base_dir, self.name) else: base_dir = os.getcwd() - base_dir = make_output_dir(base_dir) + base_dir = makedirs(base_dir) if graph2use in ['hierarchical', 'colored']: if self.name[:1].isdigit(): # these graphs break if int raise ValueError('{} graph failed, workflow name cannot begin ' diff --git a/nipype/pipeline/plugins/base.py b/nipype/pipeline/plugins/base.py index bab2812903..5bb03ef3d9 100644 --- a/nipype/pipeline/plugins/base.py +++ b/nipype/pipeline/plugins/base.py @@ -339,7 +339,7 @@ def _local_hash_check(self, jobid, graph): logger.debug('Skipping cached node %s with ID %s.', self.procs[jobid]._id, jobid) try: - self._task_finished_cb(jobid) + self._task_finished_cb(jobid, cached=True) self._remove_node_dirs() except Exception: logger.debug('Error skipping cached node %s (%s).', @@ -349,13 +349,14 @@ def _local_hash_check(self, jobid, graph): return True return False - def _task_finished_cb(self, jobid): + def _task_finished_cb(self, jobid, cached=False): """ Extract outputs and assign to inputs of dependent tasks This is called when a job is completed. """ - logger.info('[Job finished] jobname: %s jobid: %d' % - (self.procs[jobid]._id, jobid)) + logger.info('[Job %d] %s (%s).', jobid, + 'Cached' if cached else 'Completed', + self.procs[jobid].fullname) if self._status_callback: self._status_callback(self.procs[jobid], 'end') # Update job and worker queues diff --git a/nipype/pipeline/plugins/multiproc.py b/nipype/pipeline/plugins/multiproc.py index 595b0e1947..7d091f24d2 100644 --- a/nipype/pipeline/plugins/multiproc.py +++ b/nipype/pipeline/plugins/multiproc.py @@ -12,10 +12,11 @@ from multiprocessing import Process, Pool, cpu_count, pool from traceback import format_exception import sys +from textwrap import indent +from logging import INFO from copy import deepcopy import numpy as np - from ... import logging from ...utils.profiler import get_system_total_memory_gb from ..engine import MapNode @@ -126,8 +127,8 @@ def __init__(self, plugin_args=None): self.raise_insufficient = self.plugin_args.get('raise_insufficient', True) # Instantiate different thread pools for non-daemon processes - logger.debug('MultiProcPlugin starting in "%sdaemon" mode (n_procs=%d, mem_gb=%0.2f)', - 'non' if non_daemon else '', self.processors, self.memory_gb) + logger.debug('[MultiProc] Starting in "%sdaemon" mode (n_procs=%d, mem_gb=%0.2f)', + 'non' * non_daemon, self.processors, self.memory_gb) NipypePool = NonDaemonPool if non_daemon else Pool try: @@ -158,7 +159,7 @@ def _submit_job(self, node, updatehash=False): run_node, (node, updatehash, self._taskid), callback=self._async_callback) - logger.debug('MultiProc submitted task %s (taskid=%d).', + logger.debug('[MultiProc] Submitted task %s (taskid=%d).', node.fullname, self._taskid) return self._taskid @@ -214,9 +215,17 @@ def _send_procs_to_workers(self, updatehash=False, graph=None): stats = (len(self.pending_tasks), len(jobids), free_memory_gb, self.memory_gb, free_processors, self.processors) if self._stats != stats: - logger.info('Currently running %d tasks, and %d jobs ready. Free ' - 'memory (GB): %0.2f/%0.2f, Free processors: %d/%d', - *stats) + tasks_list_msg = '' + if logger.level <= INFO: + running_tasks = [' * %s' % self.procs[jobid].fullname + for _, jobid in self.pending_tasks] + if running_tasks: + tasks_list_msg = '\nCurrently running:\n' + tasks_list_msg += '\n'.join(running_tasks) + tasks_list_msg = indent(tasks_list_msg, ' ' * 21) + logger.info('[MultiProc] Running %d tasks, and %d jobs ready. Free ' + 'memory (GB): %0.2f/%0.2f, Free processors: %d/%d.%s', + *stats, tasks_list_msg) self._stats = stats if free_memory_gb < 0.01 or free_processors == 0: diff --git a/nipype/utils/filemanip.py b/nipype/utils/filemanip.py index 6a367ab4d7..4fe697d63a 100644 --- a/nipype/utils/filemanip.py +++ b/nipype/utils/filemanip.py @@ -699,16 +699,19 @@ def emptydirs(path): return True for el in pathconts: - try: - shutil.rmtree(el) - except OSError as ex: - elcont = os.listdir(el) - if ex.errno == errno.ENOTEMPTY and not elcont: - fmlogger.warning( - 'An exception was raised trying to remove old %s, but the path ' - 'seems empty. Is it an NFS mount?. Passing the exception.', el) - elif ex.errno == errno.ENOTEMPTY and elcont: - fmlogger.debug('Folder %s contents (%d items).', el, len(elcont)) - raise ex - else: - raise ex + if os.path.isfile(el): + os.remove(el) + else: + try: + shutil.rmtree(el) + except OSError as ex: + elcont = os.listdir(el) + if ex.errno == errno.ENOTEMPTY and not elcont: + fmlogger.warning( + 'An exception was raised trying to remove old %s, but the path ' + 'seems empty. Is it an NFS mount?. Passing the exception.', el) + elif ex.errno == errno.ENOTEMPTY and elcont: + fmlogger.debug('Folder %s contents (%d items).', el, len(elcont)) + raise ex + else: + raise ex From 3e9ebcc486034b1ef650a30d22a4f08d15ba4ec2 Mon Sep 17 00:00:00 2001 From: mathiasg Date: Mon, 20 Nov 2017 11:57:19 -0500 Subject: [PATCH 507/643] rel: 0.14.0 (rc1) --- .zenodo.json | 10 +++++----- CHANGES | 12 +++++++++--- doc/conf.py | 2 +- nipype/info.py | 2 +- 4 files changed, 16 insertions(+), 10 deletions(-) diff --git a/.zenodo.json b/.zenodo.json index 41497da6d8..2985b7e107 100644 --- a/.zenodo.json +++ b/.zenodo.json @@ -514,11 +514,6 @@ { "name": "Shachnev, Dmitry" }, - { - "affiliation": "MIT, HMS", - "name": "Ghosh, Satrajit", - "orcid": "0000-0002-5312-6729" - }, { "affiliation": "University of Amsterdam", "name": "Lukas Snoek", @@ -538,6 +533,11 @@ "affiliation": "MIT", "name": "Kaczmarzyk, Jakub", "orcid": "0000-0002-5544-7577" + }, + { + "affiliation": "MIT, HMS", + "name": "Ghosh, Satrajit", + "orcid": "0000-0002-5312-6729" } ], "keywords": [ diff --git a/CHANGES b/CHANGES index f7761f7b91..81441e140b 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,12 @@ -Upcoming release (0.14.0) -================ +Upcoming release (0.14.1) +========================= +0.14.0 (November 20, 2017) +========================== + +* ENH: Generate Dockerfiles with neurodocker (https://github.com/nipy/nipype/pull/2202) +* ENH: FLAIR options for recon-all (https://github.com/nipy/nipype/pull/2279) +* ENH: Config option for setting maxtasksperchild when multiprocessing (https://github.com/nipy/nipype/pull/2284) * FIX: Testing maintainance and improvements (https://github.com/nipy/nipype/pull/2252) * ENH: Add elapsed_time and final metric_value to ants.Registration (https://github.com/nipy/nipype/pull/1985) * ENH: Improve terminal_output feature (https://github.com/nipy/nipype/pull/2209) @@ -17,7 +23,7 @@ Upcoming release (0.14.0) * MAINT: Additional Windows support (https://github.com/nipy/nipype/pull/2085) * ENH: Output realignment matrices from TOPUP (https://github.com/nipy/nipype/pull/2084) * ENH: Additional AFNI interfaces: 3dZcat, 3dZeropad, 3dedge3, 3dDeconvolve, 3dQwarp, 1dCat, 3dNwarpApply, 3daxialize, - 3dREMLfit, 3dUndump, 3dCM, 3dSynthesize + more (https://github.com/nipy/nipype/pull/2087, https://github.com/nipy/nipype/pull/2090, + 3dREMLfit, 3dUndump, 3dCM, 3dSynthesize + more (https://github.com/nipy/nipype/pull/2087, https://github.com/nipy/nipype/pull/2090, https://github.com/nipy/nipype/pull/2095, https://github.com/nipy/nipype/pull/2099, https://github.com/nipy/nipype/pull/2103, https://github.com/nipy/nipype/pull/2114, https://github.com/nipy/nipype/pull/2135, https://github.com/nipy/nipype/pull/2186, https://github.com/nipy/nipype/pull/2201, https://github.com/nipy/nipype/pull/2210) diff --git a/doc/conf.py b/doc/conf.py index 65ee4c1e6a..094a8250aa 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -82,7 +82,7 @@ # The short X.Y version. version = nipype.__version__ # The full version, including alpha/beta/rc tags. -release = "0.13.1" +release = "0.14.0" # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/nipype/info.py b/nipype/info.py index d7b1b106d1..cd1571c6a4 100644 --- a/nipype/info.py +++ b/nipype/info.py @@ -10,7 +10,7 @@ # full release. '.dev' as a version_extra string means this is a development # version # Remove -dev for release -__version__ = '1.0.0-dev' +__version__ = '0.14.0' def get_nipype_gitversion(): From 54e1c2a87d8156e7dae4e3ef13087ae0f95260f4 Mon Sep 17 00:00:00 2001 From: mathiasg Date: Mon, 20 Nov 2017 17:43:02 -0500 Subject: [PATCH 508/643] fix: revert mailmap and add link to 0.14 milestone --- .mailmap | 378 ++++++++++++++++--------------------------------------- CHANGES | 5 +- 2 files changed, 113 insertions(+), 270 deletions(-) diff --git a/.mailmap b/.mailmap index 8624dfc3f7..0a982fb8a9 100644 --- a/.mailmap +++ b/.mailmap @@ -1,270 +1,112 @@ -62442katieb 62442katieb -Aaron Mattfeld Aaron Mattfeld -adelavega adelavega -afloren afloren -Aimi Watanabe Aimi Watanabe -akeshavan akeshavan -Alejandro de la Vega Alejandro de la Vega -Alejandro Weinstein Alejandro Weinstein -Alexander Schaefer Alexander Schaefer -Alexandre Gramfort Alexandre Gramfort -Alexandre Manhaes Savio Alexandre Manhaes Savio -Alexandre M. S Alexandre M. S -Alexandre M. S Alexandre M. S -Alexandre M. Savio Alexandre M. Savio -alexschaefer83 alexschaefer83 -Ali Ghayoor Ali Ghayoor -Ana Marina Ana Marina -Andrew Davison Andrew Davison -Anisha Keshavan Anisha Keshavan -Anne Park Anne Park -arielletambini arielletambini -Ari Kahn Ari Kahn -armaneshaghi armaneshaghi -Arman Eshaghi Arman Eshaghi -arokem arokem -arokem arokem -aschaefer aschaefer -Ashely Gillman Ashely Gillman -ashgillman ashgillman -Ashley Gillman Ashley Gillman -belevtsoff belevtsoff -Ben Acland Ben Acland -Ben Cipollini Ben Cipollini -Ben Cipollini Ben Cipollini -Benjamin Yvernault Benjamin Yvernault -Benjamin Yvernault Benjamin Yvernault -Blake Dewey Blake Dewey -Blake Dewey Blake Dewey -blakedewey blakedewey -blakedewey blakedewey -bnucon bnucon -bpinsard bpinsard -bpinsard bpinsard -Brendan Moloney Brendan Moloney -Brian Cheung Brian Cheung -byvernault byvernault -Cameron Craddock Cameron Craddock -Carlo Hamalainen Carlo Hamalainen -Carlos Correa Carlos Correa -carolFrohlich carolFrohlich -Caroline Froehlich Caroline Froehlich -cdla cdla -Chad Cumba Chad Cumba -Charl Linssen Charl Linssen -Chris Filo Gorgolewski Chris Filo Gorgolewski -Chris Filo Gorgolewski Chris Filo Gorgolewski -Chris Filo Gorgolewski Chris Filo Gorgolewski -Chris Filo Gorgolewski Chris Filo Gorgolewski -Chris Gorgolewski Chris Gorgolewski -Chris Markiewicz Chris Markiewicz -Chris Steele Chris Steele -Christian Haselgrove Christian Haselgrove -Christopher Burns Christopher Burns -Christopher J. Johnson Christopher J. Johnson -Christopher J. Markiewicz Christopher J. Markiewicz -Christopher J. Markiewicz Christopher J. Markiewicz -Christopher J. Markiewicz Christopher J. Markiewicz -Cindee Madison Cindee Madison -cindeem cindeem -CindeeM CindeeM -Claire Tarbert Claire Tarbert -Clark Clark -Colin Buchanan Colin Buchanan -colinbuchanan colinbuchanan -Colin Buchanan Colin Buchanan -Conor McDermottroe Conor McDermottroe -Dale Zhou Dale Zhou -danginsburg danginsburg -Daniel Clark Daniel Clark -daniel-ge daniel-ge -Daniel Ginsburg Daniel Ginsburg -Daniel Haehn Daniel Haehn -Daniel Margulies Daniel Margulies -danmc danmc -Dav Clark Dav Clark -David Ellis David Ellis -David Ellis David Ellis -David Ellis David Ellis -David Welch David Welch -David Welch David Welch -dclark87 dclark87 -Demian Wassermann Demian Wassermann -Dimitri Papadopoulos Dimitri Papadopoulos -Dimitri Papadopoulos Orfanos Dimitri Papadopoulos Orfanos -Dmitry Shachnev Dmitry Shachnev -dmordom dmordom -Dmytro Dmytro -Dorota Jarecka Dorota Jarecka -Drew Erickson Drew Erickson -Dylan Dylan -Dylan Nielson Dylan Nielson -Elizabeth DuPre Elizabeth DuPre -emdupre emdupre -erik erik -Erik Erik -Erik Kastman Erik Kastman -erikz erikz -Erik Ziegler Erik Ziegler -Félix C. Morency Félix C. Morency -Fernando Fernando -filo filo -filo filo -filo filo -fliem fliem -fliem fliem -FredLoney FredLoney -Fred Mertz Fred Mertz -Gael varoquaux Gael varoquaux -GaelVaroquaux GaelVaroquaux -Gavin Cooper Gavin Cooper -Gilles de Hollander Gilles de Hollander -gjcooper gjcooper -Guillaume Guillaume -Hans Johnson Hans Johnson -Hans Johnson Hans Johnson -hjmjohnson hjmjohnson -Horea Christian Horea Christian -Horea Christian Horea Christian -Ian Malone Ian Malone -ischwabacher ischwabacher -Ivan Gonzalez Ivan Gonzalez -Jaime Arias Jaime Arias -jakubk jakubk -James Kent James Kent -Janosch Linkersdörfer Janosch Linkersdörfer -Januzz Januzz -Jan Varada Jan Varada -Jarrod Millman Jarrod Millman -jason jason -Jason Jason -jason-wg jason-wg -Jason W Jason W -Jason W Jason W -jdkent jdkent -JDWarner JDWarner -Jeff Lai Jeff Lai -JensNRAD JensNRAD -jessicaforbes jessicaforbes -Jessica Forbes Jessica Forbes -Joerg Stadler Joerg Stadler -Joerg Stadler Joerg Stadler -john anthony lee john anthony lee -John Pellman John Pellman -John Salvatore John Salvatore -jokedurnez jokedurnez -Joke Durnez Joke Durnez -Jörg Stadler Jörg Stadler -Josh Warner (Mac) Josh Warner (Mac) -Josh Warner Josh Warner -Julia Huntenburg Julia Huntenburg -Katie Bottenhorn Katie Bottenhorn -kesshijordan kesshijordan -Kesshi Jordan Kesshi Jordan -Kesshi jordan Kesshi jordan -k.matsubara91 k.matsubara91 -Kornelius Kornelius -Krzysztof Gorgolewski Krzysztof Gorgolewski -Leonie Lampe Leonie Lampe -Leonie Lmape Leonie Lmape -Lijie Huang Lijie Huang +Aimi Watanabe stymy +Aimi Watanabe stymy +Alejandro de la Vega adelavega +Alexander Schaefer Alexander Schaefer +Alexander Schaefer alexschaefer83 +Alexander Schaefer aschaefer +Alexandre M. Savio Alexandre M. S +Alexandre M. Savio Alexandre M. S +Alexandre M. Savio Alexandre Manhaes Savio +Anisha Keshavan Anisha Keshavan +Anisha Keshavan akeshavan +Ariel Rokem arokem +Ariel Rokem arokem +Arman Eshaghi armaneshaghi +Ashely Gillman Ashley Gillman +Ashely Gillman ashgillman +Basille Pinsard bpinsard +Basille Pinsard bpinsard +Ben Cipollini Ben Cipollini +Benjamin Yvernault Benjamin Yvernault +Benjamin Yvernault byvernault +Blake Dewey Blake Dewey +Blake Dewey blakedewey +Blake Dewey blakedewey +Brendan Moloney moloney +Chris Filo Gorgolewski Chris Filo Gorgolewski +Chris Filo Gorgolewski Chris Filo Gorgolewski +Chris Filo Gorgolewski Chris Filo Gorgolewski +Chris Filo Gorgolewski Chris Gorgolewski +Chris Filo Gorgolewski Krzysztof Gorgolewski +Chris Filo Gorgolewski filo +Chris Filo Gorgolewski filo +Chris Filo Gorgolewski filo +Christopher J. Markiewicz Chris Markiewicz +Christopher J. Markiewicz Christopher J. Johnson +Christopher J. Markiewicz Christopher J. Markiewicz +Christopher J. Markiewicz Christopher J. Markiewicz +Cindee Madison cindeem +Cindee Madison cindeem <> +Colin Buchanan Colin Buchanan +Colin Buchanan colinbuchanan +Daniel Clark dclark87 +Daniel Ginsburg danginsburg +Daniel McNamee danmc +David Ellis David Ellis +David Ellis David Ellis +David Welch David Welch +Dmytro belevtsoff +Erik Ziegler Erik +Erik Ziegler Erik Ziegler +Erik Ziegler erik +Erik Ziegler erikz +Erik Ziegler swederik +Fernando Pérez-García Fernando +Franz Liem fliem +Franz Liem fliem +Gael Varoquaux GaelVaroquaux +Gael Varoquaux GaelVaroquaux +Gavin Cooper gjcooper +Gilles de Hollander Gilles86 +Hans Johnson Hans Johnson +Hans Johnson hjmjohnson +Horea Christian Horea Christian +Isaac Schwabacher ischwabacher +James Kent jdkent +Jakub Kaczmarzyk kaczmarj +Jason Wong Jason +Jason Wong jason +Jason Wong Jason W +Jason Wong Jason W +Jason Wong jason-wg +Jens Kleesiek JensNRAD +Joerg Stadler Joerg Stadler +Joerg Stadler Jörg Stadler +Joke Durnez jokedurnez +Josh Warner Josh Warner (Mac) +Kai Schlamp medihack Jessica Forbes jessicaforbes +Kevin Sitek sitek +Leonie Lampe Leonie Lmape Lukas Snoek Lukas Snoek -maedoc maedoc -MANDY RENFRO MANDY RENFRO -mankind mankind -Marcel Falkiewicz Marcel Falkiewicz -Marc Modat Marc Modat -Martin Luessi Martin Luessi -Martin Martin -mathiasg mathiasg -Mathias Goncalves Mathias Goncalves -Mathieu Dubois Mathieu Dubois -Mathieu Saboye Mathieu Saboye -Matteo Visconti dOC Matteo Visconti dOC -Matthew Brett Matthew Brett -Maxime Noel Maxime Noel -medihack medihack -Michael Clark Michael Clark -Michael Hallquist Michael Hallquist -Michael Hanke Michael Hanke -michael michael -Michael Michael -Michael Michael -Michael Notter Michael Notter -Michael Waskom Michael Waskom -Michael Waskom Michael Waskom -Michael Waskom Michael Waskom -Michael Waskom Michael Waskom -Michiel Cottaar Michiel Cottaar -mick-d mick-d -miykael miykael -moloney moloney -mwaskom mwaskom -mwaskom mwaskom -Nathan Perkins Nathan Perkins -Nicolas Pannetier Nicolas Pannetier -Nolan Nichols Nolan Nichols -oesteban oesteban -Oliver Contier Oliver Contier -oliver-contier oliver-contier -Oliver Hinds Oliver Hinds -Oscar Esteban Oscar Esteban -Oscar Esteban Oscar Esteban -pipolose pipolose -pipolose pipolose -poldrack poldrack -psharp1289 psharp1289 -RanjitK RanjitK -Regina Kim Regina Kim -Rene Kuettner Rene Kuettner -Robbert Harms Robbert Harms -Rosalia Tungaraza Rosalia Tungaraza -Ross Blair Ross Blair -Ross Markello Ross Markello -Ross Markello Ross Markello -Russell Poldrack Russell Poldrack -Russ Poldrack Russ Poldrack -salma1601 salma1601 -Salma BOUGACHA Salma BOUGACHA -salma salma -Sami Andberg Sami Andberg -Satrajit Ghosh Satrajit Ghosh -Satrajit Ghosh Satrajit Ghosh -sebastian sebastian -sgiavasis sgiavasis -sgiavasis sgiavasis -shariqiqbal2810 shariqiqbal2810 -shariqiqbal2810 shariqiqbal2810 -Shoshana Berleant Shoshana Berleant -Shoshana Berleant Shoshana Berleant -Shoshana Berleant Shoshana Berleant -Simon Rothmeier Simon Rothmeier -Simon R Simon R -siqi liu siqi liu -Siqi Liu Siqi Liu -sitek sitek -Souheil Inati Souheil Inati -sql sql -ssikka ssikka -Stephan Gerhard Stephan Gerhard -Steven Giavasis Steven Giavasis -stymy stymy -stymy stymy -swederik swederik -Taylor Salo Taylor Salo -Thomas Nickson Thomas Nickson -Tristan Glatard Tristan Glatard -Tristan Glatard Tristan Glatard -Ubuntu Ubuntu -Valentin Haenel Valentin Haenel -Victor Saase Victor Saase -vsaase vsaase -William F. Broderick William F. Broderick -William Triplett William Triplett -William Triplett William Triplett +Mathias Goncalves mathiasg +Michael Dayan Michael +Michael Dayan Michael +Michael Dayan mick-d +Michael Clark Clark +Michael Notter miykael +Michael Waskom Michael Waskom +Michael Waskom Michael Waskom +Michael Waskom mwaskom +Michael Waskom mwaskom +Michael Waskom mwaskom +Oscar Esteban Oscar Esteban +Oscar Esteban oesteban +Russell Poldrack Russ Poldrack +Russell Poldrack poldrack +Satrajit Ghosh Satrajit Ghosh +Shariq Iqbal shariqiqbal2810 +Shariq Iqbal shariqiqbal2810 +Shoshana Berleant Shoshana Berleant +Shoshana Berleant Shoshana Berleant +Simon R Simon Rothmeier +Siqi Liu siqi liu +Siqi Liu sql +Steven Giavasis Steven Giavasis +Steven Giavasis sgiavasis +Steven Giavasis sgiavasis +Tristan Glatard Tristan Glatard +Victor Saase vsaase +William Triplett William Triplett Wolfgang Pauli Wolfgang Pauli -Xiangzhen Kong Xiangzhen Kong -Xu Wang Xu Wang -Yannick Schwartz Yannick Schwartz -Yaroslav Halchenko Yaroslav Halchenko -Yaroslav Halchenko Yaroslav Halchenko +Yaroslav Halchenko Yaroslav Halchenko +pipolose pipolose diff --git a/CHANGES b/CHANGES index 81441e140b..1091ec73db 100644 --- a/CHANGES +++ b/CHANGES @@ -1,7 +1,8 @@ -Upcoming release (0.14.1) -========================= +Upcoming release +================ 0.14.0 (November 20, 2017) +[Full information](https://github.com/nipy/nipype/milestone/13) ========================== * ENH: Generate Dockerfiles with neurodocker (https://github.com/nipy/nipype/pull/2202) From 3b95ad99619cf0c846599fa8462e118246f2a737 Mon Sep 17 00:00:00 2001 From: mathiasg Date: Mon, 20 Nov 2017 17:47:01 -0500 Subject: [PATCH 509/643] fix: md formatting --- CHANGES | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 1091ec73db..e8669461ed 100644 --- a/CHANGES +++ b/CHANGES @@ -2,9 +2,10 @@ Upcoming release ================ 0.14.0 (November 20, 2017) -[Full information](https://github.com/nipy/nipype/milestone/13) ========================== +###### [Full changelog](https://github.com/nipy/nipype/milestone/13) + * ENH: Generate Dockerfiles with neurodocker (https://github.com/nipy/nipype/pull/2202) * ENH: FLAIR options for recon-all (https://github.com/nipy/nipype/pull/2279) * ENH: Config option for setting maxtasksperchild when multiprocessing (https://github.com/nipy/nipype/pull/2284) From 7c671a13ce0e5bfe88727da11f8a904beb3bde8f Mon Sep 17 00:00:00 2001 From: Dorota Jarecka Date: Tue, 21 Nov 2017 09:56:19 -0500 Subject: [PATCH 510/643] removing ALLOW_UNICODE from a couple more tests --- nipype/interfaces/afni/preprocess.py | 2 +- nipype/interfaces/afni/utils.py | 2 +- nipype/interfaces/ants/resampling.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/nipype/interfaces/afni/preprocess.py b/nipype/interfaces/afni/preprocess.py index e46c9689c2..2135545b95 100644 --- a/nipype/interfaces/afni/preprocess.py +++ b/nipype/interfaces/afni/preprocess.py @@ -3490,7 +3490,7 @@ class Qwarp(AFNICommand): >>> qwarp3.inputs.base_file = 'mni.nii' >>> qwarp3.inputs.allineate = True >>> qwarp3.inputs.allineate_opts = '-cose lpa -verb' - >>> qwarp3.cmdline # doctest: +ALLOW_UNICODE + >>> qwarp3.cmdline "3dQwarp -allineate -allineate_opts '-cose lpa -verb' -base mni.nii -source structural.nii -prefix structural_QW" >>> res3 = qwarp3.run() # doctest: +SKIP """ _cmd = '3dQwarp' diff --git a/nipype/interfaces/afni/utils.py b/nipype/interfaces/afni/utils.py index e492b39d47..242b5077ee 100644 --- a/nipype/interfaces/afni/utils.py +++ b/nipype/interfaces/afni/utils.py @@ -1674,7 +1674,7 @@ class NwarpCat(AFNICommand): >>> nwarpcat = afni.NwarpCat() >>> nwarpcat.inputs.in_files = ['Q25_warp+tlrc.HEAD', ('IDENT', 'structural.nii')] >>> nwarpcat.inputs.out_file = 'Fred_total_WARP' - >>> nwarpcat.cmdline # doctest: +ALLOW_UNICODE + >>> nwarpcat.cmdline "3dNwarpCat -prefix Fred_total_WARP Q25_warp+tlrc.HEAD 'IDENT(structural.nii)'" >>> res = nwarpcat.run() # doctest: +SKIP diff --git a/nipype/interfaces/ants/resampling.py b/nipype/interfaces/ants/resampling.py index e268cb43e2..3ed60a51b1 100644 --- a/nipype/interfaces/ants/resampling.py +++ b/nipype/interfaces/ants/resampling.py @@ -75,7 +75,7 @@ class WarpTimeSeriesImageMultiTransform(ANTSCommand): >>> wtsimt.inputs.reference_image = 'ants_deformed.nii.gz' >>> wtsimt.inputs.transformation_series = ['ants_Warp.nii.gz','ants_Affine.txt'] >>> wtsimt.inputs.invert_affine = [1] # # this will invert the 1st Affine file: ants_Affine.txt - >>> wtsimt.cmdline # doctest: +ALLOW_UNICODE + >>> wtsimt.cmdline 'WarpTimeSeriesImageMultiTransform 4 resting.nii resting_wtsimt.nii -R ants_deformed.nii.gz ants_Warp.nii.gz \ -i ants_Affine.txt' """ From c5bc410f43cecb3620b1abe520dfb7d4b1dcd7c9 Mon Sep 17 00:00:00 2001 From: mathiasg Date: Tue, 21 Nov 2017 11:49:18 -0500 Subject: [PATCH 511/643] ENH: make release candidate to test travis deployment first --- CHANGES | 2 +- doc/conf.py | 2 +- nipype/info.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGES b/CHANGES index e8669461ed..c4ff9ea953 100644 --- a/CHANGES +++ b/CHANGES @@ -1,7 +1,7 @@ Upcoming release ================ -0.14.0 (November 20, 2017) +0.14.0 (November 21, 2017) ========================== ###### [Full changelog](https://github.com/nipy/nipype/milestone/13) diff --git a/doc/conf.py b/doc/conf.py index 094a8250aa..17ba33cbee 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -82,7 +82,7 @@ # The short X.Y version. version = nipype.__version__ # The full version, including alpha/beta/rc tags. -release = "0.14.0" +release = "0.14.0-rc1" # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/nipype/info.py b/nipype/info.py index cd1571c6a4..fad9912012 100644 --- a/nipype/info.py +++ b/nipype/info.py @@ -10,7 +10,7 @@ # full release. '.dev' as a version_extra string means this is a development # version # Remove -dev for release -__version__ = '0.14.0' +__version__ = '0.14.0-rc1' def get_nipype_gitversion(): From 309c6ea9c0bc3e77ad354f2b1a1869f7641b5d48 Mon Sep 17 00:00:00 2001 From: oesteban Date: Tue, 21 Nov 2017 09:13:19 -0800 Subject: [PATCH 512/643] final touch --- nipype/interfaces/base.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/nipype/interfaces/base.py b/nipype/interfaces/base.py index 5e9dd181c1..c2520bec4d 100644 --- a/nipype/interfaces/base.py +++ b/nipype/interfaces/base.py @@ -1448,10 +1448,12 @@ def _process(drain=0): result['merged'] = result['stdout'] result['stdout'] = [] else: - stdout, stderr = proc.communicate() + stdoutstr, stderrstr = proc.communicate() if output == 'allatonce': # Discard stdout and stderr otherwise - result['stdout'] = read_stream(stdout, logger=iflogger) - result['stderr'] = read_stream(stderr, logger=iflogger) + result['stdout'] = read_stream(stdoutstr, logger=iflogger) + result['stderr'] = read_stream(stderrstr, logger=iflogger) + del stdoutstr + del stderrstr runtime.returncode = proc.returncode try: From cadcdbe4cbefd27c7c1e5b0020e1a919c544679c Mon Sep 17 00:00:00 2001 From: oesteban Date: Tue, 21 Nov 2017 09:14:24 -0800 Subject: [PATCH 513/643] update CHANGES --- CHANGES | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES b/CHANGES index f7761f7b91..07373d1f0f 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,7 @@ Upcoming release (0.14.0) ================ +* MAINT: Revise use of `subprocess.Popen` (https://github.com/nipy/nipype/pull/2289) * FIX: Testing maintainance and improvements (https://github.com/nipy/nipype/pull/2252) * ENH: Add elapsed_time and final metric_value to ants.Registration (https://github.com/nipy/nipype/pull/1985) * ENH: Improve terminal_output feature (https://github.com/nipy/nipype/pull/2209) From 87d1c7ad28f7a550a656b14c42c60877b195978d Mon Sep 17 00:00:00 2001 From: oesteban Date: Tue, 21 Nov 2017 09:24:40 -0800 Subject: [PATCH 514/643] update CHANGES --- CHANGES | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES b/CHANGES index f7761f7b91..c120b76737 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,7 @@ Upcoming release (0.14.0) ================ +* FIX+MAINT: Revision of the resource monitor (https://github.com/nipy/nipype/pull/2285) * FIX: Testing maintainance and improvements (https://github.com/nipy/nipype/pull/2252) * ENH: Add elapsed_time and final metric_value to ants.Registration (https://github.com/nipy/nipype/pull/1985) * ENH: Improve terminal_output feature (https://github.com/nipy/nipype/pull/2209) From 80247fc59e02bd122a1975c14560248090cb7133 Mon Sep 17 00:00:00 2001 From: oesteban Date: Tue, 21 Nov 2017 10:59:11 -0800 Subject: [PATCH 515/643] [FIX] Improve determination of ANTSPATH in BrainExtraction interface --- nipype/interfaces/ants/segmentation.py | 28 ++++++++++++++------------ 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/nipype/interfaces/ants/segmentation.py b/nipype/interfaces/ants/segmentation.py index 64ca7205ca..05125cbd69 100644 --- a/nipype/interfaces/ants/segmentation.py +++ b/nipype/interfaces/ants/segmentation.py @@ -720,17 +720,19 @@ class BrainExtraction(ANTSCommand): def _run_interface(self, runtime, correct_return_codes=(0,)): # antsBrainExtraction.sh requires ANTSPATH to be defined out_environ = self._get_environ() - if out_environ.get('ANTSPATH') is None: - runtime.environ.update(out_environ) - executable_name = self.cmd.split()[0] - exist_val, cmd_path = _exists_in_path(executable_name, runtime.environ) - if not exist_val: - raise IOError("command '%s' could not be found on host %s" % - (self.cmd.split()[0], runtime.hostname)) - - # Set the environment variable if found - runtime.environ.update({'ANTSPATH': os.path.dirname(cmd_path)}) - + ants_path = out_environ.get('ANTSPATH', None) or os.getenv('ANTSPATH', None) + if ants_path is None: + # Check for antsRegistration, which is under bin/ (the $ANTSPATH) instead of + # checking for antsBrainExtraction.sh which is under script/ + _, cmd_path = _exists_in_path('antsRegistration', runtime.environ) + if not cmd_path: + raise RuntimeError( + 'The environment variable $ANTSPATH is not defined in host "%s", ' + 'and Nipype could not determine it automatically.' % runtime.hostname) + ants_path = os.path.dirname(cmd_path) + + self.inputs.environ.update({'ANTSPATH': ants_path}) + runtime.environ.update({'ANTSPATH': ants_path}) runtime = super(BrainExtraction, self)._run_interface(runtime) # Still, double-check if it didn't found N4 @@ -740,8 +742,8 @@ def _run_interface(self, runtime, correct_return_codes=(0,)): tool = line.strip().replace('we cant find the', '').split(' ')[0] break - errmsg = ('antsBrainExtraction.sh requires %s the environment variable ' - 'ANTSPATH to be defined' % tool) + errmsg = ('antsBrainExtraction.sh requires "%s" to be found in $ANTSPATH ' + '($ANTSPATH="%s").') % (tool, ants_path) if runtime.stderr is None: runtime.stderr = errmsg else: From 5375f36c0dd120e8a872f29eee4dd541591a54f8 Mon Sep 17 00:00:00 2001 From: oesteban Date: Tue, 21 Nov 2017 13:19:54 -0800 Subject: [PATCH 516/643] [ENH] Memoize FSL version check Same as in #2274, but for FSL --- nipype/interfaces/fsl/base.py | 42 ++++++++++++++--------------------- 1 file changed, 17 insertions(+), 25 deletions(-) diff --git a/nipype/interfaces/fsl/base.py b/nipype/interfaces/fsl/base.py index 6d16817e09..21ac707495 100644 --- a/nipype/interfaces/fsl/base.py +++ b/nipype/interfaces/fsl/base.py @@ -33,20 +33,27 @@ from ... import logging from ...utils.filemanip import fname_presuffix -from ..base import traits, isdefined, CommandLine, CommandLineInputSpec +from ..base import traits, isdefined, CommandLine, CommandLineInputSpec, PackageInfo from ...external.due import BibTeX IFLOGGER = logging.getLogger('interface') -class Info(object): - """Handle fsl output type and version information. - - version refers to the version of fsl on the system +class Info(PackageInfo): + """ + Handle FSL ``output_type`` and version information. output type refers to the type of file fsl defaults to writing eg, NIFTI, NIFTI_GZ + Examples + -------- + + >>> from nipype.interfaces.fsl import Info + >>> Info.version() # doctest: +SKIP + >>> Info.output_type() # doctest: +SKIP + + """ ftypes = {'NIFTI': '.nii', @@ -54,28 +61,13 @@ class Info(object): 'NIFTI_GZ': '.nii.gz', 'NIFTI_PAIR_GZ': '.img.gz'} - @staticmethod - def version(): - """Check for fsl version on system - - Parameters - ---------- - None + if os.getenv('FSLDIR'): + version_file = os.path.join( + os.getenv('FSLDIR'), 'etc', 'fslversion') - Returns - ------- - version : str - Version number as string or None if FSL not found + def parse_version(raw_info): + return raw_info.splitlines()[0] - """ - # find which fsl being used....and get version from - # /path/to/fsl/etc/fslversion - try: - basedir = os.environ['FSLDIR'] - except KeyError: - return None - out = open('%s/etc/fslversion' % (basedir)).read() - return out.strip('\n') @classmethod def output_type_to_ext(cls, output_type): From bd086f9dbc873dff776b8079647e805083ac65ff Mon Sep 17 00:00:00 2001 From: oesteban Date: Tue, 21 Nov 2017 13:24:21 -0800 Subject: [PATCH 517/643] remove unused packages --- nipype/interfaces/fsl/base.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/nipype/interfaces/fsl/base.py b/nipype/interfaces/fsl/base.py index 21ac707495..513612fb50 100644 --- a/nipype/interfaces/fsl/base.py +++ b/nipype/interfaces/fsl/base.py @@ -26,7 +26,6 @@ """ from __future__ import print_function, division, unicode_literals, absolute_import -from builtins import open, object from glob import glob import os @@ -68,7 +67,6 @@ class Info(PackageInfo): def parse_version(raw_info): return raw_info.splitlines()[0] - @classmethod def output_type_to_ext(cls, output_type): """Get the file extension for the given output type. From 3d132465c988cd4740f4cf3255c1256bbbafb36a Mon Sep 17 00:00:00 2001 From: oesteban Date: Tue, 21 Nov 2017 13:27:32 -0800 Subject: [PATCH 518/643] Update CHANGES --- CHANGES | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES b/CHANGES index f7761f7b91..88238aa8c8 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,7 @@ Upcoming release (0.14.0) ================ +* ENH: Memoize version checks (https://github.com/nipy/nipype/pull/2274, https://github.com/nipy/nipype/pull/2295) * FIX: Testing maintainance and improvements (https://github.com/nipy/nipype/pull/2252) * ENH: Add elapsed_time and final metric_value to ants.Registration (https://github.com/nipy/nipype/pull/1985) * ENH: Improve terminal_output feature (https://github.com/nipy/nipype/pull/2209) From 48117bccdacdab9ff45737e5ce016444710e8acf Mon Sep 17 00:00:00 2001 From: oesteban Date: Tue, 21 Nov 2017 17:21:36 -0800 Subject: [PATCH 519/643] parse_version should be static --- nipype/interfaces/fsl/base.py | 1 + 1 file changed, 1 insertion(+) diff --git a/nipype/interfaces/fsl/base.py b/nipype/interfaces/fsl/base.py index 513612fb50..2bb120e097 100644 --- a/nipype/interfaces/fsl/base.py +++ b/nipype/interfaces/fsl/base.py @@ -64,6 +64,7 @@ class Info(PackageInfo): version_file = os.path.join( os.getenv('FSLDIR'), 'etc', 'fslversion') + @staticmethod def parse_version(raw_info): return raw_info.splitlines()[0] From d159fe9e8927800a7ec18048fc33b843209f517d Mon Sep 17 00:00:00 2001 From: Salma BOUGACHA Date: Wed, 22 Nov 2017 10:52:10 +0100 Subject: [PATCH 520/643] add rbt option --- nipype/interfaces/afni/utils.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/nipype/interfaces/afni/utils.py b/nipype/interfaces/afni/utils.py index 242b5077ee..f836cadb8d 100644 --- a/nipype/interfaces/afni/utils.py +++ b/nipype/interfaces/afni/utils.py @@ -2329,6 +2329,13 @@ class UnifizeInputSpec(AFNICommandInputSpec): argstr='-EPI', requires=['no_duplo', 't2'], xor=['gm']) + rbt = traits.Tuple( + traits.Float(), traits.Float(), traits.Float(), + desc='Specify the 3 parameters for the algorithm:\n' + 'R = radius; same as given by option \'-Urad\', [default=18.3]\n' + 'b = bottom percentile of normalizing data range, [default=70.0]\n' + 'r = top percentile of normalizing data range, [default=80.0]\n', + argstr='-rbt %f %f %f') class UnifizeOutputSpec(TraitedSpec): From 4c9ccdf060d2ce586945e9e0b6533a6b5c59e36a Mon Sep 17 00:00:00 2001 From: salma1601 Date: Wed, 22 Nov 2017 11:26:09 +0100 Subject: [PATCH 521/643] update test --- nipype/interfaces/afni/tests/test_auto_Unifize.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nipype/interfaces/afni/tests/test_auto_Unifize.py b/nipype/interfaces/afni/tests/test_auto_Unifize.py index 6105a9d5c2..e5be64e70d 100644 --- a/nipype/interfaces/afni/tests/test_auto_Unifize.py +++ b/nipype/interfaces/afni/tests/test_auto_Unifize.py @@ -32,6 +32,8 @@ def test_Unifize_inputs(): name_source='in_file', ), outputtype=dict(), + rbt=dict(argstr='-rbt %f %f %f', + ), scale_file=dict(argstr='-ssave %s', ), t2=dict(argstr='-T2', From d1b65be43a7b2bf44344b0863e6a85b7fb07e2e3 Mon Sep 17 00:00:00 2001 From: salma1601 Date: Wed, 22 Nov 2017 11:28:53 +0100 Subject: [PATCH 522/643] add note option for experts --- nipype/interfaces/afni/utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nipype/interfaces/afni/utils.py b/nipype/interfaces/afni/utils.py index f836cadb8d..3e03adda92 100644 --- a/nipype/interfaces/afni/utils.py +++ b/nipype/interfaces/afni/utils.py @@ -2331,7 +2331,8 @@ class UnifizeInputSpec(AFNICommandInputSpec): xor=['gm']) rbt = traits.Tuple( traits.Float(), traits.Float(), traits.Float(), - desc='Specify the 3 parameters for the algorithm:\n' + desc='Option for AFNI experts only.' + 'Specify the 3 parameters for the algorithm:\n' 'R = radius; same as given by option \'-Urad\', [default=18.3]\n' 'b = bottom percentile of normalizing data range, [default=70.0]\n' 'r = top percentile of normalizing data range, [default=80.0]\n', From bb9f5b470defe5a029f40bb47239cde918aea8fd Mon Sep 17 00:00:00 2001 From: Matteo Mancini Date: Wed, 22 Nov 2017 09:55:13 -0500 Subject: [PATCH 523/643] Extended MRtrix3 interface --- .zenodo.json | 4 + doc/users/config_file.rst | 8 +- doc/users/plugins.rst | 4 +- nipype/algorithms/tests/test_auto_CompCor.py | 53 +++++ nipype/algorithms/tests/test_auto_ErrorMap.py | 35 ++++ nipype/algorithms/tests/test_auto_Overlap.py | 47 +++++ nipype/algorithms/tests/test_auto_TSNR.py | 43 ++++ nipype/algorithms/tests/test_mesh_ops.py | 2 +- nipype/interfaces/afni/preprocess.py | 2 +- .../afni/tests/test_auto_TCatSubBrick.py | 48 +++++ nipype/interfaces/afni/utils.py | 2 +- nipype/interfaces/ants/resampling.py | 2 +- .../interfaces/ants/tests/test_resampling.py | 4 +- nipype/interfaces/cmtk/tests/test_nbs.py | 4 +- nipype/interfaces/mrtrix3/__init__.py | 8 +- nipype/interfaces/mrtrix3/preprocess.py | 58 +++++- nipype/interfaces/mrtrix3/reconst.py | 58 +++++- .../mrtrix3/tests/test_auto_DWI2FOD.py | 81 +++++++ .../mrtrix3/tests/test_auto_DWI2Response.py | 75 +++++++ .../mrtrix3/tests/test_auto_DWIExtract.py | 62 ++++++ .../mrtrix3/tests/test_auto_Generate5tt.py | 24 ++- .../mrtrix3/tests/test_auto_Generate5ttFSL.py | 45 ++++ .../mrtrix3/tests/test_auto_MRConvert.py | 66 ++++++ .../mrtrix3/tests/test_auto_MRMath.py | 59 ++++++ nipype/interfaces/mrtrix3/utils.py | 197 +++++++++++++++++- nipype/interfaces/niftyfit/asl.py | 2 +- .../niftyseg/tests/test_auto_PatchMatch.py | 60 ++++++ .../tests/test_auto_SimpleInterface.py | 16 ++ nipype/pipeline/engine/tests/test_utils.py | 2 +- 29 files changed, 1035 insertions(+), 36 deletions(-) create mode 100755 nipype/algorithms/tests/test_auto_CompCor.py create mode 100755 nipype/algorithms/tests/test_auto_ErrorMap.py create mode 100755 nipype/algorithms/tests/test_auto_Overlap.py create mode 100755 nipype/algorithms/tests/test_auto_TSNR.py create mode 100755 nipype/interfaces/afni/tests/test_auto_TCatSubBrick.py create mode 100755 nipype/interfaces/mrtrix3/tests/test_auto_DWI2FOD.py create mode 100755 nipype/interfaces/mrtrix3/tests/test_auto_DWI2Response.py create mode 100755 nipype/interfaces/mrtrix3/tests/test_auto_DWIExtract.py create mode 100755 nipype/interfaces/mrtrix3/tests/test_auto_Generate5ttFSL.py create mode 100755 nipype/interfaces/mrtrix3/tests/test_auto_MRConvert.py create mode 100755 nipype/interfaces/mrtrix3/tests/test_auto_MRMath.py create mode 100755 nipype/interfaces/niftyseg/tests/test_auto_PatchMatch.py create mode 100755 nipype/interfaces/tests/test_auto_SimpleInterface.py diff --git a/.zenodo.json b/.zenodo.json index 41497da6d8..852ff8f91f 100644 --- a/.zenodo.json +++ b/.zenodo.json @@ -538,6 +538,10 @@ "affiliation": "MIT", "name": "Kaczmarzyk, Jakub", "orcid": "0000-0002-5544-7577" + }, + { + "affiliation": "University College London" + "name": "Mancini, Matteo" } ], "keywords": [ diff --git a/doc/users/config_file.rst b/doc/users/config_file.rst index b196047e97..7c10a381c8 100644 --- a/doc/users/config_file.rst +++ b/doc/users/config_file.rst @@ -74,11 +74,11 @@ Execution *display_variable* Override the ``$DISPLAY`` environment variable for interfaces that require - an X server. This option is useful if there is a running X server, but - ``$DISPLAY`` was not defined in nipype's environment. For example, if an X + an X server. This option is useful if there is a running X server, but + ``$DISPLAY`` was not defined in nipype's environment. For example, if an X server is listening on the default port of 6000, set ``display_variable = :0`` - to enable nipype interfaces to use it. It may also point to displays provided - by VNC, `xnest `_ + to enable nipype interfaces to use it. It may also point to displays provided + by VNC, `xnest `_ or `Xvfb `_. If neither ``display_variable`` nor the ``$DISPLAY`` environment variable are set, nipype will try to configure a new virtual server using Xvfb. diff --git a/doc/users/plugins.rst b/doc/users/plugins.rst index 501e7aa1d6..e655e5f6db 100644 --- a/doc/users/plugins.rst +++ b/doc/users/plugins.rst @@ -82,9 +82,9 @@ Optional arguments:: exceed the total amount of resources available (memory and threads), when ``False`` (default), only a warning will be issued. - maxtasksperchild : number of nodes to run on each process before refreshing + maxtasksperchild : number of nodes to run on each process before refreshing the worker (default: 10). - + To distribute processing on a multicore machine, simply call:: diff --git a/nipype/algorithms/tests/test_auto_CompCor.py b/nipype/algorithms/tests/test_auto_CompCor.py new file mode 100755 index 0000000000..34dacaf4d3 --- /dev/null +++ b/nipype/algorithms/tests/test_auto_CompCor.py @@ -0,0 +1,53 @@ +# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT +from __future__ import unicode_literals +from ..confounds import CompCor + + +def test_CompCor_inputs(): + input_map = dict(components_file=dict(usedefault=True, + ), + header_prefix=dict(), + high_pass_cutoff=dict(usedefault=True, + ), + ignore_exception=dict(nohash=True, + usedefault=True, + ), + ignore_initial_volumes=dict(usedefault=True, + ), + mask_files=dict(), + mask_index=dict(requires=['mask_files'], + xor=['merge_method'], + ), + merge_method=dict(requires=['mask_files'], + xor=['mask_index'], + ), + num_components=dict(usedefault=True, + ), + pre_filter=dict(usedefault=True, + ), + realigned_file=dict(mandatory=True, + ), + regress_poly_degree=dict(usedefault=True, + ), + repetition_time=dict(), + save_pre_filter=dict(), + use_regress_poly=dict(deprecated='0.15.0', + new_name='pre_filter', + ), + ) + inputs = CompCor.input_spec() + + for key, metadata in list(input_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(inputs.traits()[key], metakey) == value + + +def test_CompCor_outputs(): + output_map = dict(components_file=dict(), + pre_filter_file=dict(), + ) + outputs = CompCor.output_spec() + + for key, metadata in list(output_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(outputs.traits()[key], metakey) == value diff --git a/nipype/algorithms/tests/test_auto_ErrorMap.py b/nipype/algorithms/tests/test_auto_ErrorMap.py new file mode 100755 index 0000000000..f3d19c5690 --- /dev/null +++ b/nipype/algorithms/tests/test_auto_ErrorMap.py @@ -0,0 +1,35 @@ +# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT +from __future__ import unicode_literals +from ..metrics import ErrorMap + + +def test_ErrorMap_inputs(): + input_map = dict(ignore_exception=dict(nohash=True, + usedefault=True, + ), + in_ref=dict(mandatory=True, + ), + in_tst=dict(mandatory=True, + ), + mask=dict(), + metric=dict(mandatory=True, + usedefault=True, + ), + out_map=dict(), + ) + inputs = ErrorMap.input_spec() + + for key, metadata in list(input_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(inputs.traits()[key], metakey) == value + + +def test_ErrorMap_outputs(): + output_map = dict(distance=dict(), + out_map=dict(), + ) + outputs = ErrorMap.output_spec() + + for key, metadata in list(output_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(outputs.traits()[key], metakey) == value diff --git a/nipype/algorithms/tests/test_auto_Overlap.py b/nipype/algorithms/tests/test_auto_Overlap.py new file mode 100755 index 0000000000..dcabbec296 --- /dev/null +++ b/nipype/algorithms/tests/test_auto_Overlap.py @@ -0,0 +1,47 @@ +# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT +from __future__ import unicode_literals +from ..misc import Overlap + + +def test_Overlap_inputs(): + input_map = dict(bg_overlap=dict(mandatory=True, + usedefault=True, + ), + ignore_exception=dict(nohash=True, + usedefault=True, + ), + mask_volume=dict(), + out_file=dict(usedefault=True, + ), + vol_units=dict(mandatory=True, + usedefault=True, + ), + volume1=dict(mandatory=True, + ), + volume2=dict(mandatory=True, + ), + weighting=dict(usedefault=True, + ), + ) + inputs = Overlap.input_spec() + + for key, metadata in list(input_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(inputs.traits()[key], metakey) == value + + +def test_Overlap_outputs(): + output_map = dict(dice=dict(), + diff_file=dict(), + jaccard=dict(), + labels=dict(), + roi_di=dict(), + roi_ji=dict(), + roi_voldiff=dict(), + volume_difference=dict(), + ) + outputs = Overlap.output_spec() + + for key, metadata in list(output_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(outputs.traits()[key], metakey) == value diff --git a/nipype/algorithms/tests/test_auto_TSNR.py b/nipype/algorithms/tests/test_auto_TSNR.py new file mode 100755 index 0000000000..d906d39e3f --- /dev/null +++ b/nipype/algorithms/tests/test_auto_TSNR.py @@ -0,0 +1,43 @@ +# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT +from __future__ import unicode_literals +from ..misc import TSNR + + +def test_TSNR_inputs(): + input_map = dict(detrended_file=dict(hash_files=False, + usedefault=True, + ), + ignore_exception=dict(nohash=True, + usedefault=True, + ), + in_file=dict(mandatory=True, + ), + mean_file=dict(hash_files=False, + usedefault=True, + ), + regress_poly=dict(), + stddev_file=dict(hash_files=False, + usedefault=True, + ), + tsnr_file=dict(hash_files=False, + usedefault=True, + ), + ) + inputs = TSNR.input_spec() + + for key, metadata in list(input_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(inputs.traits()[key], metakey) == value + + +def test_TSNR_outputs(): + output_map = dict(detrended_file=dict(), + mean_file=dict(), + stddev_file=dict(), + tsnr_file=dict(), + ) + outputs = TSNR.output_spec() + + for key, metadata in list(output_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(outputs.traits()[key], metakey) == value diff --git a/nipype/algorithms/tests/test_mesh_ops.py b/nipype/algorithms/tests/test_mesh_ops.py index 9d510dee2b..d5fbc56825 100644 --- a/nipype/algorithms/tests/test_mesh_ops.py +++ b/nipype/algorithms/tests/test_mesh_ops.py @@ -15,7 +15,7 @@ @pytest.mark.skipif(VTKInfo.no_tvtk(), reason="tvtk is not installed") def test_ident_distances(tmpdir): - tmpdir.chdir() + tmpdir.chdir() in_surf = example_data('surf01.vtk') dist_ident = m.ComputeMeshWarp() diff --git a/nipype/interfaces/afni/preprocess.py b/nipype/interfaces/afni/preprocess.py index c96616273d..3d7d47c673 100644 --- a/nipype/interfaces/afni/preprocess.py +++ b/nipype/interfaces/afni/preprocess.py @@ -3490,7 +3490,7 @@ class Qwarp(AFNICommand): >>> qwarp3.inputs.base_file = 'mni.nii' >>> qwarp3.inputs.allineate = True >>> qwarp3.inputs.allineate_opts = '-cose lpa -verb' - >>> qwarp3.cmdline + >>> qwarp3.cmdline # doctest: +ALLOW_UNICODE "3dQwarp -allineate -allineate_opts '-cose lpa -verb' -base mni.nii -source structural.nii -prefix structural_QW" >>> res3 = qwarp3.run() # doctest: +SKIP """ _cmd = '3dQwarp' diff --git a/nipype/interfaces/afni/tests/test_auto_TCatSubBrick.py b/nipype/interfaces/afni/tests/test_auto_TCatSubBrick.py new file mode 100755 index 0000000000..da3b0fb383 --- /dev/null +++ b/nipype/interfaces/afni/tests/test_auto_TCatSubBrick.py @@ -0,0 +1,48 @@ +# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT +from __future__ import unicode_literals +from ..utils import TCatSubBrick + + +def test_TCatSubBrick_inputs(): + input_map = dict(args=dict(argstr='%s', + ), + environ=dict(nohash=True, + usedefault=True, + ), + ignore_exception=dict(nohash=True, + usedefault=True, + ), + in_files=dict(argstr='%s%s ...', + copyfile=False, + mandatory=True, + position=-1, + ), + num_threads=dict(nohash=True, + usedefault=True, + ), + out_file=dict(argstr='-prefix %s', + genfile=True, + ), + outputtype=dict(), + rlt=dict(argstr='-rlt%s', + position=1, + ), + terminal_output=dict(deprecated='1.0.0', + nohash=True, + ), + ) + inputs = TCatSubBrick.input_spec() + + for key, metadata in list(input_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(inputs.traits()[key], metakey) == value + + +def test_TCatSubBrick_outputs(): + output_map = dict(out_file=dict(), + ) + outputs = TCatSubBrick.output_spec() + + for key, metadata in list(output_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(outputs.traits()[key], metakey) == value diff --git a/nipype/interfaces/afni/utils.py b/nipype/interfaces/afni/utils.py index 242b5077ee..e492b39d47 100644 --- a/nipype/interfaces/afni/utils.py +++ b/nipype/interfaces/afni/utils.py @@ -1674,7 +1674,7 @@ class NwarpCat(AFNICommand): >>> nwarpcat = afni.NwarpCat() >>> nwarpcat.inputs.in_files = ['Q25_warp+tlrc.HEAD', ('IDENT', 'structural.nii')] >>> nwarpcat.inputs.out_file = 'Fred_total_WARP' - >>> nwarpcat.cmdline + >>> nwarpcat.cmdline # doctest: +ALLOW_UNICODE "3dNwarpCat -prefix Fred_total_WARP Q25_warp+tlrc.HEAD 'IDENT(structural.nii)'" >>> res = nwarpcat.run() # doctest: +SKIP diff --git a/nipype/interfaces/ants/resampling.py b/nipype/interfaces/ants/resampling.py index 3ed60a51b1..e268cb43e2 100644 --- a/nipype/interfaces/ants/resampling.py +++ b/nipype/interfaces/ants/resampling.py @@ -75,7 +75,7 @@ class WarpTimeSeriesImageMultiTransform(ANTSCommand): >>> wtsimt.inputs.reference_image = 'ants_deformed.nii.gz' >>> wtsimt.inputs.transformation_series = ['ants_Warp.nii.gz','ants_Affine.txt'] >>> wtsimt.inputs.invert_affine = [1] # # this will invert the 1st Affine file: ants_Affine.txt - >>> wtsimt.cmdline + >>> wtsimt.cmdline # doctest: +ALLOW_UNICODE 'WarpTimeSeriesImageMultiTransform 4 resting.nii resting_wtsimt.nii -R ants_deformed.nii.gz ants_Warp.nii.gz \ -i ants_Affine.txt' """ diff --git a/nipype/interfaces/ants/tests/test_resampling.py b/nipype/interfaces/ants/tests/test_resampling.py index 22dc4446e9..509ebfe844 100644 --- a/nipype/interfaces/ants/tests/test_resampling.py +++ b/nipype/interfaces/ants/tests/test_resampling.py @@ -1,5 +1,5 @@ # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- -# vi: set ft=python sts=4 ts=4 sw=4 et: +# vi: set ft=python sts=4 ts=4 sw=4 et: from nipype.interfaces.ants import WarpImageMultiTransform, WarpTimeSeriesImageMultiTransform import os @@ -66,7 +66,7 @@ def create_wtsimt(): def test_WarpTimeSeriesImageMultiTransform(change_dir, create_wtsimt): wtsimt = create_wtsimt assert wtsimt.cmdline == 'WarpTimeSeriesImageMultiTransform 4 resting.nii resting_wtsimt.nii \ --R ants_deformed.nii.gz ants_Warp.nii.gz ants_Affine.txt' +-R ants_deformed.nii.gz ants_Warp.nii.gz ants_Affine.txt' def test_WarpTimeSeriesImageMultiTransform_invaffine(change_dir, create_wtsimt): diff --git a/nipype/interfaces/cmtk/tests/test_nbs.py b/nipype/interfaces/cmtk/tests/test_nbs.py index 0516390b02..03a7aa8619 100644 --- a/nipype/interfaces/cmtk/tests/test_nbs.py +++ b/nipype/interfaces/cmtk/tests/test_nbs.py @@ -31,12 +31,12 @@ def test_importerror(creating_graphs, tmpdir): graphlist = creating_graphs group1 = graphlist[:3] group2 = graphlist[3:] - + nbs = NetworkBasedStatistic() nbs.inputs.in_group1 = group1 nbs.inputs.in_group2 = group2 nbs.inputs.edge_key = "weight" - + with pytest.raises(ImportError) as e: nbs.run() assert "cviewer library is not available" == str(e.value) diff --git a/nipype/interfaces/mrtrix3/__init__.py b/nipype/interfaces/mrtrix3/__init__.py index 3ff5c8e2e7..81749386f5 100644 --- a/nipype/interfaces/mrtrix3/__init__.py +++ b/nipype/interfaces/mrtrix3/__init__.py @@ -3,9 +3,9 @@ # vi: set ft=python sts=4 ts=4 sw=4 et: # -*- coding: utf-8 -*- -from .utils import (Mesh2PVE, Generate5tt, BrainMask, TensorMetrics, - ComputeTDI, TCK2VTK) -from .preprocess import ResponseSD, ACTPrepareFSL, ReplaceFSwithFIRST +from .utils import (Mesh2PVE, Generate5tt, Generate5ttFSL, BrainMask, TensorMetrics, + ComputeTDI, TCK2VTK, MRMath, MRConvert, DWIExtract) +from .preprocess import DWI2Response, ResponseSD, ACTPrepareFSL, ReplaceFSwithFIRST from .tracking import Tractography -from .reconst import FitTensor, EstimateFOD +from .reconst import DWI2FOD, FitTensor, EstimateFOD from .connectivity import LabelConfig, BuildConnectome diff --git a/nipype/interfaces/mrtrix3/preprocess.py b/nipype/interfaces/mrtrix3/preprocess.py index 141325e25b..1159e89e7a 100644 --- a/nipype/interfaces/mrtrix3/preprocess.py +++ b/nipype/interfaces/mrtrix3/preprocess.py @@ -17,10 +17,64 @@ from ..traits_extension import isdefined from ..base import (CommandLineInputSpec, CommandLine, traits, TraitedSpec, - File) + File, Undefined) from .base import MRTrix3BaseInputSpec, MRTrix3Base +class DWI2ResponseInputSpec(MRTrix3BaseInputSpec): + algorithm = traits.Enum('msmt_5tt','dhollander','tournier','tax', argstr='%s', position=-6, + mandatory=True, desc='response estimation algorithm (multi-tissue)') + dwi_file = File(exists=True, argstr='%s', position=-5, + mandatory=True, desc='input DWI image') + mtt_file = File(argstr='%s', position=-4, desc='input 5tt image') + wm_file = File('wm.txt', argstr='%s', position=-3, usedefault=True, + desc='output WM response text file') + gm_file = File(argstr='%s', position=-2, desc='output GM response text file') + csf_file = File(argstr='%s', position=-1, desc='output CSF response text file') + in_mask = File(exists=True, argstr='-mask %s', + desc='provide initial mask image') + max_sh = traits.Int(8, argstr='-lmax %d', + desc='maximum harmonic degree of response function') + + +class DWI2ResponseOutputSpec(TraitedSpec): + wm_file = File(argstr='%s', desc='output WM response text file') + gm_file = File(argstr='%s', desc='output GM response text file') + csf_file = File(argstr='%s', desc='output CSF response text file') + + +class DWI2Response(MRTrix3Base): + + """ + Estimate response function(s) for spherical deconvolution using the specified algorithm. + + Example + ------- + + >>> import nipype.interfaces.mrtrix3 as mrt + >>> resp = mrt.DWI2Response() + >>> resp.inputs.dwi_file = 'dwi.mif' + >>> resp.inputs.algorithm = 'tournier' + >>> resp.inputs.grad_fsl = ('bvecs', 'bvals') + >>> resp.cmdline # doctest: +ELLIPSIS + 'dwi2response -fslgrad bvecs bvals tournier dwi.mif wm.txt' + >>> resp.run() # doctest: +SKIP + """ + + _cmd = 'dwi2response' + input_spec = DWI2ResponseInputSpec + output_spec = DWI2ResponseOutputSpec + + def _list_outputs(self): + outputs = self.output_spec().get() + outputs['wm_file'] = op.abspath(self.inputs.wm_file) + if self.inputs.gm_file!=Undefined: + outputs['gm_file'] = op.abspath(self.inputs.gm_file) + if self.inputs.csf_file!=Undefined: + outputs['csf_file'] = op.abspath(self.inputs.csf_file) + return outputs + + class ResponseSDInputSpec(MRTrix3BaseInputSpec): in_file = File(exists=True, argstr='%s', mandatory=True, position=-2, desc='input diffusion weighted images') @@ -80,7 +134,7 @@ class ResponseSD(MRTrix3Base): """ Generate an appropriate response function from the image data for - spherical deconvolution. + spherical deconvolution. (previous MRTrix releases) .. [1] Tax, C. M.; Jeurissen, B.; Vos, S. B.; Viergever, M. A. and Leemans, A., Recursive calibration of the fiber response function diff --git a/nipype/interfaces/mrtrix3/reconst.py b/nipype/interfaces/mrtrix3/reconst.py index b608c5514c..b8f2ffef63 100644 --- a/nipype/interfaces/mrtrix3/reconst.py +++ b/nipype/interfaces/mrtrix3/reconst.py @@ -15,7 +15,7 @@ import os.path as op -from ..base import traits, TraitedSpec, File +from ..base import traits, TraitedSpec, File, Undefined from .base import MRTrix3BaseInputSpec, MRTrix3Base @@ -73,6 +73,61 @@ def _list_outputs(self): return outputs +class DWI2FODInputSpec(MRTrix3BaseInputSpec): + algorithm = traits.Enum('csd','msmt_csd', argstr='%s', position=-8, + mandatory=True, desc='FOD algorithm') + dwi_file = File(exists=True, argstr='%s', position=-7, + mandatory=True, desc='input DWI image') + wm_txt = File(argstr='%s', position=-6, + mandatory=True, desc='WM response text file') + wm_odf = File('wm.mif', argstr='%s', position=-5, usedefault=True, + mandatory=True, desc='output WM ODF') + gm_txt = File(argstr='%s', position=-4, desc='GM response text file') + gm_odf = File('gm.mif', argstr='%s', position=-3, desc='output GM ODF') + csf_txt = File(argstr='%s', position=-2, desc='CSF response text file') + csf_odf = File('csf.mif', argstr='%s', position=-1, desc='output CSF ODF') + mask_file = File(exists=True, argstr='-mask %s', desc='mask image') + + +class DWI2FODOutputSpec(TraitedSpec): + wm_odf = File(argstr='%s', desc='output WM ODF') + gm_odf = File(argstr='%s', desc='output GM ODF') + csf_odf = File(argstr='%s', desc='output CSF ODF') + + +class DWI2FOD(MRTrix3Base): + + """ + Estimate fibre orientation distributions from diffusion data using spherical deconvolution + + Example + ------- + + >>> import nipype.interfaces.mrtrix3 as mrt + >>> fod = mrt.DWI2FOD() + >>> fod.inputs.algorithm = 'csd' + >>> fod.inputs.dwi_file = 'dwi.mif' + >>> fod.inputs.wm_txt = 'wm.txt' + >>> fod.inputs.grad_fsl = ('bvecs', 'bvals') + >>> fod.cmdline # doctest: +ELLIPSIS + 'dwi2fod -fslgrad bvecs bvals csd dwi.mif wm.txt wm.mif' + >>> fod.run() # doctest: +SKIP + """ + + _cmd = 'dwi2fod' + input_spec = DWI2FODInputSpec + output_spec = DWI2FODOutputSpec + + def _list_outputs(self): + outputs = self.output_spec().get() + outputs['wm_odf'] = op.abspath(self.inputs.wm_odf) + if self.inputs.gm_odf!=Undefined: + outputs['gm_odf'] = op.abspath(self.inputs.gm_odf) + if self.inputs.csf_odf!=Undefined: + outputs['csf_odf'] = op.abspath(self.inputs.csf_odf) + return outputs + + class EstimateFODInputSpec(MRTrix3BaseInputSpec): in_file = File(exists=True, argstr='%s', mandatory=True, position=-3, desc='input diffusion weighted images') @@ -129,6 +184,7 @@ class EstimateFOD(MRTrix3Base): """ Convert diffusion-weighted images to tensor images + (previous MRTrix releases) Note that this program makes use of implied symmetries in the diffusion profile. First, the fact the signal attenuation profile is real implies diff --git a/nipype/interfaces/mrtrix3/tests/test_auto_DWI2FOD.py b/nipype/interfaces/mrtrix3/tests/test_auto_DWI2FOD.py new file mode 100755 index 0000000000..9501fd656b --- /dev/null +++ b/nipype/interfaces/mrtrix3/tests/test_auto_DWI2FOD.py @@ -0,0 +1,81 @@ +# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT +from __future__ import unicode_literals +from ..reconst import DWI2FOD + + +def test_DWI2FOD_inputs(): + input_map = dict(algorithm=dict(argstr='%s', + mandatory=True, + position=-8, + ), + args=dict(argstr='%s', + ), + bval_scale=dict(argstr='-bvalue_scaling %s', + ), + csf_odf=dict(argstr='%s', + position=-1, + ), + csf_txt=dict(argstr='%s', + position=-2, + ), + dwi_file=dict(argstr='%s', + mandatory=True, + position=-7, + ), + environ=dict(nohash=True, + usedefault=True, + ), + gm_odf=dict(argstr='%s', + position=-3, + ), + gm_txt=dict(argstr='%s', + position=-4, + ), + grad_file=dict(argstr='-grad %s', + ), + grad_fsl=dict(argstr='-fslgrad %s %s', + ), + ignore_exception=dict(nohash=True, + usedefault=True, + ), + in_bval=dict(), + in_bvec=dict(argstr='-fslgrad %s %s', + ), + mask_file=dict(argstr='-mask %s', + ), + nthreads=dict(argstr='-nthreads %d', + nohash=True, + ), + terminal_output=dict(deprecated='1.0.0', + nohash=True, + ), + wm_odf=dict(argstr='%s', + mandatory=True, + position=-5, + usedefault=True, + ), + wm_txt=dict(argstr='%s', + mandatory=True, + position=-6, + ), + ) + inputs = DWI2FOD.input_spec() + + for key, metadata in list(input_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(inputs.traits()[key], metakey) == value + + +def test_DWI2FOD_outputs(): + output_map = dict(csf_odf=dict(argstr='%s', + ), + gm_odf=dict(argstr='%s', + ), + wm_odf=dict(argstr='%s', + ), + ) + outputs = DWI2FOD.output_spec() + + for key, metadata in list(output_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(outputs.traits()[key], metakey) == value diff --git a/nipype/interfaces/mrtrix3/tests/test_auto_DWI2Response.py b/nipype/interfaces/mrtrix3/tests/test_auto_DWI2Response.py new file mode 100755 index 0000000000..5b0836f79b --- /dev/null +++ b/nipype/interfaces/mrtrix3/tests/test_auto_DWI2Response.py @@ -0,0 +1,75 @@ +# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT +from __future__ import unicode_literals +from ..preprocess import DWI2Response + + +def test_DWI2Response_inputs(): + input_map = dict(algorithm=dict(argstr='%s', + mandatory=True, + position=-6, + ), + args=dict(argstr='%s', + ), + bval_scale=dict(argstr='-bvalue_scaling %s', + ), + csf_file=dict(argstr='%s', + position=-1, + ), + dwi_file=dict(argstr='%s', + mandatory=True, + position=-5, + ), + environ=dict(nohash=True, + usedefault=True, + ), + gm_file=dict(argstr='%s', + position=-2, + ), + grad_file=dict(argstr='-grad %s', + ), + grad_fsl=dict(argstr='-fslgrad %s %s', + ), + ignore_exception=dict(nohash=True, + usedefault=True, + ), + in_bval=dict(), + in_bvec=dict(argstr='-fslgrad %s %s', + ), + in_mask=dict(argstr='-mask %s', + ), + max_sh=dict(argstr='-lmax %d', + ), + mtt_file=dict(argstr='%s', + position=-4, + ), + nthreads=dict(argstr='-nthreads %d', + nohash=True, + ), + terminal_output=dict(deprecated='1.0.0', + nohash=True, + ), + wm_file=dict(argstr='%s', + position=-3, + usedefault=True, + ), + ) + inputs = DWI2Response.input_spec() + + for key, metadata in list(input_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(inputs.traits()[key], metakey) == value + + +def test_DWI2Response_outputs(): + output_map = dict(csf_file=dict(argstr='%s', + ), + gm_file=dict(argstr='%s', + ), + wm_file=dict(argstr='%s', + ), + ) + outputs = DWI2Response.output_spec() + + for key, metadata in list(output_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(outputs.traits()[key], metakey) == value diff --git a/nipype/interfaces/mrtrix3/tests/test_auto_DWIExtract.py b/nipype/interfaces/mrtrix3/tests/test_auto_DWIExtract.py new file mode 100755 index 0000000000..22e0890d2f --- /dev/null +++ b/nipype/interfaces/mrtrix3/tests/test_auto_DWIExtract.py @@ -0,0 +1,62 @@ +# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT +from __future__ import unicode_literals +from ..utils import DWIExtract + + +def test_DWIExtract_inputs(): + input_map = dict(args=dict(argstr='%s', + ), + bval_scale=dict(argstr='-bvalue_scaling %s', + ), + bzero=dict(argstr='-bzero', + ), + environ=dict(nohash=True, + usedefault=True, + ), + grad_file=dict(argstr='-grad %s', + ), + grad_fsl=dict(argstr='-fslgrad %s %s', + ), + ignore_exception=dict(nohash=True, + usedefault=True, + ), + in_bval=dict(), + in_bvec=dict(argstr='-fslgrad %s %s', + ), + in_file=dict(argstr='%s', + mandatory=True, + position=-2, + ), + nobzero=dict(argstr='-nobzero', + ), + nthreads=dict(argstr='-nthreads %d', + nohash=True, + ), + out_file=dict(argstr='%s', + mandatory=True, + position=-1, + ), + shell=dict(argstr='-shell %s', + sep=',', + ), + singleshell=dict(argstr='-singleshell', + ), + terminal_output=dict(deprecated='1.0.0', + nohash=True, + ), + ) + inputs = DWIExtract.input_spec() + + for key, metadata in list(input_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(inputs.traits()[key], metakey) == value + + +def test_DWIExtract_outputs(): + output_map = dict(out_file=dict(), + ) + outputs = DWIExtract.output_spec() + + for key, metadata in list(output_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(outputs.traits()[key], metakey) == value diff --git a/nipype/interfaces/mrtrix3/tests/test_auto_Generate5tt.py b/nipype/interfaces/mrtrix3/tests/test_auto_Generate5tt.py index 2afa4e46da..df1aadbe63 100644 --- a/nipype/interfaces/mrtrix3/tests/test_auto_Generate5tt.py +++ b/nipype/interfaces/mrtrix3/tests/test_auto_Generate5tt.py @@ -4,25 +4,37 @@ def test_Generate5tt_inputs(): - input_map = dict(args=dict(argstr='%s', + input_map = dict(algorithm=dict(argstr='%s', + mandatory=True, + position=-3, + ), + args=dict(argstr='%s', + ), + bval_scale=dict(argstr='-bvalue_scaling %s', ), environ=dict(nohash=True, usedefault=True, ), + grad_file=dict(argstr='-grad %s', + ), + grad_fsl=dict(argstr='-fslgrad %s %s', + ), ignore_exception=dict(nohash=True, usedefault=True, ), - in_fast=dict(argstr='%s', - mandatory=True, - position=-3, + in_bval=dict(), + in_bvec=dict(argstr='-fslgrad %s %s', ), - in_first=dict(argstr='%s', + in_file=dict(argstr='%s', + mandatory=True, position=-2, ), + nthreads=dict(argstr='-nthreads %d', + nohash=True, + ), out_file=dict(argstr='%s', mandatory=True, position=-1, - usedefault=True, ), terminal_output=dict(deprecated='1.0.0', nohash=True, diff --git a/nipype/interfaces/mrtrix3/tests/test_auto_Generate5ttFSL.py b/nipype/interfaces/mrtrix3/tests/test_auto_Generate5ttFSL.py new file mode 100755 index 0000000000..97617fa2cc --- /dev/null +++ b/nipype/interfaces/mrtrix3/tests/test_auto_Generate5ttFSL.py @@ -0,0 +1,45 @@ +# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT +from __future__ import unicode_literals +from ..utils import Generate5ttFSL + + +def test_Generate5ttFSL_inputs(): + input_map = dict(args=dict(argstr='%s', + ), + environ=dict(nohash=True, + usedefault=True, + ), + ignore_exception=dict(nohash=True, + usedefault=True, + ), + in_fast=dict(argstr='%s', + mandatory=True, + position=-3, + ), + in_first=dict(argstr='%s', + position=-2, + ), + out_file=dict(argstr='%s', + mandatory=True, + position=-1, + usedefault=True, + ), + terminal_output=dict(deprecated='1.0.0', + nohash=True, + ), + ) + inputs = Generate5ttFSL.input_spec() + + for key, metadata in list(input_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(inputs.traits()[key], metakey) == value + + +def test_Generate5ttFSL_outputs(): + output_map = dict(out_file=dict(), + ) + outputs = Generate5ttFSL.output_spec() + + for key, metadata in list(output_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(outputs.traits()[key], metakey) == value diff --git a/nipype/interfaces/mrtrix3/tests/test_auto_MRConvert.py b/nipype/interfaces/mrtrix3/tests/test_auto_MRConvert.py new file mode 100755 index 0000000000..5dec38ed52 --- /dev/null +++ b/nipype/interfaces/mrtrix3/tests/test_auto_MRConvert.py @@ -0,0 +1,66 @@ +# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT +from __future__ import unicode_literals +from ..utils import MRConvert + + +def test_MRConvert_inputs(): + input_map = dict(args=dict(argstr='%s', + ), + axes=dict(argstr='-axes %s', + sep=',', + ), + bval_scale=dict(argstr='-bvalue_scaling %s', + ), + coord=dict(argstr='-coord %s', + sep=' ', + ), + environ=dict(nohash=True, + usedefault=True, + ), + grad_file=dict(argstr='-grad %s', + ), + grad_fsl=dict(argstr='-fslgrad %s %s', + ), + ignore_exception=dict(nohash=True, + usedefault=True, + ), + in_bval=dict(), + in_bvec=dict(argstr='-fslgrad %s %s', + ), + in_file=dict(argstr='%s', + mandatory=True, + position=-2, + ), + nthreads=dict(argstr='-nthreads %d', + nohash=True, + ), + out_file=dict(argstr='%s', + mandatory=True, + position=-1, + usedefault=True, + ), + scaling=dict(argstr='-scaling %s', + sep=',', + ), + terminal_output=dict(deprecated='1.0.0', + nohash=True, + ), + vox=dict(argstr='-vox %s', + sep=',', + ), + ) + inputs = MRConvert.input_spec() + + for key, metadata in list(input_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(inputs.traits()[key], metakey) == value + + +def test_MRConvert_outputs(): + output_map = dict(out_file=dict(), + ) + outputs = MRConvert.output_spec() + + for key, metadata in list(output_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(outputs.traits()[key], metakey) == value diff --git a/nipype/interfaces/mrtrix3/tests/test_auto_MRMath.py b/nipype/interfaces/mrtrix3/tests/test_auto_MRMath.py new file mode 100755 index 0000000000..963ad07722 --- /dev/null +++ b/nipype/interfaces/mrtrix3/tests/test_auto_MRMath.py @@ -0,0 +1,59 @@ +# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT +from __future__ import unicode_literals +from ..utils import MRMath + + +def test_MRMath_inputs(): + input_map = dict(args=dict(argstr='%s', + ), + axis=dict(argstr='-axis %d', + ), + bval_scale=dict(argstr='-bvalue_scaling %s', + ), + environ=dict(nohash=True, + usedefault=True, + ), + grad_file=dict(argstr='-grad %s', + ), + grad_fsl=dict(argstr='-fslgrad %s %s', + ), + ignore_exception=dict(nohash=True, + usedefault=True, + ), + in_bval=dict(), + in_bvec=dict(argstr='-fslgrad %s %s', + ), + in_file=dict(argstr='%s', + mandatory=True, + position=-3, + ), + nthreads=dict(argstr='-nthreads %d', + nohash=True, + ), + operation=dict(argstr='%s', + mandatory=True, + position=-2, + ), + out_file=dict(argstr='%s', + mandatory=True, + position=-1, + ), + terminal_output=dict(deprecated='1.0.0', + nohash=True, + ), + ) + inputs = MRMath.input_spec() + + for key, metadata in list(input_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(inputs.traits()[key], metakey) == value + + +def test_MRMath_outputs(): + output_map = dict(out_file=dict(), + ) + outputs = MRMath.output_spec() + + for key, metadata in list(output_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(outputs.traits()[key], metakey) == value diff --git a/nipype/interfaces/mrtrix3/utils.py b/nipype/interfaces/mrtrix3/utils.py index 42f3d0c6fd..18397823a7 100644 --- a/nipype/interfaces/mrtrix3/utils.py +++ b/nipype/interfaces/mrtrix3/utils.py @@ -108,7 +108,49 @@ def _list_outputs(self): return outputs -class Generate5ttInputSpec(CommandLineInputSpec): +class Generate5ttInputSpec(MRTrix3BaseInputSpec): + algorithm = traits.Enum('fsl','gif','freesurfer', argstr='%s', position=-3, + mandatory=True, desc='tissue segmentation algorithm') + in_file = File(exists=True, argstr='%s', mandatory=True, position=-2, + desc='input image') + out_file = File(argstr='%s', mandatory=True, position=-1, + desc='output image') + + +class Generate5ttOutputSpec(TraitedSpec): + out_file = File(exists=True, desc='output image') + + +class Generate5tt(MRTrix3Base): + + """ + Generate a 5TT image suitable for ACT using the selected algorithm + uhm + + Example + ------- + + >>> import nipype.interfaces.mrtrix3 as mrt + >>> gen5tt = mrt.Generate5tt() + >>> gen5tt.inputs.in_file = 'T1.nii.gz' + >>> gen5tt.inputs.algorithm = 'fsl' + >>> gen5tt.inputs.out_file = '5tt.mif' + >>> gen5tt.cmdline # doctest: +ELLIPSIS + '5ttgen fsl T1.nii.gz 5tt.mif' + >>> gen5tt.run() # doctest: +SKIP + """ + + _cmd = '5ttgen' + input_spec = Generate5ttInputSpec + output_spec = Generate5ttOutputSpec + + def _list_outputs(self): + outputs = self.output_spec().get() + outputs['out_file'] = op.abspath(self.inputs.out_file) + return outputs + + +class Generate5ttFSLInputSpec(CommandLineInputSpec): in_fast = InputMultiPath( File(exists=True), argstr='%s', mandatory=True, position=-3, desc='list of PVE images from FAST') @@ -120,22 +162,22 @@ class Generate5ttInputSpec(CommandLineInputSpec): usedefault=True, desc='name of output file') -class Generate5ttOutputSpec(TraitedSpec): +class Generate5ttFSLOutputSpec(TraitedSpec): out_file = File(exists=True, desc='segmentation for ACT in 5tt format') -class Generate5tt(CommandLine): +class Generate5ttFSL(CommandLine): """ Concatenate segmentation results from FSL FAST and FIRST into the 5TT - format required for ACT + format required for ACT (previous MRTrix releases) Example ------- >>> import nipype.interfaces.mrtrix3 as mrt - >>> seg = mrt.Generate5tt() + >>> seg = mrt.Generate5ttFSL() >>> seg.inputs.in_fast = ['tpm_00.nii.gz', ... 'tpm_01.nii.gz', 'tpm_02.nii.gz'] >>> seg.inputs.in_first = 'first_merged.nii.gz' @@ -146,8 +188,8 @@ class Generate5tt(CommandLine): """ _cmd = '5ttgen' - input_spec = Generate5ttInputSpec - output_spec = Generate5ttOutputSpec + input_spec = Generate5ttFSLInputSpec + output_spec = Generate5ttFSLOutputSpec def _list_outputs(self): outputs = self.output_spec().get() @@ -401,3 +443,144 @@ def _list_outputs(self): outputs = self.output_spec().get() outputs['out_file'] = op.abspath(self.inputs.out_file) return outputs + + +class DWIExtractInputSpec(MRTrix3BaseInputSpec): + in_file = File(exists=True, argstr='%s', mandatory=True, position=-2, + desc='input image') + out_file = File(argstr='%s', mandatory=True, position=-1, + desc='output image') + bzero = traits.Bool(argstr='-bzero', desc='extract b=0 volumes') + nobzero = traits.Bool(argstr='-nobzero', desc='extract non b=0 volumes') + singleshell = traits.Bool(argstr='-singleshell', desc='extract volumes with a specific shell') + shell = traits.List(traits.Float, sep=',', argstr='-shell %s', + desc='specify one or more gradient shells') + + +class DWIExtractOutputSpec(TraitedSpec): + out_file = File(exists=True, desc='output image') + + +class DWIExtract(MRTrix3Base): + + """ + Extract diffusion-weighted volumes, b=0 volumes, or certain shells from a + DWI dataset + + Example + ------- + + >>> import nipype.interfaces.mrtrix3 as mrt + >>> dwiextract = mrt.DWIExtract() + >>> dwiextract.inputs.in_file = 'dwi.mif' + >>> dwiextract.inputs.bzero = True + >>> dwiextract.inputs.out_file = 'b0vols.mif' + >>> dwiextract.inputs.grad_fsl = ('bvecs', 'bvals') + >>> dwiextract.cmdline # doctest: +ELLIPSIS + 'dwiextract -bzero -fslgrad bvecs bvals dwi.mif b0vols.mif' + >>> dwiextract.run() # doctest: +SKIP + """ + + _cmd = 'dwiextract' + input_spec = DWIExtractInputSpec + output_spec = DWIExtractOutputSpec + + def _list_outputs(self): + outputs = self.output_spec().get() + outputs['out_file'] = op.abspath(self.inputs.out_file) + return outputs + + +class MRConvertInputSpec(MRTrix3BaseInputSpec): + in_file = File(exists=True, argstr='%s', mandatory=True, position=-2, + desc='input image') + out_file = File('dwi.mif', argstr='%s', mandatory=True, position=-1, + usedefault=True, desc='output image') + coord = traits.List(traits.Float, sep=' ', argstr='-coord %s', + desc='extract data at the specified coordinates') + vox = traits.List(traits.Float, sep=',', argstr='-vox %s', + desc='change the voxel dimensions') + axes = traits.List(traits.Int, sep=',', argstr='-axes %s', + desc='specify the axes that will be used') + scaling = traits.List(traits.Float, sep=',', argstr='-scaling %s', + desc='specify the data scaling parameter') + + +class MRConvertOutputSpec(TraitedSpec): + out_file = File(exists=True, desc='output image') + + +class MRConvert(MRTrix3Base): + + """ + Perform conversion between different file types and optionally extract a + subset of the input image + + Example + ------- + + >>> import nipype.interfaces.mrtrix3 as mrt + >>> mrconvert = mrt.MRConvert() + >>> mrconvert.inputs.in_file = 'dwi.nii.gz' + >>> mrconvert.inputs.grad_fsl = ('bvecs', 'bvals') + >>> mrconvert.cmdline # doctest: +ELLIPSIS + 'mrconvert -fslgrad bvecs bvals dwi.nii.gz dwi.mif' + >>> mrconvert.run() # doctest: +SKIP + """ + + _cmd = 'mrconvert' + input_spec = MRConvertInputSpec + output_spec = MRConvertOutputSpec + + def _list_outputs(self): + outputs = self.output_spec().get() + outputs['out_file'] = op.abspath(self.inputs.out_file) + return outputs + + +class MRMathInputSpec(MRTrix3BaseInputSpec): + in_file = File(exists=True, argstr='%s', mandatory=True, position=-3, + desc='input image') + out_file = File(argstr='%s', mandatory=True, position=-1, + desc='output image') + operation = traits.Enum('mean','median','sum','product','rms','norm', + 'var','std','min','max','absmax','magmax', argstr='%s', position=-2, + mandatory=True, desc='operation to computer along a specified axis') + axis = traits.Int(0, argstr='-axis %d', + desc='specfied axis to perform the operation along') + + +class MRMathOutputSpec(TraitedSpec): + out_file = File(exists=True, desc='output image') + + +class MRMath(MRTrix3Base): + + """ + Compute summary statistic on image intensities + along a specified axis of a single image + + Example + ------- + + >>> import nipype.interfaces.mrtrix3 as mrt + >>> mrmath = mrt.MRMath() + >>> mrmath.inputs.in_file = 'dwi.mif' + >>> mrmath.inputs.operation = 'mean' + >>> mrmath.inputs.axis = 3 + >>> mrmath.inputs.out_file = 'dwi_mean.mif' + >>> mrmath.inputs.grad_fsl = ('bvecs', 'bvals') + >>> mrmath.cmdline # doctest: +ELLIPSIS + 'mrmath -axis 3 -fslgrad bvecs bvals dwi.mif mean dwi_mean.mif' + >>> mrmath.run() # doctest: +SKIP + """ + + _cmd = 'mrmath' + input_spec = MRMathInputSpec + output_spec = MRMathOutputSpec + + def _list_outputs(self): + outputs = self.output_spec().get() + outputs['out_file'] = op.abspath(self.inputs.out_file) + return outputs + diff --git a/nipype/interfaces/niftyfit/asl.py b/nipype/interfaces/niftyfit/asl.py index 366f9a6eca..8f95a48192 100644 --- a/nipype/interfaces/niftyfit/asl.py +++ b/nipype/interfaces/niftyfit/asl.py @@ -147,7 +147,7 @@ class FitAsl(NiftyFitCommand): >>> from nipype.interfaces import niftyfit >>> node = niftyfit.FitAsl() >>> node.inputs.source_file = 'asl.nii.gz' - >>> node.cmdline + >>> node.cmdline 'fit_asl -source asl.nii.gz -cbf asl_cbf.nii.gz -error asl_error.nii.gz \ -syn asl_syn.nii.gz' diff --git a/nipype/interfaces/niftyseg/tests/test_auto_PatchMatch.py b/nipype/interfaces/niftyseg/tests/test_auto_PatchMatch.py new file mode 100755 index 0000000000..635eff1c9b --- /dev/null +++ b/nipype/interfaces/niftyseg/tests/test_auto_PatchMatch.py @@ -0,0 +1,60 @@ +# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT +from __future__ import unicode_literals +from ..patchmatch import PatchMatch + + +def test_PatchMatch_inputs(): + input_map = dict(args=dict(argstr='%s', + ), + cs_size=dict(argstr='-cs %i', + ), + database_file=dict(argstr='-db %s', + mandatory=True, + position=3, + ), + environ=dict(nohash=True, + usedefault=True, + ), + ignore_exception=dict(nohash=True, + usedefault=True, + ), + in_file=dict(argstr='-i %s', + mandatory=True, + position=1, + ), + it_num=dict(argstr='-it %i', + ), + mask_file=dict(argstr='-m %s', + mandatory=True, + position=2, + ), + match_num=dict(argstr='-match %i', + ), + out_file=dict(argstr='-o %s', + name_source=['in_file'], + name_template='%s_pm.nii.gz', + position=4, + ), + patch_size=dict(argstr='-size %i', + ), + pm_num=dict(argstr='-pm %i', + ), + terminal_output=dict(deprecated='1.0.0', + nohash=True, + ), + ) + inputs = PatchMatch.input_spec() + + for key, metadata in list(input_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(inputs.traits()[key], metakey) == value + + +def test_PatchMatch_outputs(): + output_map = dict(out_file=dict(), + ) + outputs = PatchMatch.output_spec() + + for key, metadata in list(output_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(outputs.traits()[key], metakey) == value diff --git a/nipype/interfaces/tests/test_auto_SimpleInterface.py b/nipype/interfaces/tests/test_auto_SimpleInterface.py new file mode 100755 index 0000000000..b00d1f9a3c --- /dev/null +++ b/nipype/interfaces/tests/test_auto_SimpleInterface.py @@ -0,0 +1,16 @@ +# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT +from __future__ import unicode_literals +from ..base import SimpleInterface + + +def test_SimpleInterface_inputs(): + input_map = dict(ignore_exception=dict(nohash=True, + usedefault=True, + ), + ) + inputs = SimpleInterface.input_spec() + + for key, metadata in list(input_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(inputs.traits()[key], metakey) == value + diff --git a/nipype/pipeline/engine/tests/test_utils.py b/nipype/pipeline/engine/tests/test_utils.py index 34ec45cfa8..23c7a16fc6 100644 --- a/nipype/pipeline/engine/tests/test_utils.py +++ b/nipype/pipeline/engine/tests/test_utils.py @@ -23,7 +23,7 @@ def test_identitynode_removal(tmpdir): def test_function(arg1, arg2, arg3): import numpy as np return (np.array(arg1) + arg2 + arg3).tolist() - + wf = pe.Workflow(name="testidentity", base_dir=tmpdir.strpath) From ac1412ff103d516eb43fe6e1c893f4ee4aef9ff5 Mon Sep 17 00:00:00 2001 From: mathiasg Date: Wed, 22 Nov 2017 11:33:19 -0500 Subject: [PATCH 524/643] enh: test travis wheel deployment --- .travis.yml | 2 +- setup.cfg | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 setup.cfg diff --git a/.travis.yml b/.travis.yml index 681d3dd765..08d9234675 100644 --- a/.travis.yml +++ b/.travis.yml @@ -59,4 +59,4 @@ deploy: tags: true repo: nipy/nipype branch: master - distributions: "sdist" + distributions: "sdist bdist_wheel" diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000000..3c6e79cf31 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,2 @@ +[bdist_wheel] +universal=1 From ff63da8b2284258dd0f3df5de2be98f45964c27a Mon Sep 17 00:00:00 2001 From: oesteban Date: Wed, 22 Nov 2017 11:04:44 -0800 Subject: [PATCH 525/643] make sure we clear up all stdout, stderr, stdoutstr, stderrstr --- nipype/interfaces/base.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/nipype/interfaces/base.py b/nipype/interfaces/base.py index c2520bec4d..c20666a30b 100644 --- a/nipype/interfaces/base.py +++ b/nipype/interfaces/base.py @@ -1436,6 +1436,7 @@ def _process(drain=0): with open(outfile, 'rb') as ofh: stdoutstr = ofh.read() result['stdout'] = read_stream(stdoutstr, logger=iflogger) + del stdoutstr if errfile is not None: stderr.flush() @@ -1443,17 +1444,16 @@ def _process(drain=0): with open(errfile, 'rb') as efh: stderrstr = efh.read() result['stderr'] = read_stream(stderrstr, logger=iflogger) + del stderrstr if output == 'file': result['merged'] = result['stdout'] result['stdout'] = [] else: - stdoutstr, stderrstr = proc.communicate() + stdout, stderr = proc.communicate() if output == 'allatonce': # Discard stdout and stderr otherwise - result['stdout'] = read_stream(stdoutstr, logger=iflogger) - result['stderr'] = read_stream(stderrstr, logger=iflogger) - del stdoutstr - del stderrstr + result['stdout'] = read_stream(stdout, logger=iflogger) + result['stderr'] = read_stream(stderr, logger=iflogger) runtime.returncode = proc.returncode try: From 73ff136a2cd050028db1cb4ed33cfdbf8e89e4d5 Mon Sep 17 00:00:00 2001 From: oesteban Date: Wed, 22 Nov 2017 11:05:53 -0800 Subject: [PATCH 526/643] fix deprecation message --- nipype/interfaces/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nipype/interfaces/base.py b/nipype/interfaces/base.py index c20666a30b..3c7576b039 100644 --- a/nipype/interfaces/base.py +++ b/nipype/interfaces/base.py @@ -1643,7 +1643,7 @@ def _get_environ(self): def version_from_command(self, flag='-v'): iflogger.warning('version_from_command member of CommandLine was ' - 'Deprecated in nipype-1.0.0 and deleted in 2.0.0') + 'Deprecated in nipype-1.0.0 and deleted in 1.1.0') cmdname = self.cmd.split()[0] env = dict(os.environ) if _exists_in_path(cmdname, env): From 1676c84b24a96757e54bd4e0997de793e9e1a548 Mon Sep 17 00:00:00 2001 From: oesteban Date: Wed, 22 Nov 2017 11:07:42 -0800 Subject: [PATCH 527/643] undo commenting out hacks of DynamicTraitedSpeck.__deepcopy__ --- nipype/interfaces/base.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/nipype/interfaces/base.py b/nipype/interfaces/base.py index 3c7576b039..ba398352a0 100644 --- a/nipype/interfaces/base.py +++ b/nipype/interfaces/base.py @@ -635,16 +635,16 @@ def __deepcopy__(self, memo): return memo[id_self] dup_dict = deepcopy(self.get(), memo) # access all keys - # for key in self.copyable_trait_names(): - # if key in self.__dict__.keys(): - # _ = getattr(self, key) + for key in self.copyable_trait_names(): + if key in self.__dict__.keys(): + _ = getattr(self, key) # clone once dup = self.clone_traits(memo=memo) - # for key in self.copyable_trait_names(): - # try: - # _ = getattr(dup, key) - # except: - # pass + for key in self.copyable_trait_names(): + try: + _ = getattr(dup, key) + except: + pass # clone twice dup = self.clone_traits(memo=memo) dup.trait_set(**dup_dict) From 6d429993e4c1c63a39ebffda474b4f27124f4971 Mon Sep 17 00:00:00 2001 From: oesteban Date: Wed, 22 Nov 2017 11:15:12 -0800 Subject: [PATCH 528/643] [FIX] MultiProc mishandling crashes Fixes #2300 --- nipype/pipeline/plugins/base.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/nipype/pipeline/plugins/base.py b/nipype/pipeline/plugins/base.py index bab2812903..cfa4af4645 100644 --- a/nipype/pipeline/plugins/base.py +++ b/nipype/pipeline/plugins/base.py @@ -197,13 +197,18 @@ def _get_result(self, taskid): def _submit_job(self, node, updatehash=False): raise NotImplementedError - def _report_crash(self, node, result=None): - tb = None + def _report_crash(self, node, result=None, traceback=None): + # Overwrite traceback if comes with result + # to keep compatibility if result is not None: node._result = result['result'] - tb = result['traceback'] - node._traceback = tb - return report_crash(node, traceback=tb) + if 'traceback' in result: + traceback = result['traceback'] + + if traceback is not None: + node._traceback = traceback + + return report_crash(node, traceback=traceback) def _clear_task(self, taskid): raise NotImplementedError From b34b00015762ccf5cd1e9e30794d101e4ccc8b9d Mon Sep 17 00:00:00 2001 From: oesteban Date: Wed, 22 Nov 2017 11:24:09 -0800 Subject: [PATCH 529/643] Update CHANGES [skip ci] --- CHANGES | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES b/CHANGES index f7761f7b91..a4faa2fd69 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,7 @@ Upcoming release (0.14.0) ================ +* FIX: MultiProc mishandling crashes (https://github.com/nipy/nipype/pull/2301) * FIX: Testing maintainance and improvements (https://github.com/nipy/nipype/pull/2252) * ENH: Add elapsed_time and final metric_value to ants.Registration (https://github.com/nipy/nipype/pull/1985) * ENH: Improve terminal_output feature (https://github.com/nipy/nipype/pull/2209) From 47fa79025457805fd5f010bb8c6b8af7a1a3a0d4 Mon Sep 17 00:00:00 2001 From: oesteban Date: Wed, 22 Nov 2017 12:13:28 -0800 Subject: [PATCH 530/643] revert changing _report_crash signature --- nipype/pipeline/plugins/base.py | 15 +++++---------- nipype/pipeline/plugins/multiproc.py | 13 +++++++++---- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/nipype/pipeline/plugins/base.py b/nipype/pipeline/plugins/base.py index cfa4af4645..bab2812903 100644 --- a/nipype/pipeline/plugins/base.py +++ b/nipype/pipeline/plugins/base.py @@ -197,18 +197,13 @@ def _get_result(self, taskid): def _submit_job(self, node, updatehash=False): raise NotImplementedError - def _report_crash(self, node, result=None, traceback=None): - # Overwrite traceback if comes with result - # to keep compatibility + def _report_crash(self, node, result=None): + tb = None if result is not None: node._result = result['result'] - if 'traceback' in result: - traceback = result['traceback'] - - if traceback is not None: - node._traceback = traceback - - return report_crash(node, traceback=traceback) + tb = result['traceback'] + node._traceback = tb + return report_crash(node, traceback=tb) def _clear_task(self, taskid): raise NotImplementedError diff --git a/nipype/pipeline/plugins/multiproc.py b/nipype/pipeline/plugins/multiproc.py index 595b0e1947..4a294c89a6 100644 --- a/nipype/pipeline/plugins/multiproc.py +++ b/nipype/pipeline/plugins/multiproc.py @@ -238,8 +238,10 @@ def _send_procs_to_workers(self, updatehash=False, graph=None): num_subnodes = self.procs[jobid].num_subnodes() except Exception: traceback = format_exception(*sys.exc_info()) - self._report_crash(self.procs[jobid], traceback=traceback) - self._clean_queue(jobid, graph) + self._clean_queue( + jobid, graph, + result={'result': None, 'traceback': traceback} + ) self.proc_pending[jobid] = False continue if num_subnodes > 1: @@ -275,10 +277,13 @@ def _send_procs_to_workers(self, updatehash=False, graph=None): logger.debug('Running node %s on master thread', self.procs[jobid]) try: - self.procs[jobid].run() + self.procs[jobid].run(updatehash=updatehash) except Exception: traceback = format_exception(*sys.exc_info()) - self._report_crash(self.procs[jobid], traceback=traceback) + self._clean_queue( + jobid, graph, + result={'result': None, 'traceback': traceback} + ) # Release resources self._task_finished_cb(jobid) From 7b2b350650da4f97392cd88e73633581f0954288 Mon Sep 17 00:00:00 2001 From: oesteban Date: Wed, 22 Nov 2017 15:08:16 -0800 Subject: [PATCH 531/643] move _exists_in_path to filemanip, and update --- nipype/interfaces/ants/segmentation.py | 7 +++--- nipype/interfaces/base.py | 34 +++++++------------------- nipype/utils/filemanip.py | 34 ++++++++++++++++++++++++++ 3 files changed, 46 insertions(+), 29 deletions(-) diff --git a/nipype/interfaces/ants/segmentation.py b/nipype/interfaces/ants/segmentation.py index 05125cbd69..8b10b0c8db 100644 --- a/nipype/interfaces/ants/segmentation.py +++ b/nipype/interfaces/ants/segmentation.py @@ -13,9 +13,8 @@ import os from ...external.due import BibTeX -from ...utils.filemanip import split_filename, copyfile -from ..base import (TraitedSpec, File, traits, InputMultiPath, OutputMultiPath, isdefined, - _exists_in_path) +from ...utils.filemanip import split_filename, copyfile, which +from ..base import TraitedSpec, File, traits, InputMultiPath, OutputMultiPath, isdefined from .base import ANTSCommand, ANTSCommandInputSpec @@ -724,7 +723,7 @@ def _run_interface(self, runtime, correct_return_codes=(0,)): if ants_path is None: # Check for antsRegistration, which is under bin/ (the $ANTSPATH) instead of # checking for antsBrainExtraction.sh which is under script/ - _, cmd_path = _exists_in_path('antsRegistration', runtime.environ) + cmd_path = which('antsRegistration', runtime.environ) if not cmd_path: raise RuntimeError( 'The environment variable $ANTSPATH is not defined in host "%s", ' diff --git a/nipype/interfaces/base.py b/nipype/interfaces/base.py index facafa5fc9..1e48bc6210 100644 --- a/nipype/interfaces/base.py +++ b/nipype/interfaces/base.py @@ -38,7 +38,7 @@ from ..utils.provenance import write_provenance from ..utils.misc import is_container, trim, str2bool from ..utils.filemanip import (md5, hash_infile, FileNotFoundError, hash_timestamp, - split_filename, to_str, read_stream) + split_filename, to_str, read_stream, which) from .traits_extension import ( traits, Undefined, TraitDictObject, TraitListObject, TraitError, isdefined, File, Directory, DictStrStr, has_metadata, ImageFile) @@ -71,24 +71,6 @@ def __str__(self): return '{}'.format(self.value) -def _exists_in_path(cmd, environ): - """ - Based on a code snippet from - http://orip.org/2009/08/python-checking-if-executable-exists-in.html - """ - - if 'PATH' in environ: - input_environ = environ.get("PATH") - else: - input_environ = os.environ.get("PATH", "") - extensions = os.environ.get("PATHEXT", "").split(os.pathsep) - for directory in input_environ.split(os.pathsep): - base = os.path.join(directory, cmd) - options = [base] + [(base + ext) for ext in extensions] - for filename in options: - if os.path.exists(filename): - return True, filename - return False, None def load_template(name): @@ -1622,7 +1604,7 @@ def _get_environ(self): def version_from_command(self, flag='-v'): cmdname = self.cmd.split()[0] env = dict(os.environ) - if _exists_in_path(cmdname, env): + if which(cmdname, env): out_environ = self._get_environ() env.update(out_environ) proc = sp.Popen(' '.join((cmdname, flag)), @@ -1657,11 +1639,13 @@ def _run_interface(self, runtime, correct_return_codes=(0,)): # which $cmd executable_name = self.cmd.split()[0] - exist_val, cmd_path = _exists_in_path(executable_name, - runtime.environ) - if not exist_val: - raise IOError("command '%s' could not be found on host %s" % - (self.cmd.split()[0], runtime.hostname)) + cmd_path = which(executable_name, runtime.environ) + + if cmd_path is None: + raise IOError( + 'No command "%s" found on host %s. Please check that the ' + 'corresponding package is installed.' % ( + executable_name, runtime.hostname)) runtime.command_path = cmd_path runtime.dependencies = get_dependencies(executable_name, runtime.environ) diff --git a/nipype/utils/filemanip.py b/nipype/utils/filemanip.py index 16eabbb69c..33484bfc53 100644 --- a/nipype/utils/filemanip.py +++ b/nipype/utils/filemanip.py @@ -663,3 +663,37 @@ def dist_is_editable(dist): if os.path.isfile(egg_link): return True return False + + +def which(cmd, env=None, pathext=None): + """ + Return the path to an executable which would be run if the given + cmd was called. If no cmd would be called, return ``None``. + + Code for Python < 3.3 is based on a code snippet from + http://orip.org/2009/08/python-checking-if-executable-exists-in.html + + """ + + if pathext is None: + pathext = os.environ.get("PATHEXT", "").split(os.pathsep) + pathext.insert(0, '') + + path = os.getenv("PATH", os.defpath) + if env and 'PATH' in env: + path = env.get("PATH") + + if sys.version_info >= (3, 3): + for ext in pathext: + filename = shutil.which(cmd + ext, path=path) + if filename: + return filename + return None + + for ext in pathext: + extcmd = cmd + ext + for directory in path.split(os.pathsep): + filename = os.path.join(directory, extcmd) + if os.path.exists(filename): + return filename + return None From f6f97b6097a7c08158ac2f1334ae756f5ce82fcb Mon Sep 17 00:00:00 2001 From: oesteban Date: Wed, 22 Nov 2017 15:46:55 -0800 Subject: [PATCH 532/643] use nipype's which in nifty package --- nipype/interfaces/base.py | 9 ++--- nipype/interfaces/niftyfit/base.py | 5 --- nipype/interfaces/niftyfit/tests/test_asl.py | 14 +++++--- nipype/interfaces/niftyfit/tests/test_dwi.py | 16 ++++++--- nipype/interfaces/niftyfit/tests/test_qt1.py | 14 +++++--- nipype/interfaces/niftyreg/__init__.py | 2 +- nipype/interfaces/niftyreg/base.py | 34 +++++-------------- nipype/interfaces/niftyreg/reg.py | 5 --- nipype/interfaces/niftyreg/regutils.py | 5 --- nipype/interfaces/niftyreg/tests/test_reg.py | 15 +++++--- .../niftyreg/tests/test_regutils.py | 28 +++++++++------ nipype/interfaces/niftyseg/base.py | 15 ++------ .../niftyseg/tests/test_em_interfaces.py | 13 ++++--- .../niftyseg/tests/test_label_fusion.py | 15 +++++--- .../interfaces/niftyseg/tests/test_lesions.py | 13 ++++--- .../interfaces/niftyseg/tests/test_maths.py | 25 ++++++++------ .../niftyseg/tests/test_patchmatch.py | 13 ++++--- .../interfaces/niftyseg/tests/test_stats.py | 15 +++++--- 18 files changed, 137 insertions(+), 119 deletions(-) diff --git a/nipype/interfaces/base.py b/nipype/interfaces/base.py index 1e48bc6210..4f41b43012 100644 --- a/nipype/interfaces/base.py +++ b/nipype/interfaces/base.py @@ -1601,13 +1601,14 @@ def raise_exception(self, runtime): def _get_environ(self): return getattr(self.inputs, 'environ', {}) - def version_from_command(self, flag='-v'): - cmdname = self.cmd.split()[0] + def version_from_command(self, flag='-v', cmd=None): + if cmd is None: + cmd = self.cmd.split()[0] env = dict(os.environ) - if which(cmdname, env): + if which(cmd, env): out_environ = self._get_environ() env.update(out_environ) - proc = sp.Popen(' '.join((cmdname, flag)), + proc = sp.Popen(' '.join((cmd, flag)), shell=True, env=env, stdout=sp.PIPE, diff --git a/nipype/interfaces/niftyfit/base.py b/nipype/interfaces/niftyfit/base.py index a2f64fcd6b..58cbcaed45 100644 --- a/nipype/interfaces/niftyfit/base.py +++ b/nipype/interfaces/niftyfit/base.py @@ -19,16 +19,11 @@ """ import os -import warnings from ..base import CommandLine from ...utils.filemanip import split_filename -warn = warnings.warn -warnings.filterwarnings('always', category=UserWarning) - - class NiftyFitCommand(CommandLine): """ Base support interface for NiftyFit commands. diff --git a/nipype/interfaces/niftyfit/tests/test_asl.py b/nipype/interfaces/niftyfit/tests/test_asl.py index 7d0df3376a..def65d1526 100644 --- a/nipype/interfaces/niftyfit/tests/test_asl.py +++ b/nipype/interfaces/niftyfit/tests/test_asl.py @@ -4,12 +4,18 @@ import pytest -from nipype.interfaces.niftyfit import FitAsl -from nipype.interfaces.niftyreg import no_nifty_package, get_custom_path -from nipype.testing import example_data +from ....utils.filemanip import which +from ....testing import example_data +from ...niftyreg import get_custom_path +from ..niftyfit import FitAsl -@pytest.mark.skipif(no_nifty_package(cmd='fit_asl'), + +def no_nifty_tool(cmd=None): + return which(cmd) is None + + +@pytest.mark.skipif(no_nifty_tool(cmd='fit_asl'), reason="niftyfit is not installed") def test_fit_asl(): """ Testing FitAsl interface.""" diff --git a/nipype/interfaces/niftyfit/tests/test_dwi.py b/nipype/interfaces/niftyfit/tests/test_dwi.py index aee809e9c5..08bb5809df 100644 --- a/nipype/interfaces/niftyfit/tests/test_dwi.py +++ b/nipype/interfaces/niftyfit/tests/test_dwi.py @@ -3,12 +3,18 @@ import pytest -from nipype.interfaces.niftyfit import FitDwi, DwiTool -from nipype.interfaces.niftyreg import no_nifty_package, get_custom_path -from nipype.testing import example_data +from ....utils.filemanip import which +from ....testing import example_data +from ...niftyreg import get_custom_path +from ..niftyfit import FitDwi, DwiTool -@pytest.mark.skipif(no_nifty_package(cmd='fit_dwi'), + +def no_nifty_tool(cmd=None): + return which(cmd) is None + + +@pytest.mark.skipif(no_nifty_tool(cmd='fit_dwi'), reason="niftyfit is not installed") def test_fit_dwi(): """ Testing FitDwi interface.""" @@ -56,7 +62,7 @@ def test_fit_dwi(): assert fit_dwi.cmdline == expected_cmd -@pytest.mark.skipif(no_nifty_package(cmd='dwi_tool'), +@pytest.mark.skipif(no_nifty_tool(cmd='dwi_tool'), reason="niftyfit is not installed") def test_dwi_tool(): """ Testing DwiTool interface.""" diff --git a/nipype/interfaces/niftyfit/tests/test_qt1.py b/nipype/interfaces/niftyfit/tests/test_qt1.py index 2d64a6cec5..fb62038209 100644 --- a/nipype/interfaces/niftyfit/tests/test_qt1.py +++ b/nipype/interfaces/niftyfit/tests/test_qt1.py @@ -4,12 +4,18 @@ import pytest -from nipype.interfaces.niftyfit import FitQt1 -from nipype.interfaces.niftyreg import no_nifty_package, get_custom_path -from nipype.testing import example_data +from ....utils.filemanip import which +from ....testing import example_data +from ...niftyreg import get_custom_path +from ..niftyfit import FitQt1 -@pytest.mark.skipif(no_nifty_package(cmd='fit_qt1'), + +def no_nifty_tool(cmd=None): + return which(cmd) is None + + +@pytest.mark.skipif(no_nifty_tool(cmd='fit_qt1'), reason="niftyfit is not installed") def test_fit_qt1(): """ Testing FitQt1 interface.""" diff --git a/nipype/interfaces/niftyreg/__init__.py b/nipype/interfaces/niftyreg/__init__.py index 64cc60a0ab..04c066dcae 100644 --- a/nipype/interfaces/niftyreg/__init__.py +++ b/nipype/interfaces/niftyreg/__init__.py @@ -9,7 +9,7 @@ Top-level namespace for niftyreg. """ -from .base import no_nifty_package, get_custom_path +from .base import get_custom_path from .reg import RegAladin, RegF3D from .regutils import (RegResample, RegJacobian, RegAverage, RegTools, RegTransform, RegMeasure) diff --git a/nipype/interfaces/niftyreg/base.py b/nipype/interfaces/niftyreg/base.py index bb09d96923..f22796d158 100644 --- a/nipype/interfaces/niftyreg/base.py +++ b/nipype/interfaces/niftyreg/base.py @@ -22,28 +22,18 @@ from builtins import property, super from distutils.version import StrictVersion import os -import shutil -import subprocess -from warnings import warn +from ... import logging from ..base import CommandLine, CommandLineInputSpec, traits, Undefined from ...utils.filemanip import split_filename +iflogger = logging.getLogger('interface') + def get_custom_path(command, env_dir='NIFTYREGDIR'): return os.path.join(os.getenv(env_dir, ''), command) -def no_nifty_package(cmd='reg_f3d'): - try: - return shutil.which(cmd) is None - except AttributeError: # Python < 3.3 - return not any( - [os.path.isfile(os.path.join(path, cmd)) and - os.access(os.path.join(path, cmd), os.X_OK) - for path in os.environ["PATH"].split(os.pathsep)]) - - class NiftyRegCommandInputSpec(CommandLineInputSpec): """Input Spec for niftyreg interfaces.""" # Set the number of omp thread to use @@ -65,18 +55,18 @@ def __init__(self, required_version=None, **inputs): self.num_threads = 1 super(NiftyRegCommand, self).__init__(**inputs) self.required_version = required_version - _version = self.get_version() + _version = self.get_version_from_command() if _version: _version = _version.decode("utf-8") if self._min_version is not None and \ StrictVersion(_version) < StrictVersion(self._min_version): msg = 'A later version of Niftyreg is required (%s < %s)' - warn(msg % (_version, self._min_version)) + iflogger.warning(msg, _version, self._min_version) if required_version is not None: if StrictVersion(_version) != StrictVersion(required_version): msg = 'The version of NiftyReg differs from the required' msg += '(%s != %s)' - warn(msg % (_version, self.required_version)) + iflogger.warning(msg, _version, self.required_version) self.inputs.on_trait_change(self._omp_update, 'omp_core_val') self.inputs.on_trait_change(self._environ_update, 'environ') self._omp_update() @@ -102,7 +92,7 @@ def _environ_update(self): self.inputs.omp_core_val = Undefined def check_version(self): - _version = self.get_version() + _version = self.get_version_from_command() if not _version: raise Exception('Niftyreg not found') # Decoding to string: @@ -116,18 +106,12 @@ def check_version(self): err += '(%s != %s)' raise ValueError(err % (_version, self.required_version)) - def get_version(self): - if no_nifty_package(cmd=self.cmd): - return None - exec_cmd = ''.join((self.cmd, ' -v')) - return subprocess.check_output(exec_cmd, shell=True).strip() - @property def version(self): - return self.get_version() + return self.get_version_from_command() def exists(self): - return self.get_version() is not None + return self.get_version_from_command() is not None def _format_arg(self, name, spec, value): if name == 'omp_core_val': diff --git a/nipype/interfaces/niftyreg/reg.py b/nipype/interfaces/niftyreg/reg.py index fa4a1701ee..bbc49ee2f2 100644 --- a/nipype/interfaces/niftyreg/reg.py +++ b/nipype/interfaces/niftyreg/reg.py @@ -20,17 +20,12 @@ absolute_import) from builtins import staticmethod import os -import warnings from ..base import TraitedSpec, File, traits, isdefined from .base import get_custom_path, NiftyRegCommand, NiftyRegCommandInputSpec from ...utils.filemanip import split_filename -warn = warnings.warn -warnings.filterwarnings('always', category=UserWarning) - - class RegAladinInputSpec(NiftyRegCommandInputSpec): """ Input Spec for RegAladin. """ # Input reference file diff --git a/nipype/interfaces/niftyreg/regutils.py b/nipype/interfaces/niftyreg/regutils.py index 214ccc9a45..4bbb73c687 100644 --- a/nipype/interfaces/niftyreg/regutils.py +++ b/nipype/interfaces/niftyreg/regutils.py @@ -18,7 +18,6 @@ from __future__ import (print_function, division, unicode_literals, absolute_import) from builtins import len, open, property, super -import warnings import os from ..base import TraitedSpec, File, traits, isdefined @@ -26,10 +25,6 @@ from ...utils.filemanip import split_filename -warn = warnings.warn -warnings.filterwarnings('always', category=UserWarning) - - class RegResampleInputSpec(NiftyRegCommandInputSpec): """ Input Spec for RegResample. """ # Input reference file diff --git a/nipype/interfaces/niftyreg/tests/test_reg.py b/nipype/interfaces/niftyreg/tests/test_reg.py index 9a3705fba7..2c88ea20af 100644 --- a/nipype/interfaces/niftyreg/tests/test_reg.py +++ b/nipype/interfaces/niftyreg/tests/test_reg.py @@ -4,13 +4,18 @@ import pytest -from nipype.interfaces.niftyreg import (no_nifty_package, get_custom_path, - RegAladin, RegF3D) -from nipype.testing import example_data +from ....utils.filemanip import which +from ....testing import example_data +from ..niftyreg import ( + get_custom_path, RegAladin, RegF3D) + + +def no_nifty_tool(cmd=None): + return which(cmd) is None @pytest.mark.skipif( - no_nifty_package(cmd='reg_aladin'), + no_nifty_tool(cmd='reg_aladin'), reason="niftyreg is not installed. reg_aladin not found.") def test_reg_aladin(): """ tests for reg_aladin interface""" @@ -48,7 +53,7 @@ def test_reg_aladin(): @pytest.mark.skipif( - no_nifty_package(cmd='reg_f3d'), + no_nifty_tool(cmd='reg_f3d'), reason="niftyreg is not installed. reg_f3d not found.") def test_reg_f3d(): """ tests for reg_f3d interface""" diff --git a/nipype/interfaces/niftyreg/tests/test_regutils.py b/nipype/interfaces/niftyreg/tests/test_regutils.py index 4a8cf18fbf..3a9e5ce558 100644 --- a/nipype/interfaces/niftyreg/tests/test_regutils.py +++ b/nipype/interfaces/niftyreg/tests/test_regutils.py @@ -1,17 +1,23 @@ # -*- coding: utf-8 -*- # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: - -from nipype.interfaces.niftyreg import (no_nifty_package, get_custom_path, - RegAverage, RegResample, RegJacobian, - RegTools, RegMeasure, RegTransform) -from nipype.testing import example_data import os import pytest +from ....utils.filemanip import which +from ....testing import example_data +from ..niftyreg import ( + get_custom_path, RegAverage, RegResample, RegJacobian, + RegTools, RegMeasure, RegTransform +) + + +def no_nifty_tool(cmd=None): + return which(cmd) is None + @pytest.mark.skipif( - no_nifty_package(cmd='reg_resample'), + no_nifty_tool(cmd='reg_resample'), reason="niftyreg is not installed. reg_resample not found.") def test_reg_resample_res(): """ tests for reg_resample interface """ @@ -68,7 +74,7 @@ def test_reg_resample_res(): @pytest.mark.skipif( - no_nifty_package(cmd='reg_jacobian'), + no_nifty_tool(cmd='reg_jacobian'), reason="niftyreg is not installed. reg_jacobian not found.") def test_reg_jacobian_jac(): """ Test interface for RegJacobian """ @@ -132,7 +138,7 @@ def test_reg_jacobian_jac(): @pytest.mark.skipif( - no_nifty_package(cmd='reg_tools'), + no_nifty_tool(cmd='reg_tools'), reason="niftyreg is not installed. reg_tools not found.") def test_reg_tools_mul(): """ tests for reg_tools interface """ @@ -175,7 +181,7 @@ def test_reg_tools_mul(): @pytest.mark.skipif( - no_nifty_package(cmd='reg_average'), + no_nifty_tool(cmd='reg_average'), reason="niftyreg is not installed. reg_average not found.") def test_reg_average(): """ tests for reg_average interface """ @@ -323,7 +329,7 @@ def test_reg_average(): @pytest.mark.skipif( - no_nifty_package(cmd='reg_transform'), + no_nifty_tool(cmd='reg_transform'), reason="niftyreg is not installed. reg_transform not found.") def test_reg_transform_def(): """ tests for reg_transform interface """ @@ -432,7 +438,7 @@ def test_reg_transform_def(): @pytest.mark.skipif( - no_nifty_package(cmd='reg_measure'), + no_nifty_tool(cmd='reg_measure'), reason="niftyreg is not installed. reg_measure not found.") def test_reg_measure(): """ tests for reg_measure interface """ diff --git a/nipype/interfaces/niftyseg/base.py b/nipype/interfaces/niftyseg/base.py index 8025349714..a84fb9eb62 100644 --- a/nipype/interfaces/niftyseg/base.py +++ b/nipype/interfaces/niftyseg/base.py @@ -18,14 +18,7 @@ """ from __future__ import print_function, division, unicode_literals, absolute_import -from ..niftyreg.base import no_nifty_package from ..niftyfit.base import NiftyFitCommand -import subprocess -import warnings - - -warn = warnings.warn -warnings.filterwarnings('always', category=UserWarning) class NiftySegCommand(NiftyFitCommand): @@ -39,9 +32,5 @@ def __init__(self, **inputs): super(NiftySegCommand, self).__init__(**inputs) def get_version(self): - if no_nifty_package(cmd=self.cmd): - return None - # exec_cmd = ''.join((self.cmd, ' --version')) - exec_cmd = 'seg_EM --version' - # Using seg_EM for version (E.G: seg_stats --version doesn't work) - return subprocess.check_output(exec_cmd, shell=True).strip('\n') + return super(NiftySegCommand, self).version_from_command( + cmd='seg_EM', flag='--version') diff --git a/nipype/interfaces/niftyseg/tests/test_em_interfaces.py b/nipype/interfaces/niftyseg/tests/test_em_interfaces.py index 810a782b63..72711c7804 100644 --- a/nipype/interfaces/niftyseg/tests/test_em_interfaces.py +++ b/nipype/interfaces/niftyseg/tests/test_em_interfaces.py @@ -3,12 +3,17 @@ import pytest -from nipype.interfaces.niftyreg import no_nifty_package, get_custom_path -from nipype.interfaces.niftyseg import EM -from nipype.testing import example_data +from ....utils.filemanip import which +from ....testing import example_data +from ...niftyreg import get_custom_path +from ..niftyseg import EM -@pytest.mark.skipif(no_nifty_package(cmd='seg_EM'), +def no_nifty_tool(cmd=None): + return which(cmd) is None + + +@pytest.mark.skipif(no_nifty_tool(cmd='seg_EM'), reason="niftyseg is not installed") def test_seg_em(): diff --git a/nipype/interfaces/niftyseg/tests/test_label_fusion.py b/nipype/interfaces/niftyseg/tests/test_label_fusion.py index f34fc9149f..5b29982b72 100644 --- a/nipype/interfaces/niftyseg/tests/test_label_fusion.py +++ b/nipype/interfaces/niftyseg/tests/test_label_fusion.py @@ -3,12 +3,17 @@ import pytest -from nipype.interfaces.niftyreg import no_nifty_package, get_custom_path -from nipype.interfaces.niftyseg import LabelFusion, CalcTopNCC -from nipype.testing import example_data +from ....utils.filemanip import which +from ....testing import example_data +from ...niftyreg import get_custom_path +from ..niftyseg import LabelFusion, CalcTopNCC -@pytest.mark.skipif(no_nifty_package(cmd='seg_LabFusion'), +def no_nifty_tool(cmd=None): + return which(cmd) is None + + +@pytest.mark.skipif(no_nifty_tool(cmd='seg_LabFusion'), reason="niftyseg is not installed") def test_seg_lab_fusion(): """ Test interfaces for seg_labfusion""" @@ -90,7 +95,7 @@ def test_seg_lab_fusion(): assert mv_node.cmdline == expected_cmd -@pytest.mark.skipif(no_nifty_package(cmd='seg_CalcTopNCC'), +@pytest.mark.skipif(no_nifty_tool(cmd='seg_CalcTopNCC'), reason="niftyseg is not installed") def test_seg_calctopncc(): """ Test interfaces for seg_CalctoNCC""" diff --git a/nipype/interfaces/niftyseg/tests/test_lesions.py b/nipype/interfaces/niftyseg/tests/test_lesions.py index 55250bde92..6783833d95 100644 --- a/nipype/interfaces/niftyseg/tests/test_lesions.py +++ b/nipype/interfaces/niftyseg/tests/test_lesions.py @@ -3,12 +3,17 @@ import pytest -from nipype.interfaces.niftyreg import no_nifty_package, get_custom_path -from nipype.interfaces.niftyseg import FillLesions -from nipype.testing import example_data +from ....utils.filemanip import which +from ....testing import example_data +from ...niftyreg import get_custom_path +from ..niftyseg import FillLesions -@pytest.mark.skipif(no_nifty_package(cmd='seg_FillLesions'), +def no_nifty_tool(cmd=None): + return which(cmd) is None + + +@pytest.mark.skipif(no_nifty_tool(cmd='seg_FillLesions'), reason="niftyseg is not installed") def test_seg_filllesions(): diff --git a/nipype/interfaces/niftyseg/tests/test_maths.py b/nipype/interfaces/niftyseg/tests/test_maths.py index 307adb503d..d58f59653d 100644 --- a/nipype/interfaces/niftyseg/tests/test_maths.py +++ b/nipype/interfaces/niftyseg/tests/test_maths.py @@ -3,14 +3,19 @@ import pytest -from nipype.interfaces.niftyreg import no_nifty_package, get_custom_path -from nipype.interfaces.niftyseg import (UnaryMaths, BinaryMaths, - BinaryMathsInteger, TupleMaths, - Merge) -from nipype.testing import example_data +from ....utils.filemanip import which +from ....testing import example_data +from ...niftyreg import get_custom_path +from ..niftyseg import (UnaryMaths, BinaryMaths, + BinaryMathsInteger, TupleMaths, + Merge) -@pytest.mark.skipif(no_nifty_package(cmd='seg_maths'), +def no_nifty_tool(cmd=None): + return which(cmd) is None + + +@pytest.mark.skipif(no_nifty_tool(cmd='seg_maths'), reason="niftyseg is not installed") def test_unary_maths(): @@ -39,7 +44,7 @@ def test_unary_maths(): assert unarym.cmdline == expected_cmd -@pytest.mark.skipif(no_nifty_package(cmd='seg_maths'), +@pytest.mark.skipif(no_nifty_tool(cmd='seg_maths'), reason="niftyseg is not installed") def test_binary_maths(): @@ -70,7 +75,7 @@ def test_binary_maths(): assert binarym.cmdline == expected_cmd -@pytest.mark.skipif(no_nifty_package(cmd='seg_maths'), +@pytest.mark.skipif(no_nifty_tool(cmd='seg_maths'), reason="niftyseg is not installed") def test_int_binary_maths(): @@ -100,7 +105,7 @@ def test_int_binary_maths(): assert ibinarym.cmdline == expected_cmd -@pytest.mark.skipif(no_nifty_package(cmd='seg_maths'), +@pytest.mark.skipif(no_nifty_tool(cmd='seg_maths'), reason="niftyseg is not installed") def test_tuple_maths(): @@ -134,7 +139,7 @@ def test_tuple_maths(): assert tuplem.cmdline == expected_cmd -@pytest.mark.skipif(no_nifty_package(cmd='seg_maths'), +@pytest.mark.skipif(no_nifty_tool(cmd='seg_maths'), reason="niftyseg is not installed") def test_merge(): diff --git a/nipype/interfaces/niftyseg/tests/test_patchmatch.py b/nipype/interfaces/niftyseg/tests/test_patchmatch.py index b88552fb0d..99771621dd 100644 --- a/nipype/interfaces/niftyseg/tests/test_patchmatch.py +++ b/nipype/interfaces/niftyseg/tests/test_patchmatch.py @@ -3,12 +3,17 @@ import pytest -from nipype.interfaces.niftyreg import no_nifty_package, get_custom_path -from nipype.interfaces.niftyseg import PatchMatch -from nipype.testing import example_data +from ....utils.filemanip import which +from ....testing import example_data +from ...niftyreg import get_custom_path +from ..niftyseg import PatchMatch -@pytest.mark.skipif(no_nifty_package(cmd='seg_PatchMatch'), +def no_nifty_tool(cmd=None): + return which(cmd) is None + + +@pytest.mark.skipif(no_nifty_tool(cmd='seg_PatchMatch'), reason="niftyseg is not installed") def test_seg_patchmatch(): diff --git a/nipype/interfaces/niftyseg/tests/test_stats.py b/nipype/interfaces/niftyseg/tests/test_stats.py index ae3cfbfc6e..985200f1cd 100644 --- a/nipype/interfaces/niftyseg/tests/test_stats.py +++ b/nipype/interfaces/niftyseg/tests/test_stats.py @@ -3,12 +3,17 @@ import pytest -from nipype.interfaces.niftyreg import no_nifty_package, get_custom_path -from nipype.interfaces.niftyseg import UnaryStats, BinaryStats -from nipype.testing import example_data +from ....utils.filemanip import which +from ....testing import example_data +from ...niftyreg import get_custom_path +from ..niftyseg import UnaryStats, BinaryStats -@pytest.mark.skipif(no_nifty_package(cmd='seg_stats'), +def no_nifty_tool(cmd=None): + return which(cmd) is None + + +@pytest.mark.skipif(no_nifty_tool(cmd='seg_stats'), reason="niftyseg is not installed") def test_unary_stats(): """ Test for the seg_stats interfaces """ @@ -35,7 +40,7 @@ def test_unary_stats(): assert unarys.cmdline == expected_cmd -@pytest.mark.skipif(no_nifty_package(cmd='seg_stats'), +@pytest.mark.skipif(no_nifty_tool(cmd='seg_stats'), reason="niftyseg is not installed") def test_binary_stats(): """ Test for the seg_stats interfaces """ From a984f9fd7deb57830b45d072625e91b41b61a9f9 Mon Sep 17 00:00:00 2001 From: oesteban Date: Wed, 22 Nov 2017 15:48:13 -0800 Subject: [PATCH 533/643] ensure which call in ants/segmentation is correct) --- nipype/interfaces/ants/segmentation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nipype/interfaces/ants/segmentation.py b/nipype/interfaces/ants/segmentation.py index 8b10b0c8db..9b620d3841 100644 --- a/nipype/interfaces/ants/segmentation.py +++ b/nipype/interfaces/ants/segmentation.py @@ -723,7 +723,7 @@ def _run_interface(self, runtime, correct_return_codes=(0,)): if ants_path is None: # Check for antsRegistration, which is under bin/ (the $ANTSPATH) instead of # checking for antsBrainExtraction.sh which is under script/ - cmd_path = which('antsRegistration', runtime.environ) + cmd_path = which('antsRegistration', env=runtime.environ) if not cmd_path: raise RuntimeError( 'The environment variable $ANTSPATH is not defined in host "%s", ' From 8b56e12858686997fd1f7323dd17f279122c329d Mon Sep 17 00:00:00 2001 From: oesteban Date: Wed, 22 Nov 2017 15:49:03 -0800 Subject: [PATCH 534/643] ensure which calls in interfaces/base are correct --- nipype/interfaces/base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nipype/interfaces/base.py b/nipype/interfaces/base.py index 4f41b43012..06702eb725 100644 --- a/nipype/interfaces/base.py +++ b/nipype/interfaces/base.py @@ -1605,7 +1605,7 @@ def version_from_command(self, flag='-v', cmd=None): if cmd is None: cmd = self.cmd.split()[0] env = dict(os.environ) - if which(cmd, env): + if which(cmd, env=env): out_environ = self._get_environ() env.update(out_environ) proc = sp.Popen(' '.join((cmd, flag)), @@ -1640,7 +1640,7 @@ def _run_interface(self, runtime, correct_return_codes=(0,)): # which $cmd executable_name = self.cmd.split()[0] - cmd_path = which(executable_name, runtime.environ) + cmd_path = which(executable_name, env=runtime.environ) if cmd_path is None: raise IOError( From 6676d220dee897e51cb9aece8178c5bf99d1c543 Mon Sep 17 00:00:00 2001 From: oesteban Date: Wed, 22 Nov 2017 15:54:34 -0800 Subject: [PATCH 535/643] cleaning up imports --- nipype/interfaces/base.py | 12 +++--------- nipype/interfaces/traits_extension.py | 17 ++++++++++++----- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/nipype/interfaces/base.py b/nipype/interfaces/base.py index 06702eb725..5fc44b2d2a 100644 --- a/nipype/interfaces/base.py +++ b/nipype/interfaces/base.py @@ -9,11 +9,8 @@ Requires Packages to be installed """ from __future__ import print_function, division, unicode_literals, absolute_import -from future import standard_library -standard_library.install_aliases() from builtins import range, object, open, str, bytes -from configparser import NoOptionError from copy import deepcopy import datetime from datetime import datetime as dt @@ -26,7 +23,6 @@ import select import subprocess as sp import sys -import time from textwrap import wrap from warnings import warn import simplejson as json @@ -44,6 +40,9 @@ File, Directory, DictStrStr, has_metadata, ImageFile) from ..external.due import due +from future import standard_library +standard_library.install_aliases() + nipype_version = Version(__version__) iflogger = logging.getLogger('interface') @@ -55,11 +54,6 @@ __docformat__ = 'restructuredtext' -class Str(traits.Unicode): - """Replacement for the default traits.Str based in bytes""" - -traits.Str = Str - class NipypeInterfaceError(Exception): """Custom error for interfaces""" diff --git a/nipype/interfaces/traits_extension.py b/nipype/interfaces/traits_extension.py index 0e84c15bce..418e49d58e 100644 --- a/nipype/interfaces/traits_extension.py +++ b/nipype/interfaces/traits_extension.py @@ -18,13 +18,11 @@ """ from __future__ import print_function, division, unicode_literals, absolute_import -from builtins import filter, object, str, bytes +from builtins import str, bytes import os # perform all external trait imports here -import traits -if traits.__version__ < '3.7.0': - raise ImportError('Traits version 3.7.0 or higher must be installed') +from traits import __version__ as traits_version import traits.api as traits from traits.trait_handlers import TraitDictObject, TraitListObject from traits.trait_errors import TraitError @@ -32,9 +30,18 @@ from traits.api import BaseUnicode from traits.api import Unicode +if traits_version < '3.7.0': + raise ImportError('Traits version 3.7.0 or higher must be installed') DictStrStr = traits.Dict((bytes, str), (bytes, str)) -Str = Unicode + + +class Str(traits.Unicode): + """Replacement for the default traits.Str based in bytes""" + + +traits.Str = Str + class BaseFile(BaseUnicode): """ Defines a trait whose value must be the name of a file. From d6a4b906b3f4a16ae41f51dd5679ecc20fc9dd71 Mon Sep 17 00:00:00 2001 From: oesteban Date: Wed, 22 Nov 2017 16:01:40 -0800 Subject: [PATCH 536/643] move from base with deprecation the load_template method --- nipype/interfaces/base.py | 38 +++++++++++++--------------------- nipype/interfaces/fsl/model.py | 25 +++++++++++++++++++++- 2 files changed, 38 insertions(+), 25 deletions(-) diff --git a/nipype/interfaces/base.py b/nipype/interfaces/base.py index 5fc44b2d2a..54660144ca 100644 --- a/nipype/interfaces/base.py +++ b/nipype/interfaces/base.py @@ -19,7 +19,6 @@ import os import re import platform -from string import Template import select import subprocess as sp import sys @@ -65,29 +64,6 @@ def __str__(self): return '{}'.format(self.value) - - -def load_template(name): - """Load a template from the script_templates directory - - Parameters - ---------- - name : str - The name of the file to load - - Returns - ------- - template : string.Template - - """ - full_fname = os.path.join(os.path.dirname(__file__), - 'script_templates', name) - template_file = open(full_fname) - template = Template(template_file.read()) - template_file.close() - return template - - class Bunch(object): """Dictionary-like class that provides attribute-style access to it's items. @@ -2050,3 +2026,17 @@ class InputMultiPath(MultiPath): """ pass + + +def load_template(name): + """ + Deprecated stub for backwards compatibility, + please use nipype.interfaces.fsl.model.load_template + + """ + from .fsl.model import load_template + iflogger.warning( + 'Deprecated in 1.0.0, and will be removed in 1.1.0, ' + 'please use nipype.interfaces.fsl.model.load_template instead.' + ) + return load_template(name) diff --git a/nipype/interfaces/fsl/model.py b/nipype/interfaces/fsl/model.py index 701ee757db..9c55404106 100644 --- a/nipype/interfaces/fsl/model.py +++ b/nipype/interfaces/fsl/model.py @@ -17,6 +17,7 @@ import os from glob import glob from shutil import rmtree +from string import Template import numpy as np from nibabel import load @@ -25,12 +26,13 @@ from ...utils.filemanip import list_to_filename, filename_to_list from ...utils.misc import human_order_sorted from ...external.due import BibTeX -from ..base import (load_template, File, traits, isdefined, +from ..base import (File, traits, isdefined, TraitedSpec, BaseInterface, Directory, InputMultiPath, OutputMultiPath, BaseInterfaceInputSpec) from .base import FSLCommand, FSLCommandInputSpec, Info + class Level1DesignInputSpec(BaseInterfaceInputSpec): interscan_interval = traits.Float(mandatory=True, desc='Interscan interval (in secs)') @@ -2168,3 +2170,24 @@ def _list_outputs(self): self.inputs.out_vnscales_name) return outputs + + +def load_template(name): + """Load a template from the script_templates directory + + Parameters + ---------- + name : str + The name of the file to load + + Returns + ------- + template : string.Template + + """ + full_fname = os.path.join(os.path.dirname(__file__), + 'script_templates', name) + template_file = open(full_fname) + template = Template(template_file.read()) + template_file.close() + return template From 833d7169bbbef9b6ecd2ed4f6e3d7e047dc78042 Mon Sep 17 00:00:00 2001 From: oesteban Date: Wed, 22 Nov 2017 16:09:04 -0800 Subject: [PATCH 537/643] mv Multi- traits to traits_extension --- nipype/interfaces/base.py | 118 +-------------------- nipype/interfaces/traits_extension.py | 142 ++++++++++++++++++++++++-- 2 files changed, 133 insertions(+), 127 deletions(-) diff --git a/nipype/interfaces/base.py b/nipype/interfaces/base.py index 54660144ca..aa2c08f99e 100644 --- a/nipype/interfaces/base.py +++ b/nipype/interfaces/base.py @@ -27,7 +27,6 @@ import simplejson as json from dateutil.parser import parse as parseutc from packaging.version import Version -import collections from .. import config, logging, LooseVersion, __version__ from ..utils.provenance import write_provenance @@ -36,7 +35,8 @@ split_filename, to_str, read_stream, which) from .traits_extension import ( traits, Undefined, TraitDictObject, TraitListObject, TraitError, isdefined, - File, Directory, DictStrStr, has_metadata, ImageFile) + File, Directory, Str, DictStrStr, has_metadata, ImageFile, + MultiPath, OutputMultiPath, InputMultiPath) from ..external.due import due from future import standard_library @@ -1914,120 +1914,6 @@ def parse_version(raw_info): raise NotImplementedError -class MultiPath(traits.List): - """ Abstract class - shared functionality of input and output MultiPath - """ - - def validate(self, object, name, value): - - # want to treat range and other sequences (except str) as list - if not isinstance(value, (str, bytes)) and isinstance(value, collections.Sequence): - value = list(value) - - if not isdefined(value) or \ - (isinstance(value, list) and len(value) == 0): - return Undefined - - newvalue = value - - if not isinstance(value, list) \ - or (self.inner_traits() and - isinstance(self.inner_traits()[0].trait_type, - traits.List) and not - isinstance(self.inner_traits()[0].trait_type, - InputMultiPath) and - isinstance(value, list) and - value and not - isinstance(value[0], list)): - newvalue = [value] - value = super(MultiPath, self).validate(object, name, newvalue) - - if value: - return value - - self.error(object, name, value) - - -class OutputMultiPath(MultiPath): - """ Implements a user friendly traits that accepts one or more - paths to files or directories. This is the output version which - return a single string whenever possible (when it was set to a - single value or a list of length 1). Default value of this trait - is _Undefined. It does not accept empty lists. - - XXX This should only be used as a final resort. We should stick to - established Traits to the extent possible. - - XXX This needs to be vetted by somebody who understands traits - - >>> from nipype.interfaces.base import OutputMultiPath - >>> class A(TraitedSpec): - ... foo = OutputMultiPath(File(exists=False)) - >>> a = A() - >>> a.foo - - - >>> a.foo = '/software/temp/foo.txt' - >>> a.foo - '/software/temp/foo.txt' - - >>> a.foo = ['/software/temp/foo.txt'] - >>> a.foo - '/software/temp/foo.txt' - - >>> a.foo = ['/software/temp/foo.txt', '/software/temp/goo.txt'] - >>> a.foo - ['/software/temp/foo.txt', '/software/temp/goo.txt'] - - """ - - def get(self, object, name): - value = self.get_value(object, name) - if len(value) == 0: - return Undefined - elif len(value) == 1: - return value[0] - else: - return value - - def set(self, object, name, value): - self.set_value(object, name, value) - - -class InputMultiPath(MultiPath): - """ Implements a user friendly traits that accepts one or more - paths to files or directories. This is the input version which - always returns a list. Default value of this trait - is _Undefined. It does not accept empty lists. - - XXX This should only be used as a final resort. We should stick to - established Traits to the extent possible. - - XXX This needs to be vetted by somebody who understands traits - - >>> from nipype.interfaces.base import InputMultiPath - >>> class A(TraitedSpec): - ... foo = InputMultiPath(File(exists=False)) - >>> a = A() - >>> a.foo - - - >>> a.foo = '/software/temp/foo.txt' - >>> a.foo - ['/software/temp/foo.txt'] - - >>> a.foo = ['/software/temp/foo.txt'] - >>> a.foo - ['/software/temp/foo.txt'] - - >>> a.foo = ['/software/temp/foo.txt', '/software/temp/goo.txt'] - >>> a.foo - ['/software/temp/foo.txt', '/software/temp/goo.txt'] - - """ - pass - - def load_template(name): """ Deprecated stub for backwards compatibility, diff --git a/nipype/interfaces/traits_extension.py b/nipype/interfaces/traits_extension.py index 418e49d58e..03ed80c272 100644 --- a/nipype/interfaces/traits_extension.py +++ b/nipype/interfaces/traits_extension.py @@ -20,6 +20,7 @@ from builtins import str, bytes import os +import collections # perform all external trait imports here from traits import __version__ as traits_version @@ -30,13 +31,17 @@ from traits.api import BaseUnicode from traits.api import Unicode +from future import standard_library + if traits_version < '3.7.0': raise ImportError('Traits version 3.7.0 or higher must be installed') +standard_library.install_aliases() + DictStrStr = traits.Dict((bytes, str), (bytes, str)) -class Str(traits.Unicode): +class Str(Unicode): """Replacement for the default traits.Str based in bytes""" @@ -234,16 +239,17 @@ def __init__(self, value='', auto_set=False, entries=0, # - uncompressed (tuple[0]) extension # - compressed (tuple[1]) extension img_fmt_types = { - 'nifti1': [('.nii', '.nii.gz'), - (('.hdr', '.img'), ('.hdr', '.img.gz'))], - 'mgh': [('.mgh', '.mgz'), ('.mgh', '.mgh.gz')], - 'nifti2': [('.nii', '.nii.gz')], - 'cifti2': [('.nii', '.nii.gz')], - 'gifti': [('.gii', '.gii.gz')], - 'dicom': [('.dcm', '.dcm'), ('.IMA', '.IMA'), ('.tar', '.tar.gz')], - 'nrrd': [('.nrrd', 'nrrd'), ('nhdr', 'nhdr')], - 'afni': [('.HEAD', '.HEAD'), ('.BRIK', '.BRIK')] - } + 'nifti1': [('.nii', '.nii.gz'), + (('.hdr', '.img'), ('.hdr', '.img.gz'))], + 'mgh': [('.mgh', '.mgz'), ('.mgh', '.mgh.gz')], + 'nifti2': [('.nii', '.nii.gz')], + 'cifti2': [('.nii', '.nii.gz')], + 'gifti': [('.gii', '.gii.gz')], + 'dicom': [('.dcm', '.dcm'), ('.IMA', '.IMA'), ('.tar', '.tar.gz')], + 'nrrd': [('.nrrd', 'nrrd'), ('nhdr', 'nhdr')], + 'afni': [('.HEAD', '.HEAD'), ('.BRIK', '.BRIK')] +} + class ImageFile(File): """ Defines a trait of specific neuroimaging files """ @@ -341,3 +347,117 @@ def has_metadata(trait, metadata, value=None, recursive=True): count += has_metadata(handler, metadata, recursive) return count > 0 + + +class MultiPath(traits.List): + """ Abstract class - shared functionality of input and output MultiPath + """ + + def validate(self, object, name, value): + + # want to treat range and other sequences (except str) as list + if not isinstance(value, (str, bytes)) and isinstance(value, collections.Sequence): + value = list(value) + + if not isdefined(value) or \ + (isinstance(value, list) and len(value) == 0): + return Undefined + + newvalue = value + + if not isinstance(value, list) \ + or (self.inner_traits() and + isinstance(self.inner_traits()[0].trait_type, + traits.List) and not + isinstance(self.inner_traits()[0].trait_type, + InputMultiPath) and + isinstance(value, list) and + value and not + isinstance(value[0], list)): + newvalue = [value] + value = super(MultiPath, self).validate(object, name, newvalue) + + if value: + return value + + self.error(object, name, value) + + +class OutputMultiPath(MultiPath): + """ Implements a user friendly traits that accepts one or more + paths to files or directories. This is the output version which + return a single string whenever possible (when it was set to a + single value or a list of length 1). Default value of this trait + is _Undefined. It does not accept empty lists. + + XXX This should only be used as a final resort. We should stick to + established Traits to the extent possible. + + XXX This needs to be vetted by somebody who understands traits + + >>> from nipype.interfaces.base import OutputMultiPath + >>> class A(TraitedSpec): + ... foo = OutputMultiPath(File(exists=False)) + >>> a = A() + >>> a.foo + + + >>> a.foo = '/software/temp/foo.txt' + >>> a.foo + '/software/temp/foo.txt' + + >>> a.foo = ['/software/temp/foo.txt'] + >>> a.foo + '/software/temp/foo.txt' + + >>> a.foo = ['/software/temp/foo.txt', '/software/temp/goo.txt'] + >>> a.foo + ['/software/temp/foo.txt', '/software/temp/goo.txt'] + + """ + + def get(self, object, name): + value = self.get_value(object, name) + if len(value) == 0: + return Undefined + elif len(value) == 1: + return value[0] + else: + return value + + def set(self, object, name, value): + self.set_value(object, name, value) + + +class InputMultiPath(MultiPath): + """ Implements a user friendly traits that accepts one or more + paths to files or directories. This is the input version which + always returns a list. Default value of this trait + is _Undefined. It does not accept empty lists. + + XXX This should only be used as a final resort. We should stick to + established Traits to the extent possible. + + XXX This needs to be vetted by somebody who understands traits + + >>> from nipype.interfaces.base import InputMultiPath + >>> class A(TraitedSpec): + ... foo = InputMultiPath(File(exists=False)) + >>> a = A() + >>> a.foo + + + >>> a.foo = '/software/temp/foo.txt' + >>> a.foo + ['/software/temp/foo.txt'] + + >>> a.foo = ['/software/temp/foo.txt'] + >>> a.foo + ['/software/temp/foo.txt'] + + >>> a.foo = ['/software/temp/foo.txt', '/software/temp/goo.txt'] + >>> a.foo + ['/software/temp/foo.txt', '/software/temp/goo.txt'] + + """ + pass From 82411aee2f0ade4c1b98e33382bf86ea40918c54 Mon Sep 17 00:00:00 2001 From: oesteban Date: Wed, 22 Nov 2017 16:58:25 -0800 Subject: [PATCH 538/643] deep refactor of nipype.interfaces.base --- nipype/interfaces/base/__init__.py | 25 + nipype/interfaces/{base.py => base/core.py} | 763 +----------------- nipype/interfaces/base/specs.py | 387 +++++++++ nipype/interfaces/base/support.py | 309 +++++++ .../interfaces/{ => base}/traits_extension.py | 0 nipype/interfaces/setup.py | 1 + nipype/utils/filemanip.py | 63 +- 7 files changed, 811 insertions(+), 737 deletions(-) create mode 100644 nipype/interfaces/base/__init__.py rename nipype/interfaces/{base.py => base/core.py} (60%) create mode 100644 nipype/interfaces/base/specs.py create mode 100644 nipype/interfaces/base/support.py rename nipype/interfaces/{ => base}/traits_extension.py (100%) diff --git a/nipype/interfaces/base/__init__.py b/nipype/interfaces/base/__init__.py new file mode 100644 index 0000000000..917639f154 --- /dev/null +++ b/nipype/interfaces/base/__init__.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- +# vi: set ft=python sts=4 ts=4 sw=4 et: +""" +Nipype base interfaces +---------------------- + +This module defines the API of all nipype interfaces. + +""" +from .core import ( + BaseInterface, SimpleInterface, CommandLine, StdOutCommandLine, + MpiCommandLine, SEMLikeCommandLine, PackageInfo +) + +from .specs import ( + BaseTraitedSpec, BaseInterfaceInputSpec, CommandLineInputSpec, +) + +from .traits_extension import ( + traits, Undefined, TraitDictObject, TraitListObject, TraitError, isdefined, + File, Directory, Str, DictStrStr, has_metadata, ImageFile, + MultiPath, OutputMultiPath, InputMultiPath) + +from .support import load_template diff --git a/nipype/interfaces/base.py b/nipype/interfaces/base/core.py similarity index 60% rename from nipype/interfaces/base.py rename to nipype/interfaces/base/core.py index aa2c08f99e..8374d5ce36 100644 --- a/nipype/interfaces/base.py +++ b/nipype/interfaces/base/core.py @@ -2,20 +2,22 @@ # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """ -Package contains interfaces for using existing functionality in other packages +Nipype interfaces core +...................... -Exaples FSL, matlab/SPM , afni -Requires Packages to be installed +Defines the ``Interface`` API and the body of the +most basic interfaces. +The I/O specifications corresponding to these base +interfaces are found in the ``specs`` module. + """ from __future__ import print_function, division, unicode_literals, absolute_import -from builtins import range, object, open, str, bytes +from builtins import object, open, str, bytes from copy import deepcopy -import datetime from datetime import datetime as dt import errno -import locale import os import re import platform @@ -23,29 +25,34 @@ import subprocess as sp import sys from textwrap import wrap -from warnings import warn import simplejson as json from dateutil.parser import parse as parseutc -from packaging.version import Version - -from .. import config, logging, LooseVersion, __version__ -from ..utils.provenance import write_provenance -from ..utils.misc import is_container, trim, str2bool -from ..utils.filemanip import (md5, hash_infile, FileNotFoundError, hash_timestamp, - split_filename, to_str, read_stream, which) -from .traits_extension import ( - traits, Undefined, TraitDictObject, TraitListObject, TraitError, isdefined, - File, Directory, Str, DictStrStr, has_metadata, ImageFile, - MultiPath, OutputMultiPath, InputMultiPath) -from ..external.due import due + + +from ... import config, logging, LooseVersion +from ...utils.provenance import write_provenance +from ...utils.misc import trim, str2bool +from ...utils.filemanip import ( + FileNotFoundError, split_filename, read_stream, which, + get_dependencies, canonicalize_env as _canonicalize_env) + +from ...external.due import due + +from .traits_extension import traits, isdefined, TraitError +from .specs import ( + BaseInterfaceInputSpec, CommandLineInputSpec, + StdOutCommandLineInputSpec, MpiCommandLineInputSpec +) +from .support import ( + Bunch, Stream, InterfaceResult, NipypeInterfaceError +) from future import standard_library standard_library.install_aliases() -nipype_version = Version(__version__) + iflogger = logging.getLogger('interface') -FLOAT_FORMAT = '{:.10f}'.format PY35 = sys.version_info >= (3, 5) PY3 = sys.version_info[0] > 2 VALID_TERMINAL_OUTPUT = ['stream', 'allatonce', 'file', 'file_split', @@ -53,563 +60,6 @@ __docformat__ = 'restructuredtext' - -class NipypeInterfaceError(Exception): - """Custom error for interfaces""" - - def __init__(self, value): - self.value = value - - def __str__(self): - return '{}'.format(self.value) - - -class Bunch(object): - """Dictionary-like class that provides attribute-style access to it's items. - - A `Bunch` is a simple container that stores it's items as class - attributes. Internally all items are stored in a dictionary and - the class exposes several of the dictionary methods. - - Examples - -------- - >>> from nipype.interfaces.base import Bunch - >>> inputs = Bunch(infile='subj.nii', fwhm=6.0, register_to_mean=True) - >>> inputs - Bunch(fwhm=6.0, infile='subj.nii', register_to_mean=True) - >>> inputs.register_to_mean = False - >>> inputs - Bunch(fwhm=6.0, infile='subj.nii', register_to_mean=False) - - - Notes - ----- - The Bunch pattern came from the Python Cookbook: - - .. [1] A. Martelli, D. Hudgeon, "Collecting a Bunch of Named - Items", Python Cookbook, 2nd Ed, Chapter 4.18, 2005. - - """ - - def __init__(self, *args, **kwargs): - self.__dict__.update(*args, **kwargs) - - def update(self, *args, **kwargs): - """update existing attribute, or create new attribute - - Note: update is very much like HasTraits.set""" - self.__dict__.update(*args, **kwargs) - - def items(self): - """iterates over bunch attributes as key, value pairs""" - return list(self.__dict__.items()) - - def iteritems(self): - """iterates over bunch attributes as key, value pairs""" - warn('iteritems is deprecated, use items instead') - return list(self.items()) - - def get(self, *args): - """Support dictionary get() functionality - """ - return self.__dict__.get(*args) - - def set(self, **kwargs): - """Support dictionary get() functionality - """ - return self.__dict__.update(**kwargs) - - def dictcopy(self): - """returns a deep copy of existing Bunch as a dictionary""" - return deepcopy(self.__dict__) - - def __repr__(self): - """representation of the sorted Bunch as a string - - Currently, this string representation of the `inputs` Bunch of - interfaces is hashed to determine if the process' dirty-bit - needs setting or not. Till that mechanism changes, only alter - this after careful consideration. - """ - outstr = ['Bunch('] - first = True - for k, v in sorted(self.items()): - if not first: - outstr.append(', ') - if isinstance(v, dict): - pairs = [] - for key, value in sorted(v.items()): - pairs.append("'%s': %s" % (key, value)) - v = '{' + ', '.join(pairs) + '}' - outstr.append('%s=%s' % (k, v)) - else: - outstr.append('%s=%r' % (k, v)) - first = False - outstr.append(')') - return ''.join(outstr) - - def _hash_infile(self, adict, key): - # Inject file hashes into adict[key] - stuff = adict[key] - if not is_container(stuff): - stuff = [stuff] - file_list = [] - for afile in stuff: - if os.path.isfile(afile): - md5obj = md5() - with open(afile, 'rb') as fp: - while True: - data = fp.read(8192) - if not data: - break - md5obj.update(data) - md5hex = md5obj.hexdigest() - else: - md5hex = None - file_list.append((afile, md5hex)) - return file_list - - def _get_bunch_hash(self): - """Return a dictionary of our items with hashes for each file. - - Searches through dictionary items and if an item is a file, it - calculates the md5 hash of the file contents and stores the - file name and hash value as the new key value. - - However, the overall bunch hash is calculated only on the hash - value of a file. The path and name of the file are not used in - the overall hash calculation. - - Returns - ------- - dict_withhash : dict - Copy of our dictionary with the new file hashes included - with each file. - hashvalue : str - The md5 hash value of the `dict_withhash` - - """ - - infile_list = [] - for key, val in list(self.items()): - if is_container(val): - # XXX - SG this probably doesn't catch numpy arrays - # containing embedded file names either. - if isinstance(val, dict): - # XXX - SG should traverse dicts, but ignoring for now - item = None - else: - if len(val) == 0: - raise AttributeError('%s attribute is empty' % key) - item = val[0] - else: - item = val - try: - if isinstance(item, str) and os.path.isfile(item): - infile_list.append(key) - except TypeError: - # `item` is not a file or string. - continue - dict_withhash = self.dictcopy() - dict_nofilename = self.dictcopy() - for item in infile_list: - dict_withhash[item] = self._hash_infile(dict_withhash, item) - dict_nofilename[item] = [val[1] for val in dict_withhash[item]] - # Sort the items of the dictionary, before hashing the string - # representation so we get a predictable order of the - # dictionary. - sorted_dict = to_str(sorted(dict_nofilename.items())) - return dict_withhash, md5(sorted_dict.encode()).hexdigest() - - def __pretty__(self, p, cycle): - """Support for the pretty module - - pretty is included in ipython.externals for ipython > 0.10""" - if cycle: - p.text('Bunch(...)') - else: - p.begin_group(6, 'Bunch(') - first = True - for k, v in sorted(self.items()): - if not first: - p.text(',') - p.breakable() - p.text(k + '=') - p.pretty(v) - first = False - p.end_group(6, ')') - - -class InterfaceResult(object): - """Object that contains the results of running a particular Interface. - - Attributes - ---------- - version : version of this Interface result object (a readonly property) - interface : class type - A copy of the `Interface` class that was run to generate this result. - inputs : a traits free representation of the inputs - outputs : Bunch - An `Interface` specific Bunch that contains all possible files - that are generated by the interface. The `outputs` are used - as the `inputs` to another node when interfaces are used in - the pipeline. - runtime : Bunch - - Contains attributes that describe the runtime environment when - the `Interface` was run. Contains the attributes: - - * cmdline : The command line string that was executed - * cwd : The directory the ``cmdline`` was executed in. - * stdout : The output of running the ``cmdline``. - * stderr : Any error messages output from running ``cmdline``. - * returncode : The code returned from running the ``cmdline``. - - """ - - def __init__(self, interface, runtime, inputs=None, outputs=None, - provenance=None): - self._version = 2.0 - self.interface = interface - self.runtime = runtime - self.inputs = inputs - self.outputs = outputs - self.provenance = provenance - - @property - def version(self): - return self._version - - -class BaseTraitedSpec(traits.HasTraits): - """Provide a few methods necessary to support nipype interface api - - The inputs attribute of interfaces call certain methods that are not - available in traits.HasTraits. These are provided here. - - new metadata: - - * usedefault : set this to True if the default value of the trait should be - used. Unless this is set, the attributes are set to traits.Undefined - - new attribute: - - * get_hashval : returns a tuple containing the state of the trait as a dict - and hashvalue corresponding to dict. - - XXX Reconsider this in the long run, but it seems like the best - solution to move forward on the refactoring. - """ - package_version = nipype_version - - def __init__(self, **kwargs): - """ Initialize handlers and inputs""" - # NOTE: In python 2.6, object.__init__ no longer accepts input - # arguments. HasTraits does not define an __init__ and - # therefore these args were being ignored. - # super(TraitedSpec, self).__init__(*args, **kwargs) - super(BaseTraitedSpec, self).__init__(**kwargs) - traits.push_exception_handler(reraise_exceptions=True) - undefined_traits = {} - for trait in self.copyable_trait_names(): - if not self.traits()[trait].usedefault: - undefined_traits[trait] = Undefined - self.trait_set(trait_change_notify=False, **undefined_traits) - self._generate_handlers() - self.trait_set(**kwargs) - - def items(self): - """ Name, trait generator for user modifiable traits - """ - for name in sorted(self.copyable_trait_names()): - yield name, self.traits()[name] - - def __repr__(self): - """ Return a well-formatted representation of the traits """ - outstr = [] - for name, value in sorted(self.trait_get().items()): - outstr.append('%s = %s' % (name, value)) - return '\n{}\n'.format('\n'.join(outstr)) - - def _generate_handlers(self): - """Find all traits with the 'xor' metadata and attach an event - handler to them. - """ - has_xor = dict(xor=lambda t: t is not None) - xors = self.trait_names(**has_xor) - for elem in xors: - self.on_trait_change(self._xor_warn, elem) - has_deprecation = dict(deprecated=lambda t: t is not None) - deprecated = self.trait_names(**has_deprecation) - for elem in deprecated: - self.on_trait_change(self._deprecated_warn, elem) - - def _xor_warn(self, obj, name, old, new): - """ Generates warnings for xor traits - """ - if isdefined(new): - trait_spec = self.traits()[name] - # for each xor, set to default_value - for trait_name in trait_spec.xor: - if trait_name == name: - # skip ourself - continue - if isdefined(getattr(self, trait_name)): - self.trait_set(trait_change_notify=False, - **{'%s' % name: Undefined}) - msg = ('Input "%s" is mutually exclusive with input "%s", ' - 'which is already set') % (name, trait_name) - raise IOError(msg) - - def _requires_warn(self, obj, name, old, new): - """Part of the xor behavior - """ - if isdefined(new): - trait_spec = self.traits()[name] - msg = None - for trait_name in trait_spec.requires: - if not isdefined(getattr(self, trait_name)): - if not msg: - msg = 'Input %s requires inputs: %s' \ - % (name, ', '.join(trait_spec.requires)) - if msg: # only one requires warning at a time. - warn(msg) - - def _deprecated_warn(self, obj, name, old, new): - """Checks if a user assigns a value to a deprecated trait - """ - if isdefined(new): - trait_spec = self.traits()[name] - msg1 = ('Input %s in interface %s is deprecated.' % - (name, - self.__class__.__name__.split('InputSpec')[0])) - msg2 = ('Will be removed or raise an error as of release %s' - % trait_spec.deprecated) - if trait_spec.new_name: - if trait_spec.new_name not in self.copyable_trait_names(): - raise TraitError(msg1 + ' Replacement trait %s not found' % - trait_spec.new_name) - msg3 = 'It has been replaced by %s.' % trait_spec.new_name - else: - msg3 = '' - msg = ' '.join((msg1, msg2, msg3)) - if Version(str(trait_spec.deprecated)) < self.package_version: - raise TraitError(msg) - else: - if trait_spec.new_name: - msg += 'Unsetting old value %s; setting new value %s.' % ( - name, trait_spec.new_name) - warn(msg) - if trait_spec.new_name: - self.trait_set(trait_change_notify=False, - **{'%s' % name: Undefined, - '%s' % trait_spec.new_name: new}) - - def _hash_infile(self, adict, key): - """ Inject file hashes into adict[key]""" - stuff = adict[key] - if not is_container(stuff): - stuff = [stuff] - file_list = [] - for afile in stuff: - if is_container(afile): - hashlist = self._hash_infile({'infiles': afile}, 'infiles') - hash = [val[1] for val in hashlist] - else: - if config.get('execution', - 'hash_method').lower() == 'timestamp': - hash = hash_timestamp(afile) - elif config.get('execution', - 'hash_method').lower() == 'content': - hash = hash_infile(afile) - else: - raise Exception("Unknown hash method: %s" % - config.get('execution', 'hash_method')) - file_list.append((afile, hash)) - return file_list - - def get(self, **kwargs): - """ Returns traited class as a dict - - Augments the trait get function to return a dictionary without - notification handles - """ - out = super(BaseTraitedSpec, self).get(**kwargs) - out = self._clean_container(out, Undefined) - return out - - def get_traitsfree(self, **kwargs): - """ Returns traited class as a dict - - Augments the trait get function to return a dictionary without - any traits. The dictionary does not contain any attributes that - were Undefined - """ - out = super(BaseTraitedSpec, self).get(**kwargs) - out = self._clean_container(out, skipundefined=True) - return out - - def _clean_container(self, object, undefinedval=None, skipundefined=False): - """Convert a traited obejct into a pure python representation. - """ - if isinstance(object, TraitDictObject) or isinstance(object, dict): - out = {} - for key, val in list(object.items()): - if isdefined(val): - out[key] = self._clean_container(val, undefinedval) - else: - if not skipundefined: - out[key] = undefinedval - elif (isinstance(object, TraitListObject) or - isinstance(object, list) or isinstance(object, tuple)): - out = [] - for val in object: - if isdefined(val): - out.append(self._clean_container(val, undefinedval)) - else: - if not skipundefined: - out.append(undefinedval) - else: - out.append(None) - if isinstance(object, tuple): - out = tuple(out) - else: - if isdefined(object): - out = object - else: - if not skipundefined: - out = undefinedval - return out - - def has_metadata(self, name, metadata, value=None, recursive=True): - """ - Return has_metadata for the requested trait name in this - interface - """ - return has_metadata(self.trait(name).trait_type, metadata, value, - recursive) - - def get_hashval(self, hash_method=None): - """Return a dictionary of our items with hashes for each file. - - Searches through dictionary items and if an item is a file, it - calculates the md5 hash of the file contents and stores the - file name and hash value as the new key value. - - However, the overall bunch hash is calculated only on the hash - value of a file. The path and name of the file are not used in - the overall hash calculation. - - Returns - ------- - dict_withhash : dict - Copy of our dictionary with the new file hashes included - with each file. - hashvalue : str - The md5 hash value of the traited spec - - """ - - dict_withhash = [] - dict_nofilename = [] - for name, val in sorted(self.get().items()): - if not isdefined(val) or self.has_metadata(name, "nohash", True): - # skip undefined traits and traits with nohash=True - continue - - hash_files = (not self.has_metadata(name, "hash_files", False) and not - self.has_metadata(name, "name_source")) - dict_nofilename.append((name, - self._get_sorteddict(val, hash_method=hash_method, - hash_files=hash_files))) - dict_withhash.append((name, - self._get_sorteddict(val, True, hash_method=hash_method, - hash_files=hash_files))) - return dict_withhash, md5(to_str(dict_nofilename).encode()).hexdigest() - - def _get_sorteddict(self, objekt, dictwithhash=False, hash_method=None, - hash_files=True): - if isinstance(objekt, dict): - out = [] - for key, val in sorted(objekt.items()): - if isdefined(val): - out.append((key, - self._get_sorteddict(val, dictwithhash, - hash_method=hash_method, - hash_files=hash_files))) - elif isinstance(objekt, (list, tuple)): - out = [] - for val in objekt: - if isdefined(val): - out.append(self._get_sorteddict(val, dictwithhash, - hash_method=hash_method, - hash_files=hash_files)) - if isinstance(objekt, tuple): - out = tuple(out) - else: - if isdefined(objekt): - if (hash_files and isinstance(objekt, (str, bytes)) and - os.path.isfile(objekt)): - if hash_method is None: - hash_method = config.get('execution', 'hash_method') - - if hash_method.lower() == 'timestamp': - hash = hash_timestamp(objekt) - elif hash_method.lower() == 'content': - hash = hash_infile(objekt) - else: - raise Exception("Unknown hash method: %s" % hash_method) - if dictwithhash: - out = (objekt, hash) - else: - out = hash - elif isinstance(objekt, float): - out = FLOAT_FORMAT(objekt) - else: - out = objekt - return out - - -class DynamicTraitedSpec(BaseTraitedSpec): - """ A subclass to handle dynamic traits - - This class is a workaround for add_traits and clone_traits not - functioning well together. - """ - - def __deepcopy__(self, memo): - """ bug in deepcopy for HasTraits results in weird cloning behavior for - added traits - """ - id_self = id(self) - if id_self in memo: - return memo[id_self] - dup_dict = deepcopy(self.get(), memo) - # access all keys - for key in self.copyable_trait_names(): - if key in self.__dict__.keys(): - _ = getattr(self, key) - # clone once - dup = self.clone_traits(memo=memo) - for key in self.copyable_trait_names(): - try: - _ = getattr(dup, key) - except: - pass - # clone twice - dup = self.clone_traits(memo=memo) - dup.trait_set(**dup_dict) - return dup - - -class TraitedSpec(BaseTraitedSpec): - """ Create a subclass with strict traits. - - This is used in 90% of the cases. - """ - _ = traits.Disallow - - class Interface(object): """This is an abstract definition for Interface objects. @@ -682,12 +132,6 @@ def _get_filecopy_info(self): raise NotImplementedError -class BaseInterfaceInputSpec(TraitedSpec): - ignore_exception = traits.Bool(False, usedefault=True, nohash=True, - desc='Print an error message instead of throwing an exception ' - 'in case the interface fails to run') - - class BaseInterface(Interface): """Implements common interface functionality. @@ -1221,87 +665,6 @@ def _list_outputs(self): return self._results -class Stream(object): - """Function to capture stdout and stderr streams with timestamps - - stackoverflow.com/questions/4984549/merge-and-sync-stdout-and-stderr/5188359 - """ - - def __init__(self, name, impl): - self._name = name - self._impl = impl - self._buf = '' - self._rows = [] - self._lastidx = 0 - self.default_encoding = locale.getdefaultlocale()[1] or 'UTF-8' - - def fileno(self): - "Pass-through for file descriptor." - return self._impl.fileno() - - def read(self, drain=0): - "Read from the file descriptor. If 'drain' set, read until EOF." - while self._read(drain) is not None: - if not drain: - break - - def _read(self, drain): - "Read from the file descriptor" - fd = self.fileno() - buf = os.read(fd, 4096).decode(self.default_encoding) - if not buf and not self._buf: - return None - if '\n' not in buf: - if not drain: - self._buf += buf - return [] - - # prepend any data previously read, then split into lines and format - buf = self._buf + buf - if '\n' in buf: - tmp, rest = buf.rsplit('\n', 1) - else: - tmp = buf - rest = None - self._buf = rest - now = datetime.datetime.now().isoformat() - rows = tmp.split('\n') - self._rows += [(now, '%s %s:%s' % (self._name, now, r), r) - for r in rows] - for idx in range(self._lastidx, len(self._rows)): - iflogger.info(self._rows[idx][1]) - self._lastidx = len(self._rows) - - -def _canonicalize_env(env): - """Windows requires that environment be dicts with bytes as keys and values - This function converts any unicode entries for Windows only, returning the - dictionary untouched in other environments. - - Parameters - ---------- - env : dict - environment dictionary with unicode or bytes keys and values - - Returns - ------- - env : dict - Windows: environment dictionary with bytes keys and values - Other: untouched input ``env`` - """ - if os.name != 'nt': - return env - - out_env = {} - for key, val in env: - if not isinstance(key, bytes): - key = key.encode('utf-8') - if not isinstance(val, bytes): - val = key.encode('utf-8') - out_env[key] = val - return out_env - - def run_command(runtime, output=None, timeout=0.01): """Run a command, read stdout and stderr, prefix with timestamp. @@ -1340,7 +703,7 @@ def run_command(runtime, output=None, timeout=0.01): cwd=runtime.cwd, env=env, close_fds=True, - ) + ) result = { 'stdout': [], 'stderr': [], @@ -1413,47 +776,6 @@ def _process(drain=0): return runtime -def get_dependencies(name, environ): - """Return library dependencies of a dynamically linked executable - - Uses otool on darwin, ldd on linux. Currently doesn't support windows. - - """ - if sys.platform == 'darwin': - proc = sp.Popen('otool -L `which %s`' % name, - stdout=sp.PIPE, - stderr=sp.PIPE, - shell=True, - env=environ) - elif 'linux' in sys.platform: - proc = sp.Popen('ldd `which %s`' % name, - stdout=sp.PIPE, - stderr=sp.PIPE, - shell=True, - env=environ) - else: - return 'Platform %s not supported' % sys.platform - o, e = proc.communicate() - return o.rstrip() - - -class CommandLineInputSpec(BaseInterfaceInputSpec): - args = Str(argstr='%s', desc='Additional parameters to the command') - environ = DictStrStr(desc='Environment variables', usedefault=True, - nohash=True) - # This input does not have a "usedefault=True" so the set_default_terminal_output() - # method would work - terminal_output = traits.Enum('stream', 'allatonce', 'file', 'none', - deprecated='1.0.0', - desc=('Control terminal output: `stream` - ' - 'displays to terminal immediately (default), ' - '`allatonce` - waits till command is ' - 'finished to display output, `file` - ' - 'writes output to file, `none` - output' - ' is ignored'), - nohash=True) - - class CommandLine(BaseInterface): """Implements functionality to interact with command line programs class must be instantiated with a command argument @@ -1786,10 +1108,6 @@ def _parse_inputs(self, skip=None): return first_args + all_args + last_args -class StdOutCommandLineInputSpec(CommandLineInputSpec): - out_file = File(argstr="> %s", position=-1, genfile=True) - - class StdOutCommandLine(CommandLine): input_spec = StdOutCommandLineInputSpec @@ -1800,15 +1118,6 @@ def _gen_outfilename(self): raise NotImplementedError -class MpiCommandLineInputSpec(CommandLineInputSpec): - use_mpi = traits.Bool(False, - desc="Whether or not to run the command with mpiexec", - usedefault=True) - n_procs = traits.Int(desc="Num processors to specify to mpiexec. Do not " - "specify if this is managed externally (e.g. through " - "SGE)") - - class MpiCommandLine(CommandLine): """Implements functionality to interact with command line programs that can be run with MPI (i.e. using 'mpiexec'). @@ -1912,17 +1221,3 @@ def version(klass): @staticmethod def parse_version(raw_info): raise NotImplementedError - - -def load_template(name): - """ - Deprecated stub for backwards compatibility, - please use nipype.interfaces.fsl.model.load_template - - """ - from .fsl.model import load_template - iflogger.warning( - 'Deprecated in 1.0.0, and will be removed in 1.1.0, ' - 'please use nipype.interfaces.fsl.model.load_template instead.' - ) - return load_template(name) diff --git a/nipype/interfaces/base/specs.py b/nipype/interfaces/base/specs.py new file mode 100644 index 0000000000..16cf538533 --- /dev/null +++ b/nipype/interfaces/base/specs.py @@ -0,0 +1,387 @@ +# -*- coding: utf-8 -*- +# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- +# vi: set ft=python sts=4 ts=4 sw=4 et: +from __future__ import print_function, division, unicode_literals, absolute_import + +import os +from copy import deepcopy +from packaging.version import Version +from warnings import warn +from builtins import str, bytes + +from ...utils.misc import is_container +from ...utils.filemanip import md5, hash_infile, hash_timestamp, to_str +from .traits_extension import ( + traits, Undefined, isdefined, TraitError, TraitDictObject, TraitListObject, + has_metadata, +) + +from ... import config, __version__ + +FLOAT_FORMAT = '{:.10f}'.format +nipype_version = Version(__version__) + + +class BaseTraitedSpec(traits.HasTraits): + """Provide a few methods necessary to support nipype interface api + + The inputs attribute of interfaces call certain methods that are not + available in traits.HasTraits. These are provided here. + + new metadata: + + * usedefault : set this to True if the default value of the trait should be + used. Unless this is set, the attributes are set to traits.Undefined + + new attribute: + + * get_hashval : returns a tuple containing the state of the trait as a dict + and hashvalue corresponding to dict. + + XXX Reconsider this in the long run, but it seems like the best + solution to move forward on the refactoring. + """ + package_version = nipype_version + + def __init__(self, **kwargs): + """ Initialize handlers and inputs""" + # NOTE: In python 2.6, object.__init__ no longer accepts input + # arguments. HasTraits does not define an __init__ and + # therefore these args were being ignored. + # super(TraitedSpec, self).__init__(*args, **kwargs) + super(BaseTraitedSpec, self).__init__(**kwargs) + traits.push_exception_handler(reraise_exceptions=True) + undefined_traits = {} + for trait in self.copyable_trait_names(): + if not self.traits()[trait].usedefault: + undefined_traits[trait] = Undefined + self.trait_set(trait_change_notify=False, **undefined_traits) + self._generate_handlers() + self.trait_set(**kwargs) + + def items(self): + """ Name, trait generator for user modifiable traits + """ + for name in sorted(self.copyable_trait_names()): + yield name, self.traits()[name] + + def __repr__(self): + """ Return a well-formatted representation of the traits """ + outstr = [] + for name, value in sorted(self.trait_get().items()): + outstr.append('%s = %s' % (name, value)) + return '\n{}\n'.format('\n'.join(outstr)) + + def _generate_handlers(self): + """Find all traits with the 'xor' metadata and attach an event + handler to them. + """ + has_xor = dict(xor=lambda t: t is not None) + xors = self.trait_names(**has_xor) + for elem in xors: + self.on_trait_change(self._xor_warn, elem) + has_deprecation = dict(deprecated=lambda t: t is not None) + deprecated = self.trait_names(**has_deprecation) + for elem in deprecated: + self.on_trait_change(self._deprecated_warn, elem) + + def _xor_warn(self, obj, name, old, new): + """ Generates warnings for xor traits + """ + if isdefined(new): + trait_spec = self.traits()[name] + # for each xor, set to default_value + for trait_name in trait_spec.xor: + if trait_name == name: + # skip ourself + continue + if isdefined(getattr(self, trait_name)): + self.trait_set(trait_change_notify=False, + **{'%s' % name: Undefined}) + msg = ('Input "%s" is mutually exclusive with input "%s", ' + 'which is already set') % (name, trait_name) + raise IOError(msg) + + def _requires_warn(self, obj, name, old, new): + """Part of the xor behavior + """ + if isdefined(new): + trait_spec = self.traits()[name] + msg = None + for trait_name in trait_spec.requires: + if not isdefined(getattr(self, trait_name)): + if not msg: + msg = 'Input %s requires inputs: %s' \ + % (name, ', '.join(trait_spec.requires)) + if msg: # only one requires warning at a time. + warn(msg) + + def _deprecated_warn(self, obj, name, old, new): + """Checks if a user assigns a value to a deprecated trait + """ + if isdefined(new): + trait_spec = self.traits()[name] + msg1 = ('Input %s in interface %s is deprecated.' % + (name, + self.__class__.__name__.split('InputSpec')[0])) + msg2 = ('Will be removed or raise an error as of release %s' + % trait_spec.deprecated) + if trait_spec.new_name: + if trait_spec.new_name not in self.copyable_trait_names(): + raise TraitError(msg1 + ' Replacement trait %s not found' % + trait_spec.new_name) + msg3 = 'It has been replaced by %s.' % trait_spec.new_name + else: + msg3 = '' + msg = ' '.join((msg1, msg2, msg3)) + if Version(str(trait_spec.deprecated)) < self.package_version: + raise TraitError(msg) + else: + if trait_spec.new_name: + msg += 'Unsetting old value %s; setting new value %s.' % ( + name, trait_spec.new_name) + warn(msg) + if trait_spec.new_name: + self.trait_set(trait_change_notify=False, + **{'%s' % name: Undefined, + '%s' % trait_spec.new_name: new}) + + def _hash_infile(self, adict, key): + """ Inject file hashes into adict[key]""" + stuff = adict[key] + if not is_container(stuff): + stuff = [stuff] + file_list = [] + for afile in stuff: + if is_container(afile): + hashlist = self._hash_infile({'infiles': afile}, 'infiles') + hash = [val[1] for val in hashlist] + else: + if config.get('execution', + 'hash_method').lower() == 'timestamp': + hash = hash_timestamp(afile) + elif config.get('execution', + 'hash_method').lower() == 'content': + hash = hash_infile(afile) + else: + raise Exception("Unknown hash method: %s" % + config.get('execution', 'hash_method')) + file_list.append((afile, hash)) + return file_list + + def get(self, **kwargs): + """ Returns traited class as a dict + + Augments the trait get function to return a dictionary without + notification handles + """ + out = super(BaseTraitedSpec, self).get(**kwargs) + out = self._clean_container(out, Undefined) + return out + + def get_traitsfree(self, **kwargs): + """ Returns traited class as a dict + + Augments the trait get function to return a dictionary without + any traits. The dictionary does not contain any attributes that + were Undefined + """ + out = super(BaseTraitedSpec, self).get(**kwargs) + out = self._clean_container(out, skipundefined=True) + return out + + def _clean_container(self, objekt, undefinedval=None, skipundefined=False): + """Convert a traited obejct into a pure python representation. + """ + if isinstance(objekt, TraitDictObject) or isinstance(objekt, dict): + out = {} + for key, val in list(objekt.items()): + if isdefined(val): + out[key] = self._clean_container(val, undefinedval) + else: + if not skipundefined: + out[key] = undefinedval + elif (isinstance(objekt, TraitListObject) or + isinstance(objekt, list) or isinstance(objekt, tuple)): + out = [] + for val in objekt: + if isdefined(val): + out.append(self._clean_container(val, undefinedval)) + else: + if not skipundefined: + out.append(undefinedval) + else: + out.append(None) + if isinstance(objekt, tuple): + out = tuple(out) + else: + if isdefined(objekt): + out = objekt + else: + if not skipundefined: + out = undefinedval + return out + + def has_metadata(self, name, metadata, value=None, recursive=True): + """ + Return has_metadata for the requested trait name in this + interface + """ + return has_metadata(self.trait(name).trait_type, metadata, value, + recursive) + + def get_hashval(self, hash_method=None): + """Return a dictionary of our items with hashes for each file. + + Searches through dictionary items and if an item is a file, it + calculates the md5 hash of the file contents and stores the + file name and hash value as the new key value. + + However, the overall bunch hash is calculated only on the hash + value of a file. The path and name of the file are not used in + the overall hash calculation. + + Returns + ------- + dict_withhash : dict + Copy of our dictionary with the new file hashes included + with each file. + hashvalue : str + The md5 hash value of the traited spec + + """ + + dict_withhash = [] + dict_nofilename = [] + for name, val in sorted(self.get().items()): + if not isdefined(val) or self.has_metadata(name, "nohash", True): + # skip undefined traits and traits with nohash=True + continue + + hash_files = (not self.has_metadata(name, "hash_files", False) and not + self.has_metadata(name, "name_source")) + dict_nofilename.append((name, + self._get_sorteddict(val, hash_method=hash_method, + hash_files=hash_files))) + dict_withhash.append((name, + self._get_sorteddict(val, True, hash_method=hash_method, + hash_files=hash_files))) + return dict_withhash, md5(to_str(dict_nofilename).encode()).hexdigest() + + def _get_sorteddict(self, objekt, dictwithhash=False, hash_method=None, + hash_files=True): + if isinstance(objekt, dict): + out = [] + for key, val in sorted(objekt.items()): + if isdefined(val): + out.append((key, + self._get_sorteddict(val, dictwithhash, + hash_method=hash_method, + hash_files=hash_files))) + elif isinstance(objekt, (list, tuple)): + out = [] + for val in objekt: + if isdefined(val): + out.append(self._get_sorteddict(val, dictwithhash, + hash_method=hash_method, + hash_files=hash_files)) + if isinstance(objekt, tuple): + out = tuple(out) + else: + if isdefined(objekt): + if (hash_files and isinstance(objekt, (str, bytes)) and + os.path.isfile(objekt)): + if hash_method is None: + hash_method = config.get('execution', 'hash_method') + + if hash_method.lower() == 'timestamp': + hash = hash_timestamp(objekt) + elif hash_method.lower() == 'content': + hash = hash_infile(objekt) + else: + raise Exception("Unknown hash method: %s" % hash_method) + if dictwithhash: + out = (objekt, hash) + else: + out = hash + elif isinstance(objekt, float): + out = FLOAT_FORMAT(objekt) + else: + out = objekt + return out + + +class TraitedSpec(BaseTraitedSpec): + """ Create a subclass with strict traits. + + This is used in 90% of the cases. + """ + + +class BaseInterfaceInputSpec(TraitedSpec): + ignore_exception = traits.Bool(False, usedefault=True, nohash=True, deprecated='1.0.0', + desc='Print an error message instead of throwing an exception ' + 'in case the interface fails to run') + + +class DynamicTraitedSpec(BaseTraitedSpec): + """ A subclass to handle dynamic traits + + This class is a workaround for add_traits and clone_traits not + functioning well together. + """ + + def __deepcopy__(self, memo): + """ bug in deepcopy for HasTraits results in weird cloning behavior for + added traits + """ + id_self = id(self) + if id_self in memo: + return memo[id_self] + dup_dict = deepcopy(self.get(), memo) + # access all keys + for key in self.copyable_trait_names(): + if key in self.__dict__.keys(): + _ = getattr(self, key) + # clone once + dup = self.clone_traits(memo=memo) + for key in self.copyable_trait_names(): + try: + _ = getattr(dup, key) + except: + pass + # clone twice + dup = self.clone_traits(memo=memo) + dup.trait_set(**dup_dict) + return dup + _ = traits.Disallow + + +class CommandLineInputSpec(BaseInterfaceInputSpec): + args = traits.Str(argstr='%s', desc='Additional parameters to the command') + environ = traits.DictStrStr(desc='Environment variables', usedefault=True, + nohash=True) + # This input does not have a "usedefault=True" so the set_default_terminal_output() + # method would work + terminal_output = traits.Enum('stream', 'allatonce', 'file', 'none', + deprecated='1.0.0', + desc=('Control terminal output: `stream` - ' + 'displays to terminal immediately (default), ' + '`allatonce` - waits till command is ' + 'finished to display output, `file` - ' + 'writes output to file, `none` - output' + ' is ignored'), + nohash=True) + + +class StdOutCommandLineInputSpec(CommandLineInputSpec): + out_file = traits.File(argstr="> %s", position=-1, genfile=True) + + +class MpiCommandLineInputSpec(CommandLineInputSpec): + use_mpi = traits.Bool(False, + desc="Whether or not to run the command with mpiexec", + usedefault=True) + n_procs = traits.Int(desc="Num processors to specify to mpiexec. Do not " + "specify if this is managed externally (e.g. through " + "SGE)") diff --git a/nipype/interfaces/base/support.py b/nipype/interfaces/base/support.py new file mode 100644 index 0000000000..a53789f473 --- /dev/null +++ b/nipype/interfaces/base/support.py @@ -0,0 +1,309 @@ +# -*- coding: utf-8 -*- +# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- +# vi: set ft=python sts=4 ts=4 sw=4 et: +from __future__ import print_function, division, unicode_literals, absolute_import +from builtins import range, object, open, str + +import os +from copy import deepcopy + +import datetime +import locale + +from ... import logging +from ...utils.misc import is_container +from ...utils.filemanip import md5, to_str +iflogger = logging.getLogger('interface') + + +class NipypeInterfaceError(Exception): + """Custom error for interfaces""" + + def __init__(self, value): + self.value = value + + def __str__(self): + return '{}'.format(self.value) + + +class Bunch(object): + """Dictionary-like class that provides attribute-style access to it's items. + + A `Bunch` is a simple container that stores it's items as class + attributes. Internally all items are stored in a dictionary and + the class exposes several of the dictionary methods. + + Examples + -------- + >>> from nipype.interfaces.base import Bunch + >>> inputs = Bunch(infile='subj.nii', fwhm=6.0, register_to_mean=True) + >>> inputs + Bunch(fwhm=6.0, infile='subj.nii', register_to_mean=True) + >>> inputs.register_to_mean = False + >>> inputs + Bunch(fwhm=6.0, infile='subj.nii', register_to_mean=False) + + + Notes + ----- + The Bunch pattern came from the Python Cookbook: + + .. [1] A. Martelli, D. Hudgeon, "Collecting a Bunch of Named + Items", Python Cookbook, 2nd Ed, Chapter 4.18, 2005. + + """ + + def __init__(self, *args, **kwargs): + self.__dict__.update(*args, **kwargs) + + def update(self, *args, **kwargs): + """update existing attribute, or create new attribute + + Note: update is very much like HasTraits.set""" + self.__dict__.update(*args, **kwargs) + + def items(self): + """iterates over bunch attributes as key, value pairs""" + return list(self.__dict__.items()) + + def iteritems(self): + """iterates over bunch attributes as key, value pairs""" + iflogger.warning('iteritems is deprecated, use items instead') + return list(self.items()) + + def get(self, *args): + """Support dictionary get() functionality + """ + return self.__dict__.get(*args) + + def set(self, **kwargs): + """Support dictionary get() functionality + """ + return self.__dict__.update(**kwargs) + + def dictcopy(self): + """returns a deep copy of existing Bunch as a dictionary""" + return deepcopy(self.__dict__) + + def __repr__(self): + """representation of the sorted Bunch as a string + + Currently, this string representation of the `inputs` Bunch of + interfaces is hashed to determine if the process' dirty-bit + needs setting or not. Till that mechanism changes, only alter + this after careful consideration. + """ + outstr = ['Bunch('] + first = True + for k, v in sorted(self.items()): + if not first: + outstr.append(', ') + if isinstance(v, dict): + pairs = [] + for key, value in sorted(v.items()): + pairs.append("'%s': %s" % (key, value)) + v = '{' + ', '.join(pairs) + '}' + outstr.append('%s=%s' % (k, v)) + else: + outstr.append('%s=%r' % (k, v)) + first = False + outstr.append(')') + return ''.join(outstr) + + def _hash_infile(self, adict, key): + # Inject file hashes into adict[key] + stuff = adict[key] + if not is_container(stuff): + stuff = [stuff] + file_list = [] + for afile in stuff: + if os.path.isfile(afile): + md5obj = md5() + with open(afile, 'rb') as fp: + while True: + data = fp.read(8192) + if not data: + break + md5obj.update(data) + md5hex = md5obj.hexdigest() + else: + md5hex = None + file_list.append((afile, md5hex)) + return file_list + + def _get_bunch_hash(self): + """Return a dictionary of our items with hashes for each file. + + Searches through dictionary items and if an item is a file, it + calculates the md5 hash of the file contents and stores the + file name and hash value as the new key value. + + However, the overall bunch hash is calculated only on the hash + value of a file. The path and name of the file are not used in + the overall hash calculation. + + Returns + ------- + dict_withhash : dict + Copy of our dictionary with the new file hashes included + with each file. + hashvalue : str + The md5 hash value of the `dict_withhash` + + """ + + infile_list = [] + for key, val in list(self.items()): + if is_container(val): + # XXX - SG this probably doesn't catch numpy arrays + # containing embedded file names either. + if isinstance(val, dict): + # XXX - SG should traverse dicts, but ignoring for now + item = None + else: + if len(val) == 0: + raise AttributeError('%s attribute is empty' % key) + item = val[0] + else: + item = val + try: + if isinstance(item, str) and os.path.isfile(item): + infile_list.append(key) + except TypeError: + # `item` is not a file or string. + continue + dict_withhash = self.dictcopy() + dict_nofilename = self.dictcopy() + for item in infile_list: + dict_withhash[item] = self._hash_infile(dict_withhash, item) + dict_nofilename[item] = [val[1] for val in dict_withhash[item]] + # Sort the items of the dictionary, before hashing the string + # representation so we get a predictable order of the + # dictionary. + sorted_dict = to_str(sorted(dict_nofilename.items())) + return dict_withhash, md5(sorted_dict.encode()).hexdigest() + + def __pretty__(self, p, cycle): + """Support for the pretty module + + pretty is included in ipython.externals for ipython > 0.10""" + if cycle: + p.text('Bunch(...)') + else: + p.begin_group(6, 'Bunch(') + first = True + for k, v in sorted(self.items()): + if not first: + p.text(',') + p.breakable() + p.text(k + '=') + p.pretty(v) + first = False + p.end_group(6, ')') + + +class InterfaceResult(object): + """Object that contains the results of running a particular Interface. + + Attributes + ---------- + version : version of this Interface result object (a readonly property) + interface : class type + A copy of the `Interface` class that was run to generate this result. + inputs : a traits free representation of the inputs + outputs : Bunch + An `Interface` specific Bunch that contains all possible files + that are generated by the interface. The `outputs` are used + as the `inputs` to another node when interfaces are used in + the pipeline. + runtime : Bunch + + Contains attributes that describe the runtime environment when + the `Interface` was run. Contains the attributes: + + * cmdline : The command line string that was executed + * cwd : The directory the ``cmdline`` was executed in. + * stdout : The output of running the ``cmdline``. + * stderr : Any error messages output from running ``cmdline``. + * returncode : The code returned from running the ``cmdline``. + + """ + + def __init__(self, interface, runtime, inputs=None, outputs=None, + provenance=None): + self._version = 2.0 + self.interface = interface + self.runtime = runtime + self.inputs = inputs + self.outputs = outputs + self.provenance = provenance + + @property + def version(self): + return self._version + + +class Stream(object): + """Function to capture stdout and stderr streams with timestamps + + stackoverflow.com/questions/4984549/merge-and-sync-stdout-and-stderr/5188359 + """ + + def __init__(self, name, impl): + self._name = name + self._impl = impl + self._buf = '' + self._rows = [] + self._lastidx = 0 + self.default_encoding = locale.getdefaultlocale()[1] or 'UTF-8' + + def fileno(self): + "Pass-through for file descriptor." + return self._impl.fileno() + + def read(self, drain=0): + "Read from the file descriptor. If 'drain' set, read until EOF." + while self._read(drain) is not None: + if not drain: + break + + def _read(self, drain): + "Read from the file descriptor" + fd = self.fileno() + buf = os.read(fd, 4096).decode(self.default_encoding) + if not buf and not self._buf: + return None + if '\n' not in buf: + if not drain: + self._buf += buf + return [] + + # prepend any data previously read, then split into lines and format + buf = self._buf + buf + if '\n' in buf: + tmp, rest = buf.rsplit('\n', 1) + else: + tmp = buf + rest = None + self._buf = rest + now = datetime.datetime.now().isoformat() + rows = tmp.split('\n') + self._rows += [(now, '%s %s:%s' % (self._name, now, r), r) + for r in rows] + for idx in range(self._lastidx, len(self._rows)): + iflogger.info(self._rows[idx][1]) + self._lastidx = len(self._rows) + + +def load_template(name): + """ + Deprecated stub for backwards compatibility, + please use nipype.interfaces.fsl.model.load_template + + """ + from .fsl.model import load_template + iflogger.warning( + 'Deprecated in 1.0.0, and will be removed in 1.1.0, ' + 'please use nipype.interfaces.fsl.model.load_template instead.' + ) + return load_template(name) diff --git a/nipype/interfaces/traits_extension.py b/nipype/interfaces/base/traits_extension.py similarity index 100% rename from nipype/interfaces/traits_extension.py rename to nipype/interfaces/base/traits_extension.py diff --git a/nipype/interfaces/setup.py b/nipype/interfaces/setup.py index 4a15082b2b..d3ca4fce7a 100644 --- a/nipype/interfaces/setup.py +++ b/nipype/interfaces/setup.py @@ -11,6 +11,7 @@ def configuration(parent_package='', top_path=None): config.add_subpackage('afni') config.add_subpackage('ants') + config.add_subpackage('base') config.add_subpackage('camino') config.add_subpackage('camino2trackvis') config.add_subpackage('cmtk') diff --git a/nipype/utils/filemanip.py b/nipype/utils/filemanip.py index 33484bfc53..dd1e600d11 100644 --- a/nipype/utils/filemanip.py +++ b/nipype/utils/filemanip.py @@ -8,7 +8,7 @@ import sys import pickle -import subprocess +import subprocess as sp import gzip import hashlib import locale @@ -93,6 +93,7 @@ def split_filename(fname): return pth, fname, ext + def to_str(value): """ Manipulates ordered dicts before they are hashed (Py2/3 compat.) @@ -104,6 +105,7 @@ def to_str(value): retval = to_str_py27(value) return retval + def to_str_py27(value): """ Encode dictionary for python 2 @@ -121,7 +123,7 @@ def to_str_py27(value): venc = to_str_py27(val) if venc.startswith(("u'", 'u"')): venc = venc[1:] - retval+= entry(kenc, venc) + retval += entry(kenc, venc) retval += '}' return retval @@ -148,6 +150,7 @@ def to_str_py27(value): retval = retval[1:] return retval + def fname_presuffix(fname, prefix='', suffix='', newpath=None, use_ext=True): """Manipulates path and name of input filename @@ -250,7 +253,7 @@ def _generate_cifs_table(): On systems without a ``mount`` command, or with no CIFS mounts, returns an empty list. """ - exit_code, output = subprocess.getstatusoutput("mount") + exit_code, output = sp.getstatusoutput("mount") # Not POSIX if exit_code != 0: return [] @@ -626,6 +629,7 @@ def savepkl(filename, record): pickle.dump(record, pkl_file) pkl_file.close() + rst_levels = ['=', '-', '~', '+'] @@ -697,3 +701,56 @@ def which(cmd, env=None, pathext=None): if os.path.exists(filename): return filename return None + + +def get_dependencies(name, environ): + """Return library dependencies of a dynamically linked executable + + Uses otool on darwin, ldd on linux. Currently doesn't support windows. + + """ + if sys.platform == 'darwin': + proc = sp.Popen('otool -L `which %s`' % name, + stdout=sp.PIPE, + stderr=sp.PIPE, + shell=True, + env=environ) + elif 'linux' in sys.platform: + proc = sp.Popen('ldd `which %s`' % name, + stdout=sp.PIPE, + stderr=sp.PIPE, + shell=True, + env=environ) + else: + return 'Platform %s not supported' % sys.platform + o, e = proc.communicate() + return o.rstrip() + + +def canonicalize_env(env): + """Windows requires that environment be dicts with bytes as keys and values + This function converts any unicode entries for Windows only, returning the + dictionary untouched in other environments. + + Parameters + ---------- + env : dict + environment dictionary with unicode or bytes keys and values + + Returns + ------- + env : dict + Windows: environment dictionary with bytes keys and values + Other: untouched input ``env`` + """ + if os.name != 'nt': + return env + + out_env = {} + for key, val in env: + if not isinstance(key, bytes): + key = key.encode('utf-8') + if not isinstance(val, bytes): + val = key.encode('utf-8') + out_env[key] = val + return out_env From d9c7f3d24a44a94cbbbf9ad297afbef7b4de934e Mon Sep 17 00:00:00 2001 From: oesteban Date: Wed, 22 Nov 2017 17:15:07 -0800 Subject: [PATCH 539/643] fix final errors and wrong imports --- nipype/interfaces/base/__init__.py | 8 +++++--- nipype/interfaces/base/specs.py | 2 +- nipype/pipeline/engine/nodes.py | 4 ++-- nipype/pipeline/engine/workflows.py | 4 ++-- nipype/utils/filemanip.py | 6 +++--- 5 files changed, 13 insertions(+), 11 deletions(-) diff --git a/nipype/interfaces/base/__init__.py b/nipype/interfaces/base/__init__.py index 917639f154..202c5feeac 100644 --- a/nipype/interfaces/base/__init__.py +++ b/nipype/interfaces/base/__init__.py @@ -9,12 +9,14 @@ """ from .core import ( - BaseInterface, SimpleInterface, CommandLine, StdOutCommandLine, + Interface, BaseInterface, SimpleInterface, + CommandLine, StdOutCommandLine, MpiCommandLine, SEMLikeCommandLine, PackageInfo ) from .specs import ( - BaseTraitedSpec, BaseInterfaceInputSpec, CommandLineInputSpec, + BaseTraitedSpec, TraitedSpec, DynamicTraitedSpec, + BaseInterfaceInputSpec, CommandLineInputSpec, ) from .traits_extension import ( @@ -22,4 +24,4 @@ File, Directory, Str, DictStrStr, has_metadata, ImageFile, MultiPath, OutputMultiPath, InputMultiPath) -from .support import load_template +from .support import Bunch, InterfaceResult, load_template diff --git a/nipype/interfaces/base/specs.py b/nipype/interfaces/base/specs.py index 16cf538533..83e0b9bd32 100644 --- a/nipype/interfaces/base/specs.py +++ b/nipype/interfaces/base/specs.py @@ -316,6 +316,7 @@ class TraitedSpec(BaseTraitedSpec): This is used in 90% of the cases. """ + _ = traits.Disallow class BaseInterfaceInputSpec(TraitedSpec): @@ -354,7 +355,6 @@ def __deepcopy__(self, memo): dup = self.clone_traits(memo=memo) dup.trait_set(**dup_dict) return dup - _ = traits.Disallow class CommandLineInputSpec(BaseInterfaceInputSpec): diff --git a/nipype/pipeline/engine/nodes.py b/nipype/pipeline/engine/nodes.py index 36d3ba1b40..5b972a7692 100644 --- a/nipype/pipeline/engine/nodes.py +++ b/nipype/pipeline/engine/nodes.py @@ -42,10 +42,10 @@ copyfiles, fnames_presuffix, loadpkl, split_filename, load_json, savepkl, write_rst_header, write_rst_dict, - write_rst_list, to_str) + write_rst_list, to_str, md5) from ...interfaces.base import (traits, InputMultiPath, CommandLine, Undefined, TraitedSpec, DynamicTraitedSpec, - Bunch, InterfaceResult, md5, Interface, + Bunch, InterfaceResult, Interface, TraitDictObject, TraitListObject, isdefined) from .utils import (generate_expanded_graph, modify_paths, export_graph, make_output_dir, write_workflow_prov, diff --git a/nipype/pipeline/engine/workflows.py b/nipype/pipeline/engine/workflows.py index cd50bb72b3..5c60dd2cd3 100644 --- a/nipype/pipeline/engine/workflows.py +++ b/nipype/pipeline/engine/workflows.py @@ -41,10 +41,10 @@ from ...utils.functions import (getsource, create_function_from_source) from ...interfaces.base import (traits, InputMultiPath, CommandLine, Undefined, TraitedSpec, DynamicTraitedSpec, - Bunch, InterfaceResult, md5, Interface, + Bunch, InterfaceResult, Interface, TraitDictObject, TraitListObject, isdefined) -from ...utils.filemanip import (save_json, FileNotFoundError, +from ...utils.filemanip import (save_json, FileNotFoundError, md5, filename_to_list, list_to_filename, copyfiles, fnames_presuffix, loadpkl, split_filename, load_json, savepkl, diff --git a/nipype/utils/filemanip.py b/nipype/utils/filemanip.py index dd1e600d11..067a95fdea 100644 --- a/nipype/utils/filemanip.py +++ b/nipype/utils/filemanip.py @@ -24,8 +24,6 @@ from .. import logging, config from .misc import is_container -from ..interfaces.traits_extension import isdefined - from future import standard_library standard_library.install_aliases() @@ -181,7 +179,9 @@ def fname_presuffix(fname, prefix='', suffix='', newpath=None, use_ext=True): pth, fname, ext = split_filename(fname) if not use_ext: ext = '' - if newpath and isdefined(newpath): + + # Avoid cyclic references importing isdefined + if newpath and ('%s' % newpath) != '': pth = os.path.abspath(newpath) return os.path.join(pth, prefix + fname + suffix + ext) From d663e2fe0169759529b998621f5f2abd35e2133d Mon Sep 17 00:00:00 2001 From: oesteban Date: Wed, 22 Nov 2017 20:02:03 -0800 Subject: [PATCH 540/643] test passing locally --- nipype/interfaces/base/__init__.py | 6 +++++- nipype/interfaces/base/core.py | 3 ++- nipype/interfaces/base/traits_extension.py | 4 ++-- nipype/interfaces/brainsuite/brainsuite.py | 8 ++++---- nipype/interfaces/dcmstack.py | 10 ++++++---- nipype/interfaces/fsl/fix.py | 15 +++++++++------ nipype/interfaces/fsl/model.py | 11 ++++++----- nipype/interfaces/mrtrix/tracking.py | 6 ++++-- nipype/interfaces/mrtrix3/base.py | 3 +-- nipype/interfaces/mrtrix3/connectivity.py | 3 +-- nipype/interfaces/mrtrix3/preprocess.py | 3 +-- nipype/interfaces/mrtrix3/utils.py | 3 +-- nipype/interfaces/niftyfit/tests/test_asl.py | 2 +- nipype/interfaces/niftyfit/tests/test_dwi.py | 2 +- nipype/interfaces/niftyfit/tests/test_qt1.py | 2 +- nipype/interfaces/niftyreg/base.py | 8 ++++---- nipype/interfaces/niftyreg/tests/test_reg.py | 3 +-- .../interfaces/niftyreg/tests/test_regutils.py | 2 +- .../niftyseg/tests/test_em_interfaces.py | 2 +- .../niftyseg/tests/test_label_fusion.py | 2 +- nipype/interfaces/niftyseg/tests/test_lesions.py | 2 +- nipype/interfaces/niftyseg/tests/test_maths.py | 6 +++--- .../interfaces/niftyseg/tests/test_patchmatch.py | 2 +- nipype/interfaces/niftyseg/tests/test_stats.py | 2 +- nipype/interfaces/tests/test_base.py | 16 +++++++++------- nipype/pipeline/plugins/ipythonx.py | 4 +--- .../script_templates/feat_contrast_element.tcl | 0 .../feat_contrast_ftest_element.tcl | 0 .../script_templates/feat_contrast_header.tcl | 0 .../script_templates/feat_contrast_prolog.tcl | 0 .../feat_contrastmask_element.tcl | 0 .../feat_contrastmask_footer.tcl | 0 .../feat_contrastmask_header.tcl | 0 .../script_templates/feat_contrasts.tcl | 0 .../script_templates/feat_ev_custom.tcl | 0 .../script_templates/feat_ev_gamma.tcl | 0 .../script_templates/feat_ev_hrf.tcl | 0 .../script_templates/feat_ev_none.tcl | 0 .../script_templates/feat_ev_ortho.tcl | 0 .../script_templates/feat_fe_copes.tcl | 0 .../script_templates/feat_fe_ev_element.tcl | 0 .../script_templates/feat_fe_ev_header.tcl | 0 .../script_templates/feat_fe_featdirs.tcl | 0 .../script_templates/feat_fe_footer.tcl | 0 .../script_templates/feat_fe_header.tcl | 0 .../script_templates/feat_header.tcl | 0 .../script_templates/feat_header_l1.tcl | 0 .../script_templates/feat_nongui.tcl | 0 .../script_templates/featreg_header.tcl | 0 setup.py | 2 +- 50 files changed, 70 insertions(+), 62 deletions(-) rename nipype/{interfaces => }/script_templates/feat_contrast_element.tcl (100%) rename nipype/{interfaces => }/script_templates/feat_contrast_ftest_element.tcl (100%) rename nipype/{interfaces => }/script_templates/feat_contrast_header.tcl (100%) rename nipype/{interfaces => }/script_templates/feat_contrast_prolog.tcl (100%) rename nipype/{interfaces => }/script_templates/feat_contrastmask_element.tcl (100%) rename nipype/{interfaces => }/script_templates/feat_contrastmask_footer.tcl (100%) rename nipype/{interfaces => }/script_templates/feat_contrastmask_header.tcl (100%) rename nipype/{interfaces => }/script_templates/feat_contrasts.tcl (100%) rename nipype/{interfaces => }/script_templates/feat_ev_custom.tcl (100%) rename nipype/{interfaces => }/script_templates/feat_ev_gamma.tcl (100%) rename nipype/{interfaces => }/script_templates/feat_ev_hrf.tcl (100%) rename nipype/{interfaces => }/script_templates/feat_ev_none.tcl (100%) rename nipype/{interfaces => }/script_templates/feat_ev_ortho.tcl (100%) rename nipype/{interfaces => }/script_templates/feat_fe_copes.tcl (100%) rename nipype/{interfaces => }/script_templates/feat_fe_ev_element.tcl (100%) rename nipype/{interfaces => }/script_templates/feat_fe_ev_header.tcl (100%) rename nipype/{interfaces => }/script_templates/feat_fe_featdirs.tcl (100%) rename nipype/{interfaces => }/script_templates/feat_fe_footer.tcl (100%) rename nipype/{interfaces => }/script_templates/feat_fe_header.tcl (100%) rename nipype/{interfaces => }/script_templates/feat_header.tcl (100%) rename nipype/{interfaces => }/script_templates/feat_header_l1.tcl (100%) rename nipype/{interfaces => }/script_templates/feat_nongui.tcl (100%) rename nipype/{interfaces => }/script_templates/featreg_header.tcl (100%) diff --git a/nipype/interfaces/base/__init__.py b/nipype/interfaces/base/__init__.py index 202c5feeac..ee0f10fd7a 100644 --- a/nipype/interfaces/base/__init__.py +++ b/nipype/interfaces/base/__init__.py @@ -17,6 +17,7 @@ from .specs import ( BaseTraitedSpec, TraitedSpec, DynamicTraitedSpec, BaseInterfaceInputSpec, CommandLineInputSpec, + StdOutCommandLineInputSpec ) from .traits_extension import ( @@ -24,4 +25,7 @@ File, Directory, Str, DictStrStr, has_metadata, ImageFile, MultiPath, OutputMultiPath, InputMultiPath) -from .support import Bunch, InterfaceResult, load_template +from .support import ( + Bunch, InterfaceResult, load_template, + NipypeInterfaceError +) diff --git a/nipype/interfaces/base/core.py b/nipype/interfaces/base/core.py index 8374d5ce36..48e24cab90 100644 --- a/nipype/interfaces/base/core.py +++ b/nipype/interfaces/base/core.py @@ -440,7 +440,7 @@ def run(self, **inputs): results : an InterfaceResult object containing a copy of the instance that was executed, provenance information and, if successful, results """ - from ..utils.profiler import ResourceMonitor + from ...utils.profiler import ResourceMonitor enable_rm = config.resource_monitor and self.resource_monitor force_raise = not getattr(self.inputs, 'ignore_exception', False) @@ -624,6 +624,7 @@ class SimpleInterface(BaseInterface): .. testsetup:: + >>> from .specs import TraitedSpec >>> tmp = getfixture('tmpdir') >>> old = tmp.chdir() # changing to a temporary directory diff --git a/nipype/interfaces/base/traits_extension.py b/nipype/interfaces/base/traits_extension.py index 03ed80c272..0ebdad4866 100644 --- a/nipype/interfaces/base/traits_extension.py +++ b/nipype/interfaces/base/traits_extension.py @@ -395,7 +395,7 @@ class OutputMultiPath(MultiPath): XXX This needs to be vetted by somebody who understands traits - >>> from nipype.interfaces.base import OutputMultiPath + >>> from nipype.interfaces.base import OutputMultiPath, TraitedSpec >>> class A(TraitedSpec): ... foo = OutputMultiPath(File(exists=False)) >>> a = A() @@ -440,7 +440,7 @@ class InputMultiPath(MultiPath): XXX This needs to be vetted by somebody who understands traits - >>> from nipype.interfaces.base import InputMultiPath + >>> from nipype.interfaces.base import InputMultiPath, TraitedSpec >>> class A(TraitedSpec): ... foo = InputMultiPath(File(exists=False)) >>> a = A() diff --git a/nipype/interfaces/brainsuite/brainsuite.py b/nipype/interfaces/brainsuite/brainsuite.py index 21014f42ea..60141bcb00 100644 --- a/nipype/interfaces/brainsuite/brainsuite.py +++ b/nipype/interfaces/brainsuite/brainsuite.py @@ -5,7 +5,7 @@ import re as regex from ..base import TraitedSpec, CommandLineInputSpec, CommandLine, File, traits, isdefined -from ..traits_extension import str + """This script provides interfaces for BrainSuite command line tools. Please see brainsuite.org for more information. @@ -902,7 +902,7 @@ class SVRegInputSpec(CommandLineInputSpec): 'Cortical Surface Extraction Sequence' ) dataSinkDelay = traits.List( - str, argstr='%s', + traits.Str, argstr='%s', desc='Connect datasink out_file to dataSinkDelay to delay execution of SVReg ' 'until dataSink has finished sinking CSE outputs.' 'For use with parallel processing workflows including Brainsuites Cortical ' @@ -1087,7 +1087,7 @@ class BDPInputSpec(CommandLineInputSpec): 'bvec and .bval files can be used instead (see diffusionGradientFile and bValueFile). ' ) BVecBValPair = traits.List( - str, minlen=2, maxlen=2, mandatory=True, position=-1, xor=['bMatrixFile'], + traits.Str, minlen=2, maxlen=2, mandatory=True, position=-1, xor=['bMatrixFile'], argstr='--bvec %s --bval %s', desc='Must input a list containing first the BVector file, then the BValue file (both must be absolute paths)\n' 'Example: bdp.inputs.BVecBValPair = [\'/directory/subdir/prefix.dwi.bvec\', \'/directory/subdir/prefix.dwi.bval\'] ' @@ -1100,7 +1100,7 @@ class BDPInputSpec(CommandLineInputSpec): 'usually has an extension of .bvec ' ) dataSinkDelay = traits.List( - str, argstr='%s', + traits.Str, argstr='%s', desc='For use in parallel processing workflows including Brainsuite Cortical ' 'Surface Extraction sequence. Connect datasink out_file to dataSinkDelay ' 'to delay execution of BDP until dataSink has finished sinking outputs. ' diff --git a/nipype/interfaces/dcmstack.py b/nipype/interfaces/dcmstack.py index e9dab240f6..9e49f2b326 100644 --- a/nipype/interfaces/dcmstack.py +++ b/nipype/interfaces/dcmstack.py @@ -19,10 +19,12 @@ import nibabel as nb import imghdr -from .base import (TraitedSpec, DynamicTraitedSpec, - InputMultiPath, File, Directory, - traits, BaseInterface) -from .traits_extension import isdefined, Undefined +from .base import ( + TraitedSpec, DynamicTraitedSpec, + InputMultiPath, File, Directory, + traits, BaseInterface, + isdefined, Undefined +) from ..utils import NUMPY_MMAP diff --git a/nipype/interfaces/fsl/fix.py b/nipype/interfaces/fsl/fix.py index 0775cf62c5..cd4aacfedb 100644 --- a/nipype/interfaces/fsl/fix.py +++ b/nipype/interfaces/fsl/fix.py @@ -64,21 +64,24 @@ OutputMultiPath, BaseInterface, BaseInterfaceInputSpec, - traits + traits, + Directory, + File, + isdefined ) -from ..traits_extension import Directory, File, isdefined import os class TrainingSetCreatorInputSpec(BaseInterfaceInputSpec): mel_icas_in = InputMultiPath(Directory(exists=True), copyfile=False, - desc='Melodic output directories', - argstr='%s', position=-1) + desc='Melodic output directories', + argstr='%s', position=-1) + class TrainingSetCreatorOutputSpec(TraitedSpec): mel_icas_out = OutputMultiPath(Directory(exists=True), copyfile=False, - desc='Hand labels for noise vs signal', - argstr='%s', position=-1) + desc='Hand labels for noise vs signal', + argstr='%s', position=-1) class TrainingSetCreator(BaseInterface): diff --git a/nipype/interfaces/fsl/model.py b/nipype/interfaces/fsl/model.py index 9c55404106..e5ee098ee6 100644 --- a/nipype/interfaces/fsl/model.py +++ b/nipype/interfaces/fsl/model.py @@ -2185,9 +2185,10 @@ def load_template(name): template : string.Template """ - full_fname = os.path.join(os.path.dirname(__file__), - 'script_templates', name) - template_file = open(full_fname) - template = Template(template_file.read()) - template_file.close() + from pkg_resources import resource_filename as pkgrf + full_fname = pkgrf('nipype', + os.path.join('script_templates', name)) + with open(full_fname) as template_file: + template = Template(template_file.read()) + return template diff --git a/nipype/interfaces/mrtrix/tracking.py b/nipype/interfaces/mrtrix/tracking.py index 5570a9b8d1..c013d7b04a 100644 --- a/nipype/interfaces/mrtrix/tracking.py +++ b/nipype/interfaces/mrtrix/tracking.py @@ -15,8 +15,10 @@ import os.path as op from ...utils.filemanip import split_filename -from ..base import CommandLineInputSpec, CommandLine, traits, TraitedSpec, File -from ..traits_extension import isdefined +from ..base import ( + CommandLineInputSpec, CommandLine, traits, TraitedSpec, File, + isdefined +) class FilterTracksInputSpec(CommandLineInputSpec): diff --git a/nipype/interfaces/mrtrix3/base.py b/nipype/interfaces/mrtrix3/base.py index a9890d9653..0d91c3d56d 100644 --- a/nipype/interfaces/mrtrix3/base.py +++ b/nipype/interfaces/mrtrix3/base.py @@ -14,8 +14,7 @@ from __future__ import print_function, division, unicode_literals, absolute_import from ... import logging -from ..traits_extension import isdefined -from ..base import (CommandLineInputSpec, CommandLine, traits, File) +from ..base import (CommandLineInputSpec, CommandLine, traits, File, isdefined) iflogger = logging.getLogger('interface') diff --git a/nipype/interfaces/mrtrix3/connectivity.py b/nipype/interfaces/mrtrix3/connectivity.py index caa510e6e1..3b79b16442 100644 --- a/nipype/interfaces/mrtrix3/connectivity.py +++ b/nipype/interfaces/mrtrix3/connectivity.py @@ -16,8 +16,7 @@ import os import os.path as op -from ..traits_extension import isdefined -from ..base import (CommandLineInputSpec, traits, TraitedSpec, File) +from ..base import (CommandLineInputSpec, traits, TraitedSpec, File, isdefined) from .base import MRTrix3Base diff --git a/nipype/interfaces/mrtrix3/preprocess.py b/nipype/interfaces/mrtrix3/preprocess.py index 141325e25b..c097856ef3 100644 --- a/nipype/interfaces/mrtrix3/preprocess.py +++ b/nipype/interfaces/mrtrix3/preprocess.py @@ -15,9 +15,8 @@ import os.path as op -from ..traits_extension import isdefined from ..base import (CommandLineInputSpec, CommandLine, traits, TraitedSpec, - File) + File, isdefined) from .base import MRTrix3BaseInputSpec, MRTrix3Base diff --git a/nipype/interfaces/mrtrix3/utils.py b/nipype/interfaces/mrtrix3/utils.py index 42f3d0c6fd..fd362ebee2 100644 --- a/nipype/interfaces/mrtrix3/utils.py +++ b/nipype/interfaces/mrtrix3/utils.py @@ -15,9 +15,8 @@ import os.path as op -from ..traits_extension import isdefined from ..base import (CommandLineInputSpec, CommandLine, traits, TraitedSpec, - File, InputMultiPath) + File, InputMultiPath, isdefined) from .base import MRTrix3BaseInputSpec, MRTrix3Base diff --git a/nipype/interfaces/niftyfit/tests/test_asl.py b/nipype/interfaces/niftyfit/tests/test_asl.py index def65d1526..a794964309 100644 --- a/nipype/interfaces/niftyfit/tests/test_asl.py +++ b/nipype/interfaces/niftyfit/tests/test_asl.py @@ -8,7 +8,7 @@ from ....testing import example_data from ...niftyreg import get_custom_path -from ..niftyfit import FitAsl +from ..asl import FitAsl def no_nifty_tool(cmd=None): diff --git a/nipype/interfaces/niftyfit/tests/test_dwi.py b/nipype/interfaces/niftyfit/tests/test_dwi.py index 08bb5809df..1046d7570b 100644 --- a/nipype/interfaces/niftyfit/tests/test_dwi.py +++ b/nipype/interfaces/niftyfit/tests/test_dwi.py @@ -7,7 +7,7 @@ from ....testing import example_data from ...niftyreg import get_custom_path -from ..niftyfit import FitDwi, DwiTool +from ..dwi import FitDwi, DwiTool def no_nifty_tool(cmd=None): diff --git a/nipype/interfaces/niftyfit/tests/test_qt1.py b/nipype/interfaces/niftyfit/tests/test_qt1.py index fb62038209..12febd55bf 100644 --- a/nipype/interfaces/niftyfit/tests/test_qt1.py +++ b/nipype/interfaces/niftyfit/tests/test_qt1.py @@ -8,7 +8,7 @@ from ....testing import example_data from ...niftyreg import get_custom_path -from ..niftyfit import FitQt1 +from ..qt1 import FitQt1 def no_nifty_tool(cmd=None): diff --git a/nipype/interfaces/niftyreg/base.py b/nipype/interfaces/niftyreg/base.py index f22796d158..47859c9ec9 100644 --- a/nipype/interfaces/niftyreg/base.py +++ b/nipype/interfaces/niftyreg/base.py @@ -55,7 +55,7 @@ def __init__(self, required_version=None, **inputs): self.num_threads = 1 super(NiftyRegCommand, self).__init__(**inputs) self.required_version = required_version - _version = self.get_version_from_command() + _version = self.version_from_command() if _version: _version = _version.decode("utf-8") if self._min_version is not None and \ @@ -92,7 +92,7 @@ def _environ_update(self): self.inputs.omp_core_val = Undefined def check_version(self): - _version = self.get_version_from_command() + _version = self.version_from_command() if not _version: raise Exception('Niftyreg not found') # Decoding to string: @@ -108,10 +108,10 @@ def check_version(self): @property def version(self): - return self.get_version_from_command() + return self.version_from_command() def exists(self): - return self.get_version_from_command() is not None + return self.version_from_command() is not None def _format_arg(self, name, spec, value): if name == 'omp_core_val': diff --git a/nipype/interfaces/niftyreg/tests/test_reg.py b/nipype/interfaces/niftyreg/tests/test_reg.py index 2c88ea20af..bbd05adb27 100644 --- a/nipype/interfaces/niftyreg/tests/test_reg.py +++ b/nipype/interfaces/niftyreg/tests/test_reg.py @@ -6,8 +6,7 @@ from ....utils.filemanip import which from ....testing import example_data -from ..niftyreg import ( - get_custom_path, RegAladin, RegF3D) +from .. import (get_custom_path, RegAladin, RegF3D) def no_nifty_tool(cmd=None): diff --git a/nipype/interfaces/niftyreg/tests/test_regutils.py b/nipype/interfaces/niftyreg/tests/test_regutils.py index 3a9e5ce558..763cb2f443 100644 --- a/nipype/interfaces/niftyreg/tests/test_regutils.py +++ b/nipype/interfaces/niftyreg/tests/test_regutils.py @@ -6,7 +6,7 @@ from ....utils.filemanip import which from ....testing import example_data -from ..niftyreg import ( +from .. import ( get_custom_path, RegAverage, RegResample, RegJacobian, RegTools, RegMeasure, RegTransform ) diff --git a/nipype/interfaces/niftyseg/tests/test_em_interfaces.py b/nipype/interfaces/niftyseg/tests/test_em_interfaces.py index 72711c7804..2fbf45cb81 100644 --- a/nipype/interfaces/niftyseg/tests/test_em_interfaces.py +++ b/nipype/interfaces/niftyseg/tests/test_em_interfaces.py @@ -6,7 +6,7 @@ from ....utils.filemanip import which from ....testing import example_data from ...niftyreg import get_custom_path -from ..niftyseg import EM +from .. import EM def no_nifty_tool(cmd=None): diff --git a/nipype/interfaces/niftyseg/tests/test_label_fusion.py b/nipype/interfaces/niftyseg/tests/test_label_fusion.py index 5b29982b72..4641ea0e04 100644 --- a/nipype/interfaces/niftyseg/tests/test_label_fusion.py +++ b/nipype/interfaces/niftyseg/tests/test_label_fusion.py @@ -6,7 +6,7 @@ from ....utils.filemanip import which from ....testing import example_data from ...niftyreg import get_custom_path -from ..niftyseg import LabelFusion, CalcTopNCC +from .. import LabelFusion, CalcTopNCC def no_nifty_tool(cmd=None): diff --git a/nipype/interfaces/niftyseg/tests/test_lesions.py b/nipype/interfaces/niftyseg/tests/test_lesions.py index 6783833d95..958639765c 100644 --- a/nipype/interfaces/niftyseg/tests/test_lesions.py +++ b/nipype/interfaces/niftyseg/tests/test_lesions.py @@ -6,7 +6,7 @@ from ....utils.filemanip import which from ....testing import example_data from ...niftyreg import get_custom_path -from ..niftyseg import FillLesions +from .. import FillLesions def no_nifty_tool(cmd=None): diff --git a/nipype/interfaces/niftyseg/tests/test_maths.py b/nipype/interfaces/niftyseg/tests/test_maths.py index d58f59653d..cd8f4a1274 100644 --- a/nipype/interfaces/niftyseg/tests/test_maths.py +++ b/nipype/interfaces/niftyseg/tests/test_maths.py @@ -6,9 +6,9 @@ from ....utils.filemanip import which from ....testing import example_data from ...niftyreg import get_custom_path -from ..niftyseg import (UnaryMaths, BinaryMaths, - BinaryMathsInteger, TupleMaths, - Merge) +from .. import (UnaryMaths, BinaryMaths, + BinaryMathsInteger, TupleMaths, + Merge) def no_nifty_tool(cmd=None): diff --git a/nipype/interfaces/niftyseg/tests/test_patchmatch.py b/nipype/interfaces/niftyseg/tests/test_patchmatch.py index 99771621dd..0e9e8c7c61 100644 --- a/nipype/interfaces/niftyseg/tests/test_patchmatch.py +++ b/nipype/interfaces/niftyseg/tests/test_patchmatch.py @@ -6,7 +6,7 @@ from ....utils.filemanip import which from ....testing import example_data from ...niftyreg import get_custom_path -from ..niftyseg import PatchMatch +from .. import PatchMatch def no_nifty_tool(cmd=None): diff --git a/nipype/interfaces/niftyseg/tests/test_stats.py b/nipype/interfaces/niftyseg/tests/test_stats.py index 985200f1cd..551d7c94c3 100644 --- a/nipype/interfaces/niftyseg/tests/test_stats.py +++ b/nipype/interfaces/niftyseg/tests/test_stats.py @@ -6,7 +6,7 @@ from ....utils.filemanip import which from ....testing import example_data from ...niftyreg import get_custom_path -from ..niftyseg import UnaryStats, BinaryStats +from .. import UnaryStats, BinaryStats def no_nifty_tool(cmd=None): diff --git a/nipype/interfaces/tests/test_base.py b/nipype/interfaces/tests/test_base.py index 48a44ad6a4..a8ce79a438 100644 --- a/nipype/interfaces/tests/test_base.py +++ b/nipype/interfaces/tests/test_base.py @@ -3,17 +3,19 @@ # vi: set ft=python sts=4 ts=4 sw=4 et: from __future__ import print_function, unicode_literals from future import standard_library -from builtins import open, str +from builtins import open import os import warnings import simplejson as json import pytest -import traits.api as traits -from nipype.testing import example_data -import nipype.interfaces.base as nib -from nipype.utils.filemanip import split_filename -from nipype.interfaces.base import Undefined, config + +from ... import config +from ...testing import example_data +from ...utils.filemanip import split_filename, md5 +from .. import base as nib +from ..base import traits, Undefined + standard_library.install_aliases() @@ -61,7 +63,7 @@ def test_bunch_hash(): newbdict, bhash = b._get_bunch_hash() assert bhash == 'ddcc7b4ec5675df8cf317a48bd1857fa' # Make sure the hash stored in the json file for `infile` is correct. - jshash = nib.md5() + jshash = md5() with open(json_pth, 'r') as fp: jshash.update(fp.read().encode('utf-8')) assert newbdict['infile'][0][1] == jshash.hexdigest() diff --git a/nipype/pipeline/plugins/ipythonx.py b/nipype/pipeline/plugins/ipythonx.py index 8cb3c4190a..d76cdfeb98 100644 --- a/nipype/pipeline/plugins/ipythonx.py +++ b/nipype/pipeline/plugins/ipythonx.py @@ -8,7 +8,7 @@ import sys from future.utils import raise_from -from ...interfaces.base import LooseVersion +from ... import LooseVersion from .base import (DistributedPluginBase, logger, report_crash) IPython_not_loaded = False @@ -20,8 +20,6 @@ IPython_not_loaded = True - - class IPythonXPlugin(DistributedPluginBase): """Execute workflow with ipython """ diff --git a/nipype/interfaces/script_templates/feat_contrast_element.tcl b/nipype/script_templates/feat_contrast_element.tcl similarity index 100% rename from nipype/interfaces/script_templates/feat_contrast_element.tcl rename to nipype/script_templates/feat_contrast_element.tcl diff --git a/nipype/interfaces/script_templates/feat_contrast_ftest_element.tcl b/nipype/script_templates/feat_contrast_ftest_element.tcl similarity index 100% rename from nipype/interfaces/script_templates/feat_contrast_ftest_element.tcl rename to nipype/script_templates/feat_contrast_ftest_element.tcl diff --git a/nipype/interfaces/script_templates/feat_contrast_header.tcl b/nipype/script_templates/feat_contrast_header.tcl similarity index 100% rename from nipype/interfaces/script_templates/feat_contrast_header.tcl rename to nipype/script_templates/feat_contrast_header.tcl diff --git a/nipype/interfaces/script_templates/feat_contrast_prolog.tcl b/nipype/script_templates/feat_contrast_prolog.tcl similarity index 100% rename from nipype/interfaces/script_templates/feat_contrast_prolog.tcl rename to nipype/script_templates/feat_contrast_prolog.tcl diff --git a/nipype/interfaces/script_templates/feat_contrastmask_element.tcl b/nipype/script_templates/feat_contrastmask_element.tcl similarity index 100% rename from nipype/interfaces/script_templates/feat_contrastmask_element.tcl rename to nipype/script_templates/feat_contrastmask_element.tcl diff --git a/nipype/interfaces/script_templates/feat_contrastmask_footer.tcl b/nipype/script_templates/feat_contrastmask_footer.tcl similarity index 100% rename from nipype/interfaces/script_templates/feat_contrastmask_footer.tcl rename to nipype/script_templates/feat_contrastmask_footer.tcl diff --git a/nipype/interfaces/script_templates/feat_contrastmask_header.tcl b/nipype/script_templates/feat_contrastmask_header.tcl similarity index 100% rename from nipype/interfaces/script_templates/feat_contrastmask_header.tcl rename to nipype/script_templates/feat_contrastmask_header.tcl diff --git a/nipype/interfaces/script_templates/feat_contrasts.tcl b/nipype/script_templates/feat_contrasts.tcl similarity index 100% rename from nipype/interfaces/script_templates/feat_contrasts.tcl rename to nipype/script_templates/feat_contrasts.tcl diff --git a/nipype/interfaces/script_templates/feat_ev_custom.tcl b/nipype/script_templates/feat_ev_custom.tcl similarity index 100% rename from nipype/interfaces/script_templates/feat_ev_custom.tcl rename to nipype/script_templates/feat_ev_custom.tcl diff --git a/nipype/interfaces/script_templates/feat_ev_gamma.tcl b/nipype/script_templates/feat_ev_gamma.tcl similarity index 100% rename from nipype/interfaces/script_templates/feat_ev_gamma.tcl rename to nipype/script_templates/feat_ev_gamma.tcl diff --git a/nipype/interfaces/script_templates/feat_ev_hrf.tcl b/nipype/script_templates/feat_ev_hrf.tcl similarity index 100% rename from nipype/interfaces/script_templates/feat_ev_hrf.tcl rename to nipype/script_templates/feat_ev_hrf.tcl diff --git a/nipype/interfaces/script_templates/feat_ev_none.tcl b/nipype/script_templates/feat_ev_none.tcl similarity index 100% rename from nipype/interfaces/script_templates/feat_ev_none.tcl rename to nipype/script_templates/feat_ev_none.tcl diff --git a/nipype/interfaces/script_templates/feat_ev_ortho.tcl b/nipype/script_templates/feat_ev_ortho.tcl similarity index 100% rename from nipype/interfaces/script_templates/feat_ev_ortho.tcl rename to nipype/script_templates/feat_ev_ortho.tcl diff --git a/nipype/interfaces/script_templates/feat_fe_copes.tcl b/nipype/script_templates/feat_fe_copes.tcl similarity index 100% rename from nipype/interfaces/script_templates/feat_fe_copes.tcl rename to nipype/script_templates/feat_fe_copes.tcl diff --git a/nipype/interfaces/script_templates/feat_fe_ev_element.tcl b/nipype/script_templates/feat_fe_ev_element.tcl similarity index 100% rename from nipype/interfaces/script_templates/feat_fe_ev_element.tcl rename to nipype/script_templates/feat_fe_ev_element.tcl diff --git a/nipype/interfaces/script_templates/feat_fe_ev_header.tcl b/nipype/script_templates/feat_fe_ev_header.tcl similarity index 100% rename from nipype/interfaces/script_templates/feat_fe_ev_header.tcl rename to nipype/script_templates/feat_fe_ev_header.tcl diff --git a/nipype/interfaces/script_templates/feat_fe_featdirs.tcl b/nipype/script_templates/feat_fe_featdirs.tcl similarity index 100% rename from nipype/interfaces/script_templates/feat_fe_featdirs.tcl rename to nipype/script_templates/feat_fe_featdirs.tcl diff --git a/nipype/interfaces/script_templates/feat_fe_footer.tcl b/nipype/script_templates/feat_fe_footer.tcl similarity index 100% rename from nipype/interfaces/script_templates/feat_fe_footer.tcl rename to nipype/script_templates/feat_fe_footer.tcl diff --git a/nipype/interfaces/script_templates/feat_fe_header.tcl b/nipype/script_templates/feat_fe_header.tcl similarity index 100% rename from nipype/interfaces/script_templates/feat_fe_header.tcl rename to nipype/script_templates/feat_fe_header.tcl diff --git a/nipype/interfaces/script_templates/feat_header.tcl b/nipype/script_templates/feat_header.tcl similarity index 100% rename from nipype/interfaces/script_templates/feat_header.tcl rename to nipype/script_templates/feat_header.tcl diff --git a/nipype/interfaces/script_templates/feat_header_l1.tcl b/nipype/script_templates/feat_header_l1.tcl similarity index 100% rename from nipype/interfaces/script_templates/feat_header_l1.tcl rename to nipype/script_templates/feat_header_l1.tcl diff --git a/nipype/interfaces/script_templates/feat_nongui.tcl b/nipype/script_templates/feat_nongui.tcl similarity index 100% rename from nipype/interfaces/script_templates/feat_nongui.tcl rename to nipype/script_templates/feat_nongui.tcl diff --git a/nipype/interfaces/script_templates/featreg_header.tcl b/nipype/script_templates/featreg_header.tcl similarity index 100% rename from nipype/interfaces/script_templates/featreg_header.tcl rename to nipype/script_templates/featreg_header.tcl diff --git a/setup.py b/setup.py index 8bca901a4a..e0a52a828a 100755 --- a/setup.py +++ b/setup.py @@ -106,7 +106,7 @@ def main(): pjoin('workflows', 'data', '*'), pjoin('pipeline', 'engine', 'report_template.html'), pjoin('external', 'd3.js'), - pjoin('interfaces', 'script_templates', '*'), + pjoin('script_templates', '*'), pjoin('interfaces', 'tests', 'realign_json.json'), pjoin('interfaces', 'tests', 'use_resources'), 'pytest.ini', From 86293765ce40a4bf42b39f80feddacd0559903b0 Mon Sep 17 00:00:00 2001 From: oesteban Date: Wed, 22 Nov 2017 20:35:23 -0800 Subject: [PATCH 541/643] remove some unicode prefixes --- nipype/interfaces/ants/registration.py | 2 +- nipype/interfaces/ants/segmentation.py | 2 +- nipype/interfaces/fsl/model.py | 2 +- nipype/interfaces/tests/test_base.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/nipype/interfaces/ants/registration.py b/nipype/interfaces/ants/registration.py index 6d82a2e9f1..329dc30186 100644 --- a/nipype/interfaces/ants/registration.py +++ b/nipype/interfaces/ants/registration.py @@ -1291,7 +1291,7 @@ class MeasureImageSimilarity(ANTSCommand): >>> sim.inputs.fixed_image_mask = 'mask.nii' >>> sim.inputs.moving_image_mask = 'mask.nii.gz' >>> sim.cmdline - u'MeasureImageSimilarity --dimensionality 3 --masks ["mask.nii","mask.nii.gz"] \ + 'MeasureImageSimilarity --dimensionality 3 --masks ["mask.nii","mask.nii.gz"] \ --metric MI["T1.nii","resting.nii",1.0,5,Regular,1.0]' """ _cmd = 'MeasureImageSimilarity' diff --git a/nipype/interfaces/ants/segmentation.py b/nipype/interfaces/ants/segmentation.py index 9b620d3841..6c594b5e24 100644 --- a/nipype/interfaces/ants/segmentation.py +++ b/nipype/interfaces/ants/segmentation.py @@ -1325,7 +1325,7 @@ class KellyKapowski(ANTSCommand): >>> kk.inputs.number_integration_points = 10 >>> kk.inputs.thickness_prior_estimate = 10 >>> kk.cmdline - u'KellyKapowski --convergence "[45,0.0,10]" \ + 'KellyKapowski --convergence "[45,0.0,10]" \ --output "[segmentation0_cortical_thickness.nii.gz,segmentation0_warped_white_matter.nii.gz]" \ --image-dimensionality 3 --gradient-step 0.025000 --number-of-integration-points 10 \ --segmentation-image "[segmentation0.nii.gz,2,3]" --smoothing-variance 1.000000 \ diff --git a/nipype/interfaces/fsl/model.py b/nipype/interfaces/fsl/model.py index e5ee098ee6..3784192963 100644 --- a/nipype/interfaces/fsl/model.py +++ b/nipype/interfaces/fsl/model.py @@ -1862,7 +1862,7 @@ class DualRegression(FSLCommand): >>> dual_regression.inputs.n_perm = 10 >>> dual_regression.inputs.out_dir = "my_output_directory" >>> dual_regression.cmdline - u'dual_regression allFA.nii 0 -1 10 my_output_directory functional.nii functional2.nii functional3.nii' + 'dual_regression allFA.nii 0 -1 10 my_output_directory functional.nii functional2.nii functional3.nii' >>> dual_regression.run() # doctest: +SKIP """ diff --git a/nipype/interfaces/tests/test_base.py b/nipype/interfaces/tests/test_base.py index a8ce79a438..6f02f3712c 100644 --- a/nipype/interfaces/tests/test_base.py +++ b/nipype/interfaces/tests/test_base.py @@ -75,7 +75,7 @@ def setup_file(request, tmpdir_factory): tmp_dir = tmpdir_factory.mktemp('files') tmp_infile = tmp_dir.join('foo.txt') with tmp_infile.open('w') as fp: - fp.writelines([u'123456789']) + fp.writelines(['123456789']) tmp_dir.chdir() From 694932308dba6333333304525b807d37047639ee Mon Sep 17 00:00:00 2001 From: oesteban Date: Wed, 22 Nov 2017 21:21:57 -0800 Subject: [PATCH 542/643] simplify fname_presuffix adding test --- nipype/utils/filemanip.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/nipype/utils/filemanip.py b/nipype/utils/filemanip.py index 067a95fdea..419ddd4a5c 100644 --- a/nipype/utils/filemanip.py +++ b/nipype/utils/filemanip.py @@ -175,13 +175,17 @@ def fname_presuffix(fname, prefix='', suffix='', newpath=None, use_ext=True): >>> fname_presuffix(fname,'pre','post','/tmp') '/tmp/prefoopost.nii.gz' + >>> from nipype.interfaces.base import Undefined + >>> fname_presuffix(fname, 'pre', 'post', Undefined) == fname_presuffix(fname, 'pre', 'post') + True + """ pth, fname, ext = split_filename(fname) if not use_ext: ext = '' - # Avoid cyclic references importing isdefined - if newpath and ('%s' % newpath) != '': + # No need for isdefined: bool(Undefined) evaluates to False + if newpath: pth = os.path.abspath(newpath) return os.path.join(pth, prefix + fname + suffix + ext) From 4e37641a9f87873741c8ace823f21222ec792e24 Mon Sep 17 00:00:00 2001 From: oesteban Date: Wed, 22 Nov 2017 22:49:17 -0800 Subject: [PATCH 543/643] run test in temp directory --- nipype/pipeline/plugins/tests/test_callback.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/nipype/pipeline/plugins/tests/test_callback.py b/nipype/pipeline/plugins/tests/test_callback.py index 46f3608746..dfec4a51d6 100644 --- a/nipype/pipeline/plugins/tests/test_callback.py +++ b/nipype/pipeline/plugins/tests/test_callback.py @@ -31,6 +31,8 @@ def callback(self, node, status, result=None): def test_callback_normal(tmpdir): + tmpdir.chdir() + so = Status() wf = pe.Workflow(name='test', base_dir=tmpdir.strpath) f_node = pe.Node(niu.Function(function=func, input_names=[], @@ -47,6 +49,8 @@ def test_callback_normal(tmpdir): def test_callback_exception(tmpdir): + tmpdir.chdir() + so = Status() wf = pe.Workflow(name='test', base_dir=tmpdir.strpath) f_node = pe.Node(niu.Function(function=bad_func, input_names=[], @@ -65,8 +69,10 @@ def test_callback_exception(tmpdir): assert so.statuses[1][1] == 'exception' def test_callback_multiproc_normal(tmpdir): + tmpdir.chdir() + so = Status() - wf = pe.Workflow(name='test', base_dir=tmpdir.strpath) + wf = pe.Workflow(name='test') f_node = pe.Node(niu.Function(function=func, input_names=[], output_names=[]), name='f_node') @@ -89,6 +95,8 @@ def test_callback_multiproc_exception(tmpdir): output_names=[]), name='f_node') wf.add_nodes([f_node]) + wf.config['execution'] = {'crashdump_dir': wf.base_dir} + try: wf.run(plugin='MultiProc', plugin_args={'status_callback': so.callback}) From 672d1a0ed204e6714c21ac35bbc41bab7535d375 Mon Sep 17 00:00:00 2001 From: oesteban Date: Wed, 22 Nov 2017 23:09:06 -0800 Subject: [PATCH 544/643] add some docstrings --- nipype/interfaces/base/specs.py | 13 +++++++++++-- nipype/interfaces/base/support.py | 6 ++++++ nipype/interfaces/base/traits_extension.py | 6 +++++- 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/nipype/interfaces/base/specs.py b/nipype/interfaces/base/specs.py index 83e0b9bd32..5712303845 100644 --- a/nipype/interfaces/base/specs.py +++ b/nipype/interfaces/base/specs.py @@ -1,13 +1,21 @@ # -*- coding: utf-8 -*- # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: +""" + +Base I/O specifications for Nipype interfaces +............................................. + +Define the API for the I/O of interfaces + +""" from __future__ import print_function, division, unicode_literals, absolute_import import os from copy import deepcopy -from packaging.version import Version from warnings import warn from builtins import str, bytes +from packaging.version import Version from ...utils.misc import is_container from ...utils.filemanip import md5, hash_infile, hash_timestamp, to_str @@ -23,7 +31,8 @@ class BaseTraitedSpec(traits.HasTraits): - """Provide a few methods necessary to support nipype interface api + """ + Provide a few methods necessary to support nipype interface api The inputs attribute of interfaces call certain methods that are not available in traits.HasTraits. These are provided here. diff --git a/nipype/interfaces/base/support.py b/nipype/interfaces/base/support.py index a53789f473..62cb6331ce 100644 --- a/nipype/interfaces/base/support.py +++ b/nipype/interfaces/base/support.py @@ -1,6 +1,12 @@ # -*- coding: utf-8 -*- # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: +""" + +Miscelanous tools to support Interface functionality +.................................................... + +""" from __future__ import print_function, division, unicode_literals, absolute_import from builtins import range, object, open, str diff --git a/nipype/interfaces/base/traits_extension.py b/nipype/interfaces/base/traits_extension.py index 0ebdad4866..6b5ff26174 100644 --- a/nipype/interfaces/base/traits_extension.py +++ b/nipype/interfaces/base/traits_extension.py @@ -1,7 +1,11 @@ # -*- coding: utf-8 -*- # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: -"""This module contains Trait classes that we've pulled from the +""" +Traits extention +................ + +This module contains Trait classes that we've pulled from the traits source and fixed due to various bugs. File and Directory are redefined as the release version had dependencies on TraitsUI, which we do not want Nipype to depend on. At least not yet. From 080603d78a8d7ae9d5c08f5cd9e7237ec1caa59e Mon Sep 17 00:00:00 2001 From: Oscar Esteban Date: Fri, 24 Nov 2017 11:41:51 -0800 Subject: [PATCH 545/643] Update CHANGES [skip ci] Make a distinction between release candidates and the final release. --- CHANGES | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index c4ff9ea953..9c8bf0dcba 100644 --- a/CHANGES +++ b/CHANGES @@ -1,11 +1,14 @@ Upcoming release ================ -0.14.0 (November 21, 2017) -========================== +0.14.0 () +============== ###### [Full changelog](https://github.com/nipy/nipype/milestone/13) +0.14.0rc1 (November 21, 2017) +----------------------------- + * ENH: Generate Dockerfiles with neurodocker (https://github.com/nipy/nipype/pull/2202) * ENH: FLAIR options for recon-all (https://github.com/nipy/nipype/pull/2279) * ENH: Config option for setting maxtasksperchild when multiprocessing (https://github.com/nipy/nipype/pull/2284) From 92a8ce53f02c6efe0ac563b85611b07cbc98286b Mon Sep 17 00:00:00 2001 From: oesteban Date: Sat, 25 Nov 2017 17:53:44 -0800 Subject: [PATCH 546/643] fixup DictStrStr --- nipype/interfaces/base/traits_extension.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nipype/interfaces/base/traits_extension.py b/nipype/interfaces/base/traits_extension.py index 6b5ff26174..2fca72dbd3 100644 --- a/nipype/interfaces/base/traits_extension.py +++ b/nipype/interfaces/base/traits_extension.py @@ -42,14 +42,15 @@ standard_library.install_aliases() -DictStrStr = traits.Dict((bytes, str), (bytes, str)) - class Str(Unicode): """Replacement for the default traits.Str based in bytes""" +# Monkeypatch Str and DictStrStr for Python 2 compatibility traits.Str = Str +DictStrStr = traits.Dict((bytes, str), (bytes, str)) +traits.DictStrStr = DictStrStr class BaseFile(BaseUnicode): From 3b83940f2abc19ddf2918d66acd23a14df9a7946 Mon Sep 17 00:00:00 2001 From: Oscar Esteban Date: Sat, 25 Nov 2017 19:39:25 -0800 Subject: [PATCH 547/643] member could be function, and use filemanip.hash_infile --- nipype/interfaces/base/support.py | 36 +++++++++++-------------------- 1 file changed, 12 insertions(+), 24 deletions(-) diff --git a/nipype/interfaces/base/support.py b/nipype/interfaces/base/support.py index 62cb6331ce..98a942fdde 100644 --- a/nipype/interfaces/base/support.py +++ b/nipype/interfaces/base/support.py @@ -8,7 +8,7 @@ """ from __future__ import print_function, division, unicode_literals, absolute_import -from builtins import range, object, open, str +from builtins import range, object, str import os from copy import deepcopy @@ -18,7 +18,7 @@ from ... import logging from ...utils.misc import is_container -from ...utils.filemanip import md5, to_str +from ...utils.filemanip import md5, to_str, hash_infile iflogger = logging.getLogger('interface') @@ -116,27 +116,6 @@ def __repr__(self): outstr.append(')') return ''.join(outstr) - def _hash_infile(self, adict, key): - # Inject file hashes into adict[key] - stuff = adict[key] - if not is_container(stuff): - stuff = [stuff] - file_list = [] - for afile in stuff: - if os.path.isfile(afile): - md5obj = md5() - with open(afile, 'rb') as fp: - while True: - data = fp.read(8192) - if not data: - break - md5obj.update(data) - md5hex = md5obj.hexdigest() - else: - md5hex = None - file_list.append((afile, md5hex)) - return file_list - def _get_bunch_hash(self): """Return a dictionary of our items with hashes for each file. @@ -181,7 +160,7 @@ def _get_bunch_hash(self): dict_withhash = self.dictcopy() dict_nofilename = self.dictcopy() for item in infile_list: - dict_withhash[item] = self._hash_infile(dict_withhash, item) + dict_withhash[item] = _hash_bunch_dict(dict_withhash, item) dict_nofilename[item] = [val[1] for val in dict_withhash[item]] # Sort the items of the dictionary, before hashing the string # representation so we get a predictable order of the @@ -208,6 +187,15 @@ def __pretty__(self, p, cycle): p.end_group(6, ')') +def _hash_bunch_dict(self, adict, key): + """Inject file hashes into adict[key]""" + stuff = adict[key] + if not is_container(stuff): + stuff = [stuff] + return [(afile, hash_infile(afile)) + for afile in stuff] + + class InterfaceResult(object): """Object that contains the results of running a particular Interface. From 59ae74cf035f3add79f6e1614c7b73d952a3fe34 Mon Sep 17 00:00:00 2001 From: Oscar Esteban Date: Sat, 25 Nov 2017 19:43:07 -0800 Subject: [PATCH 548/643] amend to previous commit --- nipype/interfaces/base/support.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nipype/interfaces/base/support.py b/nipype/interfaces/base/support.py index 98a942fdde..f64f91a711 100644 --- a/nipype/interfaces/base/support.py +++ b/nipype/interfaces/base/support.py @@ -187,7 +187,7 @@ def __pretty__(self, p, cycle): p.end_group(6, ')') -def _hash_bunch_dict(self, adict, key): +def _hash_bunch_dict(adict, key): """Inject file hashes into adict[key]""" stuff = adict[key] if not is_container(stuff): From 290eb77123874812781de236d67e72141eb21581 Mon Sep 17 00:00:00 2001 From: Oscar Esteban Date: Sat, 25 Nov 2017 22:16:51 -0800 Subject: [PATCH 549/643] minor fixes --- nipype/interfaces/base/support.py | 6 +++--- nipype/interfaces/base/traits_extension.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/nipype/interfaces/base/support.py b/nipype/interfaces/base/support.py index f64f91a711..8b96501ee6 100644 --- a/nipype/interfaces/base/support.py +++ b/nipype/interfaces/base/support.py @@ -3,8 +3,8 @@ # vi: set ft=python sts=4 ts=4 sw=4 et: """ -Miscelanous tools to support Interface functionality -.................................................... +Miscellaneous tools to support Interface functionality +...................................................... """ from __future__ import print_function, division, unicode_literals, absolute_import @@ -295,7 +295,7 @@ def load_template(name): please use nipype.interfaces.fsl.model.load_template """ - from .fsl.model import load_template + from ..fsl.model import load_template iflogger.warning( 'Deprecated in 1.0.0, and will be removed in 1.1.0, ' 'please use nipype.interfaces.fsl.model.load_template instead.' diff --git a/nipype/interfaces/base/traits_extension.py b/nipype/interfaces/base/traits_extension.py index 2fca72dbd3..18bdd003c2 100644 --- a/nipype/interfaces/base/traits_extension.py +++ b/nipype/interfaces/base/traits_extension.py @@ -2,7 +2,7 @@ # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """ -Traits extention +Traits extension ................ This module contains Trait classes that we've pulled from the From 328e33f4a9436bc418fb40ef83c9e82d8d90373a Mon Sep 17 00:00:00 2001 From: Dorota Jarecka Date: Sun, 26 Nov 2017 12:48:13 -0500 Subject: [PATCH 550/643] setting matplotlib backend --- nipype/algorithms/confounds.py | 4 ++-- nipype/algorithms/metrics.py | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/nipype/algorithms/confounds.py b/nipype/algorithms/confounds.py index 39cafebe8c..4bb0ddeac6 100644 --- a/nipype/algorithms/confounds.py +++ b/nipype/algorithms/confounds.py @@ -22,7 +22,7 @@ from numpy.polynomial import Legendre from scipy import linalg -from .. import logging +from .. import config, logging from ..external.due import BibTeX from ..interfaces.base import (traits, TraitedSpec, BaseInterface, BaseInterfaceInputSpec, File, isdefined, @@ -816,7 +816,7 @@ def plot_confound(tseries, figsize, name, units=None, """ import matplotlib - matplotlib.use('Agg') + matplotlib.use(config.get('execution', 'matplotlib_backend')) import matplotlib.pyplot as plt from matplotlib.gridspec import GridSpec from matplotlib.backends.backend_pdf import FigureCanvasPdf as FigureCanvas diff --git a/nipype/algorithms/metrics.py b/nipype/algorithms/metrics.py index 2436d2542b..23963de679 100644 --- a/nipype/algorithms/metrics.py +++ b/nipype/algorithms/metrics.py @@ -24,7 +24,7 @@ from scipy.spatial.distance import cdist, euclidean, dice, jaccard from scipy.ndimage.measurements import center_of_mass, label -from .. import logging +from .. import config, logging from ..utils.misc import package_check from ..interfaces.base import (BaseInterface, traits, TraitedSpec, File, @@ -138,6 +138,8 @@ def _eucl_mean(self, nii1, nii2, weighted=False): dist_matrix = cdist(set1_coordinates.T, set2_coordinates.T) min_dist_matrix = np.amin(dist_matrix, axis=0) + import matplotlib + matplotlib.use(config.get('execution', 'matplotlib_backend')) import matplotlib.pyplot as plt plt.figure() plt.hist(min_dist_matrix, 50, normed=1, facecolor='green') From e214b5461f6668f1077b9fc23e971acefe4b8a3f Mon Sep 17 00:00:00 2001 From: Dorota Jarecka Date: Mon, 27 Nov 2017 14:29:52 -0500 Subject: [PATCH 551/643] unicode_literals --- nipype/interfaces/ants/tests/test_registration.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/nipype/interfaces/ants/tests/test_registration.py b/nipype/interfaces/ants/tests/test_registration.py index 3957e6da55..9326504244 100644 --- a/nipype/interfaces/ants/tests/test_registration.py +++ b/nipype/interfaces/ants/tests/test_registration.py @@ -1,19 +1,19 @@ # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- -# vi: set ft=python sts=4 ts=4 sw=4 et: - +# vi: set ft=python sts=4 ts=4 sw=4 et: +from __future__ import unicode_literals from nipype.interfaces.ants import registration import os import pytest def test_ants_mand(): - filepath = os.path.dirname( os.path.realpath( __file__ ) ) - datadir = os.path.realpath(os.path.join(filepath, '../../../testing/data')) + filepath = os.path.dirname( os.path.realpath( __file__ ) ) + datadir = os.path.realpath(os.path.join(filepath, '../../../testing/data')) ants = registration.ANTS() ants.inputs.transformation_model= "SyN" ants.inputs.moving_image = [os.path.join(datadir, 'resting.nii')] ants.inputs.fixed_image = [os.path.join(datadir, 'T1.nii')] - ants.inputs.metric = [u'MI'] + ants.inputs.metric = ['MI'] with pytest.raises(ValueError) as er: ants.run() From 51585be724b890ba6c6f42a23da6245524a1cd46 Mon Sep 17 00:00:00 2001 From: Dorota Jarecka Date: Mon, 27 Nov 2017 18:23:16 -0500 Subject: [PATCH 552/643] ading tmpdir; applying pep8 to my changes --- nipype/interfaces/ants/registration.py | 30 +++++++++++-------- .../ants/tests/test_registration.py | 11 +++---- 2 files changed, 24 insertions(+), 17 deletions(-) diff --git a/nipype/interfaces/ants/registration.py b/nipype/interfaces/ants/registration.py index f105618478..b27dfe4a09 100644 --- a/nipype/interfaces/ants/registration.py +++ b/nipype/interfaces/ants/registration.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- -"""The ants module provides basic functions for interfacing with ants functions. +"""The ants module provides basic functions for interfacing with ants + functions. Change directory to provide relative paths for doctests >>> import os @@ -7,7 +8,8 @@ >>> datadir = os.path.realpath(os.path.join(filepath, '../../testing/data')) >>> os.chdir(datadir) """ -from __future__ import print_function, division, unicode_literals, absolute_import +from __future__ import (print_function, division, unicode_literals, + absolute_import) from builtins import range, str import os @@ -20,17 +22,19 @@ class ANTSInputSpec(ANTSCommandInputSpec): dimension = traits.Enum(3, 2, argstr='%d', usedefault=False, position=1, desc='image dimension (2 or 3)') fixed_image = InputMultiPath(File(exists=True), mandatory=True, - desc=('image to which the moving image is warped')) + desc=('image to which the moving image is ' + 'warped')) moving_image = InputMultiPath(File(exists=True), argstr='%s', mandatory=True, - desc=('image to apply transformation to (generally a coregistered ' + desc=('image to apply transformation to ' + '(generally a coregistered' 'functional)')) # Not all metrics are appropriate for all modalities. Also, not all metrics -# are efficeint or appropriate at all resolution levels, Some metrics perform -# well for gross global registraiton, but do poorly for small changes (i.e. -# Mattes), and some metrics do well for small changes but don't work well for -# gross level changes (i.e. 'CC'). +# are efficeint or appropriate at all resolution levels, Some metrics +# perform well for gross global registraiton, but do poorly for small +# changes (i.e. Mattes), and some metrics do well for small changes but +# don't work well for gross level changes (i.e. 'CC'). # # This is a two stage registration. in the first stage # [ 'Mattes', .................] @@ -54,11 +58,13 @@ class ANTSInputSpec(ANTSCommandInputSpec): desc='the metric weight(s) for each stage. ' 'The weights must sum to 1 per stage.') - radius = traits.List(traits.Int(), requires=['metric'], mandatory=True, - desc='radius of the region (i.e. number of layers around a voxel point)' - ' that is used for computing cross correlation') + radius = traits.List(traits.Int(), requires=['metric'], mandatory=True, + desc='radius of the region (i.e. number of layers' + ' around a voxel point)' + ' that is used for computing cross correlation') - output_transform_prefix = Str('out', usedefault=True, argstr='--output-naming %s', + output_transform_prefix = Str('out', usedefault=True, + argstr='--output-naming %s', mandatory=True, desc='') transformation_model = traits.Enum('Diff', 'Elast', 'Exp', 'Greedy Exp', 'SyN', argstr='%s', mandatory=True, diff --git a/nipype/interfaces/ants/tests/test_registration.py b/nipype/interfaces/ants/tests/test_registration.py index 9326504244..745b825c65 100644 --- a/nipype/interfaces/ants/tests/test_registration.py +++ b/nipype/interfaces/ants/tests/test_registration.py @@ -1,16 +1,18 @@ # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: from __future__ import unicode_literals -from nipype.interfaces.ants import registration +from nipype.interfaces.ants import registration import os import pytest -def test_ants_mand(): - filepath = os.path.dirname( os.path.realpath( __file__ ) ) + +def test_ants_mand(tmpdir): + tmpdir.chdir() + filepath = os.path.dirname(os.path.realpath(__file__)) datadir = os.path.realpath(os.path.join(filepath, '../../../testing/data')) ants = registration.ANTS() - ants.inputs.transformation_model= "SyN" + ants.inputs.transformation_model = "SyN" ants.inputs.moving_image = [os.path.join(datadir, 'resting.nii')] ants.inputs.fixed_image = [os.path.join(datadir, 'T1.nii')] ants.inputs.metric = ['MI'] @@ -18,4 +20,3 @@ def test_ants_mand(): with pytest.raises(ValueError) as er: ants.run() assert "ANTS requires a value for input 'radius'" in str(er.value) - From 8d59408e53fae0e91f56a4cb42a007b2f9ce0044 Mon Sep 17 00:00:00 2001 From: Oscar Esteban Date: Tue, 28 Nov 2017 08:22:31 -0800 Subject: [PATCH 553/643] fix indentation --- docker/files/run_examples.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/files/run_examples.sh b/docker/files/run_examples.sh index 6163e314a9..7959bdb597 100644 --- a/docker/files/run_examples.sh +++ b/docker/files/run_examples.sh @@ -20,7 +20,7 @@ echo '[execution]' >> ${HOME}/.nipype/nipype.cfg echo 'crashfile_format = txt' >> ${HOME}/.nipype/nipype.cfg if [[ "${NIPYPE_RESOURCE_MONITOR:-0}" == "1" ]]; then - echo '[monitoring]' >> ${HOME}/.nipype/nipype.cfg + echo '[monitoring]' >> ${HOME}/.nipype/nipype.cfg echo 'enabled = true' >> ${HOME}/.nipype/nipype.cfg echo 'sample_frequency = 3' >> ${HOME}/.nipype/nipype.cfg fi From c15ba6b4cda4b1cc45a56a8dfb80d17545c1a1ed Mon Sep 17 00:00:00 2001 From: Matteo Mancini Date: Wed, 29 Nov 2017 05:11:32 -0500 Subject: [PATCH 554/643] Revert "Extended MRtrix3 interface" This reverts commit bb9f5b470defe5a029f40bb47239cde918aea8fd. --- doc/users/config_file.rst | 8 +-- doc/users/plugins.rst | 4 +- nipype/algorithms/tests/test_auto_CompCor.py | 53 ---------------- nipype/algorithms/tests/test_auto_ErrorMap.py | 35 ----------- nipype/algorithms/tests/test_auto_Overlap.py | 47 --------------- nipype/algorithms/tests/test_auto_TSNR.py | 43 ------------- nipype/algorithms/tests/test_mesh_ops.py | 2 +- nipype/interfaces/afni/preprocess.py | 2 +- .../afni/tests/test_auto_TCatSubBrick.py | 48 --------------- nipype/interfaces/afni/utils.py | 2 +- nipype/interfaces/ants/resampling.py | 2 +- .../interfaces/ants/tests/test_resampling.py | 4 +- nipype/interfaces/cmtk/tests/test_nbs.py | 4 +- nipype/interfaces/niftyfit/asl.py | 2 +- .../niftyseg/tests/test_auto_PatchMatch.py | 60 ------------------- .../tests/test_auto_SimpleInterface.py | 16 ----- nipype/pipeline/engine/tests/test_utils.py | 2 +- 17 files changed, 16 insertions(+), 318 deletions(-) delete mode 100755 nipype/algorithms/tests/test_auto_CompCor.py delete mode 100755 nipype/algorithms/tests/test_auto_ErrorMap.py delete mode 100755 nipype/algorithms/tests/test_auto_Overlap.py delete mode 100755 nipype/algorithms/tests/test_auto_TSNR.py delete mode 100755 nipype/interfaces/afni/tests/test_auto_TCatSubBrick.py delete mode 100755 nipype/interfaces/niftyseg/tests/test_auto_PatchMatch.py delete mode 100755 nipype/interfaces/tests/test_auto_SimpleInterface.py diff --git a/doc/users/config_file.rst b/doc/users/config_file.rst index 7c10a381c8..b196047e97 100644 --- a/doc/users/config_file.rst +++ b/doc/users/config_file.rst @@ -74,11 +74,11 @@ Execution *display_variable* Override the ``$DISPLAY`` environment variable for interfaces that require - an X server. This option is useful if there is a running X server, but - ``$DISPLAY`` was not defined in nipype's environment. For example, if an X + an X server. This option is useful if there is a running X server, but + ``$DISPLAY`` was not defined in nipype's environment. For example, if an X server is listening on the default port of 6000, set ``display_variable = :0`` - to enable nipype interfaces to use it. It may also point to displays provided - by VNC, `xnest `_ + to enable nipype interfaces to use it. It may also point to displays provided + by VNC, `xnest `_ or `Xvfb `_. If neither ``display_variable`` nor the ``$DISPLAY`` environment variable are set, nipype will try to configure a new virtual server using Xvfb. diff --git a/doc/users/plugins.rst b/doc/users/plugins.rst index e655e5f6db..501e7aa1d6 100644 --- a/doc/users/plugins.rst +++ b/doc/users/plugins.rst @@ -82,9 +82,9 @@ Optional arguments:: exceed the total amount of resources available (memory and threads), when ``False`` (default), only a warning will be issued. - maxtasksperchild : number of nodes to run on each process before refreshing + maxtasksperchild : number of nodes to run on each process before refreshing the worker (default: 10). - + To distribute processing on a multicore machine, simply call:: diff --git a/nipype/algorithms/tests/test_auto_CompCor.py b/nipype/algorithms/tests/test_auto_CompCor.py deleted file mode 100755 index 34dacaf4d3..0000000000 --- a/nipype/algorithms/tests/test_auto_CompCor.py +++ /dev/null @@ -1,53 +0,0 @@ -# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT -from __future__ import unicode_literals -from ..confounds import CompCor - - -def test_CompCor_inputs(): - input_map = dict(components_file=dict(usedefault=True, - ), - header_prefix=dict(), - high_pass_cutoff=dict(usedefault=True, - ), - ignore_exception=dict(nohash=True, - usedefault=True, - ), - ignore_initial_volumes=dict(usedefault=True, - ), - mask_files=dict(), - mask_index=dict(requires=['mask_files'], - xor=['merge_method'], - ), - merge_method=dict(requires=['mask_files'], - xor=['mask_index'], - ), - num_components=dict(usedefault=True, - ), - pre_filter=dict(usedefault=True, - ), - realigned_file=dict(mandatory=True, - ), - regress_poly_degree=dict(usedefault=True, - ), - repetition_time=dict(), - save_pre_filter=dict(), - use_regress_poly=dict(deprecated='0.15.0', - new_name='pre_filter', - ), - ) - inputs = CompCor.input_spec() - - for key, metadata in list(input_map.items()): - for metakey, value in list(metadata.items()): - assert getattr(inputs.traits()[key], metakey) == value - - -def test_CompCor_outputs(): - output_map = dict(components_file=dict(), - pre_filter_file=dict(), - ) - outputs = CompCor.output_spec() - - for key, metadata in list(output_map.items()): - for metakey, value in list(metadata.items()): - assert getattr(outputs.traits()[key], metakey) == value diff --git a/nipype/algorithms/tests/test_auto_ErrorMap.py b/nipype/algorithms/tests/test_auto_ErrorMap.py deleted file mode 100755 index f3d19c5690..0000000000 --- a/nipype/algorithms/tests/test_auto_ErrorMap.py +++ /dev/null @@ -1,35 +0,0 @@ -# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT -from __future__ import unicode_literals -from ..metrics import ErrorMap - - -def test_ErrorMap_inputs(): - input_map = dict(ignore_exception=dict(nohash=True, - usedefault=True, - ), - in_ref=dict(mandatory=True, - ), - in_tst=dict(mandatory=True, - ), - mask=dict(), - metric=dict(mandatory=True, - usedefault=True, - ), - out_map=dict(), - ) - inputs = ErrorMap.input_spec() - - for key, metadata in list(input_map.items()): - for metakey, value in list(metadata.items()): - assert getattr(inputs.traits()[key], metakey) == value - - -def test_ErrorMap_outputs(): - output_map = dict(distance=dict(), - out_map=dict(), - ) - outputs = ErrorMap.output_spec() - - for key, metadata in list(output_map.items()): - for metakey, value in list(metadata.items()): - assert getattr(outputs.traits()[key], metakey) == value diff --git a/nipype/algorithms/tests/test_auto_Overlap.py b/nipype/algorithms/tests/test_auto_Overlap.py deleted file mode 100755 index dcabbec296..0000000000 --- a/nipype/algorithms/tests/test_auto_Overlap.py +++ /dev/null @@ -1,47 +0,0 @@ -# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT -from __future__ import unicode_literals -from ..misc import Overlap - - -def test_Overlap_inputs(): - input_map = dict(bg_overlap=dict(mandatory=True, - usedefault=True, - ), - ignore_exception=dict(nohash=True, - usedefault=True, - ), - mask_volume=dict(), - out_file=dict(usedefault=True, - ), - vol_units=dict(mandatory=True, - usedefault=True, - ), - volume1=dict(mandatory=True, - ), - volume2=dict(mandatory=True, - ), - weighting=dict(usedefault=True, - ), - ) - inputs = Overlap.input_spec() - - for key, metadata in list(input_map.items()): - for metakey, value in list(metadata.items()): - assert getattr(inputs.traits()[key], metakey) == value - - -def test_Overlap_outputs(): - output_map = dict(dice=dict(), - diff_file=dict(), - jaccard=dict(), - labels=dict(), - roi_di=dict(), - roi_ji=dict(), - roi_voldiff=dict(), - volume_difference=dict(), - ) - outputs = Overlap.output_spec() - - for key, metadata in list(output_map.items()): - for metakey, value in list(metadata.items()): - assert getattr(outputs.traits()[key], metakey) == value diff --git a/nipype/algorithms/tests/test_auto_TSNR.py b/nipype/algorithms/tests/test_auto_TSNR.py deleted file mode 100755 index d906d39e3f..0000000000 --- a/nipype/algorithms/tests/test_auto_TSNR.py +++ /dev/null @@ -1,43 +0,0 @@ -# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT -from __future__ import unicode_literals -from ..misc import TSNR - - -def test_TSNR_inputs(): - input_map = dict(detrended_file=dict(hash_files=False, - usedefault=True, - ), - ignore_exception=dict(nohash=True, - usedefault=True, - ), - in_file=dict(mandatory=True, - ), - mean_file=dict(hash_files=False, - usedefault=True, - ), - regress_poly=dict(), - stddev_file=dict(hash_files=False, - usedefault=True, - ), - tsnr_file=dict(hash_files=False, - usedefault=True, - ), - ) - inputs = TSNR.input_spec() - - for key, metadata in list(input_map.items()): - for metakey, value in list(metadata.items()): - assert getattr(inputs.traits()[key], metakey) == value - - -def test_TSNR_outputs(): - output_map = dict(detrended_file=dict(), - mean_file=dict(), - stddev_file=dict(), - tsnr_file=dict(), - ) - outputs = TSNR.output_spec() - - for key, metadata in list(output_map.items()): - for metakey, value in list(metadata.items()): - assert getattr(outputs.traits()[key], metakey) == value diff --git a/nipype/algorithms/tests/test_mesh_ops.py b/nipype/algorithms/tests/test_mesh_ops.py index d5fbc56825..9d510dee2b 100644 --- a/nipype/algorithms/tests/test_mesh_ops.py +++ b/nipype/algorithms/tests/test_mesh_ops.py @@ -15,7 +15,7 @@ @pytest.mark.skipif(VTKInfo.no_tvtk(), reason="tvtk is not installed") def test_ident_distances(tmpdir): - tmpdir.chdir() + tmpdir.chdir() in_surf = example_data('surf01.vtk') dist_ident = m.ComputeMeshWarp() diff --git a/nipype/interfaces/afni/preprocess.py b/nipype/interfaces/afni/preprocess.py index 3d7d47c673..c96616273d 100644 --- a/nipype/interfaces/afni/preprocess.py +++ b/nipype/interfaces/afni/preprocess.py @@ -3490,7 +3490,7 @@ class Qwarp(AFNICommand): >>> qwarp3.inputs.base_file = 'mni.nii' >>> qwarp3.inputs.allineate = True >>> qwarp3.inputs.allineate_opts = '-cose lpa -verb' - >>> qwarp3.cmdline # doctest: +ALLOW_UNICODE + >>> qwarp3.cmdline "3dQwarp -allineate -allineate_opts '-cose lpa -verb' -base mni.nii -source structural.nii -prefix structural_QW" >>> res3 = qwarp3.run() # doctest: +SKIP """ _cmd = '3dQwarp' diff --git a/nipype/interfaces/afni/tests/test_auto_TCatSubBrick.py b/nipype/interfaces/afni/tests/test_auto_TCatSubBrick.py deleted file mode 100755 index da3b0fb383..0000000000 --- a/nipype/interfaces/afni/tests/test_auto_TCatSubBrick.py +++ /dev/null @@ -1,48 +0,0 @@ -# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT -from __future__ import unicode_literals -from ..utils import TCatSubBrick - - -def test_TCatSubBrick_inputs(): - input_map = dict(args=dict(argstr='%s', - ), - environ=dict(nohash=True, - usedefault=True, - ), - ignore_exception=dict(nohash=True, - usedefault=True, - ), - in_files=dict(argstr='%s%s ...', - copyfile=False, - mandatory=True, - position=-1, - ), - num_threads=dict(nohash=True, - usedefault=True, - ), - out_file=dict(argstr='-prefix %s', - genfile=True, - ), - outputtype=dict(), - rlt=dict(argstr='-rlt%s', - position=1, - ), - terminal_output=dict(deprecated='1.0.0', - nohash=True, - ), - ) - inputs = TCatSubBrick.input_spec() - - for key, metadata in list(input_map.items()): - for metakey, value in list(metadata.items()): - assert getattr(inputs.traits()[key], metakey) == value - - -def test_TCatSubBrick_outputs(): - output_map = dict(out_file=dict(), - ) - outputs = TCatSubBrick.output_spec() - - for key, metadata in list(output_map.items()): - for metakey, value in list(metadata.items()): - assert getattr(outputs.traits()[key], metakey) == value diff --git a/nipype/interfaces/afni/utils.py b/nipype/interfaces/afni/utils.py index e492b39d47..242b5077ee 100644 --- a/nipype/interfaces/afni/utils.py +++ b/nipype/interfaces/afni/utils.py @@ -1674,7 +1674,7 @@ class NwarpCat(AFNICommand): >>> nwarpcat = afni.NwarpCat() >>> nwarpcat.inputs.in_files = ['Q25_warp+tlrc.HEAD', ('IDENT', 'structural.nii')] >>> nwarpcat.inputs.out_file = 'Fred_total_WARP' - >>> nwarpcat.cmdline # doctest: +ALLOW_UNICODE + >>> nwarpcat.cmdline "3dNwarpCat -prefix Fred_total_WARP Q25_warp+tlrc.HEAD 'IDENT(structural.nii)'" >>> res = nwarpcat.run() # doctest: +SKIP diff --git a/nipype/interfaces/ants/resampling.py b/nipype/interfaces/ants/resampling.py index e268cb43e2..3ed60a51b1 100644 --- a/nipype/interfaces/ants/resampling.py +++ b/nipype/interfaces/ants/resampling.py @@ -75,7 +75,7 @@ class WarpTimeSeriesImageMultiTransform(ANTSCommand): >>> wtsimt.inputs.reference_image = 'ants_deformed.nii.gz' >>> wtsimt.inputs.transformation_series = ['ants_Warp.nii.gz','ants_Affine.txt'] >>> wtsimt.inputs.invert_affine = [1] # # this will invert the 1st Affine file: ants_Affine.txt - >>> wtsimt.cmdline # doctest: +ALLOW_UNICODE + >>> wtsimt.cmdline 'WarpTimeSeriesImageMultiTransform 4 resting.nii resting_wtsimt.nii -R ants_deformed.nii.gz ants_Warp.nii.gz \ -i ants_Affine.txt' """ diff --git a/nipype/interfaces/ants/tests/test_resampling.py b/nipype/interfaces/ants/tests/test_resampling.py index 509ebfe844..22dc4446e9 100644 --- a/nipype/interfaces/ants/tests/test_resampling.py +++ b/nipype/interfaces/ants/tests/test_resampling.py @@ -1,5 +1,5 @@ # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- -# vi: set ft=python sts=4 ts=4 sw=4 et: +# vi: set ft=python sts=4 ts=4 sw=4 et: from nipype.interfaces.ants import WarpImageMultiTransform, WarpTimeSeriesImageMultiTransform import os @@ -66,7 +66,7 @@ def create_wtsimt(): def test_WarpTimeSeriesImageMultiTransform(change_dir, create_wtsimt): wtsimt = create_wtsimt assert wtsimt.cmdline == 'WarpTimeSeriesImageMultiTransform 4 resting.nii resting_wtsimt.nii \ --R ants_deformed.nii.gz ants_Warp.nii.gz ants_Affine.txt' +-R ants_deformed.nii.gz ants_Warp.nii.gz ants_Affine.txt' def test_WarpTimeSeriesImageMultiTransform_invaffine(change_dir, create_wtsimt): diff --git a/nipype/interfaces/cmtk/tests/test_nbs.py b/nipype/interfaces/cmtk/tests/test_nbs.py index 03a7aa8619..0516390b02 100644 --- a/nipype/interfaces/cmtk/tests/test_nbs.py +++ b/nipype/interfaces/cmtk/tests/test_nbs.py @@ -31,12 +31,12 @@ def test_importerror(creating_graphs, tmpdir): graphlist = creating_graphs group1 = graphlist[:3] group2 = graphlist[3:] - + nbs = NetworkBasedStatistic() nbs.inputs.in_group1 = group1 nbs.inputs.in_group2 = group2 nbs.inputs.edge_key = "weight" - + with pytest.raises(ImportError) as e: nbs.run() assert "cviewer library is not available" == str(e.value) diff --git a/nipype/interfaces/niftyfit/asl.py b/nipype/interfaces/niftyfit/asl.py index 8f95a48192..366f9a6eca 100644 --- a/nipype/interfaces/niftyfit/asl.py +++ b/nipype/interfaces/niftyfit/asl.py @@ -147,7 +147,7 @@ class FitAsl(NiftyFitCommand): >>> from nipype.interfaces import niftyfit >>> node = niftyfit.FitAsl() >>> node.inputs.source_file = 'asl.nii.gz' - >>> node.cmdline + >>> node.cmdline 'fit_asl -source asl.nii.gz -cbf asl_cbf.nii.gz -error asl_error.nii.gz \ -syn asl_syn.nii.gz' diff --git a/nipype/interfaces/niftyseg/tests/test_auto_PatchMatch.py b/nipype/interfaces/niftyseg/tests/test_auto_PatchMatch.py deleted file mode 100755 index 635eff1c9b..0000000000 --- a/nipype/interfaces/niftyseg/tests/test_auto_PatchMatch.py +++ /dev/null @@ -1,60 +0,0 @@ -# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT -from __future__ import unicode_literals -from ..patchmatch import PatchMatch - - -def test_PatchMatch_inputs(): - input_map = dict(args=dict(argstr='%s', - ), - cs_size=dict(argstr='-cs %i', - ), - database_file=dict(argstr='-db %s', - mandatory=True, - position=3, - ), - environ=dict(nohash=True, - usedefault=True, - ), - ignore_exception=dict(nohash=True, - usedefault=True, - ), - in_file=dict(argstr='-i %s', - mandatory=True, - position=1, - ), - it_num=dict(argstr='-it %i', - ), - mask_file=dict(argstr='-m %s', - mandatory=True, - position=2, - ), - match_num=dict(argstr='-match %i', - ), - out_file=dict(argstr='-o %s', - name_source=['in_file'], - name_template='%s_pm.nii.gz', - position=4, - ), - patch_size=dict(argstr='-size %i', - ), - pm_num=dict(argstr='-pm %i', - ), - terminal_output=dict(deprecated='1.0.0', - nohash=True, - ), - ) - inputs = PatchMatch.input_spec() - - for key, metadata in list(input_map.items()): - for metakey, value in list(metadata.items()): - assert getattr(inputs.traits()[key], metakey) == value - - -def test_PatchMatch_outputs(): - output_map = dict(out_file=dict(), - ) - outputs = PatchMatch.output_spec() - - for key, metadata in list(output_map.items()): - for metakey, value in list(metadata.items()): - assert getattr(outputs.traits()[key], metakey) == value diff --git a/nipype/interfaces/tests/test_auto_SimpleInterface.py b/nipype/interfaces/tests/test_auto_SimpleInterface.py deleted file mode 100755 index b00d1f9a3c..0000000000 --- a/nipype/interfaces/tests/test_auto_SimpleInterface.py +++ /dev/null @@ -1,16 +0,0 @@ -# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT -from __future__ import unicode_literals -from ..base import SimpleInterface - - -def test_SimpleInterface_inputs(): - input_map = dict(ignore_exception=dict(nohash=True, - usedefault=True, - ), - ) - inputs = SimpleInterface.input_spec() - - for key, metadata in list(input_map.items()): - for metakey, value in list(metadata.items()): - assert getattr(inputs.traits()[key], metakey) == value - diff --git a/nipype/pipeline/engine/tests/test_utils.py b/nipype/pipeline/engine/tests/test_utils.py index 23c7a16fc6..34ec45cfa8 100644 --- a/nipype/pipeline/engine/tests/test_utils.py +++ b/nipype/pipeline/engine/tests/test_utils.py @@ -23,7 +23,7 @@ def test_identitynode_removal(tmpdir): def test_function(arg1, arg2, arg3): import numpy as np return (np.array(arg1) + arg2 + arg3).tolist() - + wf = pe.Workflow(name="testidentity", base_dir=tmpdir.strpath) From 248e589ec04f476c8e5c1fbc1878f828aa011601 Mon Sep 17 00:00:00 2001 From: Matteo Mancini Date: Wed, 29 Nov 2017 08:12:59 -0500 Subject: [PATCH 555/643] Updated MRtrix3 interfaces --- nipype/interfaces/mrtrix3/__init__.py | 6 +- nipype/interfaces/mrtrix3/preprocess.py | 105 +------------- nipype/interfaces/mrtrix3/reconst.py | 136 +++--------------- .../mrtrix3/tests/test_auto_DWI2FOD.py | 81 ----------- .../mrtrix3/tests/test_auto_DWI2Response.py | 75 ---------- .../mrtrix3/tests/test_auto_EstimateFOD.py | 59 +++++--- .../mrtrix3/tests/test_auto_Generate5ttFSL.py | 45 ------ .../mrtrix3/tests/test_auto_ResponseSD.py | 53 ++++--- nipype/interfaces/mrtrix3/utils.py | 49 +------ 9 files changed, 89 insertions(+), 520 deletions(-) delete mode 100755 nipype/interfaces/mrtrix3/tests/test_auto_DWI2FOD.py delete mode 100755 nipype/interfaces/mrtrix3/tests/test_auto_DWI2Response.py delete mode 100755 nipype/interfaces/mrtrix3/tests/test_auto_Generate5ttFSL.py diff --git a/nipype/interfaces/mrtrix3/__init__.py b/nipype/interfaces/mrtrix3/__init__.py index 81749386f5..53bc8f5f53 100644 --- a/nipype/interfaces/mrtrix3/__init__.py +++ b/nipype/interfaces/mrtrix3/__init__.py @@ -3,9 +3,9 @@ # vi: set ft=python sts=4 ts=4 sw=4 et: # -*- coding: utf-8 -*- -from .utils import (Mesh2PVE, Generate5tt, Generate5ttFSL, BrainMask, TensorMetrics, +from .utils import (Mesh2PVE, Generate5tt, BrainMask, TensorMetrics, ComputeTDI, TCK2VTK, MRMath, MRConvert, DWIExtract) -from .preprocess import DWI2Response, ResponseSD, ACTPrepareFSL, ReplaceFSwithFIRST +from .preprocess import ResponseSD, ACTPrepareFSL, ReplaceFSwithFIRST from .tracking import Tractography -from .reconst import DWI2FOD, FitTensor, EstimateFOD +from .reconst import FitTensor, EstimateFOD from .connectivity import LabelConfig, BuildConnectome diff --git a/nipype/interfaces/mrtrix3/preprocess.py b/nipype/interfaces/mrtrix3/preprocess.py index 1159e89e7a..68be18a42c 100644 --- a/nipype/interfaces/mrtrix3/preprocess.py +++ b/nipype/interfaces/mrtrix3/preprocess.py @@ -21,7 +21,7 @@ from .base import MRTrix3BaseInputSpec, MRTrix3Base -class DWI2ResponseInputSpec(MRTrix3BaseInputSpec): +class ResponseSDInputSpec(MRTrix3BaseInputSpec): algorithm = traits.Enum('msmt_5tt','dhollander','tournier','tax', argstr='%s', position=-6, mandatory=True, desc='response estimation algorithm (multi-tissue)') dwi_file = File(exists=True, argstr='%s', position=-5, @@ -37,13 +37,13 @@ class DWI2ResponseInputSpec(MRTrix3BaseInputSpec): desc='maximum harmonic degree of response function') -class DWI2ResponseOutputSpec(TraitedSpec): +class ResponseSDOutputSpec(TraitedSpec): wm_file = File(argstr='%s', desc='output WM response text file') gm_file = File(argstr='%s', desc='output GM response text file') csf_file = File(argstr='%s', desc='output CSF response text file') -class DWI2Response(MRTrix3Base): +class ResponseSD(MRTrix3Base): """ Estimate response function(s) for spherical deconvolution using the specified algorithm. @@ -52,7 +52,7 @@ class DWI2Response(MRTrix3Base): ------- >>> import nipype.interfaces.mrtrix3 as mrt - >>> resp = mrt.DWI2Response() + >>> resp = mrt.ResponseSD() >>> resp.inputs.dwi_file = 'dwi.mif' >>> resp.inputs.algorithm = 'tournier' >>> resp.inputs.grad_fsl = ('bvecs', 'bvals') @@ -62,8 +62,8 @@ class DWI2Response(MRTrix3Base): """ _cmd = 'dwi2response' - input_spec = DWI2ResponseInputSpec - output_spec = DWI2ResponseOutputSpec + input_spec = ResponseSDInputSpec + output_spec = ResponseSDOutputSpec def _list_outputs(self): outputs = self.output_spec().get() @@ -75,99 +75,6 @@ def _list_outputs(self): return outputs -class ResponseSDInputSpec(MRTrix3BaseInputSpec): - in_file = File(exists=True, argstr='%s', mandatory=True, position=-2, - desc='input diffusion weighted images') - - out_file = File( - 'response.txt', argstr='%s', mandatory=True, position=-1, - usedefault=True, desc='output file containing SH coefficients') - - # DW Shell selection options - shell = traits.List(traits.Float, sep=',', argstr='-shell %s', - desc='specify one or more dw gradient shells') - in_mask = File(exists=True, argstr='-mask %s', - desc='provide initial mask image') - max_sh = traits.Int(8, argstr='-lmax %d', - desc='maximum harmonic degree of response function') - out_sf = File('sf_mask.nii.gz', argstr='-sf %s', - desc='write a mask containing single-fibre voxels') - test_all = traits.Bool(False, argstr='-test_all', - desc='re-test all voxels at every iteration') - - # Optimization - iterations = traits.Int(0, argstr='-max_iters %d', - desc='maximum number of iterations per pass') - max_change = traits.Float( - argstr='-max_change %f', - desc=('maximum percentile change in any response function coefficient;' - ' if no individual coefficient changes by more than this ' - 'fraction, the algorithm is terminated.')) - - # Thresholds - vol_ratio = traits.Float( - .15, argstr='-volume_ratio %f', - desc=('maximal volume ratio between the sum of all other positive' - ' lobes in the voxel and the largest FOD lobe')) - disp_mult = traits.Float( - 1., argstr='-dispersion_multiplier %f', - desc=('dispersion of FOD lobe must not exceed some threshold as ' - 'determined by this multiplier and the FOD dispersion in other ' - 'single-fibre voxels. The threshold is: (mean + (multiplier * ' - '(mean - min))); default = 1.0. Criterion is only applied in ' - 'second pass of RF estimation.')) - int_mult = traits.Float( - 2., argstr='-integral_multiplier %f', - desc=('integral of FOD lobe must not be outside some range as ' - 'determined by this multiplier and FOD lobe integral in other' - ' single-fibre voxels. The range is: (mean +- (multiplier * ' - 'stdev)); default = 2.0. Criterion is only applied in second ' - 'pass of RF estimation.')) - - -class ResponseSDOutputSpec(TraitedSpec): - out_file = File(exists=True, desc='the output response file') - out_sf = File(desc=('mask containing single-fibre voxels')) - - -class ResponseSD(MRTrix3Base): - - """ - Generate an appropriate response function from the image data for - spherical deconvolution. (previous MRTrix releases) - - .. [1] Tax, C. M.; Jeurissen, B.; Vos, S. B.; Viergever, M. A. and - Leemans, A., Recursive calibration of the fiber response function - for spherical deconvolution of diffusion MRI data. NeuroImage, - 2014, 86, 67-80 - - - Example - ------- - - >>> import nipype.interfaces.mrtrix3 as mrt - >>> resp = mrt.ResponseSD() - >>> resp.inputs.in_file = 'dwi.mif' - >>> resp.inputs.in_mask = 'mask.nii.gz' - >>> resp.inputs.grad_fsl = ('bvecs', 'bvals') - >>> resp.cmdline # doctest: +ELLIPSIS - 'dwi2response -fslgrad bvecs bvals -mask mask.nii.gz dwi.mif response.txt' - >>> resp.run() # doctest: +SKIP - """ - - _cmd = 'dwi2response' - input_spec = ResponseSDInputSpec - output_spec = ResponseSDOutputSpec - - def _list_outputs(self): - outputs = self.output_spec().get() - outputs['out_file'] = op.abspath(self.inputs.out_file) - - if isdefined(self.inputs.out_sf): - outputs['out_sf'] = op.abspath(self.inputs.out_sf) - return outputs - - class ACTPrepareFSLInputSpec(CommandLineInputSpec): in_file = File(exists=True, argstr='%s', mandatory=True, position=-2, desc='input anatomical image') diff --git a/nipype/interfaces/mrtrix3/reconst.py b/nipype/interfaces/mrtrix3/reconst.py index b8f2ffef63..a5ce55b506 100644 --- a/nipype/interfaces/mrtrix3/reconst.py +++ b/nipype/interfaces/mrtrix3/reconst.py @@ -73,7 +73,7 @@ def _list_outputs(self): return outputs -class DWI2FODInputSpec(MRTrix3BaseInputSpec): +class EstimateFODInputSpec(MRTrix3BaseInputSpec): algorithm = traits.Enum('csd','msmt_csd', argstr='%s', position=-8, mandatory=True, desc='FOD algorithm') dwi_file = File(exists=True, argstr='%s', position=-7, @@ -88,150 +88,41 @@ class DWI2FODInputSpec(MRTrix3BaseInputSpec): csf_odf = File('csf.mif', argstr='%s', position=-1, desc='output CSF ODF') mask_file = File(exists=True, argstr='-mask %s', desc='mask image') - -class DWI2FODOutputSpec(TraitedSpec): - wm_odf = File(argstr='%s', desc='output WM ODF') - gm_odf = File(argstr='%s', desc='output GM ODF') - csf_odf = File(argstr='%s', desc='output CSF ODF') - - -class DWI2FOD(MRTrix3Base): - - """ - Estimate fibre orientation distributions from diffusion data using spherical deconvolution - - Example - ------- - - >>> import nipype.interfaces.mrtrix3 as mrt - >>> fod = mrt.DWI2FOD() - >>> fod.inputs.algorithm = 'csd' - >>> fod.inputs.dwi_file = 'dwi.mif' - >>> fod.inputs.wm_txt = 'wm.txt' - >>> fod.inputs.grad_fsl = ('bvecs', 'bvals') - >>> fod.cmdline # doctest: +ELLIPSIS - 'dwi2fod -fslgrad bvecs bvals csd dwi.mif wm.txt wm.mif' - >>> fod.run() # doctest: +SKIP - """ - - _cmd = 'dwi2fod' - input_spec = DWI2FODInputSpec - output_spec = DWI2FODOutputSpec - - def _list_outputs(self): - outputs = self.output_spec().get() - outputs['wm_odf'] = op.abspath(self.inputs.wm_odf) - if self.inputs.gm_odf!=Undefined: - outputs['gm_odf'] = op.abspath(self.inputs.gm_odf) - if self.inputs.csf_odf!=Undefined: - outputs['csf_odf'] = op.abspath(self.inputs.csf_odf) - return outputs - - -class EstimateFODInputSpec(MRTrix3BaseInputSpec): - in_file = File(exists=True, argstr='%s', mandatory=True, position=-3, - desc='input diffusion weighted images') - response = File( - exists=True, argstr='%s', mandatory=True, position=-2, - desc=('a text file containing the diffusion-weighted signal response ' - 'function coefficients for a single fibre population')) - out_file = File( - 'fods.mif', argstr='%s', mandatory=True, position=-1, - usedefault=True, desc=('the output spherical harmonics coefficients' - ' image')) - # DW Shell selection options shell = traits.List(traits.Float, sep=',', argstr='-shell %s', desc='specify one or more dw gradient shells') - - # Spherical deconvolution options max_sh = traits.Int(8, argstr='-lmax %d', desc='maximum harmonic degree of response function') - in_mask = File(exists=True, argstr='-mask %s', - desc='provide initial mask image') in_dirs = File( exists=True, argstr='-directions %s', desc=('specify the directions over which to apply the non-negativity ' 'constraint (by default, the built-in 300 direction set is ' 'used). These should be supplied as a text file containing the ' '[ az el ] pairs for the directions.')) - sh_filter = File( - exists=True, argstr='-filter %s', - desc=('the linear frequency filtering parameters used for the initial ' - 'linear spherical deconvolution step (default = [ 1 1 1 0 0 ]). ' - 'These should be supplied as a text file containing the ' - 'filtering coefficients for each even harmonic order.')) - - neg_lambda = traits.Float( - 1.0, argstr='-neg_lambda %f', - desc=('the regularisation parameter lambda that controls the strength' - ' of the non-negativity constraint')) - thres = traits.Float( - 0.0, argstr='-threshold %f', - desc=('the threshold below which the amplitude of the FOD is assumed ' - 'to be zero, expressed as an absolute amplitude')) - - n_iter = traits.Int( - 50, argstr='-niter %d', desc=('the maximum number of iterations ' - 'to perform for each voxel')) class EstimateFODOutputSpec(TraitedSpec): - out_file = File(exists=True, desc='the output response file') + wm_odf = File(argstr='%s', desc='output WM ODF') + gm_odf = File(argstr='%s', desc='output GM ODF') + csf_odf = File(argstr='%s', desc='output CSF ODF') class EstimateFOD(MRTrix3Base): """ - Convert diffusion-weighted images to tensor images - (previous MRTrix releases) - - Note that this program makes use of implied symmetries in the diffusion - profile. First, the fact the signal attenuation profile is real implies - that it has conjugate symmetry, i.e. Y(l,-m) = Y(l,m)* (where * denotes - the complex conjugate). Second, the diffusion profile should be - antipodally symmetric (i.e. S(x) = S(-x)), implying that all odd l - components should be zero. Therefore, this program only computes the even - elements. - - Note that the spherical harmonics equations used here differ slightly from - those conventionally used, in that the (-1)^m factor has been omitted. - This should be taken into account in all subsequent calculations. - The spherical harmonic coefficients are stored as follows. First, since - the signal attenuation profile is real, it has conjugate symmetry, i.e. - Y(l,-m) = Y(l,m)* (where * denotes the complex conjugate). Second, the - diffusion profile should be antipodally symmetric (i.e. S(x) = S(-x)), - implying that all odd l components should be zero. Therefore, only the - even elements are computed. - - Note that the spherical harmonics equations used here differ slightly from - those conventionally used, in that the (-1)^m factor has been omitted. - This should be taken into account in all subsequent calculations. - Each volume in the output image corresponds to a different spherical - harmonic component. Each volume will correspond to the following: - - volume 0: l = 0, m = 0 - volume 1: l = 2, m = -2 (imaginary part of m=2 SH) - volume 2: l = 2, m = -1 (imaginary part of m=1 SH) - volume 3: l = 2, m = 0 - volume 4: l = 2, m = 1 (real part of m=1 SH) - volume 5: l = 2, m = 2 (real part of m=2 SH) - etc... - - + Estimate fibre orientation distributions from diffusion data using spherical deconvolution Example ------- >>> import nipype.interfaces.mrtrix3 as mrt >>> fod = mrt.EstimateFOD() - >>> fod.inputs.in_file = 'dwi.mif' - >>> fod.inputs.response = 'response.txt' - >>> fod.inputs.in_mask = 'mask.nii.gz' + >>> fod.inputs.algorithm = 'csd' + >>> fod.inputs.dwi_file = 'dwi.mif' + >>> fod.inputs.wm_txt = 'wm.txt' >>> fod.inputs.grad_fsl = ('bvecs', 'bvals') >>> fod.cmdline # doctest: +ELLIPSIS - 'dwi2fod -fslgrad bvecs bvals -mask mask.nii.gz dwi.mif response.txt\ - fods.mif' + 'dwi2fod -fslgrad bvecs bvals csd dwi.mif wm.txt wm.mif' >>> fod.run() # doctest: +SKIP """ @@ -241,5 +132,12 @@ class EstimateFOD(MRTrix3Base): def _list_outputs(self): outputs = self.output_spec().get() - outputs['out_file'] = op.abspath(self.inputs.out_file) + outputs['wm_odf'] = op.abspath(self.inputs.wm_odf) + if self.inputs.gm_odf!=Undefined: + outputs['gm_odf'] = op.abspath(self.inputs.gm_odf) + if self.inputs.csf_odf!=Undefined: + outputs['csf_odf'] = op.abspath(self.inputs.csf_odf) return outputs + + + diff --git a/nipype/interfaces/mrtrix3/tests/test_auto_DWI2FOD.py b/nipype/interfaces/mrtrix3/tests/test_auto_DWI2FOD.py deleted file mode 100755 index 9501fd656b..0000000000 --- a/nipype/interfaces/mrtrix3/tests/test_auto_DWI2FOD.py +++ /dev/null @@ -1,81 +0,0 @@ -# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT -from __future__ import unicode_literals -from ..reconst import DWI2FOD - - -def test_DWI2FOD_inputs(): - input_map = dict(algorithm=dict(argstr='%s', - mandatory=True, - position=-8, - ), - args=dict(argstr='%s', - ), - bval_scale=dict(argstr='-bvalue_scaling %s', - ), - csf_odf=dict(argstr='%s', - position=-1, - ), - csf_txt=dict(argstr='%s', - position=-2, - ), - dwi_file=dict(argstr='%s', - mandatory=True, - position=-7, - ), - environ=dict(nohash=True, - usedefault=True, - ), - gm_odf=dict(argstr='%s', - position=-3, - ), - gm_txt=dict(argstr='%s', - position=-4, - ), - grad_file=dict(argstr='-grad %s', - ), - grad_fsl=dict(argstr='-fslgrad %s %s', - ), - ignore_exception=dict(nohash=True, - usedefault=True, - ), - in_bval=dict(), - in_bvec=dict(argstr='-fslgrad %s %s', - ), - mask_file=dict(argstr='-mask %s', - ), - nthreads=dict(argstr='-nthreads %d', - nohash=True, - ), - terminal_output=dict(deprecated='1.0.0', - nohash=True, - ), - wm_odf=dict(argstr='%s', - mandatory=True, - position=-5, - usedefault=True, - ), - wm_txt=dict(argstr='%s', - mandatory=True, - position=-6, - ), - ) - inputs = DWI2FOD.input_spec() - - for key, metadata in list(input_map.items()): - for metakey, value in list(metadata.items()): - assert getattr(inputs.traits()[key], metakey) == value - - -def test_DWI2FOD_outputs(): - output_map = dict(csf_odf=dict(argstr='%s', - ), - gm_odf=dict(argstr='%s', - ), - wm_odf=dict(argstr='%s', - ), - ) - outputs = DWI2FOD.output_spec() - - for key, metadata in list(output_map.items()): - for metakey, value in list(metadata.items()): - assert getattr(outputs.traits()[key], metakey) == value diff --git a/nipype/interfaces/mrtrix3/tests/test_auto_DWI2Response.py b/nipype/interfaces/mrtrix3/tests/test_auto_DWI2Response.py deleted file mode 100755 index 5b0836f79b..0000000000 --- a/nipype/interfaces/mrtrix3/tests/test_auto_DWI2Response.py +++ /dev/null @@ -1,75 +0,0 @@ -# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT -from __future__ import unicode_literals -from ..preprocess import DWI2Response - - -def test_DWI2Response_inputs(): - input_map = dict(algorithm=dict(argstr='%s', - mandatory=True, - position=-6, - ), - args=dict(argstr='%s', - ), - bval_scale=dict(argstr='-bvalue_scaling %s', - ), - csf_file=dict(argstr='%s', - position=-1, - ), - dwi_file=dict(argstr='%s', - mandatory=True, - position=-5, - ), - environ=dict(nohash=True, - usedefault=True, - ), - gm_file=dict(argstr='%s', - position=-2, - ), - grad_file=dict(argstr='-grad %s', - ), - grad_fsl=dict(argstr='-fslgrad %s %s', - ), - ignore_exception=dict(nohash=True, - usedefault=True, - ), - in_bval=dict(), - in_bvec=dict(argstr='-fslgrad %s %s', - ), - in_mask=dict(argstr='-mask %s', - ), - max_sh=dict(argstr='-lmax %d', - ), - mtt_file=dict(argstr='%s', - position=-4, - ), - nthreads=dict(argstr='-nthreads %d', - nohash=True, - ), - terminal_output=dict(deprecated='1.0.0', - nohash=True, - ), - wm_file=dict(argstr='%s', - position=-3, - usedefault=True, - ), - ) - inputs = DWI2Response.input_spec() - - for key, metadata in list(input_map.items()): - for metakey, value in list(metadata.items()): - assert getattr(inputs.traits()[key], metakey) == value - - -def test_DWI2Response_outputs(): - output_map = dict(csf_file=dict(argstr='%s', - ), - gm_file=dict(argstr='%s', - ), - wm_file=dict(argstr='%s', - ), - ) - outputs = DWI2Response.output_spec() - - for key, metadata in list(output_map.items()): - for metakey, value in list(metadata.items()): - assert getattr(outputs.traits()[key], metakey) == value diff --git a/nipype/interfaces/mrtrix3/tests/test_auto_EstimateFOD.py b/nipype/interfaces/mrtrix3/tests/test_auto_EstimateFOD.py index f645703bba..98f59fbc7a 100644 --- a/nipype/interfaces/mrtrix3/tests/test_auto_EstimateFOD.py +++ b/nipype/interfaces/mrtrix3/tests/test_auto_EstimateFOD.py @@ -4,13 +4,33 @@ def test_EstimateFOD_inputs(): - input_map = dict(args=dict(argstr='%s', + input_map = dict(algorithm=dict(argstr='%s', + mandatory=True, + position=-8, + ), + args=dict(argstr='%s', ), bval_scale=dict(argstr='-bvalue_scaling %s', ), + csf_odf=dict(argstr='%s', + position=-1, + ), + csf_txt=dict(argstr='%s', + position=-2, + ), + dwi_file=dict(argstr='%s', + mandatory=True, + position=-7, + ), environ=dict(nohash=True, usedefault=True, ), + gm_odf=dict(argstr='%s', + position=-3, + ), + gm_txt=dict(argstr='%s', + position=-4, + ), grad_file=dict(argstr='-grad %s', ), grad_fsl=dict(argstr='-fslgrad %s %s', @@ -23,39 +43,27 @@ def test_EstimateFOD_inputs(): ), in_dirs=dict(argstr='-directions %s', ), - in_file=dict(argstr='%s', - mandatory=True, - position=-3, - ), - in_mask=dict(argstr='-mask %s', + mask_file=dict(argstr='-mask %s', ), max_sh=dict(argstr='-lmax %d', ), - n_iter=dict(argstr='-niter %d', - ), - neg_lambda=dict(argstr='-neg_lambda %f', - ), nthreads=dict(argstr='-nthreads %d', nohash=True, ), - out_file=dict(argstr='%s', - mandatory=True, - position=-1, - usedefault=True, - ), - response=dict(argstr='%s', - mandatory=True, - position=-2, - ), - sh_filter=dict(argstr='-filter %s', - ), shell=dict(argstr='-shell %s', sep=',', ), terminal_output=dict(deprecated='1.0.0', nohash=True, ), - thres=dict(argstr='-threshold %f', + wm_odf=dict(argstr='%s', + mandatory=True, + position=-5, + usedefault=True, + ), + wm_txt=dict(argstr='%s', + mandatory=True, + position=-6, ), ) inputs = EstimateFOD.input_spec() @@ -66,7 +74,12 @@ def test_EstimateFOD_inputs(): def test_EstimateFOD_outputs(): - output_map = dict(out_file=dict(), + output_map = dict(csf_odf=dict(argstr='%s', + ), + gm_odf=dict(argstr='%s', + ), + wm_odf=dict(argstr='%s', + ), ) outputs = EstimateFOD.output_spec() diff --git a/nipype/interfaces/mrtrix3/tests/test_auto_Generate5ttFSL.py b/nipype/interfaces/mrtrix3/tests/test_auto_Generate5ttFSL.py deleted file mode 100755 index 97617fa2cc..0000000000 --- a/nipype/interfaces/mrtrix3/tests/test_auto_Generate5ttFSL.py +++ /dev/null @@ -1,45 +0,0 @@ -# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT -from __future__ import unicode_literals -from ..utils import Generate5ttFSL - - -def test_Generate5ttFSL_inputs(): - input_map = dict(args=dict(argstr='%s', - ), - environ=dict(nohash=True, - usedefault=True, - ), - ignore_exception=dict(nohash=True, - usedefault=True, - ), - in_fast=dict(argstr='%s', - mandatory=True, - position=-3, - ), - in_first=dict(argstr='%s', - position=-2, - ), - out_file=dict(argstr='%s', - mandatory=True, - position=-1, - usedefault=True, - ), - terminal_output=dict(deprecated='1.0.0', - nohash=True, - ), - ) - inputs = Generate5ttFSL.input_spec() - - for key, metadata in list(input_map.items()): - for metakey, value in list(metadata.items()): - assert getattr(inputs.traits()[key], metakey) == value - - -def test_Generate5ttFSL_outputs(): - output_map = dict(out_file=dict(), - ) - outputs = Generate5ttFSL.output_spec() - - for key, metadata in list(output_map.items()): - for metakey, value in list(metadata.items()): - assert getattr(outputs.traits()[key], metakey) == value diff --git a/nipype/interfaces/mrtrix3/tests/test_auto_ResponseSD.py b/nipype/interfaces/mrtrix3/tests/test_auto_ResponseSD.py index 4a4aeb153e..7bd633fe29 100644 --- a/nipype/interfaces/mrtrix3/tests/test_auto_ResponseSD.py +++ b/nipype/interfaces/mrtrix3/tests/test_auto_ResponseSD.py @@ -4,15 +4,27 @@ def test_ResponseSD_inputs(): - input_map = dict(args=dict(argstr='%s', + input_map = dict(algorithm=dict(argstr='%s', + mandatory=True, + position=-6, + ), + args=dict(argstr='%s', ), bval_scale=dict(argstr='-bvalue_scaling %s', ), - disp_mult=dict(argstr='-dispersion_multiplier %f', + csf_file=dict(argstr='%s', + position=-1, + ), + dwi_file=dict(argstr='%s', + mandatory=True, + position=-5, ), environ=dict(nohash=True, usedefault=True, ), + gm_file=dict(argstr='%s', + position=-2, + ), grad_file=dict(argstr='-grad %s', ), grad_fsl=dict(argstr='-fslgrad %s %s', @@ -23,39 +35,22 @@ def test_ResponseSD_inputs(): in_bval=dict(), in_bvec=dict(argstr='-fslgrad %s %s', ), - in_file=dict(argstr='%s', - mandatory=True, - position=-2, - ), in_mask=dict(argstr='-mask %s', ), - int_mult=dict(argstr='-integral_multiplier %f', - ), - iterations=dict(argstr='-max_iters %d', - ), - max_change=dict(argstr='-max_change %f', - ), max_sh=dict(argstr='-lmax %d', ), + mtt_file=dict(argstr='%s', + position=-4, + ), nthreads=dict(argstr='-nthreads %d', nohash=True, ), - out_file=dict(argstr='%s', - mandatory=True, - position=-1, - usedefault=True, - ), - out_sf=dict(argstr='-sf %s', - ), - shell=dict(argstr='-shell %s', - sep=',', - ), terminal_output=dict(deprecated='1.0.0', nohash=True, ), - test_all=dict(argstr='-test_all', - ), - vol_ratio=dict(argstr='-volume_ratio %f', + wm_file=dict(argstr='%s', + position=-3, + usedefault=True, ), ) inputs = ResponseSD.input_spec() @@ -66,8 +61,12 @@ def test_ResponseSD_inputs(): def test_ResponseSD_outputs(): - output_map = dict(out_file=dict(), - out_sf=dict(), + output_map = dict(csf_file=dict(argstr='%s', + ), + gm_file=dict(argstr='%s', + ), + wm_file=dict(argstr='%s', + ), ) outputs = ResponseSD.output_spec() diff --git a/nipype/interfaces/mrtrix3/utils.py b/nipype/interfaces/mrtrix3/utils.py index 18397823a7..b8bac5dadb 100644 --- a/nipype/interfaces/mrtrix3/utils.py +++ b/nipype/interfaces/mrtrix3/utils.py @@ -125,7 +125,7 @@ class Generate5tt(MRTrix3Base): """ Generate a 5TT image suitable for ACT using the selected algorithm - uhm + Example ------- @@ -150,53 +150,6 @@ def _list_outputs(self): return outputs -class Generate5ttFSLInputSpec(CommandLineInputSpec): - in_fast = InputMultiPath( - File(exists=True), argstr='%s', mandatory=True, position=-3, - desc='list of PVE images from FAST') - in_first = File( - exists=True, argstr='%s', position=-2, - desc='combined segmentation file from FIRST') - out_file = File( - 'act-5tt.mif', argstr='%s', mandatory=True, position=-1, - usedefault=True, desc='name of output file') - - -class Generate5ttFSLOutputSpec(TraitedSpec): - out_file = File(exists=True, desc='segmentation for ACT in 5tt format') - - -class Generate5ttFSL(CommandLine): - - """ - Concatenate segmentation results from FSL FAST and FIRST into the 5TT - format required for ACT (previous MRTrix releases) - - - Example - ------- - - >>> import nipype.interfaces.mrtrix3 as mrt - >>> seg = mrt.Generate5ttFSL() - >>> seg.inputs.in_fast = ['tpm_00.nii.gz', - ... 'tpm_01.nii.gz', 'tpm_02.nii.gz'] - >>> seg.inputs.in_first = 'first_merged.nii.gz' - >>> seg.cmdline # doctest: +ELLIPSIS - '5ttgen tpm_00.nii.gz tpm_01.nii.gz tpm_02.nii.gz first_merged.nii.gz\ - act-5tt.mif' - >>> seg.run() # doctest: +SKIP - """ - - _cmd = '5ttgen' - input_spec = Generate5ttFSLInputSpec - output_spec = Generate5ttFSLOutputSpec - - def _list_outputs(self): - outputs = self.output_spec().get() - outputs['out_file'] = op.abspath(self.inputs.out_file) - return outputs - - class TensorMetricsInputSpec(CommandLineInputSpec): in_file = File(exists=True, argstr='%s', mandatory=True, position=-1, desc='input DTI image') From 5573e5441106f21601bd5b6545390e0b15d78019 Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Wed, 29 Nov 2017 14:22:25 -0500 Subject: [PATCH 556/643] ENH: Explicit garbage collection in MultiProc --- nipype/pipeline/plugins/multiproc.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/nipype/pipeline/plugins/multiproc.py b/nipype/pipeline/plugins/multiproc.py index b26d029518..660267c78a 100644 --- a/nipype/pipeline/plugins/multiproc.py +++ b/nipype/pipeline/plugins/multiproc.py @@ -12,6 +12,7 @@ from multiprocessing import Process, Pool, cpu_count, pool from traceback import format_exception import sys +import gc from copy import deepcopy import numpy as np @@ -230,6 +231,9 @@ def _send_procs_to_workers(self, updatehash=False, graph=None): jobids = self._sort_jobs(jobids, scheduler=self.plugin_args.get('scheduler')) + # Run garbage collector before potentially submitting jobs + gc.collect() + # Submit jobs for jobid in jobids: # First expand mapnodes @@ -292,6 +296,9 @@ def _send_procs_to_workers(self, updatehash=False, graph=None): free_processors += next_job_th # Display stats next loop self._stats = None + + # Clean up any debris from running node in main process + gc.collect() continue # Task should be submitted to workers From 0edf2defbec1d8092de0acd83740fb4091ed564c Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Wed, 29 Nov 2017 14:23:51 -0500 Subject: [PATCH 557/643] STY: Flake8 cleanup --- nipype/pipeline/plugins/multiproc.py | 30 +++++++++++++++++----------- 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/nipype/pipeline/plugins/multiproc.py b/nipype/pipeline/plugins/multiproc.py index 660267c78a..f649b99fd7 100644 --- a/nipype/pipeline/plugins/multiproc.py +++ b/nipype/pipeline/plugins/multiproc.py @@ -122,13 +122,16 @@ def __init__(self, plugin_args=None): non_daemon = self.plugin_args.get('non_daemon', True) maxtasks = self.plugin_args.get('maxtasksperchild', 10) self.processors = self.plugin_args.get('n_procs', cpu_count()) - self.memory_gb = self.plugin_args.get('memory_gb', # Allocate 90% of system memory - get_system_total_memory_gb() * 0.9) - self.raise_insufficient = self.plugin_args.get('raise_insufficient', True) + self.memory_gb = self.plugin_args.get( + 'memory_gb', # Allocate 90% of system memory + get_system_total_memory_gb() * 0.9) + self.raise_insufficient = self.plugin_args.get('raise_insufficient', + True) # Instantiate different thread pools for non-daemon processes - logger.debug('MultiProcPlugin starting in "%sdaemon" mode (n_procs=%d, mem_gb=%0.2f)', - 'non' * int(non_daemon), self.processors, self.memory_gb) + logger.debug('MultiProcPlugin starting in "%sdaemon" mode (n_procs=%d,' + 'mem_gb=%0.2f)', 'non' * int(non_daemon), self.processors, + self.memory_gb) NipypePool = NonDaemonPool if non_daemon else Pool try: @@ -205,12 +208,13 @@ def _send_procs_to_workers(self, updatehash=False, graph=None): Sends jobs to workers when system resources are available. """ - # Check to see if a job is available (jobs without dependencies not run) + # Check to see if a job is available (jobs with all dependencies run) # See https://github.com/nipy/nipype/pull/2200#discussion_r141605722 jobids = np.nonzero(~self.proc_done & (self.depidx.sum(0) == 0))[1] - # Check available system resources by summing all threads and memory used - free_memory_gb, free_processors = self._check_resources(self.pending_tasks) + # Check available resources by summing all threads and memory used + free_memory_gb, free_processors = self._check_resources( + self.pending_tasks) stats = (len(self.pending_tasks), len(jobids), free_memory_gb, self.memory_gb, free_processors, self.processors) @@ -229,7 +233,8 @@ def _send_procs_to_workers(self, updatehash=False, graph=None): 'be submitted to the queue. Potential deadlock') return - jobids = self._sort_jobs(jobids, scheduler=self.plugin_args.get('scheduler')) + jobids = self._sort_jobs(jobids, + scheduler=self.plugin_args.get('scheduler')) # Run garbage collector before potentially submitting jobs gc.collect() @@ -265,9 +270,10 @@ def _send_procs_to_workers(self, updatehash=False, graph=None): free_memory_gb -= next_job_gb free_processors -= next_job_th - logger.debug('Allocating %s ID=%d (%0.2fGB, %d threads). Free: %0.2fGB, %d threads.', - self.procs[jobid].fullname, jobid, next_job_gb, next_job_th, - free_memory_gb, free_processors) + logger.debug('Allocating %s ID=%d (%0.2fGB, %d threads). Free: ' + '%0.2fGB, %d threads.', self.procs[jobid].fullname, + jobid, next_job_gb, next_job_th, free_memory_gb, + free_processors) # change job status in appropriate queues self.proc_done[jobid] = True From 3cb99d8c41ec87900fae3e37a91d30307c412370 Mon Sep 17 00:00:00 2001 From: Oscar Esteban Date: Wed, 29 Nov 2017 13:39:32 -0800 Subject: [PATCH 558/643] [skip ci] Add release date (v.0.14.0) --- CHANGES | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index edae12b01f..714b14aac0 100644 --- a/CHANGES +++ b/CHANGES @@ -2,8 +2,8 @@ Upcoming release ================ -0.14.0 () -============== +0.14.0 (November 29, 2017) +========================== ###### [Full changelog](https://github.com/nipy/nipype/milestone/13) From 7ebfd62db8aa5769d8d4878bda2053916d88bc3e Mon Sep 17 00:00:00 2001 From: mathiasg Date: Wed, 29 Nov 2017 18:29:16 -0500 Subject: [PATCH 559/643] rel: 0.14.0 --- .zenodo.json | 230 +++++++++--------- doc/conf.py | 2 +- nipype/info.py | 2 +- .../interfaces/ants/tests/test_auto_ANTS.py | 7 +- 4 files changed, 127 insertions(+), 114 deletions(-) diff --git a/.zenodo.json b/.zenodo.json index 2985b7e107..05ecbbca87 100644 --- a/.zenodo.json +++ b/.zenodo.json @@ -1,10 +1,5 @@ { "creators": [ - { - "affiliation": "Department of Psychology, Stanford University", - "name": "Gorgolewski, Krzysztof J.", - "orcid": "0000-0003-3321-7583" - }, { "affiliation": "Department of Psychology, Stanford University", "name": "Esteban, Oscar", @@ -37,6 +32,11 @@ { "name": "Yvernault, Benjamin" }, + { + "affiliation": "Stanford University", + "name": "Markiewicz, Christopher J.", + "orcid": "0000-0002-6533-164X" + }, { "name": "Burns, Christopher" }, @@ -50,31 +50,25 @@ "name": "Jarecka, Dorota", "orcid": "0000-0003-1857-8129" }, - { - "affiliation": "Stanford University", - "name": "Markiewicz, Christopher J.", - "orcid": "0000-0002-6533-164X" - }, { "affiliation": "Florida International University", "name": "Salo, Taylor", "orcid": "0000-0001-9813-3167" }, { - "affiliation": "Developer", - "name": "Clark, Daniel", - "orcid": "0000-0002-8121-8954" + "affiliation": "Shattuck Lab, UCLA Brain Mapping Center", + "name": "Wong, Jason" }, { "affiliation": "Department of Psychology, Stanford University", "name": "Waskom, Michael" }, { - "affiliation": "Shattuck Lab, UCLA Brain Mapping Center", - "name": "Wong, Jason" + "name": "Modat, Marc" }, { - "name": "Modat, Marc" + "affiliation": "National Institutes of Health", + "name": "Clark, Michael G. " }, { "affiliation": "Department of Electrical and Computer Engineering, Johns Hopkins University", @@ -82,14 +76,19 @@ "orcid": "0000-0003-4554-5058" }, { - "affiliation": "National Institutes of Health", - "name": "Clark, Michael G. " + "affiliation": "Developer", + "name": "Clark, Daniel", + "orcid": "0000-0002-8121-8954" }, { "affiliation": "Mayo Clinic, Neurology, Rochester, MN, USA", "name": "Dayan, Michael", "orcid": "0000-0002-2666-0969" }, + { + "affiliation": "MIT", + "name": "Goncalves, Mathias" + }, { "name": "Loney, Fred" }, @@ -112,10 +111,6 @@ { "name": "Pinsard, Basile" }, - { - "affiliation": "MIT", - "name": "Goncalves, Mathias" - }, { "affiliation": "UC Berkeley", "name": "Clark, Dav", @@ -126,6 +121,15 @@ "name": "Cipollini, Ben", "orcid": "0000-0002-7782-0790" }, + { + "affiliation": "Institute for Biomedical Engineering, ETH and University of Zurich", + "name": "Horea, Christian", + "orcid": "0000-0001-7037-2449" + }, + { + "affiliation": "Molecular Imaging Research Center, CEA, France", + "name": "Bougacha, Salma" + }, { "affiliation": "INRIA", "name": "Varoquaux, Gael", @@ -146,9 +150,6 @@ "name": "Halchenko, Yaroslav O.", "orcid": "0000-0003-3456-2493" }, - { - "name": "Forbes, Jessica" - }, { "name": "Moloney, Brendan" }, @@ -157,11 +158,21 @@ "name": "Malone, Ian B.", "orcid": "0000-0001-7512-7856" }, + { + "affiliation": "MIT", + "name": "Kaczmarzyk, Jakub", + "orcid": "0000-0002-5544-7577" + }, { "affiliation": "Otto-von-Guericke-University Magdeburg, Germany", "name": "Hanke, Michael", "orcid": "0000-0001-6398-6370" }, + { + "affiliation": "Vrije Universiteit, Amsterdam", + "name": "Gilles de Hollander", + "orcid": "0000-0003-1988-5091" + }, { "name": "Mordom, David" }, @@ -179,9 +190,7 @@ "orcid": "0000-0003-0579-9811" }, { - "affiliation": "Institute for Biomedical Engineering, ETH and University of Zurich", - "name": "Horea, Christian", - "orcid": "0000-0001-7037-2449" + "name": "Forbes, Jessica" }, { "name": "Schwartz, Yannick" @@ -195,22 +204,18 @@ "orcid": "0000-0003-2766-8425" }, { - "affiliation": "UniversityHospital Heidelberg, Germany", - "name": "Kleesiek, Jens" - }, - { - "affiliation": "Nathan s Kline institute for psychiatric research", - "name": "Sikka, Sharad" + "name": "Kent, James" }, { - "affiliation": "Child Mind Institute", - "name": "Frohlich, Caroline" + "name": "Perez-Guevara, Martin" }, { - "name": "Kent, James" + "affiliation": "UniversityHospital Heidelberg, Germany", + "name": "Kleesiek, Jens" }, { - "name": "Perez-Guevara, Martin" + "affiliation": "Nathan s Kline institute for psychiatric research", + "name": "Sikka, Sharad" }, { "name": "Watanabe, Aimi" @@ -219,6 +224,10 @@ "affiliation": "University of Iowa", "name": "Welch, David" }, + { + "affiliation": "Child Mind Institute", + "name": "Frohlich, Caroline" + }, { "name": "Cumba, Chad" }, @@ -230,15 +239,16 @@ "name": "Eshaghi, Arman", "orcid": "0000-0002-6652-3512" }, + { + "affiliation": "University of Texas at Austin", + "name": "De La Vega, Alejandro", + "orcid": "0000-0001-9062-3778" + }, { "affiliation": "Harvard University - Psychology", "name": "Kastman, Erik", "orcid": "0000-0001-7221-9042" }, - { - "affiliation": "Molecular Imaging Research Center, CEA, France", - "name": "Bougacha, Salma" - }, { "name": "Blair, Ross" }, @@ -266,9 +276,6 @@ "affiliation": "Child Mind Institute", "name": "Giavasis, Steven" }, - { - "name": "Erickson, Drew" - }, { "name": "Correa, Carlos" }, @@ -276,18 +283,21 @@ "name": "Ghayoor, Ali" }, { - "name": "K\u00fcttner, Ren\u00e9" + "affiliation": "University of California, San Francisco", + "name": "Jordan, Kesshi", + "orcid": "0000-0001-6313-0580" }, { - "name": "Haselgrove, Christian" + "name": "Erickson, Drew" + }, + { + "name": "K\u00fcttner, Ren\u00e9" }, { "name": "Zhou, Dale" }, { - "affiliation": "Child Mind Institute", - "name": "Craddock, R. Cameron", - "orcid": "0000-0002-4950-1303" + "name": "Haselgrove, Christian" }, { "name": "Haehn, Daniel" @@ -300,10 +310,12 @@ "name": "Millman, Jarrod" }, { - "name": "Lai, Jeff" + "affiliation": "University of California, San Francisco", + "name": "Jordan, Kesshi", + "orcid": "0000-0001-6313-0580" }, { - "name": "Renfro, Mandy" + "name": "Lai, Jeff" }, { "affiliation": "The University of Sydney", @@ -319,6 +331,9 @@ "name": "Glatard, Tristan", "orcid": "0000-0003-2620-5883" }, + { + "name": "Renfro, Mandy" + }, { "affiliation": "University of Pennsylvania", "name": "Kahn, Ari E.", @@ -338,10 +353,10 @@ "name": "Park, Anne" }, { - "name": "McDermottroe, Conor" + "name": "Hallquist, Michael" }, { - "name": "Hallquist, Michael" + "name": "McDermottroe, Conor" }, { "name": "Poldrack, Russell" @@ -351,40 +366,44 @@ "name": "Perkins, L. Nathan" }, { - "name": "Noel, Maxime" + "affiliation": "University of California, San Francisco", + "name": "Jordan, Kesshi", + "orcid": "0000-0001-6313-0580" }, { - "affiliation": "Institute of Neuroinformatics, ETH/University of Zurich", - "name": "Gerhard, Stephan", - "orcid": "0000-0003-4454-6171" + "affiliation": "University of Newcastle, Australia", + "name": "Cooper, Gavin", + "orcid": "0000-0002-7186-5293" }, { - "name": "Salvatore, John" + "name": "Noel, Maxime" }, { - "name": "Mertz, Fred" + "name": "Salvatore, John" }, { - "affiliation": "Duke University", - "name": "Broderick, William", - "orcid": "0000-0002-8999-9003" + "name": "Mertz, Fred" }, { "name": "Inati, Souheil" }, { - "name": "Hinds, Oliver" + "affiliation": "University of Amsterdam", + "name": "Lukas Snoek", + "orcid": "0000-0001-8972-204X" }, { - "name": "Brett, Matthew" + "affiliation": "Child Mind Institute", + "name": "Craddock, R. Cameron", + "orcid": "0000-0002-4950-1303" }, { - "affiliation": "Department of Psychology, Stanford University; Parietal, INRIA", - "name": "Durnez, Joke", - "orcid": "0000-0001-9030-2202" + "name": "Hinds, Oliver" }, { - "name": "Tambini, Arielle" + "affiliation": "Institute of Neuroinformatics, ETH/University of Zurich", + "name": "Gerhard, Stephan", + "orcid": "0000-0003-4454-6171" }, { "name": "Rothmei, Simon" @@ -395,9 +414,7 @@ "orcid": "0000-0002-5650-3964" }, { - "affiliation": "University of Newcastle, Australia", - "name": "Cooper, Gavin", - "orcid": "0000-0002-7186-5293" + "name": "Tambini, Arielle" }, { "name": "Marina, Ana" @@ -412,6 +429,9 @@ "affiliation": "University of illinois urbana champaign", "name": "Sharp, Paul" }, + { + "name": "Brett, Matthew" + }, { "name": "Matsubara, K" }, @@ -423,11 +443,6 @@ { "name": "Cheung, Brian" }, - { - "affiliation": "The University of Texas at Austin", - "name": "Floren, Andrew", - "orcid": "0000-0003-3618-2056" - }, { "name": "Nickson, Thomas" }, @@ -440,24 +455,28 @@ "name": "Weinstein, Alejandro" }, { - "name": "Dubois, Mathieu" + "affiliation": "The University of Texas at Austin", + "name": "Floren, Andrew", + "orcid": "0000-0003-3618-2056" }, { - "name": "Arias, Jaime" + "affiliation": "Duke University", + "name": "Broderick, William", + "orcid": "0000-0002-8999-9003" }, { - "name": "Tarbert, Claire" + "name": "Dubois, Mathieu" }, { - "name": "Schlamp, Kai" + "affiliation": "Department of Psychology, Stanford University; Parietal, INRIA", + "name": "Durnez, Joke", + "orcid": "0000-0001-9030-2202" }, { - "affiliation": "University of California, San Francisco", - "name": "Jordan, Kesshi", - "orcid": "0000-0001-6313-0580" + "name": "Arias, Jaime" }, { - "name": "Liem, Franz" + "name": "Tarbert, Claire" }, { "name": "Saase, Victor" @@ -471,6 +490,9 @@ { "name": "Podranski, Kornelius" }, + { + "name": "Schlamp, Kai" + }, { "name": "Flandin, Guillaume" }, @@ -479,14 +501,6 @@ "name": "Papadopoulos Orfanos, Dimitri", "orcid": "0000-0002-1242-8990" }, - { - "name": "Schwabacher, Isaac" - }, - { - "affiliation": "University of Cambridge", - "name": "McNamee, Daniel", - "orcid": "0000-0001-9928-4960" - }, { "name": "Falkiewicz, Marcel" }, @@ -504,35 +518,31 @@ "name": "Varada, Jan" }, { - "affiliation": "Stereotaxy Core, Brain & Spine Institute", - "name": "P\u00e9rez-Garc\u00eda, Fernando", - "orcid": "0000-0001-9090-3024" + "name": "Schwabacher, Isaac" }, { - "name": "Davison, Andrew" + "name": "Liem, Franz" }, { - "name": "Shachnev, Dmitry" + "affiliation": "Stereotaxy Core, Brain & Spine Institute", + "name": "P\u00e9rez-Garc\u00eda, Fernando", + "orcid": "0000-0001-9090-3024" }, { - "affiliation": "University of Amsterdam", - "name": "Lukas Snoek", - "orcid": "0000-0001-8972-204X" + "name": "Shachnev, Dmitry" }, { - "affiliation": "Vrije Universiteit, Amsterdam", - "name": "Gilles de Hollander", - "orcid": "0000-0003-1988-5091" + "affiliation": "University of Cambridge", + "name": "McNamee, Daniel", + "orcid": "0000-0001-9928-4960" }, { - "affiliation": "University of Texas at Austin", - "name": "De La Vega, Alejandro", - "orcid": "0000-0001-9062-3778" + "name": "Davison, Andrew" }, { - "affiliation": "MIT", - "name": "Kaczmarzyk, Jakub", - "orcid": "0000-0002-5544-7577" + "affiliation": "Department of Psychology, Stanford University", + "name": "Gorgolewski, Krzysztof J.", + "orcid": "0000-0003-3321-7583" }, { "affiliation": "MIT, HMS", diff --git a/doc/conf.py b/doc/conf.py index 17ba33cbee..094a8250aa 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -82,7 +82,7 @@ # The short X.Y version. version = nipype.__version__ # The full version, including alpha/beta/rc tags. -release = "0.14.0-rc1" +release = "0.14.0" # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/nipype/info.py b/nipype/info.py index fad9912012..cd1571c6a4 100644 --- a/nipype/info.py +++ b/nipype/info.py @@ -10,7 +10,7 @@ # full release. '.dev' as a version_extra string means this is a development # version # Remove -dev for release -__version__ = '0.14.0-rc1' +__version__ = '0.14.0' def get_nipype_gitversion(): diff --git a/nipype/interfaces/ants/tests/test_auto_ANTS.py b/nipype/interfaces/ants/tests/test_auto_ANTS.py index 883f099b60..50386d2704 100644 --- a/nipype/interfaces/ants/tests/test_auto_ANTS.py +++ b/nipype/interfaces/ants/tests/test_auto_ANTS.py @@ -26,7 +26,9 @@ def test_ANTS_inputs(): ), metric=dict(mandatory=True, ), - metric_weight=dict(requires=['metric'], + metric_weight=dict(mandatory=True, + requires=['metric'], + usedefault=True, ), mi_option=dict(argstr='--MI-option %s', sep='x', @@ -49,7 +51,8 @@ def test_ANTS_inputs(): mandatory=True, usedefault=True, ), - radius=dict(requires=['metric'], + radius=dict(mandatory=True, + requires=['metric'], ), regularization=dict(argstr='%s', ), From 150a734b79cd69de9ad9454f25a2215440fd2cb1 Mon Sep 17 00:00:00 2001 From: Elizabeth DuPre Date: Wed, 29 Nov 2017 20:16:11 -0500 Subject: [PATCH 560/643] [ENH] Update zenodo Adds Elizabeth DuPre as contributor --- .zenodo.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.zenodo.json b/.zenodo.json index 2985b7e107..b15ab41ce0 100644 --- a/.zenodo.json +++ b/.zenodo.json @@ -495,6 +495,11 @@ "name": "Pellman, John", "orcid": "0000-0001-6810-4461" }, + { + "affiliation": "Montreal Neurological Institute and Hospital", + "name": "DuPre, Elizabeth", + "orcid": "0000-0003-1358-196X" + }, { "affiliation": "German Institute for International Educational Research", "name": "Linkersd\u00f6rfer, Janosch", From bf979cc808cb76665a64287965c9321416ad6d15 Mon Sep 17 00:00:00 2001 From: Dylan Nielson Date: Wed, 29 Nov 2017 20:45:01 -0500 Subject: [PATCH 561/643] Update .zenodo.json Just adding my name to the zenodo.json --- .zenodo.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.zenodo.json b/.zenodo.json index b15ab41ce0..07250daf26 100644 --- a/.zenodo.json +++ b/.zenodo.json @@ -500,6 +500,11 @@ "name": "DuPre, Elizabeth", "orcid": "0000-0003-1358-196X" }, + { + "affiliation": "National Institute of Mental Health", + "name": "Nielson, Dylan M.", + "orcid": "0000-0003-4613-6643" + }, { "affiliation": "German Institute for International Educational Research", "name": "Linkersd\u00f6rfer, Janosch", From d83fd3448dfd07e5a11e90d2375d5bb947143f2b Mon Sep 17 00:00:00 2001 From: Ross Markello Date: Wed, 29 Nov 2017 21:08:00 -0500 Subject: [PATCH 562/643] Update .zenodo.json Added self to .zenodo.json --- .zenodo.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.zenodo.json b/.zenodo.json index 07250daf26..81fd41d5bb 100644 --- a/.zenodo.json +++ b/.zenodo.json @@ -495,6 +495,11 @@ "name": "Pellman, John", "orcid": "0000-0001-6810-4461" }, + { + "affiliation": "Montreal Neurological Institute and Hospital", + "name": "Markello, Ross", + "orcid": "0000-0003-1057-1336" + }, { "affiliation": "Montreal Neurological Institute and Hospital", "name": "DuPre, Elizabeth", From bc8260ce527fd61b0d852b7ff551ba050345ad5f Mon Sep 17 00:00:00 2001 From: mathiasg Date: Wed, 29 Nov 2017 23:19:25 -0500 Subject: [PATCH 563/643] fix: sort additional contributors --- .zenodo.json | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/.zenodo.json b/.zenodo.json index 0924c95b32..fb7ccfc0b8 100644 --- a/.zenodo.json +++ b/.zenodo.json @@ -1,5 +1,10 @@ { "creators": [ + { + "affiliation": "Department of Psychology, Stanford University", + "name": "Gorgolewski, Krzysztof J.", + "orcid": "0000-0003-3321-7583" + }, { "affiliation": "Department of Psychology, Stanford University", "name": "Esteban, Oscar", @@ -92,6 +97,11 @@ { "name": "Loney, Fred" }, + { + "affiliation": "National Institute of Mental Health", + "name": "Nielson, Dylan M.", + "orcid": "0000-0003-4613-6643" + }, { "name": "Madison, Cindee" }, @@ -108,6 +118,11 @@ { "name": "Berleant, Shoshana" }, + { + "affiliation": "Montreal Neurological Institute and Hospital", + "name": "Markello, Ross", + "orcid": "0000-0003-1057-1336" + }, { "name": "Pinsard, Basile" }, @@ -192,6 +207,11 @@ { "name": "Forbes, Jessica" }, + { + "affiliation": "Montreal Neurological Institute and Hospital", + "name": "DuPre, Elizabeth", + "orcid": "0000-0003-1358-196X" + }, { "name": "Schwartz, Yannick" }, @@ -509,21 +529,6 @@ "name": "Pellman, John", "orcid": "0000-0001-6810-4461" }, - { - "affiliation": "Montreal Neurological Institute and Hospital", - "name": "Markello, Ross", - "orcid": "0000-0003-1057-1336" - }, - { - "affiliation": "Montreal Neurological Institute and Hospital", - "name": "DuPre, Elizabeth", - "orcid": "0000-0003-1358-196X" - }, - { - "affiliation": "National Institute of Mental Health", - "name": "Nielson, Dylan M.", - "orcid": "0000-0003-4613-6643" - }, { "affiliation": "German Institute for International Educational Research", "name": "Linkersd\u00f6rfer, Janosch", @@ -554,11 +559,6 @@ { "name": "Davison, Andrew" }, - { - "affiliation": "Department of Psychology, Stanford University", - "name": "Gorgolewski, Krzysztof J.", - "orcid": "0000-0003-3321-7583" - }, { "affiliation": "MIT, HMS", "name": "Ghosh, Satrajit", From b4b2e47cfd694ff51539de8280dab00c37682dfd Mon Sep 17 00:00:00 2001 From: mathiasg Date: Wed, 29 Nov 2017 23:39:24 -0500 Subject: [PATCH 564/643] rel: on to the next one --- CHANGES | 2 +- nipype/info.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 714b14aac0..061d161a06 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,4 @@ -Upcoming release +Upcoming release (0.14.1) ================ diff --git a/nipype/info.py b/nipype/info.py index cd1571c6a4..8714f99707 100644 --- a/nipype/info.py +++ b/nipype/info.py @@ -10,7 +10,7 @@ # full release. '.dev' as a version_extra string means this is a development # version # Remove -dev for release -__version__ = '0.14.0' +__version__ = '0.14.1-dev' def get_nipype_gitversion(): From 66620869187dfcb58c568863db3e9c5b4467ae3b Mon Sep 17 00:00:00 2001 From: mathiasg Date: Fri, 1 Dec 2017 15:14:29 -0500 Subject: [PATCH 565/643] fix: remove ldd flag --- nipype/interfaces/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nipype/interfaces/base.py b/nipype/interfaces/base.py index ba398352a0..752cb0e86e 100644 --- a/nipype/interfaces/base.py +++ b/nipype/interfaces/base.py @@ -1485,7 +1485,7 @@ def get_dependencies(name, environ): if sys.platform == 'darwin': cmd = 'otool -L `which {}`'.format elif 'linux' in sys.platform: - cmd = 'ldd -L `which {}`'.format + cmd = 'ldd `which {}`'.format if cmd is None: return 'Platform %s not supported' % sys.platform From 2bf15695eddd6ae2cd9e24b77866f92b9d72e0a8 Mon Sep 17 00:00:00 2001 From: oesteban Date: Fri, 1 Dec 2017 13:40:30 -0800 Subject: [PATCH 566/643] [ENH] Logging - indicate whether the node was cached This PR introduces a minimal modification to the logging trace that happens when a node has been run. --- nipype/pipeline/plugins/base.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/nipype/pipeline/plugins/base.py b/nipype/pipeline/plugins/base.py index bab2812903..5bb03ef3d9 100644 --- a/nipype/pipeline/plugins/base.py +++ b/nipype/pipeline/plugins/base.py @@ -339,7 +339,7 @@ def _local_hash_check(self, jobid, graph): logger.debug('Skipping cached node %s with ID %s.', self.procs[jobid]._id, jobid) try: - self._task_finished_cb(jobid) + self._task_finished_cb(jobid, cached=True) self._remove_node_dirs() except Exception: logger.debug('Error skipping cached node %s (%s).', @@ -349,13 +349,14 @@ def _local_hash_check(self, jobid, graph): return True return False - def _task_finished_cb(self, jobid): + def _task_finished_cb(self, jobid, cached=False): """ Extract outputs and assign to inputs of dependent tasks This is called when a job is completed. """ - logger.info('[Job finished] jobname: %s jobid: %d' % - (self.procs[jobid]._id, jobid)) + logger.info('[Job %d] %s (%s).', jobid, + 'Cached' if cached else 'Completed', + self.procs[jobid].fullname) if self._status_callback: self._status_callback(self.procs[jobid], 'end') # Update job and worker queues From 5cb476ebde884da78dd67ecd0fcb611e6819a6c5 Mon Sep 17 00:00:00 2001 From: oesteban Date: Fri, 1 Dec 2017 13:55:32 -0800 Subject: [PATCH 567/643] revert changes to plugin base - make in different PR --- nipype/pipeline/plugins/base.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/nipype/pipeline/plugins/base.py b/nipype/pipeline/plugins/base.py index 5bb03ef3d9..bab2812903 100644 --- a/nipype/pipeline/plugins/base.py +++ b/nipype/pipeline/plugins/base.py @@ -339,7 +339,7 @@ def _local_hash_check(self, jobid, graph): logger.debug('Skipping cached node %s with ID %s.', self.procs[jobid]._id, jobid) try: - self._task_finished_cb(jobid, cached=True) + self._task_finished_cb(jobid) self._remove_node_dirs() except Exception: logger.debug('Error skipping cached node %s (%s).', @@ -349,14 +349,13 @@ def _local_hash_check(self, jobid, graph): return True return False - def _task_finished_cb(self, jobid, cached=False): + def _task_finished_cb(self, jobid): """ Extract outputs and assign to inputs of dependent tasks This is called when a job is completed. """ - logger.info('[Job %d] %s (%s).', jobid, - 'Cached' if cached else 'Completed', - self.procs[jobid].fullname) + logger.info('[Job finished] jobname: %s jobid: %d' % + (self.procs[jobid]._id, jobid)) if self._status_callback: self._status_callback(self.procs[jobid], 'end') # Update job and worker queues From 671ea0532c9c46082a3fd21d54398f2b9d1940f7 Mon Sep 17 00:00:00 2001 From: oesteban Date: Fri, 1 Dec 2017 13:58:44 -0800 Subject: [PATCH 568/643] [ENH] Logging - MultiProc report current tasks When the verbosity of logs is >= INFO, a list of currently running tasks is generated and printed out. --- nipype/pipeline/plugins/multiproc.py | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/nipype/pipeline/plugins/multiproc.py b/nipype/pipeline/plugins/multiproc.py index b26d029518..8201a2548f 100644 --- a/nipype/pipeline/plugins/multiproc.py +++ b/nipype/pipeline/plugins/multiproc.py @@ -12,10 +12,11 @@ from multiprocessing import Process, Pool, cpu_count, pool from traceback import format_exception import sys +from textwrap import indent +from logging import INFO from copy import deepcopy import numpy as np - from ... import logging from ...utils.profiler import get_system_total_memory_gb from ..engine import MapNode @@ -126,7 +127,7 @@ def __init__(self, plugin_args=None): self.raise_insufficient = self.plugin_args.get('raise_insufficient', True) # Instantiate different thread pools for non-daemon processes - logger.debug('MultiProcPlugin starting in "%sdaemon" mode (n_procs=%d, mem_gb=%0.2f)', + logger.debug('[MultiProc] Starting in "%sdaemon" mode (n_procs=%d, mem_gb=%0.2f)', 'non' * int(non_daemon), self.processors, self.memory_gb) NipypePool = NonDaemonPool if non_daemon else Pool @@ -158,7 +159,7 @@ def _submit_job(self, node, updatehash=False): run_node, (node, updatehash, self._taskid), callback=self._async_callback) - logger.debug('MultiProc submitted task %s (taskid=%d).', + logger.debug('[MultiProc] Submitted task %s (taskid=%d).', node.fullname, self._taskid) return self._taskid @@ -214,9 +215,17 @@ def _send_procs_to_workers(self, updatehash=False, graph=None): stats = (len(self.pending_tasks), len(jobids), free_memory_gb, self.memory_gb, free_processors, self.processors) if self._stats != stats: - logger.info('Currently running %d tasks, and %d jobs ready. Free ' - 'memory (GB): %0.2f/%0.2f, Free processors: %d/%d', - *stats) + tasks_list_msg = '' + if logger.level <= INFO: + running_tasks = [' * %s' % self.procs[jobid].fullname + for _, jobid in self.pending_tasks] + if running_tasks: + tasks_list_msg = '\nCurrently running:\n' + tasks_list_msg += '\n'.join(running_tasks) + tasks_list_msg = indent(tasks_list_msg, ' ' * 21) + logger.info('[MultiProc] Running %d tasks, and %d jobs ready. Free ' + 'memory (GB): %0.2f/%0.2f, Free processors: %d/%d.%s', + *stats, tasks_list_msg) self._stats = stats if free_memory_gb < 0.01 or free_processors == 0: From 5f875269dc80bc70fb8d4df6c94291d83b1ee264 Mon Sep 17 00:00:00 2001 From: oesteban Date: Fri, 1 Dec 2017 14:02:52 -0800 Subject: [PATCH 569/643] revert changes to multiproc - to another PR --- nipype/pipeline/plugins/multiproc.py | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/nipype/pipeline/plugins/multiproc.py b/nipype/pipeline/plugins/multiproc.py index 8201a2548f..b26d029518 100644 --- a/nipype/pipeline/plugins/multiproc.py +++ b/nipype/pipeline/plugins/multiproc.py @@ -12,11 +12,10 @@ from multiprocessing import Process, Pool, cpu_count, pool from traceback import format_exception import sys -from textwrap import indent -from logging import INFO from copy import deepcopy import numpy as np + from ... import logging from ...utils.profiler import get_system_total_memory_gb from ..engine import MapNode @@ -127,7 +126,7 @@ def __init__(self, plugin_args=None): self.raise_insufficient = self.plugin_args.get('raise_insufficient', True) # Instantiate different thread pools for non-daemon processes - logger.debug('[MultiProc] Starting in "%sdaemon" mode (n_procs=%d, mem_gb=%0.2f)', + logger.debug('MultiProcPlugin starting in "%sdaemon" mode (n_procs=%d, mem_gb=%0.2f)', 'non' * int(non_daemon), self.processors, self.memory_gb) NipypePool = NonDaemonPool if non_daemon else Pool @@ -159,7 +158,7 @@ def _submit_job(self, node, updatehash=False): run_node, (node, updatehash, self._taskid), callback=self._async_callback) - logger.debug('[MultiProc] Submitted task %s (taskid=%d).', + logger.debug('MultiProc submitted task %s (taskid=%d).', node.fullname, self._taskid) return self._taskid @@ -215,17 +214,9 @@ def _send_procs_to_workers(self, updatehash=False, graph=None): stats = (len(self.pending_tasks), len(jobids), free_memory_gb, self.memory_gb, free_processors, self.processors) if self._stats != stats: - tasks_list_msg = '' - if logger.level <= INFO: - running_tasks = [' * %s' % self.procs[jobid].fullname - for _, jobid in self.pending_tasks] - if running_tasks: - tasks_list_msg = '\nCurrently running:\n' - tasks_list_msg += '\n'.join(running_tasks) - tasks_list_msg = indent(tasks_list_msg, ' ' * 21) - logger.info('[MultiProc] Running %d tasks, and %d jobs ready. Free ' - 'memory (GB): %0.2f/%0.2f, Free processors: %d/%d.%s', - *stats, tasks_list_msg) + logger.info('Currently running %d tasks, and %d jobs ready. Free ' + 'memory (GB): %0.2f/%0.2f, Free processors: %d/%d', + *stats) self._stats = stats if free_memory_gb < 0.01 or free_processors == 0: From 7e66b0463a8fda696efff5d2ff30324bbbd33668 Mon Sep 17 00:00:00 2001 From: oesteban Date: Fri, 1 Dec 2017 14:07:56 -0800 Subject: [PATCH 570/643] take switch and loggin outside try except --- nipype/utils/filemanip.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/nipype/utils/filemanip.py b/nipype/utils/filemanip.py index 4fe697d63a..aa59b47a0d 100644 --- a/nipype/utils/filemanip.py +++ b/nipype/utils/filemanip.py @@ -680,14 +680,14 @@ def makedirs(path, exist_ok=False): return path # this odd approach deals with concurrent directory cureation - try: - if not os.path.exists(os.path.abspath(path)): - fmlogger.debug("Creating directory %s", path) + if not os.path.exists(os.path.abspath(path)): + fmlogger.debug("Creating directory %s", path) + try: os.makedirs(path) - except OSError: - fmlogger.debug("Problem creating directory %s", path) - if not os.path.exists(path): - raise OSError('Could not create directory %s' % path) + except OSError: + fmlogger.debug("Problem creating directory %s", path) + if not os.path.exists(path): + raise OSError('Could not create directory %s' % path) return path From 15b13ea3d23f398185ff3a51589dd68a6561da83 Mon Sep 17 00:00:00 2001 From: oesteban Date: Fri, 1 Dec 2017 14:53:44 -0800 Subject: [PATCH 571/643] pep8 fixups --- nipype/pipeline/engine/utils.py | 50 ++++++++++++++++----------------- 1 file changed, 24 insertions(+), 26 deletions(-) diff --git a/nipype/pipeline/engine/utils.py b/nipype/pipeline/engine/utils.py index 0c9c53afa9..67c9aaa607 100644 --- a/nipype/pipeline/engine/utils.py +++ b/nipype/pipeline/engine/utils.py @@ -4,27 +4,24 @@ """Utility routines for workflow graphs """ from __future__ import print_function, division, unicode_literals, absolute_import -from builtins import str, open, map, next, zip, range +from builtins import str, open, next, zip, range +import os import sys -from future import standard_library -standard_library.install_aliases() +import pickle from collections import defaultdict - +import re from copy import deepcopy from glob import glob +from distutils.version import LooseVersion + try: from inspect import signature except ImportError: from funcsigs import signature -import os -import re -import pickle from functools import reduce import numpy as np -from distutils.version import LooseVersion - import networkx as nx from ...utils.filemanip import (fname_presuffix, FileNotFoundError, to_str, @@ -37,6 +34,9 @@ from ...utils.provenance import ProvStore, pm, nipype_ns, get_id from ... import logging, config +from future import standard_library + +standard_library.install_aliases() logger = logging.getLogger('workflow') PY3 = sys.version_info[0] > 2 @@ -262,8 +262,6 @@ def _write_detailed_dot(graph, dotfilename): text = ['digraph structs {', 'node [shape=record];'] # write nodes edges = [] - replacefunk = lambda x: x.replace('_', '').replace('.', ''). \ - replace('@', '').replace('-', '') for n in nx.topological_sort(graph): nodename = str(n) inports = [] @@ -274,18 +272,16 @@ def _write_detailed_dot(graph, dotfilename): else: outport = cd[0][0] inport = cd[1] - ipstrip = 'in' + replacefunk(inport) - opstrip = 'out' + replacefunk(outport) + ipstrip = 'in%s' % _replacefunk(inport) + opstrip = 'out%s' % _replacefunk(outport) edges.append('%s:%s:e -> %s:%s:w;' % (str(u).replace('.', ''), opstrip, str(v).replace('.', ''), ipstrip)) if inport not in inports: inports.append(inport) - inputstr = '{IN' - for ip in sorted(inports): - inputstr += '| %s' % (replacefunk(ip), ip) - inputstr += '}' + inputstr = ['{IN'] + ['| %s' % (_replacefunk(ip), ip) + for ip in sorted(inports)] + ['}'] outports = [] for u, v, d in graph.out_edges(nbunch=n, data=True): for cd in d['connect']: @@ -295,10 +291,8 @@ def _write_detailed_dot(graph, dotfilename): outport = cd[0][0] if outport not in outports: outports.append(outport) - outputstr = '{OUT' - for op in sorted(outports): - outputstr += '| %s' % (replacefunk(op), op) - outputstr += '}' + outputstr = ['{OUT'] + ['| %s' % (_replacefunk(oport), oport) + for oport in sorted(outports)] + ['}'] srcpackage = '' if hasattr(n, '_interface'): pkglist = n._interface.__class__.__module__.split('.') @@ -309,19 +303,23 @@ def _write_detailed_dot(graph, dotfilename): srcpackage, srchierarchy) text += ['%s [label="%s|%s|%s"];' % (nodename.replace('.', ''), - inputstr, + ''.join(inputstr), nodenamestr, - outputstr)] + ''.join(outputstr))] # write edges for edge in sorted(edges): text.append(edge) text.append('}') - filep = open(dotfilename, 'wt') - filep.write('\n'.join(text)) - filep.close() + with open(dotfilename, 'wt') as filep: + filep.write('\n'.join(text)) return text +def _replacefunk(x): + return x.replace('_', '').replace( + '.', '').replace('@', '').replace('-', '') + + # Graph manipulations for iterable expansion def _get_valid_pathstr(pathstr): """Remove disallowed characters from path From 02dba98341334b97fdc9fbcd26b64083158eabfa Mon Sep 17 00:00:00 2001 From: oesteban Date: Fri, 1 Dec 2017 15:01:54 -0800 Subject: [PATCH 572/643] tidy up imports, fix pep8 issues --- nipype/pipeline/engine/workflows.py | 72 ++++++++++++----------------- 1 file changed, 30 insertions(+), 42 deletions(-) diff --git a/nipype/pipeline/engine/workflows.py b/nipype/pipeline/engine/workflows.py index 35869e214f..fe7b0e38ce 100644 --- a/nipype/pipeline/engine/workflows.py +++ b/nipype/pipeline/engine/workflows.py @@ -15,50 +15,38 @@ """ from __future__ import print_function, division, unicode_literals, absolute_import -from builtins import range, object, str, bytes, open - -# Py2 compat: http://python-future.org/compatible_idioms.html#collections-counter-and-ordereddict -from future import standard_library -standard_library.install_aliases() +from builtins import str, bytes, open +import os +import os.path as op +import sys from datetime import datetime - from copy import deepcopy import pickle -import os -import os.path as op import shutil -import sys from warnings import warn import numpy as np import networkx as nx - from ... import config, logging - -from ...utils.misc import (unflatten, str2bool) +from ...utils.misc import str2bool from ...utils.functions import (getsource, create_function_from_source) -from ...interfaces.base import (traits, InputMultiPath, CommandLine, - Undefined, TraitedSpec, DynamicTraitedSpec, - Bunch, InterfaceResult, md5, Interface, - TraitDictObject, TraitListObject, isdefined) - -from ...utils.filemanip import (save_json, FileNotFoundError, - filename_to_list, list_to_filename, - copyfiles, fnames_presuffix, loadpkl, - split_filename, load_json, makedirs, savepkl, - write_rst_header, write_rst_dict, - write_rst_list, to_str) -from .utils import (generate_expanded_graph, modify_paths, - export_graph, write_workflow_prov, - write_workflow_resources, - clean_working_directory, format_dot, topological_sort, - get_print_name, merge_dict, evaluate_connect_function, - _write_inputs, format_node) +from ...interfaces.base import ( + traits, TraitedSpec, TraitDictObject, TraitListObject) +from ...utils.filemanip import save_json, makedirs, to_str +from .utils import ( + generate_expanded_graph, export_graph, write_workflow_prov, + write_workflow_resources, format_dot, topological_sort, + get_print_name, merge_dict, format_node +) from .base import EngineBase -from .nodes import Node, MapNode +from .nodes import MapNode + +# Py2 compat: http://python-future.org/compatible_idioms.html#collections-counter-and-ordereddict +from future import standard_library +standard_library.install_aliases() logger = logging.getLogger('workflow') @@ -202,16 +190,16 @@ def connect(self, *args, **kwargs): connected. """ % (srcnode, source, destnode, dest, dest, destnode)) if not (hasattr(destnode, '_interface') and - ('.io' in str(destnode._interface.__class__) or - any(['.io' in str(val) for val in - destnode._interface.__class__.__bases__])) + ('.io' in str(destnode._interface.__class__) or + any(['.io' in str(val) for val in + destnode._interface.__class__.__bases__])) ): if not destnode._check_inputs(dest): not_found.append(['in', destnode.name, dest]) if not (hasattr(srcnode, '_interface') and - ('.io' in str(srcnode._interface.__class__) - or any(['.io' in str(val) for val in - srcnode._interface.__class__.__bases__]))): + ('.io' in str(srcnode._interface.__class__) or + any(['.io' in str(val) + for val in srcnode._interface.__class__.__bases__]))): if isinstance(source, tuple): # handles the case that source is specified # with a function @@ -930,13 +918,13 @@ def _get_dot(self, prefix=None, hierarchy=None, colored=False, prefix = ' ' if hierarchy is None: hierarchy = [] - colorset = ['#FFFFC8', # Y - '#0000FF', '#B4B4FF', '#E6E6FF', # B - '#FF0000', '#FFB4B4', '#FFE6E6', # R - '#00A300', '#B4FFB4', '#E6FFE6', # G - '#0000FF', '#B4B4FF'] # loop B + colorset = ['#FFFFC8', # Y + '#0000FF', '#B4B4FF', '#E6E6FF', # B + '#FF0000', '#FFB4B4', '#FFE6E6', # R + '#00A300', '#B4FFB4', '#E6FFE6', # G + '#0000FF', '#B4B4FF'] # loop B if level > len(colorset) - 2: - level = 3 # Loop back to blue + level = 3 # Loop back to blue dotlist = ['%slabel="%s";' % (prefix, self.name)] for node in nx.topological_sort(self._graph): From 54673763df550045437655906b6b65f83e474d8d Mon Sep 17 00:00:00 2001 From: oesteban Date: Fri, 1 Dec 2017 15:09:35 -0800 Subject: [PATCH 573/643] add some comments [skip ci] --- nipype/pipeline/engine/nodes.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/nipype/pipeline/engine/nodes.py b/nipype/pipeline/engine/nodes.py index 527e592c10..84f632dc1f 100644 --- a/nipype/pipeline/engine/nodes.py +++ b/nipype/pipeline/engine/nodes.py @@ -307,7 +307,7 @@ def run(self, updatehash=False): updatehash: boolean Update the hash stored in the output directory """ - cwd = os.getcwd() + cwd = os.getcwd() # First thing, keep track of where we are if self.config is None: self.config = {} @@ -327,6 +327,7 @@ def run(self, updatehash=False): makedirs(outdir, exist_ok=True) os.chdir(outdir) + # Check hash, check whether run should be enforced logger.info('[Node] Setting-up "%s" in "%s".', self.fullname, outdir) hash_info = self.hash_exists(updatehash=updatehash) hash_exists, hashvalue, hashfile, hashed_inputs = hash_info @@ -359,7 +360,7 @@ def run(self, updatehash=False): if need_rerun: log_debug = config.get('logging', 'workflow_level') == 'DEBUG' logger.debug('[Node] Rerunning "%s"', self.fullname) - if log_debug and not hash_exists: + if log_debug and not hash_exists: # Lazy logging - only debug exp_hash_paths = glob(json_pat) if len(exp_hash_paths) == 1: split_out = split_filename(exp_hash_paths[0]) @@ -375,9 +376,10 @@ def run(self, updatehash=False): hashed_inputs) if not force_run and str2bool(self.config['execution']['stop_on_first_rerun']): raise Exception('Cannot rerun when "stop_on_first_rerun" is set to True') - hashfile_unfinished = op.join(outdir, - '_0x%s_unfinished.json' % - hashvalue) + + # Hashfile while running, remove if exists already + hashfile_unfinished = op.join( + outdir, '_0x%s_unfinished.json' % hashvalue) if op.exists(hashfile): os.remove(hashfile) @@ -396,6 +398,7 @@ def run(self, updatehash=False): for filename in glob(op.join(outdir, '_0x*.json')): os.remove(filename) + # Store runtime-hashfile, pre-execution report, the node and the inputs set. self._save_hashfile(hashfile_unfinished, hashed_inputs) self.write_report(report_type='preexec', cwd=outdir) savepkl(op.join(outdir, '_node.pklz'), self) @@ -405,11 +408,12 @@ def run(self, updatehash=False): self._run_interface(execute=True) except: logger.warning('[Node] Exception "%s" (%s)', self.fullname, outdir) + # Tear-up after error os.remove(hashfile_unfinished) os.chdir(cwd) raise - # Tear-up + # Tear-up after success shutil.move(hashfile_unfinished, hashfile) self.write_report(report_type='postexec', cwd=outdir) logger.info('[Node] Finished "%s".', self.fullname) From 60b35a1735cee26af35e828d1bd95f3e1f6fa429 Mon Sep 17 00:00:00 2001 From: Chris Markiewicz Date: Sat, 2 Dec 2017 07:48:12 -0500 Subject: [PATCH 574/643] FIX: Environment canonicalization bugs --- nipype/interfaces/base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nipype/interfaces/base.py b/nipype/interfaces/base.py index 752cb0e86e..91e6c6bc8c 100644 --- a/nipype/interfaces/base.py +++ b/nipype/interfaces/base.py @@ -1343,11 +1343,11 @@ def _canonicalize_env(env): return env out_env = {} - for key, val in env: + for key, val in env.items(): if not isinstance(key, bytes): key = key.encode('utf-8') if not isinstance(val, bytes): - val = key.encode('utf-8') + val = val.encode('utf-8') out_env[key] = val return out_env From 57583737dca87583b8913caa94de07fb9987d3e1 Mon Sep 17 00:00:00 2001 From: Oscar Esteban Date: Sat, 2 Dec 2017 07:48:39 -0800 Subject: [PATCH 575/643] change dict_ when they are list_ --- nipype/interfaces/base/specs.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/nipype/interfaces/base/specs.py b/nipype/interfaces/base/specs.py index 5712303845..f0d1184d85 100644 --- a/nipype/interfaces/base/specs.py +++ b/nipype/interfaces/base/specs.py @@ -252,7 +252,7 @@ def get_hashval(self, hash_method=None): Returns ------- - dict_withhash : dict + list_withhash : dict Copy of our dictionary with the new file hashes included with each file. hashvalue : str @@ -260,8 +260,8 @@ def get_hashval(self, hash_method=None): """ - dict_withhash = [] - dict_nofilename = [] + list_withhash = [] + list_nofilename = [] for name, val in sorted(self.get().items()): if not isdefined(val) or self.has_metadata(name, "nohash", True): # skip undefined traits and traits with nohash=True @@ -269,13 +269,13 @@ def get_hashval(self, hash_method=None): hash_files = (not self.has_metadata(name, "hash_files", False) and not self.has_metadata(name, "name_source")) - dict_nofilename.append((name, + list_nofilename.append((name, self._get_sorteddict(val, hash_method=hash_method, hash_files=hash_files))) - dict_withhash.append((name, + list_withhash.append((name, self._get_sorteddict(val, True, hash_method=hash_method, hash_files=hash_files))) - return dict_withhash, md5(to_str(dict_nofilename).encode()).hexdigest() + return list_withhash, md5(to_str(list_nofilename).encode()).hexdigest() def _get_sorteddict(self, objekt, dictwithhash=False, hash_method=None, hash_files=True): From 89155916db9c8a81f9ca5579c4cb4dea82e34e82 Mon Sep 17 00:00:00 2001 From: Oscar Esteban Date: Sat, 2 Dec 2017 07:53:04 -0800 Subject: [PATCH 576/643] fix logging in PY2 --- nipype/pipeline/plugins/multiproc.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nipype/pipeline/plugins/multiproc.py b/nipype/pipeline/plugins/multiproc.py index 8201a2548f..1eb773c0f6 100644 --- a/nipype/pipeline/plugins/multiproc.py +++ b/nipype/pipeline/plugins/multiproc.py @@ -216,6 +216,7 @@ def _send_procs_to_workers(self, updatehash=False, graph=None): self.memory_gb, free_processors, self.processors) if self._stats != stats: tasks_list_msg = '' + if logger.level <= INFO: running_tasks = [' * %s' % self.procs[jobid].fullname for _, jobid in self.pending_tasks] @@ -225,7 +226,8 @@ def _send_procs_to_workers(self, updatehash=False, graph=None): tasks_list_msg = indent(tasks_list_msg, ' ' * 21) logger.info('[MultiProc] Running %d tasks, and %d jobs ready. Free ' 'memory (GB): %0.2f/%0.2f, Free processors: %d/%d.%s', - *stats, tasks_list_msg) + len(self.pending_tasks), len(jobids), free_memory_gb, self.memory_gb, + free_processors, self.processors, tasks_list_msg) self._stats = stats if free_memory_gb < 0.01 or free_processors == 0: From b366e918e656518aa87833171b3ce1a8cac52737 Mon Sep 17 00:00:00 2001 From: Oscar Esteban Date: Sat, 2 Dec 2017 18:12:54 -0800 Subject: [PATCH 577/643] add replacement for textwrap.indent --- nipype/pipeline/plugins/multiproc.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/nipype/pipeline/plugins/multiproc.py b/nipype/pipeline/plugins/multiproc.py index 1eb773c0f6..194540116c 100644 --- a/nipype/pipeline/plugins/multiproc.py +++ b/nipype/pipeline/plugins/multiproc.py @@ -12,7 +12,6 @@ from multiprocessing import Process, Pool, cpu_count, pool from traceback import format_exception import sys -from textwrap import indent from logging import INFO from copy import deepcopy @@ -22,6 +21,16 @@ from ..engine import MapNode from .base import DistributedPluginBase +try: + from textwrap import indent +except ImportError: + def indent(text, prefix): + """ A textwrap.indent replacement for Python < 3.3 """ + if not prefix: + return text + splittext = text.splitlines(True) + return prefix + prefix.join(splittext) + # Init logger logger = logging.getLogger('workflow') From e049918796beb2cc2032aaf6753ac6a057921fb6 Mon Sep 17 00:00:00 2001 From: Oscar Esteban Date: Sat, 2 Dec 2017 18:39:08 -0800 Subject: [PATCH 578/643] use new makedirs --- nipype/pipeline/engine/nodes.py | 6 +++--- nipype/pipeline/engine/utils.py | 11 ++++++----- nipype/pipeline/engine/workflows.py | 5 ++--- nipype/pipeline/plugins/tools.py | 5 ++--- 4 files changed, 13 insertions(+), 14 deletions(-) diff --git a/nipype/pipeline/engine/nodes.py b/nipype/pipeline/engine/nodes.py index 84f632dc1f..b64801f8c7 100644 --- a/nipype/pipeline/engine/nodes.py +++ b/nipype/pipeline/engine/nodes.py @@ -684,7 +684,7 @@ def _copyfiles_to_wd(self, outdir, execute, linksonly=False): if execute and linksonly: olddir = outdir outdir = op.join(outdir, '_tempinput') - os.makedirs(outdir) + makedirs(outdir, exist_ok=True) for info in self._interface._get_filecopy_info(): files = self.inputs.get().get(info['key']) if not isdefined(files): @@ -725,8 +725,8 @@ def write_report(self, report_type=None, cwd=None): return report_dir = op.join(cwd, '_report') report_file = op.join(report_dir, 'report.rst') - if not op.exists(report_dir): - os.makedirs(report_dir) + makedirs(report_dir, exist_ok=True) + if report_type == 'preexec': logger.debug('writing pre-exec report to %s', report_file) fp = open(report_file, 'wt') diff --git a/nipype/pipeline/engine/utils.py b/nipype/pipeline/engine/utils.py index 67c9aaa607..5c223329ff 100644 --- a/nipype/pipeline/engine/utils.py +++ b/nipype/pipeline/engine/utils.py @@ -24,8 +24,9 @@ import numpy as np import networkx as nx -from ...utils.filemanip import (fname_presuffix, FileNotFoundError, to_str, - filename_to_list, get_related_files) +from ...utils.filemanip import ( + makedirs, fname_presuffix, to_str, + filename_to_list, get_related_files) from ...utils.misc import str2bool from ...utils.functions import create_function_from_source from ...interfaces.base import (CommandLine, isdefined, Undefined, @@ -195,7 +196,7 @@ def modify_paths(object, relative=True, basedir=None): else: out = os.path.abspath(os.path.join(basedir, object)) if not os.path.exists(out): - raise FileNotFoundError('File %s not found' % out) + raise IOError('File %s not found' % out) else: out = object return out @@ -1013,8 +1014,8 @@ def export_graph(graph_in, base_dir=None, show=False, use_execgraph=False, logger.debug('using input graph') if base_dir is None: base_dir = os.getcwd() - if not os.path.exists(base_dir): - os.makedirs(base_dir) + + makedirs(base_dir, exist_ok=True) outfname = fname_presuffix(dotfilename, suffix='_detailed.dot', use_ext=False, diff --git a/nipype/pipeline/engine/workflows.py b/nipype/pipeline/engine/workflows.py index fe7b0e38ce..f460a0e156 100644 --- a/nipype/pipeline/engine/workflows.py +++ b/nipype/pipeline/engine/workflows.py @@ -413,7 +413,7 @@ def write_graph(self, dotfilename='graph.dot', graph2use='hierarchical', base_dir = op.join(base_dir, self.name) else: base_dir = os.getcwd() - base_dir = makedirs(base_dir) + base_dir = makedirs(base_dir, exist_ok=True) if graph2use in ['hierarchical', 'colored']: if self.name[:1].isdigit(): # these graphs break if int raise ValueError('{} graph failed, workflow name cannot begin ' @@ -599,8 +599,7 @@ def _write_report_info(self, workingdir, name, graph): if workingdir is None: workingdir = os.getcwd() report_dir = op.join(workingdir, name) - if not op.exists(report_dir): - os.makedirs(report_dir) + makedirs(report_dir, exist_ok=True) shutil.copyfile(op.join(op.dirname(__file__), 'report_template.html'), op.join(report_dir, 'index.html')) diff --git a/nipype/pipeline/plugins/tools.py b/nipype/pipeline/plugins/tools.py index 499a1db2d7..c07a8966b6 100644 --- a/nipype/pipeline/plugins/tools.py +++ b/nipype/pipeline/plugins/tools.py @@ -15,7 +15,7 @@ from traceback import format_exception from ... import logging -from ...utils.filemanip import savepkl, crash2txt +from ...utils.filemanip import savepkl, crash2txt, makedirs logger = logging.getLogger('workflow') @@ -42,8 +42,7 @@ def report_crash(node, traceback=None, hostname=None): timeofcrash, login_name, name, str(uuid.uuid4())) crashdir = node.config['execution'].get('crashdump_dir', os.getcwd()) - if not os.path.exists(crashdir): - os.makedirs(crashdir) + makedirs(crashdir, exist_ok=True) crashfile = os.path.join(crashdir, crashfile) if node.config['execution']['crashfile_format'].lower() in ['text', 'txt']: From b4549616a5d85cbc4d13d18ffa1b6b287794df7b Mon Sep 17 00:00:00 2001 From: Oscar Esteban Date: Sat, 2 Dec 2017 18:54:11 -0800 Subject: [PATCH 579/643] set base_dir --- nipype/pipeline/plugins/tests/test_callback.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nipype/pipeline/plugins/tests/test_callback.py b/nipype/pipeline/plugins/tests/test_callback.py index dfec4a51d6..7212ff7302 100644 --- a/nipype/pipeline/plugins/tests/test_callback.py +++ b/nipype/pipeline/plugins/tests/test_callback.py @@ -72,7 +72,7 @@ def test_callback_multiproc_normal(tmpdir): tmpdir.chdir() so = Status() - wf = pe.Workflow(name='test') + wf = pe.Workflow(name='test', base_dir=tmpdir.strpath) f_node = pe.Node(niu.Function(function=func, input_names=[], output_names=[]), name='f_node') @@ -90,7 +90,7 @@ def test_callback_multiproc_exception(tmpdir): tmpdir.chdir() so = Status() - wf = pe.Workflow(name='test') + wf = pe.Workflow(name='test', base_dir=tmpdir.strpath) f_node = pe.Node(niu.Function(function=bad_func, input_names=[], output_names=[]), name='f_node') From 98f5c318eb9d97db51eca2fc3e887c6ef0262753 Mon Sep 17 00:00:00 2001 From: Oscar Esteban Date: Sat, 2 Dec 2017 19:02:42 -0800 Subject: [PATCH 580/643] move fsl.model templates --- nipype/interfaces/fsl/model.py | 6 +-- .../feat_contrast_element.tcl | 0 .../feat_contrast_ftest_element.tcl | 0 .../model_templates}/feat_contrast_header.tcl | 0 .../model_templates}/feat_contrast_prolog.tcl | 0 .../feat_contrastmask_element.tcl | 0 .../feat_contrastmask_footer.tcl | 0 .../feat_contrastmask_header.tcl | 0 .../fsl/model_templates}/feat_contrasts.tcl | 0 .../fsl/model_templates}/feat_ev_custom.tcl | 0 .../fsl/model_templates}/feat_ev_gamma.tcl | 0 .../fsl/model_templates}/feat_ev_hrf.tcl | 0 .../fsl/model_templates}/feat_ev_none.tcl | 0 .../fsl/model_templates}/feat_ev_ortho.tcl | 0 .../fsl/model_templates}/feat_fe_copes.tcl | 0 .../model_templates}/feat_fe_ev_element.tcl | 0 .../model_templates}/feat_fe_ev_header.tcl | 0 .../fsl/model_templates}/feat_fe_featdirs.tcl | 0 .../fsl/model_templates}/feat_fe_footer.tcl | 0 .../fsl/model_templates}/feat_fe_header.tcl | 0 .../fsl/model_templates}/feat_header.tcl | 0 .../fsl/model_templates}/feat_header_l1.tcl | 0 .../fsl/model_templates}/feat_nongui.tcl | 0 .../fsl/model_templates}/featreg_header.tcl | 0 nipype/interfaces/setup.py | 42 ------------------- setup.py | 2 +- 26 files changed, 4 insertions(+), 46 deletions(-) rename nipype/{script_templates => interfaces/fsl/model_templates}/feat_contrast_element.tcl (100%) rename nipype/{script_templates => interfaces/fsl/model_templates}/feat_contrast_ftest_element.tcl (100%) rename nipype/{script_templates => interfaces/fsl/model_templates}/feat_contrast_header.tcl (100%) rename nipype/{script_templates => interfaces/fsl/model_templates}/feat_contrast_prolog.tcl (100%) rename nipype/{script_templates => interfaces/fsl/model_templates}/feat_contrastmask_element.tcl (100%) rename nipype/{script_templates => interfaces/fsl/model_templates}/feat_contrastmask_footer.tcl (100%) rename nipype/{script_templates => interfaces/fsl/model_templates}/feat_contrastmask_header.tcl (100%) rename nipype/{script_templates => interfaces/fsl/model_templates}/feat_contrasts.tcl (100%) rename nipype/{script_templates => interfaces/fsl/model_templates}/feat_ev_custom.tcl (100%) rename nipype/{script_templates => interfaces/fsl/model_templates}/feat_ev_gamma.tcl (100%) rename nipype/{script_templates => interfaces/fsl/model_templates}/feat_ev_hrf.tcl (100%) rename nipype/{script_templates => interfaces/fsl/model_templates}/feat_ev_none.tcl (100%) rename nipype/{script_templates => interfaces/fsl/model_templates}/feat_ev_ortho.tcl (100%) rename nipype/{script_templates => interfaces/fsl/model_templates}/feat_fe_copes.tcl (100%) rename nipype/{script_templates => interfaces/fsl/model_templates}/feat_fe_ev_element.tcl (100%) rename nipype/{script_templates => interfaces/fsl/model_templates}/feat_fe_ev_header.tcl (100%) rename nipype/{script_templates => interfaces/fsl/model_templates}/feat_fe_featdirs.tcl (100%) rename nipype/{script_templates => interfaces/fsl/model_templates}/feat_fe_footer.tcl (100%) rename nipype/{script_templates => interfaces/fsl/model_templates}/feat_fe_header.tcl (100%) rename nipype/{script_templates => interfaces/fsl/model_templates}/feat_header.tcl (100%) rename nipype/{script_templates => interfaces/fsl/model_templates}/feat_header_l1.tcl (100%) rename nipype/{script_templates => interfaces/fsl/model_templates}/feat_nongui.tcl (100%) rename nipype/{script_templates => interfaces/fsl/model_templates}/featreg_header.tcl (100%) delete mode 100644 nipype/interfaces/setup.py diff --git a/nipype/interfaces/fsl/model.py b/nipype/interfaces/fsl/model.py index 3784192963..f130c01679 100644 --- a/nipype/interfaces/fsl/model.py +++ b/nipype/interfaces/fsl/model.py @@ -2173,7 +2173,7 @@ def _list_outputs(self): def load_template(name): - """Load a template from the script_templates directory + """Load a template from the model_templates directory Parameters ---------- @@ -2186,8 +2186,8 @@ def load_template(name): """ from pkg_resources import resource_filename as pkgrf - full_fname = pkgrf('nipype', - os.path.join('script_templates', name)) + full_fname = pkgrf( + 'nipype', os.path.join('interfaces', 'fsl', 'model_templates', name)) with open(full_fname) as template_file: template = Template(template_file.read()) diff --git a/nipype/script_templates/feat_contrast_element.tcl b/nipype/interfaces/fsl/model_templates/feat_contrast_element.tcl similarity index 100% rename from nipype/script_templates/feat_contrast_element.tcl rename to nipype/interfaces/fsl/model_templates/feat_contrast_element.tcl diff --git a/nipype/script_templates/feat_contrast_ftest_element.tcl b/nipype/interfaces/fsl/model_templates/feat_contrast_ftest_element.tcl similarity index 100% rename from nipype/script_templates/feat_contrast_ftest_element.tcl rename to nipype/interfaces/fsl/model_templates/feat_contrast_ftest_element.tcl diff --git a/nipype/script_templates/feat_contrast_header.tcl b/nipype/interfaces/fsl/model_templates/feat_contrast_header.tcl similarity index 100% rename from nipype/script_templates/feat_contrast_header.tcl rename to nipype/interfaces/fsl/model_templates/feat_contrast_header.tcl diff --git a/nipype/script_templates/feat_contrast_prolog.tcl b/nipype/interfaces/fsl/model_templates/feat_contrast_prolog.tcl similarity index 100% rename from nipype/script_templates/feat_contrast_prolog.tcl rename to nipype/interfaces/fsl/model_templates/feat_contrast_prolog.tcl diff --git a/nipype/script_templates/feat_contrastmask_element.tcl b/nipype/interfaces/fsl/model_templates/feat_contrastmask_element.tcl similarity index 100% rename from nipype/script_templates/feat_contrastmask_element.tcl rename to nipype/interfaces/fsl/model_templates/feat_contrastmask_element.tcl diff --git a/nipype/script_templates/feat_contrastmask_footer.tcl b/nipype/interfaces/fsl/model_templates/feat_contrastmask_footer.tcl similarity index 100% rename from nipype/script_templates/feat_contrastmask_footer.tcl rename to nipype/interfaces/fsl/model_templates/feat_contrastmask_footer.tcl diff --git a/nipype/script_templates/feat_contrastmask_header.tcl b/nipype/interfaces/fsl/model_templates/feat_contrastmask_header.tcl similarity index 100% rename from nipype/script_templates/feat_contrastmask_header.tcl rename to nipype/interfaces/fsl/model_templates/feat_contrastmask_header.tcl diff --git a/nipype/script_templates/feat_contrasts.tcl b/nipype/interfaces/fsl/model_templates/feat_contrasts.tcl similarity index 100% rename from nipype/script_templates/feat_contrasts.tcl rename to nipype/interfaces/fsl/model_templates/feat_contrasts.tcl diff --git a/nipype/script_templates/feat_ev_custom.tcl b/nipype/interfaces/fsl/model_templates/feat_ev_custom.tcl similarity index 100% rename from nipype/script_templates/feat_ev_custom.tcl rename to nipype/interfaces/fsl/model_templates/feat_ev_custom.tcl diff --git a/nipype/script_templates/feat_ev_gamma.tcl b/nipype/interfaces/fsl/model_templates/feat_ev_gamma.tcl similarity index 100% rename from nipype/script_templates/feat_ev_gamma.tcl rename to nipype/interfaces/fsl/model_templates/feat_ev_gamma.tcl diff --git a/nipype/script_templates/feat_ev_hrf.tcl b/nipype/interfaces/fsl/model_templates/feat_ev_hrf.tcl similarity index 100% rename from nipype/script_templates/feat_ev_hrf.tcl rename to nipype/interfaces/fsl/model_templates/feat_ev_hrf.tcl diff --git a/nipype/script_templates/feat_ev_none.tcl b/nipype/interfaces/fsl/model_templates/feat_ev_none.tcl similarity index 100% rename from nipype/script_templates/feat_ev_none.tcl rename to nipype/interfaces/fsl/model_templates/feat_ev_none.tcl diff --git a/nipype/script_templates/feat_ev_ortho.tcl b/nipype/interfaces/fsl/model_templates/feat_ev_ortho.tcl similarity index 100% rename from nipype/script_templates/feat_ev_ortho.tcl rename to nipype/interfaces/fsl/model_templates/feat_ev_ortho.tcl diff --git a/nipype/script_templates/feat_fe_copes.tcl b/nipype/interfaces/fsl/model_templates/feat_fe_copes.tcl similarity index 100% rename from nipype/script_templates/feat_fe_copes.tcl rename to nipype/interfaces/fsl/model_templates/feat_fe_copes.tcl diff --git a/nipype/script_templates/feat_fe_ev_element.tcl b/nipype/interfaces/fsl/model_templates/feat_fe_ev_element.tcl similarity index 100% rename from nipype/script_templates/feat_fe_ev_element.tcl rename to nipype/interfaces/fsl/model_templates/feat_fe_ev_element.tcl diff --git a/nipype/script_templates/feat_fe_ev_header.tcl b/nipype/interfaces/fsl/model_templates/feat_fe_ev_header.tcl similarity index 100% rename from nipype/script_templates/feat_fe_ev_header.tcl rename to nipype/interfaces/fsl/model_templates/feat_fe_ev_header.tcl diff --git a/nipype/script_templates/feat_fe_featdirs.tcl b/nipype/interfaces/fsl/model_templates/feat_fe_featdirs.tcl similarity index 100% rename from nipype/script_templates/feat_fe_featdirs.tcl rename to nipype/interfaces/fsl/model_templates/feat_fe_featdirs.tcl diff --git a/nipype/script_templates/feat_fe_footer.tcl b/nipype/interfaces/fsl/model_templates/feat_fe_footer.tcl similarity index 100% rename from nipype/script_templates/feat_fe_footer.tcl rename to nipype/interfaces/fsl/model_templates/feat_fe_footer.tcl diff --git a/nipype/script_templates/feat_fe_header.tcl b/nipype/interfaces/fsl/model_templates/feat_fe_header.tcl similarity index 100% rename from nipype/script_templates/feat_fe_header.tcl rename to nipype/interfaces/fsl/model_templates/feat_fe_header.tcl diff --git a/nipype/script_templates/feat_header.tcl b/nipype/interfaces/fsl/model_templates/feat_header.tcl similarity index 100% rename from nipype/script_templates/feat_header.tcl rename to nipype/interfaces/fsl/model_templates/feat_header.tcl diff --git a/nipype/script_templates/feat_header_l1.tcl b/nipype/interfaces/fsl/model_templates/feat_header_l1.tcl similarity index 100% rename from nipype/script_templates/feat_header_l1.tcl rename to nipype/interfaces/fsl/model_templates/feat_header_l1.tcl diff --git a/nipype/script_templates/feat_nongui.tcl b/nipype/interfaces/fsl/model_templates/feat_nongui.tcl similarity index 100% rename from nipype/script_templates/feat_nongui.tcl rename to nipype/interfaces/fsl/model_templates/feat_nongui.tcl diff --git a/nipype/script_templates/featreg_header.tcl b/nipype/interfaces/fsl/model_templates/featreg_header.tcl similarity index 100% rename from nipype/script_templates/featreg_header.tcl rename to nipype/interfaces/fsl/model_templates/featreg_header.tcl diff --git a/nipype/interfaces/setup.py b/nipype/interfaces/setup.py deleted file mode 100644 index d3ca4fce7a..0000000000 --- a/nipype/interfaces/setup.py +++ /dev/null @@ -1,42 +0,0 @@ -# -*- coding: utf-8 -*- -# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- -# vi: set ft=python sts=4 ts=4 sw=4 et: -from __future__ import print_function, division, unicode_literals, absolute_import - - -def configuration(parent_package='', top_path=None): - from numpy.distutils.misc_util import Configuration - - config = Configuration('interfaces', parent_package, top_path) - - config.add_subpackage('afni') - config.add_subpackage('ants') - config.add_subpackage('base') - config.add_subpackage('camino') - config.add_subpackage('camino2trackvis') - config.add_subpackage('cmtk') - config.add_subpackage('diffusion_toolkit') - config.add_subpackage('dipy') - config.add_subpackage('elastix') - config.add_subpackage('freesurfer') - config.add_subpackage('fsl') - config.add_subpackage('minc') - config.add_subpackage('mipav') - config.add_subpackage('mne') - config.add_subpackage('mrtrix') - config.add_subpackage('mrtrix3') - config.add_subpackage('niftyfit') - config.add_subpackage('niftyreg') - config.add_subpackage('niftyseg') - config.add_subpackage('nipy') - config.add_subpackage('spm') - config.add_subpackage('slicer') - - config.add_data_dir('script_templates') - config.add_data_dir('tests') - - return config - -if __name__ == '__main__': - from numpy.distutils.core import setup - setup(**configuration(top_path='').todict()) diff --git a/setup.py b/setup.py index e0a52a828a..2972d7afce 100755 --- a/setup.py +++ b/setup.py @@ -106,7 +106,7 @@ def main(): pjoin('workflows', 'data', '*'), pjoin('pipeline', 'engine', 'report_template.html'), pjoin('external', 'd3.js'), - pjoin('script_templates', '*'), + pjoin('interfaces', 'fsl', 'model_templates', '*'), pjoin('interfaces', 'tests', 'realign_json.json'), pjoin('interfaces', 'tests', 'use_resources'), 'pytest.ini', From 79c22ee2efdb3e4a33420e5a3808743c310d0a4a Mon Sep 17 00:00:00 2001 From: Oscar Esteban Date: Sun, 3 Dec 2017 12:21:06 -0800 Subject: [PATCH 581/643] final fixes --- nipype/interfaces/base/support.py | 1 - nipype/interfaces/niftyfit/tests/test_asl.py | 6 +----- nipype/interfaces/niftyfit/tests/test_dwi.py | 6 +----- nipype/interfaces/niftyfit/tests/test_qt1.py | 7 +------ nipype/interfaces/niftyreg/tests/test_reg.py | 6 +----- nipype/interfaces/niftyseg/tests/test_em_interfaces.py | 6 +----- nipype/interfaces/niftyseg/tests/test_label_fusion.py | 6 +----- nipype/interfaces/niftyseg/tests/test_lesions.py | 6 +----- nipype/interfaces/niftyseg/tests/test_maths.py | 6 +----- nipype/interfaces/niftyseg/tests/test_patchmatch.py | 6 +----- nipype/interfaces/niftyseg/tests/test_stats.py | 6 +----- nipype/utils/filemanip.py | 2 +- 12 files changed, 11 insertions(+), 53 deletions(-) diff --git a/nipype/interfaces/base/support.py b/nipype/interfaces/base/support.py index 8b96501ee6..f047cd120f 100644 --- a/nipype/interfaces/base/support.py +++ b/nipype/interfaces/base/support.py @@ -49,7 +49,6 @@ class Bunch(object): >>> inputs Bunch(fwhm=6.0, infile='subj.nii', register_to_mean=False) - Notes ----- The Bunch pattern came from the Python Cookbook: diff --git a/nipype/interfaces/niftyfit/tests/test_asl.py b/nipype/interfaces/niftyfit/tests/test_asl.py index a794964309..f949e26b76 100644 --- a/nipype/interfaces/niftyfit/tests/test_asl.py +++ b/nipype/interfaces/niftyfit/tests/test_asl.py @@ -4,15 +4,11 @@ import pytest -from ....utils.filemanip import which from ....testing import example_data from ...niftyreg import get_custom_path from ..asl import FitAsl - - -def no_nifty_tool(cmd=None): - return which(cmd) is None +from ...niftyreg.tests.test_regutils import no_nifty_tool @pytest.mark.skipif(no_nifty_tool(cmd='fit_asl'), diff --git a/nipype/interfaces/niftyfit/tests/test_dwi.py b/nipype/interfaces/niftyfit/tests/test_dwi.py index 1046d7570b..5b7d0f7348 100644 --- a/nipype/interfaces/niftyfit/tests/test_dwi.py +++ b/nipype/interfaces/niftyfit/tests/test_dwi.py @@ -3,15 +3,11 @@ import pytest -from ....utils.filemanip import which from ....testing import example_data from ...niftyreg import get_custom_path from ..dwi import FitDwi, DwiTool - - -def no_nifty_tool(cmd=None): - return which(cmd) is None +from ...niftyreg.tests.test_regutils import no_nifty_tool @pytest.mark.skipif(no_nifty_tool(cmd='fit_dwi'), diff --git a/nipype/interfaces/niftyfit/tests/test_qt1.py b/nipype/interfaces/niftyfit/tests/test_qt1.py index 12febd55bf..e2e78ed37d 100644 --- a/nipype/interfaces/niftyfit/tests/test_qt1.py +++ b/nipype/interfaces/niftyfit/tests/test_qt1.py @@ -4,17 +4,12 @@ import pytest -from ....utils.filemanip import which from ....testing import example_data from ...niftyreg import get_custom_path - +from ...niftyreg.tests.test_regutils import no_nifty_tool from ..qt1 import FitQt1 -def no_nifty_tool(cmd=None): - return which(cmd) is None - - @pytest.mark.skipif(no_nifty_tool(cmd='fit_qt1'), reason="niftyfit is not installed") def test_fit_qt1(): diff --git a/nipype/interfaces/niftyreg/tests/test_reg.py b/nipype/interfaces/niftyreg/tests/test_reg.py index bbd05adb27..eb5566f46f 100644 --- a/nipype/interfaces/niftyreg/tests/test_reg.py +++ b/nipype/interfaces/niftyreg/tests/test_reg.py @@ -4,13 +4,9 @@ import pytest -from ....utils.filemanip import which from ....testing import example_data from .. import (get_custom_path, RegAladin, RegF3D) - - -def no_nifty_tool(cmd=None): - return which(cmd) is None +from .test_regutils import no_nifty_tool @pytest.mark.skipif( diff --git a/nipype/interfaces/niftyseg/tests/test_em_interfaces.py b/nipype/interfaces/niftyseg/tests/test_em_interfaces.py index 2fbf45cb81..b95d574357 100644 --- a/nipype/interfaces/niftyseg/tests/test_em_interfaces.py +++ b/nipype/interfaces/niftyseg/tests/test_em_interfaces.py @@ -3,16 +3,12 @@ import pytest -from ....utils.filemanip import which from ....testing import example_data from ...niftyreg import get_custom_path +from ...niftyreg.tests.test_regutils import no_nifty_tool from .. import EM -def no_nifty_tool(cmd=None): - return which(cmd) is None - - @pytest.mark.skipif(no_nifty_tool(cmd='seg_EM'), reason="niftyseg is not installed") def test_seg_em(): diff --git a/nipype/interfaces/niftyseg/tests/test_label_fusion.py b/nipype/interfaces/niftyseg/tests/test_label_fusion.py index 4641ea0e04..6f41086531 100644 --- a/nipype/interfaces/niftyseg/tests/test_label_fusion.py +++ b/nipype/interfaces/niftyseg/tests/test_label_fusion.py @@ -3,16 +3,12 @@ import pytest -from ....utils.filemanip import which from ....testing import example_data from ...niftyreg import get_custom_path +from ...niftyreg.tests.test_regutils import no_nifty_tool from .. import LabelFusion, CalcTopNCC -def no_nifty_tool(cmd=None): - return which(cmd) is None - - @pytest.mark.skipif(no_nifty_tool(cmd='seg_LabFusion'), reason="niftyseg is not installed") def test_seg_lab_fusion(): diff --git a/nipype/interfaces/niftyseg/tests/test_lesions.py b/nipype/interfaces/niftyseg/tests/test_lesions.py index 958639765c..aaca2df0ba 100644 --- a/nipype/interfaces/niftyseg/tests/test_lesions.py +++ b/nipype/interfaces/niftyseg/tests/test_lesions.py @@ -3,16 +3,12 @@ import pytest -from ....utils.filemanip import which from ....testing import example_data from ...niftyreg import get_custom_path +from ...niftyreg.tests.test_regutils import no_nifty_tool from .. import FillLesions -def no_nifty_tool(cmd=None): - return which(cmd) is None - - @pytest.mark.skipif(no_nifty_tool(cmd='seg_FillLesions'), reason="niftyseg is not installed") def test_seg_filllesions(): diff --git a/nipype/interfaces/niftyseg/tests/test_maths.py b/nipype/interfaces/niftyseg/tests/test_maths.py index cd8f4a1274..38dc765f10 100644 --- a/nipype/interfaces/niftyseg/tests/test_maths.py +++ b/nipype/interfaces/niftyseg/tests/test_maths.py @@ -3,18 +3,14 @@ import pytest -from ....utils.filemanip import which from ....testing import example_data from ...niftyreg import get_custom_path +from ...niftyreg.tests.test_regutils import no_nifty_tool from .. import (UnaryMaths, BinaryMaths, BinaryMathsInteger, TupleMaths, Merge) -def no_nifty_tool(cmd=None): - return which(cmd) is None - - @pytest.mark.skipif(no_nifty_tool(cmd='seg_maths'), reason="niftyseg is not installed") def test_unary_maths(): diff --git a/nipype/interfaces/niftyseg/tests/test_patchmatch.py b/nipype/interfaces/niftyseg/tests/test_patchmatch.py index 0e9e8c7c61..ae2500a7d2 100644 --- a/nipype/interfaces/niftyseg/tests/test_patchmatch.py +++ b/nipype/interfaces/niftyseg/tests/test_patchmatch.py @@ -3,16 +3,12 @@ import pytest -from ....utils.filemanip import which from ....testing import example_data from ...niftyreg import get_custom_path +from ...niftyreg.tests.test_regutils import no_nifty_tool from .. import PatchMatch -def no_nifty_tool(cmd=None): - return which(cmd) is None - - @pytest.mark.skipif(no_nifty_tool(cmd='seg_PatchMatch'), reason="niftyseg is not installed") def test_seg_patchmatch(): diff --git a/nipype/interfaces/niftyseg/tests/test_stats.py b/nipype/interfaces/niftyseg/tests/test_stats.py index 551d7c94c3..cd0948d1ae 100644 --- a/nipype/interfaces/niftyseg/tests/test_stats.py +++ b/nipype/interfaces/niftyseg/tests/test_stats.py @@ -3,16 +3,12 @@ import pytest -from ....utils.filemanip import which from ....testing import example_data from ...niftyreg import get_custom_path +from ...niftyreg.tests.test_regutils import no_nifty_tool from .. import UnaryStats, BinaryStats -def no_nifty_tool(cmd=None): - return which(cmd) is None - - @pytest.mark.skipif(no_nifty_tool(cmd='seg_stats'), reason="niftyseg is not installed") def test_unary_stats(): diff --git a/nipype/utils/filemanip.py b/nipype/utils/filemanip.py index e245bb3b48..d721b740a9 100644 --- a/nipype/utils/filemanip.py +++ b/nipype/utils/filemanip.py @@ -684,7 +684,7 @@ def which(cmd, env=None, pathext=None): """ if pathext is None: - pathext = os.environ.get("PATHEXT", "").split(os.pathsep) + pathext = os.getenv('PATHEXT', '').split(os.pathsep) pathext.insert(0, '') path = os.getenv("PATH", os.defpath) From 914740867e48e1e349af465f1f3e5473cdec842e Mon Sep 17 00:00:00 2001 From: oesteban Date: Mon, 4 Dec 2017 12:07:52 -0800 Subject: [PATCH 582/643] move tests, update specs --- nipype/interfaces/base/tests/__init__.py | 1 + .../tests/test_auto_BaseInterface.py | 5 +- .../{ => base}/tests/test_auto_CommandLine.py | 5 +- .../tests/test_auto_MpiCommandLine.py | 5 +- .../tests/test_auto_SEMLikeCommandLine.py | 25 ++++++++ .../tests/test_auto_SimpleInterface.py | 5 +- .../tests/test_auto_StdOutCommandLine.py | 5 +- .../interfaces/{ => base}/tests/test_base.py | 0 .../{ => base}/tests/test_resource_monitor.py | 0 .../niftyseg/tests/test_auto_PatchMatch.py | 61 +++++++++++++++++++ 10 files changed, 102 insertions(+), 10 deletions(-) create mode 100644 nipype/interfaces/base/tests/__init__.py rename nipype/interfaces/{ => base}/tests/test_auto_BaseInterface.py (76%) rename nipype/interfaces/{ => base}/tests/test_auto_CommandLine.py (85%) rename nipype/interfaces/{ => base}/tests/test_auto_MpiCommandLine.py (86%) create mode 100644 nipype/interfaces/base/tests/test_auto_SEMLikeCommandLine.py rename nipype/interfaces/{ => base}/tests/test_auto_SimpleInterface.py (76%) rename nipype/interfaces/{ => base}/tests/test_auto_StdOutCommandLine.py (86%) rename nipype/interfaces/{ => base}/tests/test_base.py (100%) rename nipype/interfaces/{ => base}/tests/test_resource_monitor.py (100%) create mode 100644 nipype/interfaces/niftyseg/tests/test_auto_PatchMatch.py diff --git a/nipype/interfaces/base/tests/__init__.py b/nipype/interfaces/base/tests/__init__.py new file mode 100644 index 0000000000..40a96afc6f --- /dev/null +++ b/nipype/interfaces/base/tests/__init__.py @@ -0,0 +1 @@ +# -*- coding: utf-8 -*- diff --git a/nipype/interfaces/tests/test_auto_BaseInterface.py b/nipype/interfaces/base/tests/test_auto_BaseInterface.py similarity index 76% rename from nipype/interfaces/tests/test_auto_BaseInterface.py rename to nipype/interfaces/base/tests/test_auto_BaseInterface.py index 9c1f2cfaa6..33652036c7 100644 --- a/nipype/interfaces/tests/test_auto_BaseInterface.py +++ b/nipype/interfaces/base/tests/test_auto_BaseInterface.py @@ -1,10 +1,11 @@ # AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT from __future__ import unicode_literals -from ..base import BaseInterface +from ..core import BaseInterface def test_BaseInterface_inputs(): - input_map = dict(ignore_exception=dict(nohash=True, + input_map = dict(ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), ) diff --git a/nipype/interfaces/tests/test_auto_CommandLine.py b/nipype/interfaces/base/tests/test_auto_CommandLine.py similarity index 85% rename from nipype/interfaces/tests/test_auto_CommandLine.py rename to nipype/interfaces/base/tests/test_auto_CommandLine.py index c5904dda69..8154f73a3d 100644 --- a/nipype/interfaces/tests/test_auto_CommandLine.py +++ b/nipype/interfaces/base/tests/test_auto_CommandLine.py @@ -1,6 +1,6 @@ # AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT from __future__ import unicode_literals -from ..base import CommandLine +from ..core import CommandLine def test_CommandLine_inputs(): @@ -9,7 +9,8 @@ def test_CommandLine_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), terminal_output=dict(deprecated='1.0.0', diff --git a/nipype/interfaces/tests/test_auto_MpiCommandLine.py b/nipype/interfaces/base/tests/test_auto_MpiCommandLine.py similarity index 86% rename from nipype/interfaces/tests/test_auto_MpiCommandLine.py rename to nipype/interfaces/base/tests/test_auto_MpiCommandLine.py index 3a5841e198..644de736ba 100644 --- a/nipype/interfaces/tests/test_auto_MpiCommandLine.py +++ b/nipype/interfaces/base/tests/test_auto_MpiCommandLine.py @@ -1,6 +1,6 @@ # AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT from __future__ import unicode_literals -from ..base import MpiCommandLine +from ..core import MpiCommandLine def test_MpiCommandLine_inputs(): @@ -9,7 +9,8 @@ def test_MpiCommandLine_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), n_procs=dict(), diff --git a/nipype/interfaces/base/tests/test_auto_SEMLikeCommandLine.py b/nipype/interfaces/base/tests/test_auto_SEMLikeCommandLine.py new file mode 100644 index 0000000000..98ee386ee4 --- /dev/null +++ b/nipype/interfaces/base/tests/test_auto_SEMLikeCommandLine.py @@ -0,0 +1,25 @@ +# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT +from __future__ import unicode_literals +from ..core import SEMLikeCommandLine + + +def test_SEMLikeCommandLine_inputs(): + input_map = dict(args=dict(argstr='%s', + ), + environ=dict(nohash=True, + usedefault=True, + ), + ignore_exception=dict(deprecated='1.0.0', + nohash=True, + usedefault=True, + ), + terminal_output=dict(deprecated='1.0.0', + nohash=True, + ), + ) + inputs = SEMLikeCommandLine.input_spec() + + for key, metadata in list(input_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(inputs.traits()[key], metakey) == value + diff --git a/nipype/interfaces/tests/test_auto_SimpleInterface.py b/nipype/interfaces/base/tests/test_auto_SimpleInterface.py similarity index 76% rename from nipype/interfaces/tests/test_auto_SimpleInterface.py rename to nipype/interfaces/base/tests/test_auto_SimpleInterface.py index b00d1f9a3c..6c19b125f2 100644 --- a/nipype/interfaces/tests/test_auto_SimpleInterface.py +++ b/nipype/interfaces/base/tests/test_auto_SimpleInterface.py @@ -1,10 +1,11 @@ # AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT from __future__ import unicode_literals -from ..base import SimpleInterface +from ..core import SimpleInterface def test_SimpleInterface_inputs(): - input_map = dict(ignore_exception=dict(nohash=True, + input_map = dict(ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), ) diff --git a/nipype/interfaces/tests/test_auto_StdOutCommandLine.py b/nipype/interfaces/base/tests/test_auto_StdOutCommandLine.py similarity index 86% rename from nipype/interfaces/tests/test_auto_StdOutCommandLine.py rename to nipype/interfaces/base/tests/test_auto_StdOutCommandLine.py index ad49a04abb..a876e1b61e 100644 --- a/nipype/interfaces/tests/test_auto_StdOutCommandLine.py +++ b/nipype/interfaces/base/tests/test_auto_StdOutCommandLine.py @@ -1,6 +1,6 @@ # AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT from __future__ import unicode_literals -from ..base import StdOutCommandLine +from ..core import StdOutCommandLine def test_StdOutCommandLine_inputs(): @@ -9,7 +9,8 @@ def test_StdOutCommandLine_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), out_file=dict(argstr='> %s', diff --git a/nipype/interfaces/tests/test_base.py b/nipype/interfaces/base/tests/test_base.py similarity index 100% rename from nipype/interfaces/tests/test_base.py rename to nipype/interfaces/base/tests/test_base.py diff --git a/nipype/interfaces/tests/test_resource_monitor.py b/nipype/interfaces/base/tests/test_resource_monitor.py similarity index 100% rename from nipype/interfaces/tests/test_resource_monitor.py rename to nipype/interfaces/base/tests/test_resource_monitor.py diff --git a/nipype/interfaces/niftyseg/tests/test_auto_PatchMatch.py b/nipype/interfaces/niftyseg/tests/test_auto_PatchMatch.py new file mode 100644 index 0000000000..ba6ea5a40c --- /dev/null +++ b/nipype/interfaces/niftyseg/tests/test_auto_PatchMatch.py @@ -0,0 +1,61 @@ +# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT +from __future__ import unicode_literals +from ..patchmatch import PatchMatch + + +def test_PatchMatch_inputs(): + input_map = dict(args=dict(argstr='%s', + ), + cs_size=dict(argstr='-cs %i', + ), + database_file=dict(argstr='-db %s', + mandatory=True, + position=3, + ), + environ=dict(nohash=True, + usedefault=True, + ), + ignore_exception=dict(deprecated='1.0.0', + nohash=True, + usedefault=True, + ), + in_file=dict(argstr='-i %s', + mandatory=True, + position=1, + ), + it_num=dict(argstr='-it %i', + ), + mask_file=dict(argstr='-m %s', + mandatory=True, + position=2, + ), + match_num=dict(argstr='-match %i', + ), + out_file=dict(argstr='-o %s', + name_source=['in_file'], + name_template='%s_pm.nii.gz', + position=4, + ), + patch_size=dict(argstr='-size %i', + ), + pm_num=dict(argstr='-pm %i', + ), + terminal_output=dict(deprecated='1.0.0', + nohash=True, + ), + ) + inputs = PatchMatch.input_spec() + + for key, metadata in list(input_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(inputs.traits()[key], metakey) == value + + +def test_PatchMatch_outputs(): + output_map = dict(out_file=dict(), + ) + outputs = PatchMatch.output_spec() + + for key, metadata in list(output_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(outputs.traits()[key], metakey) == value From 86792b9d9c77ceb84a23378a5e68ad76cb223d42 Mon Sep 17 00:00:00 2001 From: oesteban Date: Mon, 4 Dec 2017 12:18:32 -0800 Subject: [PATCH 583/643] split huge test_base into pieces --- nipype/interfaces/base/tests/test_base.py | 792 ------------------- nipype/interfaces/base/tests/test_core.py | 464 +++++++++++ nipype/interfaces/base/tests/test_specs.py | 317 ++++++++ nipype/interfaces/base/tests/test_support.py | 64 ++ 4 files changed, 845 insertions(+), 792 deletions(-) delete mode 100644 nipype/interfaces/base/tests/test_base.py create mode 100644 nipype/interfaces/base/tests/test_core.py create mode 100644 nipype/interfaces/base/tests/test_specs.py create mode 100644 nipype/interfaces/base/tests/test_support.py diff --git a/nipype/interfaces/base/tests/test_base.py b/nipype/interfaces/base/tests/test_base.py deleted file mode 100644 index 6f02f3712c..0000000000 --- a/nipype/interfaces/base/tests/test_base.py +++ /dev/null @@ -1,792 +0,0 @@ -# -*- coding: utf-8 -*- -# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- -# vi: set ft=python sts=4 ts=4 sw=4 et: -from __future__ import print_function, unicode_literals -from future import standard_library -from builtins import open -import os -import warnings -import simplejson as json - -import pytest - -from ... import config -from ...testing import example_data -from ...utils.filemanip import split_filename, md5 -from .. import base as nib -from ..base import traits, Undefined - -standard_library.install_aliases() - - -@pytest.mark.parametrize("args", [ - {}, - {'a': 1, 'b': [2, 3]} -]) -def test_bunch(args): - b = nib.Bunch(**args) - assert b.__dict__ == args - - -def test_bunch_attribute(): - b = nib.Bunch(a=1, b=[2, 3], c=None) - assert b.a == 1 - assert b.b == [2, 3] - assert b.c is None - - -def test_bunch_repr(): - b = nib.Bunch(b=2, c=3, a=dict(n=1, m=2)) - assert repr(b) == "Bunch(a={'m': 2, 'n': 1}, b=2, c=3)" - - -def test_bunch_methods(): - b = nib.Bunch(a=2) - b.update(a=3) - newb = b.dictcopy() - assert b.a == 3 - assert b.get('a') == 3 - assert b.get('badkey', 'otherthing') == 'otherthing' - assert b != newb - assert type(dict()) == type(newb) - assert newb['a'] == 3 - - -def test_bunch_hash(): - # NOTE: Since the path to the json file is included in the Bunch, - # the hash will be unique to each machine. - pth = os.path.split(os.path.abspath(__file__))[0] - json_pth = os.path.join(pth, 'realign_json.json') - b = nib.Bunch(infile=json_pth, - otherthing='blue', - yat=True) - newbdict, bhash = b._get_bunch_hash() - assert bhash == 'ddcc7b4ec5675df8cf317a48bd1857fa' - # Make sure the hash stored in the json file for `infile` is correct. - jshash = md5() - with open(json_pth, 'r') as fp: - jshash.update(fp.read().encode('utf-8')) - assert newbdict['infile'][0][1] == jshash.hexdigest() - assert newbdict['yat'] is True - - -@pytest.fixture(scope="module") -def setup_file(request, tmpdir_factory): - tmp_dir = tmpdir_factory.mktemp('files') - tmp_infile = tmp_dir.join('foo.txt') - with tmp_infile.open('w') as fp: - fp.writelines(['123456789']) - - tmp_dir.chdir() - - return tmp_infile.strpath - - -def test_TraitedSpec(): - assert nib.TraitedSpec().get_hashval() - assert nib.TraitedSpec().__repr__() == '\n\n' - - class spec(nib.TraitedSpec): - foo = nib.traits.Int - goo = nib.traits.Float(usedefault=True) - - assert spec().foo == Undefined - assert spec().goo == 0.0 - specfunc = lambda x: spec(hoo=x) - with pytest.raises(nib.traits.TraitError): specfunc(1) - infields = spec(foo=1) - hashval = ([('foo', 1), ('goo', '0.0000000000')], 'e89433b8c9141aa0fda2f8f4d662c047') - assert infields.get_hashval() == hashval - assert infields.__repr__() == '\nfoo = 1\ngoo = 0.0\n' - - -@pytest.mark.skip -def test_TraitedSpec_dynamic(): - from pickle import dumps, loads - a = nib.BaseTraitedSpec() - a.add_trait('foo', nib.traits.Int) - a.foo = 1 - assign_a = lambda: setattr(a, 'foo', 'a') - with pytest.raises(Exception): assign_a - pkld_a = dumps(a) - unpkld_a = loads(pkld_a) - assign_a_again = lambda: setattr(unpkld_a, 'foo', 'a') - with pytest.raises(Exception): assign_a_again - - -def test_TraitedSpec_logic(): - class spec3(nib.TraitedSpec): - _xor_inputs = ('foo', 'bar') - - foo = nib.traits.Int(xor=_xor_inputs, - desc='foo or bar, not both') - bar = nib.traits.Int(xor=_xor_inputs, - desc='bar or foo, not both') - kung = nib.traits.Float(requires=('foo',), - position=0, - desc='kung foo') - - class out3(nib.TraitedSpec): - output = nib.traits.Int - - class MyInterface(nib.BaseInterface): - input_spec = spec3 - output_spec = out3 - - myif = MyInterface() - # NOTE_dj, FAIL: I don't get a TypeError, only a UserWarning - #with pytest.raises(TypeError): - # setattr(myif.inputs, 'kung', 10.0) - myif.inputs.foo = 1 - assert myif.inputs.foo == 1 - set_bar = lambda: setattr(myif.inputs, 'bar', 1) - with pytest.raises(IOError): set_bar() - assert myif.inputs.foo == 1 - myif.inputs.kung = 2 - assert myif.inputs.kung == 2.0 - - -def test_deprecation(): - with warnings.catch_warnings(record=True) as w: - warnings.filterwarnings('always', '', UserWarning) - - class DeprecationSpec1(nib.TraitedSpec): - foo = nib.traits.Int(deprecated='0.1') - spec_instance = DeprecationSpec1() - set_foo = lambda: setattr(spec_instance, 'foo', 1) - with pytest.raises(nib.TraitError): set_foo() - assert len(w) == 0, 'no warnings, just errors' - - - with warnings.catch_warnings(record=True) as w: - warnings.filterwarnings('always', '', UserWarning) - - class DeprecationSpec2(nib.TraitedSpec): - foo = nib.traits.Int(deprecated='100', new_name='bar') - spec_instance = DeprecationSpec2() - set_foo = lambda: setattr(spec_instance, 'foo', 1) - with pytest.raises(nib.TraitError): set_foo() - assert len(w) == 0, 'no warnings, just errors' - - with warnings.catch_warnings(record=True) as w: - warnings.filterwarnings('always', '', UserWarning) - - class DeprecationSpec3(nib.TraitedSpec): - foo = nib.traits.Int(deprecated='1000', new_name='bar') - bar = nib.traits.Int() - spec_instance = DeprecationSpec3() - not_raised = True - try: - spec_instance.foo = 1 - except nib.TraitError: - not_raised = False - assert not_raised - assert len(w) == 1, 'deprecated warning 1 %s' % [w1.message for w1 in w] - - with warnings.catch_warnings(record=True) as w: - warnings.filterwarnings('always', '', UserWarning) - - class DeprecationSpec3(nib.TraitedSpec): - foo = nib.traits.Int(deprecated='1000', new_name='bar') - bar = nib.traits.Int() - spec_instance = DeprecationSpec3() - not_raised = True - try: - spec_instance.foo = 1 - except nib.TraitError: - not_raised = False - assert not_raised - assert spec_instance.foo == Undefined - assert spec_instance.bar == 1 - assert len(w) == 1, 'deprecated warning 2 %s' % [w1.message for w1 in w] - - -def test_namesource(setup_file): - tmp_infile = setup_file - tmpd, nme, ext = split_filename(tmp_infile) - - class spec2(nib.CommandLineInputSpec): - moo = nib.File(name_source=['doo'], hash_files=False, argstr="%s", - position=2) - doo = nib.File(exists=True, argstr="%s", position=1) - goo = traits.Int(argstr="%d", position=4) - poo = nib.File(name_source=['goo'], hash_files=False, argstr="%s", - position=3) - - class TestName(nib.CommandLine): - _cmd = "mycommand" - input_spec = spec2 - testobj = TestName() - testobj.inputs.doo = tmp_infile - testobj.inputs.goo = 99 - assert '%s_generated' % nme in testobj.cmdline - assert '%d_generated' % testobj.inputs.goo in testobj.cmdline - testobj.inputs.moo = "my_%s_template" - assert 'my_%s_template' % nme in testobj.cmdline - - -def test_chained_namesource(setup_file): - tmp_infile = setup_file - tmpd, nme, ext = split_filename(tmp_infile) - - class spec2(nib.CommandLineInputSpec): - doo = nib.File(exists=True, argstr="%s", position=1) - moo = nib.File(name_source=['doo'], hash_files=False, argstr="%s", - position=2, name_template='%s_mootpl') - poo = nib.File(name_source=['moo'], hash_files=False, - argstr="%s", position=3) - - class TestName(nib.CommandLine): - _cmd = "mycommand" - input_spec = spec2 - - testobj = TestName() - testobj.inputs.doo = tmp_infile - res = testobj.cmdline - assert '%s' % tmp_infile in res - assert '%s_mootpl ' % nme in res - assert '%s_mootpl_generated' % nme in res - - -def test_cycle_namesource1(setup_file): - tmp_infile = setup_file - tmpd, nme, ext = split_filename(tmp_infile) - - class spec3(nib.CommandLineInputSpec): - moo = nib.File(name_source=['doo'], hash_files=False, argstr="%s", - position=1, name_template='%s_mootpl') - poo = nib.File(name_source=['moo'], hash_files=False, - argstr="%s", position=2) - doo = nib.File(name_source=['poo'], hash_files=False, - argstr="%s", position=3) - - class TestCycle(nib.CommandLine): - _cmd = "mycommand" - input_spec = spec3 - - # Check that an exception is raised - to0 = TestCycle() - not_raised = True - try: - to0.cmdline - except nib.NipypeInterfaceError: - not_raised = False - assert not not_raised - - -def test_cycle_namesource2(setup_file): - tmp_infile = setup_file - tmpd, nme, ext = split_filename(tmp_infile) - - class spec3(nib.CommandLineInputSpec): - moo = nib.File(name_source=['doo'], hash_files=False, argstr="%s", - position=1, name_template='%s_mootpl') - poo = nib.File(name_source=['moo'], hash_files=False, - argstr="%s", position=2) - doo = nib.File(name_source=['poo'], hash_files=False, - argstr="%s", position=3) - - class TestCycle(nib.CommandLine): - _cmd = "mycommand" - input_spec = spec3 - - # Check that loop can be broken by setting one of the inputs - to1 = TestCycle() - to1.inputs.poo = tmp_infile - - not_raised = True - try: - res = to1.cmdline - except nib.NipypeInterfaceError: - not_raised = False - print(res) - - assert not_raised - assert '%s' % tmp_infile in res - assert '%s_generated' % nme in res - assert '%s_generated_mootpl' % nme in res - - -def test_TraitedSpec_withFile(setup_file): - tmp_infile = setup_file - tmpd, nme = os.path.split(tmp_infile) - assert os.path.exists(tmp_infile) - - class spec2(nib.TraitedSpec): - moo = nib.File(exists=True) - doo = nib.traits.List(nib.File(exists=True)) - infields = spec2(moo=tmp_infile, doo=[tmp_infile]) - hashval = infields.get_hashval(hash_method='content') - assert hashval[1] == 'a00e9ee24f5bfa9545a515b7a759886b' - - -def test_TraitedSpec_withNoFileHashing(setup_file): - tmp_infile = setup_file - tmpd, nme = os.path.split(tmp_infile) - assert os.path.exists(tmp_infile) - - class spec2(nib.TraitedSpec): - moo = nib.File(exists=True, hash_files=False) - doo = nib.traits.List(nib.File(exists=True)) - infields = spec2(moo=nme, doo=[tmp_infile]) - hashval = infields.get_hashval(hash_method='content') - assert hashval[1] == '8da4669ff5d72f670a46ea3e7a203215' - - class spec3(nib.TraitedSpec): - moo = nib.File(exists=True, name_source="doo") - doo = nib.traits.List(nib.File(exists=True)) - infields = spec3(moo=nme, doo=[tmp_infile]) - hashval1 = infields.get_hashval(hash_method='content') - - class spec4(nib.TraitedSpec): - moo = nib.File(exists=True) - doo = nib.traits.List(nib.File(exists=True)) - infields = spec4(moo=nme, doo=[tmp_infile]) - hashval2 = infields.get_hashval(hash_method='content') - assert hashval1[1] != hashval2[1] - - -def test_Interface(): - assert nib.Interface.input_spec == None - assert nib.Interface.output_spec == None - with pytest.raises(NotImplementedError): nib.Interface() - with pytest.raises(NotImplementedError): nib.Interface.help() - with pytest.raises(NotImplementedError): nib.Interface._inputs_help() - with pytest.raises(NotImplementedError): nib.Interface._outputs_help() - with pytest.raises(NotImplementedError): nib.Interface._outputs() - - class DerivedInterface(nib.Interface): - def __init__(self): - pass - - nif = DerivedInterface() - with pytest.raises(NotImplementedError): nif.run() - with pytest.raises(NotImplementedError): nif.aggregate_outputs() - with pytest.raises(NotImplementedError): nif._list_outputs() - with pytest.raises(NotImplementedError): nif._get_filecopy_info() - - -def test_BaseInterface(): - assert nib.BaseInterface.help() == None - assert nib.BaseInterface._get_filecopy_info() == [] - - class InputSpec(nib.TraitedSpec): - foo = nib.traits.Int(desc='a random int') - goo = nib.traits.Int(desc='a random int', mandatory=True) - moo = nib.traits.Int(desc='a random int', mandatory=False) - hoo = nib.traits.Int(desc='a random int', usedefault=True) - zoo = nib.File(desc='a file', copyfile=False) - woo = nib.File(desc='a file', copyfile=True) - - class OutputSpec(nib.TraitedSpec): - foo = nib.traits.Int(desc='a random int') - - class DerivedInterface(nib.BaseInterface): - input_spec = InputSpec - - assert DerivedInterface.help() == None - assert 'moo' in ''.join(DerivedInterface._inputs_help()) - assert DerivedInterface()._outputs() == None - assert DerivedInterface._get_filecopy_info()[0]['key'] == 'woo' - assert DerivedInterface._get_filecopy_info()[0]['copy'] - assert DerivedInterface._get_filecopy_info()[1]['key'] == 'zoo' - assert not DerivedInterface._get_filecopy_info()[1]['copy'] - assert DerivedInterface().inputs.foo == Undefined - with pytest.raises(ValueError): DerivedInterface()._check_mandatory_inputs() - assert DerivedInterface(goo=1)._check_mandatory_inputs() == None - with pytest.raises(ValueError): DerivedInterface().run() - with pytest.raises(NotImplementedError): DerivedInterface(goo=1).run() - - class DerivedInterface2(DerivedInterface): - output_spec = OutputSpec - - def _run_interface(self, runtime): - return runtime - - assert DerivedInterface2.help() == None - assert DerivedInterface2()._outputs().foo == Undefined - with pytest.raises(NotImplementedError): DerivedInterface2(goo=1).run() - - default_inpu_spec = nib.BaseInterface.input_spec - nib.BaseInterface.input_spec = None - with pytest.raises(Exception): nib.BaseInterface() - nib.BaseInterface.input_spec = default_inpu_spec - - -def test_BaseInterface_load_save_inputs(tmpdir): - tmp_json = tmpdir.join('settings.json').strpath - - class InputSpec(nib.TraitedSpec): - input1 = nib.traits.Int() - input2 = nib.traits.Float() - input3 = nib.traits.Bool() - input4 = nib.traits.Str() - - class DerivedInterface(nib.BaseInterface): - input_spec = InputSpec - - def __init__(self, **inputs): - super(DerivedInterface, self).__init__(**inputs) - - inputs_dict = {'input1': 12, 'input3': True, - 'input4': 'some string'} - bif = DerivedInterface(**inputs_dict) - bif.save_inputs_to_json(tmp_json) - bif2 = DerivedInterface() - bif2.load_inputs_from_json(tmp_json) - assert bif2.inputs.get_traitsfree() == inputs_dict - - bif3 = DerivedInterface(from_file=tmp_json) - assert bif3.inputs.get_traitsfree() == inputs_dict - - inputs_dict2 = inputs_dict.copy() - inputs_dict2.update({'input4': 'some other string'}) - bif4 = DerivedInterface(from_file=tmp_json, input4=inputs_dict2['input4']) - assert bif4.inputs.get_traitsfree() == inputs_dict2 - - bif5 = DerivedInterface(input4=inputs_dict2['input4']) - bif5.load_inputs_from_json(tmp_json, overwrite=False) - assert bif5.inputs.get_traitsfree() == inputs_dict2 - - bif6 = DerivedInterface(input4=inputs_dict2['input4']) - bif6.load_inputs_from_json(tmp_json) - assert bif6.inputs.get_traitsfree() == inputs_dict - - # test get hashval in a complex interface - from nipype.interfaces.ants import Registration - settings = example_data(example_data('smri_ants_registration_settings.json')) - with open(settings) as setf: - data_dict = json.load(setf) - - tsthash = Registration() - tsthash.load_inputs_from_json(settings) - assert {} == check_dict(data_dict, tsthash.inputs.get_traitsfree()) - - tsthash2 = Registration(from_file=settings) - assert {} == check_dict(data_dict, tsthash2.inputs.get_traitsfree()) - - _, hashvalue = tsthash.inputs.get_hashval(hash_method='timestamp') - assert 'ec5755e07287e04a4b409e03b77a517c' == hashvalue - - -def test_input_version(): - class InputSpec(nib.TraitedSpec): - foo = nib.traits.Int(desc='a random int', min_ver='0.9') - - class DerivedInterface1(nib.BaseInterface): - input_spec = InputSpec - obj = DerivedInterface1() - obj._check_version_requirements(obj.inputs) - - config.set('execution', 'stop_on_unknown_version', True) - - with pytest.raises(Exception): obj._check_version_requirements(obj.inputs) - - config.set_default_config() - - class InputSpec(nib.TraitedSpec): - foo = nib.traits.Int(desc='a random int', min_ver='0.9') - - class DerivedInterface1(nib.BaseInterface): - input_spec = InputSpec - _version = '0.8' - obj = DerivedInterface1() - obj.inputs.foo = 1 - with pytest.raises(Exception): obj._check_version_requirements() - - class InputSpec(nib.TraitedSpec): - foo = nib.traits.Int(desc='a random int', min_ver='0.9') - - class DerivedInterface1(nib.BaseInterface): - input_spec = InputSpec - _version = '0.10' - obj = DerivedInterface1() - obj._check_version_requirements(obj.inputs) - - class InputSpec(nib.TraitedSpec): - foo = nib.traits.Int(desc='a random int', min_ver='0.9') - - class DerivedInterface1(nib.BaseInterface): - input_spec = InputSpec - _version = '0.9' - obj = DerivedInterface1() - obj.inputs.foo = 1 - not_raised = True - obj._check_version_requirements(obj.inputs) - - class InputSpec(nib.TraitedSpec): - foo = nib.traits.Int(desc='a random int', max_ver='0.7') - - class DerivedInterface2(nib.BaseInterface): - input_spec = InputSpec - _version = '0.8' - obj = DerivedInterface2() - obj.inputs.foo = 1 - with pytest.raises(Exception): obj._check_version_requirements() - - class InputSpec(nib.TraitedSpec): - foo = nib.traits.Int(desc='a random int', max_ver='0.9') - - class DerivedInterface1(nib.BaseInterface): - input_spec = InputSpec - _version = '0.9' - obj = DerivedInterface1() - obj.inputs.foo = 1 - not_raised = True - obj._check_version_requirements(obj.inputs) - - -def test_output_version(): - class InputSpec(nib.TraitedSpec): - foo = nib.traits.Int(desc='a random int') - - class OutputSpec(nib.TraitedSpec): - foo = nib.traits.Int(desc='a random int', min_ver='0.9') - - class DerivedInterface1(nib.BaseInterface): - input_spec = InputSpec - output_spec = OutputSpec - _version = '0.10' - obj = DerivedInterface1() - assert obj._check_version_requirements(obj._outputs()) == [] - - class InputSpec(nib.TraitedSpec): - foo = nib.traits.Int(desc='a random int') - - class OutputSpec(nib.TraitedSpec): - foo = nib.traits.Int(desc='a random int', min_ver='0.11') - - class DerivedInterface1(nib.BaseInterface): - input_spec = InputSpec - output_spec = OutputSpec - _version = '0.10' - obj = DerivedInterface1() - assert obj._check_version_requirements(obj._outputs()) == ['foo'] - - class InputSpec(nib.TraitedSpec): - foo = nib.traits.Int(desc='a random int') - - class OutputSpec(nib.TraitedSpec): - foo = nib.traits.Int(desc='a random int', min_ver='0.11') - - class DerivedInterface1(nib.BaseInterface): - input_spec = InputSpec - output_spec = OutputSpec - _version = '0.10' - - def _run_interface(self, runtime): - return runtime - - def _list_outputs(self): - return {'foo': 1} - obj = DerivedInterface1() - with pytest.raises(KeyError): obj.run() - - -def test_Commandline(): - with pytest.raises(Exception): nib.CommandLine() - ci = nib.CommandLine(command='which') - assert ci.cmd == 'which' - assert ci.inputs.args == Undefined - ci2 = nib.CommandLine(command='which', args='ls') - assert ci2.cmdline == 'which ls' - ci3 = nib.CommandLine(command='echo') - ci3.inputs.environ = {'MYENV': 'foo'} - res = ci3.run() - assert res.runtime.environ['MYENV'] == 'foo' - assert res.outputs == None - - class CommandLineInputSpec1(nib.CommandLineInputSpec): - foo = nib.Str(argstr='%s', desc='a str') - goo = nib.traits.Bool(argstr='-g', desc='a bool', position=0) - hoo = nib.traits.List(argstr='-l %s', desc='a list') - moo = nib.traits.List(argstr='-i %d...', desc='a repeated list', - position=-1) - noo = nib.traits.Int(argstr='-x %d', desc='an int') - roo = nib.traits.Str(desc='not on command line') - soo = nib.traits.Bool(argstr="-soo") - nib.CommandLine.input_spec = CommandLineInputSpec1 - ci4 = nib.CommandLine(command='cmd') - ci4.inputs.foo = 'foo' - ci4.inputs.goo = True - ci4.inputs.hoo = ['a', 'b'] - ci4.inputs.moo = [1, 2, 3] - ci4.inputs.noo = 0 - ci4.inputs.roo = 'hello' - ci4.inputs.soo = False - cmd = ci4._parse_inputs() - assert cmd[0] == '-g' - assert cmd[-1] == '-i 1 -i 2 -i 3' - assert 'hello' not in ' '.join(cmd) - assert '-soo' not in ' '.join(cmd) - ci4.inputs.soo = True - cmd = ci4._parse_inputs() - assert '-soo' in ' '.join(cmd) - - class CommandLineInputSpec2(nib.CommandLineInputSpec): - foo = nib.File(argstr='%s', desc='a str', genfile=True) - nib.CommandLine.input_spec = CommandLineInputSpec2 - ci5 = nib.CommandLine(command='cmd') - with pytest.raises(NotImplementedError): ci5._parse_inputs() - - class DerivedClass(nib.CommandLine): - input_spec = CommandLineInputSpec2 - - def _gen_filename(self, name): - return 'filename' - - ci6 = DerivedClass(command='cmd') - assert ci6._parse_inputs()[0] == 'filename' - nib.CommandLine.input_spec = nib.CommandLineInputSpec - - -def test_Commandline_environ(monkeypatch, tmpdir): - from nipype import config - config.set_default_config() - - tmpdir.chdir() - monkeypatch.setitem(os.environ, 'DISPLAY', ':1') - # Test environment - ci3 = nib.CommandLine(command='echo') - res = ci3.run() - assert res.runtime.environ['DISPLAY'] == ':1' - - # Test display_variable option - monkeypatch.delitem(os.environ, 'DISPLAY', raising=False) - config.set('execution', 'display_variable', ':3') - res = ci3.run() - assert not 'DISPLAY' in ci3.inputs.environ - assert not 'DISPLAY' in res.runtime.environ - - # If the interface has _redirect_x then yes, it should be set - ci3._redirect_x = True - res = ci3.run() - assert res.runtime.environ['DISPLAY'] == ':3' - - # Test overwrite - monkeypatch.setitem(os.environ, 'DISPLAY', ':1') - ci3.inputs.environ = {'DISPLAY': ':2'} - res = ci3.run() - assert res.runtime.environ['DISPLAY'] == ':2' - - -def test_CommandLine_output(tmpdir): - # Create one file - tmpdir.chdir() - file = tmpdir.join('foo.txt') - file.write('123456\n') - name = os.path.basename(file.strpath) - - ci = nib.CommandLine(command='ls -l') - ci.terminal_output = 'allatonce' - res = ci.run() - assert res.runtime.merged == '' - assert name in res.runtime.stdout - - # Check stdout is written - ci = nib.CommandLine(command='ls -l') - ci.terminal_output = 'file_stdout' - res = ci.run() - assert os.path.isfile('stdout.nipype') - assert name in res.runtime.stdout - tmpdir.join('stdout.nipype').remove(ignore_errors=True) - - # Check stderr is written - ci = nib.CommandLine(command='ls -l') - ci.terminal_output = 'file_stderr' - res = ci.run() - assert os.path.isfile('stderr.nipype') - tmpdir.join('stderr.nipype').remove(ignore_errors=True) - - # Check outputs are thrown away - ci = nib.CommandLine(command='ls -l') - ci.terminal_output = 'none' - res = ci.run() - assert res.runtime.stdout == '' and \ - res.runtime.stderr == '' and \ - res.runtime.merged == '' - - # Check that new interfaces are set to default 'stream' - ci = nib.CommandLine(command='ls -l') - res = ci.run() - assert ci.terminal_output == 'stream' - assert name in res.runtime.stdout and \ - res.runtime.stderr == '' - - # Check only one file is generated - ci = nib.CommandLine(command='ls -l') - ci.terminal_output = 'file' - res = ci.run() - assert os.path.isfile('output.nipype') - assert name in res.runtime.merged and \ - res.runtime.stdout == '' and \ - res.runtime.stderr == '' - tmpdir.join('output.nipype').remove(ignore_errors=True) - - # Check split files are generated - ci = nib.CommandLine(command='ls -l') - ci.terminal_output = 'file_split' - res = ci.run() - assert os.path.isfile('stdout.nipype') - assert os.path.isfile('stderr.nipype') - assert name in res.runtime.stdout - - -def test_global_CommandLine_output(tmpdir): - """Ensures CommandLine.set_default_terminal_output works""" - from nipype.interfaces.fsl import BET - - ci = nib.CommandLine(command='ls -l') - assert ci.terminal_output == 'stream' # default case - - ci = BET() - assert ci.terminal_output == 'stream' # default case - - nib.CommandLine.set_default_terminal_output('allatonce') - ci = nib.CommandLine(command='ls -l') - assert ci.terminal_output == 'allatonce' - - nib.CommandLine.set_default_terminal_output('file') - ci = nib.CommandLine(command='ls -l') - assert ci.terminal_output == 'file' - - # Check default affects derived interfaces - ci = BET() - assert ci.terminal_output == 'file' - - -def check_dict(ref_dict, tst_dict): - """Compare dictionaries of inputs and and those loaded from json files""" - def to_list(x): - if isinstance(x, tuple): - x = list(x) - - if isinstance(x, list): - for i, xel in enumerate(x): - x[i] = to_list(xel) - - return x - - failed_dict = {} - for key, value in list(ref_dict.items()): - newval = to_list(tst_dict[key]) - if newval != value: - failed_dict[key] = (value, newval) - return failed_dict - -def test_ImageFile(): - x = nib.BaseInterface().inputs - - # setup traits - x.add_trait('nifti', nib.ImageFile(types=['nifti1', 'dicom'])) - x.add_trait('anytype', nib.ImageFile()) - x.add_trait('newtype', nib.ImageFile(types=['nifti10'])) - x.add_trait('nocompress', nib.ImageFile(types=['mgh'], - allow_compressed=False)) - - with pytest.raises(nib.TraitError): x.nifti = 'test.mgz' - x.nifti = 'test.nii' - x.anytype = 'test.xml' - with pytest.raises(AttributeError): x.newtype = 'test.nii' - with pytest.raises(nib.TraitError): x.nocompress = 'test.nii.gz' - x.nocompress = 'test.mgh' diff --git a/nipype/interfaces/base/tests/test_core.py b/nipype/interfaces/base/tests/test_core.py new file mode 100644 index 0000000000..6deeb83eb9 --- /dev/null +++ b/nipype/interfaces/base/tests/test_core.py @@ -0,0 +1,464 @@ +# -*- coding: utf-8 -*- +# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- +# vi: set ft=python sts=4 ts=4 sw=4 et: +from __future__ import print_function, unicode_literals +from future import standard_library +from builtins import open +import os +import simplejson as json + +import pytest + +from ... import config +from ...testing import example_data +from .. import base as nib +from ..base import Undefined + +standard_library.install_aliases() + + +def check_dict(ref_dict, tst_dict): + """Compare dictionaries of inputs and and those loaded from json files""" + def to_list(x): + if isinstance(x, tuple): + x = list(x) + + if isinstance(x, list): + for i, xel in enumerate(x): + x[i] = to_list(xel) + + return x + + failed_dict = {} + for key, value in list(ref_dict.items()): + newval = to_list(tst_dict[key]) + if newval != value: + failed_dict[key] = (value, newval) + return failed_dict + + +def test_Interface(): + assert nib.Interface.input_spec is None + assert nib.Interface.output_spec is None + with pytest.raises(NotImplementedError): + nib.Interface() + with pytest.raises(NotImplementedError): + nib.Interface.help() + with pytest.raises(NotImplementedError): + nib.Interface._inputs_help() + with pytest.raises(NotImplementedError): + nib.Interface._outputs_help() + with pytest.raises(NotImplementedError): + nib.Interface._outputs() + + class DerivedInterface(nib.Interface): + def __init__(self): + pass + + nif = DerivedInterface() + with pytest.raises(NotImplementedError): + nif.run() + with pytest.raises(NotImplementedError): + nif.aggregate_outputs() + with pytest.raises(NotImplementedError): + nif._list_outputs() + with pytest.raises(NotImplementedError): + nif._get_filecopy_info() + + +def test_BaseInterface(): + assert nib.BaseInterface.help() is None + assert nib.BaseInterface._get_filecopy_info() == [] + + class InputSpec(nib.TraitedSpec): + foo = nib.traits.Int(desc='a random int') + goo = nib.traits.Int(desc='a random int', mandatory=True) + moo = nib.traits.Int(desc='a random int', mandatory=False) + hoo = nib.traits.Int(desc='a random int', usedefault=True) + zoo = nib.File(desc='a file', copyfile=False) + woo = nib.File(desc='a file', copyfile=True) + + class OutputSpec(nib.TraitedSpec): + foo = nib.traits.Int(desc='a random int') + + class DerivedInterface(nib.BaseInterface): + input_spec = InputSpec + + assert DerivedInterface.help() is None + assert 'moo' in ''.join(DerivedInterface._inputs_help()) + assert DerivedInterface()._outputs() is None + assert DerivedInterface._get_filecopy_info()[0]['key'] == 'woo' + assert DerivedInterface._get_filecopy_info()[0]['copy'] + assert DerivedInterface._get_filecopy_info()[1]['key'] == 'zoo' + assert not DerivedInterface._get_filecopy_info()[1]['copy'] + assert DerivedInterface().inputs.foo == Undefined + with pytest.raises(ValueError): + DerivedInterface()._check_mandatory_inputs() + assert DerivedInterface(goo=1)._check_mandatory_inputs() is None + with pytest.raises(ValueError): + DerivedInterface().run() + with pytest.raises(NotImplementedError): + DerivedInterface(goo=1).run() + + class DerivedInterface2(DerivedInterface): + output_spec = OutputSpec + + def _run_interface(self, runtime): + return runtime + + assert DerivedInterface2.help() is None + assert DerivedInterface2()._outputs().foo == Undefined + with pytest.raises(NotImplementedError): + DerivedInterface2(goo=1).run() + + default_inpu_spec = nib.BaseInterface.input_spec + nib.BaseInterface.input_spec = None + with pytest.raises(Exception): + nib.BaseInterface() + nib.BaseInterface.input_spec = default_inpu_spec + + +def test_BaseInterface_load_save_inputs(tmpdir): + tmp_json = tmpdir.join('settings.json').strpath + + class InputSpec(nib.TraitedSpec): + input1 = nib.traits.Int() + input2 = nib.traits.Float() + input3 = nib.traits.Bool() + input4 = nib.traits.Str() + + class DerivedInterface(nib.BaseInterface): + input_spec = InputSpec + + def __init__(self, **inputs): + super(DerivedInterface, self).__init__(**inputs) + + inputs_dict = {'input1': 12, 'input3': True, + 'input4': 'some string'} + bif = DerivedInterface(**inputs_dict) + bif.save_inputs_to_json(tmp_json) + bif2 = DerivedInterface() + bif2.load_inputs_from_json(tmp_json) + assert bif2.inputs.get_traitsfree() == inputs_dict + + bif3 = DerivedInterface(from_file=tmp_json) + assert bif3.inputs.get_traitsfree() == inputs_dict + + inputs_dict2 = inputs_dict.copy() + inputs_dict2.update({'input4': 'some other string'}) + bif4 = DerivedInterface(from_file=tmp_json, input4=inputs_dict2['input4']) + assert bif4.inputs.get_traitsfree() == inputs_dict2 + + bif5 = DerivedInterface(input4=inputs_dict2['input4']) + bif5.load_inputs_from_json(tmp_json, overwrite=False) + assert bif5.inputs.get_traitsfree() == inputs_dict2 + + bif6 = DerivedInterface(input4=inputs_dict2['input4']) + bif6.load_inputs_from_json(tmp_json) + assert bif6.inputs.get_traitsfree() == inputs_dict + + # test get hashval in a complex interface + from nipype.interfaces.ants import Registration + settings = example_data(example_data('smri_ants_registration_settings.json')) + with open(settings) as setf: + data_dict = json.load(setf) + + tsthash = Registration() + tsthash.load_inputs_from_json(settings) + assert {} == check_dict(data_dict, tsthash.inputs.get_traitsfree()) + + tsthash2 = Registration(from_file=settings) + assert {} == check_dict(data_dict, tsthash2.inputs.get_traitsfree()) + + _, hashvalue = tsthash.inputs.get_hashval(hash_method='timestamp') + assert 'ec5755e07287e04a4b409e03b77a517c' == hashvalue + + +def test_input_version(): + class InputSpec(nib.TraitedSpec): + foo = nib.traits.Int(desc='a random int', min_ver='0.9') + + class DerivedInterface1(nib.BaseInterface): + input_spec = InputSpec + obj = DerivedInterface1() + obj._check_version_requirements(obj.inputs) + + config.set('execution', 'stop_on_unknown_version', True) + + with pytest.raises(Exception): + obj._check_version_requirements(obj.inputs) + + config.set_default_config() + + class InputSpec(nib.TraitedSpec): + foo = nib.traits.Int(desc='a random int', min_ver='0.9') + + class DerivedInterface1(nib.BaseInterface): + input_spec = InputSpec + _version = '0.8' + obj = DerivedInterface1() + obj.inputs.foo = 1 + with pytest.raises(Exception): + obj._check_version_requirements() + + class InputSpec(nib.TraitedSpec): + foo = nib.traits.Int(desc='a random int', min_ver='0.9') + + class DerivedInterface1(nib.BaseInterface): + input_spec = InputSpec + _version = '0.10' + obj = DerivedInterface1() + obj._check_version_requirements(obj.inputs) + + class InputSpec(nib.TraitedSpec): + foo = nib.traits.Int(desc='a random int', min_ver='0.9') + + class DerivedInterface1(nib.BaseInterface): + input_spec = InputSpec + _version = '0.9' + obj = DerivedInterface1() + obj.inputs.foo = 1 + obj._check_version_requirements(obj.inputs) + + class InputSpec(nib.TraitedSpec): + foo = nib.traits.Int(desc='a random int', max_ver='0.7') + + class DerivedInterface2(nib.BaseInterface): + input_spec = InputSpec + _version = '0.8' + obj = DerivedInterface2() + obj.inputs.foo = 1 + with pytest.raises(Exception): + obj._check_version_requirements() + + class InputSpec(nib.TraitedSpec): + foo = nib.traits.Int(desc='a random int', max_ver='0.9') + + class DerivedInterface1(nib.BaseInterface): + input_spec = InputSpec + _version = '0.9' + obj = DerivedInterface1() + obj.inputs.foo = 1 + obj._check_version_requirements(obj.inputs) + + +def test_output_version(): + class InputSpec(nib.TraitedSpec): + foo = nib.traits.Int(desc='a random int') + + class OutputSpec(nib.TraitedSpec): + foo = nib.traits.Int(desc='a random int', min_ver='0.9') + + class DerivedInterface1(nib.BaseInterface): + input_spec = InputSpec + output_spec = OutputSpec + _version = '0.10' + obj = DerivedInterface1() + assert obj._check_version_requirements(obj._outputs()) == [] + + class InputSpec(nib.TraitedSpec): + foo = nib.traits.Int(desc='a random int') + + class OutputSpec(nib.TraitedSpec): + foo = nib.traits.Int(desc='a random int', min_ver='0.11') + + class DerivedInterface1(nib.BaseInterface): + input_spec = InputSpec + output_spec = OutputSpec + _version = '0.10' + obj = DerivedInterface1() + assert obj._check_version_requirements(obj._outputs()) == ['foo'] + + class InputSpec(nib.TraitedSpec): + foo = nib.traits.Int(desc='a random int') + + class OutputSpec(nib.TraitedSpec): + foo = nib.traits.Int(desc='a random int', min_ver='0.11') + + class DerivedInterface1(nib.BaseInterface): + input_spec = InputSpec + output_spec = OutputSpec + _version = '0.10' + + def _run_interface(self, runtime): + return runtime + + def _list_outputs(self): + return {'foo': 1} + obj = DerivedInterface1() + with pytest.raises(KeyError): + obj.run() + + +def test_Commandline(): + with pytest.raises(Exception): + nib.CommandLine() + ci = nib.CommandLine(command='which') + assert ci.cmd == 'which' + assert ci.inputs.args == Undefined + ci2 = nib.CommandLine(command='which', args='ls') + assert ci2.cmdline == 'which ls' + ci3 = nib.CommandLine(command='echo') + ci3.inputs.environ = {'MYENV': 'foo'} + res = ci3.run() + assert res.runtime.environ['MYENV'] == 'foo' + assert res.outputs is None + + class CommandLineInputSpec1(nib.CommandLineInputSpec): + foo = nib.Str(argstr='%s', desc='a str') + goo = nib.traits.Bool(argstr='-g', desc='a bool', position=0) + hoo = nib.traits.List(argstr='-l %s', desc='a list') + moo = nib.traits.List(argstr='-i %d...', desc='a repeated list', + position=-1) + noo = nib.traits.Int(argstr='-x %d', desc='an int') + roo = nib.traits.Str(desc='not on command line') + soo = nib.traits.Bool(argstr="-soo") + nib.CommandLine.input_spec = CommandLineInputSpec1 + ci4 = nib.CommandLine(command='cmd') + ci4.inputs.foo = 'foo' + ci4.inputs.goo = True + ci4.inputs.hoo = ['a', 'b'] + ci4.inputs.moo = [1, 2, 3] + ci4.inputs.noo = 0 + ci4.inputs.roo = 'hello' + ci4.inputs.soo = False + cmd = ci4._parse_inputs() + assert cmd[0] == '-g' + assert cmd[-1] == '-i 1 -i 2 -i 3' + assert 'hello' not in ' '.join(cmd) + assert '-soo' not in ' '.join(cmd) + ci4.inputs.soo = True + cmd = ci4._parse_inputs() + assert '-soo' in ' '.join(cmd) + + class CommandLineInputSpec2(nib.CommandLineInputSpec): + foo = nib.File(argstr='%s', desc='a str', genfile=True) + nib.CommandLine.input_spec = CommandLineInputSpec2 + ci5 = nib.CommandLine(command='cmd') + with pytest.raises(NotImplementedError): + ci5._parse_inputs() + + class DerivedClass(nib.CommandLine): + input_spec = CommandLineInputSpec2 + + def _gen_filename(self, name): + return 'filename' + + ci6 = DerivedClass(command='cmd') + assert ci6._parse_inputs()[0] == 'filename' + nib.CommandLine.input_spec = nib.CommandLineInputSpec + + +def test_Commandline_environ(monkeypatch, tmpdir): + from nipype import config + config.set_default_config() + + tmpdir.chdir() + monkeypatch.setitem(os.environ, 'DISPLAY', ':1') + # Test environment + ci3 = nib.CommandLine(command='echo') + res = ci3.run() + assert res.runtime.environ['DISPLAY'] == ':1' + + # Test display_variable option + monkeypatch.delitem(os.environ, 'DISPLAY', raising=False) + config.set('execution', 'display_variable', ':3') + res = ci3.run() + assert 'DISPLAY' not in ci3.inputs.environ + assert 'DISPLAY' not in res.runtime.environ + + # If the interface has _redirect_x then yes, it should be set + ci3._redirect_x = True + res = ci3.run() + assert res.runtime.environ['DISPLAY'] == ':3' + + # Test overwrite + monkeypatch.setitem(os.environ, 'DISPLAY', ':1') + ci3.inputs.environ = {'DISPLAY': ':2'} + res = ci3.run() + assert res.runtime.environ['DISPLAY'] == ':2' + + +def test_CommandLine_output(tmpdir): + # Create one file + tmpdir.chdir() + file = tmpdir.join('foo.txt') + file.write('123456\n') + name = os.path.basename(file.strpath) + + ci = nib.CommandLine(command='ls -l') + ci.terminal_output = 'allatonce' + res = ci.run() + assert res.runtime.merged == '' + assert name in res.runtime.stdout + + # Check stdout is written + ci = nib.CommandLine(command='ls -l') + ci.terminal_output = 'file_stdout' + res = ci.run() + assert os.path.isfile('stdout.nipype') + assert name in res.runtime.stdout + tmpdir.join('stdout.nipype').remove(ignore_errors=True) + + # Check stderr is written + ci = nib.CommandLine(command='ls -l') + ci.terminal_output = 'file_stderr' + res = ci.run() + assert os.path.isfile('stderr.nipype') + tmpdir.join('stderr.nipype').remove(ignore_errors=True) + + # Check outputs are thrown away + ci = nib.CommandLine(command='ls -l') + ci.terminal_output = 'none' + res = ci.run() + assert res.runtime.stdout == '' and \ + res.runtime.stderr == '' and \ + res.runtime.merged == '' + + # Check that new interfaces are set to default 'stream' + ci = nib.CommandLine(command='ls -l') + res = ci.run() + assert ci.terminal_output == 'stream' + assert name in res.runtime.stdout and \ + res.runtime.stderr == '' + + # Check only one file is generated + ci = nib.CommandLine(command='ls -l') + ci.terminal_output = 'file' + res = ci.run() + assert os.path.isfile('output.nipype') + assert name in res.runtime.merged and \ + res.runtime.stdout == '' and \ + res.runtime.stderr == '' + tmpdir.join('output.nipype').remove(ignore_errors=True) + + # Check split files are generated + ci = nib.CommandLine(command='ls -l') + ci.terminal_output = 'file_split' + res = ci.run() + assert os.path.isfile('stdout.nipype') + assert os.path.isfile('stderr.nipype') + assert name in res.runtime.stdout + + +def test_global_CommandLine_output(tmpdir): + """Ensures CommandLine.set_default_terminal_output works""" + from nipype.interfaces.fsl import BET + + ci = nib.CommandLine(command='ls -l') + assert ci.terminal_output == 'stream' # default case + + ci = BET() + assert ci.terminal_output == 'stream' # default case + + nib.CommandLine.set_default_terminal_output('allatonce') + ci = nib.CommandLine(command='ls -l') + assert ci.terminal_output == 'allatonce' + + nib.CommandLine.set_default_terminal_output('file') + ci = nib.CommandLine(command='ls -l') + assert ci.terminal_output == 'file' + + # Check default affects derived interfaces + ci = BET() + assert ci.terminal_output == 'file' diff --git a/nipype/interfaces/base/tests/test_specs.py b/nipype/interfaces/base/tests/test_specs.py new file mode 100644 index 0000000000..a168f44e3d --- /dev/null +++ b/nipype/interfaces/base/tests/test_specs.py @@ -0,0 +1,317 @@ +# -*- coding: utf-8 -*- +# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- +# vi: set ft=python sts=4 ts=4 sw=4 et: +from __future__ import print_function, unicode_literals +from future import standard_library +import os +import warnings + +import pytest + +from ...utils.filemanip import split_filename +from .. import base as nib +from ..base import traits, Undefined + +standard_library.install_aliases() + + +@pytest.fixture(scope="module") +def setup_file(request, tmpdir_factory): + tmp_dir = tmpdir_factory.mktemp('files') + tmp_infile = tmp_dir.join('foo.txt') + with tmp_infile.open('w') as fp: + fp.writelines(['123456789']) + + tmp_dir.chdir() + + return tmp_infile.strpath + + +def test_TraitedSpec(): + assert nib.TraitedSpec().get_hashval() + assert nib.TraitedSpec().__repr__() == '\n\n' + + class spec(nib.TraitedSpec): + foo = nib.traits.Int + goo = nib.traits.Float(usedefault=True) + + assert spec().foo == Undefined + assert spec().goo == 0.0 + specfunc = lambda x: spec(hoo=x) + with pytest.raises(nib.traits.TraitError): + specfunc(1) + infields = spec(foo=1) + hashval = ([('foo', 1), ('goo', '0.0000000000')], 'e89433b8c9141aa0fda2f8f4d662c047') + assert infields.get_hashval() == hashval + assert infields.__repr__() == '\nfoo = 1\ngoo = 0.0\n' + + +@pytest.mark.skip +def test_TraitedSpec_dynamic(): + from pickle import dumps, loads + a = nib.BaseTraitedSpec() + a.add_trait('foo', nib.traits.Int) + a.foo = 1 + assign_a = lambda: setattr(a, 'foo', 'a') + with pytest.raises(Exception): + assign_a + pkld_a = dumps(a) + unpkld_a = loads(pkld_a) + assign_a_again = lambda: setattr(unpkld_a, 'foo', 'a') + with pytest.raises(Exception): + assign_a_again + + +def test_TraitedSpec_logic(): + class spec3(nib.TraitedSpec): + _xor_inputs = ('foo', 'bar') + + foo = nib.traits.Int(xor=_xor_inputs, + desc='foo or bar, not both') + bar = nib.traits.Int(xor=_xor_inputs, + desc='bar or foo, not both') + kung = nib.traits.Float(requires=('foo',), + position=0, + desc='kung foo') + + class out3(nib.TraitedSpec): + output = nib.traits.Int + + class MyInterface(nib.BaseInterface): + input_spec = spec3 + output_spec = out3 + + myif = MyInterface() + # NOTE_dj, FAIL: I don't get a TypeError, only a UserWarning + # with pytest.raises(TypeError): + # setattr(myif.inputs, 'kung', 10.0) + myif.inputs.foo = 1 + assert myif.inputs.foo == 1 + set_bar = lambda: setattr(myif.inputs, 'bar', 1) + with pytest.raises(IOError): + set_bar() + assert myif.inputs.foo == 1 + myif.inputs.kung = 2 + assert myif.inputs.kung == 2.0 + + +def test_deprecation(): + with warnings.catch_warnings(record=True) as w: + warnings.filterwarnings('always', '', UserWarning) + + class DeprecationSpec1(nib.TraitedSpec): + foo = nib.traits.Int(deprecated='0.1') + spec_instance = DeprecationSpec1() + set_foo = lambda: setattr(spec_instance, 'foo', 1) + with pytest.raises(nib.TraitError): + set_foo() + assert len(w) == 0, 'no warnings, just errors' + + with warnings.catch_warnings(record=True) as w: + warnings.filterwarnings('always', '', UserWarning) + + class DeprecationSpec2(nib.TraitedSpec): + foo = nib.traits.Int(deprecated='100', new_name='bar') + spec_instance = DeprecationSpec2() + set_foo = lambda: setattr(spec_instance, 'foo', 1) + with pytest.raises(nib.TraitError): + set_foo() + assert len(w) == 0, 'no warnings, just errors' + + with warnings.catch_warnings(record=True) as w: + warnings.filterwarnings('always', '', UserWarning) + + class DeprecationSpec3(nib.TraitedSpec): + foo = nib.traits.Int(deprecated='1000', new_name='bar') + bar = nib.traits.Int() + spec_instance = DeprecationSpec3() + not_raised = True + try: + spec_instance.foo = 1 + except nib.TraitError: + not_raised = False + assert not_raised + assert len(w) == 1, 'deprecated warning 1 %s' % [w1.message for w1 in w] + + with warnings.catch_warnings(record=True) as w: + warnings.filterwarnings('always', '', UserWarning) + + class DeprecationSpec3(nib.TraitedSpec): + foo = nib.traits.Int(deprecated='1000', new_name='bar') + bar = nib.traits.Int() + spec_instance = DeprecationSpec3() + not_raised = True + try: + spec_instance.foo = 1 + except nib.TraitError: + not_raised = False + assert not_raised + assert spec_instance.foo == Undefined + assert spec_instance.bar == 1 + assert len(w) == 1, 'deprecated warning 2 %s' % [w1.message for w1 in w] + + +def test_namesource(setup_file): + tmp_infile = setup_file + tmpd, nme, ext = split_filename(tmp_infile) + + class spec2(nib.CommandLineInputSpec): + moo = nib.File(name_source=['doo'], hash_files=False, argstr="%s", + position=2) + doo = nib.File(exists=True, argstr="%s", position=1) + goo = traits.Int(argstr="%d", position=4) + poo = nib.File(name_source=['goo'], hash_files=False, argstr="%s", + position=3) + + class TestName(nib.CommandLine): + _cmd = "mycommand" + input_spec = spec2 + testobj = TestName() + testobj.inputs.doo = tmp_infile + testobj.inputs.goo = 99 + assert '%s_generated' % nme in testobj.cmdline + assert '%d_generated' % testobj.inputs.goo in testobj.cmdline + testobj.inputs.moo = "my_%s_template" + assert 'my_%s_template' % nme in testobj.cmdline + + +def test_chained_namesource(setup_file): + tmp_infile = setup_file + tmpd, nme, ext = split_filename(tmp_infile) + + class spec2(nib.CommandLineInputSpec): + doo = nib.File(exists=True, argstr="%s", position=1) + moo = nib.File(name_source=['doo'], hash_files=False, argstr="%s", + position=2, name_template='%s_mootpl') + poo = nib.File(name_source=['moo'], hash_files=False, + argstr="%s", position=3) + + class TestName(nib.CommandLine): + _cmd = "mycommand" + input_spec = spec2 + + testobj = TestName() + testobj.inputs.doo = tmp_infile + res = testobj.cmdline + assert '%s' % tmp_infile in res + assert '%s_mootpl ' % nme in res + assert '%s_mootpl_generated' % nme in res + + +def test_cycle_namesource1(setup_file): + tmp_infile = setup_file + tmpd, nme, ext = split_filename(tmp_infile) + + class spec3(nib.CommandLineInputSpec): + moo = nib.File(name_source=['doo'], hash_files=False, argstr="%s", + position=1, name_template='%s_mootpl') + poo = nib.File(name_source=['moo'], hash_files=False, + argstr="%s", position=2) + doo = nib.File(name_source=['poo'], hash_files=False, + argstr="%s", position=3) + + class TestCycle(nib.CommandLine): + _cmd = "mycommand" + input_spec = spec3 + + # Check that an exception is raised + to0 = TestCycle() + not_raised = True + try: + to0.cmdline + except nib.NipypeInterfaceError: + not_raised = False + assert not not_raised + + +def test_cycle_namesource2(setup_file): + tmp_infile = setup_file + tmpd, nme, ext = split_filename(tmp_infile) + + class spec3(nib.CommandLineInputSpec): + moo = nib.File(name_source=['doo'], hash_files=False, argstr="%s", + position=1, name_template='%s_mootpl') + poo = nib.File(name_source=['moo'], hash_files=False, + argstr="%s", position=2) + doo = nib.File(name_source=['poo'], hash_files=False, + argstr="%s", position=3) + + class TestCycle(nib.CommandLine): + _cmd = "mycommand" + input_spec = spec3 + + # Check that loop can be broken by setting one of the inputs + to1 = TestCycle() + to1.inputs.poo = tmp_infile + + not_raised = True + try: + res = to1.cmdline + except nib.NipypeInterfaceError: + not_raised = False + print(res) + + assert not_raised + assert '%s' % tmp_infile in res + assert '%s_generated' % nme in res + assert '%s_generated_mootpl' % nme in res + + +def test_TraitedSpec_withFile(setup_file): + tmp_infile = setup_file + tmpd, nme = os.path.split(tmp_infile) + assert os.path.exists(tmp_infile) + + class spec2(nib.TraitedSpec): + moo = nib.File(exists=True) + doo = nib.traits.List(nib.File(exists=True)) + infields = spec2(moo=tmp_infile, doo=[tmp_infile]) + hashval = infields.get_hashval(hash_method='content') + assert hashval[1] == 'a00e9ee24f5bfa9545a515b7a759886b' + + +def test_TraitedSpec_withNoFileHashing(setup_file): + tmp_infile = setup_file + tmpd, nme = os.path.split(tmp_infile) + assert os.path.exists(tmp_infile) + + class spec2(nib.TraitedSpec): + moo = nib.File(exists=True, hash_files=False) + doo = nib.traits.List(nib.File(exists=True)) + infields = spec2(moo=nme, doo=[tmp_infile]) + hashval = infields.get_hashval(hash_method='content') + assert hashval[1] == '8da4669ff5d72f670a46ea3e7a203215' + + class spec3(nib.TraitedSpec): + moo = nib.File(exists=True, name_source="doo") + doo = nib.traits.List(nib.File(exists=True)) + infields = spec3(moo=nme, doo=[tmp_infile]) + hashval1 = infields.get_hashval(hash_method='content') + + class spec4(nib.TraitedSpec): + moo = nib.File(exists=True) + doo = nib.traits.List(nib.File(exists=True)) + infields = spec4(moo=nme, doo=[tmp_infile]) + hashval2 = infields.get_hashval(hash_method='content') + assert hashval1[1] != hashval2[1] + + +def test_ImageFile(): + x = nib.BaseInterface().inputs + + # setup traits + x.add_trait('nifti', nib.ImageFile(types=['nifti1', 'dicom'])) + x.add_trait('anytype', nib.ImageFile()) + x.add_trait('newtype', nib.ImageFile(types=['nifti10'])) + x.add_trait('nocompress', nib.ImageFile(types=['mgh'], + allow_compressed=False)) + + with pytest.raises(nib.TraitError): + x.nifti = 'test.mgz' + x.nifti = 'test.nii' + x.anytype = 'test.xml' + with pytest.raises(AttributeError): + x.newtype = 'test.nii' + with pytest.raises(nib.TraitError): + x.nocompress = 'test.nii.gz' + x.nocompress = 'test.mgh' diff --git a/nipype/interfaces/base/tests/test_support.py b/nipype/interfaces/base/tests/test_support.py new file mode 100644 index 0000000000..81ac2853b7 --- /dev/null +++ b/nipype/interfaces/base/tests/test_support.py @@ -0,0 +1,64 @@ +# -*- coding: utf-8 -*- +# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- +# vi: set ft=python sts=4 ts=4 sw=4 et: +from __future__ import print_function, unicode_literals +import os +import pytest +from builtins import open +from future import standard_library + +from ...utils.filemanip import md5 +from .. import base as nib + +standard_library.install_aliases() + + +@pytest.mark.parametrize("args", [ + {}, + {'a': 1, 'b': [2, 3]} +]) +def test_bunch(args): + b = nib.Bunch(**args) + assert b.__dict__ == args + + +def test_bunch_attribute(): + b = nib.Bunch(a=1, b=[2, 3], c=None) + assert b.a == 1 + assert b.b == [2, 3] + assert b.c is None + + +def test_bunch_repr(): + b = nib.Bunch(b=2, c=3, a=dict(n=1, m=2)) + assert repr(b) == "Bunch(a={'m': 2, 'n': 1}, b=2, c=3)" + + +def test_bunch_methods(): + b = nib.Bunch(a=2) + b.update(a=3) + newb = b.dictcopy() + assert b.a == 3 + assert b.get('a') == 3 + assert b.get('badkey', 'otherthing') == 'otherthing' + assert b != newb + assert type(dict()) == type(newb) + assert newb['a'] == 3 + + +def test_bunch_hash(): + # NOTE: Since the path to the json file is included in the Bunch, + # the hash will be unique to each machine. + pth = os.path.split(os.path.abspath(__file__))[0] + json_pth = os.path.join(pth, 'realign_json.json') + b = nib.Bunch(infile=json_pth, + otherthing='blue', + yat=True) + newbdict, bhash = b._get_bunch_hash() + assert bhash == 'ddcc7b4ec5675df8cf317a48bd1857fa' + # Make sure the hash stored in the json file for `infile` is correct. + jshash = md5() + with open(json_pth, 'r') as fp: + jshash.update(fp.read().encode('utf-8')) + assert newbdict['infile'][0][1] == jshash.hexdigest() + assert newbdict['yat'] is True From 15cd86fd5e4dc6cb9c1020a6a565c6373afcb4fa Mon Sep 17 00:00:00 2001 From: oesteban Date: Mon, 4 Dec 2017 12:37:32 -0800 Subject: [PATCH 584/643] fix imports in new tests --- nipype/interfaces/base/tests/test_core.py | 13 ++++++------- .../interfaces/base/tests/test_resource_monitor.py | 8 ++++---- nipype/interfaces/base/tests/test_specs.py | 6 +++--- nipype/interfaces/base/tests/test_support.py | 4 ++-- 4 files changed, 15 insertions(+), 16 deletions(-) diff --git a/nipype/interfaces/base/tests/test_core.py b/nipype/interfaces/base/tests/test_core.py index 6deeb83eb9..47bb29af8c 100644 --- a/nipype/interfaces/base/tests/test_core.py +++ b/nipype/interfaces/base/tests/test_core.py @@ -9,10 +9,9 @@ import pytest -from ... import config -from ...testing import example_data -from .. import base as nib -from ..base import Undefined +from .... import config +from ....testing import example_data +from ... import base as nib standard_library.install_aliases() @@ -91,7 +90,7 @@ class DerivedInterface(nib.BaseInterface): assert DerivedInterface._get_filecopy_info()[0]['copy'] assert DerivedInterface._get_filecopy_info()[1]['key'] == 'zoo' assert not DerivedInterface._get_filecopy_info()[1]['copy'] - assert DerivedInterface().inputs.foo == Undefined + assert DerivedInterface().inputs.foo == nib.Undefined with pytest.raises(ValueError): DerivedInterface()._check_mandatory_inputs() assert DerivedInterface(goo=1)._check_mandatory_inputs() is None @@ -107,7 +106,7 @@ def _run_interface(self, runtime): return runtime assert DerivedInterface2.help() is None - assert DerivedInterface2()._outputs().foo == Undefined + assert DerivedInterface2()._outputs().foo == nib.Undefined with pytest.raises(NotImplementedError): DerivedInterface2(goo=1).run() @@ -295,7 +294,7 @@ def test_Commandline(): nib.CommandLine() ci = nib.CommandLine(command='which') assert ci.cmd == 'which' - assert ci.inputs.args == Undefined + assert ci.inputs.args == nib.Undefined ci2 = nib.CommandLine(command='which', args='ls') assert ci2.cmdline == 'which ls' ci3 = nib.CommandLine(command='echo') diff --git a/nipype/interfaces/base/tests/test_resource_monitor.py b/nipype/interfaces/base/tests/test_resource_monitor.py index a8b2b41a9e..88e71921c4 100644 --- a/nipype/interfaces/base/tests/test_resource_monitor.py +++ b/nipype/interfaces/base/tests/test_resource_monitor.py @@ -11,10 +11,10 @@ import pytest # Import packages -from nipype import config -from nipype.utils.profiler import _use_resources -from nipype.interfaces.base import traits, CommandLine, CommandLineInputSpec -from nipype.interfaces import utility as niu +from .... import config +from ....utils.profiler import _use_resources +from ...base import traits, CommandLine, CommandLineInputSpec +from ... import utility as niu # Try to enable the resource monitor config.enable_resource_monitor() diff --git a/nipype/interfaces/base/tests/test_specs.py b/nipype/interfaces/base/tests/test_specs.py index a168f44e3d..168e021339 100644 --- a/nipype/interfaces/base/tests/test_specs.py +++ b/nipype/interfaces/base/tests/test_specs.py @@ -8,9 +8,9 @@ import pytest -from ...utils.filemanip import split_filename -from .. import base as nib -from ..base import traits, Undefined +from ....utils.filemanip import split_filename +from ... import base as nib +from ...base import traits, Undefined standard_library.install_aliases() diff --git a/nipype/interfaces/base/tests/test_support.py b/nipype/interfaces/base/tests/test_support.py index 81ac2853b7..dc869e7c9b 100644 --- a/nipype/interfaces/base/tests/test_support.py +++ b/nipype/interfaces/base/tests/test_support.py @@ -7,8 +7,8 @@ from builtins import open from future import standard_library -from ...utils.filemanip import md5 -from .. import base as nib +from ....utils.filemanip import md5 +from ... import base as nib standard_library.install_aliases() From 50580aaeddc015e08fc0de6bde8cce4571860d00 Mon Sep 17 00:00:00 2001 From: oesteban Date: Mon, 4 Dec 2017 14:36:03 -0800 Subject: [PATCH 585/643] fix tests --- nipype/interfaces/base/tests/test_core.py | 10 ++++++++++ nipype/interfaces/base/tests/test_support.py | 6 ++++-- .../tests => testing/data}/realign_json.json | 0 setup.py | 2 +- 4 files changed, 15 insertions(+), 3 deletions(-) rename nipype/{interfaces/tests => testing/data}/realign_json.json (100%) diff --git a/nipype/interfaces/base/tests/test_core.py b/nipype/interfaces/base/tests/test_core.py index 47bb29af8c..1eb2cf4b42 100644 --- a/nipype/interfaces/base/tests/test_core.py +++ b/nipype/interfaces/base/tests/test_core.py @@ -66,6 +66,8 @@ def __init__(self): def test_BaseInterface(): + config.set('monitoring', 'enable', '0') + assert nib.BaseInterface.help() is None assert nib.BaseInterface._get_filecopy_info() == [] @@ -82,6 +84,7 @@ class OutputSpec(nib.TraitedSpec): class DerivedInterface(nib.BaseInterface): input_spec = InputSpec + resource_monitor = False assert DerivedInterface.help() is None assert 'moo' in ''.join(DerivedInterface._inputs_help()) @@ -252,6 +255,8 @@ class DerivedInterface1(nib.BaseInterface): input_spec = InputSpec output_spec = OutputSpec _version = '0.10' + resource_monitor = False + obj = DerivedInterface1() assert obj._check_version_requirements(obj._outputs()) == [] @@ -265,6 +270,8 @@ class DerivedInterface1(nib.BaseInterface): input_spec = InputSpec output_spec = OutputSpec _version = '0.10' + resource_monitor = False + obj = DerivedInterface1() assert obj._check_version_requirements(obj._outputs()) == ['foo'] @@ -278,6 +285,7 @@ class DerivedInterface1(nib.BaseInterface): input_spec = InputSpec output_spec = OutputSpec _version = '0.10' + resource_monitor = False def _run_interface(self, runtime): return runtime @@ -298,6 +306,7 @@ def test_Commandline(): ci2 = nib.CommandLine(command='which', args='ls') assert ci2.cmdline == 'which ls' ci3 = nib.CommandLine(command='echo') + ci3.resource_monitor = False ci3.inputs.environ = {'MYENV': 'foo'} res = ci3.run() assert res.runtime.environ['MYENV'] == 'foo' @@ -312,6 +321,7 @@ class CommandLineInputSpec1(nib.CommandLineInputSpec): noo = nib.traits.Int(argstr='-x %d', desc='an int') roo = nib.traits.Str(desc='not on command line') soo = nib.traits.Bool(argstr="-soo") + nib.CommandLine.input_spec = CommandLineInputSpec1 ci4 = nib.CommandLine(command='cmd') ci4.inputs.foo = 'foo' diff --git a/nipype/interfaces/base/tests/test_support.py b/nipype/interfaces/base/tests/test_support.py index dc869e7c9b..733501f5fd 100644 --- a/nipype/interfaces/base/tests/test_support.py +++ b/nipype/interfaces/base/tests/test_support.py @@ -6,6 +6,7 @@ import pytest from builtins import open from future import standard_library +from pkg_resources import resource_filename as pkgrf from ....utils.filemanip import md5 from ... import base as nib @@ -49,8 +50,9 @@ def test_bunch_methods(): def test_bunch_hash(): # NOTE: Since the path to the json file is included in the Bunch, # the hash will be unique to each machine. - pth = os.path.split(os.path.abspath(__file__))[0] - json_pth = os.path.join(pth, 'realign_json.json') + json_pth = pkgrf( + 'nipype', os.path.join('testing', 'data', 'realign_json.json')) + b = nib.Bunch(infile=json_pth, otherthing='blue', yat=True) diff --git a/nipype/interfaces/tests/realign_json.json b/nipype/testing/data/realign_json.json similarity index 100% rename from nipype/interfaces/tests/realign_json.json rename to nipype/testing/data/realign_json.json diff --git a/setup.py b/setup.py index 2972d7afce..012efd2722 100755 --- a/setup.py +++ b/setup.py @@ -103,11 +103,11 @@ def main(): pjoin('testing', 'data', 'brukerdir', 'fid'), pjoin('testing', 'data', 'brukerdir', 'pdata', '1', '*'), pjoin('testing', 'data', 'ds005', '*'), + pjoin('testing', 'data', 'realign_json.json'), pjoin('workflows', 'data', '*'), pjoin('pipeline', 'engine', 'report_template.html'), pjoin('external', 'd3.js'), pjoin('interfaces', 'fsl', 'model_templates', '*'), - pjoin('interfaces', 'tests', 'realign_json.json'), pjoin('interfaces', 'tests', 'use_resources'), 'pytest.ini', 'conftest.py', From 55127798aec5e7f45ae8e53215cfd8bf19c8a8f0 Mon Sep 17 00:00:00 2001 From: oesteban Date: Mon, 4 Dec 2017 16:10:57 -0800 Subject: [PATCH 586/643] update specs [skip ci] --- nipype/algorithms/tests/test_auto_ACompCor.py | 3 ++- nipype/algorithms/tests/test_auto_AddCSVRow.py | 3 ++- nipype/algorithms/tests/test_auto_ArtifactDetect.py | 3 ++- nipype/algorithms/tests/test_auto_CalculateMedian.py | 3 ++- nipype/algorithms/tests/test_auto_ComputeDVARS.py | 3 ++- nipype/algorithms/tests/test_auto_ComputeMeshWarp.py | 3 ++- nipype/algorithms/tests/test_auto_CreateNifti.py | 3 ++- nipype/algorithms/tests/test_auto_Distance.py | 3 ++- nipype/algorithms/tests/test_auto_FramewiseDisplacement.py | 3 ++- nipype/algorithms/tests/test_auto_FuzzyOverlap.py | 3 ++- nipype/algorithms/tests/test_auto_Gunzip.py | 3 ++- nipype/algorithms/tests/test_auto_ICC.py | 3 ++- nipype/algorithms/tests/test_auto_MeshWarpMaths.py | 3 ++- nipype/algorithms/tests/test_auto_ModifyAffine.py | 3 ++- nipype/algorithms/tests/test_auto_NonSteadyStateDetector.py | 3 ++- nipype/algorithms/tests/test_auto_P2PDistance.py | 3 ++- nipype/algorithms/tests/test_auto_PickAtlas.py | 3 ++- nipype/algorithms/tests/test_auto_Similarity.py | 3 ++- nipype/algorithms/tests/test_auto_SimpleThreshold.py | 3 ++- nipype/algorithms/tests/test_auto_SpecifyModel.py | 3 ++- nipype/algorithms/tests/test_auto_SpecifySPMModel.py | 3 ++- nipype/algorithms/tests/test_auto_SpecifySparseModel.py | 3 ++- nipype/algorithms/tests/test_auto_StimulusCorrelation.py | 3 ++- nipype/algorithms/tests/test_auto_TCompCor.py | 3 ++- nipype/algorithms/tests/test_auto_TVTKBaseInterface.py | 3 ++- nipype/algorithms/tests/test_auto_WarpPoints.py | 3 ++- nipype/interfaces/afni/tests/test_auto_ABoverlap.py | 3 ++- nipype/interfaces/afni/tests/test_auto_AFNICommand.py | 3 ++- nipype/interfaces/afni/tests/test_auto_AFNICommandBase.py | 3 ++- nipype/interfaces/afni/tests/test_auto_AFNIPythonCommand.py | 3 ++- nipype/interfaces/afni/tests/test_auto_AFNItoNIFTI.py | 3 ++- nipype/interfaces/afni/tests/test_auto_AlignEpiAnatPy.py | 3 ++- nipype/interfaces/afni/tests/test_auto_Allineate.py | 3 ++- nipype/interfaces/afni/tests/test_auto_AutoTLRC.py | 3 ++- nipype/interfaces/afni/tests/test_auto_AutoTcorrelate.py | 3 ++- nipype/interfaces/afni/tests/test_auto_Autobox.py | 3 ++- nipype/interfaces/afni/tests/test_auto_Automask.py | 3 ++- nipype/interfaces/afni/tests/test_auto_Axialize.py | 3 ++- nipype/interfaces/afni/tests/test_auto_Bandpass.py | 3 ++- nipype/interfaces/afni/tests/test_auto_BlurInMask.py | 3 ++- nipype/interfaces/afni/tests/test_auto_BlurToFWHM.py | 3 ++- nipype/interfaces/afni/tests/test_auto_BrickStat.py | 3 ++- nipype/interfaces/afni/tests/test_auto_Bucket.py | 3 ++- nipype/interfaces/afni/tests/test_auto_Calc.py | 3 ++- nipype/interfaces/afni/tests/test_auto_Cat.py | 3 ++- nipype/interfaces/afni/tests/test_auto_CatMatvec.py | 3 ++- nipype/interfaces/afni/tests/test_auto_CenterMass.py | 3 ++- nipype/interfaces/afni/tests/test_auto_ClipLevel.py | 3 ++- nipype/interfaces/afni/tests/test_auto_Copy.py | 3 ++- nipype/interfaces/afni/tests/test_auto_Deconvolve.py | 3 ++- nipype/interfaces/afni/tests/test_auto_DegreeCentrality.py | 3 ++- nipype/interfaces/afni/tests/test_auto_Despike.py | 3 ++- nipype/interfaces/afni/tests/test_auto_Detrend.py | 3 ++- nipype/interfaces/afni/tests/test_auto_Dot.py | 3 ++- nipype/interfaces/afni/tests/test_auto_ECM.py | 3 ++- nipype/interfaces/afni/tests/test_auto_Edge3.py | 3 ++- nipype/interfaces/afni/tests/test_auto_Eval.py | 3 ++- nipype/interfaces/afni/tests/test_auto_FWHMx.py | 3 ++- nipype/interfaces/afni/tests/test_auto_Fim.py | 3 ++- nipype/interfaces/afni/tests/test_auto_Fourier.py | 3 ++- nipype/interfaces/afni/tests/test_auto_GCOR.py | 3 ++- nipype/interfaces/afni/tests/test_auto_Hist.py | 3 ++- nipype/interfaces/afni/tests/test_auto_LFCD.py | 3 ++- nipype/interfaces/afni/tests/test_auto_MaskTool.py | 3 ++- nipype/interfaces/afni/tests/test_auto_Maskave.py | 3 ++- nipype/interfaces/afni/tests/test_auto_Means.py | 3 ++- nipype/interfaces/afni/tests/test_auto_Merge.py | 3 ++- nipype/interfaces/afni/tests/test_auto_Notes.py | 3 ++- nipype/interfaces/afni/tests/test_auto_NwarpApply.py | 3 ++- nipype/interfaces/afni/tests/test_auto_NwarpCat.py | 3 ++- nipype/interfaces/afni/tests/test_auto_OneDToolPy.py | 3 ++- nipype/interfaces/afni/tests/test_auto_OutlierCount.py | 3 ++- nipype/interfaces/afni/tests/test_auto_QualityIndex.py | 3 ++- nipype/interfaces/afni/tests/test_auto_Qwarp.py | 3 ++- nipype/interfaces/afni/tests/test_auto_QwarpPlusMinus.py | 3 ++- nipype/interfaces/afni/tests/test_auto_ROIStats.py | 3 ++- nipype/interfaces/afni/tests/test_auto_Refit.py | 3 ++- nipype/interfaces/afni/tests/test_auto_Remlfit.py | 3 ++- nipype/interfaces/afni/tests/test_auto_Resample.py | 3 ++- nipype/interfaces/afni/tests/test_auto_Retroicor.py | 3 ++- nipype/interfaces/afni/tests/test_auto_SVMTest.py | 3 ++- nipype/interfaces/afni/tests/test_auto_SVMTrain.py | 3 ++- nipype/interfaces/afni/tests/test_auto_Seg.py | 3 ++- nipype/interfaces/afni/tests/test_auto_SkullStrip.py | 3 ++- nipype/interfaces/afni/tests/test_auto_Synthesize.py | 3 ++- nipype/interfaces/afni/tests/test_auto_TCat.py | 3 ++- nipype/interfaces/afni/tests/test_auto_TCatSubBrick.py | 3 ++- nipype/interfaces/afni/tests/test_auto_TCorr1D.py | 3 ++- nipype/interfaces/afni/tests/test_auto_TCorrMap.py | 3 ++- nipype/interfaces/afni/tests/test_auto_TCorrelate.py | 3 ++- nipype/interfaces/afni/tests/test_auto_TNorm.py | 3 ++- nipype/interfaces/afni/tests/test_auto_TShift.py | 3 ++- nipype/interfaces/afni/tests/test_auto_TStat.py | 3 ++- nipype/interfaces/afni/tests/test_auto_To3D.py | 3 ++- nipype/interfaces/afni/tests/test_auto_Undump.py | 3 ++- nipype/interfaces/afni/tests/test_auto_Unifize.py | 3 ++- nipype/interfaces/afni/tests/test_auto_Volreg.py | 3 ++- nipype/interfaces/afni/tests/test_auto_Warp.py | 3 ++- nipype/interfaces/afni/tests/test_auto_ZCutUp.py | 3 ++- nipype/interfaces/afni/tests/test_auto_Zcat.py | 3 ++- nipype/interfaces/afni/tests/test_auto_Zeropad.py | 3 ++- nipype/interfaces/ants/tests/test_auto_ANTS.py | 3 ++- nipype/interfaces/ants/tests/test_auto_ANTSCommand.py | 3 ++- nipype/interfaces/ants/tests/test_auto_AffineInitializer.py | 3 ++- nipype/interfaces/ants/tests/test_auto_AntsJointFusion.py | 3 ++- nipype/interfaces/ants/tests/test_auto_ApplyTransforms.py | 3 ++- .../ants/tests/test_auto_ApplyTransformsToPoints.py | 3 ++- nipype/interfaces/ants/tests/test_auto_Atropos.py | 3 ++- .../ants/tests/test_auto_AverageAffineTransform.py | 3 ++- nipype/interfaces/ants/tests/test_auto_AverageImages.py | 3 ++- nipype/interfaces/ants/tests/test_auto_BrainExtraction.py | 3 ++- .../ants/tests/test_auto_ComposeMultiTransform.py | 3 ++- .../ants/tests/test_auto_ConvertScalarImageToRGB.py | 3 ++- nipype/interfaces/ants/tests/test_auto_CorticalThickness.py | 3 ++- .../ants/tests/test_auto_CreateJacobianDeterminantImage.py | 3 ++- nipype/interfaces/ants/tests/test_auto_CreateTiledMosaic.py | 3 ++- nipype/interfaces/ants/tests/test_auto_DenoiseImage.py | 3 ++- nipype/interfaces/ants/tests/test_auto_GenWarpFields.py | 3 ++- nipype/interfaces/ants/tests/test_auto_JointFusion.py | 3 ++- nipype/interfaces/ants/tests/test_auto_KellyKapowski.py | 3 ++- .../interfaces/ants/tests/test_auto_LaplacianThickness.py | 3 ++- .../ants/tests/test_auto_MeasureImageSimilarity.py | 3 ++- nipype/interfaces/ants/tests/test_auto_MultiplyImages.py | 3 ++- .../ants/tests/test_auto_N4BiasFieldCorrection.py | 3 ++- nipype/interfaces/ants/tests/test_auto_Registration.py | 3 ++- .../ants/tests/test_auto_WarpImageMultiTransform.py | 3 ++- .../tests/test_auto_WarpTimeSeriesImageMultiTransform.py | 3 ++- .../interfaces/ants/tests/test_auto_antsBrainExtraction.py | 3 ++- .../ants/tests/test_auto_antsCorticalThickness.py | 3 ++- nipype/interfaces/ants/tests/test_auto_antsIntroduction.py | 3 ++- .../ants/tests/test_auto_buildtemplateparallel.py | 3 ++- nipype/interfaces/brainsuite/tests/test_auto_BDP.py | 3 ++- nipype/interfaces/brainsuite/tests/test_auto_Bfc.py | 3 ++- nipype/interfaces/brainsuite/tests/test_auto_Bse.py | 3 ++- nipype/interfaces/brainsuite/tests/test_auto_Cerebro.py | 3 ++- nipype/interfaces/brainsuite/tests/test_auto_Cortex.py | 3 ++- nipype/interfaces/brainsuite/tests/test_auto_Dewisp.py | 3 ++- nipype/interfaces/brainsuite/tests/test_auto_Dfs.py | 3 ++- nipype/interfaces/brainsuite/tests/test_auto_Hemisplit.py | 3 ++- nipype/interfaces/brainsuite/tests/test_auto_Pialmesh.py | 3 ++- nipype/interfaces/brainsuite/tests/test_auto_Pvc.py | 3 ++- nipype/interfaces/brainsuite/tests/test_auto_SVReg.py | 3 ++- nipype/interfaces/brainsuite/tests/test_auto_Scrubmask.py | 3 ++- nipype/interfaces/brainsuite/tests/test_auto_Skullfinder.py | 3 ++- nipype/interfaces/brainsuite/tests/test_auto_Tca.py | 3 ++- .../interfaces/brainsuite/tests/test_auto_ThicknessPVC.py | 3 ++- nipype/interfaces/camino/tests/test_auto_AnalyzeHeader.py | 3 ++- .../interfaces/camino/tests/test_auto_ComputeEigensystem.py | 3 ++- .../camino/tests/test_auto_ComputeFractionalAnisotropy.py | 3 ++- .../camino/tests/test_auto_ComputeMeanDiffusivity.py | 3 ++- .../interfaces/camino/tests/test_auto_ComputeTensorTrace.py | 3 ++- nipype/interfaces/camino/tests/test_auto_Conmat.py | 3 ++- nipype/interfaces/camino/tests/test_auto_DT2NIfTI.py | 3 ++- nipype/interfaces/camino/tests/test_auto_DTIFit.py | 3 ++- nipype/interfaces/camino/tests/test_auto_DTLUTGen.py | 3 ++- nipype/interfaces/camino/tests/test_auto_DTMetric.py | 3 ++- nipype/interfaces/camino/tests/test_auto_FSL2Scheme.py | 3 ++- nipype/interfaces/camino/tests/test_auto_Image2Voxel.py | 3 ++- nipype/interfaces/camino/tests/test_auto_ImageStats.py | 3 ++- nipype/interfaces/camino/tests/test_auto_LinRecon.py | 3 ++- nipype/interfaces/camino/tests/test_auto_MESD.py | 3 ++- nipype/interfaces/camino/tests/test_auto_ModelFit.py | 3 ++- nipype/interfaces/camino/tests/test_auto_NIfTIDT2Camino.py | 3 ++- nipype/interfaces/camino/tests/test_auto_PicoPDFs.py | 3 ++- nipype/interfaces/camino/tests/test_auto_ProcStreamlines.py | 3 ++- nipype/interfaces/camino/tests/test_auto_QBallMX.py | 3 ++- nipype/interfaces/camino/tests/test_auto_SFLUTGen.py | 3 ++- nipype/interfaces/camino/tests/test_auto_SFPICOCalibData.py | 3 ++- nipype/interfaces/camino/tests/test_auto_SFPeaks.py | 3 ++- nipype/interfaces/camino/tests/test_auto_Shredder.py | 3 ++- nipype/interfaces/camino/tests/test_auto_Track.py | 3 ++- nipype/interfaces/camino/tests/test_auto_TrackBallStick.py | 3 ++- nipype/interfaces/camino/tests/test_auto_TrackBayesDirac.py | 3 ++- .../interfaces/camino/tests/test_auto_TrackBedpostxDeter.py | 3 ++- .../interfaces/camino/tests/test_auto_TrackBedpostxProba.py | 3 ++- nipype/interfaces/camino/tests/test_auto_TrackBootstrap.py | 3 ++- nipype/interfaces/camino/tests/test_auto_TrackDT.py | 3 ++- nipype/interfaces/camino/tests/test_auto_TrackPICo.py | 3 ++- nipype/interfaces/camino/tests/test_auto_TractShredder.py | 3 ++- nipype/interfaces/camino/tests/test_auto_VtkStreamlines.py | 3 ++- .../camino2trackvis/tests/test_auto_Camino2Trackvis.py | 3 ++- .../camino2trackvis/tests/test_auto_Trackvis2Camino.py | 3 ++- nipype/interfaces/cmtk/tests/test_auto_AverageNetworks.py | 3 ++- nipype/interfaces/cmtk/tests/test_auto_CFFConverter.py | 3 ++- nipype/interfaces/cmtk/tests/test_auto_CreateNodes.py | 3 ++- nipype/interfaces/cmtk/tests/test_auto_MergeCNetworks.py | 3 ++- .../cmtk/tests/test_auto_NetworkBasedStatistic.py | 3 ++- nipype/interfaces/cmtk/tests/test_auto_NetworkXMetrics.py | 3 ++- nipype/interfaces/cmtk/tests/test_auto_Parcellate.py | 3 ++- nipype/interfaces/cmtk/tests/test_auto_ROIGen.py | 3 ++- .../diffusion_toolkit/tests/test_auto_DTIRecon.py | 3 ++- .../diffusion_toolkit/tests/test_auto_DTITracker.py | 3 ++- .../diffusion_toolkit/tests/test_auto_HARDIMat.py | 3 ++- .../diffusion_toolkit/tests/test_auto_ODFRecon.py | 3 ++- .../diffusion_toolkit/tests/test_auto_ODFTracker.py | 3 ++- .../diffusion_toolkit/tests/test_auto_SplineFilter.py | 3 ++- .../diffusion_toolkit/tests/test_auto_TrackMerge.py | 3 ++- nipype/interfaces/dipy/tests/test_auto_APMQball.py | 3 ++- nipype/interfaces/dipy/tests/test_auto_CSD.py | 3 ++- nipype/interfaces/dipy/tests/test_auto_DTI.py | 3 ++- nipype/interfaces/dipy/tests/test_auto_DipyBaseInterface.py | 3 ++- .../dipy/tests/test_auto_DipyDiffusionInterface.py | 3 ++- .../interfaces/dipy/tests/test_auto_EstimateResponseSH.py | 3 ++- nipype/interfaces/dipy/tests/test_auto_RESTORE.py | 3 ++- .../interfaces/dipy/tests/test_auto_SimulateMultiTensor.py | 3 ++- .../dipy/tests/test_auto_StreamlineTractography.py | 3 ++- nipype/interfaces/dipy/tests/test_auto_TensorMode.py | 3 ++- nipype/interfaces/dipy/tests/test_auto_TrackDensityMap.py | 3 ++- nipype/interfaces/elastix/tests/test_auto_AnalyzeWarp.py | 3 ++- nipype/interfaces/elastix/tests/test_auto_ApplyWarp.py | 3 ++- nipype/interfaces/elastix/tests/test_auto_EditTransform.py | 3 ++- nipype/interfaces/elastix/tests/test_auto_PointsWarp.py | 3 ++- nipype/interfaces/elastix/tests/test_auto_Registration.py | 3 ++- .../freesurfer/tests/test_auto_AddXFormToHeader.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_Aparc2Aseg.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_Apas2Aseg.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_ApplyMask.py | 3 ++- .../freesurfer/tests/test_auto_ApplyVolTransform.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_Binarize.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_CALabel.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_CANormalize.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_CARegister.py | 3 ++- .../freesurfer/tests/test_auto_CheckTalairachAlignment.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_Concatenate.py | 3 ++- .../interfaces/freesurfer/tests/test_auto_ConcatenateLTA.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_Contrast.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_Curvature.py | 3 ++- .../interfaces/freesurfer/tests/test_auto_CurvatureStats.py | 3 ++- .../interfaces/freesurfer/tests/test_auto_DICOMConvert.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_EMRegister.py | 3 ++- .../interfaces/freesurfer/tests/test_auto_EditWMwithAseg.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_EulerNumber.py | 3 ++- .../freesurfer/tests/test_auto_ExtractMainComponent.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_FSCommand.py | 3 ++- .../freesurfer/tests/test_auto_FSCommandOpenMP.py | 3 ++- .../freesurfer/tests/test_auto_FSScriptCommand.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_FitMSParams.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_FixTopology.py | 3 ++- .../freesurfer/tests/test_auto_FuseSegmentations.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_GLMFit.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_ImageInfo.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_Jacobian.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_LTAConvert.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_Label2Annot.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_Label2Label.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_Label2Vol.py | 3 ++- .../freesurfer/tests/test_auto_MNIBiasCorrection.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_MPRtoMNI305.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_MRIConvert.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_MRICoreg.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_MRIFill.py | 3 ++- .../freesurfer/tests/test_auto_MRIMarchingCubes.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_MRIPretess.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_MRISPreproc.py | 3 ++- .../freesurfer/tests/test_auto_MRISPreprocReconAll.py | 3 ++- .../interfaces/freesurfer/tests/test_auto_MRITessellate.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_MRIsCALabel.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_MRIsCalc.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_MRIsCombine.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_MRIsConvert.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_MRIsExpand.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_MRIsInflate.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_MS_LDA.py | 3 ++- .../freesurfer/tests/test_auto_MakeAverageSubject.py | 3 ++- .../interfaces/freesurfer/tests/test_auto_MakeSurfaces.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_Normalize.py | 3 ++- .../interfaces/freesurfer/tests/test_auto_OneSampleTTest.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_Paint.py | 3 ++- .../freesurfer/tests/test_auto_ParcellationStats.py | 3 ++- .../interfaces/freesurfer/tests/test_auto_ParseDICOMDir.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_ReconAll.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_Register.py | 3 ++- .../freesurfer/tests/test_auto_RegisterAVItoTalairach.py | 3 ++- .../freesurfer/tests/test_auto_RelabelHypointensities.py | 3 ++- .../freesurfer/tests/test_auto_RemoveIntersection.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_RemoveNeck.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_Resample.py | 3 ++- .../interfaces/freesurfer/tests/test_auto_RobustRegister.py | 3 ++- .../interfaces/freesurfer/tests/test_auto_RobustTemplate.py | 3 ++- .../freesurfer/tests/test_auto_SampleToSurface.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_SegStats.py | 3 ++- .../freesurfer/tests/test_auto_SegStatsReconAll.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_SegmentCC.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_SegmentWM.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_Smooth.py | 3 ++- .../freesurfer/tests/test_auto_SmoothTessellation.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_Sphere.py | 3 ++- .../freesurfer/tests/test_auto_SphericalAverage.py | 3 ++- .../freesurfer/tests/test_auto_Surface2VolTransform.py | 3 ++- .../interfaces/freesurfer/tests/test_auto_SurfaceSmooth.py | 3 ++- .../freesurfer/tests/test_auto_SurfaceSnapshots.py | 3 ++- .../freesurfer/tests/test_auto_SurfaceTransform.py | 3 ++- .../freesurfer/tests/test_auto_SynthesizeFLASH.py | 3 ++- .../interfaces/freesurfer/tests/test_auto_TalairachAVI.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_TalairachQC.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_Tkregister2.py | 3 ++- .../freesurfer/tests/test_auto_UnpackSDICOMDir.py | 3 ++- nipype/interfaces/freesurfer/tests/test_auto_VolumeMask.py | 3 ++- .../freesurfer/tests/test_auto_WatershedSkullStrip.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_AR1Image.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_AccuracyTester.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_ApplyMask.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_ApplyTOPUP.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_ApplyWarp.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_ApplyXFM.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_AvScale.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_B0Calc.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_BEDPOSTX5.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_BET.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_BinaryMaths.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_ChangeDataType.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_Classifier.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_Cleaner.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_Cluster.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_Complex.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_ContrastMgr.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_ConvertWarp.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_ConvertXFM.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_CopyGeom.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_DTIFit.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_DilateImage.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_DistanceMap.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_DualRegression.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_EPIDeWarp.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_Eddy.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_EddyCorrect.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_EpiReg.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_ErodeImage.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_ExtractROI.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_FAST.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_FEAT.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_FEATModel.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_FEATRegister.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_FIRST.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_FLAMEO.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_FLIRT.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_FNIRT.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_FSLCommand.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_FSLXCommand.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_FUGUE.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_FeatureExtractor.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_FilterRegressor.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_FindTheBiggest.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_GLM.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_ICA_AROMA.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_ImageMaths.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_ImageMeants.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_ImageStats.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_InvWarp.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_IsotropicSmooth.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_L2Model.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_Level1Design.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_MCFLIRT.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_MELODIC.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_MakeDyadicVectors.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_MathsCommand.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_MaxImage.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_MaxnImage.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_MeanImage.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_MedianImage.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_Merge.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_MinImage.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_MotionOutliers.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_MultiImageMaths.py | 3 ++- .../interfaces/fsl/tests/test_auto_MultipleRegressDesign.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_Overlay.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_PRELUDE.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_PercentileImage.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_PlotMotionParams.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_PlotTimeSeries.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_PowerSpectrum.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_PrepareFieldmap.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_ProbTrackX.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_ProbTrackX2.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_ProjThresh.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_Randomise.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_Reorient2Std.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_RobustFOV.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_SMM.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_SUSAN.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_SigLoss.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_SliceTimer.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_Slicer.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_Smooth.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_SmoothEstimate.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_SpatialFilter.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_Split.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_StdImage.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_SwapDimensions.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_TOPUP.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_TemporalFilter.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_Threshold.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_TractSkeleton.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_Training.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_TrainingSetCreator.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_UnaryMaths.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_VecReg.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_WarpPoints.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_WarpPointsFromStd.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_WarpPointsToStd.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_WarpUtils.py | 3 ++- nipype/interfaces/fsl/tests/test_auto_XFibres5.py | 3 ++- nipype/interfaces/minc/tests/test_auto_Average.py | 3 ++- nipype/interfaces/minc/tests/test_auto_BBox.py | 3 ++- nipype/interfaces/minc/tests/test_auto_Beast.py | 3 ++- nipype/interfaces/minc/tests/test_auto_BestLinReg.py | 3 ++- nipype/interfaces/minc/tests/test_auto_BigAverage.py | 3 ++- nipype/interfaces/minc/tests/test_auto_Blob.py | 3 ++- nipype/interfaces/minc/tests/test_auto_Blur.py | 3 ++- nipype/interfaces/minc/tests/test_auto_Calc.py | 3 ++- nipype/interfaces/minc/tests/test_auto_Convert.py | 3 ++- nipype/interfaces/minc/tests/test_auto_Copy.py | 3 ++- nipype/interfaces/minc/tests/test_auto_Dump.py | 3 ++- nipype/interfaces/minc/tests/test_auto_Extract.py | 3 ++- nipype/interfaces/minc/tests/test_auto_Gennlxfm.py | 3 ++- nipype/interfaces/minc/tests/test_auto_Math.py | 3 ++- nipype/interfaces/minc/tests/test_auto_NlpFit.py | 3 ++- nipype/interfaces/minc/tests/test_auto_Norm.py | 3 ++- nipype/interfaces/minc/tests/test_auto_Pik.py | 3 ++- nipype/interfaces/minc/tests/test_auto_Resample.py | 3 ++- nipype/interfaces/minc/tests/test_auto_Reshape.py | 3 ++- nipype/interfaces/minc/tests/test_auto_ToEcat.py | 3 ++- nipype/interfaces/minc/tests/test_auto_ToRaw.py | 3 ++- nipype/interfaces/minc/tests/test_auto_VolSymm.py | 3 ++- nipype/interfaces/minc/tests/test_auto_Volcentre.py | 3 ++- nipype/interfaces/minc/tests/test_auto_Voliso.py | 3 ++- nipype/interfaces/minc/tests/test_auto_Volpad.py | 3 ++- nipype/interfaces/minc/tests/test_auto_XfmAvg.py | 3 ++- nipype/interfaces/minc/tests/test_auto_XfmConcat.py | 3 ++- nipype/interfaces/minc/tests/test_auto_XfmInvert.py | 3 ++- .../mipav/tests/test_auto_JistBrainMgdmSegmentation.py | 3 ++- .../mipav/tests/test_auto_JistBrainMp2rageDuraEstimation.py | 3 ++- .../mipav/tests/test_auto_JistBrainMp2rageSkullStripping.py | 3 ++- .../mipav/tests/test_auto_JistBrainPartialVolumeFilter.py | 3 ++- .../mipav/tests/test_auto_JistCortexSurfaceMeshInflation.py | 3 ++- .../mipav/tests/test_auto_JistIntensityMp2rageMasking.py | 3 ++- .../mipav/tests/test_auto_JistLaminarProfileCalculator.py | 3 ++- .../mipav/tests/test_auto_JistLaminarProfileGeometry.py | 3 ++- .../mipav/tests/test_auto_JistLaminarProfileSampling.py | 3 ++- .../mipav/tests/test_auto_JistLaminarROIAveraging.py | 3 ++- .../mipav/tests/test_auto_JistLaminarVolumetricLayering.py | 3 ++- .../mipav/tests/test_auto_MedicAlgorithmImageCalculator.py | 3 ++- .../mipav/tests/test_auto_MedicAlgorithmLesionToads.py | 3 ++- .../mipav/tests/test_auto_MedicAlgorithmMipavReorient.py | 3 ++- nipype/interfaces/mipav/tests/test_auto_MedicAlgorithmN3.py | 3 ++- .../mipav/tests/test_auto_MedicAlgorithmSPECTRE2010.py | 3 ++- .../tests/test_auto_MedicAlgorithmThresholdToBinaryMask.py | 3 ++- nipype/interfaces/mipav/tests/test_auto_RandomVol.py | 3 ++- nipype/interfaces/mne/tests/test_auto_WatershedBEM.py | 3 ++- .../tests/test_auto_ConstrainedSphericalDeconvolution.py | 3 ++- .../mrtrix/tests/test_auto_DWI2SphericalHarmonicsImage.py | 3 ++- nipype/interfaces/mrtrix/tests/test_auto_DWI2Tensor.py | 3 ++- .../tests/test_auto_DiffusionTensorStreamlineTrack.py | 3 ++- .../mrtrix/tests/test_auto_Directions2Amplitude.py | 3 ++- nipype/interfaces/mrtrix/tests/test_auto_Erode.py | 3 ++- .../mrtrix/tests/test_auto_EstimateResponseForSH.py | 3 ++- nipype/interfaces/mrtrix/tests/test_auto_FilterTracks.py | 3 ++- nipype/interfaces/mrtrix/tests/test_auto_FindShPeaks.py | 3 ++- .../interfaces/mrtrix/tests/test_auto_GenerateDirections.py | 3 ++- .../mrtrix/tests/test_auto_GenerateWhiteMatterMask.py | 3 ++- nipype/interfaces/mrtrix/tests/test_auto_MRConvert.py | 3 ++- nipype/interfaces/mrtrix/tests/test_auto_MRMultiply.py | 3 ++- nipype/interfaces/mrtrix/tests/test_auto_MRTransform.py | 3 ++- nipype/interfaces/mrtrix/tests/test_auto_MRTrixInfo.py | 3 ++- nipype/interfaces/mrtrix/tests/test_auto_MRTrixViewer.py | 3 ++- nipype/interfaces/mrtrix/tests/test_auto_MedianFilter3D.py | 3 ++- ...o_ProbabilisticSphericallyDeconvolutedStreamlineTrack.py | 3 ++- .../test_auto_SphericallyDeconvolutedStreamlineTrack.py | 3 ++- nipype/interfaces/mrtrix/tests/test_auto_StreamlineTrack.py | 3 ++- .../mrtrix/tests/test_auto_Tensor2ApparentDiffusion.py | 3 ++- .../mrtrix/tests/test_auto_Tensor2FractionalAnisotropy.py | 3 ++- nipype/interfaces/mrtrix/tests/test_auto_Tensor2Vector.py | 3 ++- nipype/interfaces/mrtrix/tests/test_auto_Threshold.py | 3 ++- nipype/interfaces/mrtrix/tests/test_auto_Tracks2Prob.py | 3 ++- nipype/interfaces/mrtrix3/tests/test_auto_ACTPrepareFSL.py | 3 ++- nipype/interfaces/mrtrix3/tests/test_auto_BrainMask.py | 3 ++- .../interfaces/mrtrix3/tests/test_auto_BuildConnectome.py | 3 ++- nipype/interfaces/mrtrix3/tests/test_auto_ComputeTDI.py | 3 ++- nipype/interfaces/mrtrix3/tests/test_auto_EstimateFOD.py | 3 ++- nipype/interfaces/mrtrix3/tests/test_auto_FitTensor.py | 3 ++- nipype/interfaces/mrtrix3/tests/test_auto_Generate5tt.py | 3 ++- nipype/interfaces/mrtrix3/tests/test_auto_LabelConfig.py | 3 ++- nipype/interfaces/mrtrix3/tests/test_auto_MRTrix3Base.py | 3 ++- nipype/interfaces/mrtrix3/tests/test_auto_Mesh2PVE.py | 3 ++- .../mrtrix3/tests/test_auto_ReplaceFSwithFIRST.py | 3 ++- nipype/interfaces/mrtrix3/tests/test_auto_ResponseSD.py | 3 ++- nipype/interfaces/mrtrix3/tests/test_auto_TCK2VTK.py | 3 ++- nipype/interfaces/mrtrix3/tests/test_auto_TensorMetrics.py | 3 ++- nipype/interfaces/mrtrix3/tests/test_auto_Tractography.py | 3 ++- nipype/interfaces/niftyfit/tests/test_auto_DwiTool.py | 3 ++- nipype/interfaces/niftyfit/tests/test_auto_FitAsl.py | 3 ++- nipype/interfaces/niftyfit/tests/test_auto_FitDwi.py | 3 ++- nipype/interfaces/niftyfit/tests/test_auto_FitQt1.py | 3 ++- .../interfaces/niftyfit/tests/test_auto_NiftyFitCommand.py | 3 ++- .../interfaces/niftyreg/tests/test_auto_NiftyRegCommand.py | 3 ++- nipype/interfaces/niftyreg/tests/test_auto_RegAladin.py | 3 ++- nipype/interfaces/niftyreg/tests/test_auto_RegAverage.py | 3 ++- nipype/interfaces/niftyreg/tests/test_auto_RegF3D.py | 3 ++- nipype/interfaces/niftyreg/tests/test_auto_RegJacobian.py | 3 ++- nipype/interfaces/niftyreg/tests/test_auto_RegMeasure.py | 3 ++- nipype/interfaces/niftyreg/tests/test_auto_RegResample.py | 3 ++- nipype/interfaces/niftyreg/tests/test_auto_RegTools.py | 3 ++- nipype/interfaces/niftyreg/tests/test_auto_RegTransform.py | 3 ++- nipype/interfaces/niftyseg/tests/test_auto_BinaryMaths.py | 3 ++- .../niftyseg/tests/test_auto_BinaryMathsInteger.py | 3 ++- nipype/interfaces/niftyseg/tests/test_auto_BinaryStats.py | 3 ++- nipype/interfaces/niftyseg/tests/test_auto_CalcTopNCC.py | 3 ++- nipype/interfaces/niftyseg/tests/test_auto_EM.py | 3 ++- nipype/interfaces/niftyseg/tests/test_auto_FillLesions.py | 3 ++- nipype/interfaces/niftyseg/tests/test_auto_LabelFusion.py | 3 ++- nipype/interfaces/niftyseg/tests/test_auto_MathsCommand.py | 3 ++- nipype/interfaces/niftyseg/tests/test_auto_Merge.py | 3 ++- .../interfaces/niftyseg/tests/test_auto_NiftySegCommand.py | 3 ++- nipype/interfaces/niftyseg/tests/test_auto_StatsCommand.py | 3 ++- nipype/interfaces/niftyseg/tests/test_auto_TupleMaths.py | 3 ++- nipype/interfaces/niftyseg/tests/test_auto_UnaryMaths.py | 3 ++- nipype/interfaces/niftyseg/tests/test_auto_UnaryStats.py | 3 ++- nipype/interfaces/nipy/tests/test_auto_ComputeMask.py | 3 ++- nipype/interfaces/nipy/tests/test_auto_EstimateContrast.py | 3 ++- nipype/interfaces/nipy/tests/test_auto_FitGLM.py | 3 ++- nipype/interfaces/nipy/tests/test_auto_FmriRealign4d.py | 3 ++- nipype/interfaces/nipy/tests/test_auto_Similarity.py | 3 ++- .../interfaces/nipy/tests/test_auto_SpaceTimeRealigner.py | 3 ++- nipype/interfaces/nipy/tests/test_auto_Trim.py | 3 ++- .../interfaces/nitime/tests/test_auto_CoherenceAnalyzer.py | 3 ++- .../tests/test_auto_BRAINSPosteriorToContinuousClass.py | 3 ++- .../semtools/brains/tests/test_auto_BRAINSTalairach.py | 3 ++- .../semtools/brains/tests/test_auto_BRAINSTalairachMask.py | 3 ++- .../semtools/brains/tests/test_auto_GenerateEdgeMapImage.py | 3 ++- .../semtools/brains/tests/test_auto_GeneratePurePlugMask.py | 3 ++- .../brains/tests/test_auto_HistogramMatchingFilter.py | 3 ++- .../semtools/brains/tests/test_auto_SimilarityIndex.py | 3 ++- .../semtools/diffusion/tests/test_auto_DWIConvert.py | 3 ++- .../diffusion/tests/test_auto_compareTractInclusion.py | 3 ++- .../semtools/diffusion/tests/test_auto_dtiaverage.py | 3 ++- .../semtools/diffusion/tests/test_auto_dtiestim.py | 3 ++- .../semtools/diffusion/tests/test_auto_dtiprocess.py | 3 ++- .../diffusion/tests/test_auto_extractNrrdVectorIndex.py | 3 ++- .../diffusion/tests/test_auto_gtractAnisotropyMap.py | 3 ++- .../diffusion/tests/test_auto_gtractAverageBvalues.py | 3 ++- .../diffusion/tests/test_auto_gtractClipAnisotropy.py | 3 ++- .../diffusion/tests/test_auto_gtractCoRegAnatomy.py | 3 ++- .../semtools/diffusion/tests/test_auto_gtractConcatDwi.py | 3 ++- .../diffusion/tests/test_auto_gtractCopyImageOrientation.py | 3 ++- .../diffusion/tests/test_auto_gtractCoregBvalues.py | 3 ++- .../diffusion/tests/test_auto_gtractCostFastMarching.py | 3 ++- .../diffusion/tests/test_auto_gtractCreateGuideFiber.py | 3 ++- .../diffusion/tests/test_auto_gtractFastMarchingTracking.py | 3 ++- .../diffusion/tests/test_auto_gtractFiberTracking.py | 3 ++- .../diffusion/tests/test_auto_gtractImageConformity.py | 3 ++- .../tests/test_auto_gtractInvertBSplineTransform.py | 3 ++- .../tests/test_auto_gtractInvertDisplacementField.py | 3 ++- .../diffusion/tests/test_auto_gtractInvertRigidTransform.py | 3 ++- .../diffusion/tests/test_auto_gtractResampleAnisotropy.py | 3 ++- .../semtools/diffusion/tests/test_auto_gtractResampleB0.py | 3 ++- .../diffusion/tests/test_auto_gtractResampleCodeImage.py | 3 ++- .../diffusion/tests/test_auto_gtractResampleDWIInPlace.py | 3 ++- .../diffusion/tests/test_auto_gtractResampleFibers.py | 3 ++- .../semtools/diffusion/tests/test_auto_gtractTensor.py | 3 ++- .../tests/test_auto_gtractTransformToDisplacementField.py | 3 ++- .../semtools/diffusion/tests/test_auto_maxcurvature.py | 3 ++- .../tractography/tests/test_auto_UKFTractography.py | 3 ++- .../diffusion/tractography/tests/test_auto_fiberprocess.py | 3 ++- .../diffusion/tractography/tests/test_auto_fiberstats.py | 3 ++- .../diffusion/tractography/tests/test_auto_fibertrack.py | 3 ++- .../semtools/filtering/tests/test_auto_CannyEdge.py | 3 ++- .../tests/test_auto_CannySegmentationLevelSetImageFilter.py | 3 ++- .../semtools/filtering/tests/test_auto_DilateImage.py | 3 ++- .../semtools/filtering/tests/test_auto_DilateMask.py | 3 ++- .../semtools/filtering/tests/test_auto_DistanceMaps.py | 3 ++- .../filtering/tests/test_auto_DumpBinaryTrainingVectors.py | 3 ++- .../semtools/filtering/tests/test_auto_ErodeImage.py | 3 ++- .../semtools/filtering/tests/test_auto_FlippedDifference.py | 3 ++- .../filtering/tests/test_auto_GenerateBrainClippedImage.py | 3 ++- .../tests/test_auto_GenerateSummedGradientImage.py | 3 ++- .../semtools/filtering/tests/test_auto_GenerateTestImage.py | 3 ++- .../test_auto_GradientAnisotropicDiffusionImageFilter.py | 3 ++- .../filtering/tests/test_auto_HammerAttributeCreator.py | 3 ++- .../semtools/filtering/tests/test_auto_NeighborhoodMean.py | 3 ++- .../filtering/tests/test_auto_NeighborhoodMedian.py | 3 ++- .../semtools/filtering/tests/test_auto_STAPLEAnalysis.py | 3 ++- .../tests/test_auto_TextureFromNoiseImageFilter.py | 3 ++- .../filtering/tests/test_auto_TextureMeasureFilter.py | 3 ++- .../filtering/tests/test_auto_UnbiasedNonLocalMeans.py | 3 ++- .../semtools/legacy/tests/test_auto_scalartransform.py | 3 ++- .../registration/tests/test_auto_BRAINSDemonWarp.py | 3 ++- .../semtools/registration/tests/test_auto_BRAINSFit.py | 3 ++- .../semtools/registration/tests/test_auto_BRAINSResample.py | 3 ++- .../semtools/registration/tests/test_auto_BRAINSResize.py | 3 ++- .../tests/test_auto_BRAINSTransformFromFiducials.py | 3 ++- .../registration/tests/test_auto_VBRAINSDemonWarp.py | 3 ++- .../semtools/segmentation/tests/test_auto_BRAINSABC.py | 3 ++- .../tests/test_auto_BRAINSConstellationDetector.py | 3 ++- .../test_auto_BRAINSCreateLabelMapFromProbabilityMaps.py | 3 ++- .../semtools/segmentation/tests/test_auto_BRAINSCut.py | 3 ++- .../segmentation/tests/test_auto_BRAINSMultiSTAPLE.py | 3 ++- .../semtools/segmentation/tests/test_auto_BRAINSROIAuto.py | 3 ++- .../tests/test_auto_BinaryMaskEditorBasedOnLandmarks.py | 3 ++- .../semtools/segmentation/tests/test_auto_ESLR.py | 3 ++- nipype/interfaces/semtools/tests/test_auto_DWICompare.py | 3 ++- .../interfaces/semtools/tests/test_auto_DWISimpleCompare.py | 3 ++- .../test_auto_GenerateCsfClippedFromClassifiedImage.py | 3 ++- .../semtools/utilities/tests/test_auto_BRAINSAlignMSP.py | 3 ++- .../utilities/tests/test_auto_BRAINSClipInferior.py | 3 ++- .../utilities/tests/test_auto_BRAINSConstellationModeler.py | 3 ++- .../semtools/utilities/tests/test_auto_BRAINSEyeDetector.py | 3 ++- .../tests/test_auto_BRAINSInitializedControlPoints.py | 3 ++- .../utilities/tests/test_auto_BRAINSLandmarkInitializer.py | 3 ++- .../utilities/tests/test_auto_BRAINSLinearModelerEPCA.py | 3 ++- .../utilities/tests/test_auto_BRAINSLmkTransform.py | 3 ++- .../semtools/utilities/tests/test_auto_BRAINSMush.py | 3 ++- .../utilities/tests/test_auto_BRAINSSnapShotWriter.py | 3 ++- .../utilities/tests/test_auto_BRAINSTransformConvert.py | 3 ++- .../tests/test_auto_BRAINSTrimForegroundInDirection.py | 3 ++- .../utilities/tests/test_auto_CleanUpOverlapLabels.py | 3 ++- .../semtools/utilities/tests/test_auto_FindCenterOfBrain.py | 3 ++- .../tests/test_auto_GenerateLabelMapFromProbabilityMap.py | 3 ++- .../utilities/tests/test_auto_ImageRegionPlotter.py | 3 ++- .../semtools/utilities/tests/test_auto_JointHistogram.py | 3 ++- .../utilities/tests/test_auto_ShuffleVectorsModule.py | 3 ++- .../semtools/utilities/tests/test_auto_fcsv_to_hdf5.py | 3 ++- .../utilities/tests/test_auto_insertMidACPCpoint.py | 3 ++- .../tests/test_auto_landmarksConstellationAligner.py | 3 ++- .../tests/test_auto_landmarksConstellationWeights.py | 3 ++- .../slicer/diffusion/tests/test_auto_DTIexport.py | 3 ++- .../slicer/diffusion/tests/test_auto_DTIimport.py | 3 ++- .../diffusion/tests/test_auto_DWIJointRicianLMMSEFilter.py | 3 ++- .../diffusion/tests/test_auto_DWIRicianLMMSEFilter.py | 3 ++- .../slicer/diffusion/tests/test_auto_DWIToDTIEstimation.py | 3 ++- .../tests/test_auto_DiffusionTensorScalarMeasurements.py | 3 ++- .../tests/test_auto_DiffusionWeightedVolumeMasking.py | 3 ++- .../slicer/diffusion/tests/test_auto_ResampleDTIVolume.py | 3 ++- .../tests/test_auto_TractographyLabelMapSeeding.py | 3 ++- .../slicer/filtering/tests/test_auto_AddScalarVolumes.py | 3 ++- .../slicer/filtering/tests/test_auto_CastScalarVolume.py | 3 ++- .../slicer/filtering/tests/test_auto_CheckerBoardFilter.py | 3 ++- .../tests/test_auto_CurvatureAnisotropicDiffusion.py | 3 ++- .../slicer/filtering/tests/test_auto_ExtractSkeleton.py | 3 ++- .../filtering/tests/test_auto_GaussianBlurImageFilter.py | 3 ++- .../tests/test_auto_GradientAnisotropicDiffusion.py | 3 ++- .../tests/test_auto_GrayscaleFillHoleImageFilter.py | 3 ++- .../tests/test_auto_GrayscaleGrindPeakImageFilter.py | 3 ++- .../slicer/filtering/tests/test_auto_HistogramMatching.py | 3 ++- .../slicer/filtering/tests/test_auto_ImageLabelCombine.py | 3 ++- .../slicer/filtering/tests/test_auto_MaskScalarVolume.py | 3 ++- .../slicer/filtering/tests/test_auto_MedianImageFilter.py | 3 ++- .../filtering/tests/test_auto_MultiplyScalarVolumes.py | 3 ++- .../filtering/tests/test_auto_N4ITKBiasFieldCorrection.py | 3 ++- .../tests/test_auto_ResampleScalarVectorDWIVolume.py | 3 ++- .../filtering/tests/test_auto_SubtractScalarVolumes.py | 3 ++- .../filtering/tests/test_auto_ThresholdScalarVolume.py | 3 ++- .../tests/test_auto_VotingBinaryHoleFillingImageFilter.py | 3 ++- .../tests/test_auto_DWIUnbiasedNonLocalMeansFilter.py | 3 ++- .../slicer/legacy/tests/test_auto_AffineRegistration.py | 3 ++- .../legacy/tests/test_auto_BSplineDeformableRegistration.py | 3 ++- .../legacy/tests/test_auto_BSplineToDeformationField.py | 3 ++- .../legacy/tests/test_auto_ExpertAutomatedRegistration.py | 3 ++- .../slicer/legacy/tests/test_auto_LinearRegistration.py | 3 ++- .../tests/test_auto_MultiResolutionAffineRegistration.py | 3 ++- .../legacy/tests/test_auto_OtsuThresholdImageFilter.py | 3 ++- .../legacy/tests/test_auto_OtsuThresholdSegmentation.py | 3 ++- .../slicer/legacy/tests/test_auto_ResampleScalarVolume.py | 3 ++- .../slicer/legacy/tests/test_auto_RigidRegistration.py | 3 ++- .../tests/test_auto_IntensityDifferenceMetric.py | 3 ++- .../tests/test_auto_PETStandardUptakeValueComputation.py | 3 ++- .../slicer/registration/tests/test_auto_ACPCTransform.py | 3 ++- .../slicer/registration/tests/test_auto_BRAINSDemonWarp.py | 3 ++- .../slicer/registration/tests/test_auto_BRAINSFit.py | 3 ++- .../slicer/registration/tests/test_auto_BRAINSResample.py | 3 ++- .../registration/tests/test_auto_FiducialRegistration.py | 3 ++- .../slicer/registration/tests/test_auto_VBRAINSDemonWarp.py | 3 ++- .../slicer/segmentation/tests/test_auto_BRAINSROIAuto.py | 3 ++- .../segmentation/tests/test_auto_EMSegmentCommandLine.py | 3 ++- .../tests/test_auto_RobustStatisticsSegmenter.py | 3 ++- .../tests/test_auto_SimpleRegionGrowingSegmentation.py | 3 ++- .../slicer/tests/test_auto_DicomToNrrdConverter.py | 3 ++- .../slicer/tests/test_auto_EMSegmentTransformToNewFormat.py | 3 ++- .../slicer/tests/test_auto_GrayscaleModelMaker.py | 3 ++- .../interfaces/slicer/tests/test_auto_LabelMapSmoothing.py | 3 ++- nipype/interfaces/slicer/tests/test_auto_MergeModels.py | 3 ++- nipype/interfaces/slicer/tests/test_auto_ModelMaker.py | 3 ++- nipype/interfaces/slicer/tests/test_auto_ModelToLabelMap.py | 3 ++- .../interfaces/slicer/tests/test_auto_OrientScalarVolume.py | 3 ++- .../slicer/tests/test_auto_ProbeVolumeWithModel.py | 3 ++- .../interfaces/slicer/tests/test_auto_SlicerCommandLine.py | 3 ++- nipype/interfaces/spm/tests/test_auto_Analyze2nii.py | 6 ++++-- nipype/interfaces/spm/tests/test_auto_ApplyDeformations.py | 3 ++- .../spm/tests/test_auto_ApplyInverseDeformation.py | 3 ++- nipype/interfaces/spm/tests/test_auto_ApplyTransform.py | 3 ++- nipype/interfaces/spm/tests/test_auto_CalcCoregAffine.py | 3 ++- nipype/interfaces/spm/tests/test_auto_Coregister.py | 3 ++- nipype/interfaces/spm/tests/test_auto_CreateWarped.py | 3 ++- nipype/interfaces/spm/tests/test_auto_DARTEL.py | 3 ++- nipype/interfaces/spm/tests/test_auto_DARTELNorm2MNI.py | 3 ++- nipype/interfaces/spm/tests/test_auto_DicomImport.py | 3 ++- nipype/interfaces/spm/tests/test_auto_EstimateContrast.py | 3 ++- nipype/interfaces/spm/tests/test_auto_EstimateModel.py | 3 ++- nipype/interfaces/spm/tests/test_auto_FactorialDesign.py | 3 ++- nipype/interfaces/spm/tests/test_auto_Level1Design.py | 3 ++- .../spm/tests/test_auto_MultipleRegressionDesign.py | 3 ++- nipype/interfaces/spm/tests/test_auto_NewSegment.py | 3 ++- nipype/interfaces/spm/tests/test_auto_Normalize.py | 3 ++- nipype/interfaces/spm/tests/test_auto_Normalize12.py | 3 ++- .../interfaces/spm/tests/test_auto_OneSampleTTestDesign.py | 3 ++- nipype/interfaces/spm/tests/test_auto_PairedTTestDesign.py | 3 ++- nipype/interfaces/spm/tests/test_auto_Realign.py | 3 ++- nipype/interfaces/spm/tests/test_auto_Reslice.py | 3 ++- nipype/interfaces/spm/tests/test_auto_ResliceToReference.py | 3 ++- nipype/interfaces/spm/tests/test_auto_SPMCommand.py | 3 ++- nipype/interfaces/spm/tests/test_auto_Segment.py | 3 ++- nipype/interfaces/spm/tests/test_auto_SliceTiming.py | 3 ++- nipype/interfaces/spm/tests/test_auto_Smooth.py | 3 ++- nipype/interfaces/spm/tests/test_auto_Threshold.py | 3 ++- .../interfaces/spm/tests/test_auto_ThresholdStatistics.py | 3 ++- .../interfaces/spm/tests/test_auto_TwoSampleTTestDesign.py | 3 ++- nipype/interfaces/spm/tests/test_auto_VBMSegment.py | 3 ++- nipype/interfaces/tests/test_auto_Bru2.py | 3 ++- nipype/interfaces/tests/test_auto_C3dAffineTool.py | 3 ++- nipype/interfaces/tests/test_auto_DataFinder.py | 3 ++- nipype/interfaces/tests/test_auto_DataGrabber.py | 3 ++- nipype/interfaces/tests/test_auto_DataSink.py | 3 ++- nipype/interfaces/tests/test_auto_Dcm2nii.py | 3 ++- nipype/interfaces/tests/test_auto_Dcm2niix.py | 3 ++- nipype/interfaces/tests/test_auto_FreeSurferSource.py | 3 ++- nipype/interfaces/tests/test_auto_IOBase.py | 3 ++- nipype/interfaces/tests/test_auto_JSONFileGrabber.py | 3 ++- nipype/interfaces/tests/test_auto_JSONFileSink.py | 3 ++- nipype/interfaces/tests/test_auto_MatlabCommand.py | 3 ++- nipype/interfaces/tests/test_auto_MeshFix.py | 3 ++- nipype/interfaces/tests/test_auto_MySQLSink.py | 3 ++- nipype/interfaces/tests/test_auto_NiftiGeneratorBase.py | 3 ++- nipype/interfaces/tests/test_auto_PETPVC.py | 3 ++- nipype/interfaces/tests/test_auto_Quickshear.py | 3 ++- nipype/interfaces/tests/test_auto_S3DataGrabber.py | 3 ++- nipype/interfaces/tests/test_auto_SQLiteSink.py | 3 ++- nipype/interfaces/tests/test_auto_SSHDataGrabber.py | 3 ++- nipype/interfaces/tests/test_auto_SelectFiles.py | 3 ++- nipype/interfaces/tests/test_auto_SignalExtraction.py | 3 ++- nipype/interfaces/tests/test_auto_SlicerCommandLine.py | 3 ++- nipype/interfaces/tests/test_auto_XNATSink.py | 3 ++- nipype/interfaces/tests/test_auto_XNATSource.py | 3 ++- nipype/interfaces/utility/tests/test_auto_AssertEqual.py | 3 ++- nipype/interfaces/utility/tests/test_auto_Function.py | 3 ++- nipype/interfaces/utility/tests/test_auto_Merge.py | 3 ++- nipype/interfaces/utility/tests/test_auto_Select.py | 3 ++- nipype/interfaces/utility/tests/test_auto_Split.py | 3 ++- nipype/interfaces/vista/tests/test_auto_Vnifti2Image.py | 3 ++- nipype/interfaces/vista/tests/test_auto_VtoMat.py | 3 ++- 748 files changed, 1498 insertions(+), 749 deletions(-) diff --git a/nipype/algorithms/tests/test_auto_ACompCor.py b/nipype/algorithms/tests/test_auto_ACompCor.py index 5c44844cf9..a266d57ddb 100644 --- a/nipype/algorithms/tests/test_auto_ACompCor.py +++ b/nipype/algorithms/tests/test_auto_ACompCor.py @@ -9,7 +9,8 @@ def test_ACompCor_inputs(): header_prefix=dict(), high_pass_cutoff=dict(usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), ignore_initial_volumes=dict(usedefault=True, diff --git a/nipype/algorithms/tests/test_auto_AddCSVRow.py b/nipype/algorithms/tests/test_auto_AddCSVRow.py index f38319040b..31cc6f7a09 100644 --- a/nipype/algorithms/tests/test_auto_AddCSVRow.py +++ b/nipype/algorithms/tests/test_auto_AddCSVRow.py @@ -6,7 +6,8 @@ def test_AddCSVRow_inputs(): input_map = dict(_outputs=dict(usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(mandatory=True, diff --git a/nipype/algorithms/tests/test_auto_ArtifactDetect.py b/nipype/algorithms/tests/test_auto_ArtifactDetect.py index 054bc1da99..196d297847 100644 --- a/nipype/algorithms/tests/test_auto_ArtifactDetect.py +++ b/nipype/algorithms/tests/test_auto_ArtifactDetect.py @@ -8,7 +8,8 @@ def test_ArtifactDetect_inputs(): ), global_threshold=dict(usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), intersect_mask=dict(), diff --git a/nipype/algorithms/tests/test_auto_CalculateMedian.py b/nipype/algorithms/tests/test_auto_CalculateMedian.py index 88888d5bbe..77784f1bc9 100644 --- a/nipype/algorithms/tests/test_auto_CalculateMedian.py +++ b/nipype/algorithms/tests/test_auto_CalculateMedian.py @@ -4,7 +4,8 @@ def test_CalculateMedian_inputs(): - input_map = dict(ignore_exception=dict(nohash=True, + input_map = dict(ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_files=dict(), diff --git a/nipype/algorithms/tests/test_auto_ComputeDVARS.py b/nipype/algorithms/tests/test_auto_ComputeDVARS.py index 7c59f851d1..81aa16dde4 100644 --- a/nipype/algorithms/tests/test_auto_ComputeDVARS.py +++ b/nipype/algorithms/tests/test_auto_ComputeDVARS.py @@ -10,7 +10,8 @@ def test_ComputeDVARS_inputs(): ), figsize=dict(usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(mandatory=True, diff --git a/nipype/algorithms/tests/test_auto_ComputeMeshWarp.py b/nipype/algorithms/tests/test_auto_ComputeMeshWarp.py index 61f64de033..e6cda0e7d7 100644 --- a/nipype/algorithms/tests/test_auto_ComputeMeshWarp.py +++ b/nipype/algorithms/tests/test_auto_ComputeMeshWarp.py @@ -4,7 +4,8 @@ def test_ComputeMeshWarp_inputs(): - input_map = dict(ignore_exception=dict(nohash=True, + input_map = dict(ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), metric=dict(usedefault=True, diff --git a/nipype/algorithms/tests/test_auto_CreateNifti.py b/nipype/algorithms/tests/test_auto_CreateNifti.py index 3e365b8894..0d74e283fe 100644 --- a/nipype/algorithms/tests/test_auto_CreateNifti.py +++ b/nipype/algorithms/tests/test_auto_CreateNifti.py @@ -9,7 +9,8 @@ def test_CreateNifti_inputs(): ), header_file=dict(mandatory=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), ) diff --git a/nipype/algorithms/tests/test_auto_Distance.py b/nipype/algorithms/tests/test_auto_Distance.py index 5cf8c425c8..713221c14a 100644 --- a/nipype/algorithms/tests/test_auto_Distance.py +++ b/nipype/algorithms/tests/test_auto_Distance.py @@ -4,7 +4,8 @@ def test_Distance_inputs(): - input_map = dict(ignore_exception=dict(nohash=True, + input_map = dict(ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), mask_volume=dict(), diff --git a/nipype/algorithms/tests/test_auto_FramewiseDisplacement.py b/nipype/algorithms/tests/test_auto_FramewiseDisplacement.py index e230992eec..cb56b470a4 100644 --- a/nipype/algorithms/tests/test_auto_FramewiseDisplacement.py +++ b/nipype/algorithms/tests/test_auto_FramewiseDisplacement.py @@ -8,7 +8,8 @@ def test_FramewiseDisplacement_inputs(): ), figsize=dict(usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(mandatory=True, diff --git a/nipype/algorithms/tests/test_auto_FuzzyOverlap.py b/nipype/algorithms/tests/test_auto_FuzzyOverlap.py index 764d821bc6..726b3bec5b 100644 --- a/nipype/algorithms/tests/test_auto_FuzzyOverlap.py +++ b/nipype/algorithms/tests/test_auto_FuzzyOverlap.py @@ -4,7 +4,8 @@ def test_FuzzyOverlap_inputs(): - input_map = dict(ignore_exception=dict(nohash=True, + input_map = dict(ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_ref=dict(mandatory=True, diff --git a/nipype/algorithms/tests/test_auto_Gunzip.py b/nipype/algorithms/tests/test_auto_Gunzip.py index 6b06654f1d..43f74364c5 100644 --- a/nipype/algorithms/tests/test_auto_Gunzip.py +++ b/nipype/algorithms/tests/test_auto_Gunzip.py @@ -4,7 +4,8 @@ def test_Gunzip_inputs(): - input_map = dict(ignore_exception=dict(nohash=True, + input_map = dict(ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(mandatory=True, diff --git a/nipype/algorithms/tests/test_auto_ICC.py b/nipype/algorithms/tests/test_auto_ICC.py index da3110fd76..ec2a37baa6 100644 --- a/nipype/algorithms/tests/test_auto_ICC.py +++ b/nipype/algorithms/tests/test_auto_ICC.py @@ -4,7 +4,8 @@ def test_ICC_inputs(): - input_map = dict(ignore_exception=dict(nohash=True, + input_map = dict(ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), mask=dict(mandatory=True, diff --git a/nipype/algorithms/tests/test_auto_MeshWarpMaths.py b/nipype/algorithms/tests/test_auto_MeshWarpMaths.py index 3c6077922b..c19a4a7506 100644 --- a/nipype/algorithms/tests/test_auto_MeshWarpMaths.py +++ b/nipype/algorithms/tests/test_auto_MeshWarpMaths.py @@ -5,7 +5,8 @@ def test_MeshWarpMaths_inputs(): input_map = dict(float_trait=dict(), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_surf=dict(mandatory=True, diff --git a/nipype/algorithms/tests/test_auto_ModifyAffine.py b/nipype/algorithms/tests/test_auto_ModifyAffine.py index c7b4b25d0c..a9c7fe1b49 100644 --- a/nipype/algorithms/tests/test_auto_ModifyAffine.py +++ b/nipype/algorithms/tests/test_auto_ModifyAffine.py @@ -4,7 +4,8 @@ def test_ModifyAffine_inputs(): - input_map = dict(ignore_exception=dict(nohash=True, + input_map = dict(ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), transformation_matrix=dict(usedefault=True, diff --git a/nipype/algorithms/tests/test_auto_NonSteadyStateDetector.py b/nipype/algorithms/tests/test_auto_NonSteadyStateDetector.py index 7b12363ee8..6d3fe0c879 100644 --- a/nipype/algorithms/tests/test_auto_NonSteadyStateDetector.py +++ b/nipype/algorithms/tests/test_auto_NonSteadyStateDetector.py @@ -4,7 +4,8 @@ def test_NonSteadyStateDetector_inputs(): - input_map = dict(ignore_exception=dict(nohash=True, + input_map = dict(ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(mandatory=True, diff --git a/nipype/algorithms/tests/test_auto_P2PDistance.py b/nipype/algorithms/tests/test_auto_P2PDistance.py index 59c749da30..a1ddcd56c0 100644 --- a/nipype/algorithms/tests/test_auto_P2PDistance.py +++ b/nipype/algorithms/tests/test_auto_P2PDistance.py @@ -4,7 +4,8 @@ def test_P2PDistance_inputs(): - input_map = dict(ignore_exception=dict(nohash=True, + input_map = dict(ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), metric=dict(usedefault=True, diff --git a/nipype/algorithms/tests/test_auto_PickAtlas.py b/nipype/algorithms/tests/test_auto_PickAtlas.py index 990b71e289..11b84f8e8a 100644 --- a/nipype/algorithms/tests/test_auto_PickAtlas.py +++ b/nipype/algorithms/tests/test_auto_PickAtlas.py @@ -10,7 +10,8 @@ def test_PickAtlas_inputs(): ), hemi=dict(usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), labels=dict(mandatory=True, diff --git a/nipype/algorithms/tests/test_auto_Similarity.py b/nipype/algorithms/tests/test_auto_Similarity.py index 4dce363864..6b90321975 100644 --- a/nipype/algorithms/tests/test_auto_Similarity.py +++ b/nipype/algorithms/tests/test_auto_Similarity.py @@ -4,7 +4,8 @@ def test_Similarity_inputs(): - input_map = dict(ignore_exception=dict(nohash=True, + input_map = dict(ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), mask1=dict(), diff --git a/nipype/algorithms/tests/test_auto_SimpleThreshold.py b/nipype/algorithms/tests/test_auto_SimpleThreshold.py index 0031f4bb7f..8d4993425e 100644 --- a/nipype/algorithms/tests/test_auto_SimpleThreshold.py +++ b/nipype/algorithms/tests/test_auto_SimpleThreshold.py @@ -4,7 +4,8 @@ def test_SimpleThreshold_inputs(): - input_map = dict(ignore_exception=dict(nohash=True, + input_map = dict(ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), threshold=dict(mandatory=True, diff --git a/nipype/algorithms/tests/test_auto_SpecifyModel.py b/nipype/algorithms/tests/test_auto_SpecifyModel.py index 33d5435b5f..11af243c11 100644 --- a/nipype/algorithms/tests/test_auto_SpecifyModel.py +++ b/nipype/algorithms/tests/test_auto_SpecifyModel.py @@ -12,7 +12,8 @@ def test_SpecifyModel_inputs(): ), high_pass_filter_cutoff=dict(mandatory=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), input_units=dict(mandatory=True, diff --git a/nipype/algorithms/tests/test_auto_SpecifySPMModel.py b/nipype/algorithms/tests/test_auto_SpecifySPMModel.py index 7a33ac63c4..bea8ee473e 100644 --- a/nipype/algorithms/tests/test_auto_SpecifySPMModel.py +++ b/nipype/algorithms/tests/test_auto_SpecifySPMModel.py @@ -14,7 +14,8 @@ def test_SpecifySPMModel_inputs(): ), high_pass_filter_cutoff=dict(mandatory=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), input_units=dict(mandatory=True, diff --git a/nipype/algorithms/tests/test_auto_SpecifySparseModel.py b/nipype/algorithms/tests/test_auto_SpecifySparseModel.py index 4caf1c1033..c8e07a292b 100644 --- a/nipype/algorithms/tests/test_auto_SpecifySparseModel.py +++ b/nipype/algorithms/tests/test_auto_SpecifySparseModel.py @@ -12,7 +12,8 @@ def test_SpecifySparseModel_inputs(): ), high_pass_filter_cutoff=dict(mandatory=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), input_units=dict(mandatory=True, diff --git a/nipype/algorithms/tests/test_auto_StimulusCorrelation.py b/nipype/algorithms/tests/test_auto_StimulusCorrelation.py index 95581bb111..169dcf6d80 100644 --- a/nipype/algorithms/tests/test_auto_StimulusCorrelation.py +++ b/nipype/algorithms/tests/test_auto_StimulusCorrelation.py @@ -6,7 +6,8 @@ def test_StimulusCorrelation_inputs(): input_map = dict(concatenated_design=dict(mandatory=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), intensity_values=dict(mandatory=True, diff --git a/nipype/algorithms/tests/test_auto_TCompCor.py b/nipype/algorithms/tests/test_auto_TCompCor.py index b39c946d9d..8f9585f26b 100644 --- a/nipype/algorithms/tests/test_auto_TCompCor.py +++ b/nipype/algorithms/tests/test_auto_TCompCor.py @@ -9,7 +9,8 @@ def test_TCompCor_inputs(): header_prefix=dict(), high_pass_cutoff=dict(usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), ignore_initial_volumes=dict(usedefault=True, diff --git a/nipype/algorithms/tests/test_auto_TVTKBaseInterface.py b/nipype/algorithms/tests/test_auto_TVTKBaseInterface.py index d6e38722fe..14e20fd36a 100644 --- a/nipype/algorithms/tests/test_auto_TVTKBaseInterface.py +++ b/nipype/algorithms/tests/test_auto_TVTKBaseInterface.py @@ -4,7 +4,8 @@ def test_TVTKBaseInterface_inputs(): - input_map = dict(ignore_exception=dict(nohash=True, + input_map = dict(ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), ) diff --git a/nipype/algorithms/tests/test_auto_WarpPoints.py b/nipype/algorithms/tests/test_auto_WarpPoints.py index ab59d22cff..d866214fec 100644 --- a/nipype/algorithms/tests/test_auto_WarpPoints.py +++ b/nipype/algorithms/tests/test_auto_WarpPoints.py @@ -4,7 +4,8 @@ def test_WarpPoints_inputs(): - input_map = dict(ignore_exception=dict(nohash=True, + input_map = dict(ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), interp=dict(mandatory=True, diff --git a/nipype/interfaces/afni/tests/test_auto_ABoverlap.py b/nipype/interfaces/afni/tests/test_auto_ABoverlap.py index 9c2d2f0cc3..9baf98d246 100644 --- a/nipype/interfaces/afni/tests/test_auto_ABoverlap.py +++ b/nipype/interfaces/afni/tests/test_auto_ABoverlap.py @@ -9,7 +9,8 @@ def test_ABoverlap_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file_a=dict(argstr='%s', diff --git a/nipype/interfaces/afni/tests/test_auto_AFNICommand.py b/nipype/interfaces/afni/tests/test_auto_AFNICommand.py index 2a8f66de41..0f670fa2f4 100644 --- a/nipype/interfaces/afni/tests/test_auto_AFNICommand.py +++ b/nipype/interfaces/afni/tests/test_auto_AFNICommand.py @@ -9,7 +9,8 @@ def test_AFNICommand_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), num_threads=dict(nohash=True, diff --git a/nipype/interfaces/afni/tests/test_auto_AFNICommandBase.py b/nipype/interfaces/afni/tests/test_auto_AFNICommandBase.py index 6d848cedd0..8ab19a670a 100644 --- a/nipype/interfaces/afni/tests/test_auto_AFNICommandBase.py +++ b/nipype/interfaces/afni/tests/test_auto_AFNICommandBase.py @@ -9,7 +9,8 @@ def test_AFNICommandBase_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), terminal_output=dict(deprecated='1.0.0', diff --git a/nipype/interfaces/afni/tests/test_auto_AFNIPythonCommand.py b/nipype/interfaces/afni/tests/test_auto_AFNIPythonCommand.py index bab1a3e829..664237b4d7 100644 --- a/nipype/interfaces/afni/tests/test_auto_AFNIPythonCommand.py +++ b/nipype/interfaces/afni/tests/test_auto_AFNIPythonCommand.py @@ -9,7 +9,8 @@ def test_AFNIPythonCommand_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), num_threads=dict(nohash=True, diff --git a/nipype/interfaces/afni/tests/test_auto_AFNItoNIFTI.py b/nipype/interfaces/afni/tests/test_auto_AFNItoNIFTI.py index 63bdebab28..e01cc9dd28 100644 --- a/nipype/interfaces/afni/tests/test_auto_AFNItoNIFTI.py +++ b/nipype/interfaces/afni/tests/test_auto_AFNItoNIFTI.py @@ -11,7 +11,8 @@ def test_AFNItoNIFTI_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/afni/tests/test_auto_AlignEpiAnatPy.py b/nipype/interfaces/afni/tests/test_auto_AlignEpiAnatPy.py index b18e056d75..adf8750b1c 100644 --- a/nipype/interfaces/afni/tests/test_auto_AlignEpiAnatPy.py +++ b/nipype/interfaces/afni/tests/test_auto_AlignEpiAnatPy.py @@ -22,7 +22,8 @@ def test_AlignEpiAnatPy_inputs(): ), epi_strip=dict(argstr='-epi_strip %s', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='-epi %s', diff --git a/nipype/interfaces/afni/tests/test_auto_Allineate.py b/nipype/interfaces/afni/tests/test_auto_Allineate.py index 5c4a916228..b8b79df004 100644 --- a/nipype/interfaces/afni/tests/test_auto_Allineate.py +++ b/nipype/interfaces/afni/tests/test_auto_Allineate.py @@ -33,7 +33,8 @@ def test_Allineate_inputs(): ), fine_blur=dict(argstr='-fineblur %f', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='-source %s', diff --git a/nipype/interfaces/afni/tests/test_auto_AutoTLRC.py b/nipype/interfaces/afni/tests/test_auto_AutoTLRC.py index 90f70ecfa4..cc87a813b3 100644 --- a/nipype/interfaces/afni/tests/test_auto_AutoTLRC.py +++ b/nipype/interfaces/afni/tests/test_auto_AutoTLRC.py @@ -12,7 +12,8 @@ def test_AutoTLRC_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='-input %s', diff --git a/nipype/interfaces/afni/tests/test_auto_AutoTcorrelate.py b/nipype/interfaces/afni/tests/test_auto_AutoTcorrelate.py index 54964487a8..dab38ec832 100644 --- a/nipype/interfaces/afni/tests/test_auto_AutoTcorrelate.py +++ b/nipype/interfaces/afni/tests/test_auto_AutoTcorrelate.py @@ -11,7 +11,8 @@ def test_AutoTcorrelate_inputs(): ), eta2=dict(argstr='-eta2', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/afni/tests/test_auto_Autobox.py b/nipype/interfaces/afni/tests/test_auto_Autobox.py index 83fd613606..968bcf5839 100644 --- a/nipype/interfaces/afni/tests/test_auto_Autobox.py +++ b/nipype/interfaces/afni/tests/test_auto_Autobox.py @@ -9,7 +9,8 @@ def test_Autobox_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='-input %s', diff --git a/nipype/interfaces/afni/tests/test_auto_Automask.py b/nipype/interfaces/afni/tests/test_auto_Automask.py index a31cc87cd9..afc4c7dad5 100644 --- a/nipype/interfaces/afni/tests/test_auto_Automask.py +++ b/nipype/interfaces/afni/tests/test_auto_Automask.py @@ -19,7 +19,8 @@ def test_Automask_inputs(): ), erode=dict(argstr='-erode %s', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/afni/tests/test_auto_Axialize.py b/nipype/interfaces/afni/tests/test_auto_Axialize.py index 93869e283e..2b8f1a76be 100644 --- a/nipype/interfaces/afni/tests/test_auto_Axialize.py +++ b/nipype/interfaces/afni/tests/test_auto_Axialize.py @@ -15,7 +15,8 @@ def test_Axialize_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/afni/tests/test_auto_Bandpass.py b/nipype/interfaces/afni/tests/test_auto_Bandpass.py index 5f5cffcabe..289c5abe4f 100644 --- a/nipype/interfaces/afni/tests/test_auto_Bandpass.py +++ b/nipype/interfaces/afni/tests/test_auto_Bandpass.py @@ -19,7 +19,8 @@ def test_Bandpass_inputs(): mandatory=True, position=-3, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/afni/tests/test_auto_BlurInMask.py b/nipype/interfaces/afni/tests/test_auto_BlurInMask.py index 43338e43d9..1311e237cf 100644 --- a/nipype/interfaces/afni/tests/test_auto_BlurInMask.py +++ b/nipype/interfaces/afni/tests/test_auto_BlurInMask.py @@ -16,7 +16,8 @@ def test_BlurInMask_inputs(): fwhm=dict(argstr='-FWHM %f', mandatory=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='-input %s', diff --git a/nipype/interfaces/afni/tests/test_auto_BlurToFWHM.py b/nipype/interfaces/afni/tests/test_auto_BlurToFWHM.py index 7ebd52778a..5b5c2a34b9 100644 --- a/nipype/interfaces/afni/tests/test_auto_BlurToFWHM.py +++ b/nipype/interfaces/afni/tests/test_auto_BlurToFWHM.py @@ -17,7 +17,8 @@ def test_BlurToFWHM_inputs(): ), fwhmxy=dict(argstr='-FWHMxy %f', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='-input %s', diff --git a/nipype/interfaces/afni/tests/test_auto_BrickStat.py b/nipype/interfaces/afni/tests/test_auto_BrickStat.py index f1ccb2fe55..55abae4c6d 100644 --- a/nipype/interfaces/afni/tests/test_auto_BrickStat.py +++ b/nipype/interfaces/afni/tests/test_auto_BrickStat.py @@ -9,7 +9,8 @@ def test_BrickStat_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/afni/tests/test_auto_Bucket.py b/nipype/interfaces/afni/tests/test_auto_Bucket.py index 879e91f02f..63ebbc6d5c 100644 --- a/nipype/interfaces/afni/tests/test_auto_Bucket.py +++ b/nipype/interfaces/afni/tests/test_auto_Bucket.py @@ -9,7 +9,8 @@ def test_Bucket_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/afni/tests/test_auto_Calc.py b/nipype/interfaces/afni/tests/test_auto_Calc.py index d352adb704..09fd99c753 100644 --- a/nipype/interfaces/afni/tests/test_auto_Calc.py +++ b/nipype/interfaces/afni/tests/test_auto_Calc.py @@ -13,7 +13,8 @@ def test_Calc_inputs(): mandatory=True, position=3, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file_a=dict(argstr='-a %s', diff --git a/nipype/interfaces/afni/tests/test_auto_Cat.py b/nipype/interfaces/afni/tests/test_auto_Cat.py index e4beca3454..857c9ade60 100644 --- a/nipype/interfaces/afni/tests/test_auto_Cat.py +++ b/nipype/interfaces/afni/tests/test_auto_Cat.py @@ -9,7 +9,8 @@ def test_Cat_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_files=dict(argstr='%s', diff --git a/nipype/interfaces/afni/tests/test_auto_CatMatvec.py b/nipype/interfaces/afni/tests/test_auto_CatMatvec.py index 3782a3a37d..e94fa12df3 100644 --- a/nipype/interfaces/afni/tests/test_auto_CatMatvec.py +++ b/nipype/interfaces/afni/tests/test_auto_CatMatvec.py @@ -13,7 +13,8 @@ def test_CatMatvec_inputs(): descr='Output matrix in augmented form (last row is 0 0 0 1)This option does not work with -MATRIX or -ONELINE', xor=['matrix', 'oneline'], ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/afni/tests/test_auto_CenterMass.py b/nipype/interfaces/afni/tests/test_auto_CenterMass.py index c64c4e8b36..34d6d5ec2f 100644 --- a/nipype/interfaces/afni/tests/test_auto_CenterMass.py +++ b/nipype/interfaces/afni/tests/test_auto_CenterMass.py @@ -21,7 +21,8 @@ def test_CenterMass_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/afni/tests/test_auto_ClipLevel.py b/nipype/interfaces/afni/tests/test_auto_ClipLevel.py index 0843c0e67e..815d8530ce 100644 --- a/nipype/interfaces/afni/tests/test_auto_ClipLevel.py +++ b/nipype/interfaces/afni/tests/test_auto_ClipLevel.py @@ -17,7 +17,8 @@ def test_ClipLevel_inputs(): position=3, xor='doall', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/afni/tests/test_auto_Copy.py b/nipype/interfaces/afni/tests/test_auto_Copy.py index 046f9d87c2..0917a0628e 100644 --- a/nipype/interfaces/afni/tests/test_auto_Copy.py +++ b/nipype/interfaces/afni/tests/test_auto_Copy.py @@ -9,7 +9,8 @@ def test_Copy_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/afni/tests/test_auto_Deconvolve.py b/nipype/interfaces/afni/tests/test_auto_Deconvolve.py index 5c8878b5ed..972b9a0128 100644 --- a/nipype/interfaces/afni/tests/test_auto_Deconvolve.py +++ b/nipype/interfaces/afni/tests/test_auto_Deconvolve.py @@ -41,7 +41,8 @@ def test_Deconvolve_inputs(): ), goforit=dict(argstr='-GOFORIT %i', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_files=dict(argstr='-input %s', diff --git a/nipype/interfaces/afni/tests/test_auto_DegreeCentrality.py b/nipype/interfaces/afni/tests/test_auto_DegreeCentrality.py index d820239d6b..a9b41f29ad 100644 --- a/nipype/interfaces/afni/tests/test_auto_DegreeCentrality.py +++ b/nipype/interfaces/afni/tests/test_auto_DegreeCentrality.py @@ -13,7 +13,8 @@ def test_DegreeCentrality_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/afni/tests/test_auto_Despike.py b/nipype/interfaces/afni/tests/test_auto_Despike.py index 268d76b55a..21891fb546 100644 --- a/nipype/interfaces/afni/tests/test_auto_Despike.py +++ b/nipype/interfaces/afni/tests/test_auto_Despike.py @@ -9,7 +9,8 @@ def test_Despike_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/afni/tests/test_auto_Detrend.py b/nipype/interfaces/afni/tests/test_auto_Detrend.py index d3f81979a4..16a1d1fd77 100644 --- a/nipype/interfaces/afni/tests/test_auto_Detrend.py +++ b/nipype/interfaces/afni/tests/test_auto_Detrend.py @@ -9,7 +9,8 @@ def test_Detrend_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/afni/tests/test_auto_Dot.py b/nipype/interfaces/afni/tests/test_auto_Dot.py index a9c5941da5..9042c7a8f7 100644 --- a/nipype/interfaces/afni/tests/test_auto_Dot.py +++ b/nipype/interfaces/afni/tests/test_auto_Dot.py @@ -25,7 +25,8 @@ def test_Dot_inputs(): ), full=dict(argstr='-full', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_files=dict(argstr='%s ...', diff --git a/nipype/interfaces/afni/tests/test_auto_ECM.py b/nipype/interfaces/afni/tests/test_auto_ECM.py index 3d38246a2b..4c923ea494 100644 --- a/nipype/interfaces/afni/tests/test_auto_ECM.py +++ b/nipype/interfaces/afni/tests/test_auto_ECM.py @@ -19,7 +19,8 @@ def test_ECM_inputs(): ), full=dict(argstr='-full', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/afni/tests/test_auto_Edge3.py b/nipype/interfaces/afni/tests/test_auto_Edge3.py index 108ce31912..7889b82551 100644 --- a/nipype/interfaces/afni/tests/test_auto_Edge3.py +++ b/nipype/interfaces/afni/tests/test_auto_Edge3.py @@ -17,7 +17,8 @@ def test_Edge3_inputs(): gscale=dict(argstr='-gscale', xor=['fscale', 'nscale', 'scale_floats'], ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='-input %s', diff --git a/nipype/interfaces/afni/tests/test_auto_Eval.py b/nipype/interfaces/afni/tests/test_auto_Eval.py index 5673adc4b9..d317f48627 100644 --- a/nipype/interfaces/afni/tests/test_auto_Eval.py +++ b/nipype/interfaces/afni/tests/test_auto_Eval.py @@ -13,7 +13,8 @@ def test_Eval_inputs(): mandatory=True, position=3, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file_a=dict(argstr='-a %s', diff --git a/nipype/interfaces/afni/tests/test_auto_FWHMx.py b/nipype/interfaces/afni/tests/test_auto_FWHMx.py index 97f2359535..669ea278e8 100644 --- a/nipype/interfaces/afni/tests/test_auto_FWHMx.py +++ b/nipype/interfaces/afni/tests/test_auto_FWHMx.py @@ -32,7 +32,8 @@ def test_FWHMx_inputs(): geom=dict(argstr='-geom', xor=['arith'], ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='-input %s', diff --git a/nipype/interfaces/afni/tests/test_auto_Fim.py b/nipype/interfaces/afni/tests/test_auto_Fim.py index c70714089f..e9a60c1d3e 100644 --- a/nipype/interfaces/afni/tests/test_auto_Fim.py +++ b/nipype/interfaces/afni/tests/test_auto_Fim.py @@ -16,7 +16,8 @@ def test_Fim_inputs(): mandatory=True, position=2, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='-input %s', diff --git a/nipype/interfaces/afni/tests/test_auto_Fourier.py b/nipype/interfaces/afni/tests/test_auto_Fourier.py index ddd22c65bd..02cb81bccc 100644 --- a/nipype/interfaces/afni/tests/test_auto_Fourier.py +++ b/nipype/interfaces/afni/tests/test_auto_Fourier.py @@ -12,7 +12,8 @@ def test_Fourier_inputs(): highpass=dict(argstr='-highpass %f', mandatory=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/afni/tests/test_auto_GCOR.py b/nipype/interfaces/afni/tests/test_auto_GCOR.py index 9f307dda34..b4f2679556 100644 --- a/nipype/interfaces/afni/tests/test_auto_GCOR.py +++ b/nipype/interfaces/afni/tests/test_auto_GCOR.py @@ -9,7 +9,8 @@ def test_GCOR_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='-input %s', diff --git a/nipype/interfaces/afni/tests/test_auto_Hist.py b/nipype/interfaces/afni/tests/test_auto_Hist.py index b7cebb027b..64952d334e 100644 --- a/nipype/interfaces/afni/tests/test_auto_Hist.py +++ b/nipype/interfaces/afni/tests/test_auto_Hist.py @@ -11,7 +11,8 @@ def test_Hist_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='-input %s', diff --git a/nipype/interfaces/afni/tests/test_auto_LFCD.py b/nipype/interfaces/afni/tests/test_auto_LFCD.py index a1beef49c8..7cacf5f728 100644 --- a/nipype/interfaces/afni/tests/test_auto_LFCD.py +++ b/nipype/interfaces/afni/tests/test_auto_LFCD.py @@ -13,7 +13,8 @@ def test_LFCD_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/afni/tests/test_auto_MaskTool.py b/nipype/interfaces/afni/tests/test_auto_MaskTool.py index 9c0e4289fd..775b34adab 100644 --- a/nipype/interfaces/afni/tests/test_auto_MaskTool.py +++ b/nipype/interfaces/afni/tests/test_auto_MaskTool.py @@ -25,7 +25,8 @@ def test_MaskTool_inputs(): ), frac=dict(argstr='-frac %s', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='-input %s', diff --git a/nipype/interfaces/afni/tests/test_auto_Maskave.py b/nipype/interfaces/afni/tests/test_auto_Maskave.py index 080eb2db26..ef7ef9f983 100644 --- a/nipype/interfaces/afni/tests/test_auto_Maskave.py +++ b/nipype/interfaces/afni/tests/test_auto_Maskave.py @@ -9,7 +9,8 @@ def test_Maskave_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/afni/tests/test_auto_Means.py b/nipype/interfaces/afni/tests/test_auto_Means.py index 90420861c5..b1ab57c9b9 100644 --- a/nipype/interfaces/afni/tests/test_auto_Means.py +++ b/nipype/interfaces/afni/tests/test_auto_Means.py @@ -13,7 +13,8 @@ def test_Means_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file_a=dict(argstr='%s', diff --git a/nipype/interfaces/afni/tests/test_auto_Merge.py b/nipype/interfaces/afni/tests/test_auto_Merge.py index cef21f818f..efb4a8f301 100644 --- a/nipype/interfaces/afni/tests/test_auto_Merge.py +++ b/nipype/interfaces/afni/tests/test_auto_Merge.py @@ -14,7 +14,8 @@ def test_Merge_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_files=dict(argstr='%s', diff --git a/nipype/interfaces/afni/tests/test_auto_Notes.py b/nipype/interfaces/afni/tests/test_auto_Notes.py index c36ccabb08..1724c1c7a5 100644 --- a/nipype/interfaces/afni/tests/test_auto_Notes.py +++ b/nipype/interfaces/afni/tests/test_auto_Notes.py @@ -16,7 +16,8 @@ def test_Notes_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/afni/tests/test_auto_NwarpApply.py b/nipype/interfaces/afni/tests/test_auto_NwarpApply.py index bf9cba8a2f..1df8eb30ea 100644 --- a/nipype/interfaces/afni/tests/test_auto_NwarpApply.py +++ b/nipype/interfaces/afni/tests/test_auto_NwarpApply.py @@ -11,7 +11,8 @@ def test_NwarpApply_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='-source %s', diff --git a/nipype/interfaces/afni/tests/test_auto_NwarpCat.py b/nipype/interfaces/afni/tests/test_auto_NwarpCat.py index 6e5077e645..fcfae528cf 100644 --- a/nipype/interfaces/afni/tests/test_auto_NwarpCat.py +++ b/nipype/interfaces/afni/tests/test_auto_NwarpCat.py @@ -11,7 +11,8 @@ def test_NwarpCat_inputs(): ), expad=dict(argstr='-expad %d', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_files=dict(argstr='%s', diff --git a/nipype/interfaces/afni/tests/test_auto_OneDToolPy.py b/nipype/interfaces/afni/tests/test_auto_OneDToolPy.py index 3d5e8cf9bf..ae62f3924a 100644 --- a/nipype/interfaces/afni/tests/test_auto_OneDToolPy.py +++ b/nipype/interfaces/afni/tests/test_auto_OneDToolPy.py @@ -17,7 +17,8 @@ def test_OneDToolPy_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='-infile %s', diff --git a/nipype/interfaces/afni/tests/test_auto_OutlierCount.py b/nipype/interfaces/afni/tests/test_auto_OutlierCount.py index 8658ad5bba..7d8b28ab65 100644 --- a/nipype/interfaces/afni/tests/test_auto_OutlierCount.py +++ b/nipype/interfaces/afni/tests/test_auto_OutlierCount.py @@ -20,7 +20,8 @@ def test_OutlierCount_inputs(): fraction=dict(argstr='-fraction', usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/afni/tests/test_auto_QualityIndex.py b/nipype/interfaces/afni/tests/test_auto_QualityIndex.py index a0af353f63..09a3855b92 100644 --- a/nipype/interfaces/afni/tests/test_auto_QualityIndex.py +++ b/nipype/interfaces/afni/tests/test_auto_QualityIndex.py @@ -19,7 +19,8 @@ def test_QualityIndex_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/afni/tests/test_auto_Qwarp.py b/nipype/interfaces/afni/tests/test_auto_Qwarp.py index 55015e0fbe..8a40687a10 100644 --- a/nipype/interfaces/afni/tests/test_auto_Qwarp.py +++ b/nipype/interfaces/afni/tests/test_auto_Qwarp.py @@ -49,7 +49,8 @@ def test_Qwarp_inputs(): hel=dict(argstr='-hel', xor=['nmi', 'mi', 'lpc', 'lpa', 'pear'], ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='-source %s', diff --git a/nipype/interfaces/afni/tests/test_auto_QwarpPlusMinus.py b/nipype/interfaces/afni/tests/test_auto_QwarpPlusMinus.py index eed8b3b3e4..b0c4f00c74 100644 --- a/nipype/interfaces/afni/tests/test_auto_QwarpPlusMinus.py +++ b/nipype/interfaces/afni/tests/test_auto_QwarpPlusMinus.py @@ -15,7 +15,8 @@ def test_QwarpPlusMinus_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), minpatch=dict(argstr='-minpatch %d', diff --git a/nipype/interfaces/afni/tests/test_auto_ROIStats.py b/nipype/interfaces/afni/tests/test_auto_ROIStats.py index cdb6c8c570..2b720fb0c6 100644 --- a/nipype/interfaces/afni/tests/test_auto_ROIStats.py +++ b/nipype/interfaces/afni/tests/test_auto_ROIStats.py @@ -9,7 +9,8 @@ def test_ROIStats_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/afni/tests/test_auto_Refit.py b/nipype/interfaces/afni/tests/test_auto_Refit.py index 63ab824617..81b72ea2cb 100644 --- a/nipype/interfaces/afni/tests/test_auto_Refit.py +++ b/nipype/interfaces/afni/tests/test_auto_Refit.py @@ -21,7 +21,8 @@ def test_Refit_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/afni/tests/test_auto_Remlfit.py b/nipype/interfaces/afni/tests/test_auto_Remlfit.py index 37566fd66d..3511414f11 100644 --- a/nipype/interfaces/afni/tests/test_auto_Remlfit.py +++ b/nipype/interfaces/afni/tests/test_auto_Remlfit.py @@ -34,7 +34,8 @@ def test_Remlfit_inputs(): ), gltsym=dict(argstr='-gltsym "%s" %s...', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_files=dict(argstr='-input "%s"', diff --git a/nipype/interfaces/afni/tests/test_auto_Resample.py b/nipype/interfaces/afni/tests/test_auto_Resample.py index 34227627db..21215f56f1 100644 --- a/nipype/interfaces/afni/tests/test_auto_Resample.py +++ b/nipype/interfaces/afni/tests/test_auto_Resample.py @@ -9,7 +9,8 @@ def test_Resample_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='-inset %s', diff --git a/nipype/interfaces/afni/tests/test_auto_Retroicor.py b/nipype/interfaces/afni/tests/test_auto_Retroicor.py index 142bf0f42d..57b23f6a18 100644 --- a/nipype/interfaces/afni/tests/test_auto_Retroicor.py +++ b/nipype/interfaces/afni/tests/test_auto_Retroicor.py @@ -16,7 +16,8 @@ def test_Retroicor_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/afni/tests/test_auto_SVMTest.py b/nipype/interfaces/afni/tests/test_auto_SVMTest.py index 4a7c892d2b..dbda1b28c5 100644 --- a/nipype/interfaces/afni/tests/test_auto_SVMTest.py +++ b/nipype/interfaces/afni/tests/test_auto_SVMTest.py @@ -11,7 +11,8 @@ def test_SVMTest_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='-testvol %s', diff --git a/nipype/interfaces/afni/tests/test_auto_SVMTrain.py b/nipype/interfaces/afni/tests/test_auto_SVMTrain.py index 17515f7cda..a0ba4dba42 100644 --- a/nipype/interfaces/afni/tests/test_auto_SVMTrain.py +++ b/nipype/interfaces/afni/tests/test_auto_SVMTrain.py @@ -16,7 +16,8 @@ def test_SVMTrain_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='-trainvol %s', diff --git a/nipype/interfaces/afni/tests/test_auto_Seg.py b/nipype/interfaces/afni/tests/test_auto_Seg.py index 5d57b5b7b5..1069121f79 100644 --- a/nipype/interfaces/afni/tests/test_auto_Seg.py +++ b/nipype/interfaces/afni/tests/test_auto_Seg.py @@ -19,7 +19,8 @@ def test_Seg_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='-anat %s', diff --git a/nipype/interfaces/afni/tests/test_auto_SkullStrip.py b/nipype/interfaces/afni/tests/test_auto_SkullStrip.py index e31d29f62f..97277301c3 100644 --- a/nipype/interfaces/afni/tests/test_auto_SkullStrip.py +++ b/nipype/interfaces/afni/tests/test_auto_SkullStrip.py @@ -9,7 +9,8 @@ def test_SkullStrip_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='-input %s', diff --git a/nipype/interfaces/afni/tests/test_auto_Synthesize.py b/nipype/interfaces/afni/tests/test_auto_Synthesize.py index a24137ed3a..bd95eca3a5 100644 --- a/nipype/interfaces/afni/tests/test_auto_Synthesize.py +++ b/nipype/interfaces/afni/tests/test_auto_Synthesize.py @@ -19,7 +19,8 @@ def test_Synthesize_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), matrix=dict(argstr='-matrix %s', diff --git a/nipype/interfaces/afni/tests/test_auto_TCat.py b/nipype/interfaces/afni/tests/test_auto_TCat.py index 9b1c61c496..597ead13cb 100644 --- a/nipype/interfaces/afni/tests/test_auto_TCat.py +++ b/nipype/interfaces/afni/tests/test_auto_TCat.py @@ -9,7 +9,8 @@ def test_TCat_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_files=dict(argstr=' %s', diff --git a/nipype/interfaces/afni/tests/test_auto_TCatSubBrick.py b/nipype/interfaces/afni/tests/test_auto_TCatSubBrick.py index da3b0fb383..58fc2108e3 100644 --- a/nipype/interfaces/afni/tests/test_auto_TCatSubBrick.py +++ b/nipype/interfaces/afni/tests/test_auto_TCatSubBrick.py @@ -9,7 +9,8 @@ def test_TCatSubBrick_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_files=dict(argstr='%s%s ...', diff --git a/nipype/interfaces/afni/tests/test_auto_TCorr1D.py b/nipype/interfaces/afni/tests/test_auto_TCorr1D.py index d15485235e..a57d8a6a10 100644 --- a/nipype/interfaces/afni/tests/test_auto_TCorr1D.py +++ b/nipype/interfaces/afni/tests/test_auto_TCorr1D.py @@ -9,7 +9,8 @@ def test_TCorr1D_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), ktaub=dict(argstr=' -ktaub', diff --git a/nipype/interfaces/afni/tests/test_auto_TCorrMap.py b/nipype/interfaces/afni/tests/test_auto_TCorrMap.py index 78accd3bb8..17f5e4ff19 100644 --- a/nipype/interfaces/afni/tests/test_auto_TCorrMap.py +++ b/nipype/interfaces/afni/tests/test_auto_TCorrMap.py @@ -42,7 +42,8 @@ def test_TCorrMap_inputs(): suffix='_hist', ), histogram_bin_numbers=dict(), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='-input %s', diff --git a/nipype/interfaces/afni/tests/test_auto_TCorrelate.py b/nipype/interfaces/afni/tests/test_auto_TCorrelate.py index 2debe70369..8857a2affe 100644 --- a/nipype/interfaces/afni/tests/test_auto_TCorrelate.py +++ b/nipype/interfaces/afni/tests/test_auto_TCorrelate.py @@ -9,7 +9,8 @@ def test_TCorrelate_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), num_threads=dict(nohash=True, diff --git a/nipype/interfaces/afni/tests/test_auto_TNorm.py b/nipype/interfaces/afni/tests/test_auto_TNorm.py index e47a91340a..fbb11ec746 100644 --- a/nipype/interfaces/afni/tests/test_auto_TNorm.py +++ b/nipype/interfaces/afni/tests/test_auto_TNorm.py @@ -11,7 +11,8 @@ def test_TNorm_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/afni/tests/test_auto_TShift.py b/nipype/interfaces/afni/tests/test_auto_TShift.py index a2cf3847bb..ee7663bbd6 100644 --- a/nipype/interfaces/afni/tests/test_auto_TShift.py +++ b/nipype/interfaces/afni/tests/test_auto_TShift.py @@ -11,7 +11,8 @@ def test_TShift_inputs(): ), ignore=dict(argstr='-ignore %s', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/afni/tests/test_auto_TStat.py b/nipype/interfaces/afni/tests/test_auto_TStat.py index 7d5a87645f..2315d81512 100644 --- a/nipype/interfaces/afni/tests/test_auto_TStat.py +++ b/nipype/interfaces/afni/tests/test_auto_TStat.py @@ -9,7 +9,8 @@ def test_TStat_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/afni/tests/test_auto_To3D.py b/nipype/interfaces/afni/tests/test_auto_To3D.py index 3124ad083c..5f39148167 100644 --- a/nipype/interfaces/afni/tests/test_auto_To3D.py +++ b/nipype/interfaces/afni/tests/test_auto_To3D.py @@ -17,7 +17,8 @@ def test_To3D_inputs(): ), funcparams=dict(argstr='-time:zt %s alt+z2', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_folder=dict(argstr='%s/*.dcm', diff --git a/nipype/interfaces/afni/tests/test_auto_Undump.py b/nipype/interfaces/afni/tests/test_auto_Undump.py index aaab0427a2..b5f1041b60 100644 --- a/nipype/interfaces/afni/tests/test_auto_Undump.py +++ b/nipype/interfaces/afni/tests/test_auto_Undump.py @@ -19,7 +19,8 @@ def test_Undump_inputs(): ), head_only=dict(argstr='-head_only', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='-master %s', diff --git a/nipype/interfaces/afni/tests/test_auto_Unifize.py b/nipype/interfaces/afni/tests/test_auto_Unifize.py index e5be64e70d..e9f5095619 100644 --- a/nipype/interfaces/afni/tests/test_auto_Unifize.py +++ b/nipype/interfaces/afni/tests/test_auto_Unifize.py @@ -15,7 +15,8 @@ def test_Unifize_inputs(): ), gm=dict(argstr='-GM', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='-input %s', diff --git a/nipype/interfaces/afni/tests/test_auto_Volreg.py b/nipype/interfaces/afni/tests/test_auto_Volreg.py index 25f8942b98..a8aa8a8832 100644 --- a/nipype/interfaces/afni/tests/test_auto_Volreg.py +++ b/nipype/interfaces/afni/tests/test_auto_Volreg.py @@ -14,7 +14,8 @@ def test_Volreg_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/afni/tests/test_auto_Warp.py b/nipype/interfaces/afni/tests/test_auto_Warp.py index d37ed85676..ef2d23d460 100644 --- a/nipype/interfaces/afni/tests/test_auto_Warp.py +++ b/nipype/interfaces/afni/tests/test_auto_Warp.py @@ -13,7 +13,8 @@ def test_Warp_inputs(): ), gridset=dict(argstr='-gridset %s', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/afni/tests/test_auto_ZCutUp.py b/nipype/interfaces/afni/tests/test_auto_ZCutUp.py index 244b5049ce..70cb544bc5 100644 --- a/nipype/interfaces/afni/tests/test_auto_ZCutUp.py +++ b/nipype/interfaces/afni/tests/test_auto_ZCutUp.py @@ -9,7 +9,8 @@ def test_ZCutUp_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/afni/tests/test_auto_Zcat.py b/nipype/interfaces/afni/tests/test_auto_Zcat.py index 7b625bb5f5..6de330b5ae 100644 --- a/nipype/interfaces/afni/tests/test_auto_Zcat.py +++ b/nipype/interfaces/afni/tests/test_auto_Zcat.py @@ -14,7 +14,8 @@ def test_Zcat_inputs(): fscale=dict(argstr='-fscale', xor=['nscale'], ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_files=dict(argstr='%s', diff --git a/nipype/interfaces/afni/tests/test_auto_Zeropad.py b/nipype/interfaces/afni/tests/test_auto_Zeropad.py index dfb5ac0981..5a23c1a46d 100644 --- a/nipype/interfaces/afni/tests/test_auto_Zeropad.py +++ b/nipype/interfaces/afni/tests/test_auto_Zeropad.py @@ -36,7 +36,8 @@ def test_Zeropad_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_files=dict(argstr='%s', diff --git a/nipype/interfaces/ants/tests/test_auto_ANTS.py b/nipype/interfaces/ants/tests/test_auto_ANTS.py index 50386d2704..682d070ee2 100644 --- a/nipype/interfaces/ants/tests/test_auto_ANTS.py +++ b/nipype/interfaces/ants/tests/test_auto_ANTS.py @@ -21,7 +21,8 @@ def test_ANTS_inputs(): ), gradient_step_length=dict(requires=['transformation_model'], ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), metric=dict(mandatory=True, diff --git a/nipype/interfaces/ants/tests/test_auto_ANTSCommand.py b/nipype/interfaces/ants/tests/test_auto_ANTSCommand.py index e3a410fcb4..c58eeefc67 100644 --- a/nipype/interfaces/ants/tests/test_auto_ANTSCommand.py +++ b/nipype/interfaces/ants/tests/test_auto_ANTSCommand.py @@ -9,7 +9,8 @@ def test_ANTSCommand_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), num_threads=dict(nohash=True, diff --git a/nipype/interfaces/ants/tests/test_auto_AffineInitializer.py b/nipype/interfaces/ants/tests/test_auto_AffineInitializer.py index 1b5652a4ce..fcdc519aad 100644 --- a/nipype/interfaces/ants/tests/test_auto_AffineInitializer.py +++ b/nipype/interfaces/ants/tests/test_auto_AffineInitializer.py @@ -17,7 +17,8 @@ def test_AffineInitializer_inputs(): mandatory=True, position=1, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), local_search=dict(argstr='%d', diff --git a/nipype/interfaces/ants/tests/test_auto_AntsJointFusion.py b/nipype/interfaces/ants/tests/test_auto_AntsJointFusion.py index 1ea0db9a82..09d95a4205 100644 --- a/nipype/interfaces/ants/tests/test_auto_AntsJointFusion.py +++ b/nipype/interfaces/ants/tests/test_auto_AntsJointFusion.py @@ -31,7 +31,8 @@ def test_AntsJointFusion_inputs(): exclusion_image_label=dict(argstr='-e %s', requires=['exclusion_image'], ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), mask_image=dict(argstr='-x %s', diff --git a/nipype/interfaces/ants/tests/test_auto_ApplyTransforms.py b/nipype/interfaces/ants/tests/test_auto_ApplyTransforms.py index f7451edde1..b159e6ee1d 100644 --- a/nipype/interfaces/ants/tests/test_auto_ApplyTransforms.py +++ b/nipype/interfaces/ants/tests/test_auto_ApplyTransforms.py @@ -16,7 +16,8 @@ def test_ApplyTransforms_inputs(): ), float=dict(argstr='--float %d', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), input_image=dict(argstr='--input %s', diff --git a/nipype/interfaces/ants/tests/test_auto_ApplyTransformsToPoints.py b/nipype/interfaces/ants/tests/test_auto_ApplyTransformsToPoints.py index e36cad94bb..b9f3f63d54 100644 --- a/nipype/interfaces/ants/tests/test_auto_ApplyTransformsToPoints.py +++ b/nipype/interfaces/ants/tests/test_auto_ApplyTransformsToPoints.py @@ -11,7 +11,8 @@ def test_ApplyTransformsToPoints_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), input_file=dict(argstr='--input %s', diff --git a/nipype/interfaces/ants/tests/test_auto_Atropos.py b/nipype/interfaces/ants/tests/test_auto_Atropos.py index ff405ad1af..9cb7d36844 100644 --- a/nipype/interfaces/ants/tests/test_auto_Atropos.py +++ b/nipype/interfaces/ants/tests/test_auto_Atropos.py @@ -16,7 +16,8 @@ def test_Atropos_inputs(): ), icm_use_synchronous_update=dict(argstr='%s', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), initialization=dict(argstr='%s', diff --git a/nipype/interfaces/ants/tests/test_auto_AverageAffineTransform.py b/nipype/interfaces/ants/tests/test_auto_AverageAffineTransform.py index af33926d93..52ff9679ee 100644 --- a/nipype/interfaces/ants/tests/test_auto_AverageAffineTransform.py +++ b/nipype/interfaces/ants/tests/test_auto_AverageAffineTransform.py @@ -14,7 +14,8 @@ def test_AverageAffineTransform_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), num_threads=dict(nohash=True, diff --git a/nipype/interfaces/ants/tests/test_auto_AverageImages.py b/nipype/interfaces/ants/tests/test_auto_AverageImages.py index 4504f30469..4c49eb27c0 100644 --- a/nipype/interfaces/ants/tests/test_auto_AverageImages.py +++ b/nipype/interfaces/ants/tests/test_auto_AverageImages.py @@ -13,7 +13,8 @@ def test_AverageImages_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), images=dict(argstr='%s', diff --git a/nipype/interfaces/ants/tests/test_auto_BrainExtraction.py b/nipype/interfaces/ants/tests/test_auto_BrainExtraction.py index 7576c36f27..3f1ade4bc3 100644 --- a/nipype/interfaces/ants/tests/test_auto_BrainExtraction.py +++ b/nipype/interfaces/ants/tests/test_auto_BrainExtraction.py @@ -26,7 +26,8 @@ def test_BrainExtraction_inputs(): ), extraction_registration_mask=dict(argstr='-f %s', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), image_suffix=dict(argstr='-s %s', diff --git a/nipype/interfaces/ants/tests/test_auto_ComposeMultiTransform.py b/nipype/interfaces/ants/tests/test_auto_ComposeMultiTransform.py index 5f020e7dbb..c9465f6a8e 100644 --- a/nipype/interfaces/ants/tests/test_auto_ComposeMultiTransform.py +++ b/nipype/interfaces/ants/tests/test_auto_ComposeMultiTransform.py @@ -13,7 +13,8 @@ def test_ComposeMultiTransform_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), num_threads=dict(nohash=True, diff --git a/nipype/interfaces/ants/tests/test_auto_ConvertScalarImageToRGB.py b/nipype/interfaces/ants/tests/test_auto_ConvertScalarImageToRGB.py index 083e5d0d7b..2afe734522 100644 --- a/nipype/interfaces/ants/tests/test_auto_ConvertScalarImageToRGB.py +++ b/nipype/interfaces/ants/tests/test_auto_ConvertScalarImageToRGB.py @@ -23,7 +23,8 @@ def test_ConvertScalarImageToRGB_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), input_image=dict(argstr='%s', diff --git a/nipype/interfaces/ants/tests/test_auto_CorticalThickness.py b/nipype/interfaces/ants/tests/test_auto_CorticalThickness.py index 4216eb047d..8ad0203370 100644 --- a/nipype/interfaces/ants/tests/test_auto_CorticalThickness.py +++ b/nipype/interfaces/ants/tests/test_auto_CorticalThickness.py @@ -29,7 +29,8 @@ def test_CorticalThickness_inputs(): ), extraction_registration_mask=dict(argstr='-f %s', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), image_suffix=dict(argstr='-s %s', diff --git a/nipype/interfaces/ants/tests/test_auto_CreateJacobianDeterminantImage.py b/nipype/interfaces/ants/tests/test_auto_CreateJacobianDeterminantImage.py index b5531137aa..561853e79b 100644 --- a/nipype/interfaces/ants/tests/test_auto_CreateJacobianDeterminantImage.py +++ b/nipype/interfaces/ants/tests/test_auto_CreateJacobianDeterminantImage.py @@ -16,7 +16,8 @@ def test_CreateJacobianDeterminantImage_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), imageDimension=dict(argstr='%d', diff --git a/nipype/interfaces/ants/tests/test_auto_CreateTiledMosaic.py b/nipype/interfaces/ants/tests/test_auto_CreateTiledMosaic.py index 14d8456fe1..38f24644a9 100644 --- a/nipype/interfaces/ants/tests/test_auto_CreateTiledMosaic.py +++ b/nipype/interfaces/ants/tests/test_auto_CreateTiledMosaic.py @@ -15,7 +15,8 @@ def test_CreateTiledMosaic_inputs(): ), flip_slice=dict(argstr='-f %s', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), input_image=dict(argstr='-i %s', diff --git a/nipype/interfaces/ants/tests/test_auto_DenoiseImage.py b/nipype/interfaces/ants/tests/test_auto_DenoiseImage.py index 5ba205137c..7d120a2f2e 100644 --- a/nipype/interfaces/ants/tests/test_auto_DenoiseImage.py +++ b/nipype/interfaces/ants/tests/test_auto_DenoiseImage.py @@ -12,7 +12,8 @@ def test_DenoiseImage_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), input_image=dict(argstr='-i %s', diff --git a/nipype/interfaces/ants/tests/test_auto_GenWarpFields.py b/nipype/interfaces/ants/tests/test_auto_GenWarpFields.py index b714d2c8a5..c58c8abf20 100644 --- a/nipype/interfaces/ants/tests/test_auto_GenWarpFields.py +++ b/nipype/interfaces/ants/tests/test_auto_GenWarpFields.py @@ -17,7 +17,8 @@ def test_GenWarpFields_inputs(): ), force_proceed=dict(argstr='-f 1', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), input_image=dict(argstr='-i %s', diff --git a/nipype/interfaces/ants/tests/test_auto_JointFusion.py b/nipype/interfaces/ants/tests/test_auto_JointFusion.py index 5f1dcb5256..796c7a7e13 100644 --- a/nipype/interfaces/ants/tests/test_auto_JointFusion.py +++ b/nipype/interfaces/ants/tests/test_auto_JointFusion.py @@ -26,7 +26,8 @@ def test_JointFusion_inputs(): ), exclusion_region=dict(argstr='-x %s', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), method=dict(argstr='-m %s', diff --git a/nipype/interfaces/ants/tests/test_auto_KellyKapowski.py b/nipype/interfaces/ants/tests/test_auto_KellyKapowski.py index 99936119bd..e94cd44b1d 100644 --- a/nipype/interfaces/ants/tests/test_auto_KellyKapowski.py +++ b/nipype/interfaces/ants/tests/test_auto_KellyKapowski.py @@ -28,7 +28,8 @@ def test_KellyKapowski_inputs(): ), gray_matter_prob_image=dict(argstr='--gray-matter-probability-image "%s"', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), max_invert_displacement_field_iters=dict(argstr='--maximum-number-of-invert-displacement-field-iterations %d', diff --git a/nipype/interfaces/ants/tests/test_auto_LaplacianThickness.py b/nipype/interfaces/ants/tests/test_auto_LaplacianThickness.py index 8a19b6fb64..83b6b37d83 100644 --- a/nipype/interfaces/ants/tests/test_auto_LaplacianThickness.py +++ b/nipype/interfaces/ants/tests/test_auto_LaplacianThickness.py @@ -12,7 +12,8 @@ def test_LaplacianThickness_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), input_gm=dict(argstr='%s', diff --git a/nipype/interfaces/ants/tests/test_auto_MeasureImageSimilarity.py b/nipype/interfaces/ants/tests/test_auto_MeasureImageSimilarity.py index 76787b1b87..fbed924b24 100644 --- a/nipype/interfaces/ants/tests/test_auto_MeasureImageSimilarity.py +++ b/nipype/interfaces/ants/tests/test_auto_MeasureImageSimilarity.py @@ -16,7 +16,8 @@ def test_MeasureImageSimilarity_inputs(): ), fixed_image_mask=dict(argstr='%s', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), metric=dict(argstr='%s', diff --git a/nipype/interfaces/ants/tests/test_auto_MultiplyImages.py b/nipype/interfaces/ants/tests/test_auto_MultiplyImages.py index bc14b1f0c2..5057cb4ddf 100644 --- a/nipype/interfaces/ants/tests/test_auto_MultiplyImages.py +++ b/nipype/interfaces/ants/tests/test_auto_MultiplyImages.py @@ -18,7 +18,8 @@ def test_MultiplyImages_inputs(): mandatory=True, position=1, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), num_threads=dict(nohash=True, diff --git a/nipype/interfaces/ants/tests/test_auto_N4BiasFieldCorrection.py b/nipype/interfaces/ants/tests/test_auto_N4BiasFieldCorrection.py index 72331ffb6b..044b16ce50 100644 --- a/nipype/interfaces/ants/tests/test_auto_N4BiasFieldCorrection.py +++ b/nipype/interfaces/ants/tests/test_auto_N4BiasFieldCorrection.py @@ -23,7 +23,8 @@ def test_N4BiasFieldCorrection_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), input_image=dict(argstr='--input-image %s', diff --git a/nipype/interfaces/ants/tests/test_auto_Registration.py b/nipype/interfaces/ants/tests/test_auto_Registration.py index 0d71636425..ea9bc02e79 100644 --- a/nipype/interfaces/ants/tests/test_auto_Registration.py +++ b/nipype/interfaces/ants/tests/test_auto_Registration.py @@ -32,7 +32,8 @@ def test_Registration_inputs(): ), float=dict(argstr='--float %d', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), initial_moving_transform=dict(argstr='%s', diff --git a/nipype/interfaces/ants/tests/test_auto_WarpImageMultiTransform.py b/nipype/interfaces/ants/tests/test_auto_WarpImageMultiTransform.py index 602ec83d27..9678152ba4 100644 --- a/nipype/interfaces/ants/tests/test_auto_WarpImageMultiTransform.py +++ b/nipype/interfaces/ants/tests/test_auto_WarpImageMultiTransform.py @@ -13,7 +13,8 @@ def test_WarpImageMultiTransform_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), input_image=dict(argstr='%s', diff --git a/nipype/interfaces/ants/tests/test_auto_WarpTimeSeriesImageMultiTransform.py b/nipype/interfaces/ants/tests/test_auto_WarpTimeSeriesImageMultiTransform.py index 7f0d6b13f2..f7f310b5f8 100644 --- a/nipype/interfaces/ants/tests/test_auto_WarpTimeSeriesImageMultiTransform.py +++ b/nipype/interfaces/ants/tests/test_auto_WarpTimeSeriesImageMultiTransform.py @@ -13,7 +13,8 @@ def test_WarpTimeSeriesImageMultiTransform_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), input_image=dict(argstr='%s', diff --git a/nipype/interfaces/ants/tests/test_auto_antsBrainExtraction.py b/nipype/interfaces/ants/tests/test_auto_antsBrainExtraction.py index d13cc2296e..05e12b9a00 100644 --- a/nipype/interfaces/ants/tests/test_auto_antsBrainExtraction.py +++ b/nipype/interfaces/ants/tests/test_auto_antsBrainExtraction.py @@ -26,7 +26,8 @@ def test_antsBrainExtraction_inputs(): ), extraction_registration_mask=dict(argstr='-f %s', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), image_suffix=dict(argstr='-s %s', diff --git a/nipype/interfaces/ants/tests/test_auto_antsCorticalThickness.py b/nipype/interfaces/ants/tests/test_auto_antsCorticalThickness.py index d5a891049e..0e7a7ca4ba 100644 --- a/nipype/interfaces/ants/tests/test_auto_antsCorticalThickness.py +++ b/nipype/interfaces/ants/tests/test_auto_antsCorticalThickness.py @@ -29,7 +29,8 @@ def test_antsCorticalThickness_inputs(): ), extraction_registration_mask=dict(argstr='-f %s', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), image_suffix=dict(argstr='-s %s', diff --git a/nipype/interfaces/ants/tests/test_auto_antsIntroduction.py b/nipype/interfaces/ants/tests/test_auto_antsIntroduction.py index 678231b004..7dfd0f6539 100644 --- a/nipype/interfaces/ants/tests/test_auto_antsIntroduction.py +++ b/nipype/interfaces/ants/tests/test_auto_antsIntroduction.py @@ -17,7 +17,8 @@ def test_antsIntroduction_inputs(): ), force_proceed=dict(argstr='-f 1', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), input_image=dict(argstr='-i %s', diff --git a/nipype/interfaces/ants/tests/test_auto_buildtemplateparallel.py b/nipype/interfaces/ants/tests/test_auto_buildtemplateparallel.py index 73c5499239..9b5005e840 100644 --- a/nipype/interfaces/ants/tests/test_auto_buildtemplateparallel.py +++ b/nipype/interfaces/ants/tests/test_auto_buildtemplateparallel.py @@ -17,7 +17,8 @@ def test_buildtemplateparallel_inputs(): ), gradient_step_size=dict(argstr='-g %f', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_files=dict(argstr='%s', diff --git a/nipype/interfaces/brainsuite/tests/test_auto_BDP.py b/nipype/interfaces/brainsuite/tests/test_auto_BDP.py index b9d7038198..8a3526360c 100644 --- a/nipype/interfaces/brainsuite/tests/test_auto_BDP.py +++ b/nipype/interfaces/brainsuite/tests/test_auto_BDP.py @@ -68,7 +68,8 @@ def test_BDP_inputs(): ), ignoreMemory=dict(argstr='--ignore-memory', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputDiffusionData=dict(argstr='--nii %s', diff --git a/nipype/interfaces/brainsuite/tests/test_auto_Bfc.py b/nipype/interfaces/brainsuite/tests/test_auto_Bfc.py index 7102bed23e..8183daa886 100644 --- a/nipype/interfaces/brainsuite/tests/test_auto_Bfc.py +++ b/nipype/interfaces/brainsuite/tests/test_auto_Bfc.py @@ -31,7 +31,8 @@ def test_Bfc_inputs(): ), histogramType=dict(argstr='%s', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputMRIFile=dict(argstr='-i %s', diff --git a/nipype/interfaces/brainsuite/tests/test_auto_Bse.py b/nipype/interfaces/brainsuite/tests/test_auto_Bse.py index 883c882aa1..d79dc8baa0 100644 --- a/nipype/interfaces/brainsuite/tests/test_auto_Bse.py +++ b/nipype/interfaces/brainsuite/tests/test_auto_Bse.py @@ -21,7 +21,8 @@ def test_Bse_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputMRIFile=dict(argstr='-i %s', diff --git a/nipype/interfaces/brainsuite/tests/test_auto_Cerebro.py b/nipype/interfaces/brainsuite/tests/test_auto_Cerebro.py index 551bbb210b..ac78853d2b 100644 --- a/nipype/interfaces/brainsuite/tests/test_auto_Cerebro.py +++ b/nipype/interfaces/brainsuite/tests/test_auto_Cerebro.py @@ -12,7 +12,8 @@ def test_Cerebro_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputAtlasLabelFile=dict(argstr='--atlaslabels %s', diff --git a/nipype/interfaces/brainsuite/tests/test_auto_Cortex.py b/nipype/interfaces/brainsuite/tests/test_auto_Cortex.py index 909124518d..badbcd7738 100644 --- a/nipype/interfaces/brainsuite/tests/test_auto_Cortex.py +++ b/nipype/interfaces/brainsuite/tests/test_auto_Cortex.py @@ -14,7 +14,8 @@ def test_Cortex_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), includeAllSubcorticalAreas=dict(argstr='-a', diff --git a/nipype/interfaces/brainsuite/tests/test_auto_Dewisp.py b/nipype/interfaces/brainsuite/tests/test_auto_Dewisp.py index 4d02736074..b96d456fce 100644 --- a/nipype/interfaces/brainsuite/tests/test_auto_Dewisp.py +++ b/nipype/interfaces/brainsuite/tests/test_auto_Dewisp.py @@ -9,7 +9,8 @@ def test_Dewisp_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputMaskFile=dict(argstr='-i %s', diff --git a/nipype/interfaces/brainsuite/tests/test_auto_Dfs.py b/nipype/interfaces/brainsuite/tests/test_auto_Dfs.py index 4f76cad507..d9a1752fc7 100644 --- a/nipype/interfaces/brainsuite/tests/test_auto_Dfs.py +++ b/nipype/interfaces/brainsuite/tests/test_auto_Dfs.py @@ -12,7 +12,8 @@ def test_Dfs_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputShadingVolume=dict(argstr='-c %s', diff --git a/nipype/interfaces/brainsuite/tests/test_auto_Hemisplit.py b/nipype/interfaces/brainsuite/tests/test_auto_Hemisplit.py index 55ccba8ad1..3909149567 100644 --- a/nipype/interfaces/brainsuite/tests/test_auto_Hemisplit.py +++ b/nipype/interfaces/brainsuite/tests/test_auto_Hemisplit.py @@ -9,7 +9,8 @@ def test_Hemisplit_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputHemisphereLabelFile=dict(argstr='-l %s', diff --git a/nipype/interfaces/brainsuite/tests/test_auto_Pialmesh.py b/nipype/interfaces/brainsuite/tests/test_auto_Pialmesh.py index ee59e2e62f..d161e2e6c0 100644 --- a/nipype/interfaces/brainsuite/tests/test_auto_Pialmesh.py +++ b/nipype/interfaces/brainsuite/tests/test_auto_Pialmesh.py @@ -11,7 +11,8 @@ def test_Pialmesh_inputs(): ), exportPrefix=dict(argstr='--prefix %s', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputMaskFile=dict(argstr='-m %s', diff --git a/nipype/interfaces/brainsuite/tests/test_auto_Pvc.py b/nipype/interfaces/brainsuite/tests/test_auto_Pvc.py index c0d9dcdaf1..06695eab51 100644 --- a/nipype/interfaces/brainsuite/tests/test_auto_Pvc.py +++ b/nipype/interfaces/brainsuite/tests/test_auto_Pvc.py @@ -9,7 +9,8 @@ def test_Pvc_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputMRIFile=dict(argstr='-i %s', diff --git a/nipype/interfaces/brainsuite/tests/test_auto_SVReg.py b/nipype/interfaces/brainsuite/tests/test_auto_SVReg.py index b270dc1d61..a5d7408cc6 100644 --- a/nipype/interfaces/brainsuite/tests/test_auto_SVReg.py +++ b/nipype/interfaces/brainsuite/tests/test_auto_SVReg.py @@ -20,7 +20,8 @@ def test_SVReg_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), iterations=dict(argstr="'-H %d'", diff --git a/nipype/interfaces/brainsuite/tests/test_auto_Scrubmask.py b/nipype/interfaces/brainsuite/tests/test_auto_Scrubmask.py index a902be5886..404ce27a25 100644 --- a/nipype/interfaces/brainsuite/tests/test_auto_Scrubmask.py +++ b/nipype/interfaces/brainsuite/tests/test_auto_Scrubmask.py @@ -15,7 +15,8 @@ def test_Scrubmask_inputs(): foregroundTrimThreshold=dict(argstr='-f %d', usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputMaskFile=dict(argstr='-i %s', diff --git a/nipype/interfaces/brainsuite/tests/test_auto_Skullfinder.py b/nipype/interfaces/brainsuite/tests/test_auto_Skullfinder.py index 5d75d4939c..254461d7eb 100644 --- a/nipype/interfaces/brainsuite/tests/test_auto_Skullfinder.py +++ b/nipype/interfaces/brainsuite/tests/test_auto_Skullfinder.py @@ -13,7 +13,8 @@ def test_Skullfinder_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputMRIFile=dict(argstr='-i %s', diff --git a/nipype/interfaces/brainsuite/tests/test_auto_Tca.py b/nipype/interfaces/brainsuite/tests/test_auto_Tca.py index 9301685533..ec25d193ba 100644 --- a/nipype/interfaces/brainsuite/tests/test_auto_Tca.py +++ b/nipype/interfaces/brainsuite/tests/test_auto_Tca.py @@ -12,7 +12,8 @@ def test_Tca_inputs(): foregroundDelta=dict(argstr='--delta %d', usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputMaskFile=dict(argstr='-i %s', diff --git a/nipype/interfaces/brainsuite/tests/test_auto_ThicknessPVC.py b/nipype/interfaces/brainsuite/tests/test_auto_ThicknessPVC.py index 7c055bd0c9..8956e36da5 100644 --- a/nipype/interfaces/brainsuite/tests/test_auto_ThicknessPVC.py +++ b/nipype/interfaces/brainsuite/tests/test_auto_ThicknessPVC.py @@ -9,7 +9,8 @@ def test_ThicknessPVC_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), subjectFilePrefix=dict(argstr='%s', diff --git a/nipype/interfaces/camino/tests/test_auto_AnalyzeHeader.py b/nipype/interfaces/camino/tests/test_auto_AnalyzeHeader.py index e56eb84a99..953a2688ac 100644 --- a/nipype/interfaces/camino/tests/test_auto_AnalyzeHeader.py +++ b/nipype/interfaces/camino/tests/test_auto_AnalyzeHeader.py @@ -23,7 +23,8 @@ def test_AnalyzeHeader_inputs(): greylevels=dict(argstr='-gl %s', units='NA', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='< %s', diff --git a/nipype/interfaces/camino/tests/test_auto_ComputeEigensystem.py b/nipype/interfaces/camino/tests/test_auto_ComputeEigensystem.py index c71c1371b3..422e6eceeb 100644 --- a/nipype/interfaces/camino/tests/test_auto_ComputeEigensystem.py +++ b/nipype/interfaces/camino/tests/test_auto_ComputeEigensystem.py @@ -9,7 +9,8 @@ def test_ComputeEigensystem_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='< %s', diff --git a/nipype/interfaces/camino/tests/test_auto_ComputeFractionalAnisotropy.py b/nipype/interfaces/camino/tests/test_auto_ComputeFractionalAnisotropy.py index 311d9182b8..81afa66e5f 100644 --- a/nipype/interfaces/camino/tests/test_auto_ComputeFractionalAnisotropy.py +++ b/nipype/interfaces/camino/tests/test_auto_ComputeFractionalAnisotropy.py @@ -9,7 +9,8 @@ def test_ComputeFractionalAnisotropy_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='< %s', diff --git a/nipype/interfaces/camino/tests/test_auto_ComputeMeanDiffusivity.py b/nipype/interfaces/camino/tests/test_auto_ComputeMeanDiffusivity.py index 09d5cbdc3e..9981b8d017 100644 --- a/nipype/interfaces/camino/tests/test_auto_ComputeMeanDiffusivity.py +++ b/nipype/interfaces/camino/tests/test_auto_ComputeMeanDiffusivity.py @@ -9,7 +9,8 @@ def test_ComputeMeanDiffusivity_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='< %s', diff --git a/nipype/interfaces/camino/tests/test_auto_ComputeTensorTrace.py b/nipype/interfaces/camino/tests/test_auto_ComputeTensorTrace.py index da428ebe3f..c3a41aa877 100644 --- a/nipype/interfaces/camino/tests/test_auto_ComputeTensorTrace.py +++ b/nipype/interfaces/camino/tests/test_auto_ComputeTensorTrace.py @@ -9,7 +9,8 @@ def test_ComputeTensorTrace_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='< %s', diff --git a/nipype/interfaces/camino/tests/test_auto_Conmat.py b/nipype/interfaces/camino/tests/test_auto_Conmat.py index e447923f0b..b55c60be67 100644 --- a/nipype/interfaces/camino/tests/test_auto_Conmat.py +++ b/nipype/interfaces/camino/tests/test_auto_Conmat.py @@ -9,7 +9,8 @@ def test_Conmat_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='-inputfile %s', diff --git a/nipype/interfaces/camino/tests/test_auto_DT2NIfTI.py b/nipype/interfaces/camino/tests/test_auto_DT2NIfTI.py index bb5012e6c1..1de87ea032 100644 --- a/nipype/interfaces/camino/tests/test_auto_DT2NIfTI.py +++ b/nipype/interfaces/camino/tests/test_auto_DT2NIfTI.py @@ -13,7 +13,8 @@ def test_DT2NIfTI_inputs(): mandatory=True, position=3, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='-inputfile %s', diff --git a/nipype/interfaces/camino/tests/test_auto_DTIFit.py b/nipype/interfaces/camino/tests/test_auto_DTIFit.py index d4907557dc..2210c1c41c 100644 --- a/nipype/interfaces/camino/tests/test_auto_DTIFit.py +++ b/nipype/interfaces/camino/tests/test_auto_DTIFit.py @@ -11,7 +11,8 @@ def test_DTIFit_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/camino/tests/test_auto_DTLUTGen.py b/nipype/interfaces/camino/tests/test_auto_DTLUTGen.py index 2d6d73f6cc..77f8f701dd 100644 --- a/nipype/interfaces/camino/tests/test_auto_DTLUTGen.py +++ b/nipype/interfaces/camino/tests/test_auto_DTLUTGen.py @@ -17,7 +17,8 @@ def test_DTLUTGen_inputs(): position=1, units='NA', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inversion=dict(argstr='-inversion %d', diff --git a/nipype/interfaces/camino/tests/test_auto_DTMetric.py b/nipype/interfaces/camino/tests/test_auto_DTMetric.py index 191cf83ba1..ffb95b0e89 100644 --- a/nipype/interfaces/camino/tests/test_auto_DTMetric.py +++ b/nipype/interfaces/camino/tests/test_auto_DTMetric.py @@ -14,7 +14,8 @@ def test_DTMetric_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputdatatype=dict(argstr='-inputdatatype %s', diff --git a/nipype/interfaces/camino/tests/test_auto_FSL2Scheme.py b/nipype/interfaces/camino/tests/test_auto_FSL2Scheme.py index 5b37c42c6c..d3aaf0ec2e 100644 --- a/nipype/interfaces/camino/tests/test_auto_FSL2Scheme.py +++ b/nipype/interfaces/camino/tests/test_auto_FSL2Scheme.py @@ -29,7 +29,8 @@ def test_FSL2Scheme_inputs(): ), flipz=dict(argstr='-flipz', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), interleave=dict(argstr='-interleave', diff --git a/nipype/interfaces/camino/tests/test_auto_Image2Voxel.py b/nipype/interfaces/camino/tests/test_auto_Image2Voxel.py index 88ee396011..bbb8690129 100644 --- a/nipype/interfaces/camino/tests/test_auto_Image2Voxel.py +++ b/nipype/interfaces/camino/tests/test_auto_Image2Voxel.py @@ -9,7 +9,8 @@ def test_Image2Voxel_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='-4dimage %s', diff --git a/nipype/interfaces/camino/tests/test_auto_ImageStats.py b/nipype/interfaces/camino/tests/test_auto_ImageStats.py index 597683508a..be0425cd89 100644 --- a/nipype/interfaces/camino/tests/test_auto_ImageStats.py +++ b/nipype/interfaces/camino/tests/test_auto_ImageStats.py @@ -9,7 +9,8 @@ def test_ImageStats_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_files=dict(argstr='-images %s', diff --git a/nipype/interfaces/camino/tests/test_auto_LinRecon.py b/nipype/interfaces/camino/tests/test_auto_LinRecon.py index b0686a5bdf..193bf51422 100644 --- a/nipype/interfaces/camino/tests/test_auto_LinRecon.py +++ b/nipype/interfaces/camino/tests/test_auto_LinRecon.py @@ -11,7 +11,8 @@ def test_LinRecon_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/camino/tests/test_auto_MESD.py b/nipype/interfaces/camino/tests/test_auto_MESD.py index a3ee83b6b4..ccd2f94a0c 100644 --- a/nipype/interfaces/camino/tests/test_auto_MESD.py +++ b/nipype/interfaces/camino/tests/test_auto_MESD.py @@ -14,7 +14,8 @@ def test_MESD_inputs(): fastmesd=dict(argstr='-fastmesd', requires=['mepointset'], ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='-inputfile %s', diff --git a/nipype/interfaces/camino/tests/test_auto_ModelFit.py b/nipype/interfaces/camino/tests/test_auto_ModelFit.py index 2ea5013e7b..bb88c3032b 100644 --- a/nipype/interfaces/camino/tests/test_auto_ModelFit.py +++ b/nipype/interfaces/camino/tests/test_auto_ModelFit.py @@ -19,7 +19,8 @@ def test_ModelFit_inputs(): ), fixedmodq=dict(argstr='-fixedmod %s', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='-inputfile %s', diff --git a/nipype/interfaces/camino/tests/test_auto_NIfTIDT2Camino.py b/nipype/interfaces/camino/tests/test_auto_NIfTIDT2Camino.py index ddd4acea8e..dd3c97bb5f 100644 --- a/nipype/interfaces/camino/tests/test_auto_NIfTIDT2Camino.py +++ b/nipype/interfaces/camino/tests/test_auto_NIfTIDT2Camino.py @@ -11,7 +11,8 @@ def test_NIfTIDT2Camino_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='-inputfile %s', diff --git a/nipype/interfaces/camino/tests/test_auto_PicoPDFs.py b/nipype/interfaces/camino/tests/test_auto_PicoPDFs.py index c55f63d155..db40520152 100644 --- a/nipype/interfaces/camino/tests/test_auto_PicoPDFs.py +++ b/nipype/interfaces/camino/tests/test_auto_PicoPDFs.py @@ -11,7 +11,8 @@ def test_PicoPDFs_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='< %s', diff --git a/nipype/interfaces/camino/tests/test_auto_ProcStreamlines.py b/nipype/interfaces/camino/tests/test_auto_ProcStreamlines.py index f215857b99..ad2c4df2a5 100644 --- a/nipype/interfaces/camino/tests/test_auto_ProcStreamlines.py +++ b/nipype/interfaces/camino/tests/test_auto_ProcStreamlines.py @@ -25,7 +25,8 @@ def test_ProcStreamlines_inputs(): ), gzip=dict(argstr='-gzip', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='-inputfile %s', diff --git a/nipype/interfaces/camino/tests/test_auto_QBallMX.py b/nipype/interfaces/camino/tests/test_auto_QBallMX.py index 473e8f8299..bcdf5ba627 100644 --- a/nipype/interfaces/camino/tests/test_auto_QBallMX.py +++ b/nipype/interfaces/camino/tests/test_auto_QBallMX.py @@ -12,7 +12,8 @@ def test_QBallMX_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), order=dict(argstr='-order %d', diff --git a/nipype/interfaces/camino/tests/test_auto_SFLUTGen.py b/nipype/interfaces/camino/tests/test_auto_SFLUTGen.py index a0323eaf3e..3bb61363e1 100644 --- a/nipype/interfaces/camino/tests/test_auto_SFLUTGen.py +++ b/nipype/interfaces/camino/tests/test_auto_SFLUTGen.py @@ -14,7 +14,8 @@ def test_SFLUTGen_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='-inputfile %s', diff --git a/nipype/interfaces/camino/tests/test_auto_SFPICOCalibData.py b/nipype/interfaces/camino/tests/test_auto_SFPICOCalibData.py index adcdeaa946..2d2cbc6ba5 100644 --- a/nipype/interfaces/camino/tests/test_auto_SFPICOCalibData.py +++ b/nipype/interfaces/camino/tests/test_auto_SFPICOCalibData.py @@ -9,7 +9,8 @@ def test_SFPICOCalibData_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), info_file=dict(argstr='-infooutputfile %s', diff --git a/nipype/interfaces/camino/tests/test_auto_SFPeaks.py b/nipype/interfaces/camino/tests/test_auto_SFPeaks.py index 2378fa4b82..00bb953015 100644 --- a/nipype/interfaces/camino/tests/test_auto_SFPeaks.py +++ b/nipype/interfaces/camino/tests/test_auto_SFPeaks.py @@ -12,7 +12,8 @@ def test_SFPeaks_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='-inputfile %s', diff --git a/nipype/interfaces/camino/tests/test_auto_Shredder.py b/nipype/interfaces/camino/tests/test_auto_Shredder.py index 70f6e786e7..695c529d3c 100644 --- a/nipype/interfaces/camino/tests/test_auto_Shredder.py +++ b/nipype/interfaces/camino/tests/test_auto_Shredder.py @@ -13,7 +13,8 @@ def test_Shredder_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='< %s', diff --git a/nipype/interfaces/camino/tests/test_auto_Track.py b/nipype/interfaces/camino/tests/test_auto_Track.py index f10e7b4936..510a970f39 100644 --- a/nipype/interfaces/camino/tests/test_auto_Track.py +++ b/nipype/interfaces/camino/tests/test_auto_Track.py @@ -23,7 +23,8 @@ def test_Track_inputs(): ), gzip=dict(argstr='-gzip', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='-inputfile %s', diff --git a/nipype/interfaces/camino/tests/test_auto_TrackBallStick.py b/nipype/interfaces/camino/tests/test_auto_TrackBallStick.py index 361838512d..d422972863 100644 --- a/nipype/interfaces/camino/tests/test_auto_TrackBallStick.py +++ b/nipype/interfaces/camino/tests/test_auto_TrackBallStick.py @@ -23,7 +23,8 @@ def test_TrackBallStick_inputs(): ), gzip=dict(argstr='-gzip', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='-inputfile %s', diff --git a/nipype/interfaces/camino/tests/test_auto_TrackBayesDirac.py b/nipype/interfaces/camino/tests/test_auto_TrackBayesDirac.py index 36eedf11f5..9fd6c6caac 100644 --- a/nipype/interfaces/camino/tests/test_auto_TrackBayesDirac.py +++ b/nipype/interfaces/camino/tests/test_auto_TrackBayesDirac.py @@ -33,7 +33,8 @@ def test_TrackBayesDirac_inputs(): ), gzip=dict(argstr='-gzip', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='-inputfile %s', diff --git a/nipype/interfaces/camino/tests/test_auto_TrackBedpostxDeter.py b/nipype/interfaces/camino/tests/test_auto_TrackBedpostxDeter.py index 9da147ba7c..7d23187cd5 100644 --- a/nipype/interfaces/camino/tests/test_auto_TrackBedpostxDeter.py +++ b/nipype/interfaces/camino/tests/test_auto_TrackBedpostxDeter.py @@ -26,7 +26,8 @@ def test_TrackBedpostxDeter_inputs(): ), gzip=dict(argstr='-gzip', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='-inputfile %s', diff --git a/nipype/interfaces/camino/tests/test_auto_TrackBedpostxProba.py b/nipype/interfaces/camino/tests/test_auto_TrackBedpostxProba.py index 84a94870dd..37d2e719dd 100644 --- a/nipype/interfaces/camino/tests/test_auto_TrackBedpostxProba.py +++ b/nipype/interfaces/camino/tests/test_auto_TrackBedpostxProba.py @@ -26,7 +26,8 @@ def test_TrackBedpostxProba_inputs(): ), gzip=dict(argstr='-gzip', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='-inputfile %s', diff --git a/nipype/interfaces/camino/tests/test_auto_TrackBootstrap.py b/nipype/interfaces/camino/tests/test_auto_TrackBootstrap.py index 8449ae0301..6f340c75bf 100644 --- a/nipype/interfaces/camino/tests/test_auto_TrackBootstrap.py +++ b/nipype/interfaces/camino/tests/test_auto_TrackBootstrap.py @@ -28,7 +28,8 @@ def test_TrackBootstrap_inputs(): ), gzip=dict(argstr='-gzip', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='-inputfile %s', diff --git a/nipype/interfaces/camino/tests/test_auto_TrackDT.py b/nipype/interfaces/camino/tests/test_auto_TrackDT.py index ef41e17b26..6e4e13fd67 100644 --- a/nipype/interfaces/camino/tests/test_auto_TrackDT.py +++ b/nipype/interfaces/camino/tests/test_auto_TrackDT.py @@ -23,7 +23,8 @@ def test_TrackDT_inputs(): ), gzip=dict(argstr='-gzip', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='-inputfile %s', diff --git a/nipype/interfaces/camino/tests/test_auto_TrackPICo.py b/nipype/interfaces/camino/tests/test_auto_TrackPICo.py index c8e6eb1bfb..814aa7d597 100644 --- a/nipype/interfaces/camino/tests/test_auto_TrackPICo.py +++ b/nipype/interfaces/camino/tests/test_auto_TrackPICo.py @@ -23,7 +23,8 @@ def test_TrackPICo_inputs(): ), gzip=dict(argstr='-gzip', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='-inputfile %s', diff --git a/nipype/interfaces/camino/tests/test_auto_TractShredder.py b/nipype/interfaces/camino/tests/test_auto_TractShredder.py index c81a1ed71a..9d53cd246f 100644 --- a/nipype/interfaces/camino/tests/test_auto_TractShredder.py +++ b/nipype/interfaces/camino/tests/test_auto_TractShredder.py @@ -13,7 +13,8 @@ def test_TractShredder_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='< %s', diff --git a/nipype/interfaces/camino/tests/test_auto_VtkStreamlines.py b/nipype/interfaces/camino/tests/test_auto_VtkStreamlines.py index 4b21696c21..1f7d8483a3 100644 --- a/nipype/interfaces/camino/tests/test_auto_VtkStreamlines.py +++ b/nipype/interfaces/camino/tests/test_auto_VtkStreamlines.py @@ -11,7 +11,8 @@ def test_VtkStreamlines_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr=' < %s', diff --git a/nipype/interfaces/camino2trackvis/tests/test_auto_Camino2Trackvis.py b/nipype/interfaces/camino2trackvis/tests/test_auto_Camino2Trackvis.py index 3d4d91e935..7c3049e98a 100644 --- a/nipype/interfaces/camino2trackvis/tests/test_auto_Camino2Trackvis.py +++ b/nipype/interfaces/camino2trackvis/tests/test_auto_Camino2Trackvis.py @@ -14,7 +14,8 @@ def test_Camino2Trackvis_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='-i %s', diff --git a/nipype/interfaces/camino2trackvis/tests/test_auto_Trackvis2Camino.py b/nipype/interfaces/camino2trackvis/tests/test_auto_Trackvis2Camino.py index 24d5aa8b19..4caa6e1ab9 100644 --- a/nipype/interfaces/camino2trackvis/tests/test_auto_Trackvis2Camino.py +++ b/nipype/interfaces/camino2trackvis/tests/test_auto_Trackvis2Camino.py @@ -12,7 +12,8 @@ def test_Trackvis2Camino_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='-i %s', diff --git a/nipype/interfaces/cmtk/tests/test_auto_AverageNetworks.py b/nipype/interfaces/cmtk/tests/test_auto_AverageNetworks.py index 6252ee9218..567de03ab3 100644 --- a/nipype/interfaces/cmtk/tests/test_auto_AverageNetworks.py +++ b/nipype/interfaces/cmtk/tests/test_auto_AverageNetworks.py @@ -6,7 +6,8 @@ def test_AverageNetworks_inputs(): input_map = dict(group_id=dict(usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_files=dict(mandatory=True, diff --git a/nipype/interfaces/cmtk/tests/test_auto_CFFConverter.py b/nipype/interfaces/cmtk/tests/test_auto_CFFConverter.py index ea97eaecd8..cf62691f3b 100644 --- a/nipype/interfaces/cmtk/tests/test_auto_CFFConverter.py +++ b/nipype/interfaces/cmtk/tests/test_auto_CFFConverter.py @@ -13,7 +13,8 @@ def test_CFFConverter_inputs(): gifti_surfaces=dict(), gpickled_networks=dict(), graphml_networks=dict(), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), license=dict(), diff --git a/nipype/interfaces/cmtk/tests/test_auto_CreateNodes.py b/nipype/interfaces/cmtk/tests/test_auto_CreateNodes.py index 3126066243..42efb72dfd 100644 --- a/nipype/interfaces/cmtk/tests/test_auto_CreateNodes.py +++ b/nipype/interfaces/cmtk/tests/test_auto_CreateNodes.py @@ -4,7 +4,8 @@ def test_CreateNodes_inputs(): - input_map = dict(ignore_exception=dict(nohash=True, + input_map = dict(ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), out_filename=dict(usedefault=True, diff --git a/nipype/interfaces/cmtk/tests/test_auto_MergeCNetworks.py b/nipype/interfaces/cmtk/tests/test_auto_MergeCNetworks.py index 18dd6c1ec6..2323461f35 100644 --- a/nipype/interfaces/cmtk/tests/test_auto_MergeCNetworks.py +++ b/nipype/interfaces/cmtk/tests/test_auto_MergeCNetworks.py @@ -4,7 +4,8 @@ def test_MergeCNetworks_inputs(): - input_map = dict(ignore_exception=dict(nohash=True, + input_map = dict(ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_files=dict(mandatory=True, diff --git a/nipype/interfaces/cmtk/tests/test_auto_NetworkBasedStatistic.py b/nipype/interfaces/cmtk/tests/test_auto_NetworkBasedStatistic.py index e031b8cae2..27f607c530 100644 --- a/nipype/interfaces/cmtk/tests/test_auto_NetworkBasedStatistic.py +++ b/nipype/interfaces/cmtk/tests/test_auto_NetworkBasedStatistic.py @@ -6,7 +6,8 @@ def test_NetworkBasedStatistic_inputs(): input_map = dict(edge_key=dict(usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_group1=dict(mandatory=True, diff --git a/nipype/interfaces/cmtk/tests/test_auto_NetworkXMetrics.py b/nipype/interfaces/cmtk/tests/test_auto_NetworkXMetrics.py index 46c077af1b..a8ccc8dd06 100644 --- a/nipype/interfaces/cmtk/tests/test_auto_NetworkXMetrics.py +++ b/nipype/interfaces/cmtk/tests/test_auto_NetworkXMetrics.py @@ -6,7 +6,8 @@ def test_NetworkXMetrics_inputs(): input_map = dict(compute_clique_related_measures=dict(usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(mandatory=True, diff --git a/nipype/interfaces/cmtk/tests/test_auto_Parcellate.py b/nipype/interfaces/cmtk/tests/test_auto_Parcellate.py index f62f98b51e..8de2e0bf9a 100644 --- a/nipype/interfaces/cmtk/tests/test_auto_Parcellate.py +++ b/nipype/interfaces/cmtk/tests/test_auto_Parcellate.py @@ -7,7 +7,8 @@ def test_Parcellate_inputs(): input_map = dict(dilation=dict(usedefault=True, ), freesurfer_dir=dict(), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), out_roi_file=dict(genfile=True, diff --git a/nipype/interfaces/cmtk/tests/test_auto_ROIGen.py b/nipype/interfaces/cmtk/tests/test_auto_ROIGen.py index 41f99aa5bf..a1c65f4db6 100644 --- a/nipype/interfaces/cmtk/tests/test_auto_ROIGen.py +++ b/nipype/interfaces/cmtk/tests/test_auto_ROIGen.py @@ -10,7 +10,8 @@ def test_ROIGen_inputs(): ), freesurfer_dir=dict(requires=['use_freesurfer_LUT'], ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), out_dict_file=dict(genfile=True, diff --git a/nipype/interfaces/diffusion_toolkit/tests/test_auto_DTIRecon.py b/nipype/interfaces/diffusion_toolkit/tests/test_auto_DTIRecon.py index c5d6a4f31b..569f1ac79f 100644 --- a/nipype/interfaces/diffusion_toolkit/tests/test_auto_DTIRecon.py +++ b/nipype/interfaces/diffusion_toolkit/tests/test_auto_DTIRecon.py @@ -20,7 +20,8 @@ def test_DTIRecon_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), image_orientation_vectors=dict(argstr='-iop %f', diff --git a/nipype/interfaces/diffusion_toolkit/tests/test_auto_DTITracker.py b/nipype/interfaces/diffusion_toolkit/tests/test_auto_DTITracker.py index 91a188d420..db5c48c1c9 100644 --- a/nipype/interfaces/diffusion_toolkit/tests/test_auto_DTITracker.py +++ b/nipype/interfaces/diffusion_toolkit/tests/test_auto_DTITracker.py @@ -13,7 +13,8 @@ def test_DTITracker_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), input_data_prefix=dict(argstr='%s', diff --git a/nipype/interfaces/diffusion_toolkit/tests/test_auto_HARDIMat.py b/nipype/interfaces/diffusion_toolkit/tests/test_auto_HARDIMat.py index a3797e5805..d85c9558de 100644 --- a/nipype/interfaces/diffusion_toolkit/tests/test_auto_HARDIMat.py +++ b/nipype/interfaces/diffusion_toolkit/tests/test_auto_HARDIMat.py @@ -15,7 +15,8 @@ def test_HARDIMat_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), image_info=dict(argstr='-info %s', diff --git a/nipype/interfaces/diffusion_toolkit/tests/test_auto_ODFRecon.py b/nipype/interfaces/diffusion_toolkit/tests/test_auto_ODFRecon.py index 9b5b2e744d..f4d116561e 100644 --- a/nipype/interfaces/diffusion_toolkit/tests/test_auto_ODFRecon.py +++ b/nipype/interfaces/diffusion_toolkit/tests/test_auto_ODFRecon.py @@ -17,7 +17,8 @@ def test_ODFRecon_inputs(): ), filter=dict(argstr='-f', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), image_orientation_vectors=dict(argstr='-iop %f', diff --git a/nipype/interfaces/diffusion_toolkit/tests/test_auto_ODFTracker.py b/nipype/interfaces/diffusion_toolkit/tests/test_auto_ODFTracker.py index 42a965c2e8..931375abd1 100644 --- a/nipype/interfaces/diffusion_toolkit/tests/test_auto_ODFTracker.py +++ b/nipype/interfaces/diffusion_toolkit/tests/test_auto_ODFTracker.py @@ -17,7 +17,8 @@ def test_ODFTracker_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), image_orientation_vectors=dict(argstr='-iop %f', diff --git a/nipype/interfaces/diffusion_toolkit/tests/test_auto_SplineFilter.py b/nipype/interfaces/diffusion_toolkit/tests/test_auto_SplineFilter.py index 6eb0ade6c2..7db4168340 100644 --- a/nipype/interfaces/diffusion_toolkit/tests/test_auto_SplineFilter.py +++ b/nipype/interfaces/diffusion_toolkit/tests/test_auto_SplineFilter.py @@ -9,7 +9,8 @@ def test_SplineFilter_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), output_file=dict(argstr='%s', diff --git a/nipype/interfaces/diffusion_toolkit/tests/test_auto_TrackMerge.py b/nipype/interfaces/diffusion_toolkit/tests/test_auto_TrackMerge.py index 3a31031465..8a9a0d9201 100644 --- a/nipype/interfaces/diffusion_toolkit/tests/test_auto_TrackMerge.py +++ b/nipype/interfaces/diffusion_toolkit/tests/test_auto_TrackMerge.py @@ -9,7 +9,8 @@ def test_TrackMerge_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), output_file=dict(argstr='%s', diff --git a/nipype/interfaces/dipy/tests/test_auto_APMQball.py b/nipype/interfaces/dipy/tests/test_auto_APMQball.py index 934bc3efff..33a5a512c7 100644 --- a/nipype/interfaces/dipy/tests/test_auto_APMQball.py +++ b/nipype/interfaces/dipy/tests/test_auto_APMQball.py @@ -6,7 +6,8 @@ def test_APMQball_inputs(): input_map = dict(b0_thres=dict(usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_bval=dict(mandatory=True, diff --git a/nipype/interfaces/dipy/tests/test_auto_CSD.py b/nipype/interfaces/dipy/tests/test_auto_CSD.py index 658294df02..bed97a5660 100644 --- a/nipype/interfaces/dipy/tests/test_auto_CSD.py +++ b/nipype/interfaces/dipy/tests/test_auto_CSD.py @@ -6,7 +6,8 @@ def test_CSD_inputs(): input_map = dict(b0_thres=dict(usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_bval=dict(mandatory=True, diff --git a/nipype/interfaces/dipy/tests/test_auto_DTI.py b/nipype/interfaces/dipy/tests/test_auto_DTI.py index fddaeb3bcb..524072e1e5 100644 --- a/nipype/interfaces/dipy/tests/test_auto_DTI.py +++ b/nipype/interfaces/dipy/tests/test_auto_DTI.py @@ -6,7 +6,8 @@ def test_DTI_inputs(): input_map = dict(b0_thres=dict(usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_bval=dict(mandatory=True, diff --git a/nipype/interfaces/dipy/tests/test_auto_DipyBaseInterface.py b/nipype/interfaces/dipy/tests/test_auto_DipyBaseInterface.py index 5b98c1353d..3807c48139 100644 --- a/nipype/interfaces/dipy/tests/test_auto_DipyBaseInterface.py +++ b/nipype/interfaces/dipy/tests/test_auto_DipyBaseInterface.py @@ -4,7 +4,8 @@ def test_DipyBaseInterface_inputs(): - input_map = dict(ignore_exception=dict(nohash=True, + input_map = dict(ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), ) diff --git a/nipype/interfaces/dipy/tests/test_auto_DipyDiffusionInterface.py b/nipype/interfaces/dipy/tests/test_auto_DipyDiffusionInterface.py index 6bee2dde83..63fabe8f88 100644 --- a/nipype/interfaces/dipy/tests/test_auto_DipyDiffusionInterface.py +++ b/nipype/interfaces/dipy/tests/test_auto_DipyDiffusionInterface.py @@ -6,7 +6,8 @@ def test_DipyDiffusionInterface_inputs(): input_map = dict(b0_thres=dict(usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_bval=dict(mandatory=True, diff --git a/nipype/interfaces/dipy/tests/test_auto_EstimateResponseSH.py b/nipype/interfaces/dipy/tests/test_auto_EstimateResponseSH.py index d03508c8ce..05f29f6dc3 100644 --- a/nipype/interfaces/dipy/tests/test_auto_EstimateResponseSH.py +++ b/nipype/interfaces/dipy/tests/test_auto_EstimateResponseSH.py @@ -10,7 +10,8 @@ def test_EstimateResponseSH_inputs(): ), fa_thresh=dict(usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_bval=dict(mandatory=True, diff --git a/nipype/interfaces/dipy/tests/test_auto_RESTORE.py b/nipype/interfaces/dipy/tests/test_auto_RESTORE.py index 5458d5bb98..61e48c856a 100644 --- a/nipype/interfaces/dipy/tests/test_auto_RESTORE.py +++ b/nipype/interfaces/dipy/tests/test_auto_RESTORE.py @@ -6,7 +6,8 @@ def test_RESTORE_inputs(): input_map = dict(b0_thres=dict(usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_bval=dict(mandatory=True, diff --git a/nipype/interfaces/dipy/tests/test_auto_SimulateMultiTensor.py b/nipype/interfaces/dipy/tests/test_auto_SimulateMultiTensor.py index a3d708fb71..546627441c 100644 --- a/nipype/interfaces/dipy/tests/test_auto_SimulateMultiTensor.py +++ b/nipype/interfaces/dipy/tests/test_auto_SimulateMultiTensor.py @@ -13,7 +13,8 @@ def test_SimulateMultiTensor_inputs(): diff_sf=dict(usedefault=True, ), gradients=dict(), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_bval=dict(), diff --git a/nipype/interfaces/dipy/tests/test_auto_StreamlineTractography.py b/nipype/interfaces/dipy/tests/test_auto_StreamlineTractography.py index 80ef4ecab4..09c03dafbc 100644 --- a/nipype/interfaces/dipy/tests/test_auto_StreamlineTractography.py +++ b/nipype/interfaces/dipy/tests/test_auto_StreamlineTractography.py @@ -7,7 +7,8 @@ def test_StreamlineTractography_inputs(): input_map = dict(gfa_thresh=dict(mandatory=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(mandatory=True, diff --git a/nipype/interfaces/dipy/tests/test_auto_TensorMode.py b/nipype/interfaces/dipy/tests/test_auto_TensorMode.py index 02000714a1..cb807e7ef8 100644 --- a/nipype/interfaces/dipy/tests/test_auto_TensorMode.py +++ b/nipype/interfaces/dipy/tests/test_auto_TensorMode.py @@ -6,7 +6,8 @@ def test_TensorMode_inputs(): input_map = dict(b0_thres=dict(usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_bval=dict(mandatory=True, diff --git a/nipype/interfaces/dipy/tests/test_auto_TrackDensityMap.py b/nipype/interfaces/dipy/tests/test_auto_TrackDensityMap.py index 8308be79e8..2a352d6e36 100644 --- a/nipype/interfaces/dipy/tests/test_auto_TrackDensityMap.py +++ b/nipype/interfaces/dipy/tests/test_auto_TrackDensityMap.py @@ -5,7 +5,8 @@ def test_TrackDensityMap_inputs(): input_map = dict(data_dims=dict(), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(mandatory=True, diff --git a/nipype/interfaces/elastix/tests/test_auto_AnalyzeWarp.py b/nipype/interfaces/elastix/tests/test_auto_AnalyzeWarp.py index 6c93d0b54b..2f53e07c77 100644 --- a/nipype/interfaces/elastix/tests/test_auto_AnalyzeWarp.py +++ b/nipype/interfaces/elastix/tests/test_auto_AnalyzeWarp.py @@ -9,7 +9,8 @@ def test_AnalyzeWarp_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), num_threads=dict(argstr='-threads %01d', diff --git a/nipype/interfaces/elastix/tests/test_auto_ApplyWarp.py b/nipype/interfaces/elastix/tests/test_auto_ApplyWarp.py index b2bef41dc4..7b6913f96f 100644 --- a/nipype/interfaces/elastix/tests/test_auto_ApplyWarp.py +++ b/nipype/interfaces/elastix/tests/test_auto_ApplyWarp.py @@ -9,7 +9,8 @@ def test_ApplyWarp_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), moving_image=dict(argstr='-in %s', diff --git a/nipype/interfaces/elastix/tests/test_auto_EditTransform.py b/nipype/interfaces/elastix/tests/test_auto_EditTransform.py index cd995b8aa2..58a7d72e01 100644 --- a/nipype/interfaces/elastix/tests/test_auto_EditTransform.py +++ b/nipype/interfaces/elastix/tests/test_auto_EditTransform.py @@ -4,7 +4,8 @@ def test_EditTransform_inputs(): - input_map = dict(ignore_exception=dict(nohash=True, + input_map = dict(ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), interpolation=dict(argstr='FinalBSplineInterpolationOrder', diff --git a/nipype/interfaces/elastix/tests/test_auto_PointsWarp.py b/nipype/interfaces/elastix/tests/test_auto_PointsWarp.py index 496f00962f..3853fe0e8c 100644 --- a/nipype/interfaces/elastix/tests/test_auto_PointsWarp.py +++ b/nipype/interfaces/elastix/tests/test_auto_PointsWarp.py @@ -9,7 +9,8 @@ def test_PointsWarp_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), num_threads=dict(argstr='-threads %01d', diff --git a/nipype/interfaces/elastix/tests/test_auto_Registration.py b/nipype/interfaces/elastix/tests/test_auto_Registration.py index 15b0202fe0..bf4c322e54 100644 --- a/nipype/interfaces/elastix/tests/test_auto_Registration.py +++ b/nipype/interfaces/elastix/tests/test_auto_Registration.py @@ -14,7 +14,8 @@ def test_Registration_inputs(): ), fixed_mask=dict(argstr='-fMask %s', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), initial_transform=dict(argstr='-t0 %s', diff --git a/nipype/interfaces/freesurfer/tests/test_auto_AddXFormToHeader.py b/nipype/interfaces/freesurfer/tests/test_auto_AddXFormToHeader.py index 0e3b028d0f..c2d0989c6f 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_AddXFormToHeader.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_AddXFormToHeader.py @@ -11,7 +11,8 @@ def test_AddXFormToHeader_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/freesurfer/tests/test_auto_Aparc2Aseg.py b/nipype/interfaces/freesurfer/tests/test_auto_Aparc2Aseg.py index e3222c5ecd..140efd6227 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_Aparc2Aseg.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_Aparc2Aseg.py @@ -19,7 +19,8 @@ def test_Aparc2Aseg_inputs(): filled=dict(), hypo_wm=dict(argstr='--hypo-as-wm', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), label_wm=dict(argstr='--labelwm', diff --git a/nipype/interfaces/freesurfer/tests/test_auto_Apas2Aseg.py b/nipype/interfaces/freesurfer/tests/test_auto_Apas2Aseg.py index a4195aacf4..3ee51e0398 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_Apas2Aseg.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_Apas2Aseg.py @@ -9,7 +9,8 @@ def test_Apas2Aseg_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='--i %s', diff --git a/nipype/interfaces/freesurfer/tests/test_auto_ApplyMask.py b/nipype/interfaces/freesurfer/tests/test_auto_ApplyMask.py index 2d59dc9ad5..cd10358bcf 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_ApplyMask.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_ApplyMask.py @@ -9,7 +9,8 @@ def test_ApplyMask_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/freesurfer/tests/test_auto_ApplyVolTransform.py b/nipype/interfaces/freesurfer/tests/test_auto_ApplyVolTransform.py index 1acd09f2df..a96bf413f5 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_ApplyVolTransform.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_ApplyVolTransform.py @@ -18,7 +18,8 @@ def test_ApplyVolTransform_inputs(): mandatory=True, xor=('reg_file', 'lta_file', 'lta_inv_file', 'fsl_reg_file', 'xfm_reg_file', 'reg_header', 'mni_152_reg', 'subject'), ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), interp=dict(argstr='--interp %s', diff --git a/nipype/interfaces/freesurfer/tests/test_auto_Binarize.py b/nipype/interfaces/freesurfer/tests/test_auto_Binarize.py index b40c661664..f0f1d8ba9d 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_Binarize.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_Binarize.py @@ -30,7 +30,8 @@ def test_Binarize_inputs(): ), frame_no=dict(argstr='--frame %s', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='--i %s', diff --git a/nipype/interfaces/freesurfer/tests/test_auto_CALabel.py b/nipype/interfaces/freesurfer/tests/test_auto_CALabel.py index d7ff3ceea6..00dc73eb06 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_CALabel.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_CALabel.py @@ -13,7 +13,8 @@ def test_CALabel_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/freesurfer/tests/test_auto_CANormalize.py b/nipype/interfaces/freesurfer/tests/test_auto_CANormalize.py index e9964201c6..bf4bdd612a 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_CANormalize.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_CANormalize.py @@ -15,7 +15,8 @@ def test_CANormalize_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/freesurfer/tests/test_auto_CARegister.py b/nipype/interfaces/freesurfer/tests/test_auto_CARegister.py index 6bc82e630d..d50d9d8e6b 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_CARegister.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_CARegister.py @@ -13,7 +13,8 @@ def test_CARegister_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/freesurfer/tests/test_auto_CheckTalairachAlignment.py b/nipype/interfaces/freesurfer/tests/test_auto_CheckTalairachAlignment.py index 305a98631a..d59e369b33 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_CheckTalairachAlignment.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_CheckTalairachAlignment.py @@ -9,7 +9,8 @@ def test_CheckTalairachAlignment_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='-xfm %s', diff --git a/nipype/interfaces/freesurfer/tests/test_auto_Concatenate.py b/nipype/interfaces/freesurfer/tests/test_auto_Concatenate.py index 2c49bcde29..ea3dc4b1bb 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_Concatenate.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_Concatenate.py @@ -18,7 +18,8 @@ def test_Concatenate_inputs(): ), gmean=dict(argstr='--gmean %d', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_files=dict(argstr='--i %s...', diff --git a/nipype/interfaces/freesurfer/tests/test_auto_ConcatenateLTA.py b/nipype/interfaces/freesurfer/tests/test_auto_ConcatenateLTA.py index 2357c8709b..8dd0b1cb9e 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_ConcatenateLTA.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_ConcatenateLTA.py @@ -9,7 +9,8 @@ def test_ConcatenateLTA_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_lta1=dict(argstr='%s', diff --git a/nipype/interfaces/freesurfer/tests/test_auto_Contrast.py b/nipype/interfaces/freesurfer/tests/test_auto_Contrast.py index 033dd191c3..1cdec290b2 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_Contrast.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_Contrast.py @@ -17,7 +17,8 @@ def test_Contrast_inputs(): hemisphere=dict(argstr='--%s-only', mandatory=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), orig=dict(mandatory=True, diff --git a/nipype/interfaces/freesurfer/tests/test_auto_Curvature.py b/nipype/interfaces/freesurfer/tests/test_auto_Curvature.py index 403012522f..3c6d0d91a3 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_Curvature.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_Curvature.py @@ -14,7 +14,8 @@ def test_Curvature_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/freesurfer/tests/test_auto_CurvatureStats.py b/nipype/interfaces/freesurfer/tests/test_auto_CurvatureStats.py index d269a87590..06385fc361 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_CurvatureStats.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_CurvatureStats.py @@ -22,7 +22,8 @@ def test_CurvatureStats_inputs(): mandatory=True, position=-3, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), min_max=dict(argstr='-m', diff --git a/nipype/interfaces/freesurfer/tests/test_auto_DICOMConvert.py b/nipype/interfaces/freesurfer/tests/test_auto_DICOMConvert.py index b88f3ec1d1..f517b74200 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_DICOMConvert.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_DICOMConvert.py @@ -15,7 +15,8 @@ def test_DICOMConvert_inputs(): usedefault=True, ), file_mapping=dict(), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), ignore_single_slice=dict(requires=['dicom_info'], diff --git a/nipype/interfaces/freesurfer/tests/test_auto_EMRegister.py b/nipype/interfaces/freesurfer/tests/test_auto_EMRegister.py index 2050442d47..f0aa686853 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_EMRegister.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_EMRegister.py @@ -9,7 +9,8 @@ def test_EMRegister_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/freesurfer/tests/test_auto_EditWMwithAseg.py b/nipype/interfaces/freesurfer/tests/test_auto_EditWMwithAseg.py index bfc5818d37..aa23199671 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_EditWMwithAseg.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_EditWMwithAseg.py @@ -13,7 +13,8 @@ def test_EditWMwithAseg_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/freesurfer/tests/test_auto_EulerNumber.py b/nipype/interfaces/freesurfer/tests/test_auto_EulerNumber.py index cd3d64524b..910e415852 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_EulerNumber.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_EulerNumber.py @@ -9,7 +9,8 @@ def test_EulerNumber_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/freesurfer/tests/test_auto_ExtractMainComponent.py b/nipype/interfaces/freesurfer/tests/test_auto_ExtractMainComponent.py index 41e9c2c264..439378afe4 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_ExtractMainComponent.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_ExtractMainComponent.py @@ -9,7 +9,8 @@ def test_ExtractMainComponent_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/freesurfer/tests/test_auto_FSCommand.py b/nipype/interfaces/freesurfer/tests/test_auto_FSCommand.py index d56a704619..bd9d6e0e0f 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_FSCommand.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_FSCommand.py @@ -9,7 +9,8 @@ def test_FSCommand_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), subjects_dir=dict(), diff --git a/nipype/interfaces/freesurfer/tests/test_auto_FSCommandOpenMP.py b/nipype/interfaces/freesurfer/tests/test_auto_FSCommandOpenMP.py index ee89b8242f..d9a7a8c6f6 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_FSCommandOpenMP.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_FSCommandOpenMP.py @@ -9,7 +9,8 @@ def test_FSCommandOpenMP_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), num_threads=dict(), diff --git a/nipype/interfaces/freesurfer/tests/test_auto_FSScriptCommand.py b/nipype/interfaces/freesurfer/tests/test_auto_FSScriptCommand.py index 45c1646355..6bbb0ed0d7 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_FSScriptCommand.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_FSScriptCommand.py @@ -9,7 +9,8 @@ def test_FSScriptCommand_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), subjects_dir=dict(), diff --git a/nipype/interfaces/freesurfer/tests/test_auto_FitMSParams.py b/nipype/interfaces/freesurfer/tests/test_auto_FitMSParams.py index a5b63f9b03..22280e25a9 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_FitMSParams.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_FitMSParams.py @@ -10,7 +10,8 @@ def test_FitMSParams_inputs(): usedefault=True, ), flip_list=dict(), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_files=dict(argstr='%s', diff --git a/nipype/interfaces/freesurfer/tests/test_auto_FixTopology.py b/nipype/interfaces/freesurfer/tests/test_auto_FixTopology.py index 7739767eb1..2176d18d54 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_FixTopology.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_FixTopology.py @@ -17,7 +17,8 @@ def test_FixTopology_inputs(): mandatory=True, position=-1, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_brain=dict(mandatory=True, diff --git a/nipype/interfaces/freesurfer/tests/test_auto_FuseSegmentations.py b/nipype/interfaces/freesurfer/tests/test_auto_FuseSegmentations.py index 3d713eeb63..f2d4e53fa6 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_FuseSegmentations.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_FuseSegmentations.py @@ -9,7 +9,8 @@ def test_FuseSegmentations_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_norms=dict(argstr='-n %s', diff --git a/nipype/interfaces/freesurfer/tests/test_auto_GLMFit.py b/nipype/interfaces/freesurfer/tests/test_auto_GLMFit.py index e122d0dc75..7b81fee22b 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_GLMFit.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_GLMFit.py @@ -51,7 +51,8 @@ def test_GLMFit_inputs(): genfile=True, ), hemi=dict(), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='--y %s', diff --git a/nipype/interfaces/freesurfer/tests/test_auto_ImageInfo.py b/nipype/interfaces/freesurfer/tests/test_auto_ImageInfo.py index 35bd042ad6..f49055a47e 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_ImageInfo.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_ImageInfo.py @@ -9,7 +9,8 @@ def test_ImageInfo_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/freesurfer/tests/test_auto_Jacobian.py b/nipype/interfaces/freesurfer/tests/test_auto_Jacobian.py index 270a10a460..fe6998874f 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_Jacobian.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_Jacobian.py @@ -9,7 +9,8 @@ def test_Jacobian_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_mappedsurf=dict(argstr='%s', diff --git a/nipype/interfaces/freesurfer/tests/test_auto_LTAConvert.py b/nipype/interfaces/freesurfer/tests/test_auto_LTAConvert.py index 1b82182f63..867e01e00d 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_LTAConvert.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_LTAConvert.py @@ -9,7 +9,8 @@ def test_LTAConvert_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_fsl=dict(argstr='--infsl %s', diff --git a/nipype/interfaces/freesurfer/tests/test_auto_Label2Annot.py b/nipype/interfaces/freesurfer/tests/test_auto_Label2Annot.py index a8fa6e56b4..beece1b6d3 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_Label2Annot.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_Label2Annot.py @@ -15,7 +15,8 @@ def test_Label2Annot_inputs(): hemisphere=dict(argstr='--hemi %s', mandatory=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_labels=dict(argstr='--l %s...', diff --git a/nipype/interfaces/freesurfer/tests/test_auto_Label2Label.py b/nipype/interfaces/freesurfer/tests/test_auto_Label2Label.py index 0b6a68ebf2..55ed8f026c 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_Label2Label.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_Label2Label.py @@ -13,7 +13,8 @@ def test_Label2Label_inputs(): hemisphere=dict(argstr='--hemi %s', mandatory=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), out_file=dict(argstr='--trglabel %s', diff --git a/nipype/interfaces/freesurfer/tests/test_auto_Label2Vol.py b/nipype/interfaces/freesurfer/tests/test_auto_Label2Vol.py index f80602f76b..25b680036e 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_Label2Vol.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_Label2Vol.py @@ -26,7 +26,8 @@ def test_Label2Vol_inputs(): identity=dict(argstr='--identity', xor=('reg_file', 'reg_header', 'identity'), ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), invert_mtx=dict(argstr='--invertmtx', diff --git a/nipype/interfaces/freesurfer/tests/test_auto_MNIBiasCorrection.py b/nipype/interfaces/freesurfer/tests/test_auto_MNIBiasCorrection.py index f10ba94ef6..1cd0eacc4d 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_MNIBiasCorrection.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_MNIBiasCorrection.py @@ -11,7 +11,8 @@ def test_MNIBiasCorrection_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='--i %s', diff --git a/nipype/interfaces/freesurfer/tests/test_auto_MPRtoMNI305.py b/nipype/interfaces/freesurfer/tests/test_auto_MPRtoMNI305.py index 70d4e2c89b..1f64be215d 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_MPRtoMNI305.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_MPRtoMNI305.py @@ -9,7 +9,8 @@ def test_MPRtoMNI305_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/freesurfer/tests/test_auto_MRIConvert.py b/nipype/interfaces/freesurfer/tests/test_auto_MRIConvert.py index 906fadef0c..8b5bc1135d 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_MRIConvert.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_MRIConvert.py @@ -49,7 +49,8 @@ def test_MRIConvert_inputs(): ), fwhm=dict(argstr='--fwhm %f', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_center=dict(argstr='--in_center %s', diff --git a/nipype/interfaces/freesurfer/tests/test_auto_MRICoreg.py b/nipype/interfaces/freesurfer/tests/test_auto_MRICoreg.py index 12800572d9..e04b306c69 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_MRICoreg.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_MRICoreg.py @@ -21,7 +21,8 @@ def test_MRICoreg_inputs(): ), ftol=dict(argstr='--ftol %e', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), initial_rotation=dict(argstr='--rot %g %g %g', diff --git a/nipype/interfaces/freesurfer/tests/test_auto_MRIFill.py b/nipype/interfaces/freesurfer/tests/test_auto_MRIFill.py index e1c05fd17a..f45165af12 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_MRIFill.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_MRIFill.py @@ -9,7 +9,8 @@ def test_MRIFill_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/freesurfer/tests/test_auto_MRIMarchingCubes.py b/nipype/interfaces/freesurfer/tests/test_auto_MRIMarchingCubes.py index df7cfaa11f..9f333c2643 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_MRIMarchingCubes.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_MRIMarchingCubes.py @@ -13,7 +13,8 @@ def test_MRIMarchingCubes_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/freesurfer/tests/test_auto_MRIPretess.py b/nipype/interfaces/freesurfer/tests/test_auto_MRIPretess.py index 1e61184ec1..87dc5ce59f 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_MRIPretess.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_MRIPretess.py @@ -9,7 +9,8 @@ def test_MRIPretess_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_filled=dict(argstr='%s', diff --git a/nipype/interfaces/freesurfer/tests/test_auto_MRISPreproc.py b/nipype/interfaces/freesurfer/tests/test_auto_MRISPreproc.py index 21ea0de247..2e0d137668 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_MRISPreproc.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_MRISPreproc.py @@ -21,7 +21,8 @@ def test_MRISPreproc_inputs(): hemi=dict(argstr='--hemi %s', mandatory=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), num_iters=dict(argstr='--niters %d', diff --git a/nipype/interfaces/freesurfer/tests/test_auto_MRISPreprocReconAll.py b/nipype/interfaces/freesurfer/tests/test_auto_MRISPreprocReconAll.py index 79cd8056d0..56860ed6d3 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_MRISPreprocReconAll.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_MRISPreprocReconAll.py @@ -22,7 +22,8 @@ def test_MRISPreprocReconAll_inputs(): hemi=dict(argstr='--hemi %s', mandatory=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), lh_surfreg_target=dict(requires=['surfreg_files'], diff --git a/nipype/interfaces/freesurfer/tests/test_auto_MRITessellate.py b/nipype/interfaces/freesurfer/tests/test_auto_MRITessellate.py index 410d64b706..9829b19326 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_MRITessellate.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_MRITessellate.py @@ -9,7 +9,8 @@ def test_MRITessellate_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/freesurfer/tests/test_auto_MRIsCALabel.py b/nipype/interfaces/freesurfer/tests/test_auto_MRIsCALabel.py index 7298ab6b0c..9c70889d59 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_MRIsCALabel.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_MRIsCALabel.py @@ -26,7 +26,8 @@ def test_MRIsCALabel_inputs(): mandatory=True, position=-4, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), label=dict(argstr='-l %s', diff --git a/nipype/interfaces/freesurfer/tests/test_auto_MRIsCalc.py b/nipype/interfaces/freesurfer/tests/test_auto_MRIsCalc.py index 280e9e5ce0..0844523ac8 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_MRIsCalc.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_MRIsCalc.py @@ -13,7 +13,8 @@ def test_MRIsCalc_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file1=dict(argstr='%s', diff --git a/nipype/interfaces/freesurfer/tests/test_auto_MRIsCombine.py b/nipype/interfaces/freesurfer/tests/test_auto_MRIsCombine.py index 6262f74dbb..8ac919ad65 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_MRIsCombine.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_MRIsCombine.py @@ -9,7 +9,8 @@ def test_MRIsCombine_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_files=dict(argstr='--combinesurfs %s', diff --git a/nipype/interfaces/freesurfer/tests/test_auto_MRIsConvert.py b/nipype/interfaces/freesurfer/tests/test_auto_MRIsConvert.py index a6c07208d7..5fda94dd63 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_MRIsConvert.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_MRIsConvert.py @@ -15,7 +15,8 @@ def test_MRIsConvert_inputs(): ), functional_file=dict(argstr='-f %s', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/freesurfer/tests/test_auto_MRIsExpand.py b/nipype/interfaces/freesurfer/tests/test_auto_MRIsExpand.py index 995135da03..e292a2b2c5 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_MRIsExpand.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_MRIsExpand.py @@ -15,7 +15,8 @@ def test_MRIsExpand_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/freesurfer/tests/test_auto_MRIsInflate.py b/nipype/interfaces/freesurfer/tests/test_auto_MRIsInflate.py index 2ebe152b0a..3a93d5f1e1 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_MRIsInflate.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_MRIsInflate.py @@ -9,7 +9,8 @@ def test_MRIsInflate_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/freesurfer/tests/test_auto_MS_LDA.py b/nipype/interfaces/freesurfer/tests/test_auto_MS_LDA.py index 86898a7bdb..97321adec8 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_MS_LDA.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_MS_LDA.py @@ -11,7 +11,8 @@ def test_MS_LDA_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), images=dict(argstr='%s', diff --git a/nipype/interfaces/freesurfer/tests/test_auto_MakeAverageSubject.py b/nipype/interfaces/freesurfer/tests/test_auto_MakeAverageSubject.py index bc833d1d73..d0fec86806 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_MakeAverageSubject.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_MakeAverageSubject.py @@ -9,7 +9,8 @@ def test_MakeAverageSubject_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), out_name=dict(argstr='--out %s', diff --git a/nipype/interfaces/freesurfer/tests/test_auto_MakeSurfaces.py b/nipype/interfaces/freesurfer/tests/test_auto_MakeSurfaces.py index f90e1ca7e8..ed5c9021ab 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_MakeSurfaces.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_MakeSurfaces.py @@ -16,7 +16,8 @@ def test_MakeSurfaces_inputs(): mandatory=True, position=-1, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_T1=dict(argstr='-T1 %s', diff --git a/nipype/interfaces/freesurfer/tests/test_auto_Normalize.py b/nipype/interfaces/freesurfer/tests/test_auto_Normalize.py index efe7f34d9f..33319e77ed 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_Normalize.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_Normalize.py @@ -12,7 +12,8 @@ def test_Normalize_inputs(): gradient=dict(argstr='-g %d', usedefault=False, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/freesurfer/tests/test_auto_OneSampleTTest.py b/nipype/interfaces/freesurfer/tests/test_auto_OneSampleTTest.py index 147a020837..a1bb43f9c5 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_OneSampleTTest.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_OneSampleTTest.py @@ -51,7 +51,8 @@ def test_OneSampleTTest_inputs(): genfile=True, ), hemi=dict(), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='--y %s', diff --git a/nipype/interfaces/freesurfer/tests/test_auto_Paint.py b/nipype/interfaces/freesurfer/tests/test_auto_Paint.py index a8e2c0c582..27d836b4f7 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_Paint.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_Paint.py @@ -11,7 +11,8 @@ def test_Paint_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_surf=dict(argstr='%s', diff --git a/nipype/interfaces/freesurfer/tests/test_auto_ParcellationStats.py b/nipype/interfaces/freesurfer/tests/test_auto_ParcellationStats.py index 4c51a0b2fb..57034c4367 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_ParcellationStats.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_ParcellationStats.py @@ -19,7 +19,8 @@ def test_ParcellationStats_inputs(): mandatory=True, position=-2, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_annotation=dict(argstr='-a %s', diff --git a/nipype/interfaces/freesurfer/tests/test_auto_ParseDICOMDir.py b/nipype/interfaces/freesurfer/tests/test_auto_ParseDICOMDir.py index ba90aa1ff2..59c1d931d9 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_ParseDICOMDir.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_ParseDICOMDir.py @@ -15,7 +15,8 @@ def test_ParseDICOMDir_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), sortbyrun=dict(argstr='--sortbyrun', diff --git a/nipype/interfaces/freesurfer/tests/test_auto_ReconAll.py b/nipype/interfaces/freesurfer/tests/test_auto_ReconAll.py index f823855333..b28d035254 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_ReconAll.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_ReconAll.py @@ -40,7 +40,8 @@ def test_ReconAll_inputs(): hires=dict(argstr='-hires', min_ver='6.0.0', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), mprage=dict(argstr='-mprage', diff --git a/nipype/interfaces/freesurfer/tests/test_auto_Register.py b/nipype/interfaces/freesurfer/tests/test_auto_Register.py index 8a2646faec..fca0812be4 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_Register.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_Register.py @@ -12,7 +12,8 @@ def test_Register_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_smoothwm=dict(copyfile=True, diff --git a/nipype/interfaces/freesurfer/tests/test_auto_RegisterAVItoTalairach.py b/nipype/interfaces/freesurfer/tests/test_auto_RegisterAVItoTalairach.py index 0fef6c54f1..452cbb0cea 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_RegisterAVItoTalairach.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_RegisterAVItoTalairach.py @@ -9,7 +9,8 @@ def test_RegisterAVItoTalairach_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/freesurfer/tests/test_auto_RelabelHypointensities.py b/nipype/interfaces/freesurfer/tests/test_auto_RelabelHypointensities.py index 098795dc64..7e8aa0a3a7 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_RelabelHypointensities.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_RelabelHypointensities.py @@ -13,7 +13,8 @@ def test_RelabelHypointensities_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), lh_white=dict(copyfile=True, diff --git a/nipype/interfaces/freesurfer/tests/test_auto_RemoveIntersection.py b/nipype/interfaces/freesurfer/tests/test_auto_RemoveIntersection.py index cb49998f98..d3b9719662 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_RemoveIntersection.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_RemoveIntersection.py @@ -9,7 +9,8 @@ def test_RemoveIntersection_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/freesurfer/tests/test_auto_RemoveNeck.py b/nipype/interfaces/freesurfer/tests/test_auto_RemoveNeck.py index 210ebe74e0..ae697ecaab 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_RemoveNeck.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_RemoveNeck.py @@ -9,7 +9,8 @@ def test_RemoveNeck_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/freesurfer/tests/test_auto_Resample.py b/nipype/interfaces/freesurfer/tests/test_auto_Resample.py index 9b275c2718..eea61f7cbf 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_Resample.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_Resample.py @@ -9,7 +9,8 @@ def test_Resample_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='-i %s', diff --git a/nipype/interfaces/freesurfer/tests/test_auto_RobustRegister.py b/nipype/interfaces/freesurfer/tests/test_auto_RobustRegister.py index 5388029eac..48f121cd70 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_RobustRegister.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_RobustRegister.py @@ -31,7 +31,8 @@ def test_RobustRegister_inputs(): ), high_iterations=dict(argstr='--highit %d', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_xfm_file=dict(argstr='--transform', diff --git a/nipype/interfaces/freesurfer/tests/test_auto_RobustTemplate.py b/nipype/interfaces/freesurfer/tests/test_auto_RobustTemplate.py index d9b852bb36..c4fa30271b 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_RobustTemplate.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_RobustTemplate.py @@ -17,7 +17,8 @@ def test_RobustTemplate_inputs(): ), fixed_timepoint=dict(argstr='--fixtp', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_files=dict(argstr='--mov %s', diff --git a/nipype/interfaces/freesurfer/tests/test_auto_SampleToSurface.py b/nipype/interfaces/freesurfer/tests/test_auto_SampleToSurface.py index 74239f5db0..fd6440f10f 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_SampleToSurface.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_SampleToSurface.py @@ -32,7 +32,8 @@ def test_SampleToSurface_inputs(): ico_order=dict(argstr='--icoorder %d', requires=['target_subject'], ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), interp_method=dict(argstr='--interp %s', diff --git a/nipype/interfaces/freesurfer/tests/test_auto_SegStats.py b/nipype/interfaces/freesurfer/tests/test_auto_SegStats.py index fecdc0ddb1..1f329ac491 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_SegStats.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_SegStats.py @@ -49,7 +49,8 @@ def test_SegStats_inputs(): gca_color_table=dict(argstr='--ctab-gca %s', xor=('color_table_file', 'default_color_table', 'gca_color_table'), ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='--i %s', diff --git a/nipype/interfaces/freesurfer/tests/test_auto_SegStatsReconAll.py b/nipype/interfaces/freesurfer/tests/test_auto_SegStatsReconAll.py index 8860857354..45f79b2259 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_SegStatsReconAll.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_SegStatsReconAll.py @@ -51,7 +51,8 @@ def test_SegStatsReconAll_inputs(): gca_color_table=dict(argstr='--ctab-gca %s', xor=('color_table_file', 'default_color_table', 'gca_color_table'), ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='--i %s', diff --git a/nipype/interfaces/freesurfer/tests/test_auto_SegmentCC.py b/nipype/interfaces/freesurfer/tests/test_auto_SegmentCC.py index 80bfca6d6d..b6ad0b3891 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_SegmentCC.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_SegmentCC.py @@ -10,7 +10,8 @@ def test_SegmentCC_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='-aseg %s', diff --git a/nipype/interfaces/freesurfer/tests/test_auto_SegmentWM.py b/nipype/interfaces/freesurfer/tests/test_auto_SegmentWM.py index 03a9805404..5109680305 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_SegmentWM.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_SegmentWM.py @@ -9,7 +9,8 @@ def test_SegmentWM_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/freesurfer/tests/test_auto_Smooth.py b/nipype/interfaces/freesurfer/tests/test_auto_Smooth.py index 41ad8650c0..06035d71d0 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_Smooth.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_Smooth.py @@ -9,7 +9,8 @@ def test_Smooth_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='--i %s', diff --git a/nipype/interfaces/freesurfer/tests/test_auto_SmoothTessellation.py b/nipype/interfaces/freesurfer/tests/test_auto_SmoothTessellation.py index fdcc51f755..eb2d70bec1 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_SmoothTessellation.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_SmoothTessellation.py @@ -17,7 +17,8 @@ def test_SmoothTessellation_inputs(): ), gaussian_curvature_smoothing_steps=dict(argstr='%d', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/freesurfer/tests/test_auto_Sphere.py b/nipype/interfaces/freesurfer/tests/test_auto_Sphere.py index 2ac074eef8..ca5dd22c17 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_Sphere.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_Sphere.py @@ -9,7 +9,8 @@ def test_Sphere_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/freesurfer/tests/test_auto_SphericalAverage.py b/nipype/interfaces/freesurfer/tests/test_auto_SphericalAverage.py index b16cb6154c..54b5aab351 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_SphericalAverage.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_SphericalAverage.py @@ -19,7 +19,8 @@ def test_SphericalAverage_inputs(): mandatory=True, position=-4, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_average=dict(argstr='%s', diff --git a/nipype/interfaces/freesurfer/tests/test_auto_Surface2VolTransform.py b/nipype/interfaces/freesurfer/tests/test_auto_Surface2VolTransform.py index 276b1157a9..d97095b429 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_Surface2VolTransform.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_Surface2VolTransform.py @@ -12,7 +12,8 @@ def test_Surface2VolTransform_inputs(): hemi=dict(argstr='--hemi %s', mandatory=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), mkmask=dict(argstr='--mkmask', diff --git a/nipype/interfaces/freesurfer/tests/test_auto_SurfaceSmooth.py b/nipype/interfaces/freesurfer/tests/test_auto_SurfaceSmooth.py index e85ab3409a..a0a18ba287 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_SurfaceSmooth.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_SurfaceSmooth.py @@ -18,7 +18,8 @@ def test_SurfaceSmooth_inputs(): hemi=dict(argstr='--hemi %s', mandatory=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='--sval %s', diff --git a/nipype/interfaces/freesurfer/tests/test_auto_SurfaceSnapshots.py b/nipype/interfaces/freesurfer/tests/test_auto_SurfaceSnapshots.py index c7b9a48d32..b0c4a7c482 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_SurfaceSnapshots.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_SurfaceSnapshots.py @@ -26,7 +26,8 @@ def test_SurfaceSnapshots_inputs(): identity_reg=dict(argstr='-overlay-reg-identity', xor=['overlay_reg', 'identity_reg', 'mni152_reg'], ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), invert_overlay=dict(argstr='-invphaseflag 1', diff --git a/nipype/interfaces/freesurfer/tests/test_auto_SurfaceTransform.py b/nipype/interfaces/freesurfer/tests/test_auto_SurfaceTransform.py index a414aa7d62..fd3cb37931 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_SurfaceTransform.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_SurfaceTransform.py @@ -12,7 +12,8 @@ def test_SurfaceTransform_inputs(): hemi=dict(argstr='--hemi %s', mandatory=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), out_file=dict(argstr='--tval %s', diff --git a/nipype/interfaces/freesurfer/tests/test_auto_SynthesizeFLASH.py b/nipype/interfaces/freesurfer/tests/test_auto_SynthesizeFLASH.py index 15f89133ee..6c96565317 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_SynthesizeFLASH.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_SynthesizeFLASH.py @@ -16,7 +16,8 @@ def test_SynthesizeFLASH_inputs(): mandatory=True, position=3, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), out_file=dict(argstr='%s', diff --git a/nipype/interfaces/freesurfer/tests/test_auto_TalairachAVI.py b/nipype/interfaces/freesurfer/tests/test_auto_TalairachAVI.py index 37597e6973..f7f3136f77 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_TalairachAVI.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_TalairachAVI.py @@ -11,7 +11,8 @@ def test_TalairachAVI_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='--i %s', diff --git a/nipype/interfaces/freesurfer/tests/test_auto_TalairachQC.py b/nipype/interfaces/freesurfer/tests/test_auto_TalairachQC.py index 7c37835898..63ff45a3fe 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_TalairachQC.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_TalairachQC.py @@ -9,7 +9,8 @@ def test_TalairachQC_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), log_file=dict(argstr='%s', diff --git a/nipype/interfaces/freesurfer/tests/test_auto_Tkregister2.py b/nipype/interfaces/freesurfer/tests/test_auto_Tkregister2.py index d40c03d7d9..a4f018bd7e 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_Tkregister2.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_Tkregister2.py @@ -19,7 +19,8 @@ def test_Tkregister2_inputs(): fstarg=dict(argstr='--fstarg', xor=['target_image'], ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), invert_lta_in=dict(requires=['lta_in'], diff --git a/nipype/interfaces/freesurfer/tests/test_auto_UnpackSDICOMDir.py b/nipype/interfaces/freesurfer/tests/test_auto_UnpackSDICOMDir.py index f2f442d267..991a0e895f 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_UnpackSDICOMDir.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_UnpackSDICOMDir.py @@ -15,7 +15,8 @@ def test_UnpackSDICOMDir_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), log_file=dict(argstr='-log %s', diff --git a/nipype/interfaces/freesurfer/tests/test_auto_VolumeMask.py b/nipype/interfaces/freesurfer/tests/test_auto_VolumeMask.py index f86e2dde7a..1eaed2521b 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_VolumeMask.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_VolumeMask.py @@ -12,7 +12,8 @@ def test_VolumeMask_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_aseg=dict(argstr='--aseg_name %s', diff --git a/nipype/interfaces/freesurfer/tests/test_auto_WatershedSkullStrip.py b/nipype/interfaces/freesurfer/tests/test_auto_WatershedSkullStrip.py index f7f465ffce..f1f7469161 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_WatershedSkullStrip.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_WatershedSkullStrip.py @@ -12,7 +12,8 @@ def test_WatershedSkullStrip_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/fsl/tests/test_auto_AR1Image.py b/nipype/interfaces/fsl/tests/test_auto_AR1Image.py index 31a901ef47..e21844346a 100644 --- a/nipype/interfaces/fsl/tests/test_auto_AR1Image.py +++ b/nipype/interfaces/fsl/tests/test_auto_AR1Image.py @@ -13,7 +13,8 @@ def test_AR1Image_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/fsl/tests/test_auto_AccuracyTester.py b/nipype/interfaces/fsl/tests/test_auto_AccuracyTester.py index 91ce98c97c..dc5daa76c5 100644 --- a/nipype/interfaces/fsl/tests/test_auto_AccuracyTester.py +++ b/nipype/interfaces/fsl/tests/test_auto_AccuracyTester.py @@ -9,7 +9,8 @@ def test_AccuracyTester_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), mel_icas=dict(argstr='%s', diff --git a/nipype/interfaces/fsl/tests/test_auto_ApplyMask.py b/nipype/interfaces/fsl/tests/test_auto_ApplyMask.py index 4df9cf40c5..f5bad0d6f2 100644 --- a/nipype/interfaces/fsl/tests/test_auto_ApplyMask.py +++ b/nipype/interfaces/fsl/tests/test_auto_ApplyMask.py @@ -9,7 +9,8 @@ def test_ApplyMask_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/fsl/tests/test_auto_ApplyTOPUP.py b/nipype/interfaces/fsl/tests/test_auto_ApplyTOPUP.py index 837b00d06d..c60fc9f5de 100644 --- a/nipype/interfaces/fsl/tests/test_auto_ApplyTOPUP.py +++ b/nipype/interfaces/fsl/tests/test_auto_ApplyTOPUP.py @@ -14,7 +14,8 @@ def test_ApplyTOPUP_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_files=dict(argstr='--imain=%s', diff --git a/nipype/interfaces/fsl/tests/test_auto_ApplyWarp.py b/nipype/interfaces/fsl/tests/test_auto_ApplyWarp.py index fddbab5bea..7056d1d363 100644 --- a/nipype/interfaces/fsl/tests/test_auto_ApplyWarp.py +++ b/nipype/interfaces/fsl/tests/test_auto_ApplyWarp.py @@ -16,7 +16,8 @@ def test_ApplyWarp_inputs(): ), field_file=dict(argstr='--warp=%s', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='--in=%s', diff --git a/nipype/interfaces/fsl/tests/test_auto_ApplyXFM.py b/nipype/interfaces/fsl/tests/test_auto_ApplyXFM.py index 63f38443e4..9e8b4d0877 100644 --- a/nipype/interfaces/fsl/tests/test_auto_ApplyXFM.py +++ b/nipype/interfaces/fsl/tests/test_auto_ApplyXFM.py @@ -54,7 +54,8 @@ def test_ApplyXFM_inputs(): ), force_scaling=dict(argstr='-forcescaling', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='-in %s', diff --git a/nipype/interfaces/fsl/tests/test_auto_AvScale.py b/nipype/interfaces/fsl/tests/test_auto_AvScale.py index a95d7888ee..eb582cc783 100644 --- a/nipype/interfaces/fsl/tests/test_auto_AvScale.py +++ b/nipype/interfaces/fsl/tests/test_auto_AvScale.py @@ -11,7 +11,8 @@ def test_AvScale_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), mat_file=dict(argstr='%s', diff --git a/nipype/interfaces/fsl/tests/test_auto_B0Calc.py b/nipype/interfaces/fsl/tests/test_auto_B0Calc.py index 99e661ab8e..a03dba1061 100644 --- a/nipype/interfaces/fsl/tests/test_auto_B0Calc.py +++ b/nipype/interfaces/fsl/tests/test_auto_B0Calc.py @@ -19,7 +19,8 @@ def test_B0Calc_inputs(): ), extendboundary=dict(argstr='--extendboundary=%0.2f', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='-i %s', diff --git a/nipype/interfaces/fsl/tests/test_auto_BEDPOSTX5.py b/nipype/interfaces/fsl/tests/test_auto_BEDPOSTX5.py index db2d5c808a..7e57bdea55 100644 --- a/nipype/interfaces/fsl/tests/test_auto_BEDPOSTX5.py +++ b/nipype/interfaces/fsl/tests/test_auto_BEDPOSTX5.py @@ -39,7 +39,8 @@ def test_BEDPOSTX5_inputs(): grad_dev=dict(), gradnonlin=dict(argstr='-g', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), logdir=dict(argstr='--logdir=%s', diff --git a/nipype/interfaces/fsl/tests/test_auto_BET.py b/nipype/interfaces/fsl/tests/test_auto_BET.py index 9e0bfb356e..a0ba58c88a 100644 --- a/nipype/interfaces/fsl/tests/test_auto_BET.py +++ b/nipype/interfaces/fsl/tests/test_auto_BET.py @@ -17,7 +17,8 @@ def test_BET_inputs(): functional=dict(argstr='-F', xor=('functional', 'reduce_bias', 'robust', 'padding', 'remove_eyes', 'surfaces', 't2_guided'), ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/fsl/tests/test_auto_BinaryMaths.py b/nipype/interfaces/fsl/tests/test_auto_BinaryMaths.py index ddb06020cb..d4c8eed2f9 100644 --- a/nipype/interfaces/fsl/tests/test_auto_BinaryMaths.py +++ b/nipype/interfaces/fsl/tests/test_auto_BinaryMaths.py @@ -9,7 +9,8 @@ def test_BinaryMaths_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/fsl/tests/test_auto_ChangeDataType.py b/nipype/interfaces/fsl/tests/test_auto_ChangeDataType.py index a4c3f164bb..2142994a08 100644 --- a/nipype/interfaces/fsl/tests/test_auto_ChangeDataType.py +++ b/nipype/interfaces/fsl/tests/test_auto_ChangeDataType.py @@ -9,7 +9,8 @@ def test_ChangeDataType_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/fsl/tests/test_auto_Classifier.py b/nipype/interfaces/fsl/tests/test_auto_Classifier.py index 31458e74fa..d9e8180f87 100644 --- a/nipype/interfaces/fsl/tests/test_auto_Classifier.py +++ b/nipype/interfaces/fsl/tests/test_auto_Classifier.py @@ -10,7 +10,8 @@ def test_Classifier_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), mel_ica=dict(argstr='%s', diff --git a/nipype/interfaces/fsl/tests/test_auto_Cleaner.py b/nipype/interfaces/fsl/tests/test_auto_Cleaner.py index 6ec9fee3c1..08f40263b5 100644 --- a/nipype/interfaces/fsl/tests/test_auto_Cleaner.py +++ b/nipype/interfaces/fsl/tests/test_auto_Cleaner.py @@ -32,7 +32,8 @@ def test_Cleaner_inputs(): position=2, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), terminal_output=dict(deprecated='1.0.0', diff --git a/nipype/interfaces/fsl/tests/test_auto_Cluster.py b/nipype/interfaces/fsl/tests/test_auto_Cluster.py index f8d58401d5..8085989aad 100644 --- a/nipype/interfaces/fsl/tests/test_auto_Cluster.py +++ b/nipype/interfaces/fsl/tests/test_auto_Cluster.py @@ -21,7 +21,8 @@ def test_Cluster_inputs(): fractional=dict(argstr='--fractional', usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='--in=%s', diff --git a/nipype/interfaces/fsl/tests/test_auto_Complex.py b/nipype/interfaces/fsl/tests/test_auto_Complex.py index 1876cbb343..0a2133bb6f 100644 --- a/nipype/interfaces/fsl/tests/test_auto_Complex.py +++ b/nipype/interfaces/fsl/tests/test_auto_Complex.py @@ -39,7 +39,8 @@ def test_Complex_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), imaginary_in_file=dict(argstr='%s', diff --git a/nipype/interfaces/fsl/tests/test_auto_ContrastMgr.py b/nipype/interfaces/fsl/tests/test_auto_ContrastMgr.py index b5c71395c7..de4296e751 100644 --- a/nipype/interfaces/fsl/tests/test_auto_ContrastMgr.py +++ b/nipype/interfaces/fsl/tests/test_auto_ContrastMgr.py @@ -20,7 +20,8 @@ def test_ContrastMgr_inputs(): ), fcon_file=dict(argstr='-f %s', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), output_type=dict(), diff --git a/nipype/interfaces/fsl/tests/test_auto_ConvertWarp.py b/nipype/interfaces/fsl/tests/test_auto_ConvertWarp.py index 14a2747b5b..4ea9b536f9 100644 --- a/nipype/interfaces/fsl/tests/test_auto_ConvertWarp.py +++ b/nipype/interfaces/fsl/tests/test_auto_ConvertWarp.py @@ -14,7 +14,8 @@ def test_ConvertWarp_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), jacobian_max=dict(argstr='--jmax=%f', diff --git a/nipype/interfaces/fsl/tests/test_auto_ConvertXFM.py b/nipype/interfaces/fsl/tests/test_auto_ConvertXFM.py index 4531a6dc80..1dad2d7d63 100644 --- a/nipype/interfaces/fsl/tests/test_auto_ConvertXFM.py +++ b/nipype/interfaces/fsl/tests/test_auto_ConvertXFM.py @@ -19,7 +19,8 @@ def test_ConvertXFM_inputs(): requires=['in_file2'], xor=['invert_xfm', 'concat_xfm', 'fix_scale_skew'], ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/fsl/tests/test_auto_CopyGeom.py b/nipype/interfaces/fsl/tests/test_auto_CopyGeom.py index 7ced6130ed..8374c8c93d 100644 --- a/nipype/interfaces/fsl/tests/test_auto_CopyGeom.py +++ b/nipype/interfaces/fsl/tests/test_auto_CopyGeom.py @@ -20,7 +20,8 @@ def test_CopyGeom_inputs(): ignore_dims=dict(argstr='-d', position='-1', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/fsl/tests/test_auto_DTIFit.py b/nipype/interfaces/fsl/tests/test_auto_DTIFit.py index 2455d040c2..02e031519e 100644 --- a/nipype/interfaces/fsl/tests/test_auto_DTIFit.py +++ b/nipype/interfaces/fsl/tests/test_auto_DTIFit.py @@ -29,7 +29,8 @@ def test_DTIFit_inputs(): ), gradnonlin=dict(argstr='--gradnonlin=%s', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), little_bit=dict(argstr='--littlebit', diff --git a/nipype/interfaces/fsl/tests/test_auto_DilateImage.py b/nipype/interfaces/fsl/tests/test_auto_DilateImage.py index 69c1218cf9..2b8be886a6 100644 --- a/nipype/interfaces/fsl/tests/test_auto_DilateImage.py +++ b/nipype/interfaces/fsl/tests/test_auto_DilateImage.py @@ -9,7 +9,8 @@ def test_DilateImage_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/fsl/tests/test_auto_DistanceMap.py b/nipype/interfaces/fsl/tests/test_auto_DistanceMap.py index 2bf5805a30..1b063503dc 100644 --- a/nipype/interfaces/fsl/tests/test_auto_DistanceMap.py +++ b/nipype/interfaces/fsl/tests/test_auto_DistanceMap.py @@ -13,7 +13,8 @@ def test_DistanceMap_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='--in=%s', diff --git a/nipype/interfaces/fsl/tests/test_auto_DualRegression.py b/nipype/interfaces/fsl/tests/test_auto_DualRegression.py index 0552cf6837..894a3a3ad4 100644 --- a/nipype/interfaces/fsl/tests/test_auto_DualRegression.py +++ b/nipype/interfaces/fsl/tests/test_auto_DualRegression.py @@ -23,7 +23,8 @@ def test_DualRegression_inputs(): mandatory=True, position=1, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_files=dict(argstr='%s', diff --git a/nipype/interfaces/fsl/tests/test_auto_EPIDeWarp.py b/nipype/interfaces/fsl/tests/test_auto_EPIDeWarp.py index 5c52237ba7..969ecfa86d 100644 --- a/nipype/interfaces/fsl/tests/test_auto_EPIDeWarp.py +++ b/nipype/interfaces/fsl/tests/test_auto_EPIDeWarp.py @@ -27,7 +27,8 @@ def test_EPIDeWarp_inputs(): exfdw=dict(argstr='--exfdw %s', genfile=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), mag_file=dict(argstr='--mag %s', diff --git a/nipype/interfaces/fsl/tests/test_auto_Eddy.py b/nipype/interfaces/fsl/tests/test_auto_Eddy.py index c40deb16bf..df4155472d 100644 --- a/nipype/interfaces/fsl/tests/test_auto_Eddy.py +++ b/nipype/interfaces/fsl/tests/test_auto_Eddy.py @@ -25,7 +25,8 @@ def test_Eddy_inputs(): ), fwhm=dict(argstr='--fwhm=%s', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_acqp=dict(argstr='--acqp=%s', diff --git a/nipype/interfaces/fsl/tests/test_auto_EddyCorrect.py b/nipype/interfaces/fsl/tests/test_auto_EddyCorrect.py index 0f4da84475..57bf91ac79 100644 --- a/nipype/interfaces/fsl/tests/test_auto_EddyCorrect.py +++ b/nipype/interfaces/fsl/tests/test_auto_EddyCorrect.py @@ -9,7 +9,8 @@ def test_EddyCorrect_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/fsl/tests/test_auto_EpiReg.py b/nipype/interfaces/fsl/tests/test_auto_EpiReg.py index cf52ba99ee..65e8134a30 100644 --- a/nipype/interfaces/fsl/tests/test_auto_EpiReg.py +++ b/nipype/interfaces/fsl/tests/test_auto_EpiReg.py @@ -21,7 +21,8 @@ def test_EpiReg_inputs(): ), fmapmagbrain=dict(argstr='--fmapmagbrain=%s', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), no_clean=dict(argstr='--noclean', diff --git a/nipype/interfaces/fsl/tests/test_auto_ErodeImage.py b/nipype/interfaces/fsl/tests/test_auto_ErodeImage.py index 84ce60f014..015b97e59e 100644 --- a/nipype/interfaces/fsl/tests/test_auto_ErodeImage.py +++ b/nipype/interfaces/fsl/tests/test_auto_ErodeImage.py @@ -9,7 +9,8 @@ def test_ErodeImage_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/fsl/tests/test_auto_ExtractROI.py b/nipype/interfaces/fsl/tests/test_auto_ExtractROI.py index 158a059f71..8abad8a656 100644 --- a/nipype/interfaces/fsl/tests/test_auto_ExtractROI.py +++ b/nipype/interfaces/fsl/tests/test_auto_ExtractROI.py @@ -13,7 +13,8 @@ def test_ExtractROI_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/fsl/tests/test_auto_FAST.py b/nipype/interfaces/fsl/tests/test_auto_FAST.py index d1410d0fcd..a5e54b0882 100644 --- a/nipype/interfaces/fsl/tests/test_auto_FAST.py +++ b/nipype/interfaces/fsl/tests/test_auto_FAST.py @@ -16,7 +16,8 @@ def test_FAST_inputs(): ), hyper=dict(argstr='-H %.2f', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), img_type=dict(argstr='-t %d', diff --git a/nipype/interfaces/fsl/tests/test_auto_FEAT.py b/nipype/interfaces/fsl/tests/test_auto_FEAT.py index 52d990891a..bb024b4c29 100644 --- a/nipype/interfaces/fsl/tests/test_auto_FEAT.py +++ b/nipype/interfaces/fsl/tests/test_auto_FEAT.py @@ -13,7 +13,8 @@ def test_FEAT_inputs(): mandatory=True, position=0, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), output_type=dict(), diff --git a/nipype/interfaces/fsl/tests/test_auto_FEATModel.py b/nipype/interfaces/fsl/tests/test_auto_FEATModel.py index f644dbbdcb..9aa25a02d8 100644 --- a/nipype/interfaces/fsl/tests/test_auto_FEATModel.py +++ b/nipype/interfaces/fsl/tests/test_auto_FEATModel.py @@ -19,7 +19,8 @@ def test_FEATModel_inputs(): mandatory=True, position=0, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), output_type=dict(), diff --git a/nipype/interfaces/fsl/tests/test_auto_FEATRegister.py b/nipype/interfaces/fsl/tests/test_auto_FEATRegister.py index a0f5e09177..9a46bd77c7 100644 --- a/nipype/interfaces/fsl/tests/test_auto_FEATRegister.py +++ b/nipype/interfaces/fsl/tests/test_auto_FEATRegister.py @@ -6,7 +6,8 @@ def test_FEATRegister_inputs(): input_map = dict(feat_dirs=dict(mandatory=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), reg_dof=dict(usedefault=True, diff --git a/nipype/interfaces/fsl/tests/test_auto_FIRST.py b/nipype/interfaces/fsl/tests/test_auto_FIRST.py index 630774e9fe..61f369a0f1 100644 --- a/nipype/interfaces/fsl/tests/test_auto_FIRST.py +++ b/nipype/interfaces/fsl/tests/test_auto_FIRST.py @@ -15,7 +15,8 @@ def test_FIRST_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='-i %s', diff --git a/nipype/interfaces/fsl/tests/test_auto_FLAMEO.py b/nipype/interfaces/fsl/tests/test_auto_FLAMEO.py index 69940790fd..6caf4d6d9a 100644 --- a/nipype/interfaces/fsl/tests/test_auto_FLAMEO.py +++ b/nipype/interfaces/fsl/tests/test_auto_FLAMEO.py @@ -26,7 +26,8 @@ def test_FLAMEO_inputs(): ), fix_mean=dict(argstr='--fixmean', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), infer_outliers=dict(argstr='--inferoutliers', diff --git a/nipype/interfaces/fsl/tests/test_auto_FLIRT.py b/nipype/interfaces/fsl/tests/test_auto_FLIRT.py index 04448f0e0c..bd13a2fd36 100644 --- a/nipype/interfaces/fsl/tests/test_auto_FLIRT.py +++ b/nipype/interfaces/fsl/tests/test_auto_FLIRT.py @@ -53,7 +53,8 @@ def test_FLIRT_inputs(): ), force_scaling=dict(argstr='-forcescaling', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='-in %s', diff --git a/nipype/interfaces/fsl/tests/test_auto_FNIRT.py b/nipype/interfaces/fsl/tests/test_auto_FNIRT.py index 7e76ff0250..19536f0913 100644 --- a/nipype/interfaces/fsl/tests/test_auto_FNIRT.py +++ b/nipype/interfaces/fsl/tests/test_auto_FNIRT.py @@ -38,7 +38,8 @@ def test_FNIRT_inputs(): ), hessian_precision=dict(argstr='--numprec=%s', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='--in=%s', diff --git a/nipype/interfaces/fsl/tests/test_auto_FSLCommand.py b/nipype/interfaces/fsl/tests/test_auto_FSLCommand.py index d31001dd66..a88daabceb 100644 --- a/nipype/interfaces/fsl/tests/test_auto_FSLCommand.py +++ b/nipype/interfaces/fsl/tests/test_auto_FSLCommand.py @@ -9,7 +9,8 @@ def test_FSLCommand_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), output_type=dict(), diff --git a/nipype/interfaces/fsl/tests/test_auto_FSLXCommand.py b/nipype/interfaces/fsl/tests/test_auto_FSLXCommand.py index 25cf6ae30e..adabb09143 100644 --- a/nipype/interfaces/fsl/tests/test_auto_FSLXCommand.py +++ b/nipype/interfaces/fsl/tests/test_auto_FSLXCommand.py @@ -39,7 +39,8 @@ def test_FSLXCommand_inputs(): ), fudge=dict(argstr='--fudge=%d', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), logdir=dict(argstr='--logdir=%s', diff --git a/nipype/interfaces/fsl/tests/test_auto_FUGUE.py b/nipype/interfaces/fsl/tests/test_auto_FUGUE.py index 628e992e53..f88ffd7b6f 100644 --- a/nipype/interfaces/fsl/tests/test_auto_FUGUE.py +++ b/nipype/interfaces/fsl/tests/test_auto_FUGUE.py @@ -33,7 +33,8 @@ def test_FUGUE_inputs(): icorr_only=dict(argstr='--icorronly', requires=['unwarped_file'], ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='--in=%s', diff --git a/nipype/interfaces/fsl/tests/test_auto_FeatureExtractor.py b/nipype/interfaces/fsl/tests/test_auto_FeatureExtractor.py index 49aaf919f4..69565fa7c8 100644 --- a/nipype/interfaces/fsl/tests/test_auto_FeatureExtractor.py +++ b/nipype/interfaces/fsl/tests/test_auto_FeatureExtractor.py @@ -9,7 +9,8 @@ def test_FeatureExtractor_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), mel_ica=dict(argstr='%s', diff --git a/nipype/interfaces/fsl/tests/test_auto_FilterRegressor.py b/nipype/interfaces/fsl/tests/test_auto_FilterRegressor.py index 76829f1c2d..576b7ea3ee 100644 --- a/nipype/interfaces/fsl/tests/test_auto_FilterRegressor.py +++ b/nipype/interfaces/fsl/tests/test_auto_FilterRegressor.py @@ -23,7 +23,8 @@ def test_FilterRegressor_inputs(): position=4, xor=['filter_all'], ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='-i %s', diff --git a/nipype/interfaces/fsl/tests/test_auto_FindTheBiggest.py b/nipype/interfaces/fsl/tests/test_auto_FindTheBiggest.py index 82f3ac3f5b..cb5b925f15 100644 --- a/nipype/interfaces/fsl/tests/test_auto_FindTheBiggest.py +++ b/nipype/interfaces/fsl/tests/test_auto_FindTheBiggest.py @@ -9,7 +9,8 @@ def test_FindTheBiggest_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_files=dict(argstr='%s', diff --git a/nipype/interfaces/fsl/tests/test_auto_GLM.py b/nipype/interfaces/fsl/tests/test_auto_GLM.py index e612dec331..846e3f4854 100644 --- a/nipype/interfaces/fsl/tests/test_auto_GLM.py +++ b/nipype/interfaces/fsl/tests/test_auto_GLM.py @@ -23,7 +23,8 @@ def test_GLM_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='-i %s', diff --git a/nipype/interfaces/fsl/tests/test_auto_ICA_AROMA.py b/nipype/interfaces/fsl/tests/test_auto_ICA_AROMA.py index b5e6af6c3c..3a04429b2c 100644 --- a/nipype/interfaces/fsl/tests/test_auto_ICA_AROMA.py +++ b/nipype/interfaces/fsl/tests/test_auto_ICA_AROMA.py @@ -24,7 +24,8 @@ def test_ICA_AROMA_inputs(): fnirt_warp_file=dict(argstr='-warp %s', xor=['feat_dir'], ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='-i %s', diff --git a/nipype/interfaces/fsl/tests/test_auto_ImageMaths.py b/nipype/interfaces/fsl/tests/test_auto_ImageMaths.py index 48b01b8025..bbff7e8b42 100644 --- a/nipype/interfaces/fsl/tests/test_auto_ImageMaths.py +++ b/nipype/interfaces/fsl/tests/test_auto_ImageMaths.py @@ -9,7 +9,8 @@ def test_ImageMaths_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/fsl/tests/test_auto_ImageMeants.py b/nipype/interfaces/fsl/tests/test_auto_ImageMeants.py index 28bd9d465b..2991a45c9b 100644 --- a/nipype/interfaces/fsl/tests/test_auto_ImageMeants.py +++ b/nipype/interfaces/fsl/tests/test_auto_ImageMeants.py @@ -11,7 +11,8 @@ def test_ImageMeants_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='-i %s', diff --git a/nipype/interfaces/fsl/tests/test_auto_ImageStats.py b/nipype/interfaces/fsl/tests/test_auto_ImageStats.py index ea0b8b5d7d..0a97eb2e21 100644 --- a/nipype/interfaces/fsl/tests/test_auto_ImageStats.py +++ b/nipype/interfaces/fsl/tests/test_auto_ImageStats.py @@ -9,7 +9,8 @@ def test_ImageStats_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/fsl/tests/test_auto_InvWarp.py b/nipype/interfaces/fsl/tests/test_auto_InvWarp.py index 2f40af2fdd..0d96f46d4d 100644 --- a/nipype/interfaces/fsl/tests/test_auto_InvWarp.py +++ b/nipype/interfaces/fsl/tests/test_auto_InvWarp.py @@ -12,7 +12,8 @@ def test_InvWarp_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inverse_warp=dict(argstr='--out=%s', diff --git a/nipype/interfaces/fsl/tests/test_auto_IsotropicSmooth.py b/nipype/interfaces/fsl/tests/test_auto_IsotropicSmooth.py index e0f907222b..bc02253720 100644 --- a/nipype/interfaces/fsl/tests/test_auto_IsotropicSmooth.py +++ b/nipype/interfaces/fsl/tests/test_auto_IsotropicSmooth.py @@ -14,7 +14,8 @@ def test_IsotropicSmooth_inputs(): position=4, xor=['sigma'], ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/fsl/tests/test_auto_L2Model.py b/nipype/interfaces/fsl/tests/test_auto_L2Model.py index 81f74cc923..ef86a37e0e 100644 --- a/nipype/interfaces/fsl/tests/test_auto_L2Model.py +++ b/nipype/interfaces/fsl/tests/test_auto_L2Model.py @@ -4,7 +4,8 @@ def test_L2Model_inputs(): - input_map = dict(ignore_exception=dict(nohash=True, + input_map = dict(ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), num_copes=dict(mandatory=True, diff --git a/nipype/interfaces/fsl/tests/test_auto_Level1Design.py b/nipype/interfaces/fsl/tests/test_auto_Level1Design.py index f5fcfe4093..c15f8e055a 100644 --- a/nipype/interfaces/fsl/tests/test_auto_Level1Design.py +++ b/nipype/interfaces/fsl/tests/test_auto_Level1Design.py @@ -7,7 +7,8 @@ def test_Level1Design_inputs(): input_map = dict(bases=dict(mandatory=True, ), contrasts=dict(), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), interscan_interval=dict(mandatory=True, diff --git a/nipype/interfaces/fsl/tests/test_auto_MCFLIRT.py b/nipype/interfaces/fsl/tests/test_auto_MCFLIRT.py index d68b1f2606..07ecdc9094 100644 --- a/nipype/interfaces/fsl/tests/test_auto_MCFLIRT.py +++ b/nipype/interfaces/fsl/tests/test_auto_MCFLIRT.py @@ -15,7 +15,8 @@ def test_MCFLIRT_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='-in %s', diff --git a/nipype/interfaces/fsl/tests/test_auto_MELODIC.py b/nipype/interfaces/fsl/tests/test_auto_MELODIC.py index eed0671d7a..5e009e701d 100644 --- a/nipype/interfaces/fsl/tests/test_auto_MELODIC.py +++ b/nipype/interfaces/fsl/tests/test_auto_MELODIC.py @@ -27,7 +27,8 @@ def test_MELODIC_inputs(): ), epsilonS=dict(argstr='--epsS=%f', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_files=dict(argstr='-i %s', diff --git a/nipype/interfaces/fsl/tests/test_auto_MakeDyadicVectors.py b/nipype/interfaces/fsl/tests/test_auto_MakeDyadicVectors.py index 3365cbeb7b..447be7025e 100644 --- a/nipype/interfaces/fsl/tests/test_auto_MakeDyadicVectors.py +++ b/nipype/interfaces/fsl/tests/test_auto_MakeDyadicVectors.py @@ -9,7 +9,8 @@ def test_MakeDyadicVectors_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), mask=dict(argstr='%s', diff --git a/nipype/interfaces/fsl/tests/test_auto_MathsCommand.py b/nipype/interfaces/fsl/tests/test_auto_MathsCommand.py index ae15b6348f..224bc3ee75 100644 --- a/nipype/interfaces/fsl/tests/test_auto_MathsCommand.py +++ b/nipype/interfaces/fsl/tests/test_auto_MathsCommand.py @@ -9,7 +9,8 @@ def test_MathsCommand_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/fsl/tests/test_auto_MaxImage.py b/nipype/interfaces/fsl/tests/test_auto_MaxImage.py index 808f49725a..536a44bccf 100644 --- a/nipype/interfaces/fsl/tests/test_auto_MaxImage.py +++ b/nipype/interfaces/fsl/tests/test_auto_MaxImage.py @@ -13,7 +13,8 @@ def test_MaxImage_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/fsl/tests/test_auto_MaxnImage.py b/nipype/interfaces/fsl/tests/test_auto_MaxnImage.py index 7f90f7828f..09aec304d8 100644 --- a/nipype/interfaces/fsl/tests/test_auto_MaxnImage.py +++ b/nipype/interfaces/fsl/tests/test_auto_MaxnImage.py @@ -13,7 +13,8 @@ def test_MaxnImage_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/fsl/tests/test_auto_MeanImage.py b/nipype/interfaces/fsl/tests/test_auto_MeanImage.py index 378417e20e..c444c296ad 100644 --- a/nipype/interfaces/fsl/tests/test_auto_MeanImage.py +++ b/nipype/interfaces/fsl/tests/test_auto_MeanImage.py @@ -13,7 +13,8 @@ def test_MeanImage_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/fsl/tests/test_auto_MedianImage.py b/nipype/interfaces/fsl/tests/test_auto_MedianImage.py index 1e88316ee4..b398d50975 100644 --- a/nipype/interfaces/fsl/tests/test_auto_MedianImage.py +++ b/nipype/interfaces/fsl/tests/test_auto_MedianImage.py @@ -13,7 +13,8 @@ def test_MedianImage_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/fsl/tests/test_auto_Merge.py b/nipype/interfaces/fsl/tests/test_auto_Merge.py index dfd92da57e..0638326c65 100644 --- a/nipype/interfaces/fsl/tests/test_auto_Merge.py +++ b/nipype/interfaces/fsl/tests/test_auto_Merge.py @@ -13,7 +13,8 @@ def test_Merge_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_files=dict(argstr='%s', diff --git a/nipype/interfaces/fsl/tests/test_auto_MinImage.py b/nipype/interfaces/fsl/tests/test_auto_MinImage.py index 97376366ff..f2216fb083 100644 --- a/nipype/interfaces/fsl/tests/test_auto_MinImage.py +++ b/nipype/interfaces/fsl/tests/test_auto_MinImage.py @@ -13,7 +13,8 @@ def test_MinImage_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/fsl/tests/test_auto_MotionOutliers.py b/nipype/interfaces/fsl/tests/test_auto_MotionOutliers.py index 346451e737..7921e1031c 100644 --- a/nipype/interfaces/fsl/tests/test_auto_MotionOutliers.py +++ b/nipype/interfaces/fsl/tests/test_auto_MotionOutliers.py @@ -11,7 +11,8 @@ def test_MotionOutliers_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='-i %s', diff --git a/nipype/interfaces/fsl/tests/test_auto_MultiImageMaths.py b/nipype/interfaces/fsl/tests/test_auto_MultiImageMaths.py index 4416477970..4a67036b55 100644 --- a/nipype/interfaces/fsl/tests/test_auto_MultiImageMaths.py +++ b/nipype/interfaces/fsl/tests/test_auto_MultiImageMaths.py @@ -9,7 +9,8 @@ def test_MultiImageMaths_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/fsl/tests/test_auto_MultipleRegressDesign.py b/nipype/interfaces/fsl/tests/test_auto_MultipleRegressDesign.py index 69ef20f16c..c0bd71f12a 100644 --- a/nipype/interfaces/fsl/tests/test_auto_MultipleRegressDesign.py +++ b/nipype/interfaces/fsl/tests/test_auto_MultipleRegressDesign.py @@ -7,7 +7,8 @@ def test_MultipleRegressDesign_inputs(): input_map = dict(contrasts=dict(mandatory=True, ), groups=dict(), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), regressors=dict(mandatory=True, diff --git a/nipype/interfaces/fsl/tests/test_auto_Overlay.py b/nipype/interfaces/fsl/tests/test_auto_Overlay.py index 240154c74e..91b09fdd7a 100644 --- a/nipype/interfaces/fsl/tests/test_auto_Overlay.py +++ b/nipype/interfaces/fsl/tests/test_auto_Overlay.py @@ -28,7 +28,8 @@ def test_Overlay_inputs(): position=5, xor=('auto_thresh_bg', 'full_bg_range', 'bg_thresh'), ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), out_file=dict(argstr='%s', diff --git a/nipype/interfaces/fsl/tests/test_auto_PRELUDE.py b/nipype/interfaces/fsl/tests/test_auto_PRELUDE.py index dc5aaec0b5..98b8d69889 100644 --- a/nipype/interfaces/fsl/tests/test_auto_PRELUDE.py +++ b/nipype/interfaces/fsl/tests/test_auto_PRELUDE.py @@ -15,7 +15,8 @@ def test_PRELUDE_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), label_file=dict(argstr='--labels=%s', diff --git a/nipype/interfaces/fsl/tests/test_auto_PercentileImage.py b/nipype/interfaces/fsl/tests/test_auto_PercentileImage.py index 7d03bd778a..36fd550b23 100644 --- a/nipype/interfaces/fsl/tests/test_auto_PercentileImage.py +++ b/nipype/interfaces/fsl/tests/test_auto_PercentileImage.py @@ -13,7 +13,8 @@ def test_PercentileImage_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/fsl/tests/test_auto_PlotMotionParams.py b/nipype/interfaces/fsl/tests/test_auto_PlotMotionParams.py index 7a792847cf..e910f7e173 100644 --- a/nipype/interfaces/fsl/tests/test_auto_PlotMotionParams.py +++ b/nipype/interfaces/fsl/tests/test_auto_PlotMotionParams.py @@ -9,7 +9,8 @@ def test_PlotMotionParams_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/fsl/tests/test_auto_PlotTimeSeries.py b/nipype/interfaces/fsl/tests/test_auto_PlotTimeSeries.py index 473332c4b3..feaa9d8449 100644 --- a/nipype/interfaces/fsl/tests/test_auto_PlotTimeSeries.py +++ b/nipype/interfaces/fsl/tests/test_auto_PlotTimeSeries.py @@ -9,7 +9,8 @@ def test_PlotTimeSeries_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/fsl/tests/test_auto_PowerSpectrum.py b/nipype/interfaces/fsl/tests/test_auto_PowerSpectrum.py index 451893ef41..409c8bfee6 100644 --- a/nipype/interfaces/fsl/tests/test_auto_PowerSpectrum.py +++ b/nipype/interfaces/fsl/tests/test_auto_PowerSpectrum.py @@ -9,7 +9,8 @@ def test_PowerSpectrum_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/fsl/tests/test_auto_PrepareFieldmap.py b/nipype/interfaces/fsl/tests/test_auto_PrepareFieldmap.py index 7569e6622e..b9bf8c1c94 100644 --- a/nipype/interfaces/fsl/tests/test_auto_PrepareFieldmap.py +++ b/nipype/interfaces/fsl/tests/test_auto_PrepareFieldmap.py @@ -14,7 +14,8 @@ def test_PrepareFieldmap_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_magnitude=dict(argstr='%s', diff --git a/nipype/interfaces/fsl/tests/test_auto_ProbTrackX.py b/nipype/interfaces/fsl/tests/test_auto_ProbTrackX.py index ccfd85691c..12352f4a38 100644 --- a/nipype/interfaces/fsl/tests/test_auto_ProbTrackX.py +++ b/nipype/interfaces/fsl/tests/test_auto_ProbTrackX.py @@ -24,7 +24,8 @@ def test_ProbTrackX_inputs(): ), fsamples=dict(mandatory=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inv_xfm=dict(argstr='--invxfm=%s', diff --git a/nipype/interfaces/fsl/tests/test_auto_ProbTrackX2.py b/nipype/interfaces/fsl/tests/test_auto_ProbTrackX2.py index bbf42576a6..249bc87777 100644 --- a/nipype/interfaces/fsl/tests/test_auto_ProbTrackX2.py +++ b/nipype/interfaces/fsl/tests/test_auto_ProbTrackX2.py @@ -32,7 +32,8 @@ def test_ProbTrackX2_inputs(): ), fsamples=dict(mandatory=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inv_xfm=dict(argstr='--invxfm=%s', diff --git a/nipype/interfaces/fsl/tests/test_auto_ProjThresh.py b/nipype/interfaces/fsl/tests/test_auto_ProjThresh.py index 66a4509386..37648d5a2b 100644 --- a/nipype/interfaces/fsl/tests/test_auto_ProjThresh.py +++ b/nipype/interfaces/fsl/tests/test_auto_ProjThresh.py @@ -9,7 +9,8 @@ def test_ProjThresh_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_files=dict(argstr='%s', diff --git a/nipype/interfaces/fsl/tests/test_auto_Randomise.py b/nipype/interfaces/fsl/tests/test_auto_Randomise.py index 8483b92017..bcf65a0419 100644 --- a/nipype/interfaces/fsl/tests/test_auto_Randomise.py +++ b/nipype/interfaces/fsl/tests/test_auto_Randomise.py @@ -30,7 +30,8 @@ def test_Randomise_inputs(): ), fcon=dict(argstr='-f %s', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='-i %s', diff --git a/nipype/interfaces/fsl/tests/test_auto_Reorient2Std.py b/nipype/interfaces/fsl/tests/test_auto_Reorient2Std.py index 1af9adf8eb..0062b7d489 100644 --- a/nipype/interfaces/fsl/tests/test_auto_Reorient2Std.py +++ b/nipype/interfaces/fsl/tests/test_auto_Reorient2Std.py @@ -9,7 +9,8 @@ def test_Reorient2Std_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/fsl/tests/test_auto_RobustFOV.py b/nipype/interfaces/fsl/tests/test_auto_RobustFOV.py index 392611182b..6b547109e1 100644 --- a/nipype/interfaces/fsl/tests/test_auto_RobustFOV.py +++ b/nipype/interfaces/fsl/tests/test_auto_RobustFOV.py @@ -11,7 +11,8 @@ def test_RobustFOV_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='-i %s', diff --git a/nipype/interfaces/fsl/tests/test_auto_SMM.py b/nipype/interfaces/fsl/tests/test_auto_SMM.py index 53a4087ec7..f6ed7d4fd2 100644 --- a/nipype/interfaces/fsl/tests/test_auto_SMM.py +++ b/nipype/interfaces/fsl/tests/test_auto_SMM.py @@ -9,7 +9,8 @@ def test_SMM_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), mask=dict(argstr='--mask="%s"', diff --git a/nipype/interfaces/fsl/tests/test_auto_SUSAN.py b/nipype/interfaces/fsl/tests/test_auto_SUSAN.py index b97ecbf28d..e3da09dadf 100644 --- a/nipype/interfaces/fsl/tests/test_auto_SUSAN.py +++ b/nipype/interfaces/fsl/tests/test_auto_SUSAN.py @@ -21,7 +21,8 @@ def test_SUSAN_inputs(): mandatory=True, position=3, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/fsl/tests/test_auto_SigLoss.py b/nipype/interfaces/fsl/tests/test_auto_SigLoss.py index 3a013c2974..d7caee328e 100644 --- a/nipype/interfaces/fsl/tests/test_auto_SigLoss.py +++ b/nipype/interfaces/fsl/tests/test_auto_SigLoss.py @@ -11,7 +11,8 @@ def test_SigLoss_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='-i %s', diff --git a/nipype/interfaces/fsl/tests/test_auto_SliceTimer.py b/nipype/interfaces/fsl/tests/test_auto_SliceTimer.py index f3007825a4..99d0b7215b 100644 --- a/nipype/interfaces/fsl/tests/test_auto_SliceTimer.py +++ b/nipype/interfaces/fsl/tests/test_auto_SliceTimer.py @@ -15,7 +15,8 @@ def test_SliceTimer_inputs(): ), global_shift=dict(argstr='--tglobal', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='--in=%s', diff --git a/nipype/interfaces/fsl/tests/test_auto_Slicer.py b/nipype/interfaces/fsl/tests/test_auto_Slicer.py index 224d9447ed..6108b5f702 100644 --- a/nipype/interfaces/fsl/tests/test_auto_Slicer.py +++ b/nipype/interfaces/fsl/tests/test_auto_Slicer.py @@ -20,7 +20,8 @@ def test_Slicer_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), image_edges=dict(argstr='%s', diff --git a/nipype/interfaces/fsl/tests/test_auto_Smooth.py b/nipype/interfaces/fsl/tests/test_auto_Smooth.py index 503282ea4a..d653e4d7cb 100644 --- a/nipype/interfaces/fsl/tests/test_auto_Smooth.py +++ b/nipype/interfaces/fsl/tests/test_auto_Smooth.py @@ -14,7 +14,8 @@ def test_Smooth_inputs(): position=1, xor=['sigma'], ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/fsl/tests/test_auto_SmoothEstimate.py b/nipype/interfaces/fsl/tests/test_auto_SmoothEstimate.py index bcc090fed1..c98830c384 100644 --- a/nipype/interfaces/fsl/tests/test_auto_SmoothEstimate.py +++ b/nipype/interfaces/fsl/tests/test_auto_SmoothEstimate.py @@ -13,7 +13,8 @@ def test_SmoothEstimate_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), mask_file=dict(argstr='--mask=%s', diff --git a/nipype/interfaces/fsl/tests/test_auto_SpatialFilter.py b/nipype/interfaces/fsl/tests/test_auto_SpatialFilter.py index 0457a50c2e..be3772926f 100644 --- a/nipype/interfaces/fsl/tests/test_auto_SpatialFilter.py +++ b/nipype/interfaces/fsl/tests/test_auto_SpatialFilter.py @@ -9,7 +9,8 @@ def test_SpatialFilter_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/fsl/tests/test_auto_Split.py b/nipype/interfaces/fsl/tests/test_auto_Split.py index a95770b9ee..efe176be46 100644 --- a/nipype/interfaces/fsl/tests/test_auto_Split.py +++ b/nipype/interfaces/fsl/tests/test_auto_Split.py @@ -13,7 +13,8 @@ def test_Split_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/fsl/tests/test_auto_StdImage.py b/nipype/interfaces/fsl/tests/test_auto_StdImage.py index 88eea8a627..8675590d07 100644 --- a/nipype/interfaces/fsl/tests/test_auto_StdImage.py +++ b/nipype/interfaces/fsl/tests/test_auto_StdImage.py @@ -13,7 +13,8 @@ def test_StdImage_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/fsl/tests/test_auto_SwapDimensions.py b/nipype/interfaces/fsl/tests/test_auto_SwapDimensions.py index 710c3baa39..c225c37ab0 100644 --- a/nipype/interfaces/fsl/tests/test_auto_SwapDimensions.py +++ b/nipype/interfaces/fsl/tests/test_auto_SwapDimensions.py @@ -9,7 +9,8 @@ def test_SwapDimensions_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/fsl/tests/test_auto_TOPUP.py b/nipype/interfaces/fsl/tests/test_auto_TOPUP.py index 2f55bf893e..fd04dadcbc 100644 --- a/nipype/interfaces/fsl/tests/test_auto_TOPUP.py +++ b/nipype/interfaces/fsl/tests/test_auto_TOPUP.py @@ -25,7 +25,8 @@ def test_TOPUP_inputs(): ), fwhm=dict(argstr='--fwhm=%f', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='--imain=%s', diff --git a/nipype/interfaces/fsl/tests/test_auto_TemporalFilter.py b/nipype/interfaces/fsl/tests/test_auto_TemporalFilter.py index 230ffcba78..4f5bb4d84e 100644 --- a/nipype/interfaces/fsl/tests/test_auto_TemporalFilter.py +++ b/nipype/interfaces/fsl/tests/test_auto_TemporalFilter.py @@ -13,7 +13,8 @@ def test_TemporalFilter_inputs(): position=4, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/fsl/tests/test_auto_Threshold.py b/nipype/interfaces/fsl/tests/test_auto_Threshold.py index 8e284d67b0..923deff51d 100644 --- a/nipype/interfaces/fsl/tests/test_auto_Threshold.py +++ b/nipype/interfaces/fsl/tests/test_auto_Threshold.py @@ -11,7 +11,8 @@ def test_Threshold_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/fsl/tests/test_auto_TractSkeleton.py b/nipype/interfaces/fsl/tests/test_auto_TractSkeleton.py index d578bdea8e..0c5634d731 100644 --- a/nipype/interfaces/fsl/tests/test_auto_TractSkeleton.py +++ b/nipype/interfaces/fsl/tests/test_auto_TractSkeleton.py @@ -15,7 +15,8 @@ def test_TractSkeleton_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='-i %s', diff --git a/nipype/interfaces/fsl/tests/test_auto_Training.py b/nipype/interfaces/fsl/tests/test_auto_Training.py index 6ea6042c80..5d4d965951 100644 --- a/nipype/interfaces/fsl/tests/test_auto_Training.py +++ b/nipype/interfaces/fsl/tests/test_auto_Training.py @@ -9,7 +9,8 @@ def test_Training_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), loo=dict(argstr='-l', diff --git a/nipype/interfaces/fsl/tests/test_auto_TrainingSetCreator.py b/nipype/interfaces/fsl/tests/test_auto_TrainingSetCreator.py index abe2237832..370e89fdf4 100644 --- a/nipype/interfaces/fsl/tests/test_auto_TrainingSetCreator.py +++ b/nipype/interfaces/fsl/tests/test_auto_TrainingSetCreator.py @@ -4,7 +4,8 @@ def test_TrainingSetCreator_inputs(): - input_map = dict(ignore_exception=dict(nohash=True, + input_map = dict(ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), mel_icas_in=dict(argstr='%s', diff --git a/nipype/interfaces/fsl/tests/test_auto_UnaryMaths.py b/nipype/interfaces/fsl/tests/test_auto_UnaryMaths.py index 4132931d57..eb43d00aaf 100644 --- a/nipype/interfaces/fsl/tests/test_auto_UnaryMaths.py +++ b/nipype/interfaces/fsl/tests/test_auto_UnaryMaths.py @@ -9,7 +9,8 @@ def test_UnaryMaths_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/fsl/tests/test_auto_VecReg.py b/nipype/interfaces/fsl/tests/test_auto_VecReg.py index 48795b253a..2308c13b04 100644 --- a/nipype/interfaces/fsl/tests/test_auto_VecReg.py +++ b/nipype/interfaces/fsl/tests/test_auto_VecReg.py @@ -11,7 +11,8 @@ def test_VecReg_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='-i %s', diff --git a/nipype/interfaces/fsl/tests/test_auto_WarpPoints.py b/nipype/interfaces/fsl/tests/test_auto_WarpPoints.py index 738192f1b7..cc8f9f9ce8 100644 --- a/nipype/interfaces/fsl/tests/test_auto_WarpPoints.py +++ b/nipype/interfaces/fsl/tests/test_auto_WarpPoints.py @@ -18,7 +18,8 @@ def test_WarpPoints_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_coords=dict(argstr='%s', diff --git a/nipype/interfaces/fsl/tests/test_auto_WarpPointsFromStd.py b/nipype/interfaces/fsl/tests/test_auto_WarpPointsFromStd.py index dd7b200d84..0824beae24 100644 --- a/nipype/interfaces/fsl/tests/test_auto_WarpPointsFromStd.py +++ b/nipype/interfaces/fsl/tests/test_auto_WarpPointsFromStd.py @@ -15,7 +15,8 @@ def test_WarpPointsFromStd_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), img_file=dict(argstr='-img %s', diff --git a/nipype/interfaces/fsl/tests/test_auto_WarpPointsToStd.py b/nipype/interfaces/fsl/tests/test_auto_WarpPointsToStd.py index 23605bfeaf..ac7f73031b 100644 --- a/nipype/interfaces/fsl/tests/test_auto_WarpPointsToStd.py +++ b/nipype/interfaces/fsl/tests/test_auto_WarpPointsToStd.py @@ -15,7 +15,8 @@ def test_WarpPointsToStd_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), img_file=dict(argstr='-img %s', diff --git a/nipype/interfaces/fsl/tests/test_auto_WarpUtils.py b/nipype/interfaces/fsl/tests/test_auto_WarpUtils.py index b879eb0e07..2361a8f7e4 100644 --- a/nipype/interfaces/fsl/tests/test_auto_WarpUtils.py +++ b/nipype/interfaces/fsl/tests/test_auto_WarpUtils.py @@ -9,7 +9,8 @@ def test_WarpUtils_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='--in=%s', diff --git a/nipype/interfaces/fsl/tests/test_auto_XFibres5.py b/nipype/interfaces/fsl/tests/test_auto_XFibres5.py index 5359c49d8d..f84b0b9ae8 100644 --- a/nipype/interfaces/fsl/tests/test_auto_XFibres5.py +++ b/nipype/interfaces/fsl/tests/test_auto_XFibres5.py @@ -41,7 +41,8 @@ def test_XFibres5_inputs(): ), gradnonlin=dict(argstr='--gradnonlin=%s', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), logdir=dict(argstr='--logdir=%s', diff --git a/nipype/interfaces/minc/tests/test_auto_Average.py b/nipype/interfaces/minc/tests/test_auto_Average.py index c903c88cfc..b7adb07145 100644 --- a/nipype/interfaces/minc/tests/test_auto_Average.py +++ b/nipype/interfaces/minc/tests/test_auto_Average.py @@ -59,7 +59,8 @@ def test_Average_inputs(): format_unsigned=dict(argstr='-unsigned', xor=('format_filetype', 'format_byte', 'format_short', 'format_int', 'format_long', 'format_float', 'format_double', 'format_signed', 'format_unsigned'), ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), input_files=dict(argstr='%s', diff --git a/nipype/interfaces/minc/tests/test_auto_BBox.py b/nipype/interfaces/minc/tests/test_auto_BBox.py index e57492702c..b469e57184 100644 --- a/nipype/interfaces/minc/tests/test_auto_BBox.py +++ b/nipype/interfaces/minc/tests/test_auto_BBox.py @@ -15,7 +15,8 @@ def test_BBox_inputs(): ), format_mincreshape=dict(argstr='-mincreshape', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), input_file=dict(argstr='%s', diff --git a/nipype/interfaces/minc/tests/test_auto_Beast.py b/nipype/interfaces/minc/tests/test_auto_Beast.py index 642bd6f6ea..9b24d9cb0b 100644 --- a/nipype/interfaces/minc/tests/test_auto_Beast.py +++ b/nipype/interfaces/minc/tests/test_auto_Beast.py @@ -23,7 +23,8 @@ def test_Beast_inputs(): ), flip_images=dict(argstr='-flip', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), input_file=dict(argstr='%s', diff --git a/nipype/interfaces/minc/tests/test_auto_BestLinReg.py b/nipype/interfaces/minc/tests/test_auto_BestLinReg.py index f8d670a9da..8d9641db16 100644 --- a/nipype/interfaces/minc/tests/test_auto_BestLinReg.py +++ b/nipype/interfaces/minc/tests/test_auto_BestLinReg.py @@ -12,7 +12,8 @@ def test_BestLinReg_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), output_mnc=dict(argstr='%s', diff --git a/nipype/interfaces/minc/tests/test_auto_BigAverage.py b/nipype/interfaces/minc/tests/test_auto_BigAverage.py index ee21ea0e32..f0f4bd20f8 100644 --- a/nipype/interfaces/minc/tests/test_auto_BigAverage.py +++ b/nipype/interfaces/minc/tests/test_auto_BigAverage.py @@ -12,7 +12,8 @@ def test_BigAverage_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), input_files=dict(argstr='%s', diff --git a/nipype/interfaces/minc/tests/test_auto_Blob.py b/nipype/interfaces/minc/tests/test_auto_Blob.py index 8ae597fdc5..a0f2d95d40 100644 --- a/nipype/interfaces/minc/tests/test_auto_Blob.py +++ b/nipype/interfaces/minc/tests/test_auto_Blob.py @@ -11,7 +11,8 @@ def test_Blob_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), input_file=dict(argstr='%s', diff --git a/nipype/interfaces/minc/tests/test_auto_Blur.py b/nipype/interfaces/minc/tests/test_auto_Blur.py index 95aeaef0af..e50f0f0b47 100644 --- a/nipype/interfaces/minc/tests/test_auto_Blur.py +++ b/nipype/interfaces/minc/tests/test_auto_Blur.py @@ -27,7 +27,8 @@ def test_Blur_inputs(): ), gradient=dict(argstr='-gradient', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), input_file=dict(argstr='%s', diff --git a/nipype/interfaces/minc/tests/test_auto_Calc.py b/nipype/interfaces/minc/tests/test_auto_Calc.py index 860b41a06a..1e690a1468 100644 --- a/nipype/interfaces/minc/tests/test_auto_Calc.py +++ b/nipype/interfaces/minc/tests/test_auto_Calc.py @@ -62,7 +62,8 @@ def test_Calc_inputs(): format_unsigned=dict(argstr='-unsigned', xor=('format_filetype', 'format_byte', 'format_short', 'format_int', 'format_long', 'format_float', 'format_double', 'format_signed', 'format_unsigned'), ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), ignore_nan=dict(argstr='-ignore_nan', diff --git a/nipype/interfaces/minc/tests/test_auto_Convert.py b/nipype/interfaces/minc/tests/test_auto_Convert.py index 97ab313ffb..6df129aee4 100644 --- a/nipype/interfaces/minc/tests/test_auto_Convert.py +++ b/nipype/interfaces/minc/tests/test_auto_Convert.py @@ -17,7 +17,8 @@ def test_Convert_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), input_file=dict(argstr='%s', diff --git a/nipype/interfaces/minc/tests/test_auto_Copy.py b/nipype/interfaces/minc/tests/test_auto_Copy.py index 6923ee0639..73662e9b88 100644 --- a/nipype/interfaces/minc/tests/test_auto_Copy.py +++ b/nipype/interfaces/minc/tests/test_auto_Copy.py @@ -9,7 +9,8 @@ def test_Copy_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), input_file=dict(argstr='%s', diff --git a/nipype/interfaces/minc/tests/test_auto_Dump.py b/nipype/interfaces/minc/tests/test_auto_Dump.py index 7066fe56c7..2e9ab091b4 100644 --- a/nipype/interfaces/minc/tests/test_auto_Dump.py +++ b/nipype/interfaces/minc/tests/test_auto_Dump.py @@ -21,7 +21,8 @@ def test_Dump_inputs(): header_data=dict(argstr='-h', xor=('coordinate_data', 'header_data'), ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), input_file=dict(argstr='%s', diff --git a/nipype/interfaces/minc/tests/test_auto_Extract.py b/nipype/interfaces/minc/tests/test_auto_Extract.py index feb6f338cb..0df7132519 100644 --- a/nipype/interfaces/minc/tests/test_auto_Extract.py +++ b/nipype/interfaces/minc/tests/test_auto_Extract.py @@ -48,7 +48,8 @@ def test_Extract_inputs(): flip_z_positive=dict(argstr='+zdirection', xor=('flip_z_positive', 'flip_z_negative', 'flip_z_any'), ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), image_maximum=dict(argstr='-image_maximum %s', diff --git a/nipype/interfaces/minc/tests/test_auto_Gennlxfm.py b/nipype/interfaces/minc/tests/test_auto_Gennlxfm.py index 0e2720037a..e09dc43c73 100644 --- a/nipype/interfaces/minc/tests/test_auto_Gennlxfm.py +++ b/nipype/interfaces/minc/tests/test_auto_Gennlxfm.py @@ -14,7 +14,8 @@ def test_Gennlxfm_inputs(): ), ident=dict(argstr='-ident', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), like=dict(argstr='-like %s', diff --git a/nipype/interfaces/minc/tests/test_auto_Math.py b/nipype/interfaces/minc/tests/test_auto_Math.py index 60a289f391..33946b7e44 100644 --- a/nipype/interfaces/minc/tests/test_auto_Math.py +++ b/nipype/interfaces/minc/tests/test_auto_Math.py @@ -73,7 +73,8 @@ def test_Math_inputs(): format_unsigned=dict(argstr='-unsigned', xor=('format_filetype', 'format_byte', 'format_short', 'format_int', 'format_long', 'format_float', 'format_double', 'format_signed', 'format_unsigned'), ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), ignore_nan=dict(argstr='-ignore_nan', diff --git a/nipype/interfaces/minc/tests/test_auto_NlpFit.py b/nipype/interfaces/minc/tests/test_auto_NlpFit.py index bfd7586dba..905c4b9080 100644 --- a/nipype/interfaces/minc/tests/test_auto_NlpFit.py +++ b/nipype/interfaces/minc/tests/test_auto_NlpFit.py @@ -15,7 +15,8 @@ def test_NlpFit_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), init_xfm=dict(argstr='-init_xfm %s', diff --git a/nipype/interfaces/minc/tests/test_auto_Norm.py b/nipype/interfaces/minc/tests/test_auto_Norm.py index 2d45f249af..ca19629e3a 100644 --- a/nipype/interfaces/minc/tests/test_auto_Norm.py +++ b/nipype/interfaces/minc/tests/test_auto_Norm.py @@ -17,7 +17,8 @@ def test_Norm_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), input_file=dict(argstr='%s', diff --git a/nipype/interfaces/minc/tests/test_auto_Pik.py b/nipype/interfaces/minc/tests/test_auto_Pik.py index 1a15c2bb01..1e0b92fb35 100644 --- a/nipype/interfaces/minc/tests/test_auto_Pik.py +++ b/nipype/interfaces/minc/tests/test_auto_Pik.py @@ -22,7 +22,8 @@ def test_Pik_inputs(): horizontal_triplanar_view=dict(argstr='--horizontal', xor=('vertical_triplanar_view', 'horizontal_triplanar_view'), ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), image_range=dict(argstr='--image_range %s %s', diff --git a/nipype/interfaces/minc/tests/test_auto_Resample.py b/nipype/interfaces/minc/tests/test_auto_Resample.py index 1ed905fadb..f11c11daf0 100644 --- a/nipype/interfaces/minc/tests/test_auto_Resample.py +++ b/nipype/interfaces/minc/tests/test_auto_Resample.py @@ -51,7 +51,8 @@ def test_Resample_inputs(): half_width_sinc_window=dict(argstr='-width %s', requires=['sinc_interpolation'], ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), input_file=dict(argstr='%s', diff --git a/nipype/interfaces/minc/tests/test_auto_Reshape.py b/nipype/interfaces/minc/tests/test_auto_Reshape.py index b55b2e896d..64f28362c9 100644 --- a/nipype/interfaces/minc/tests/test_auto_Reshape.py +++ b/nipype/interfaces/minc/tests/test_auto_Reshape.py @@ -12,7 +12,8 @@ def test_Reshape_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), input_file=dict(argstr='%s', diff --git a/nipype/interfaces/minc/tests/test_auto_ToEcat.py b/nipype/interfaces/minc/tests/test_auto_ToEcat.py index 236bc4d9a7..3b48a27654 100644 --- a/nipype/interfaces/minc/tests/test_auto_ToEcat.py +++ b/nipype/interfaces/minc/tests/test_auto_ToEcat.py @@ -17,7 +17,8 @@ def test_ToEcat_inputs(): ), ignore_ecat_subheader_variable=dict(argstr='-ignore_ecat_subheader_variable', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), ignore_patient_variable=dict(argstr='-ignore_patient_variable', diff --git a/nipype/interfaces/minc/tests/test_auto_ToRaw.py b/nipype/interfaces/minc/tests/test_auto_ToRaw.py index d231faa8d6..02af1da373 100644 --- a/nipype/interfaces/minc/tests/test_auto_ToRaw.py +++ b/nipype/interfaces/minc/tests/test_auto_ToRaw.py @@ -9,7 +9,8 @@ def test_ToRaw_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), input_file=dict(argstr='%s', diff --git a/nipype/interfaces/minc/tests/test_auto_VolSymm.py b/nipype/interfaces/minc/tests/test_auto_VolSymm.py index f6a56d153a..88145f639d 100644 --- a/nipype/interfaces/minc/tests/test_auto_VolSymm.py +++ b/nipype/interfaces/minc/tests/test_auto_VolSymm.py @@ -18,7 +18,8 @@ def test_VolSymm_inputs(): ), fit_nonlinear=dict(argstr='-nonlinear', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), input_file=dict(argstr='%s', diff --git a/nipype/interfaces/minc/tests/test_auto_Volcentre.py b/nipype/interfaces/minc/tests/test_auto_Volcentre.py index c8793ff79a..7bf95a9c3d 100644 --- a/nipype/interfaces/minc/tests/test_auto_Volcentre.py +++ b/nipype/interfaces/minc/tests/test_auto_Volcentre.py @@ -16,7 +16,8 @@ def test_Volcentre_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), input_file=dict(argstr='%s', diff --git a/nipype/interfaces/minc/tests/test_auto_Voliso.py b/nipype/interfaces/minc/tests/test_auto_Voliso.py index 89edd67d00..76ad3283c8 100644 --- a/nipype/interfaces/minc/tests/test_auto_Voliso.py +++ b/nipype/interfaces/minc/tests/test_auto_Voliso.py @@ -14,7 +14,8 @@ def test_Voliso_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), input_file=dict(argstr='%s', diff --git a/nipype/interfaces/minc/tests/test_auto_Volpad.py b/nipype/interfaces/minc/tests/test_auto_Volpad.py index 96709fe710..6ac867639e 100644 --- a/nipype/interfaces/minc/tests/test_auto_Volpad.py +++ b/nipype/interfaces/minc/tests/test_auto_Volpad.py @@ -18,7 +18,8 @@ def test_Volpad_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), input_file=dict(argstr='%s', diff --git a/nipype/interfaces/minc/tests/test_auto_XfmAvg.py b/nipype/interfaces/minc/tests/test_auto_XfmAvg.py index db63ccda08..3d288aa1cd 100644 --- a/nipype/interfaces/minc/tests/test_auto_XfmAvg.py +++ b/nipype/interfaces/minc/tests/test_auto_XfmAvg.py @@ -16,7 +16,8 @@ def test_XfmAvg_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), ignore_linear=dict(argstr='-ignore_linear', diff --git a/nipype/interfaces/minc/tests/test_auto_XfmConcat.py b/nipype/interfaces/minc/tests/test_auto_XfmConcat.py index 3859b91538..4d3cdadb24 100644 --- a/nipype/interfaces/minc/tests/test_auto_XfmConcat.py +++ b/nipype/interfaces/minc/tests/test_auto_XfmConcat.py @@ -12,7 +12,8 @@ def test_XfmConcat_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), input_files=dict(argstr='%s', diff --git a/nipype/interfaces/minc/tests/test_auto_XfmInvert.py b/nipype/interfaces/minc/tests/test_auto_XfmInvert.py index ee56dfb262..10f5e9ec6a 100644 --- a/nipype/interfaces/minc/tests/test_auto_XfmInvert.py +++ b/nipype/interfaces/minc/tests/test_auto_XfmInvert.py @@ -12,7 +12,8 @@ def test_XfmInvert_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), input_file=dict(argstr='%s', diff --git a/nipype/interfaces/mipav/tests/test_auto_JistBrainMgdmSegmentation.py b/nipype/interfaces/mipav/tests/test_auto_JistBrainMgdmSegmentation.py index c82e9b867b..64349fa299 100644 --- a/nipype/interfaces/mipav/tests/test_auto_JistBrainMgdmSegmentation.py +++ b/nipype/interfaces/mipav/tests/test_auto_JistBrainMgdmSegmentation.py @@ -9,7 +9,8 @@ def test_JistBrainMgdmSegmentation_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inAdjust=dict(argstr='--inAdjust %s', diff --git a/nipype/interfaces/mipav/tests/test_auto_JistBrainMp2rageDuraEstimation.py b/nipype/interfaces/mipav/tests/test_auto_JistBrainMp2rageDuraEstimation.py index 7d45f19c81..113bc27c4d 100644 --- a/nipype/interfaces/mipav/tests/test_auto_JistBrainMp2rageDuraEstimation.py +++ b/nipype/interfaces/mipav/tests/test_auto_JistBrainMp2rageDuraEstimation.py @@ -9,7 +9,8 @@ def test_JistBrainMp2rageDuraEstimation_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inDistance=dict(argstr='--inDistance %f', diff --git a/nipype/interfaces/mipav/tests/test_auto_JistBrainMp2rageSkullStripping.py b/nipype/interfaces/mipav/tests/test_auto_JistBrainMp2rageSkullStripping.py index ac2f9cfbb2..624326b534 100644 --- a/nipype/interfaces/mipav/tests/test_auto_JistBrainMp2rageSkullStripping.py +++ b/nipype/interfaces/mipav/tests/test_auto_JistBrainMp2rageSkullStripping.py @@ -9,7 +9,8 @@ def test_JistBrainMp2rageSkullStripping_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inFilter=dict(argstr='--inFilter %s', diff --git a/nipype/interfaces/mipav/tests/test_auto_JistBrainPartialVolumeFilter.py b/nipype/interfaces/mipav/tests/test_auto_JistBrainPartialVolumeFilter.py index 281751d399..8fe4e3df73 100644 --- a/nipype/interfaces/mipav/tests/test_auto_JistBrainPartialVolumeFilter.py +++ b/nipype/interfaces/mipav/tests/test_auto_JistBrainPartialVolumeFilter.py @@ -9,7 +9,8 @@ def test_JistBrainPartialVolumeFilter_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inInput=dict(argstr='--inInput %s', diff --git a/nipype/interfaces/mipav/tests/test_auto_JistCortexSurfaceMeshInflation.py b/nipype/interfaces/mipav/tests/test_auto_JistCortexSurfaceMeshInflation.py index baa2a6c77e..238e2fd02e 100644 --- a/nipype/interfaces/mipav/tests/test_auto_JistCortexSurfaceMeshInflation.py +++ b/nipype/interfaces/mipav/tests/test_auto_JistCortexSurfaceMeshInflation.py @@ -9,7 +9,8 @@ def test_JistCortexSurfaceMeshInflation_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inLevelset=dict(argstr='--inLevelset %s', diff --git a/nipype/interfaces/mipav/tests/test_auto_JistIntensityMp2rageMasking.py b/nipype/interfaces/mipav/tests/test_auto_JistIntensityMp2rageMasking.py index 86b4732d95..769202018d 100644 --- a/nipype/interfaces/mipav/tests/test_auto_JistIntensityMp2rageMasking.py +++ b/nipype/interfaces/mipav/tests/test_auto_JistIntensityMp2rageMasking.py @@ -9,7 +9,8 @@ def test_JistIntensityMp2rageMasking_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inBackground=dict(argstr='--inBackground %s', diff --git a/nipype/interfaces/mipav/tests/test_auto_JistLaminarProfileCalculator.py b/nipype/interfaces/mipav/tests/test_auto_JistLaminarProfileCalculator.py index 307b905f92..0485ed2ad2 100644 --- a/nipype/interfaces/mipav/tests/test_auto_JistLaminarProfileCalculator.py +++ b/nipype/interfaces/mipav/tests/test_auto_JistLaminarProfileCalculator.py @@ -9,7 +9,8 @@ def test_JistLaminarProfileCalculator_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inIntensity=dict(argstr='--inIntensity %s', diff --git a/nipype/interfaces/mipav/tests/test_auto_JistLaminarProfileGeometry.py b/nipype/interfaces/mipav/tests/test_auto_JistLaminarProfileGeometry.py index fa1c272e34..21f94d42e9 100644 --- a/nipype/interfaces/mipav/tests/test_auto_JistLaminarProfileGeometry.py +++ b/nipype/interfaces/mipav/tests/test_auto_JistLaminarProfileGeometry.py @@ -9,7 +9,8 @@ def test_JistLaminarProfileGeometry_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inProfile=dict(argstr='--inProfile %s', diff --git a/nipype/interfaces/mipav/tests/test_auto_JistLaminarProfileSampling.py b/nipype/interfaces/mipav/tests/test_auto_JistLaminarProfileSampling.py index f140358400..6d9ad3493a 100644 --- a/nipype/interfaces/mipav/tests/test_auto_JistLaminarProfileSampling.py +++ b/nipype/interfaces/mipav/tests/test_auto_JistLaminarProfileSampling.py @@ -9,7 +9,8 @@ def test_JistLaminarProfileSampling_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inCortex=dict(argstr='--inCortex %s', diff --git a/nipype/interfaces/mipav/tests/test_auto_JistLaminarROIAveraging.py b/nipype/interfaces/mipav/tests/test_auto_JistLaminarROIAveraging.py index a369b28b2c..012fa2872b 100644 --- a/nipype/interfaces/mipav/tests/test_auto_JistLaminarROIAveraging.py +++ b/nipype/interfaces/mipav/tests/test_auto_JistLaminarROIAveraging.py @@ -9,7 +9,8 @@ def test_JistLaminarROIAveraging_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inIntensity=dict(argstr='--inIntensity %s', diff --git a/nipype/interfaces/mipav/tests/test_auto_JistLaminarVolumetricLayering.py b/nipype/interfaces/mipav/tests/test_auto_JistLaminarVolumetricLayering.py index 9f5971c25f..e80496ec47 100644 --- a/nipype/interfaces/mipav/tests/test_auto_JistLaminarVolumetricLayering.py +++ b/nipype/interfaces/mipav/tests/test_auto_JistLaminarVolumetricLayering.py @@ -9,7 +9,8 @@ def test_JistLaminarVolumetricLayering_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inInner=dict(argstr='--inInner %s', diff --git a/nipype/interfaces/mipav/tests/test_auto_MedicAlgorithmImageCalculator.py b/nipype/interfaces/mipav/tests/test_auto_MedicAlgorithmImageCalculator.py index 032c318472..c273cbf378 100644 --- a/nipype/interfaces/mipav/tests/test_auto_MedicAlgorithmImageCalculator.py +++ b/nipype/interfaces/mipav/tests/test_auto_MedicAlgorithmImageCalculator.py @@ -9,7 +9,8 @@ def test_MedicAlgorithmImageCalculator_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inOperation=dict(argstr='--inOperation %s', diff --git a/nipype/interfaces/mipav/tests/test_auto_MedicAlgorithmLesionToads.py b/nipype/interfaces/mipav/tests/test_auto_MedicAlgorithmLesionToads.py index d97d670b7a..dd97b91a1f 100644 --- a/nipype/interfaces/mipav/tests/test_auto_MedicAlgorithmLesionToads.py +++ b/nipype/interfaces/mipav/tests/test_auto_MedicAlgorithmLesionToads.py @@ -9,7 +9,8 @@ def test_MedicAlgorithmLesionToads_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inAtlas=dict(argstr='--inAtlas %s', diff --git a/nipype/interfaces/mipav/tests/test_auto_MedicAlgorithmMipavReorient.py b/nipype/interfaces/mipav/tests/test_auto_MedicAlgorithmMipavReorient.py index dac7501343..e089749b4c 100644 --- a/nipype/interfaces/mipav/tests/test_auto_MedicAlgorithmMipavReorient.py +++ b/nipype/interfaces/mipav/tests/test_auto_MedicAlgorithmMipavReorient.py @@ -9,7 +9,8 @@ def test_MedicAlgorithmMipavReorient_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inInterpolation=dict(argstr='--inInterpolation %s', diff --git a/nipype/interfaces/mipav/tests/test_auto_MedicAlgorithmN3.py b/nipype/interfaces/mipav/tests/test_auto_MedicAlgorithmN3.py index 279e53416f..42a161c44e 100644 --- a/nipype/interfaces/mipav/tests/test_auto_MedicAlgorithmN3.py +++ b/nipype/interfaces/mipav/tests/test_auto_MedicAlgorithmN3.py @@ -9,7 +9,8 @@ def test_MedicAlgorithmN3_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inAutomatic=dict(argstr='--inAutomatic %s', diff --git a/nipype/interfaces/mipav/tests/test_auto_MedicAlgorithmSPECTRE2010.py b/nipype/interfaces/mipav/tests/test_auto_MedicAlgorithmSPECTRE2010.py index c7a3e1bfcc..6d2c379fcf 100644 --- a/nipype/interfaces/mipav/tests/test_auto_MedicAlgorithmSPECTRE2010.py +++ b/nipype/interfaces/mipav/tests/test_auto_MedicAlgorithmSPECTRE2010.py @@ -9,7 +9,8 @@ def test_MedicAlgorithmSPECTRE2010_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inApply=dict(argstr='--inApply %s', diff --git a/nipype/interfaces/mipav/tests/test_auto_MedicAlgorithmThresholdToBinaryMask.py b/nipype/interfaces/mipav/tests/test_auto_MedicAlgorithmThresholdToBinaryMask.py index 9c21194793..c895cd75d5 100644 --- a/nipype/interfaces/mipav/tests/test_auto_MedicAlgorithmThresholdToBinaryMask.py +++ b/nipype/interfaces/mipav/tests/test_auto_MedicAlgorithmThresholdToBinaryMask.py @@ -9,7 +9,8 @@ def test_MedicAlgorithmThresholdToBinaryMask_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inLabel=dict(argstr='--inLabel %s', diff --git a/nipype/interfaces/mipav/tests/test_auto_RandomVol.py b/nipype/interfaces/mipav/tests/test_auto_RandomVol.py index 3e4c22b80e..b7e3c098f7 100644 --- a/nipype/interfaces/mipav/tests/test_auto_RandomVol.py +++ b/nipype/interfaces/mipav/tests/test_auto_RandomVol.py @@ -9,7 +9,8 @@ def test_RandomVol_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inField=dict(argstr='--inField %s', diff --git a/nipype/interfaces/mne/tests/test_auto_WatershedBEM.py b/nipype/interfaces/mne/tests/test_auto_WatershedBEM.py index de29c86fde..4fb5dcee55 100644 --- a/nipype/interfaces/mne/tests/test_auto_WatershedBEM.py +++ b/nipype/interfaces/mne/tests/test_auto_WatershedBEM.py @@ -11,7 +11,8 @@ def test_WatershedBEM_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), overwrite=dict(argstr='--overwrite', diff --git a/nipype/interfaces/mrtrix/tests/test_auto_ConstrainedSphericalDeconvolution.py b/nipype/interfaces/mrtrix/tests/test_auto_ConstrainedSphericalDeconvolution.py index 5ab7b11f6b..ef66cfc691 100644 --- a/nipype/interfaces/mrtrix/tests/test_auto_ConstrainedSphericalDeconvolution.py +++ b/nipype/interfaces/mrtrix/tests/test_auto_ConstrainedSphericalDeconvolution.py @@ -20,7 +20,8 @@ def test_ConstrainedSphericalDeconvolution_inputs(): filter_file=dict(argstr='-filter %s', position=-2, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/mrtrix/tests/test_auto_DWI2SphericalHarmonicsImage.py b/nipype/interfaces/mrtrix/tests/test_auto_DWI2SphericalHarmonicsImage.py index dddd1a7e95..54a028727e 100644 --- a/nipype/interfaces/mrtrix/tests/test_auto_DWI2SphericalHarmonicsImage.py +++ b/nipype/interfaces/mrtrix/tests/test_auto_DWI2SphericalHarmonicsImage.py @@ -13,7 +13,8 @@ def test_DWI2SphericalHarmonicsImage_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/mrtrix/tests/test_auto_DWI2Tensor.py b/nipype/interfaces/mrtrix/tests/test_auto_DWI2Tensor.py index 28c678b671..051172702f 100644 --- a/nipype/interfaces/mrtrix/tests/test_auto_DWI2Tensor.py +++ b/nipype/interfaces/mrtrix/tests/test_auto_DWI2Tensor.py @@ -15,7 +15,8 @@ def test_DWI2Tensor_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), ignore_slice_by_volume=dict(argstr='-ignoreslices %s', diff --git a/nipype/interfaces/mrtrix/tests/test_auto_DiffusionTensorStreamlineTrack.py b/nipype/interfaces/mrtrix/tests/test_auto_DiffusionTensorStreamlineTrack.py index 87af9bcc7e..46f45243ee 100644 --- a/nipype/interfaces/mrtrix/tests/test_auto_DiffusionTensorStreamlineTrack.py +++ b/nipype/interfaces/mrtrix/tests/test_auto_DiffusionTensorStreamlineTrack.py @@ -29,7 +29,8 @@ def test_DiffusionTensorStreamlineTrack_inputs(): mandatory=True, position=-2, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/mrtrix/tests/test_auto_Directions2Amplitude.py b/nipype/interfaces/mrtrix/tests/test_auto_Directions2Amplitude.py index 48fb914125..dfe29bbb7c 100644 --- a/nipype/interfaces/mrtrix/tests/test_auto_Directions2Amplitude.py +++ b/nipype/interfaces/mrtrix/tests/test_auto_Directions2Amplitude.py @@ -13,7 +13,8 @@ def test_Directions2Amplitude_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/mrtrix/tests/test_auto_Erode.py b/nipype/interfaces/mrtrix/tests/test_auto_Erode.py index 70cdd1a691..874ad1ba0e 100644 --- a/nipype/interfaces/mrtrix/tests/test_auto_Erode.py +++ b/nipype/interfaces/mrtrix/tests/test_auto_Erode.py @@ -15,7 +15,8 @@ def test_Erode_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/mrtrix/tests/test_auto_EstimateResponseForSH.py b/nipype/interfaces/mrtrix/tests/test_auto_EstimateResponseForSH.py index 07928dfe43..5d81dbecd6 100644 --- a/nipype/interfaces/mrtrix/tests/test_auto_EstimateResponseForSH.py +++ b/nipype/interfaces/mrtrix/tests/test_auto_EstimateResponseForSH.py @@ -15,7 +15,8 @@ def test_EstimateResponseForSH_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/mrtrix/tests/test_auto_FilterTracks.py b/nipype/interfaces/mrtrix/tests/test_auto_FilterTracks.py index c6582da586..5c53341e8f 100644 --- a/nipype/interfaces/mrtrix/tests/test_auto_FilterTracks.py +++ b/nipype/interfaces/mrtrix/tests/test_auto_FilterTracks.py @@ -21,7 +21,8 @@ def test_FilterTracks_inputs(): units='mm', xor=['exclude_file', 'exclude_spec'], ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/mrtrix/tests/test_auto_FindShPeaks.py b/nipype/interfaces/mrtrix/tests/test_auto_FindShPeaks.py index 68251c23c0..f0571ad997 100644 --- a/nipype/interfaces/mrtrix/tests/test_auto_FindShPeaks.py +++ b/nipype/interfaces/mrtrix/tests/test_auto_FindShPeaks.py @@ -17,7 +17,8 @@ def test_FindShPeaks_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/mrtrix/tests/test_auto_GenerateDirections.py b/nipype/interfaces/mrtrix/tests/test_auto_GenerateDirections.py index cd14499969..8e4167167f 100644 --- a/nipype/interfaces/mrtrix/tests/test_auto_GenerateDirections.py +++ b/nipype/interfaces/mrtrix/tests/test_auto_GenerateDirections.py @@ -13,7 +13,8 @@ def test_GenerateDirections_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), niter=dict(argstr='-niter %s', diff --git a/nipype/interfaces/mrtrix/tests/test_auto_GenerateWhiteMatterMask.py b/nipype/interfaces/mrtrix/tests/test_auto_GenerateWhiteMatterMask.py index c8ce15714c..bda204c9ad 100644 --- a/nipype/interfaces/mrtrix/tests/test_auto_GenerateWhiteMatterMask.py +++ b/nipype/interfaces/mrtrix/tests/test_auto_GenerateWhiteMatterMask.py @@ -17,7 +17,8 @@ def test_GenerateWhiteMatterMask_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/mrtrix/tests/test_auto_MRConvert.py b/nipype/interfaces/mrtrix/tests/test_auto_MRConvert.py index 2028d9ebab..ed9071256e 100644 --- a/nipype/interfaces/mrtrix/tests/test_auto_MRConvert.py +++ b/nipype/interfaces/mrtrix/tests/test_auto_MRConvert.py @@ -19,7 +19,8 @@ def test_MRConvert_inputs(): position=2, sep=',', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/mrtrix/tests/test_auto_MRMultiply.py b/nipype/interfaces/mrtrix/tests/test_auto_MRMultiply.py index 61d8920633..efb8b92249 100644 --- a/nipype/interfaces/mrtrix/tests/test_auto_MRMultiply.py +++ b/nipype/interfaces/mrtrix/tests/test_auto_MRMultiply.py @@ -12,7 +12,8 @@ def test_MRMultiply_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_files=dict(argstr='%s', diff --git a/nipype/interfaces/mrtrix/tests/test_auto_MRTransform.py b/nipype/interfaces/mrtrix/tests/test_auto_MRTransform.py index ee3be59eff..a685293371 100644 --- a/nipype/interfaces/mrtrix/tests/test_auto_MRTransform.py +++ b/nipype/interfaces/mrtrix/tests/test_auto_MRTransform.py @@ -15,7 +15,8 @@ def test_MRTransform_inputs(): flip_x=dict(argstr='-flipx', position=1, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_files=dict(argstr='%s', diff --git a/nipype/interfaces/mrtrix/tests/test_auto_MRTrixInfo.py b/nipype/interfaces/mrtrix/tests/test_auto_MRTrixInfo.py index 4f6784bd5c..4fe4d2952b 100644 --- a/nipype/interfaces/mrtrix/tests/test_auto_MRTrixInfo.py +++ b/nipype/interfaces/mrtrix/tests/test_auto_MRTrixInfo.py @@ -9,7 +9,8 @@ def test_MRTrixInfo_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/mrtrix/tests/test_auto_MRTrixViewer.py b/nipype/interfaces/mrtrix/tests/test_auto_MRTrixViewer.py index 15ab6d4919..19a0e6f710 100644 --- a/nipype/interfaces/mrtrix/tests/test_auto_MRTrixViewer.py +++ b/nipype/interfaces/mrtrix/tests/test_auto_MRTrixViewer.py @@ -12,7 +12,8 @@ def test_MRTrixViewer_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_files=dict(argstr='%s', diff --git a/nipype/interfaces/mrtrix/tests/test_auto_MedianFilter3D.py b/nipype/interfaces/mrtrix/tests/test_auto_MedianFilter3D.py index b56c033abb..0b13574b78 100644 --- a/nipype/interfaces/mrtrix/tests/test_auto_MedianFilter3D.py +++ b/nipype/interfaces/mrtrix/tests/test_auto_MedianFilter3D.py @@ -12,7 +12,8 @@ def test_MedianFilter3D_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/mrtrix/tests/test_auto_ProbabilisticSphericallyDeconvolutedStreamlineTrack.py b/nipype/interfaces/mrtrix/tests/test_auto_ProbabilisticSphericallyDeconvolutedStreamlineTrack.py index bfeaab595b..f3fcda4884 100644 --- a/nipype/interfaces/mrtrix/tests/test_auto_ProbabilisticSphericallyDeconvolutedStreamlineTrack.py +++ b/nipype/interfaces/mrtrix/tests/test_auto_ProbabilisticSphericallyDeconvolutedStreamlineTrack.py @@ -25,7 +25,8 @@ def test_ProbabilisticSphericallyDeconvolutedStreamlineTrack_inputs(): units='mm', xor=['exclude_file', 'exclude_spec'], ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/mrtrix/tests/test_auto_SphericallyDeconvolutedStreamlineTrack.py b/nipype/interfaces/mrtrix/tests/test_auto_SphericallyDeconvolutedStreamlineTrack.py index 05afc4dd17..a8ef768850 100644 --- a/nipype/interfaces/mrtrix/tests/test_auto_SphericallyDeconvolutedStreamlineTrack.py +++ b/nipype/interfaces/mrtrix/tests/test_auto_SphericallyDeconvolutedStreamlineTrack.py @@ -25,7 +25,8 @@ def test_SphericallyDeconvolutedStreamlineTrack_inputs(): units='mm', xor=['exclude_file', 'exclude_spec'], ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/mrtrix/tests/test_auto_StreamlineTrack.py b/nipype/interfaces/mrtrix/tests/test_auto_StreamlineTrack.py index 192d0b8a6a..5e028c40ac 100644 --- a/nipype/interfaces/mrtrix/tests/test_auto_StreamlineTrack.py +++ b/nipype/interfaces/mrtrix/tests/test_auto_StreamlineTrack.py @@ -25,7 +25,8 @@ def test_StreamlineTrack_inputs(): units='mm', xor=['exclude_file', 'exclude_spec'], ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/mrtrix/tests/test_auto_Tensor2ApparentDiffusion.py b/nipype/interfaces/mrtrix/tests/test_auto_Tensor2ApparentDiffusion.py index 22da9f1842..e4f32e21d2 100644 --- a/nipype/interfaces/mrtrix/tests/test_auto_Tensor2ApparentDiffusion.py +++ b/nipype/interfaces/mrtrix/tests/test_auto_Tensor2ApparentDiffusion.py @@ -12,7 +12,8 @@ def test_Tensor2ApparentDiffusion_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/mrtrix/tests/test_auto_Tensor2FractionalAnisotropy.py b/nipype/interfaces/mrtrix/tests/test_auto_Tensor2FractionalAnisotropy.py index 70fb981fc9..07535aa125 100644 --- a/nipype/interfaces/mrtrix/tests/test_auto_Tensor2FractionalAnisotropy.py +++ b/nipype/interfaces/mrtrix/tests/test_auto_Tensor2FractionalAnisotropy.py @@ -12,7 +12,8 @@ def test_Tensor2FractionalAnisotropy_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/mrtrix/tests/test_auto_Tensor2Vector.py b/nipype/interfaces/mrtrix/tests/test_auto_Tensor2Vector.py index 62bde41c8b..724c9cb534 100644 --- a/nipype/interfaces/mrtrix/tests/test_auto_Tensor2Vector.py +++ b/nipype/interfaces/mrtrix/tests/test_auto_Tensor2Vector.py @@ -12,7 +12,8 @@ def test_Tensor2Vector_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/mrtrix/tests/test_auto_Threshold.py b/nipype/interfaces/mrtrix/tests/test_auto_Threshold.py index 6668810b72..124e87a0b2 100644 --- a/nipype/interfaces/mrtrix/tests/test_auto_Threshold.py +++ b/nipype/interfaces/mrtrix/tests/test_auto_Threshold.py @@ -14,7 +14,8 @@ def test_Threshold_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/mrtrix/tests/test_auto_Tracks2Prob.py b/nipype/interfaces/mrtrix/tests/test_auto_Tracks2Prob.py index 5265fe1ba4..f1a2a08355 100644 --- a/nipype/interfaces/mrtrix/tests/test_auto_Tracks2Prob.py +++ b/nipype/interfaces/mrtrix/tests/test_auto_Tracks2Prob.py @@ -15,7 +15,8 @@ def test_Tracks2Prob_inputs(): fraction=dict(argstr='-fraction', position=3, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/mrtrix3/tests/test_auto_ACTPrepareFSL.py b/nipype/interfaces/mrtrix3/tests/test_auto_ACTPrepareFSL.py index fa2bc2f222..9918c9ae32 100644 --- a/nipype/interfaces/mrtrix3/tests/test_auto_ACTPrepareFSL.py +++ b/nipype/interfaces/mrtrix3/tests/test_auto_ACTPrepareFSL.py @@ -9,7 +9,8 @@ def test_ACTPrepareFSL_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/mrtrix3/tests/test_auto_BrainMask.py b/nipype/interfaces/mrtrix3/tests/test_auto_BrainMask.py index 1056ecadcc..25b9716f80 100644 --- a/nipype/interfaces/mrtrix3/tests/test_auto_BrainMask.py +++ b/nipype/interfaces/mrtrix3/tests/test_auto_BrainMask.py @@ -15,7 +15,8 @@ def test_BrainMask_inputs(): ), grad_fsl=dict(argstr='-fslgrad %s %s', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_bval=dict(), diff --git a/nipype/interfaces/mrtrix3/tests/test_auto_BuildConnectome.py b/nipype/interfaces/mrtrix3/tests/test_auto_BuildConnectome.py index 4f12e08cfc..fdac1f65fb 100644 --- a/nipype/interfaces/mrtrix3/tests/test_auto_BuildConnectome.py +++ b/nipype/interfaces/mrtrix3/tests/test_auto_BuildConnectome.py @@ -9,7 +9,8 @@ def test_BuildConnectome_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/mrtrix3/tests/test_auto_ComputeTDI.py b/nipype/interfaces/mrtrix3/tests/test_auto_ComputeTDI.py index f9dac1b48e..0183045c56 100644 --- a/nipype/interfaces/mrtrix3/tests/test_auto_ComputeTDI.py +++ b/nipype/interfaces/mrtrix3/tests/test_auto_ComputeTDI.py @@ -19,7 +19,8 @@ def test_ComputeTDI_inputs(): ), fwhm_tck=dict(argstr='-fwhm_tck %f', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/mrtrix3/tests/test_auto_EstimateFOD.py b/nipype/interfaces/mrtrix3/tests/test_auto_EstimateFOD.py index f645703bba..88f2ba343e 100644 --- a/nipype/interfaces/mrtrix3/tests/test_auto_EstimateFOD.py +++ b/nipype/interfaces/mrtrix3/tests/test_auto_EstimateFOD.py @@ -15,7 +15,8 @@ def test_EstimateFOD_inputs(): ), grad_fsl=dict(argstr='-fslgrad %s %s', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_bval=dict(), diff --git a/nipype/interfaces/mrtrix3/tests/test_auto_FitTensor.py b/nipype/interfaces/mrtrix3/tests/test_auto_FitTensor.py index 693e522b80..f61669d5c9 100644 --- a/nipype/interfaces/mrtrix3/tests/test_auto_FitTensor.py +++ b/nipype/interfaces/mrtrix3/tests/test_auto_FitTensor.py @@ -15,7 +15,8 @@ def test_FitTensor_inputs(): ), grad_fsl=dict(argstr='-fslgrad %s %s', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_bval=dict(), diff --git a/nipype/interfaces/mrtrix3/tests/test_auto_Generate5tt.py b/nipype/interfaces/mrtrix3/tests/test_auto_Generate5tt.py index 2afa4e46da..dd6d1d6408 100644 --- a/nipype/interfaces/mrtrix3/tests/test_auto_Generate5tt.py +++ b/nipype/interfaces/mrtrix3/tests/test_auto_Generate5tt.py @@ -9,7 +9,8 @@ def test_Generate5tt_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_fast=dict(argstr='%s', diff --git a/nipype/interfaces/mrtrix3/tests/test_auto_LabelConfig.py b/nipype/interfaces/mrtrix3/tests/test_auto_LabelConfig.py index 91463a46fb..4594894ef1 100644 --- a/nipype/interfaces/mrtrix3/tests/test_auto_LabelConfig.py +++ b/nipype/interfaces/mrtrix3/tests/test_auto_LabelConfig.py @@ -9,7 +9,8 @@ def test_LabelConfig_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_config=dict(argstr='%s', diff --git a/nipype/interfaces/mrtrix3/tests/test_auto_MRTrix3Base.py b/nipype/interfaces/mrtrix3/tests/test_auto_MRTrix3Base.py index 44fc68a474..1d306b6a86 100644 --- a/nipype/interfaces/mrtrix3/tests/test_auto_MRTrix3Base.py +++ b/nipype/interfaces/mrtrix3/tests/test_auto_MRTrix3Base.py @@ -9,7 +9,8 @@ def test_MRTrix3Base_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), terminal_output=dict(deprecated='1.0.0', diff --git a/nipype/interfaces/mrtrix3/tests/test_auto_Mesh2PVE.py b/nipype/interfaces/mrtrix3/tests/test_auto_Mesh2PVE.py index 6f07bd8eab..30dac94dda 100644 --- a/nipype/interfaces/mrtrix3/tests/test_auto_Mesh2PVE.py +++ b/nipype/interfaces/mrtrix3/tests/test_auto_Mesh2PVE.py @@ -9,7 +9,8 @@ def test_Mesh2PVE_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/mrtrix3/tests/test_auto_ReplaceFSwithFIRST.py b/nipype/interfaces/mrtrix3/tests/test_auto_ReplaceFSwithFIRST.py index fb5f86f8d4..b881dc7d1b 100644 --- a/nipype/interfaces/mrtrix3/tests/test_auto_ReplaceFSwithFIRST.py +++ b/nipype/interfaces/mrtrix3/tests/test_auto_ReplaceFSwithFIRST.py @@ -9,7 +9,8 @@ def test_ReplaceFSwithFIRST_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_config=dict(argstr='%s', diff --git a/nipype/interfaces/mrtrix3/tests/test_auto_ResponseSD.py b/nipype/interfaces/mrtrix3/tests/test_auto_ResponseSD.py index 4a4aeb153e..268786ea94 100644 --- a/nipype/interfaces/mrtrix3/tests/test_auto_ResponseSD.py +++ b/nipype/interfaces/mrtrix3/tests/test_auto_ResponseSD.py @@ -17,7 +17,8 @@ def test_ResponseSD_inputs(): ), grad_fsl=dict(argstr='-fslgrad %s %s', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_bval=dict(), diff --git a/nipype/interfaces/mrtrix3/tests/test_auto_TCK2VTK.py b/nipype/interfaces/mrtrix3/tests/test_auto_TCK2VTK.py index 284235ca55..d5f88bc470 100644 --- a/nipype/interfaces/mrtrix3/tests/test_auto_TCK2VTK.py +++ b/nipype/interfaces/mrtrix3/tests/test_auto_TCK2VTK.py @@ -9,7 +9,8 @@ def test_TCK2VTK_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/mrtrix3/tests/test_auto_TensorMetrics.py b/nipype/interfaces/mrtrix3/tests/test_auto_TensorMetrics.py index 0103efc7e1..d51f5fe53e 100644 --- a/nipype/interfaces/mrtrix3/tests/test_auto_TensorMetrics.py +++ b/nipype/interfaces/mrtrix3/tests/test_auto_TensorMetrics.py @@ -12,7 +12,8 @@ def test_TensorMetrics_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/mrtrix3/tests/test_auto_Tractography.py b/nipype/interfaces/mrtrix3/tests/test_auto_Tractography.py index e1a684b8d9..6c715202b5 100644 --- a/nipype/interfaces/mrtrix3/tests/test_auto_Tractography.py +++ b/nipype/interfaces/mrtrix3/tests/test_auto_Tractography.py @@ -32,7 +32,8 @@ def test_Tractography_inputs(): ), grad_fsl=dict(argstr='-fslgrad %s %s', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_bval=dict(), diff --git a/nipype/interfaces/niftyfit/tests/test_auto_DwiTool.py b/nipype/interfaces/niftyfit/tests/test_auto_DwiTool.py index 41a3d6cc5a..6c0a773fa6 100644 --- a/nipype/interfaces/niftyfit/tests/test_auto_DwiTool.py +++ b/nipype/interfaces/niftyfit/tests/test_auto_DwiTool.py @@ -43,7 +43,8 @@ def test_DwiTool_inputs(): name_source=['source_file'], name_template='%s_famap.nii.gz', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), ivim_flag=dict(argstr='-ivim', diff --git a/nipype/interfaces/niftyfit/tests/test_auto_FitAsl.py b/nipype/interfaces/niftyfit/tests/test_auto_FitAsl.py index d596f0f633..db865b495c 100644 --- a/nipype/interfaces/niftyfit/tests/test_auto_FitAsl.py +++ b/nipype/interfaces/niftyfit/tests/test_auto_FitAsl.py @@ -29,7 +29,8 @@ def test_FitAsl_inputs(): ), gm_ttt=dict(argstr='-gmTTT %f', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), ir_output=dict(argstr='-IRoutput %s', diff --git a/nipype/interfaces/niftyfit/tests/test_auto_FitDwi.py b/nipype/interfaces/niftyfit/tests/test_auto_FitDwi.py index 7ca90b7304..96e8fd736f 100644 --- a/nipype/interfaces/niftyfit/tests/test_auto_FitDwi.py +++ b/nipype/interfaces/niftyfit/tests/test_auto_FitDwi.py @@ -50,7 +50,8 @@ def test_FitDwi_inputs(): gn_flag=dict(argstr='-gn', xor=['wls_flag'], ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), ivim_flag=dict(argstr='-ivim', diff --git a/nipype/interfaces/niftyfit/tests/test_auto_FitQt1.py b/nipype/interfaces/niftyfit/tests/test_auto_FitQt1.py index 3b628975f4..32d1cb7b03 100644 --- a/nipype/interfaces/niftyfit/tests/test_auto_FitQt1.py +++ b/nipype/interfaces/niftyfit/tests/test_auto_FitQt1.py @@ -29,7 +29,8 @@ def test_FitQt1_inputs(): gn_flag=dict(argstr='-gn', position=8, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), ir_flag=dict(argstr='-IR', diff --git a/nipype/interfaces/niftyfit/tests/test_auto_NiftyFitCommand.py b/nipype/interfaces/niftyfit/tests/test_auto_NiftyFitCommand.py index 813a4f69b5..1365775b56 100644 --- a/nipype/interfaces/niftyfit/tests/test_auto_NiftyFitCommand.py +++ b/nipype/interfaces/niftyfit/tests/test_auto_NiftyFitCommand.py @@ -9,7 +9,8 @@ def test_NiftyFitCommand_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), terminal_output=dict(deprecated='1.0.0', diff --git a/nipype/interfaces/niftyreg/tests/test_auto_NiftyRegCommand.py b/nipype/interfaces/niftyreg/tests/test_auto_NiftyRegCommand.py index f97733e5ca..ee4b020bd0 100644 --- a/nipype/interfaces/niftyreg/tests/test_auto_NiftyRegCommand.py +++ b/nipype/interfaces/niftyreg/tests/test_auto_NiftyRegCommand.py @@ -9,7 +9,8 @@ def test_NiftyRegCommand_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), omp_core_val=dict(argstr='-omp %i', diff --git a/nipype/interfaces/niftyreg/tests/test_auto_RegAladin.py b/nipype/interfaces/niftyreg/tests/test_auto_RegAladin.py index a39dad2d73..d177916034 100644 --- a/nipype/interfaces/niftyreg/tests/test_auto_RegAladin.py +++ b/nipype/interfaces/niftyreg/tests/test_auto_RegAladin.py @@ -30,7 +30,8 @@ def test_RegAladin_inputs(): ), i_val=dict(argstr='-pi %d', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_aff_file=dict(argstr='-inaff %s', diff --git a/nipype/interfaces/niftyreg/tests/test_auto_RegAverage.py b/nipype/interfaces/niftyreg/tests/test_auto_RegAverage.py index 7da4788379..7898d68cd3 100644 --- a/nipype/interfaces/niftyreg/tests/test_auto_RegAverage.py +++ b/nipype/interfaces/niftyreg/tests/test_auto_RegAverage.py @@ -39,7 +39,8 @@ def test_RegAverage_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), omp_core_val=dict(argstr='-omp %i', diff --git a/nipype/interfaces/niftyreg/tests/test_auto_RegF3D.py b/nipype/interfaces/niftyreg/tests/test_auto_RegF3D.py index 906439f23d..ba4301e756 100644 --- a/nipype/interfaces/niftyreg/tests/test_auto_RegF3D.py +++ b/nipype/interfaces/niftyreg/tests/test_auto_RegF3D.py @@ -38,7 +38,8 @@ def test_RegF3D_inputs(): ), fupth_thr_val=dict(argstr='--fUpTh %f', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), incpp_file=dict(argstr='-incpp %s', diff --git a/nipype/interfaces/niftyreg/tests/test_auto_RegJacobian.py b/nipype/interfaces/niftyreg/tests/test_auto_RegJacobian.py index 8bcd86d85e..fd4d81b6a1 100644 --- a/nipype/interfaces/niftyreg/tests/test_auto_RegJacobian.py +++ b/nipype/interfaces/niftyreg/tests/test_auto_RegJacobian.py @@ -9,7 +9,8 @@ def test_RegJacobian_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), omp_core_val=dict(argstr='-omp %i', diff --git a/nipype/interfaces/niftyreg/tests/test_auto_RegMeasure.py b/nipype/interfaces/niftyreg/tests/test_auto_RegMeasure.py index 957442a86b..11b1248e6d 100644 --- a/nipype/interfaces/niftyreg/tests/test_auto_RegMeasure.py +++ b/nipype/interfaces/niftyreg/tests/test_auto_RegMeasure.py @@ -12,7 +12,8 @@ def test_RegMeasure_inputs(): flo_file=dict(argstr='-flo %s', mandatory=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), measure_type=dict(argstr='-%s', diff --git a/nipype/interfaces/niftyreg/tests/test_auto_RegResample.py b/nipype/interfaces/niftyreg/tests/test_auto_RegResample.py index 130c734b69..7efa3c5068 100644 --- a/nipype/interfaces/niftyreg/tests/test_auto_RegResample.py +++ b/nipype/interfaces/niftyreg/tests/test_auto_RegResample.py @@ -12,7 +12,8 @@ def test_RegResample_inputs(): flo_file=dict(argstr='-flo %s', mandatory=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inter_val=dict(argstr='-inter %d', diff --git a/nipype/interfaces/niftyreg/tests/test_auto_RegTools.py b/nipype/interfaces/niftyreg/tests/test_auto_RegTools.py index 5485a92b4d..8b8c371638 100644 --- a/nipype/interfaces/niftyreg/tests/test_auto_RegTools.py +++ b/nipype/interfaces/niftyreg/tests/test_auto_RegTools.py @@ -19,7 +19,8 @@ def test_RegTools_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='-in %s', diff --git a/nipype/interfaces/niftyreg/tests/test_auto_RegTransform.py b/nipype/interfaces/niftyreg/tests/test_auto_RegTransform.py index 624f07d350..3730a8b42d 100644 --- a/nipype/interfaces/niftyreg/tests/test_auto_RegTransform.py +++ b/nipype/interfaces/niftyreg/tests/test_auto_RegTransform.py @@ -41,7 +41,8 @@ def test_RegTransform_inputs(): position=-2, xor=['def_input', 'disp_input', 'flow_input', 'comp_input', 'upd_s_form_input', 'inv_aff_input', 'inv_nrr_input', 'make_aff_input', 'aff_2_rig_input', 'flirt_2_nr_input'], ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inv_aff_input=dict(argstr='-invAff %s', diff --git a/nipype/interfaces/niftyseg/tests/test_auto_BinaryMaths.py b/nipype/interfaces/niftyseg/tests/test_auto_BinaryMaths.py index 6962adcda5..5a4a5cd3f3 100644 --- a/nipype/interfaces/niftyseg/tests/test_auto_BinaryMaths.py +++ b/nipype/interfaces/niftyseg/tests/test_auto_BinaryMaths.py @@ -9,7 +9,8 @@ def test_BinaryMaths_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/niftyseg/tests/test_auto_BinaryMathsInteger.py b/nipype/interfaces/niftyseg/tests/test_auto_BinaryMathsInteger.py index 1c1617d2ce..b8ea1f87f7 100644 --- a/nipype/interfaces/niftyseg/tests/test_auto_BinaryMathsInteger.py +++ b/nipype/interfaces/niftyseg/tests/test_auto_BinaryMathsInteger.py @@ -9,7 +9,8 @@ def test_BinaryMathsInteger_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/niftyseg/tests/test_auto_BinaryStats.py b/nipype/interfaces/niftyseg/tests/test_auto_BinaryStats.py index a42f84f4f8..dce54af8dc 100644 --- a/nipype/interfaces/niftyseg/tests/test_auto_BinaryStats.py +++ b/nipype/interfaces/niftyseg/tests/test_auto_BinaryStats.py @@ -9,7 +9,8 @@ def test_BinaryStats_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/niftyseg/tests/test_auto_CalcTopNCC.py b/nipype/interfaces/niftyseg/tests/test_auto_CalcTopNCC.py index 00aed5210e..201f15153a 100644 --- a/nipype/interfaces/niftyseg/tests/test_auto_CalcTopNCC.py +++ b/nipype/interfaces/niftyseg/tests/test_auto_CalcTopNCC.py @@ -9,7 +9,8 @@ def test_CalcTopNCC_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='-target %s', diff --git a/nipype/interfaces/niftyseg/tests/test_auto_EM.py b/nipype/interfaces/niftyseg/tests/test_auto_EM.py index 8e76cd7dd7..9790ad9757 100644 --- a/nipype/interfaces/niftyseg/tests/test_auto_EM.py +++ b/nipype/interfaces/niftyseg/tests/test_auto_EM.py @@ -13,7 +13,8 @@ def test_EM_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='-in %s', diff --git a/nipype/interfaces/niftyseg/tests/test_auto_FillLesions.py b/nipype/interfaces/niftyseg/tests/test_auto_FillLesions.py index 9688599c1d..a95651bf61 100644 --- a/nipype/interfaces/niftyseg/tests/test_auto_FillLesions.py +++ b/nipype/interfaces/niftyseg/tests/test_auto_FillLesions.py @@ -15,7 +15,8 @@ def test_FillLesions_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_dilation=dict(argstr='-dil %d', diff --git a/nipype/interfaces/niftyseg/tests/test_auto_LabelFusion.py b/nipype/interfaces/niftyseg/tests/test_auto_LabelFusion.py index bf1707db6b..3530644d7d 100644 --- a/nipype/interfaces/niftyseg/tests/test_auto_LabelFusion.py +++ b/nipype/interfaces/niftyseg/tests/test_auto_LabelFusion.py @@ -18,7 +18,8 @@ def test_LabelFusion_inputs(): ), file_to_seg=dict(mandatory=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='-in %s', diff --git a/nipype/interfaces/niftyseg/tests/test_auto_MathsCommand.py b/nipype/interfaces/niftyseg/tests/test_auto_MathsCommand.py index b16795a3d9..67435c1def 100644 --- a/nipype/interfaces/niftyseg/tests/test_auto_MathsCommand.py +++ b/nipype/interfaces/niftyseg/tests/test_auto_MathsCommand.py @@ -9,7 +9,8 @@ def test_MathsCommand_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/niftyseg/tests/test_auto_Merge.py b/nipype/interfaces/niftyseg/tests/test_auto_Merge.py index 969b8f2d24..4d13929b23 100644 --- a/nipype/interfaces/niftyseg/tests/test_auto_Merge.py +++ b/nipype/interfaces/niftyseg/tests/test_auto_Merge.py @@ -11,7 +11,8 @@ def test_Merge_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/niftyseg/tests/test_auto_NiftySegCommand.py b/nipype/interfaces/niftyseg/tests/test_auto_NiftySegCommand.py index 8847241f56..d7483fc228 100644 --- a/nipype/interfaces/niftyseg/tests/test_auto_NiftySegCommand.py +++ b/nipype/interfaces/niftyseg/tests/test_auto_NiftySegCommand.py @@ -9,7 +9,8 @@ def test_NiftySegCommand_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), terminal_output=dict(deprecated='1.0.0', diff --git a/nipype/interfaces/niftyseg/tests/test_auto_StatsCommand.py b/nipype/interfaces/niftyseg/tests/test_auto_StatsCommand.py index 82daa127cd..6ca821c52f 100644 --- a/nipype/interfaces/niftyseg/tests/test_auto_StatsCommand.py +++ b/nipype/interfaces/niftyseg/tests/test_auto_StatsCommand.py @@ -9,7 +9,8 @@ def test_StatsCommand_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/niftyseg/tests/test_auto_TupleMaths.py b/nipype/interfaces/niftyseg/tests/test_auto_TupleMaths.py index 108d74a072..702b3961d9 100644 --- a/nipype/interfaces/niftyseg/tests/test_auto_TupleMaths.py +++ b/nipype/interfaces/niftyseg/tests/test_auto_TupleMaths.py @@ -9,7 +9,8 @@ def test_TupleMaths_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/niftyseg/tests/test_auto_UnaryMaths.py b/nipype/interfaces/niftyseg/tests/test_auto_UnaryMaths.py index c7a2fdaf56..c5144bbc65 100644 --- a/nipype/interfaces/niftyseg/tests/test_auto_UnaryMaths.py +++ b/nipype/interfaces/niftyseg/tests/test_auto_UnaryMaths.py @@ -9,7 +9,8 @@ def test_UnaryMaths_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/niftyseg/tests/test_auto_UnaryStats.py b/nipype/interfaces/niftyseg/tests/test_auto_UnaryStats.py index fa5a17cfce..81bea6f18b 100644 --- a/nipype/interfaces/niftyseg/tests/test_auto_UnaryStats.py +++ b/nipype/interfaces/niftyseg/tests/test_auto_UnaryStats.py @@ -9,7 +9,8 @@ def test_UnaryStats_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/nipy/tests/test_auto_ComputeMask.py b/nipype/interfaces/nipy/tests/test_auto_ComputeMask.py index 915f2c85d2..401f2b0f62 100644 --- a/nipype/interfaces/nipy/tests/test_auto_ComputeMask.py +++ b/nipype/interfaces/nipy/tests/test_auto_ComputeMask.py @@ -6,7 +6,8 @@ def test_ComputeMask_inputs(): input_map = dict(M=dict(), cc=dict(), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), m=dict(), diff --git a/nipype/interfaces/nipy/tests/test_auto_EstimateContrast.py b/nipype/interfaces/nipy/tests/test_auto_EstimateContrast.py index 7d44248cbc..78f6d02c03 100644 --- a/nipype/interfaces/nipy/tests/test_auto_EstimateContrast.py +++ b/nipype/interfaces/nipy/tests/test_auto_EstimateContrast.py @@ -14,7 +14,8 @@ def test_EstimateContrast_inputs(): ), dof=dict(mandatory=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), mask=dict(), diff --git a/nipype/interfaces/nipy/tests/test_auto_FitGLM.py b/nipype/interfaces/nipy/tests/test_auto_FitGLM.py index 5c3f881179..5aca7d345c 100644 --- a/nipype/interfaces/nipy/tests/test_auto_FitGLM.py +++ b/nipype/interfaces/nipy/tests/test_auto_FitGLM.py @@ -10,7 +10,8 @@ def test_FitGLM_inputs(): ), hrf_model=dict(usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), mask=dict(), diff --git a/nipype/interfaces/nipy/tests/test_auto_FmriRealign4d.py b/nipype/interfaces/nipy/tests/test_auto_FmriRealign4d.py index 80902a7d0c..0360e53df0 100644 --- a/nipype/interfaces/nipy/tests/test_auto_FmriRealign4d.py +++ b/nipype/interfaces/nipy/tests/test_auto_FmriRealign4d.py @@ -6,7 +6,8 @@ def test_FmriRealign4d_inputs(): input_map = dict(between_loops=dict(usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(mandatory=True, diff --git a/nipype/interfaces/nipy/tests/test_auto_Similarity.py b/nipype/interfaces/nipy/tests/test_auto_Similarity.py index f9c815fedb..d65cf36b02 100644 --- a/nipype/interfaces/nipy/tests/test_auto_Similarity.py +++ b/nipype/interfaces/nipy/tests/test_auto_Similarity.py @@ -4,7 +4,8 @@ def test_Similarity_inputs(): - input_map = dict(ignore_exception=dict(nohash=True, + input_map = dict(ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), mask1=dict(), diff --git a/nipype/interfaces/nipy/tests/test_auto_SpaceTimeRealigner.py b/nipype/interfaces/nipy/tests/test_auto_SpaceTimeRealigner.py index b4e495a434..358bd6efa8 100644 --- a/nipype/interfaces/nipy/tests/test_auto_SpaceTimeRealigner.py +++ b/nipype/interfaces/nipy/tests/test_auto_SpaceTimeRealigner.py @@ -4,7 +4,8 @@ def test_SpaceTimeRealigner_inputs(): - input_map = dict(ignore_exception=dict(nohash=True, + input_map = dict(ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(mandatory=True, diff --git a/nipype/interfaces/nipy/tests/test_auto_Trim.py b/nipype/interfaces/nipy/tests/test_auto_Trim.py index c1bc16e103..0d2ad9063b 100644 --- a/nipype/interfaces/nipy/tests/test_auto_Trim.py +++ b/nipype/interfaces/nipy/tests/test_auto_Trim.py @@ -8,7 +8,8 @@ def test_Trim_inputs(): ), end_index=dict(usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(mandatory=True, diff --git a/nipype/interfaces/nitime/tests/test_auto_CoherenceAnalyzer.py b/nipype/interfaces/nitime/tests/test_auto_CoherenceAnalyzer.py index 4d970500d2..159907b978 100644 --- a/nipype/interfaces/nitime/tests/test_auto_CoherenceAnalyzer.py +++ b/nipype/interfaces/nitime/tests/test_auto_CoherenceAnalyzer.py @@ -11,7 +11,8 @@ def test_CoherenceAnalyzer_inputs(): ), frequency_range=dict(usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_TS=dict(), diff --git a/nipype/interfaces/semtools/brains/tests/test_auto_BRAINSPosteriorToContinuousClass.py b/nipype/interfaces/semtools/brains/tests/test_auto_BRAINSPosteriorToContinuousClass.py index 89184c9325..1c2f7ce2cb 100644 --- a/nipype/interfaces/semtools/brains/tests/test_auto_BRAINSPosteriorToContinuousClass.py +++ b/nipype/interfaces/semtools/brains/tests/test_auto_BRAINSPosteriorToContinuousClass.py @@ -9,7 +9,8 @@ def test_BRAINSPosteriorToContinuousClass_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputBasalGmVolume=dict(argstr='--inputBasalGmVolume %s', diff --git a/nipype/interfaces/semtools/brains/tests/test_auto_BRAINSTalairach.py b/nipype/interfaces/semtools/brains/tests/test_auto_BRAINSTalairach.py index de6ae06a6f..1168288a8b 100644 --- a/nipype/interfaces/semtools/brains/tests/test_auto_BRAINSTalairach.py +++ b/nipype/interfaces/semtools/brains/tests/test_auto_BRAINSTalairach.py @@ -29,7 +29,8 @@ def test_BRAINSTalairach_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputVolume=dict(argstr='--inputVolume %s', diff --git a/nipype/interfaces/semtools/brains/tests/test_auto_BRAINSTalairachMask.py b/nipype/interfaces/semtools/brains/tests/test_auto_BRAINSTalairachMask.py index ab262fd36b..6638bd2e5e 100644 --- a/nipype/interfaces/semtools/brains/tests/test_auto_BRAINSTalairachMask.py +++ b/nipype/interfaces/semtools/brains/tests/test_auto_BRAINSTalairachMask.py @@ -13,7 +13,8 @@ def test_BRAINSTalairachMask_inputs(): ), hemisphereMode=dict(argstr='--hemisphereMode %s', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputVolume=dict(argstr='--inputVolume %s', diff --git a/nipype/interfaces/semtools/brains/tests/test_auto_GenerateEdgeMapImage.py b/nipype/interfaces/semtools/brains/tests/test_auto_GenerateEdgeMapImage.py index ca540e4afd..cfee35cd08 100644 --- a/nipype/interfaces/semtools/brains/tests/test_auto_GenerateEdgeMapImage.py +++ b/nipype/interfaces/semtools/brains/tests/test_auto_GenerateEdgeMapImage.py @@ -9,7 +9,8 @@ def test_GenerateEdgeMapImage_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputMRVolumes=dict(argstr='--inputMRVolumes %s...', diff --git a/nipype/interfaces/semtools/brains/tests/test_auto_GeneratePurePlugMask.py b/nipype/interfaces/semtools/brains/tests/test_auto_GeneratePurePlugMask.py index 5eecfc9987..48c4aca838 100644 --- a/nipype/interfaces/semtools/brains/tests/test_auto_GeneratePurePlugMask.py +++ b/nipype/interfaces/semtools/brains/tests/test_auto_GeneratePurePlugMask.py @@ -9,7 +9,8 @@ def test_GeneratePurePlugMask_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputImageModalities=dict(argstr='--inputImageModalities %s...', diff --git a/nipype/interfaces/semtools/brains/tests/test_auto_HistogramMatchingFilter.py b/nipype/interfaces/semtools/brains/tests/test_auto_HistogramMatchingFilter.py index 8e3ec9c0d4..ac921cb7f6 100644 --- a/nipype/interfaces/semtools/brains/tests/test_auto_HistogramMatchingFilter.py +++ b/nipype/interfaces/semtools/brains/tests/test_auto_HistogramMatchingFilter.py @@ -11,7 +11,8 @@ def test_HistogramMatchingFilter_inputs(): ), histogramAlgorithm=dict(argstr='--histogramAlgorithm %s', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputBinaryVolume=dict(argstr='--inputBinaryVolume %s', diff --git a/nipype/interfaces/semtools/brains/tests/test_auto_SimilarityIndex.py b/nipype/interfaces/semtools/brains/tests/test_auto_SimilarityIndex.py index 9b9fd7c3f5..e9ddc61051 100644 --- a/nipype/interfaces/semtools/brains/tests/test_auto_SimilarityIndex.py +++ b/nipype/interfaces/semtools/brains/tests/test_auto_SimilarityIndex.py @@ -11,7 +11,8 @@ def test_SimilarityIndex_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputManualVolume=dict(argstr='--inputManualVolume %s', diff --git a/nipype/interfaces/semtools/diffusion/tests/test_auto_DWIConvert.py b/nipype/interfaces/semtools/diffusion/tests/test_auto_DWIConvert.py index 90e24fca24..0a7e27fee1 100644 --- a/nipype/interfaces/semtools/diffusion/tests/test_auto_DWIConvert.py +++ b/nipype/interfaces/semtools/diffusion/tests/test_auto_DWIConvert.py @@ -20,7 +20,8 @@ def test_DWIConvert_inputs(): gradientVectorFile=dict(argstr='--gradientVectorFile %s', hash_files=False, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputBValues=dict(argstr='--inputBValues %s', diff --git a/nipype/interfaces/semtools/diffusion/tests/test_auto_compareTractInclusion.py b/nipype/interfaces/semtools/diffusion/tests/test_auto_compareTractInclusion.py index c892799709..5b88f17a54 100644 --- a/nipype/interfaces/semtools/diffusion/tests/test_auto_compareTractInclusion.py +++ b/nipype/interfaces/semtools/diffusion/tests/test_auto_compareTractInclusion.py @@ -11,7 +11,8 @@ def test_compareTractInclusion_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), numberOfPoints=dict(argstr='--numberOfPoints %d', diff --git a/nipype/interfaces/semtools/diffusion/tests/test_auto_dtiaverage.py b/nipype/interfaces/semtools/diffusion/tests/test_auto_dtiaverage.py index a241bd583b..4cbbf0e4ea 100644 --- a/nipype/interfaces/semtools/diffusion/tests/test_auto_dtiaverage.py +++ b/nipype/interfaces/semtools/diffusion/tests/test_auto_dtiaverage.py @@ -11,7 +11,8 @@ def test_dtiaverage_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputs=dict(argstr='--inputs %s...', diff --git a/nipype/interfaces/semtools/diffusion/tests/test_auto_dtiestim.py b/nipype/interfaces/semtools/diffusion/tests/test_auto_dtiestim.py index 4f8e64f4ac..80a0f78fe0 100644 --- a/nipype/interfaces/semtools/diffusion/tests/test_auto_dtiestim.py +++ b/nipype/interfaces/semtools/diffusion/tests/test_auto_dtiestim.py @@ -31,7 +31,8 @@ def test_dtiestim_inputs(): idwi=dict(argstr='--idwi %s', hash_files=False, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), method=dict(argstr='--method %s', diff --git a/nipype/interfaces/semtools/diffusion/tests/test_auto_dtiprocess.py b/nipype/interfaces/semtools/diffusion/tests/test_auto_dtiprocess.py index 6d0cd8674e..6090c81526 100644 --- a/nipype/interfaces/semtools/diffusion/tests/test_auto_dtiprocess.py +++ b/nipype/interfaces/semtools/diffusion/tests/test_auto_dtiprocess.py @@ -44,7 +44,8 @@ def test_dtiprocess_inputs(): ), hField=dict(argstr='--hField ', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), interpolation=dict(argstr='--interpolation %s', diff --git a/nipype/interfaces/semtools/diffusion/tests/test_auto_extractNrrdVectorIndex.py b/nipype/interfaces/semtools/diffusion/tests/test_auto_extractNrrdVectorIndex.py index 81a0de61db..ca4ceaa0fa 100644 --- a/nipype/interfaces/semtools/diffusion/tests/test_auto_extractNrrdVectorIndex.py +++ b/nipype/interfaces/semtools/diffusion/tests/test_auto_extractNrrdVectorIndex.py @@ -9,7 +9,8 @@ def test_extractNrrdVectorIndex_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputVolume=dict(argstr='--inputVolume %s', diff --git a/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractAnisotropyMap.py b/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractAnisotropyMap.py index 10f2fbf341..1caaeaac78 100644 --- a/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractAnisotropyMap.py +++ b/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractAnisotropyMap.py @@ -11,7 +11,8 @@ def test_gtractAnisotropyMap_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputTensorVolume=dict(argstr='--inputTensorVolume %s', diff --git a/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractAverageBvalues.py b/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractAverageBvalues.py index 25825aa2dd..574119212f 100644 --- a/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractAverageBvalues.py +++ b/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractAverageBvalues.py @@ -13,7 +13,8 @@ def test_gtractAverageBvalues_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputVolume=dict(argstr='--inputVolume %s', diff --git a/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractClipAnisotropy.py b/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractClipAnisotropy.py index 137dd8046b..e3c4f337b7 100644 --- a/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractClipAnisotropy.py +++ b/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractClipAnisotropy.py @@ -13,7 +13,8 @@ def test_gtractClipAnisotropy_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputVolume=dict(argstr='--inputVolume %s', diff --git a/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractCoRegAnatomy.py b/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractCoRegAnatomy.py index 494c13715d..a8aab5aedf 100644 --- a/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractCoRegAnatomy.py +++ b/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractCoRegAnatomy.py @@ -18,7 +18,8 @@ def test_gtractCoRegAnatomy_inputs(): gridSize=dict(argstr='--gridSize %s', sep=',', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputAnatomicalVolume=dict(argstr='--inputAnatomicalVolume %s', diff --git a/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractConcatDwi.py b/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractConcatDwi.py index 73b53789f9..276952f0f9 100644 --- a/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractConcatDwi.py +++ b/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractConcatDwi.py @@ -11,7 +11,8 @@ def test_gtractConcatDwi_inputs(): ), ignoreOrigins=dict(argstr='--ignoreOrigins ', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputVolume=dict(argstr='--inputVolume %s...', diff --git a/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractCopyImageOrientation.py b/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractCopyImageOrientation.py index f37d8ffbc0..dfb9a73889 100644 --- a/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractCopyImageOrientation.py +++ b/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractCopyImageOrientation.py @@ -9,7 +9,8 @@ def test_gtractCopyImageOrientation_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputReferenceVolume=dict(argstr='--inputReferenceVolume %s', diff --git a/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractCoregBvalues.py b/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractCoregBvalues.py index 6de2f18e71..c367284ef3 100644 --- a/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractCoregBvalues.py +++ b/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractCoregBvalues.py @@ -17,7 +17,8 @@ def test_gtractCoregBvalues_inputs(): ), fixedVolumeIndex=dict(argstr='--fixedVolumeIndex %d', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), maximumStepSize=dict(argstr='--maximumStepSize %f', diff --git a/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractCostFastMarching.py b/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractCostFastMarching.py index ec54af48d1..f50f8c47aa 100644 --- a/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractCostFastMarching.py +++ b/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractCostFastMarching.py @@ -11,7 +11,8 @@ def test_gtractCostFastMarching_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputAnisotropyVolume=dict(argstr='--inputAnisotropyVolume %s', diff --git a/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractCreateGuideFiber.py b/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractCreateGuideFiber.py index f607ad4ccb..bd461a549b 100644 --- a/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractCreateGuideFiber.py +++ b/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractCreateGuideFiber.py @@ -9,7 +9,8 @@ def test_gtractCreateGuideFiber_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputFiber=dict(argstr='--inputFiber %s', diff --git a/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractFastMarchingTracking.py b/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractFastMarchingTracking.py index 22cae40fed..0e6676c0fc 100644 --- a/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractFastMarchingTracking.py +++ b/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractFastMarchingTracking.py @@ -11,7 +11,8 @@ def test_gtractFastMarchingTracking_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputAnisotropyVolume=dict(argstr='--inputAnisotropyVolume %s', diff --git a/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractFiberTracking.py b/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractFiberTracking.py index 39a22ed5aa..15b4876080 100644 --- a/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractFiberTracking.py +++ b/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractFiberTracking.py @@ -19,7 +19,8 @@ def test_gtractFiberTracking_inputs(): ), guidedCurvatureThreshold=dict(argstr='--guidedCurvatureThreshold %f', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputAnisotropyVolume=dict(argstr='--inputAnisotropyVolume %s', diff --git a/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractImageConformity.py b/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractImageConformity.py index e126e4ca38..0ae9c227a8 100644 --- a/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractImageConformity.py +++ b/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractImageConformity.py @@ -9,7 +9,8 @@ def test_gtractImageConformity_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputReferenceVolume=dict(argstr='--inputReferenceVolume %s', diff --git a/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractInvertBSplineTransform.py b/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractInvertBSplineTransform.py index 81af4d6aa5..36363523d0 100644 --- a/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractInvertBSplineTransform.py +++ b/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractInvertBSplineTransform.py @@ -9,7 +9,8 @@ def test_gtractInvertBSplineTransform_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputReferenceVolume=dict(argstr='--inputReferenceVolume %s', diff --git a/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractInvertDisplacementField.py b/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractInvertDisplacementField.py index 4423309e60..4e7cdebdd3 100644 --- a/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractInvertDisplacementField.py +++ b/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractInvertDisplacementField.py @@ -13,7 +13,8 @@ def test_gtractInvertDisplacementField_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), numberOfThreads=dict(argstr='--numberOfThreads %d', diff --git a/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractInvertRigidTransform.py b/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractInvertRigidTransform.py index 966821830f..8cc8cc1e4b 100644 --- a/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractInvertRigidTransform.py +++ b/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractInvertRigidTransform.py @@ -9,7 +9,8 @@ def test_gtractInvertRigidTransform_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputTransform=dict(argstr='--inputTransform %s', diff --git a/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractResampleAnisotropy.py b/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractResampleAnisotropy.py index fec40fec57..4cc895fb06 100644 --- a/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractResampleAnisotropy.py +++ b/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractResampleAnisotropy.py @@ -9,7 +9,8 @@ def test_gtractResampleAnisotropy_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputAnatomicalVolume=dict(argstr='--inputAnatomicalVolume %s', diff --git a/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractResampleB0.py b/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractResampleB0.py index d7c808d474..c77c067c51 100644 --- a/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractResampleB0.py +++ b/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractResampleB0.py @@ -9,7 +9,8 @@ def test_gtractResampleB0_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputAnatomicalVolume=dict(argstr='--inputAnatomicalVolume %s', diff --git a/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractResampleCodeImage.py b/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractResampleCodeImage.py index 29718e9c74..5fd928f854 100644 --- a/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractResampleCodeImage.py +++ b/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractResampleCodeImage.py @@ -9,7 +9,8 @@ def test_gtractResampleCodeImage_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputCodeVolume=dict(argstr='--inputCodeVolume %s', diff --git a/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractResampleDWIInPlace.py b/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractResampleDWIInPlace.py index bdc33175f3..569320ba6f 100644 --- a/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractResampleDWIInPlace.py +++ b/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractResampleDWIInPlace.py @@ -11,7 +11,8 @@ def test_gtractResampleDWIInPlace_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), imageOutputSize=dict(argstr='--imageOutputSize %s', diff --git a/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractResampleFibers.py b/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractResampleFibers.py index b632a364e8..b3c4abc11a 100644 --- a/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractResampleFibers.py +++ b/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractResampleFibers.py @@ -9,7 +9,8 @@ def test_gtractResampleFibers_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputForwardDeformationFieldVolume=dict(argstr='--inputForwardDeformationFieldVolume %s', diff --git a/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractTensor.py b/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractTensor.py index 3024df0100..af662c076c 100644 --- a/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractTensor.py +++ b/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractTensor.py @@ -18,7 +18,8 @@ def test_gtractTensor_inputs(): ignoreIndex=dict(argstr='--ignoreIndex %s', sep=',', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputVolume=dict(argstr='--inputVolume %s', diff --git a/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractTransformToDisplacementField.py b/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractTransformToDisplacementField.py index 6ee2300ce9..8f074267fe 100644 --- a/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractTransformToDisplacementField.py +++ b/nipype/interfaces/semtools/diffusion/tests/test_auto_gtractTransformToDisplacementField.py @@ -9,7 +9,8 @@ def test_gtractTransformToDisplacementField_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputReferenceVolume=dict(argstr='--inputReferenceVolume %s', diff --git a/nipype/interfaces/semtools/diffusion/tests/test_auto_maxcurvature.py b/nipype/interfaces/semtools/diffusion/tests/test_auto_maxcurvature.py index 07eb1805dc..8efcf5d131 100644 --- a/nipype/interfaces/semtools/diffusion/tests/test_auto_maxcurvature.py +++ b/nipype/interfaces/semtools/diffusion/tests/test_auto_maxcurvature.py @@ -9,7 +9,8 @@ def test_maxcurvature_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), image=dict(argstr='--image %s', diff --git a/nipype/interfaces/semtools/diffusion/tractography/tests/test_auto_UKFTractography.py b/nipype/interfaces/semtools/diffusion/tractography/tests/test_auto_UKFTractography.py index 0ebf64b10d..0342389ba4 100644 --- a/nipype/interfaces/semtools/diffusion/tractography/tests/test_auto_UKFTractography.py +++ b/nipype/interfaces/semtools/diffusion/tractography/tests/test_auto_UKFTractography.py @@ -23,7 +23,8 @@ def test_UKFTractography_inputs(): ), fullTensorModel=dict(argstr='--fullTensorModel ', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), labels=dict(argstr='--labels %s', diff --git a/nipype/interfaces/semtools/diffusion/tractography/tests/test_auto_fiberprocess.py b/nipype/interfaces/semtools/diffusion/tractography/tests/test_auto_fiberprocess.py index 875efafa57..8da03c52fc 100644 --- a/nipype/interfaces/semtools/diffusion/tractography/tests/test_auto_fiberprocess.py +++ b/nipype/interfaces/semtools/diffusion/tractography/tests/test_auto_fiberprocess.py @@ -20,7 +20,8 @@ def test_fiberprocess_inputs(): ), h_field=dict(argstr='--h_field %s', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), index_space=dict(argstr='--index_space ', diff --git a/nipype/interfaces/semtools/diffusion/tractography/tests/test_auto_fiberstats.py b/nipype/interfaces/semtools/diffusion/tractography/tests/test_auto_fiberstats.py index 1722f7a45b..4d241dc205 100644 --- a/nipype/interfaces/semtools/diffusion/tractography/tests/test_auto_fiberstats.py +++ b/nipype/interfaces/semtools/diffusion/tractography/tests/test_auto_fiberstats.py @@ -11,7 +11,8 @@ def test_fiberstats_inputs(): ), fiber_file=dict(argstr='--fiber_file %s', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), terminal_output=dict(deprecated='1.0.0', diff --git a/nipype/interfaces/semtools/diffusion/tractography/tests/test_auto_fibertrack.py b/nipype/interfaces/semtools/diffusion/tractography/tests/test_auto_fibertrack.py index 99ca1ab608..b1a503a711 100644 --- a/nipype/interfaces/semtools/diffusion/tractography/tests/test_auto_fibertrack.py +++ b/nipype/interfaces/semtools/diffusion/tractography/tests/test_auto_fibertrack.py @@ -13,7 +13,8 @@ def test_fibertrack_inputs(): ), force=dict(argstr='--force ', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), input_roi_file=dict(argstr='--input_roi_file %s', diff --git a/nipype/interfaces/semtools/filtering/tests/test_auto_CannyEdge.py b/nipype/interfaces/semtools/filtering/tests/test_auto_CannyEdge.py index c50c1d82ba..ca3669e020 100644 --- a/nipype/interfaces/semtools/filtering/tests/test_auto_CannyEdge.py +++ b/nipype/interfaces/semtools/filtering/tests/test_auto_CannyEdge.py @@ -9,7 +9,8 @@ def test_CannyEdge_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputVolume=dict(argstr='--inputVolume %s', diff --git a/nipype/interfaces/semtools/filtering/tests/test_auto_CannySegmentationLevelSetImageFilter.py b/nipype/interfaces/semtools/filtering/tests/test_auto_CannySegmentationLevelSetImageFilter.py index 51e7cc218d..366fd626ab 100644 --- a/nipype/interfaces/semtools/filtering/tests/test_auto_CannySegmentationLevelSetImageFilter.py +++ b/nipype/interfaces/semtools/filtering/tests/test_auto_CannySegmentationLevelSetImageFilter.py @@ -15,7 +15,8 @@ def test_CannySegmentationLevelSetImageFilter_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), initialModel=dict(argstr='--initialModel %s', diff --git a/nipype/interfaces/semtools/filtering/tests/test_auto_DilateImage.py b/nipype/interfaces/semtools/filtering/tests/test_auto_DilateImage.py index 2f4ef52fd5..ce2c59dff9 100644 --- a/nipype/interfaces/semtools/filtering/tests/test_auto_DilateImage.py +++ b/nipype/interfaces/semtools/filtering/tests/test_auto_DilateImage.py @@ -9,7 +9,8 @@ def test_DilateImage_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputMaskVolume=dict(argstr='--inputMaskVolume %s', diff --git a/nipype/interfaces/semtools/filtering/tests/test_auto_DilateMask.py b/nipype/interfaces/semtools/filtering/tests/test_auto_DilateMask.py index b72bc65156..1e95808c9f 100644 --- a/nipype/interfaces/semtools/filtering/tests/test_auto_DilateMask.py +++ b/nipype/interfaces/semtools/filtering/tests/test_auto_DilateMask.py @@ -9,7 +9,8 @@ def test_DilateMask_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputBinaryVolume=dict(argstr='--inputBinaryVolume %s', diff --git a/nipype/interfaces/semtools/filtering/tests/test_auto_DistanceMaps.py b/nipype/interfaces/semtools/filtering/tests/test_auto_DistanceMaps.py index 1783ee8f27..a9136fcbd5 100644 --- a/nipype/interfaces/semtools/filtering/tests/test_auto_DistanceMaps.py +++ b/nipype/interfaces/semtools/filtering/tests/test_auto_DistanceMaps.py @@ -9,7 +9,8 @@ def test_DistanceMaps_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputLabelVolume=dict(argstr='--inputLabelVolume %s', diff --git a/nipype/interfaces/semtools/filtering/tests/test_auto_DumpBinaryTrainingVectors.py b/nipype/interfaces/semtools/filtering/tests/test_auto_DumpBinaryTrainingVectors.py index ddc61cd418..7504cc311e 100644 --- a/nipype/interfaces/semtools/filtering/tests/test_auto_DumpBinaryTrainingVectors.py +++ b/nipype/interfaces/semtools/filtering/tests/test_auto_DumpBinaryTrainingVectors.py @@ -9,7 +9,8 @@ def test_DumpBinaryTrainingVectors_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputHeaderFilename=dict(argstr='--inputHeaderFilename %s', diff --git a/nipype/interfaces/semtools/filtering/tests/test_auto_ErodeImage.py b/nipype/interfaces/semtools/filtering/tests/test_auto_ErodeImage.py index 113c1e08ef..659c88471c 100644 --- a/nipype/interfaces/semtools/filtering/tests/test_auto_ErodeImage.py +++ b/nipype/interfaces/semtools/filtering/tests/test_auto_ErodeImage.py @@ -9,7 +9,8 @@ def test_ErodeImage_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputMaskVolume=dict(argstr='--inputMaskVolume %s', diff --git a/nipype/interfaces/semtools/filtering/tests/test_auto_FlippedDifference.py b/nipype/interfaces/semtools/filtering/tests/test_auto_FlippedDifference.py index 82ea9a31a8..e81e2cf9d9 100644 --- a/nipype/interfaces/semtools/filtering/tests/test_auto_FlippedDifference.py +++ b/nipype/interfaces/semtools/filtering/tests/test_auto_FlippedDifference.py @@ -9,7 +9,8 @@ def test_FlippedDifference_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputMaskVolume=dict(argstr='--inputMaskVolume %s', diff --git a/nipype/interfaces/semtools/filtering/tests/test_auto_GenerateBrainClippedImage.py b/nipype/interfaces/semtools/filtering/tests/test_auto_GenerateBrainClippedImage.py index 6672cd4212..234494c3f4 100644 --- a/nipype/interfaces/semtools/filtering/tests/test_auto_GenerateBrainClippedImage.py +++ b/nipype/interfaces/semtools/filtering/tests/test_auto_GenerateBrainClippedImage.py @@ -9,7 +9,8 @@ def test_GenerateBrainClippedImage_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputImg=dict(argstr='--inputImg %s', diff --git a/nipype/interfaces/semtools/filtering/tests/test_auto_GenerateSummedGradientImage.py b/nipype/interfaces/semtools/filtering/tests/test_auto_GenerateSummedGradientImage.py index dd275ef4d1..d073e15ab0 100644 --- a/nipype/interfaces/semtools/filtering/tests/test_auto_GenerateSummedGradientImage.py +++ b/nipype/interfaces/semtools/filtering/tests/test_auto_GenerateSummedGradientImage.py @@ -11,7 +11,8 @@ def test_GenerateSummedGradientImage_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputVolume1=dict(argstr='--inputVolume1 %s', diff --git a/nipype/interfaces/semtools/filtering/tests/test_auto_GenerateTestImage.py b/nipype/interfaces/semtools/filtering/tests/test_auto_GenerateTestImage.py index d8fab4b6c7..f9fb21b9da 100644 --- a/nipype/interfaces/semtools/filtering/tests/test_auto_GenerateTestImage.py +++ b/nipype/interfaces/semtools/filtering/tests/test_auto_GenerateTestImage.py @@ -9,7 +9,8 @@ def test_GenerateTestImage_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputVolume=dict(argstr='--inputVolume %s', diff --git a/nipype/interfaces/semtools/filtering/tests/test_auto_GradientAnisotropicDiffusionImageFilter.py b/nipype/interfaces/semtools/filtering/tests/test_auto_GradientAnisotropicDiffusionImageFilter.py index 694868d7b0..63215e0b8a 100644 --- a/nipype/interfaces/semtools/filtering/tests/test_auto_GradientAnisotropicDiffusionImageFilter.py +++ b/nipype/interfaces/semtools/filtering/tests/test_auto_GradientAnisotropicDiffusionImageFilter.py @@ -11,7 +11,8 @@ def test_GradientAnisotropicDiffusionImageFilter_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputVolume=dict(argstr='--inputVolume %s', diff --git a/nipype/interfaces/semtools/filtering/tests/test_auto_HammerAttributeCreator.py b/nipype/interfaces/semtools/filtering/tests/test_auto_HammerAttributeCreator.py index 434148c9cc..6920812aae 100644 --- a/nipype/interfaces/semtools/filtering/tests/test_auto_HammerAttributeCreator.py +++ b/nipype/interfaces/semtools/filtering/tests/test_auto_HammerAttributeCreator.py @@ -13,7 +13,8 @@ def test_HammerAttributeCreator_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputCSFVolume=dict(argstr='--inputCSFVolume %s', diff --git a/nipype/interfaces/semtools/filtering/tests/test_auto_NeighborhoodMean.py b/nipype/interfaces/semtools/filtering/tests/test_auto_NeighborhoodMean.py index d920277b11..c23362562c 100644 --- a/nipype/interfaces/semtools/filtering/tests/test_auto_NeighborhoodMean.py +++ b/nipype/interfaces/semtools/filtering/tests/test_auto_NeighborhoodMean.py @@ -9,7 +9,8 @@ def test_NeighborhoodMean_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputMaskVolume=dict(argstr='--inputMaskVolume %s', diff --git a/nipype/interfaces/semtools/filtering/tests/test_auto_NeighborhoodMedian.py b/nipype/interfaces/semtools/filtering/tests/test_auto_NeighborhoodMedian.py index 1b8d035c3d..ff2cdd38af 100644 --- a/nipype/interfaces/semtools/filtering/tests/test_auto_NeighborhoodMedian.py +++ b/nipype/interfaces/semtools/filtering/tests/test_auto_NeighborhoodMedian.py @@ -9,7 +9,8 @@ def test_NeighborhoodMedian_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputMaskVolume=dict(argstr='--inputMaskVolume %s', diff --git a/nipype/interfaces/semtools/filtering/tests/test_auto_STAPLEAnalysis.py b/nipype/interfaces/semtools/filtering/tests/test_auto_STAPLEAnalysis.py index 6d45bec9ca..45c55236d0 100644 --- a/nipype/interfaces/semtools/filtering/tests/test_auto_STAPLEAnalysis.py +++ b/nipype/interfaces/semtools/filtering/tests/test_auto_STAPLEAnalysis.py @@ -9,7 +9,8 @@ def test_STAPLEAnalysis_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputDimension=dict(argstr='--inputDimension %d', diff --git a/nipype/interfaces/semtools/filtering/tests/test_auto_TextureFromNoiseImageFilter.py b/nipype/interfaces/semtools/filtering/tests/test_auto_TextureFromNoiseImageFilter.py index 5bbeaa4640..d351d8d56f 100644 --- a/nipype/interfaces/semtools/filtering/tests/test_auto_TextureFromNoiseImageFilter.py +++ b/nipype/interfaces/semtools/filtering/tests/test_auto_TextureFromNoiseImageFilter.py @@ -9,7 +9,8 @@ def test_TextureFromNoiseImageFilter_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputRadius=dict(argstr='--inputRadius %d', diff --git a/nipype/interfaces/semtools/filtering/tests/test_auto_TextureMeasureFilter.py b/nipype/interfaces/semtools/filtering/tests/test_auto_TextureMeasureFilter.py index c6ad265663..771fa52f03 100644 --- a/nipype/interfaces/semtools/filtering/tests/test_auto_TextureMeasureFilter.py +++ b/nipype/interfaces/semtools/filtering/tests/test_auto_TextureMeasureFilter.py @@ -11,7 +11,8 @@ def test_TextureMeasureFilter_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputMaskVolume=dict(argstr='--inputMaskVolume %s', diff --git a/nipype/interfaces/semtools/filtering/tests/test_auto_UnbiasedNonLocalMeans.py b/nipype/interfaces/semtools/filtering/tests/test_auto_UnbiasedNonLocalMeans.py index 6aa1430502..e237ca41db 100644 --- a/nipype/interfaces/semtools/filtering/tests/test_auto_UnbiasedNonLocalMeans.py +++ b/nipype/interfaces/semtools/filtering/tests/test_auto_UnbiasedNonLocalMeans.py @@ -11,7 +11,8 @@ def test_UnbiasedNonLocalMeans_inputs(): ), hp=dict(argstr='--hp %f', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputVolume=dict(argstr='%s', diff --git a/nipype/interfaces/semtools/legacy/tests/test_auto_scalartransform.py b/nipype/interfaces/semtools/legacy/tests/test_auto_scalartransform.py index 64a33379eb..ed643de764 100644 --- a/nipype/interfaces/semtools/legacy/tests/test_auto_scalartransform.py +++ b/nipype/interfaces/semtools/legacy/tests/test_auto_scalartransform.py @@ -13,7 +13,8 @@ def test_scalartransform_inputs(): ), h_field=dict(argstr='--h_field ', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), input_image=dict(argstr='--input_image %s', diff --git a/nipype/interfaces/semtools/registration/tests/test_auto_BRAINSDemonWarp.py b/nipype/interfaces/semtools/registration/tests/test_auto_BRAINSDemonWarp.py index 92d51611eb..3df134093f 100644 --- a/nipype/interfaces/semtools/registration/tests/test_auto_BRAINSDemonWarp.py +++ b/nipype/interfaces/semtools/registration/tests/test_auto_BRAINSDemonWarp.py @@ -27,7 +27,8 @@ def test_BRAINSDemonWarp_inputs(): ), histogramMatch=dict(argstr='--histogramMatch ', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), initializeWithDisplacementField=dict(argstr='--initializeWithDisplacementField %s', diff --git a/nipype/interfaces/semtools/registration/tests/test_auto_BRAINSFit.py b/nipype/interfaces/semtools/registration/tests/test_auto_BRAINSFit.py index 9e4bacc88f..00248d9093 100644 --- a/nipype/interfaces/semtools/registration/tests/test_auto_BRAINSFit.py +++ b/nipype/interfaces/semtools/registration/tests/test_auto_BRAINSFit.py @@ -38,7 +38,8 @@ def test_BRAINSFit_inputs(): ), histogramMatch=dict(argstr='--histogramMatch ', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), initialTransform=dict(argstr='--initialTransform %s', diff --git a/nipype/interfaces/semtools/registration/tests/test_auto_BRAINSResample.py b/nipype/interfaces/semtools/registration/tests/test_auto_BRAINSResample.py index bb2c107ace..a2444018e2 100644 --- a/nipype/interfaces/semtools/registration/tests/test_auto_BRAINSResample.py +++ b/nipype/interfaces/semtools/registration/tests/test_auto_BRAINSResample.py @@ -16,7 +16,8 @@ def test_BRAINSResample_inputs(): gridSpacing=dict(argstr='--gridSpacing %s', sep=',', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputVolume=dict(argstr='--inputVolume %s', diff --git a/nipype/interfaces/semtools/registration/tests/test_auto_BRAINSResize.py b/nipype/interfaces/semtools/registration/tests/test_auto_BRAINSResize.py index 61babea6f1..c394a6cee1 100644 --- a/nipype/interfaces/semtools/registration/tests/test_auto_BRAINSResize.py +++ b/nipype/interfaces/semtools/registration/tests/test_auto_BRAINSResize.py @@ -9,7 +9,8 @@ def test_BRAINSResize_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputVolume=dict(argstr='--inputVolume %s', diff --git a/nipype/interfaces/semtools/registration/tests/test_auto_BRAINSTransformFromFiducials.py b/nipype/interfaces/semtools/registration/tests/test_auto_BRAINSTransformFromFiducials.py index 9d6f296b95..928fa49e61 100644 --- a/nipype/interfaces/semtools/registration/tests/test_auto_BRAINSTransformFromFiducials.py +++ b/nipype/interfaces/semtools/registration/tests/test_auto_BRAINSTransformFromFiducials.py @@ -13,7 +13,8 @@ def test_BRAINSTransformFromFiducials_inputs(): ), fixedLandmarksFile=dict(argstr='--fixedLandmarksFile %s', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), movingLandmarks=dict(argstr='--movingLandmarks %s...', diff --git a/nipype/interfaces/semtools/registration/tests/test_auto_VBRAINSDemonWarp.py b/nipype/interfaces/semtools/registration/tests/test_auto_VBRAINSDemonWarp.py index 3a4579cf44..1fd9c45b34 100644 --- a/nipype/interfaces/semtools/registration/tests/test_auto_VBRAINSDemonWarp.py +++ b/nipype/interfaces/semtools/registration/tests/test_auto_VBRAINSDemonWarp.py @@ -27,7 +27,8 @@ def test_VBRAINSDemonWarp_inputs(): ), histogramMatch=dict(argstr='--histogramMatch ', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), initializeWithDisplacementField=dict(argstr='--initializeWithDisplacementField %s', diff --git a/nipype/interfaces/semtools/segmentation/tests/test_auto_BRAINSABC.py b/nipype/interfaces/semtools/segmentation/tests/test_auto_BRAINSABC.py index 4858822be0..d07166b086 100644 --- a/nipype/interfaces/semtools/segmentation/tests/test_auto_BRAINSABC.py +++ b/nipype/interfaces/semtools/segmentation/tests/test_auto_BRAINSABC.py @@ -34,7 +34,8 @@ def test_BRAINSABC_inputs(): gridSize=dict(argstr='--gridSize %s', sep=',', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), implicitOutputs=dict(argstr='--implicitOutputs %s...', diff --git a/nipype/interfaces/semtools/segmentation/tests/test_auto_BRAINSConstellationDetector.py b/nipype/interfaces/semtools/segmentation/tests/test_auto_BRAINSConstellationDetector.py index ebf7cf95c8..865ce1fe93 100644 --- a/nipype/interfaces/semtools/segmentation/tests/test_auto_BRAINSConstellationDetector.py +++ b/nipype/interfaces/semtools/segmentation/tests/test_auto_BRAINSConstellationDetector.py @@ -41,7 +41,8 @@ def test_BRAINSConstellationDetector_inputs(): ), houghEyeDetectorMode=dict(argstr='--houghEyeDetectorMode %d', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputLandmarksEMSP=dict(argstr='--inputLandmarksEMSP %s', diff --git a/nipype/interfaces/semtools/segmentation/tests/test_auto_BRAINSCreateLabelMapFromProbabilityMaps.py b/nipype/interfaces/semtools/segmentation/tests/test_auto_BRAINSCreateLabelMapFromProbabilityMaps.py index 3b6424a6fe..b3962fd835 100644 --- a/nipype/interfaces/semtools/segmentation/tests/test_auto_BRAINSCreateLabelMapFromProbabilityMaps.py +++ b/nipype/interfaces/semtools/segmentation/tests/test_auto_BRAINSCreateLabelMapFromProbabilityMaps.py @@ -18,7 +18,8 @@ def test_BRAINSCreateLabelMapFromProbabilityMaps_inputs(): foregroundPriors=dict(argstr='--foregroundPriors %s', sep=',', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inclusionThreshold=dict(argstr='--inclusionThreshold %f', diff --git a/nipype/interfaces/semtools/segmentation/tests/test_auto_BRAINSCut.py b/nipype/interfaces/semtools/segmentation/tests/test_auto_BRAINSCut.py index 210194d608..5e8a6f99bd 100644 --- a/nipype/interfaces/semtools/segmentation/tests/test_auto_BRAINSCut.py +++ b/nipype/interfaces/semtools/segmentation/tests/test_auto_BRAINSCut.py @@ -21,7 +21,8 @@ def test_BRAINSCut_inputs(): ), histogramEqualization=dict(argstr='--histogramEqualization ', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), method=dict(argstr='--method %s', diff --git a/nipype/interfaces/semtools/segmentation/tests/test_auto_BRAINSMultiSTAPLE.py b/nipype/interfaces/semtools/segmentation/tests/test_auto_BRAINSMultiSTAPLE.py index 943488a385..38035b7903 100644 --- a/nipype/interfaces/semtools/segmentation/tests/test_auto_BRAINSMultiSTAPLE.py +++ b/nipype/interfaces/semtools/segmentation/tests/test_auto_BRAINSMultiSTAPLE.py @@ -9,7 +9,8 @@ def test_BRAINSMultiSTAPLE_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputCompositeT1Volume=dict(argstr='--inputCompositeT1Volume %s', diff --git a/nipype/interfaces/semtools/segmentation/tests/test_auto_BRAINSROIAuto.py b/nipype/interfaces/semtools/segmentation/tests/test_auto_BRAINSROIAuto.py index 1746f5802b..577f01aba6 100644 --- a/nipype/interfaces/semtools/segmentation/tests/test_auto_BRAINSROIAuto.py +++ b/nipype/interfaces/semtools/segmentation/tests/test_auto_BRAINSROIAuto.py @@ -15,7 +15,8 @@ def test_BRAINSROIAuto_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputVolume=dict(argstr='--inputVolume %s', diff --git a/nipype/interfaces/semtools/segmentation/tests/test_auto_BinaryMaskEditorBasedOnLandmarks.py b/nipype/interfaces/semtools/segmentation/tests/test_auto_BinaryMaskEditorBasedOnLandmarks.py index 61306ad365..f9c7d4a191 100644 --- a/nipype/interfaces/semtools/segmentation/tests/test_auto_BinaryMaskEditorBasedOnLandmarks.py +++ b/nipype/interfaces/semtools/segmentation/tests/test_auto_BinaryMaskEditorBasedOnLandmarks.py @@ -9,7 +9,8 @@ def test_BinaryMaskEditorBasedOnLandmarks_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputBinaryVolume=dict(argstr='--inputBinaryVolume %s', diff --git a/nipype/interfaces/semtools/segmentation/tests/test_auto_ESLR.py b/nipype/interfaces/semtools/segmentation/tests/test_auto_ESLR.py index c74a10b53c..cd29a7fd82 100644 --- a/nipype/interfaces/semtools/segmentation/tests/test_auto_ESLR.py +++ b/nipype/interfaces/semtools/segmentation/tests/test_auto_ESLR.py @@ -13,7 +13,8 @@ def test_ESLR_inputs(): ), high=dict(argstr='--high %d', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputVolume=dict(argstr='--inputVolume %s', diff --git a/nipype/interfaces/semtools/tests/test_auto_DWICompare.py b/nipype/interfaces/semtools/tests/test_auto_DWICompare.py index 559a455485..a9c60b1229 100644 --- a/nipype/interfaces/semtools/tests/test_auto_DWICompare.py +++ b/nipype/interfaces/semtools/tests/test_auto_DWICompare.py @@ -9,7 +9,8 @@ def test_DWICompare_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputVolume1=dict(argstr='--inputVolume1 %s', diff --git a/nipype/interfaces/semtools/tests/test_auto_DWISimpleCompare.py b/nipype/interfaces/semtools/tests/test_auto_DWISimpleCompare.py index 6e63c9df4c..271085be8c 100644 --- a/nipype/interfaces/semtools/tests/test_auto_DWISimpleCompare.py +++ b/nipype/interfaces/semtools/tests/test_auto_DWISimpleCompare.py @@ -11,7 +11,8 @@ def test_DWISimpleCompare_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputVolume1=dict(argstr='--inputVolume1 %s', diff --git a/nipype/interfaces/semtools/tests/test_auto_GenerateCsfClippedFromClassifiedImage.py b/nipype/interfaces/semtools/tests/test_auto_GenerateCsfClippedFromClassifiedImage.py index c88b636252..83d0194964 100644 --- a/nipype/interfaces/semtools/tests/test_auto_GenerateCsfClippedFromClassifiedImage.py +++ b/nipype/interfaces/semtools/tests/test_auto_GenerateCsfClippedFromClassifiedImage.py @@ -9,7 +9,8 @@ def test_GenerateCsfClippedFromClassifiedImage_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputCassifiedVolume=dict(argstr='--inputCassifiedVolume %s', diff --git a/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSAlignMSP.py b/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSAlignMSP.py index aced937722..5c5db3a206 100644 --- a/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSAlignMSP.py +++ b/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSAlignMSP.py @@ -14,7 +14,8 @@ def test_BRAINSAlignMSP_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputVolume=dict(argstr='--inputVolume %s', diff --git a/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSClipInferior.py b/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSClipInferior.py index a0b78adbbd..a6868c4e61 100644 --- a/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSClipInferior.py +++ b/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSClipInferior.py @@ -13,7 +13,8 @@ def test_BRAINSClipInferior_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputVolume=dict(argstr='--inputVolume %s', diff --git a/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSConstellationModeler.py b/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSConstellationModeler.py index de684005fc..80d8158e5e 100644 --- a/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSConstellationModeler.py +++ b/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSConstellationModeler.py @@ -11,7 +11,8 @@ def test_BRAINSConstellationModeler_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputTrainingList=dict(argstr='--inputTrainingList %s', diff --git a/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSEyeDetector.py b/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSEyeDetector.py index d7fc1f048b..59f4b66f60 100644 --- a/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSEyeDetector.py +++ b/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSEyeDetector.py @@ -11,7 +11,8 @@ def test_BRAINSEyeDetector_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputVolume=dict(argstr='--inputVolume %s', diff --git a/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSInitializedControlPoints.py b/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSInitializedControlPoints.py index 9edd6e2170..b1f25c5be1 100644 --- a/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSInitializedControlPoints.py +++ b/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSInitializedControlPoints.py @@ -9,7 +9,8 @@ def test_BRAINSInitializedControlPoints_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputVolume=dict(argstr='--inputVolume %s', diff --git a/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSLandmarkInitializer.py b/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSLandmarkInitializer.py index 49db60b207..edb4119b52 100644 --- a/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSLandmarkInitializer.py +++ b/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSLandmarkInitializer.py @@ -9,7 +9,8 @@ def test_BRAINSLandmarkInitializer_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputFixedLandmarkFilename=dict(argstr='--inputFixedLandmarkFilename %s', diff --git a/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSLinearModelerEPCA.py b/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSLinearModelerEPCA.py index f0b4b048a8..8d8bfdab55 100644 --- a/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSLinearModelerEPCA.py +++ b/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSLinearModelerEPCA.py @@ -9,7 +9,8 @@ def test_BRAINSLinearModelerEPCA_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputTrainingList=dict(argstr='--inputTrainingList %s', diff --git a/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSLmkTransform.py b/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSLmkTransform.py index 4cb1ca5a6a..0210db6299 100644 --- a/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSLmkTransform.py +++ b/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSLmkTransform.py @@ -9,7 +9,8 @@ def test_BRAINSLmkTransform_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputFixedLandmarks=dict(argstr='--inputFixedLandmarks %s', diff --git a/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSMush.py b/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSMush.py index 22175171aa..20b0a4467e 100644 --- a/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSMush.py +++ b/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSMush.py @@ -19,7 +19,8 @@ def test_BRAINSMush_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputFirstVolume=dict(argstr='--inputFirstVolume %s', diff --git a/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSSnapShotWriter.py b/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSSnapShotWriter.py index bec713100c..81d0f89d08 100644 --- a/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSSnapShotWriter.py +++ b/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSSnapShotWriter.py @@ -9,7 +9,8 @@ def test_BRAINSSnapShotWriter_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputBinaryVolumes=dict(argstr='--inputBinaryVolumes %s...', diff --git a/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSTransformConvert.py b/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSTransformConvert.py index cb66216d8d..789b1f4a42 100644 --- a/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSTransformConvert.py +++ b/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSTransformConvert.py @@ -12,7 +12,8 @@ def test_BRAINSTransformConvert_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputTransform=dict(argstr='--inputTransform %s', diff --git a/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSTrimForegroundInDirection.py b/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSTrimForegroundInDirection.py index 3c37fbc518..212b60c3d5 100644 --- a/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSTrimForegroundInDirection.py +++ b/nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSTrimForegroundInDirection.py @@ -17,7 +17,8 @@ def test_BRAINSTrimForegroundInDirection_inputs(): ), headSizeLimit=dict(argstr='--headSizeLimit %f', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputVolume=dict(argstr='--inputVolume %s', diff --git a/nipype/interfaces/semtools/utilities/tests/test_auto_CleanUpOverlapLabels.py b/nipype/interfaces/semtools/utilities/tests/test_auto_CleanUpOverlapLabels.py index 6b305e1d6e..42064ce399 100644 --- a/nipype/interfaces/semtools/utilities/tests/test_auto_CleanUpOverlapLabels.py +++ b/nipype/interfaces/semtools/utilities/tests/test_auto_CleanUpOverlapLabels.py @@ -9,7 +9,8 @@ def test_CleanUpOverlapLabels_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputBinaryVolumes=dict(argstr='--inputBinaryVolumes %s...', diff --git a/nipype/interfaces/semtools/utilities/tests/test_auto_FindCenterOfBrain.py b/nipype/interfaces/semtools/utilities/tests/test_auto_FindCenterOfBrain.py index 3394a960fc..9c0d44ea96 100644 --- a/nipype/interfaces/semtools/utilities/tests/test_auto_FindCenterOfBrain.py +++ b/nipype/interfaces/semtools/utilities/tests/test_auto_FindCenterOfBrain.py @@ -39,7 +39,8 @@ def test_FindCenterOfBrain_inputs(): ), headSizeLimit=dict(argstr='--headSizeLimit %f', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), imageMask=dict(argstr='--imageMask %s', diff --git a/nipype/interfaces/semtools/utilities/tests/test_auto_GenerateLabelMapFromProbabilityMap.py b/nipype/interfaces/semtools/utilities/tests/test_auto_GenerateLabelMapFromProbabilityMap.py index f66d1a8448..2b0a376b28 100644 --- a/nipype/interfaces/semtools/utilities/tests/test_auto_GenerateLabelMapFromProbabilityMap.py +++ b/nipype/interfaces/semtools/utilities/tests/test_auto_GenerateLabelMapFromProbabilityMap.py @@ -9,7 +9,8 @@ def test_GenerateLabelMapFromProbabilityMap_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputVolumes=dict(argstr='--inputVolumes %s...', diff --git a/nipype/interfaces/semtools/utilities/tests/test_auto_ImageRegionPlotter.py b/nipype/interfaces/semtools/utilities/tests/test_auto_ImageRegionPlotter.py index 0dcc63ea40..7e0f0c7b7c 100644 --- a/nipype/interfaces/semtools/utilities/tests/test_auto_ImageRegionPlotter.py +++ b/nipype/interfaces/semtools/utilities/tests/test_auto_ImageRegionPlotter.py @@ -9,7 +9,8 @@ def test_ImageRegionPlotter_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputBinaryROIVolume=dict(argstr='--inputBinaryROIVolume %s', diff --git a/nipype/interfaces/semtools/utilities/tests/test_auto_JointHistogram.py b/nipype/interfaces/semtools/utilities/tests/test_auto_JointHistogram.py index c46f64b679..ee2f544417 100644 --- a/nipype/interfaces/semtools/utilities/tests/test_auto_JointHistogram.py +++ b/nipype/interfaces/semtools/utilities/tests/test_auto_JointHistogram.py @@ -9,7 +9,8 @@ def test_JointHistogram_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputMaskVolumeInXAxis=dict(argstr='--inputMaskVolumeInXAxis %s', diff --git a/nipype/interfaces/semtools/utilities/tests/test_auto_ShuffleVectorsModule.py b/nipype/interfaces/semtools/utilities/tests/test_auto_ShuffleVectorsModule.py index ccb9afc0c2..228dfe4234 100644 --- a/nipype/interfaces/semtools/utilities/tests/test_auto_ShuffleVectorsModule.py +++ b/nipype/interfaces/semtools/utilities/tests/test_auto_ShuffleVectorsModule.py @@ -9,7 +9,8 @@ def test_ShuffleVectorsModule_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputVectorFileBaseName=dict(argstr='--inputVectorFileBaseName %s', diff --git a/nipype/interfaces/semtools/utilities/tests/test_auto_fcsv_to_hdf5.py b/nipype/interfaces/semtools/utilities/tests/test_auto_fcsv_to_hdf5.py index 1d8976faca..3885c5ac5e 100644 --- a/nipype/interfaces/semtools/utilities/tests/test_auto_fcsv_to_hdf5.py +++ b/nipype/interfaces/semtools/utilities/tests/test_auto_fcsv_to_hdf5.py @@ -9,7 +9,8 @@ def test_fcsv_to_hdf5_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), landmarkGlobPattern=dict(argstr='--landmarkGlobPattern %s', diff --git a/nipype/interfaces/semtools/utilities/tests/test_auto_insertMidACPCpoint.py b/nipype/interfaces/semtools/utilities/tests/test_auto_insertMidACPCpoint.py index fe413744f3..aedcbb3e63 100644 --- a/nipype/interfaces/semtools/utilities/tests/test_auto_insertMidACPCpoint.py +++ b/nipype/interfaces/semtools/utilities/tests/test_auto_insertMidACPCpoint.py @@ -9,7 +9,8 @@ def test_insertMidACPCpoint_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputLandmarkFile=dict(argstr='--inputLandmarkFile %s', diff --git a/nipype/interfaces/semtools/utilities/tests/test_auto_landmarksConstellationAligner.py b/nipype/interfaces/semtools/utilities/tests/test_auto_landmarksConstellationAligner.py index cb2cf17a4e..ef1668861f 100644 --- a/nipype/interfaces/semtools/utilities/tests/test_auto_landmarksConstellationAligner.py +++ b/nipype/interfaces/semtools/utilities/tests/test_auto_landmarksConstellationAligner.py @@ -9,7 +9,8 @@ def test_landmarksConstellationAligner_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputLandmarksPaired=dict(argstr='--inputLandmarksPaired %s', diff --git a/nipype/interfaces/semtools/utilities/tests/test_auto_landmarksConstellationWeights.py b/nipype/interfaces/semtools/utilities/tests/test_auto_landmarksConstellationWeights.py index b5b4bede05..4bf7c61ab7 100644 --- a/nipype/interfaces/semtools/utilities/tests/test_auto_landmarksConstellationWeights.py +++ b/nipype/interfaces/semtools/utilities/tests/test_auto_landmarksConstellationWeights.py @@ -11,7 +11,8 @@ def test_landmarksConstellationWeights_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputTemplateModel=dict(argstr='--inputTemplateModel %s', diff --git a/nipype/interfaces/slicer/diffusion/tests/test_auto_DTIexport.py b/nipype/interfaces/slicer/diffusion/tests/test_auto_DTIexport.py index a251b7f4d2..d3c499df21 100644 --- a/nipype/interfaces/slicer/diffusion/tests/test_auto_DTIexport.py +++ b/nipype/interfaces/slicer/diffusion/tests/test_auto_DTIexport.py @@ -9,7 +9,8 @@ def test_DTIexport_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputTensor=dict(argstr='%s', diff --git a/nipype/interfaces/slicer/diffusion/tests/test_auto_DTIimport.py b/nipype/interfaces/slicer/diffusion/tests/test_auto_DTIimport.py index 988f16ed0e..cd4ae462f4 100644 --- a/nipype/interfaces/slicer/diffusion/tests/test_auto_DTIimport.py +++ b/nipype/interfaces/slicer/diffusion/tests/test_auto_DTIimport.py @@ -9,7 +9,8 @@ def test_DTIimport_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputFile=dict(argstr='%s', diff --git a/nipype/interfaces/slicer/diffusion/tests/test_auto_DWIJointRicianLMMSEFilter.py b/nipype/interfaces/slicer/diffusion/tests/test_auto_DWIJointRicianLMMSEFilter.py index 8e8e429125..2a97030210 100644 --- a/nipype/interfaces/slicer/diffusion/tests/test_auto_DWIJointRicianLMMSEFilter.py +++ b/nipype/interfaces/slicer/diffusion/tests/test_auto_DWIJointRicianLMMSEFilter.py @@ -11,7 +11,8 @@ def test_DWIJointRicianLMMSEFilter_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputVolume=dict(argstr='%s', diff --git a/nipype/interfaces/slicer/diffusion/tests/test_auto_DWIRicianLMMSEFilter.py b/nipype/interfaces/slicer/diffusion/tests/test_auto_DWIRicianLMMSEFilter.py index f9a9d42b9e..e71ae3106a 100644 --- a/nipype/interfaces/slicer/diffusion/tests/test_auto_DWIRicianLMMSEFilter.py +++ b/nipype/interfaces/slicer/diffusion/tests/test_auto_DWIRicianLMMSEFilter.py @@ -13,7 +13,8 @@ def test_DWIRicianLMMSEFilter_inputs(): ), hrf=dict(argstr='--hrf %f', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputVolume=dict(argstr='%s', diff --git a/nipype/interfaces/slicer/diffusion/tests/test_auto_DWIToDTIEstimation.py b/nipype/interfaces/slicer/diffusion/tests/test_auto_DWIToDTIEstimation.py index f280f0c2f2..938855c9cf 100644 --- a/nipype/interfaces/slicer/diffusion/tests/test_auto_DWIToDTIEstimation.py +++ b/nipype/interfaces/slicer/diffusion/tests/test_auto_DWIToDTIEstimation.py @@ -11,7 +11,8 @@ def test_DWIToDTIEstimation_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputVolume=dict(argstr='%s', diff --git a/nipype/interfaces/slicer/diffusion/tests/test_auto_DiffusionTensorScalarMeasurements.py b/nipype/interfaces/slicer/diffusion/tests/test_auto_DiffusionTensorScalarMeasurements.py index a24b164c04..80b9d9b745 100644 --- a/nipype/interfaces/slicer/diffusion/tests/test_auto_DiffusionTensorScalarMeasurements.py +++ b/nipype/interfaces/slicer/diffusion/tests/test_auto_DiffusionTensorScalarMeasurements.py @@ -11,7 +11,8 @@ def test_DiffusionTensorScalarMeasurements_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputVolume=dict(argstr='%s', diff --git a/nipype/interfaces/slicer/diffusion/tests/test_auto_DiffusionWeightedVolumeMasking.py b/nipype/interfaces/slicer/diffusion/tests/test_auto_DiffusionWeightedVolumeMasking.py index e73dffce9a..247cd2612a 100644 --- a/nipype/interfaces/slicer/diffusion/tests/test_auto_DiffusionWeightedVolumeMasking.py +++ b/nipype/interfaces/slicer/diffusion/tests/test_auto_DiffusionWeightedVolumeMasking.py @@ -9,7 +9,8 @@ def test_DiffusionWeightedVolumeMasking_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputVolume=dict(argstr='%s', diff --git a/nipype/interfaces/slicer/diffusion/tests/test_auto_ResampleDTIVolume.py b/nipype/interfaces/slicer/diffusion/tests/test_auto_ResampleDTIVolume.py index 1f143c23e2..423ef009be 100644 --- a/nipype/interfaces/slicer/diffusion/tests/test_auto_ResampleDTIVolume.py +++ b/nipype/interfaces/slicer/diffusion/tests/test_auto_ResampleDTIVolume.py @@ -26,7 +26,8 @@ def test_ResampleDTIVolume_inputs(): ), hfieldtype=dict(argstr='--hfieldtype %s', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), image_center=dict(argstr='--image_center %s', diff --git a/nipype/interfaces/slicer/diffusion/tests/test_auto_TractographyLabelMapSeeding.py b/nipype/interfaces/slicer/diffusion/tests/test_auto_TractographyLabelMapSeeding.py index 1ea38d5eaf..2dc06051ca 100644 --- a/nipype/interfaces/slicer/diffusion/tests/test_auto_TractographyLabelMapSeeding.py +++ b/nipype/interfaces/slicer/diffusion/tests/test_auto_TractographyLabelMapSeeding.py @@ -18,7 +18,8 @@ def test_TractographyLabelMapSeeding_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputroi=dict(argstr='--inputroi %s', diff --git a/nipype/interfaces/slicer/filtering/tests/test_auto_AddScalarVolumes.py b/nipype/interfaces/slicer/filtering/tests/test_auto_AddScalarVolumes.py index 29a2a157e6..6d4ab7458b 100644 --- a/nipype/interfaces/slicer/filtering/tests/test_auto_AddScalarVolumes.py +++ b/nipype/interfaces/slicer/filtering/tests/test_auto_AddScalarVolumes.py @@ -9,7 +9,8 @@ def test_AddScalarVolumes_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputVolume1=dict(argstr='%s', diff --git a/nipype/interfaces/slicer/filtering/tests/test_auto_CastScalarVolume.py b/nipype/interfaces/slicer/filtering/tests/test_auto_CastScalarVolume.py index 66fbe0f2d9..5a0c99453a 100644 --- a/nipype/interfaces/slicer/filtering/tests/test_auto_CastScalarVolume.py +++ b/nipype/interfaces/slicer/filtering/tests/test_auto_CastScalarVolume.py @@ -16,7 +16,8 @@ def test_CastScalarVolume_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), terminal_output=dict(deprecated='1.0.0', diff --git a/nipype/interfaces/slicer/filtering/tests/test_auto_CheckerBoardFilter.py b/nipype/interfaces/slicer/filtering/tests/test_auto_CheckerBoardFilter.py index 2c8a3787e5..0fe407f1de 100644 --- a/nipype/interfaces/slicer/filtering/tests/test_auto_CheckerBoardFilter.py +++ b/nipype/interfaces/slicer/filtering/tests/test_auto_CheckerBoardFilter.py @@ -12,7 +12,8 @@ def test_CheckerBoardFilter_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputVolume1=dict(argstr='%s', diff --git a/nipype/interfaces/slicer/filtering/tests/test_auto_CurvatureAnisotropicDiffusion.py b/nipype/interfaces/slicer/filtering/tests/test_auto_CurvatureAnisotropicDiffusion.py index 619404f9d2..7139b3f13a 100644 --- a/nipype/interfaces/slicer/filtering/tests/test_auto_CurvatureAnisotropicDiffusion.py +++ b/nipype/interfaces/slicer/filtering/tests/test_auto_CurvatureAnisotropicDiffusion.py @@ -11,7 +11,8 @@ def test_CurvatureAnisotropicDiffusion_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputVolume=dict(argstr='%s', diff --git a/nipype/interfaces/slicer/filtering/tests/test_auto_ExtractSkeleton.py b/nipype/interfaces/slicer/filtering/tests/test_auto_ExtractSkeleton.py index 9dc8f32ade..f41d25c28d 100644 --- a/nipype/interfaces/slicer/filtering/tests/test_auto_ExtractSkeleton.py +++ b/nipype/interfaces/slicer/filtering/tests/test_auto_ExtractSkeleton.py @@ -18,7 +18,8 @@ def test_ExtractSkeleton_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), numPoints=dict(argstr='--numPoints %d', diff --git a/nipype/interfaces/slicer/filtering/tests/test_auto_GaussianBlurImageFilter.py b/nipype/interfaces/slicer/filtering/tests/test_auto_GaussianBlurImageFilter.py index d07344f49f..0ef6a909ca 100644 --- a/nipype/interfaces/slicer/filtering/tests/test_auto_GaussianBlurImageFilter.py +++ b/nipype/interfaces/slicer/filtering/tests/test_auto_GaussianBlurImageFilter.py @@ -9,7 +9,8 @@ def test_GaussianBlurImageFilter_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputVolume=dict(argstr='%s', diff --git a/nipype/interfaces/slicer/filtering/tests/test_auto_GradientAnisotropicDiffusion.py b/nipype/interfaces/slicer/filtering/tests/test_auto_GradientAnisotropicDiffusion.py index 02df01486d..a041642006 100644 --- a/nipype/interfaces/slicer/filtering/tests/test_auto_GradientAnisotropicDiffusion.py +++ b/nipype/interfaces/slicer/filtering/tests/test_auto_GradientAnisotropicDiffusion.py @@ -11,7 +11,8 @@ def test_GradientAnisotropicDiffusion_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputVolume=dict(argstr='%s', diff --git a/nipype/interfaces/slicer/filtering/tests/test_auto_GrayscaleFillHoleImageFilter.py b/nipype/interfaces/slicer/filtering/tests/test_auto_GrayscaleFillHoleImageFilter.py index 0579552ba7..e42fe05e13 100644 --- a/nipype/interfaces/slicer/filtering/tests/test_auto_GrayscaleFillHoleImageFilter.py +++ b/nipype/interfaces/slicer/filtering/tests/test_auto_GrayscaleFillHoleImageFilter.py @@ -9,7 +9,8 @@ def test_GrayscaleFillHoleImageFilter_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputVolume=dict(argstr='%s', diff --git a/nipype/interfaces/slicer/filtering/tests/test_auto_GrayscaleGrindPeakImageFilter.py b/nipype/interfaces/slicer/filtering/tests/test_auto_GrayscaleGrindPeakImageFilter.py index 439c6f1fd4..6f1257ee41 100644 --- a/nipype/interfaces/slicer/filtering/tests/test_auto_GrayscaleGrindPeakImageFilter.py +++ b/nipype/interfaces/slicer/filtering/tests/test_auto_GrayscaleGrindPeakImageFilter.py @@ -9,7 +9,8 @@ def test_GrayscaleGrindPeakImageFilter_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputVolume=dict(argstr='%s', diff --git a/nipype/interfaces/slicer/filtering/tests/test_auto_HistogramMatching.py b/nipype/interfaces/slicer/filtering/tests/test_auto_HistogramMatching.py index 9ed4578c95..36223bd829 100644 --- a/nipype/interfaces/slicer/filtering/tests/test_auto_HistogramMatching.py +++ b/nipype/interfaces/slicer/filtering/tests/test_auto_HistogramMatching.py @@ -9,7 +9,8 @@ def test_HistogramMatching_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputVolume=dict(argstr='%s', diff --git a/nipype/interfaces/slicer/filtering/tests/test_auto_ImageLabelCombine.py b/nipype/interfaces/slicer/filtering/tests/test_auto_ImageLabelCombine.py index 0d19440bb9..2ba011470b 100644 --- a/nipype/interfaces/slicer/filtering/tests/test_auto_ImageLabelCombine.py +++ b/nipype/interfaces/slicer/filtering/tests/test_auto_ImageLabelCombine.py @@ -21,7 +21,8 @@ def test_ImageLabelCombine_inputs(): ), first_overwrites=dict(argstr='--first_overwrites ', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), terminal_output=dict(deprecated='1.0.0', diff --git a/nipype/interfaces/slicer/filtering/tests/test_auto_MaskScalarVolume.py b/nipype/interfaces/slicer/filtering/tests/test_auto_MaskScalarVolume.py index 13c1a90db6..77a20ffe64 100644 --- a/nipype/interfaces/slicer/filtering/tests/test_auto_MaskScalarVolume.py +++ b/nipype/interfaces/slicer/filtering/tests/test_auto_MaskScalarVolume.py @@ -19,7 +19,8 @@ def test_MaskScalarVolume_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), label=dict(argstr='--label %d', diff --git a/nipype/interfaces/slicer/filtering/tests/test_auto_MedianImageFilter.py b/nipype/interfaces/slicer/filtering/tests/test_auto_MedianImageFilter.py index 81dc33b3f6..d0409009ec 100644 --- a/nipype/interfaces/slicer/filtering/tests/test_auto_MedianImageFilter.py +++ b/nipype/interfaces/slicer/filtering/tests/test_auto_MedianImageFilter.py @@ -9,7 +9,8 @@ def test_MedianImageFilter_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputVolume=dict(argstr='%s', diff --git a/nipype/interfaces/slicer/filtering/tests/test_auto_MultiplyScalarVolumes.py b/nipype/interfaces/slicer/filtering/tests/test_auto_MultiplyScalarVolumes.py index ebd9d4397b..ed171521a8 100644 --- a/nipype/interfaces/slicer/filtering/tests/test_auto_MultiplyScalarVolumes.py +++ b/nipype/interfaces/slicer/filtering/tests/test_auto_MultiplyScalarVolumes.py @@ -9,7 +9,8 @@ def test_MultiplyScalarVolumes_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputVolume1=dict(argstr='%s', diff --git a/nipype/interfaces/slicer/filtering/tests/test_auto_N4ITKBiasFieldCorrection.py b/nipype/interfaces/slicer/filtering/tests/test_auto_N4ITKBiasFieldCorrection.py index 78fe5894d7..8397f5f1c5 100644 --- a/nipype/interfaces/slicer/filtering/tests/test_auto_N4ITKBiasFieldCorrection.py +++ b/nipype/interfaces/slicer/filtering/tests/test_auto_N4ITKBiasFieldCorrection.py @@ -16,7 +16,8 @@ def test_N4ITKBiasFieldCorrection_inputs(): histogramsharpening=dict(argstr='--histogramsharpening %s', sep=',', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputimage=dict(argstr='--inputimage %s', diff --git a/nipype/interfaces/slicer/filtering/tests/test_auto_ResampleScalarVectorDWIVolume.py b/nipype/interfaces/slicer/filtering/tests/test_auto_ResampleScalarVectorDWIVolume.py index da74efc236..23be2e6372 100644 --- a/nipype/interfaces/slicer/filtering/tests/test_auto_ResampleScalarVectorDWIVolume.py +++ b/nipype/interfaces/slicer/filtering/tests/test_auto_ResampleScalarVectorDWIVolume.py @@ -24,7 +24,8 @@ def test_ResampleScalarVectorDWIVolume_inputs(): ), hfieldtype=dict(argstr='--hfieldtype %s', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), image_center=dict(argstr='--image_center %s', diff --git a/nipype/interfaces/slicer/filtering/tests/test_auto_SubtractScalarVolumes.py b/nipype/interfaces/slicer/filtering/tests/test_auto_SubtractScalarVolumes.py index 0bf3e2b9bf..b46b24dc6a 100644 --- a/nipype/interfaces/slicer/filtering/tests/test_auto_SubtractScalarVolumes.py +++ b/nipype/interfaces/slicer/filtering/tests/test_auto_SubtractScalarVolumes.py @@ -9,7 +9,8 @@ def test_SubtractScalarVolumes_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputVolume1=dict(argstr='%s', diff --git a/nipype/interfaces/slicer/filtering/tests/test_auto_ThresholdScalarVolume.py b/nipype/interfaces/slicer/filtering/tests/test_auto_ThresholdScalarVolume.py index 86af5dd138..49c3a67455 100644 --- a/nipype/interfaces/slicer/filtering/tests/test_auto_ThresholdScalarVolume.py +++ b/nipype/interfaces/slicer/filtering/tests/test_auto_ThresholdScalarVolume.py @@ -16,7 +16,8 @@ def test_ThresholdScalarVolume_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), lower=dict(argstr='--lower %d', diff --git a/nipype/interfaces/slicer/filtering/tests/test_auto_VotingBinaryHoleFillingImageFilter.py b/nipype/interfaces/slicer/filtering/tests/test_auto_VotingBinaryHoleFillingImageFilter.py index 153d99b00b..fd98549305 100644 --- a/nipype/interfaces/slicer/filtering/tests/test_auto_VotingBinaryHoleFillingImageFilter.py +++ b/nipype/interfaces/slicer/filtering/tests/test_auto_VotingBinaryHoleFillingImageFilter.py @@ -13,7 +13,8 @@ def test_VotingBinaryHoleFillingImageFilter_inputs(): ), foreground=dict(argstr='--foreground %d', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputVolume=dict(argstr='%s', diff --git a/nipype/interfaces/slicer/legacy/diffusion/tests/test_auto_DWIUnbiasedNonLocalMeansFilter.py b/nipype/interfaces/slicer/legacy/diffusion/tests/test_auto_DWIUnbiasedNonLocalMeansFilter.py index 8d27926410..7f25ed92cc 100644 --- a/nipype/interfaces/slicer/legacy/diffusion/tests/test_auto_DWIUnbiasedNonLocalMeansFilter.py +++ b/nipype/interfaces/slicer/legacy/diffusion/tests/test_auto_DWIUnbiasedNonLocalMeansFilter.py @@ -11,7 +11,8 @@ def test_DWIUnbiasedNonLocalMeansFilter_inputs(): ), hp=dict(argstr='--hp %f', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputVolume=dict(argstr='%s', diff --git a/nipype/interfaces/slicer/legacy/tests/test_auto_AffineRegistration.py b/nipype/interfaces/slicer/legacy/tests/test_auto_AffineRegistration.py index d8d595659a..91f4b37591 100644 --- a/nipype/interfaces/slicer/legacy/tests/test_auto_AffineRegistration.py +++ b/nipype/interfaces/slicer/legacy/tests/test_auto_AffineRegistration.py @@ -19,7 +19,8 @@ def test_AffineRegistration_inputs(): ), histogrambins=dict(argstr='--histogrambins %d', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), initialtransform=dict(argstr='--initialtransform %s', diff --git a/nipype/interfaces/slicer/legacy/tests/test_auto_BSplineDeformableRegistration.py b/nipype/interfaces/slicer/legacy/tests/test_auto_BSplineDeformableRegistration.py index 9cb4a89979..98be6fbe12 100644 --- a/nipype/interfaces/slicer/legacy/tests/test_auto_BSplineDeformableRegistration.py +++ b/nipype/interfaces/slicer/legacy/tests/test_auto_BSplineDeformableRegistration.py @@ -23,7 +23,8 @@ def test_BSplineDeformableRegistration_inputs(): ), histogrambins=dict(argstr='--histogrambins %d', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), initialtransform=dict(argstr='--initialtransform %s', diff --git a/nipype/interfaces/slicer/legacy/tests/test_auto_BSplineToDeformationField.py b/nipype/interfaces/slicer/legacy/tests/test_auto_BSplineToDeformationField.py index a343222138..e984395aa4 100644 --- a/nipype/interfaces/slicer/legacy/tests/test_auto_BSplineToDeformationField.py +++ b/nipype/interfaces/slicer/legacy/tests/test_auto_BSplineToDeformationField.py @@ -12,7 +12,8 @@ def test_BSplineToDeformationField_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), refImage=dict(argstr='--refImage %s', diff --git a/nipype/interfaces/slicer/legacy/tests/test_auto_ExpertAutomatedRegistration.py b/nipype/interfaces/slicer/legacy/tests/test_auto_ExpertAutomatedRegistration.py index 18b5332194..9b90f3dc9b 100644 --- a/nipype/interfaces/slicer/legacy/tests/test_auto_ExpertAutomatedRegistration.py +++ b/nipype/interfaces/slicer/legacy/tests/test_auto_ExpertAutomatedRegistration.py @@ -34,7 +34,8 @@ def test_ExpertAutomatedRegistration_inputs(): ), fixedLandmarks=dict(argstr='--fixedLandmarks %s...', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), initialization=dict(argstr='--initialization %s', diff --git a/nipype/interfaces/slicer/legacy/tests/test_auto_LinearRegistration.py b/nipype/interfaces/slicer/legacy/tests/test_auto_LinearRegistration.py index 71578e46fc..c80b8b66fb 100644 --- a/nipype/interfaces/slicer/legacy/tests/test_auto_LinearRegistration.py +++ b/nipype/interfaces/slicer/legacy/tests/test_auto_LinearRegistration.py @@ -19,7 +19,8 @@ def test_LinearRegistration_inputs(): ), histogrambins=dict(argstr='--histogrambins %d', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), initialtransform=dict(argstr='--initialtransform %s', diff --git a/nipype/interfaces/slicer/legacy/tests/test_auto_MultiResolutionAffineRegistration.py b/nipype/interfaces/slicer/legacy/tests/test_auto_MultiResolutionAffineRegistration.py index c1f13b775d..d1262047eb 100644 --- a/nipype/interfaces/slicer/legacy/tests/test_auto_MultiResolutionAffineRegistration.py +++ b/nipype/interfaces/slicer/legacy/tests/test_auto_MultiResolutionAffineRegistration.py @@ -16,7 +16,8 @@ def test_MultiResolutionAffineRegistration_inputs(): ), fixedImageROI=dict(argstr='--fixedImageROI %s', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), metricTolerance=dict(argstr='--metricTolerance %f', diff --git a/nipype/interfaces/slicer/legacy/tests/test_auto_OtsuThresholdImageFilter.py b/nipype/interfaces/slicer/legacy/tests/test_auto_OtsuThresholdImageFilter.py index 6922ddc50e..9c5fcd5c1f 100644 --- a/nipype/interfaces/slicer/legacy/tests/test_auto_OtsuThresholdImageFilter.py +++ b/nipype/interfaces/slicer/legacy/tests/test_auto_OtsuThresholdImageFilter.py @@ -9,7 +9,8 @@ def test_OtsuThresholdImageFilter_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputVolume=dict(argstr='%s', diff --git a/nipype/interfaces/slicer/legacy/tests/test_auto_OtsuThresholdSegmentation.py b/nipype/interfaces/slicer/legacy/tests/test_auto_OtsuThresholdSegmentation.py index 0c03c09d24..72a68ca5b9 100644 --- a/nipype/interfaces/slicer/legacy/tests/test_auto_OtsuThresholdSegmentation.py +++ b/nipype/interfaces/slicer/legacy/tests/test_auto_OtsuThresholdSegmentation.py @@ -13,7 +13,8 @@ def test_OtsuThresholdSegmentation_inputs(): ), faceConnected=dict(argstr='--faceConnected ', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputVolume=dict(argstr='%s', diff --git a/nipype/interfaces/slicer/legacy/tests/test_auto_ResampleScalarVolume.py b/nipype/interfaces/slicer/legacy/tests/test_auto_ResampleScalarVolume.py index addb12fd77..34db34c00d 100644 --- a/nipype/interfaces/slicer/legacy/tests/test_auto_ResampleScalarVolume.py +++ b/nipype/interfaces/slicer/legacy/tests/test_auto_ResampleScalarVolume.py @@ -16,7 +16,8 @@ def test_ResampleScalarVolume_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), interpolation=dict(argstr='--interpolation %s', diff --git a/nipype/interfaces/slicer/legacy/tests/test_auto_RigidRegistration.py b/nipype/interfaces/slicer/legacy/tests/test_auto_RigidRegistration.py index ce9d3c924e..a56ad3b98e 100644 --- a/nipype/interfaces/slicer/legacy/tests/test_auto_RigidRegistration.py +++ b/nipype/interfaces/slicer/legacy/tests/test_auto_RigidRegistration.py @@ -19,7 +19,8 @@ def test_RigidRegistration_inputs(): ), histogrambins=dict(argstr='--histogrambins %d', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), initialtransform=dict(argstr='--initialtransform %s', diff --git a/nipype/interfaces/slicer/quantification/tests/test_auto_IntensityDifferenceMetric.py b/nipype/interfaces/slicer/quantification/tests/test_auto_IntensityDifferenceMetric.py index 217245624d..f4809280f9 100644 --- a/nipype/interfaces/slicer/quantification/tests/test_auto_IntensityDifferenceMetric.py +++ b/nipype/interfaces/slicer/quantification/tests/test_auto_IntensityDifferenceMetric.py @@ -20,7 +20,8 @@ def test_IntensityDifferenceMetric_inputs(): followupVolume=dict(argstr='%s', position=-2, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), outputVolume=dict(argstr='%s', diff --git a/nipype/interfaces/slicer/quantification/tests/test_auto_PETStandardUptakeValueComputation.py b/nipype/interfaces/slicer/quantification/tests/test_auto_PETStandardUptakeValueComputation.py index 2c417eb8ed..4dfbdc66dd 100644 --- a/nipype/interfaces/slicer/quantification/tests/test_auto_PETStandardUptakeValueComputation.py +++ b/nipype/interfaces/slicer/quantification/tests/test_auto_PETStandardUptakeValueComputation.py @@ -24,7 +24,8 @@ def test_PETStandardUptakeValueComputation_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), labelMap=dict(argstr='--labelMap %s', diff --git a/nipype/interfaces/slicer/registration/tests/test_auto_ACPCTransform.py b/nipype/interfaces/slicer/registration/tests/test_auto_ACPCTransform.py index 316a02ab09..fe5c7895f4 100644 --- a/nipype/interfaces/slicer/registration/tests/test_auto_ACPCTransform.py +++ b/nipype/interfaces/slicer/registration/tests/test_auto_ACPCTransform.py @@ -13,7 +13,8 @@ def test_ACPCTransform_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), midline=dict(argstr='--midline %s...', diff --git a/nipype/interfaces/slicer/registration/tests/test_auto_BRAINSDemonWarp.py b/nipype/interfaces/slicer/registration/tests/test_auto_BRAINSDemonWarp.py index 92d51611eb..3df134093f 100644 --- a/nipype/interfaces/slicer/registration/tests/test_auto_BRAINSDemonWarp.py +++ b/nipype/interfaces/slicer/registration/tests/test_auto_BRAINSDemonWarp.py @@ -27,7 +27,8 @@ def test_BRAINSDemonWarp_inputs(): ), histogramMatch=dict(argstr='--histogramMatch ', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), initializeWithDisplacementField=dict(argstr='--initializeWithDisplacementField %s', diff --git a/nipype/interfaces/slicer/registration/tests/test_auto_BRAINSFit.py b/nipype/interfaces/slicer/registration/tests/test_auto_BRAINSFit.py index 93664a066d..943629d5cc 100644 --- a/nipype/interfaces/slicer/registration/tests/test_auto_BRAINSFit.py +++ b/nipype/interfaces/slicer/registration/tests/test_auto_BRAINSFit.py @@ -44,7 +44,8 @@ def test_BRAINSFit_inputs(): ), histogramMatch=dict(argstr='--histogramMatch ', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), initialTransform=dict(argstr='--initialTransform %s', diff --git a/nipype/interfaces/slicer/registration/tests/test_auto_BRAINSResample.py b/nipype/interfaces/slicer/registration/tests/test_auto_BRAINSResample.py index bb2c107ace..a2444018e2 100644 --- a/nipype/interfaces/slicer/registration/tests/test_auto_BRAINSResample.py +++ b/nipype/interfaces/slicer/registration/tests/test_auto_BRAINSResample.py @@ -16,7 +16,8 @@ def test_BRAINSResample_inputs(): gridSpacing=dict(argstr='--gridSpacing %s', sep=',', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputVolume=dict(argstr='--inputVolume %s', diff --git a/nipype/interfaces/slicer/registration/tests/test_auto_FiducialRegistration.py b/nipype/interfaces/slicer/registration/tests/test_auto_FiducialRegistration.py index 4687ccad2b..81d4422012 100644 --- a/nipype/interfaces/slicer/registration/tests/test_auto_FiducialRegistration.py +++ b/nipype/interfaces/slicer/registration/tests/test_auto_FiducialRegistration.py @@ -11,7 +11,8 @@ def test_FiducialRegistration_inputs(): ), fixedLandmarks=dict(argstr='--fixedLandmarks %s...', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), movingLandmarks=dict(argstr='--movingLandmarks %s...', diff --git a/nipype/interfaces/slicer/registration/tests/test_auto_VBRAINSDemonWarp.py b/nipype/interfaces/slicer/registration/tests/test_auto_VBRAINSDemonWarp.py index 3a4579cf44..1fd9c45b34 100644 --- a/nipype/interfaces/slicer/registration/tests/test_auto_VBRAINSDemonWarp.py +++ b/nipype/interfaces/slicer/registration/tests/test_auto_VBRAINSDemonWarp.py @@ -27,7 +27,8 @@ def test_VBRAINSDemonWarp_inputs(): ), histogramMatch=dict(argstr='--histogramMatch ', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), initializeWithDisplacementField=dict(argstr='--initializeWithDisplacementField %s', diff --git a/nipype/interfaces/slicer/segmentation/tests/test_auto_BRAINSROIAuto.py b/nipype/interfaces/slicer/segmentation/tests/test_auto_BRAINSROIAuto.py index f1472982ef..5b8a66ba36 100644 --- a/nipype/interfaces/slicer/segmentation/tests/test_auto_BRAINSROIAuto.py +++ b/nipype/interfaces/slicer/segmentation/tests/test_auto_BRAINSROIAuto.py @@ -13,7 +13,8 @@ def test_BRAINSROIAuto_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputVolume=dict(argstr='--inputVolume %s', diff --git a/nipype/interfaces/slicer/segmentation/tests/test_auto_EMSegmentCommandLine.py b/nipype/interfaces/slicer/segmentation/tests/test_auto_EMSegmentCommandLine.py index 6b9c257eda..e09922f0b1 100644 --- a/nipype/interfaces/slicer/segmentation/tests/test_auto_EMSegmentCommandLine.py +++ b/nipype/interfaces/slicer/segmentation/tests/test_auto_EMSegmentCommandLine.py @@ -22,7 +22,8 @@ def test_EMSegmentCommandLine_inputs(): generateEmptyMRMLSceneAndQuit=dict(argstr='--generateEmptyMRMLSceneAndQuit %s', hash_files=False, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), intermediateResultsDirectory=dict(argstr='--intermediateResultsDirectory %s', diff --git a/nipype/interfaces/slicer/segmentation/tests/test_auto_RobustStatisticsSegmenter.py b/nipype/interfaces/slicer/segmentation/tests/test_auto_RobustStatisticsSegmenter.py index 139390ff84..4bd8a64f94 100644 --- a/nipype/interfaces/slicer/segmentation/tests/test_auto_RobustStatisticsSegmenter.py +++ b/nipype/interfaces/slicer/segmentation/tests/test_auto_RobustStatisticsSegmenter.py @@ -13,7 +13,8 @@ def test_RobustStatisticsSegmenter_inputs(): ), expectedVolume=dict(argstr='--expectedVolume %f', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), intensityHomogeneity=dict(argstr='--intensityHomogeneity %f', diff --git a/nipype/interfaces/slicer/segmentation/tests/test_auto_SimpleRegionGrowingSegmentation.py b/nipype/interfaces/slicer/segmentation/tests/test_auto_SimpleRegionGrowingSegmentation.py index 5b09910378..03eba8a580 100644 --- a/nipype/interfaces/slicer/segmentation/tests/test_auto_SimpleRegionGrowingSegmentation.py +++ b/nipype/interfaces/slicer/segmentation/tests/test_auto_SimpleRegionGrowingSegmentation.py @@ -9,7 +9,8 @@ def test_SimpleRegionGrowingSegmentation_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputVolume=dict(argstr='%s', diff --git a/nipype/interfaces/slicer/tests/test_auto_DicomToNrrdConverter.py b/nipype/interfaces/slicer/tests/test_auto_DicomToNrrdConverter.py index 8442d7fcff..425541245c 100644 --- a/nipype/interfaces/slicer/tests/test_auto_DicomToNrrdConverter.py +++ b/nipype/interfaces/slicer/tests/test_auto_DicomToNrrdConverter.py @@ -9,7 +9,8 @@ def test_DicomToNrrdConverter_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputDicomDirectory=dict(argstr='--inputDicomDirectory %s', diff --git a/nipype/interfaces/slicer/tests/test_auto_EMSegmentTransformToNewFormat.py b/nipype/interfaces/slicer/tests/test_auto_EMSegmentTransformToNewFormat.py index 32a69b3972..5e83f5f935 100644 --- a/nipype/interfaces/slicer/tests/test_auto_EMSegmentTransformToNewFormat.py +++ b/nipype/interfaces/slicer/tests/test_auto_EMSegmentTransformToNewFormat.py @@ -9,7 +9,8 @@ def test_EMSegmentTransformToNewFormat_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputMRMLFileName=dict(argstr='--inputMRMLFileName %s', diff --git a/nipype/interfaces/slicer/tests/test_auto_GrayscaleModelMaker.py b/nipype/interfaces/slicer/tests/test_auto_GrayscaleModelMaker.py index ae71550fe4..2b2f1ad0ee 100644 --- a/nipype/interfaces/slicer/tests/test_auto_GrayscaleModelMaker.py +++ b/nipype/interfaces/slicer/tests/test_auto_GrayscaleModelMaker.py @@ -18,7 +18,8 @@ def test_GrayscaleModelMaker_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), name=dict(argstr='--name %s', diff --git a/nipype/interfaces/slicer/tests/test_auto_LabelMapSmoothing.py b/nipype/interfaces/slicer/tests/test_auto_LabelMapSmoothing.py index d5b112ea25..ded9cbe0be 100644 --- a/nipype/interfaces/slicer/tests/test_auto_LabelMapSmoothing.py +++ b/nipype/interfaces/slicer/tests/test_auto_LabelMapSmoothing.py @@ -11,7 +11,8 @@ def test_LabelMapSmoothing_inputs(): ), gaussianSigma=dict(argstr='--gaussianSigma %f', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputVolume=dict(argstr='%s', diff --git a/nipype/interfaces/slicer/tests/test_auto_MergeModels.py b/nipype/interfaces/slicer/tests/test_auto_MergeModels.py index 90068164e9..4ba0f98458 100644 --- a/nipype/interfaces/slicer/tests/test_auto_MergeModels.py +++ b/nipype/interfaces/slicer/tests/test_auto_MergeModels.py @@ -19,7 +19,8 @@ def test_MergeModels_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), terminal_output=dict(deprecated='1.0.0', diff --git a/nipype/interfaces/slicer/tests/test_auto_ModelMaker.py b/nipype/interfaces/slicer/tests/test_auto_ModelMaker.py index 4cb225c708..c779eb3238 100644 --- a/nipype/interfaces/slicer/tests/test_auto_ModelMaker.py +++ b/nipype/interfaces/slicer/tests/test_auto_ModelMaker.py @@ -24,7 +24,8 @@ def test_ModelMaker_inputs(): ), generateAll=dict(argstr='--generateAll ', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), jointsmooth=dict(argstr='--jointsmooth ', diff --git a/nipype/interfaces/slicer/tests/test_auto_ModelToLabelMap.py b/nipype/interfaces/slicer/tests/test_auto_ModelToLabelMap.py index 2c1c7778e7..a54ee1fea6 100644 --- a/nipype/interfaces/slicer/tests/test_auto_ModelToLabelMap.py +++ b/nipype/interfaces/slicer/tests/test_auto_ModelToLabelMap.py @@ -18,7 +18,8 @@ def test_ModelToLabelMap_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), surface=dict(argstr='%s', diff --git a/nipype/interfaces/slicer/tests/test_auto_OrientScalarVolume.py b/nipype/interfaces/slicer/tests/test_auto_OrientScalarVolume.py index 0f36b8172b..dd0a987239 100644 --- a/nipype/interfaces/slicer/tests/test_auto_OrientScalarVolume.py +++ b/nipype/interfaces/slicer/tests/test_auto_OrientScalarVolume.py @@ -9,7 +9,8 @@ def test_OrientScalarVolume_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inputVolume1=dict(argstr='%s', diff --git a/nipype/interfaces/slicer/tests/test_auto_ProbeVolumeWithModel.py b/nipype/interfaces/slicer/tests/test_auto_ProbeVolumeWithModel.py index ad4ecb6a05..48b75608c8 100644 --- a/nipype/interfaces/slicer/tests/test_auto_ProbeVolumeWithModel.py +++ b/nipype/interfaces/slicer/tests/test_auto_ProbeVolumeWithModel.py @@ -19,7 +19,8 @@ def test_ProbeVolumeWithModel_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), terminal_output=dict(deprecated='1.0.0', diff --git a/nipype/interfaces/slicer/tests/test_auto_SlicerCommandLine.py b/nipype/interfaces/slicer/tests/test_auto_SlicerCommandLine.py index 0645e5a6dc..369a25b77d 100644 --- a/nipype/interfaces/slicer/tests/test_auto_SlicerCommandLine.py +++ b/nipype/interfaces/slicer/tests/test_auto_SlicerCommandLine.py @@ -9,7 +9,8 @@ def test_SlicerCommandLine_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), terminal_output=dict(deprecated='1.0.0', diff --git a/nipype/interfaces/spm/tests/test_auto_Analyze2nii.py b/nipype/interfaces/spm/tests/test_auto_Analyze2nii.py index c5064f2f59..dfcfe7744c 100644 --- a/nipype/interfaces/spm/tests/test_auto_Analyze2nii.py +++ b/nipype/interfaces/spm/tests/test_auto_Analyze2nii.py @@ -6,7 +6,8 @@ def test_Analyze2nii_inputs(): input_map = dict(analyze_file=dict(mandatory=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), matlab_cmd=dict(), @@ -26,7 +27,8 @@ def test_Analyze2nii_inputs(): def test_Analyze2nii_outputs(): - output_map = dict(ignore_exception=dict(nohash=True, + output_map = dict(ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), matlab_cmd=dict(), diff --git a/nipype/interfaces/spm/tests/test_auto_ApplyDeformations.py b/nipype/interfaces/spm/tests/test_auto_ApplyDeformations.py index 5847ad98fe..36f32cc0c2 100644 --- a/nipype/interfaces/spm/tests/test_auto_ApplyDeformations.py +++ b/nipype/interfaces/spm/tests/test_auto_ApplyDeformations.py @@ -7,7 +7,8 @@ def test_ApplyDeformations_inputs(): input_map = dict(deformation_field=dict(field='comp{1}.def', mandatory=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_files=dict(field='fnames', diff --git a/nipype/interfaces/spm/tests/test_auto_ApplyInverseDeformation.py b/nipype/interfaces/spm/tests/test_auto_ApplyInverseDeformation.py index 849c5580db..ffe254c824 100644 --- a/nipype/interfaces/spm/tests/test_auto_ApplyInverseDeformation.py +++ b/nipype/interfaces/spm/tests/test_auto_ApplyInverseDeformation.py @@ -12,7 +12,8 @@ def test_ApplyInverseDeformation_inputs(): deformation_field=dict(field='comp{1}.inv.comp{1}.def', xor=['deformation'], ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_files=dict(field='fnames', diff --git a/nipype/interfaces/spm/tests/test_auto_ApplyTransform.py b/nipype/interfaces/spm/tests/test_auto_ApplyTransform.py index 8100981604..b1fc483046 100644 --- a/nipype/interfaces/spm/tests/test_auto_ApplyTransform.py +++ b/nipype/interfaces/spm/tests/test_auto_ApplyTransform.py @@ -4,7 +4,8 @@ def test_ApplyTransform_inputs(): - input_map = dict(ignore_exception=dict(nohash=True, + input_map = dict(ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(copyfile=True, diff --git a/nipype/interfaces/spm/tests/test_auto_CalcCoregAffine.py b/nipype/interfaces/spm/tests/test_auto_CalcCoregAffine.py index 04bae31f0d..46caa23009 100644 --- a/nipype/interfaces/spm/tests/test_auto_CalcCoregAffine.py +++ b/nipype/interfaces/spm/tests/test_auto_CalcCoregAffine.py @@ -4,7 +4,8 @@ def test_CalcCoregAffine_inputs(): - input_map = dict(ignore_exception=dict(nohash=True, + input_map = dict(ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), invmat=dict(), diff --git a/nipype/interfaces/spm/tests/test_auto_Coregister.py b/nipype/interfaces/spm/tests/test_auto_Coregister.py index 468ad7e3e3..3c1ab4b50c 100644 --- a/nipype/interfaces/spm/tests/test_auto_Coregister.py +++ b/nipype/interfaces/spm/tests/test_auto_Coregister.py @@ -11,7 +11,8 @@ def test_Coregister_inputs(): ), fwhm=dict(field='eoptions.fwhm', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), jobtype=dict(usedefault=True, diff --git a/nipype/interfaces/spm/tests/test_auto_CreateWarped.py b/nipype/interfaces/spm/tests/test_auto_CreateWarped.py index c1a8d34725..f188d42e9e 100644 --- a/nipype/interfaces/spm/tests/test_auto_CreateWarped.py +++ b/nipype/interfaces/spm/tests/test_auto_CreateWarped.py @@ -8,7 +8,8 @@ def test_CreateWarped_inputs(): field='crt_warped.flowfields', mandatory=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), image_files=dict(copyfile=False, diff --git a/nipype/interfaces/spm/tests/test_auto_DARTEL.py b/nipype/interfaces/spm/tests/test_auto_DARTEL.py index c7197a586f..345c2b0b8c 100644 --- a/nipype/interfaces/spm/tests/test_auto_DARTEL.py +++ b/nipype/interfaces/spm/tests/test_auto_DARTEL.py @@ -4,7 +4,8 @@ def test_DARTEL_inputs(): - input_map = dict(ignore_exception=dict(nohash=True, + input_map = dict(ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), image_files=dict(copyfile=False, diff --git a/nipype/interfaces/spm/tests/test_auto_DARTELNorm2MNI.py b/nipype/interfaces/spm/tests/test_auto_DARTELNorm2MNI.py index d3e7815756..1743a5d791 100644 --- a/nipype/interfaces/spm/tests/test_auto_DARTELNorm2MNI.py +++ b/nipype/interfaces/spm/tests/test_auto_DARTELNorm2MNI.py @@ -15,7 +15,8 @@ def test_DARTELNorm2MNI_inputs(): ), fwhm=dict(field='mni_norm.fwhm', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), matlab_cmd=dict(), diff --git a/nipype/interfaces/spm/tests/test_auto_DicomImport.py b/nipype/interfaces/spm/tests/test_auto_DicomImport.py index dff4b04d06..48abb3c646 100644 --- a/nipype/interfaces/spm/tests/test_auto_DicomImport.py +++ b/nipype/interfaces/spm/tests/test_auto_DicomImport.py @@ -10,7 +10,8 @@ def test_DicomImport_inputs(): icedims=dict(field='convopts.icedims', usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_files=dict(field='data', diff --git a/nipype/interfaces/spm/tests/test_auto_EstimateContrast.py b/nipype/interfaces/spm/tests/test_auto_EstimateContrast.py index 76d4a25bf5..de1ac9ca63 100644 --- a/nipype/interfaces/spm/tests/test_auto_EstimateContrast.py +++ b/nipype/interfaces/spm/tests/test_auto_EstimateContrast.py @@ -11,7 +11,8 @@ def test_EstimateContrast_inputs(): ), group_contrast=dict(xor=['use_derivs'], ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), matlab_cmd=dict(), diff --git a/nipype/interfaces/spm/tests/test_auto_EstimateModel.py b/nipype/interfaces/spm/tests/test_auto_EstimateModel.py index 703c97c6fc..b9636e44ed 100644 --- a/nipype/interfaces/spm/tests/test_auto_EstimateModel.py +++ b/nipype/interfaces/spm/tests/test_auto_EstimateModel.py @@ -8,7 +8,8 @@ def test_EstimateModel_inputs(): mandatory=True, ), flags=dict(), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), matlab_cmd=dict(), diff --git a/nipype/interfaces/spm/tests/test_auto_FactorialDesign.py b/nipype/interfaces/spm/tests/test_auto_FactorialDesign.py index eaa4272d8d..34de3b2efe 100644 --- a/nipype/interfaces/spm/tests/test_auto_FactorialDesign.py +++ b/nipype/interfaces/spm/tests/test_auto_FactorialDesign.py @@ -19,7 +19,8 @@ def test_FactorialDesign_inputs(): ), global_normalization=dict(field='globalm.glonorm', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), matlab_cmd=dict(), diff --git a/nipype/interfaces/spm/tests/test_auto_Level1Design.py b/nipype/interfaces/spm/tests/test_auto_Level1Design.py index 908672beb7..5d0a14f5c5 100644 --- a/nipype/interfaces/spm/tests/test_auto_Level1Design.py +++ b/nipype/interfaces/spm/tests/test_auto_Level1Design.py @@ -11,7 +11,8 @@ def test_Level1Design_inputs(): ), global_intensity_normalization=dict(field='global', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), interscan_interval=dict(field='timing.RT', diff --git a/nipype/interfaces/spm/tests/test_auto_MultipleRegressionDesign.py b/nipype/interfaces/spm/tests/test_auto_MultipleRegressionDesign.py index 54ec275450..6c8a465865 100644 --- a/nipype/interfaces/spm/tests/test_auto_MultipleRegressionDesign.py +++ b/nipype/interfaces/spm/tests/test_auto_MultipleRegressionDesign.py @@ -19,7 +19,8 @@ def test_MultipleRegressionDesign_inputs(): ), global_normalization=dict(field='globalm.glonorm', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_files=dict(field='des.mreg.scans', diff --git a/nipype/interfaces/spm/tests/test_auto_NewSegment.py b/nipype/interfaces/spm/tests/test_auto_NewSegment.py index 4c77c5d203..6a2b9e1334 100644 --- a/nipype/interfaces/spm/tests/test_auto_NewSegment.py +++ b/nipype/interfaces/spm/tests/test_auto_NewSegment.py @@ -12,7 +12,8 @@ def test_NewSegment_inputs(): ), channel_info=dict(field='channel', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), matlab_cmd=dict(), diff --git a/nipype/interfaces/spm/tests/test_auto_Normalize.py b/nipype/interfaces/spm/tests/test_auto_Normalize.py index f6cb425d6a..7aa7949a11 100644 --- a/nipype/interfaces/spm/tests/test_auto_Normalize.py +++ b/nipype/interfaces/spm/tests/test_auto_Normalize.py @@ -11,7 +11,8 @@ def test_Normalize_inputs(): apply_to_files=dict(copyfile=True, field='subj.resample', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), jobtype=dict(usedefault=True, diff --git a/nipype/interfaces/spm/tests/test_auto_Normalize12.py b/nipype/interfaces/spm/tests/test_auto_Normalize12.py index 9d537e34b1..74bf60132a 100644 --- a/nipype/interfaces/spm/tests/test_auto_Normalize12.py +++ b/nipype/interfaces/spm/tests/test_auto_Normalize12.py @@ -18,7 +18,8 @@ def test_Normalize12_inputs(): mandatory=True, xor=['image_to_align', 'tpm'], ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), image_to_align=dict(copyfile=True, diff --git a/nipype/interfaces/spm/tests/test_auto_OneSampleTTestDesign.py b/nipype/interfaces/spm/tests/test_auto_OneSampleTTestDesign.py index 1148cbf9fa..323660a95d 100644 --- a/nipype/interfaces/spm/tests/test_auto_OneSampleTTestDesign.py +++ b/nipype/interfaces/spm/tests/test_auto_OneSampleTTestDesign.py @@ -19,7 +19,8 @@ def test_OneSampleTTestDesign_inputs(): ), global_normalization=dict(field='globalm.glonorm', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_files=dict(field='des.t1.scans', diff --git a/nipype/interfaces/spm/tests/test_auto_PairedTTestDesign.py b/nipype/interfaces/spm/tests/test_auto_PairedTTestDesign.py index f9cce92a37..d2ab89aed8 100644 --- a/nipype/interfaces/spm/tests/test_auto_PairedTTestDesign.py +++ b/nipype/interfaces/spm/tests/test_auto_PairedTTestDesign.py @@ -23,7 +23,8 @@ def test_PairedTTestDesign_inputs(): ), grand_mean_scaling=dict(field='des.pt.gmsca', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), matlab_cmd=dict(), diff --git a/nipype/interfaces/spm/tests/test_auto_Realign.py b/nipype/interfaces/spm/tests/test_auto_Realign.py index 6c54c4a945..ef1989bc19 100644 --- a/nipype/interfaces/spm/tests/test_auto_Realign.py +++ b/nipype/interfaces/spm/tests/test_auto_Realign.py @@ -6,7 +6,8 @@ def test_Realign_inputs(): input_map = dict(fwhm=dict(field='eoptions.fwhm', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_files=dict(copyfile=True, diff --git a/nipype/interfaces/spm/tests/test_auto_Reslice.py b/nipype/interfaces/spm/tests/test_auto_Reslice.py index 4a433e5b3d..a2f10d727c 100644 --- a/nipype/interfaces/spm/tests/test_auto_Reslice.py +++ b/nipype/interfaces/spm/tests/test_auto_Reslice.py @@ -4,7 +4,8 @@ def test_Reslice_inputs(): - input_map = dict(ignore_exception=dict(nohash=True, + input_map = dict(ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(mandatory=True, diff --git a/nipype/interfaces/spm/tests/test_auto_ResliceToReference.py b/nipype/interfaces/spm/tests/test_auto_ResliceToReference.py index 06e8f2e607..4bca83c6cf 100644 --- a/nipype/interfaces/spm/tests/test_auto_ResliceToReference.py +++ b/nipype/interfaces/spm/tests/test_auto_ResliceToReference.py @@ -6,7 +6,8 @@ def test_ResliceToReference_inputs(): input_map = dict(bounding_box=dict(field='comp{2}.idbbvox.bb', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_files=dict(field='fnames', diff --git a/nipype/interfaces/spm/tests/test_auto_SPMCommand.py b/nipype/interfaces/spm/tests/test_auto_SPMCommand.py index ed841142dd..0f36f719d7 100644 --- a/nipype/interfaces/spm/tests/test_auto_SPMCommand.py +++ b/nipype/interfaces/spm/tests/test_auto_SPMCommand.py @@ -4,7 +4,8 @@ def test_SPMCommand_inputs(): - input_map = dict(ignore_exception=dict(nohash=True, + input_map = dict(ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), matlab_cmd=dict(), diff --git a/nipype/interfaces/spm/tests/test_auto_Segment.py b/nipype/interfaces/spm/tests/test_auto_Segment.py index 739a4e1ca9..b18f405de1 100644 --- a/nipype/interfaces/spm/tests/test_auto_Segment.py +++ b/nipype/interfaces/spm/tests/test_auto_Segment.py @@ -22,7 +22,8 @@ def test_Segment_inputs(): ), gm_output_type=dict(field='output.GM', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), mask_image=dict(field='opts.msk', diff --git a/nipype/interfaces/spm/tests/test_auto_SliceTiming.py b/nipype/interfaces/spm/tests/test_auto_SliceTiming.py index 739d0157a1..357096a402 100644 --- a/nipype/interfaces/spm/tests/test_auto_SliceTiming.py +++ b/nipype/interfaces/spm/tests/test_auto_SliceTiming.py @@ -4,7 +4,8 @@ def test_SliceTiming_inputs(): - input_map = dict(ignore_exception=dict(nohash=True, + input_map = dict(ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_files=dict(copyfile=False, diff --git a/nipype/interfaces/spm/tests/test_auto_Smooth.py b/nipype/interfaces/spm/tests/test_auto_Smooth.py index 378f504328..3f0426abb0 100644 --- a/nipype/interfaces/spm/tests/test_auto_Smooth.py +++ b/nipype/interfaces/spm/tests/test_auto_Smooth.py @@ -8,7 +8,8 @@ def test_Smooth_inputs(): ), fwhm=dict(field='fwhm', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), implicit_masking=dict(field='im', diff --git a/nipype/interfaces/spm/tests/test_auto_Threshold.py b/nipype/interfaces/spm/tests/test_auto_Threshold.py index e30b163857..017b1c5325 100644 --- a/nipype/interfaces/spm/tests/test_auto_Threshold.py +++ b/nipype/interfaces/spm/tests/test_auto_Threshold.py @@ -16,7 +16,8 @@ def test_Threshold_inputs(): ), height_threshold_type=dict(usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), matlab_cmd=dict(), diff --git a/nipype/interfaces/spm/tests/test_auto_ThresholdStatistics.py b/nipype/interfaces/spm/tests/test_auto_ThresholdStatistics.py index d73cd4f98f..7cd496ce94 100644 --- a/nipype/interfaces/spm/tests/test_auto_ThresholdStatistics.py +++ b/nipype/interfaces/spm/tests/test_auto_ThresholdStatistics.py @@ -10,7 +10,8 @@ def test_ThresholdStatistics_inputs(): ), height_threshold=dict(mandatory=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), matlab_cmd=dict(), diff --git a/nipype/interfaces/spm/tests/test_auto_TwoSampleTTestDesign.py b/nipype/interfaces/spm/tests/test_auto_TwoSampleTTestDesign.py index cb19a35f62..f38f8023be 100644 --- a/nipype/interfaces/spm/tests/test_auto_TwoSampleTTestDesign.py +++ b/nipype/interfaces/spm/tests/test_auto_TwoSampleTTestDesign.py @@ -27,7 +27,8 @@ def test_TwoSampleTTestDesign_inputs(): group2_files=dict(field='des.t2.scans2', mandatory=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), matlab_cmd=dict(), diff --git a/nipype/interfaces/spm/tests/test_auto_VBMSegment.py b/nipype/interfaces/spm/tests/test_auto_VBMSegment.py index f02579b66c..d61f7c623f 100644 --- a/nipype/interfaces/spm/tests/test_auto_VBMSegment.py +++ b/nipype/interfaces/spm/tests/test_auto_VBMSegment.py @@ -56,7 +56,8 @@ def test_VBMSegment_inputs(): gm_normalized=dict(field='estwrite.output.GM.warped', usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_files=dict(copyfile=False, diff --git a/nipype/interfaces/tests/test_auto_Bru2.py b/nipype/interfaces/tests/test_auto_Bru2.py index 8d20215ed7..ec4151cc8f 100644 --- a/nipype/interfaces/tests/test_auto_Bru2.py +++ b/nipype/interfaces/tests/test_auto_Bru2.py @@ -15,7 +15,8 @@ def test_Bru2_inputs(): ), force_conversion=dict(argstr='-f', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), input_dir=dict(argstr='%s', diff --git a/nipype/interfaces/tests/test_auto_C3dAffineTool.py b/nipype/interfaces/tests/test_auto_C3dAffineTool.py index 0aff320afe..3abbf26110 100644 --- a/nipype/interfaces/tests/test_auto_C3dAffineTool.py +++ b/nipype/interfaces/tests/test_auto_C3dAffineTool.py @@ -12,7 +12,8 @@ def test_C3dAffineTool_inputs(): fsl2ras=dict(argstr='-fsl2ras', position=4, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), itk_transform=dict(argstr='-oitk %s', diff --git a/nipype/interfaces/tests/test_auto_DataFinder.py b/nipype/interfaces/tests/test_auto_DataFinder.py index f402bdc53d..82b74b6017 100644 --- a/nipype/interfaces/tests/test_auto_DataFinder.py +++ b/nipype/interfaces/tests/test_auto_DataFinder.py @@ -4,7 +4,8 @@ def test_DataFinder_inputs(): - input_map = dict(ignore_exception=dict(nohash=True, + input_map = dict(ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), ignore_regexes=dict(), diff --git a/nipype/interfaces/tests/test_auto_DataGrabber.py b/nipype/interfaces/tests/test_auto_DataGrabber.py index 5795ce969d..8d95bf9637 100644 --- a/nipype/interfaces/tests/test_auto_DataGrabber.py +++ b/nipype/interfaces/tests/test_auto_DataGrabber.py @@ -5,7 +5,8 @@ def test_DataGrabber_inputs(): input_map = dict(base_directory=dict(), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), raise_on_empty=dict(usedefault=True, diff --git a/nipype/interfaces/tests/test_auto_DataSink.py b/nipype/interfaces/tests/test_auto_DataSink.py index 0ea2b71a6d..7c739969a7 100644 --- a/nipype/interfaces/tests/test_auto_DataSink.py +++ b/nipype/interfaces/tests/test_auto_DataSink.py @@ -11,7 +11,8 @@ def test_DataSink_inputs(): container=dict(), creds_path=dict(), encrypt_bucket_keys=dict(), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), local_copy=dict(), diff --git a/nipype/interfaces/tests/test_auto_Dcm2nii.py b/nipype/interfaces/tests/test_auto_Dcm2nii.py index e5c16c79b5..20a29004cb 100644 --- a/nipype/interfaces/tests/test_auto_Dcm2nii.py +++ b/nipype/interfaces/tests/test_auto_Dcm2nii.py @@ -33,7 +33,8 @@ def test_Dcm2nii_inputs(): id_in_filename=dict(argstr='-i', usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), nii_output=dict(argstr='-n', diff --git a/nipype/interfaces/tests/test_auto_Dcm2niix.py b/nipype/interfaces/tests/test_auto_Dcm2niix.py index 9c92e888ac..3d496f3aba 100644 --- a/nipype/interfaces/tests/test_auto_Dcm2niix.py +++ b/nipype/interfaces/tests/test_auto_Dcm2niix.py @@ -21,7 +21,8 @@ def test_Dcm2niix_inputs(): has_private=dict(argstr='-t', usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), merge_imgs=dict(argstr='-m', diff --git a/nipype/interfaces/tests/test_auto_FreeSurferSource.py b/nipype/interfaces/tests/test_auto_FreeSurferSource.py index 1af0874410..a99ddb9d4f 100644 --- a/nipype/interfaces/tests/test_auto_FreeSurferSource.py +++ b/nipype/interfaces/tests/test_auto_FreeSurferSource.py @@ -6,7 +6,8 @@ def test_FreeSurferSource_inputs(): input_map = dict(hemi=dict(usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), subject_id=dict(mandatory=True, diff --git a/nipype/interfaces/tests/test_auto_IOBase.py b/nipype/interfaces/tests/test_auto_IOBase.py index 02e45692a9..d8db29919a 100644 --- a/nipype/interfaces/tests/test_auto_IOBase.py +++ b/nipype/interfaces/tests/test_auto_IOBase.py @@ -4,7 +4,8 @@ def test_IOBase_inputs(): - input_map = dict(ignore_exception=dict(nohash=True, + input_map = dict(ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), ) diff --git a/nipype/interfaces/tests/test_auto_JSONFileGrabber.py b/nipype/interfaces/tests/test_auto_JSONFileGrabber.py index 3a93359459..d6458e1e8f 100644 --- a/nipype/interfaces/tests/test_auto_JSONFileGrabber.py +++ b/nipype/interfaces/tests/test_auto_JSONFileGrabber.py @@ -5,7 +5,8 @@ def test_JSONFileGrabber_inputs(): input_map = dict(defaults=dict(), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(), diff --git a/nipype/interfaces/tests/test_auto_JSONFileSink.py b/nipype/interfaces/tests/test_auto_JSONFileSink.py index 32b51c9dc5..1d569e76d4 100644 --- a/nipype/interfaces/tests/test_auto_JSONFileSink.py +++ b/nipype/interfaces/tests/test_auto_JSONFileSink.py @@ -6,7 +6,8 @@ def test_JSONFileSink_inputs(): input_map = dict(_outputs=dict(usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_dict=dict(usedefault=True, diff --git a/nipype/interfaces/tests/test_auto_MatlabCommand.py b/nipype/interfaces/tests/test_auto_MatlabCommand.py index c9ec84b23b..71a5587767 100644 --- a/nipype/interfaces/tests/test_auto_MatlabCommand.py +++ b/nipype/interfaces/tests/test_auto_MatlabCommand.py @@ -9,7 +9,8 @@ def test_MatlabCommand_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), logfile=dict(argstr='-logfile %s', diff --git a/nipype/interfaces/tests/test_auto_MeshFix.py b/nipype/interfaces/tests/test_auto_MeshFix.py index 9f40f04355..04c314e2e2 100644 --- a/nipype/interfaces/tests/test_auto_MeshFix.py +++ b/nipype/interfaces/tests/test_auto_MeshFix.py @@ -38,7 +38,8 @@ def test_MeshFix_inputs(): finetuning_substeps=dict(argstr='%d', requires=['finetuning_distance'], ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file1=dict(argstr='%s', diff --git a/nipype/interfaces/tests/test_auto_MySQLSink.py b/nipype/interfaces/tests/test_auto_MySQLSink.py index 1218d8fac0..80bf344e63 100644 --- a/nipype/interfaces/tests/test_auto_MySQLSink.py +++ b/nipype/interfaces/tests/test_auto_MySQLSink.py @@ -14,7 +14,8 @@ def test_MySQLSink_inputs(): usedefault=True, xor=['config'], ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), password=dict(), diff --git a/nipype/interfaces/tests/test_auto_NiftiGeneratorBase.py b/nipype/interfaces/tests/test_auto_NiftiGeneratorBase.py index 773e7e24a3..0846313121 100644 --- a/nipype/interfaces/tests/test_auto_NiftiGeneratorBase.py +++ b/nipype/interfaces/tests/test_auto_NiftiGeneratorBase.py @@ -4,7 +4,8 @@ def test_NiftiGeneratorBase_inputs(): - input_map = dict(ignore_exception=dict(nohash=True, + input_map = dict(ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), ) diff --git a/nipype/interfaces/tests/test_auto_PETPVC.py b/nipype/interfaces/tests/test_auto_PETPVC.py index 4fadd5aa81..6dbac76fa2 100644 --- a/nipype/interfaces/tests/test_auto_PETPVC.py +++ b/nipype/interfaces/tests/test_auto_PETPVC.py @@ -23,7 +23,8 @@ def test_PETPVC_inputs(): fwhm_z=dict(argstr='-z %.4f', mandatory=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='-i %s', diff --git a/nipype/interfaces/tests/test_auto_Quickshear.py b/nipype/interfaces/tests/test_auto_Quickshear.py index 0f6821d228..e2edaf37c6 100644 --- a/nipype/interfaces/tests/test_auto_Quickshear.py +++ b/nipype/interfaces/tests/test_auto_Quickshear.py @@ -12,7 +12,8 @@ def test_Quickshear_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='%s', diff --git a/nipype/interfaces/tests/test_auto_S3DataGrabber.py b/nipype/interfaces/tests/test_auto_S3DataGrabber.py index a3c918c465..d5a2536eb8 100644 --- a/nipype/interfaces/tests/test_auto_S3DataGrabber.py +++ b/nipype/interfaces/tests/test_auto_S3DataGrabber.py @@ -10,7 +10,8 @@ def test_S3DataGrabber_inputs(): ), bucket_path=dict(usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), local_directory=dict(), diff --git a/nipype/interfaces/tests/test_auto_SQLiteSink.py b/nipype/interfaces/tests/test_auto_SQLiteSink.py index 74c9caaa46..e7319e4d29 100644 --- a/nipype/interfaces/tests/test_auto_SQLiteSink.py +++ b/nipype/interfaces/tests/test_auto_SQLiteSink.py @@ -6,7 +6,8 @@ def test_SQLiteSink_inputs(): input_map = dict(database_file=dict(mandatory=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), table_name=dict(mandatory=True, diff --git a/nipype/interfaces/tests/test_auto_SSHDataGrabber.py b/nipype/interfaces/tests/test_auto_SSHDataGrabber.py index 99e71d1ffe..1c350203e6 100644 --- a/nipype/interfaces/tests/test_auto_SSHDataGrabber.py +++ b/nipype/interfaces/tests/test_auto_SSHDataGrabber.py @@ -10,7 +10,8 @@ def test_SSHDataGrabber_inputs(): ), hostname=dict(mandatory=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), password=dict(), diff --git a/nipype/interfaces/tests/test_auto_SelectFiles.py b/nipype/interfaces/tests/test_auto_SelectFiles.py index da119bfcf6..12ca6ac859 100644 --- a/nipype/interfaces/tests/test_auto_SelectFiles.py +++ b/nipype/interfaces/tests/test_auto_SelectFiles.py @@ -7,7 +7,8 @@ def test_SelectFiles_inputs(): input_map = dict(base_directory=dict(), force_lists=dict(usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), raise_on_empty=dict(usedefault=True, diff --git a/nipype/interfaces/tests/test_auto_SignalExtraction.py b/nipype/interfaces/tests/test_auto_SignalExtraction.py index 4f101450b0..6f314f2f11 100644 --- a/nipype/interfaces/tests/test_auto_SignalExtraction.py +++ b/nipype/interfaces/tests/test_auto_SignalExtraction.py @@ -8,7 +8,8 @@ def test_SignalExtraction_inputs(): ), detrend=dict(usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(mandatory=True, diff --git a/nipype/interfaces/tests/test_auto_SlicerCommandLine.py b/nipype/interfaces/tests/test_auto_SlicerCommandLine.py index 70827978cc..26a4700a0e 100644 --- a/nipype/interfaces/tests/test_auto_SlicerCommandLine.py +++ b/nipype/interfaces/tests/test_auto_SlicerCommandLine.py @@ -9,7 +9,8 @@ def test_SlicerCommandLine_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), module=dict(), diff --git a/nipype/interfaces/tests/test_auto_XNATSink.py b/nipype/interfaces/tests/test_auto_XNATSink.py index 286c8b2ca9..e4ce926c6e 100644 --- a/nipype/interfaces/tests/test_auto_XNATSink.py +++ b/nipype/interfaces/tests/test_auto_XNATSink.py @@ -14,7 +14,8 @@ def test_XNATSink_inputs(): ), experiment_id=dict(mandatory=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), project_id=dict(mandatory=True, diff --git a/nipype/interfaces/tests/test_auto_XNATSource.py b/nipype/interfaces/tests/test_auto_XNATSource.py index b399d143aa..afd02e6c9d 100644 --- a/nipype/interfaces/tests/test_auto_XNATSource.py +++ b/nipype/interfaces/tests/test_auto_XNATSource.py @@ -8,7 +8,8 @@ def test_XNATSource_inputs(): config=dict(mandatory=True, xor=['server'], ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), pwd=dict(), diff --git a/nipype/interfaces/utility/tests/test_auto_AssertEqual.py b/nipype/interfaces/utility/tests/test_auto_AssertEqual.py index 739725a417..0b561d9702 100644 --- a/nipype/interfaces/utility/tests/test_auto_AssertEqual.py +++ b/nipype/interfaces/utility/tests/test_auto_AssertEqual.py @@ -4,7 +4,8 @@ def test_AssertEqual_inputs(): - input_map = dict(ignore_exception=dict(nohash=True, + input_map = dict(ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), volume1=dict(mandatory=True, diff --git a/nipype/interfaces/utility/tests/test_auto_Function.py b/nipype/interfaces/utility/tests/test_auto_Function.py index 649d626a5f..1831728c04 100644 --- a/nipype/interfaces/utility/tests/test_auto_Function.py +++ b/nipype/interfaces/utility/tests/test_auto_Function.py @@ -6,7 +6,8 @@ def test_Function_inputs(): input_map = dict(function_str=dict(mandatory=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), ) diff --git a/nipype/interfaces/utility/tests/test_auto_Merge.py b/nipype/interfaces/utility/tests/test_auto_Merge.py index f98e70892b..07f5b60962 100644 --- a/nipype/interfaces/utility/tests/test_auto_Merge.py +++ b/nipype/interfaces/utility/tests/test_auto_Merge.py @@ -6,7 +6,8 @@ def test_Merge_inputs(): input_map = dict(axis=dict(usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), no_flatten=dict(usedefault=True, diff --git a/nipype/interfaces/utility/tests/test_auto_Select.py b/nipype/interfaces/utility/tests/test_auto_Select.py index 3c67785702..7889366b76 100644 --- a/nipype/interfaces/utility/tests/test_auto_Select.py +++ b/nipype/interfaces/utility/tests/test_auto_Select.py @@ -4,7 +4,8 @@ def test_Select_inputs(): - input_map = dict(ignore_exception=dict(nohash=True, + input_map = dict(ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), index=dict(mandatory=True, diff --git a/nipype/interfaces/utility/tests/test_auto_Split.py b/nipype/interfaces/utility/tests/test_auto_Split.py index 663ff65b13..a0e02af267 100644 --- a/nipype/interfaces/utility/tests/test_auto_Split.py +++ b/nipype/interfaces/utility/tests/test_auto_Split.py @@ -4,7 +4,8 @@ def test_Split_inputs(): - input_map = dict(ignore_exception=dict(nohash=True, + input_map = dict(ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), inlist=dict(mandatory=True, diff --git a/nipype/interfaces/vista/tests/test_auto_Vnifti2Image.py b/nipype/interfaces/vista/tests/test_auto_Vnifti2Image.py index 805c5f0921..83bd21b7bf 100644 --- a/nipype/interfaces/vista/tests/test_auto_Vnifti2Image.py +++ b/nipype/interfaces/vista/tests/test_auto_Vnifti2Image.py @@ -12,7 +12,8 @@ def test_Vnifti2Image_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='-in %s', diff --git a/nipype/interfaces/vista/tests/test_auto_VtoMat.py b/nipype/interfaces/vista/tests/test_auto_VtoMat.py index 2e5345d80f..e9e198e90b 100644 --- a/nipype/interfaces/vista/tests/test_auto_VtoMat.py +++ b/nipype/interfaces/vista/tests/test_auto_VtoMat.py @@ -9,7 +9,8 @@ def test_VtoMat_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_file=dict(argstr='-in %s', From 3070378667b45a10a8b66d4a9a86ed127e676569 Mon Sep 17 00:00:00 2001 From: oesteban Date: Mon, 4 Dec 2017 16:31:28 -0800 Subject: [PATCH 587/643] add docstring to emptydirs --- nipype/utils/filemanip.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/nipype/utils/filemanip.py b/nipype/utils/filemanip.py index 23adc64e8b..adc2752f56 100644 --- a/nipype/utils/filemanip.py +++ b/nipype/utils/filemanip.py @@ -700,6 +700,14 @@ def makedirs(path, exist_ok=False): def emptydirs(path): + """ + Empty an existing directory, without deleting it + + Parameters + ---------- + path : directory that should be empty + + """ fmlogger.debug("Removing contents of %s", path) pathconts = os.listdir(path) From de11e796b9e970444b7523a24cb03ae672c2663a Mon Sep 17 00:00:00 2001 From: oesteban Date: Mon, 4 Dec 2017 16:31:43 -0800 Subject: [PATCH 588/643] remove self._results from Node --- nipype/pipeline/engine/nodes.py | 57 ++++++++++++++++----------------- 1 file changed, 27 insertions(+), 30 deletions(-) diff --git a/nipype/pipeline/engine/nodes.py b/nipype/pipeline/engine/nodes.py index b8ca88927c..ed7da540f0 100644 --- a/nipype/pipeline/engine/nodes.py +++ b/nipype/pipeline/engine/nodes.py @@ -163,7 +163,6 @@ def __init__(self, interface, name, iterables=None, itersource=None, self.name = name self._output_dir = None - self._result = None self.iterables = iterables self.synchronize = synchronize self.itersource = itersource @@ -190,11 +189,7 @@ def interface(self): @property def result(self): - # Cache first - if not self._result: - self._result = self._load_resultfile(self.output_dir())[0] - - return self._result + return self._load_resultfile(self.output_dir())[0] @property def inputs(self): @@ -420,7 +415,7 @@ def run(self, updatehash=False): self.write_report(report_type='postexec', cwd=outdir) logger.info('[Node] Finished "%s".', self.fullname) os.chdir(cwd) - return self._result + return self.result # Private functions def _parameterization_dir(self, param): @@ -511,7 +506,7 @@ def _get_inputs(self): def _run_interface(self, execute=True, updatehash=False): if updatehash: return - self._result = self._run_command(execute) + return self._run_command(execute) def _save_results(self, result, cwd): resultsfile = op.join(cwd, 'result_%s.pklz' % self.name) @@ -609,8 +604,7 @@ def _load_results(self, cwd): self._save_results(result, cwd) else: logger.debug('aggregating mapnode results') - self._run_interface() - result = self._result + result = self._run_interface() return result def _run_command(self, execute, copyfiles=True): @@ -625,7 +619,7 @@ def _run_command(self, execute, copyfiles=True): interface=self._interface.__class__, runtime=runtime, inputs=self._interface.inputs.get_traitsfree()) - self._result = result + if copyfiles: self._copyfiles_to_wd(cwd, execute) @@ -634,7 +628,7 @@ def _run_command(self, execute, copyfiles=True): try: cmd = self._interface.cmdline except Exception as msg: - self._result.runtime.stderr = msg + result.runtime.stderr = msg raise cmdfile = op.join(cwd, 'command.txt') with open(cmdfile, 'wt') as fd: @@ -646,7 +640,7 @@ def _run_command(self, execute, copyfiles=True): result = self._interface.run() except Exception as msg: self._save_results(result, cwd) - self._result.runtime.stderr = msg + result.runtime.stderr = msg raise dirs2keep = None @@ -1182,19 +1176,19 @@ def _node_runner(self, nodes, updatehash=False): yield i, node, err def _collate_results(self, nodes): - self._result = InterfaceResult(interface=[], runtime=[], - provenance=[], inputs=[], - outputs=self.outputs) + result = InterfaceResult( + interface=[], runtime=[], provenance=[], inputs=[], + outputs=self.outputs) returncode = [] for i, node, err in nodes: - self._result.runtime.insert(i, None) + result.runtime.insert(i, None) if node.result: if hasattr(node.result, 'runtime'): - self._result.interface.insert(i, node.result.interface) - self._result.inputs.insert(i, node.result.inputs) - self._result.runtime[i] = node.result.runtime + result.interface.insert(i, node.result.interface) + result.inputs.insert(i, node.result.inputs) + result.runtime[i] = node.result.runtime if hasattr(node.result, 'provenance'): - self._result.provenance.insert(i, node.result.provenance) + result.provenance.insert(i, node.result.provenance) returncode.insert(i, err) if self.outputs: for key, _ in list(self.outputs.items()): @@ -1203,7 +1197,7 @@ def _collate_results(self, nodes): if str2bool(rm_extra) and self.needed_outputs: if key not in self.needed_outputs: continue - values = getattr(self._result.outputs, key) + values = getattr(result.outputs, key) if not isdefined(values): values = [] if node.result.outputs: @@ -1211,16 +1205,16 @@ def _collate_results(self, nodes): else: values.insert(i, None) defined_vals = [isdefined(val) for val in values] - if any(defined_vals) and self._result.outputs: - setattr(self._result.outputs, key, values) + if any(defined_vals) and result.outputs: + setattr(result.outputs, key, values) if self.nested: for key, _ in list(self.outputs.items()): - values = getattr(self._result.outputs, key) + values = getattr(result.outputs, key) if isdefined(values): values = unflatten(values, filename_to_list( getattr(self.inputs, self.iterfield[0]))) - setattr(self._result.outputs, key, values) + setattr(result.outputs, key, values) if returncode and any([code is not None for code in returncode]): msg = [] @@ -1231,6 +1225,8 @@ def _collate_results(self, nodes): raise Exception('Subnodes of node: %s failed:\n%s' % (self.name, '\n'.join(msg))) + return result + def write_report(self, report_type=None, cwd=None): if not str2bool(self.config['execution']['create_report']): return @@ -1322,9 +1318,10 @@ def _run_interface(self, execute=True, updatehash=False): nitems = len(filename_to_list(getattr(self.inputs, self.iterfield[0]))) nodenames = ['_' + self.name + str(i) for i in range(nitems)] - self._collate_results(self._node_runner(self._make_nodes(cwd), - updatehash=updatehash)) - self._save_results(self._result, cwd) + result = self._collate_results( + self._node_runner(self._make_nodes(cwd), + updatehash=updatehash)) + self._save_results(result, cwd) # remove any node directories no longer required dirs2remove = [] for path in glob(op.join(cwd, 'mapflow', '*')): @@ -1334,5 +1331,5 @@ def _run_interface(self, execute=True, updatehash=False): for path in dirs2remove: shutil.rmtree(path) else: - self._result = self._load_results(cwd) + result = self._load_results(cwd) os.chdir(old_cwd) From a1c0fbde2c3745a848e70529c052cf5d5aa4724a Mon Sep 17 00:00:00 2001 From: oesteban Date: Mon, 4 Dec 2017 16:33:54 -0800 Subject: [PATCH 589/643] hashfiles is True --- nipype/pipeline/engine/nodes.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/nipype/pipeline/engine/nodes.py b/nipype/pipeline/engine/nodes.py index ed7da540f0..dee88f522e 100644 --- a/nipype/pipeline/engine/nodes.py +++ b/nipype/pipeline/engine/nodes.py @@ -283,9 +283,8 @@ def hash_exists(self, updatehash=False): for hf in hashfiles: os.remove(hf) - if updatehash and len(hashfiles) == 1: + if updatehash: logger.debug("Updating hash: %s", hashvalue) - os.remove(hashfiles[0]) self._save_hashfile(hashfile, hashed_inputs) hash_exists = op.exists(hashfile) From 5c56bfe07de2e332316636f2dc41bd1c73068177 Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Mon, 4 Dec 2017 12:12:50 -0500 Subject: [PATCH 590/643] ENH: Profile VMS as well as RSS --- nipype/interfaces/base/core.py | 3 ++- nipype/pipeline/engine/utils.py | 5 +++-- nipype/utils/profiler.py | 13 +++++++++---- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/nipype/interfaces/base/core.py b/nipype/interfaces/base/core.py index f6f9ba655a..2a664c9f48 100644 --- a/nipype/interfaces/base/core.py +++ b/nipype/interfaces/base/core.py @@ -530,8 +530,9 @@ def run(self, **inputs): runtime.prof_dict = { 'time': vals[:, 0].tolist(), - 'mem_gb': (vals[:, 1] / 1024).tolist(), + 'rss_gb': (vals[:, 1] / 1024).tolist(), 'cpus': vals[:, 2].tolist(), + 'vms_gb': (vals[:, 3] / 1024).tolist(), } return results diff --git a/nipype/pipeline/engine/utils.py b/nipype/pipeline/engine/utils.py index 7a730b817c..c87b01869d 100644 --- a/nipype/pipeline/engine/utils.py +++ b/nipype/pipeline/engine/utils.py @@ -1320,7 +1320,8 @@ def write_workflow_resources(graph, filename=None, append=None): 'time': [], 'name': [], 'interface': [], - 'mem_gb': [], + 'rss_gb': [], + 'vms_gb': [], 'cpus': [], 'mapnode': [], 'params': [], @@ -1361,7 +1362,7 @@ def write_workflow_resources(graph, filename=None, append=None): '(mapflow %d/%d).', nodename, subidx + 1, len(rt_list)) continue - for key in ['time', 'mem_gb', 'cpus']: + for key in ['time', 'rss_gb', 'cpus', 'vms_gb']: big_dict[key] += runtime.prof_dict[key] big_dict['interface'] += [classname] * nsamples diff --git a/nipype/utils/profiler.py b/nipype/utils/profiler.py index 82855db43c..76bd328bd5 100644 --- a/nipype/utils/profiler.py +++ b/nipype/utils/profiler.py @@ -67,11 +67,14 @@ def stop(self): def _sample(self, cpu_interval=None): cpu = 0.0 - mem = 0.0 + rss = 0.0 + vms = 0.0 try: with self._process.oneshot(): cpu += self._process.cpu_percent(interval=cpu_interval) - mem += self._process.memory_info().rss + mem_info = self._process.memory_info() + rss += mem_info.rss + vms += mem_info.vms except psutil.NoSuchProcess: pass @@ -85,11 +88,13 @@ def _sample(self, cpu_interval=None): try: with child.oneshot(): cpu += child.cpu_percent() - mem += child.memory_info().rss + mem_info = child.memory_info() + rss += mem_info.rss + vms += mem_info.vms except psutil.NoSuchProcess: pass - print('%f,%f,%f' % (time(), (mem / _MB), cpu), + print('%f,%f,%f,%f' % (time(), rss / _MB, cpu, vms / _MB), file=self._logfile) self._logfile.flush() From a8a899b27cf0240d738b7f5f73e0f29c8cc5a51a Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Wed, 29 Nov 2017 14:25:09 -0500 Subject: [PATCH 591/643] ENH: Improve loop timing in DistributedPluginBase --- nipype/pipeline/plugins/base.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nipype/pipeline/plugins/base.py b/nipype/pipeline/plugins/base.py index 5bb03ef3d9..eae4e66444 100644 --- a/nipype/pipeline/plugins/base.py +++ b/nipype/pipeline/plugins/base.py @@ -128,6 +128,7 @@ def run(self, graph, config, updatehash=False): old_progress_stats = None old_presub_stats = None while not np.all(self.proc_done) or np.any(self.proc_pending): + loop_start = time() # Check to see if a job is available (jobs without dependencies not run) # See https://github.com/nipy/nipype/pull/2200#discussion_r141605722 jobs_ready = np.nonzero(~self.proc_done & (self.depidx.sum(0) == 0))[1] @@ -183,7 +184,8 @@ def run(self, graph, config, updatehash=False): elif display_stats: logger.debug('Not submitting (max jobs reached)') - sleep(poll_sleep_secs) + sleep_til = loop_start + poll_sleep_secs + sleep(max(0, sleep_til - time())) self._remove_node_dirs() report_nodes_not_run(notrun) From 89bf38ffaf70e327d477912b0ae7d556b8edd47b Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Wed, 29 Nov 2017 14:28:48 -0500 Subject: [PATCH 592/643] STY: Flake8 cleanup --- nipype/pipeline/plugins/base.py | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/nipype/pipeline/plugins/base.py b/nipype/pipeline/plugins/base.py index eae4e66444..e27733ab77 100644 --- a/nipype/pipeline/plugins/base.py +++ b/nipype/pipeline/plugins/base.py @@ -129,9 +129,10 @@ def run(self, graph, config, updatehash=False): old_presub_stats = None while not np.all(self.proc_done) or np.any(self.proc_pending): loop_start = time() - # Check to see if a job is available (jobs without dependencies not run) - # See https://github.com/nipy/nipype/pull/2200#discussion_r141605722 - jobs_ready = np.nonzero(~self.proc_done & (self.depidx.sum(0) == 0))[1] + # Check if a job is available (jobs with all dependencies run) + # https://github.com/nipy/nipype/pull/2200#discussion_r141605722 + jobs_ready = np.nonzero(~self.proc_done & + (self.depidx.sum(0) == 0))[1] progress_stats = (len(self.proc_done), np.sum(self.proc_done ^ self.proc_pending), @@ -165,7 +166,8 @@ def run(self, graph, config, updatehash=False): self._remove_node_dirs() self._clear_task(taskid) else: - assert self.proc_done[jobid] and self.proc_pending[jobid] + assert self.proc_done[jobid] and \ + self.proc_pending[jobid] toappend.insert(0, (taskid, jobid)) if toappend: @@ -273,8 +275,8 @@ def _send_procs_to_workers(self, updatehash=False, graph=None): if (num_jobs >= self.max_jobs) or (slots == 0): break - # Check to see if a job is available (jobs without dependencies not run) - # See https://github.com/nipy/nipype/pull/2200#discussion_r141605722 + # Check if a job is available (jobs with all dependencies run) + # https://github.com/nipy/nipype/pull/2200#discussion_r141605722 jobids = np.nonzero(~self.proc_done & (self.depidx.sum(0) == 0))[1] if len(jobids) > 0: @@ -327,7 +329,8 @@ def _send_procs_to_workers(self, updatehash=False, graph=None): break def _local_hash_check(self, jobid, graph): - if not str2bool(self.procs[jobid].config['execution']['local_hash_check']): + if not str2bool(self.procs[jobid].config['execution'][ + 'local_hash_check']): return False logger.debug('Checking hash (%d) locally', jobid) @@ -399,8 +402,8 @@ def _remove_node_dirs(self): """Removes directories whose outputs have already been used up """ if str2bool(self._config['execution']['remove_node_directories']): - for idx in np.nonzero( - (self.refidx.sum(axis=1) == 0).__array__())[0]: + indices = np.nonzero((self.refidx.sum(axis=1) == 0).__array__())[0] + for idx in indices: if idx in self.mapnodesubids: continue if self.proc_done[idx] and (not self.proc_pending[idx]): @@ -515,7 +518,8 @@ class GraphPluginBase(PluginBase): def __init__(self, plugin_args=None): if plugin_args and plugin_args.get('status_callback'): - logger.warning('status_callback not supported for Graph submission plugins') + logger.warning('status_callback not supported for Graph submission' + ' plugins') super(GraphPluginBase, self).__init__(plugin_args=plugin_args) def run(self, graph, config, updatehash=False): From 43537aa508108c8d6a60a60309bff56d7e717bd2 Mon Sep 17 00:00:00 2001 From: oesteban Date: Mon, 4 Dec 2017 19:18:38 -0800 Subject: [PATCH 593/643] fix import of md5 --- nipype/pipeline/engine/nodes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nipype/pipeline/engine/nodes.py b/nipype/pipeline/engine/nodes.py index dee88f522e..3564e8c7b7 100644 --- a/nipype/pipeline/engine/nodes.py +++ b/nipype/pipeline/engine/nodes.py @@ -35,14 +35,14 @@ from ... import config, logging from ...utils.misc import (flatten, unflatten, str2bool) from ...utils.filemanip import ( - save_json, FileNotFoundError, filename_to_list, list_to_filename, + md5, save_json, FileNotFoundError, filename_to_list, list_to_filename, copyfiles, fnames_presuffix, loadpkl, split_filename, load_json, makedirs, emptydirs, savepkl, write_rst_header, write_rst_dict, write_rst_list, to_str ) from ...interfaces.base import ( traits, InputMultiPath, CommandLine, Undefined, DynamicTraitedSpec, - Bunch, InterfaceResult, md5, Interface, isdefined + Bunch, InterfaceResult, Interface, isdefined ) from .utils import ( modify_paths, clean_working_directory, get_print_name, From a5f48d752e076ead8ea21d31ebc7b9685e6800f2 Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Mon, 4 Dec 2017 21:39:59 -0500 Subject: [PATCH 594/643] rss/vms_gb -> rss/vms_GiB --- nipype/interfaces/base/core.py | 4 ++-- nipype/pipeline/engine/utils.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/nipype/interfaces/base/core.py b/nipype/interfaces/base/core.py index 2a664c9f48..b23f86f2fc 100644 --- a/nipype/interfaces/base/core.py +++ b/nipype/interfaces/base/core.py @@ -530,9 +530,9 @@ def run(self, **inputs): runtime.prof_dict = { 'time': vals[:, 0].tolist(), - 'rss_gb': (vals[:, 1] / 1024).tolist(), + 'rss_GiB': (vals[:, 1] / 1024).tolist(), 'cpus': vals[:, 2].tolist(), - 'vms_gb': (vals[:, 3] / 1024).tolist(), + 'vms_GiB': (vals[:, 3] / 1024).tolist(), } return results diff --git a/nipype/pipeline/engine/utils.py b/nipype/pipeline/engine/utils.py index c87b01869d..57da5b4b24 100644 --- a/nipype/pipeline/engine/utils.py +++ b/nipype/pipeline/engine/utils.py @@ -1320,8 +1320,8 @@ def write_workflow_resources(graph, filename=None, append=None): 'time': [], 'name': [], 'interface': [], - 'rss_gb': [], - 'vms_gb': [], + 'rss_GiB': [], + 'vms_GiB': [], 'cpus': [], 'mapnode': [], 'params': [], @@ -1362,7 +1362,7 @@ def write_workflow_resources(graph, filename=None, append=None): '(mapflow %d/%d).', nodename, subidx + 1, len(rt_list)) continue - for key in ['time', 'rss_gb', 'cpus', 'vms_gb']: + for key in ['time', 'rss_GiB', 'cpus', 'vms_GiB']: big_dict[key] += runtime.prof_dict[key] big_dict['interface'] += [classname] * nsamples From a15e08600798e56bcd616cd81fc8f918e8b1b0c5 Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Tue, 5 Dec 2017 11:48:05 -0500 Subject: [PATCH 595/643] ENH: Reorder profiler columns --- nipype/interfaces/base/core.py | 4 ++-- nipype/pipeline/engine/utils.py | 2 +- nipype/utils/profiler.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/nipype/interfaces/base/core.py b/nipype/interfaces/base/core.py index b23f86f2fc..bcf2656620 100644 --- a/nipype/interfaces/base/core.py +++ b/nipype/interfaces/base/core.py @@ -530,8 +530,8 @@ def run(self, **inputs): runtime.prof_dict = { 'time': vals[:, 0].tolist(), - 'rss_GiB': (vals[:, 1] / 1024).tolist(), - 'cpus': vals[:, 2].tolist(), + 'cpus': vals[:, 1].tolist(), + 'rss_GiB': (vals[:, 2] / 1024).tolist(), 'vms_GiB': (vals[:, 3] / 1024).tolist(), } diff --git a/nipype/pipeline/engine/utils.py b/nipype/pipeline/engine/utils.py index 57da5b4b24..96ba23cd3d 100644 --- a/nipype/pipeline/engine/utils.py +++ b/nipype/pipeline/engine/utils.py @@ -1362,7 +1362,7 @@ def write_workflow_resources(graph, filename=None, append=None): '(mapflow %d/%d).', nodename, subidx + 1, len(rt_list)) continue - for key in ['time', 'rss_GiB', 'cpus', 'vms_GiB']: + for key in ['time', 'cpus', 'rss_GiB', 'vms_GiB']: big_dict[key] += runtime.prof_dict[key] big_dict['interface'] += [classname] * nsamples diff --git a/nipype/utils/profiler.py b/nipype/utils/profiler.py index 76bd328bd5..6788393cef 100644 --- a/nipype/utils/profiler.py +++ b/nipype/utils/profiler.py @@ -94,7 +94,7 @@ def _sample(self, cpu_interval=None): except psutil.NoSuchProcess: pass - print('%f,%f,%f,%f' % (time(), rss / _MB, cpu, vms / _MB), + print('%f,%f,%f,%f' % (time(), cpu, rss / _MB, vms / _MB), file=self._logfile) self._logfile.flush() From e8b7697df23dc942433035691ccef23ff9c4fe1b Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Tue, 5 Dec 2017 12:42:17 -0500 Subject: [PATCH 596/643] ENH: Profile at constant interval --- nipype/utils/profiler.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nipype/utils/profiler.py b/nipype/utils/profiler.py index 6788393cef..800b68a95f 100644 --- a/nipype/utils/profiler.py +++ b/nipype/utils/profiler.py @@ -100,9 +100,12 @@ def _sample(self, cpu_interval=None): def run(self): """Core monitoring function, called by start()""" + start_time = time() + wait_til = start_time while not self._event.is_set(): self._sample() - self._event.wait(self._freq) + wait_til += self._freq + self._event.wait(max(0, wait_til - time())) # Log node stats function From b46704f0961b1a88c61205e6be59ce846a8fb7b1 Mon Sep 17 00:00:00 2001 From: Oscar Esteban Date: Thu, 7 Dec 2017 07:55:52 -0800 Subject: [PATCH 597/643] improved hashfiles checks --- nipype/pipeline/engine/nodes.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/nipype/pipeline/engine/nodes.py b/nipype/pipeline/engine/nodes.py index 3564e8c7b7..e0caaa194a 100644 --- a/nipype/pipeline/engine/nodes.py +++ b/nipype/pipeline/engine/nodes.py @@ -275,9 +275,18 @@ def hash_exists(self, updatehash=False): logger.debug('Node hash value: %s', hashvalue) if op.exists(outdir): + # Find unfinished hashfiles and error if any + unfinished = glob(op.join(outdir, '_0x*_unfinished.json')) + if unfinished: + raise RuntimeError( + '[Caching Node Error] Found unfinished hashfiles (%d) that indicate ' + 'that the ``base_dir`` for this node went stale. Please re-run the ' + 'workflow.' % len(unfinished)) + # Find previous hashfiles hashfiles = glob(op.join(outdir, '_0x*.json')) - if len(hashfiles) > 1: # Remove hashfiles if more than one found + # Remove hashfiles if more than one found or the one found is outdated + if hashfiles and (len(hashfiles) > 1 or hashfiles[0] != hashfile): logger.info('Removing hashfiles (%s) and forcing node to rerun', ', '.join(['"%s"' % op.basename(h) for h in hashfiles])) for hf in hashfiles: From b1355065be96bec2882e2972f5151be5eba50c92 Mon Sep 17 00:00:00 2001 From: Matteo Mancini Date: Tue, 12 Dec 2017 11:00:32 -0500 Subject: [PATCH 598/643] Fixed tests --- nipype/interfaces/mrtrix3/tests/test_auto_DWIExtract.py | 3 ++- nipype/interfaces/mrtrix3/tests/test_auto_Generate5tt.py | 7 ++----- nipype/interfaces/mrtrix3/tests/test_auto_MRConvert.py | 3 ++- nipype/interfaces/mrtrix3/tests/test_auto_MRMath.py | 7 ++----- 4 files changed, 8 insertions(+), 12 deletions(-) mode change 100755 => 100644 nipype/interfaces/mrtrix3/tests/test_auto_DWIExtract.py mode change 100755 => 100644 nipype/interfaces/mrtrix3/tests/test_auto_MRConvert.py mode change 100755 => 100644 nipype/interfaces/mrtrix3/tests/test_auto_MRMath.py diff --git a/nipype/interfaces/mrtrix3/tests/test_auto_DWIExtract.py b/nipype/interfaces/mrtrix3/tests/test_auto_DWIExtract.py old mode 100755 new mode 100644 index 22e0890d2f..805b5b86b0 --- a/nipype/interfaces/mrtrix3/tests/test_auto_DWIExtract.py +++ b/nipype/interfaces/mrtrix3/tests/test_auto_DWIExtract.py @@ -17,7 +17,8 @@ def test_DWIExtract_inputs(): ), grad_fsl=dict(argstr='-fslgrad %s %s', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_bval=dict(), diff --git a/nipype/interfaces/mrtrix3/tests/test_auto_Generate5tt.py b/nipype/interfaces/mrtrix3/tests/test_auto_Generate5tt.py index 3cb2568bf2..cc98ff316e 100644 --- a/nipype/interfaces/mrtrix3/tests/test_auto_Generate5tt.py +++ b/nipype/interfaces/mrtrix3/tests/test_auto_Generate5tt.py @@ -15,15 +15,12 @@ def test_Generate5tt_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(deprecated='1.0.0', - nohash=True, - usedefault=True, - ), grad_file=dict(argstr='-grad %s', ), grad_fsl=dict(argstr='-fslgrad %s %s', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_bval=dict(), diff --git a/nipype/interfaces/mrtrix3/tests/test_auto_MRConvert.py b/nipype/interfaces/mrtrix3/tests/test_auto_MRConvert.py old mode 100755 new mode 100644 index 5dec38ed52..c1778a9ef6 --- a/nipype/interfaces/mrtrix3/tests/test_auto_MRConvert.py +++ b/nipype/interfaces/mrtrix3/tests/test_auto_MRConvert.py @@ -21,7 +21,8 @@ def test_MRConvert_inputs(): ), grad_fsl=dict(argstr='-fslgrad %s %s', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_bval=dict(), diff --git a/nipype/interfaces/mrtrix3/tests/test_auto_MRMath.py b/nipype/interfaces/mrtrix3/tests/test_auto_MRMath.py old mode 100755 new mode 100644 index ca871ce690..6b13903f0f --- a/nipype/interfaces/mrtrix3/tests/test_auto_MRMath.py +++ b/nipype/interfaces/mrtrix3/tests/test_auto_MRMath.py @@ -13,15 +13,12 @@ def test_MRMath_inputs(): environ=dict(nohash=True, usedefault=True, ), - ignore_exception=dict(deprecated='1.0.0', - nohash=True, - usedefault=True, - ), grad_file=dict(argstr='-grad %s', ), grad_fsl=dict(argstr='-fslgrad %s %s', ), - ignore_exception=dict(nohash=True, + ignore_exception=dict(deprecated='1.0.0', + nohash=True, usedefault=True, ), in_bval=dict(), From bdb340d78aba55393c44200e0f1cb32299860d14 Mon Sep 17 00:00:00 2001 From: Matteo Mancini Date: Wed, 13 Dec 2017 03:52:43 -0500 Subject: [PATCH 599/643] Removed trailing spaces --- doc/users/config_file.rst | 10 +++++----- doc/users/plugins.rst | 4 ++-- nipype/algorithms/tests/test_mesh_ops.py | 2 +- nipype/interfaces/ants/tests/test_resampling.py | 4 ++-- nipype/interfaces/cmtk/tests/test_nbs.py | 4 ++-- nipype/interfaces/niftyfit/asl.py | 2 +- nipype/pipeline/engine/tests/test_utils.py | 2 +- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/doc/users/config_file.rst b/doc/users/config_file.rst index 060549b01e..279dc1aadd 100644 --- a/doc/users/config_file.rst +++ b/doc/users/config_file.rst @@ -74,11 +74,11 @@ Execution *display_variable* Override the ``$DISPLAY`` environment variable for interfaces that require - an X server. This option is useful if there is a running X server, but - ``$DISPLAY`` was not defined in nipype's environment. For example, if an X + an X server. This option is useful if there is a running X server, but + ``$DISPLAY`` was not defined in nipype's environment. For example, if an X server is listening on the default port of 6000, set ``display_variable = :0`` - to enable nipype interfaces to use it. It may also point to displays provided - by VNC, `xnest `_ + to enable nipype interfaces to use it. It may also point to displays provided + by VNC, `xnest `_ or `Xvfb `_. If neither ``display_variable`` nor the ``$DISPLAY`` environment variable are set, nipype will try to configure a new virtual server using Xvfb. @@ -170,7 +170,7 @@ Resource Monitor Indicates where the summary file collecting all profiling information from the resource monitor should be stored after execution of a workflow. The ``summary_file`` does not apply to interfaces run independently. - (unset by default, in which case the summary file will be written out to + (unset by default, in which case the summary file will be written out to ``/resource_monitor.json`` of the top-level workflow). *summary_append* diff --git a/doc/users/plugins.rst b/doc/users/plugins.rst index 501e7aa1d6..e655e5f6db 100644 --- a/doc/users/plugins.rst +++ b/doc/users/plugins.rst @@ -82,9 +82,9 @@ Optional arguments:: exceed the total amount of resources available (memory and threads), when ``False`` (default), only a warning will be issued. - maxtasksperchild : number of nodes to run on each process before refreshing + maxtasksperchild : number of nodes to run on each process before refreshing the worker (default: 10). - + To distribute processing on a multicore machine, simply call:: diff --git a/nipype/algorithms/tests/test_mesh_ops.py b/nipype/algorithms/tests/test_mesh_ops.py index 9d510dee2b..d5fbc56825 100644 --- a/nipype/algorithms/tests/test_mesh_ops.py +++ b/nipype/algorithms/tests/test_mesh_ops.py @@ -15,7 +15,7 @@ @pytest.mark.skipif(VTKInfo.no_tvtk(), reason="tvtk is not installed") def test_ident_distances(tmpdir): - tmpdir.chdir() + tmpdir.chdir() in_surf = example_data('surf01.vtk') dist_ident = m.ComputeMeshWarp() diff --git a/nipype/interfaces/ants/tests/test_resampling.py b/nipype/interfaces/ants/tests/test_resampling.py index 22dc4446e9..509ebfe844 100644 --- a/nipype/interfaces/ants/tests/test_resampling.py +++ b/nipype/interfaces/ants/tests/test_resampling.py @@ -1,5 +1,5 @@ # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- -# vi: set ft=python sts=4 ts=4 sw=4 et: +# vi: set ft=python sts=4 ts=4 sw=4 et: from nipype.interfaces.ants import WarpImageMultiTransform, WarpTimeSeriesImageMultiTransform import os @@ -66,7 +66,7 @@ def create_wtsimt(): def test_WarpTimeSeriesImageMultiTransform(change_dir, create_wtsimt): wtsimt = create_wtsimt assert wtsimt.cmdline == 'WarpTimeSeriesImageMultiTransform 4 resting.nii resting_wtsimt.nii \ --R ants_deformed.nii.gz ants_Warp.nii.gz ants_Affine.txt' +-R ants_deformed.nii.gz ants_Warp.nii.gz ants_Affine.txt' def test_WarpTimeSeriesImageMultiTransform_invaffine(change_dir, create_wtsimt): diff --git a/nipype/interfaces/cmtk/tests/test_nbs.py b/nipype/interfaces/cmtk/tests/test_nbs.py index 0516390b02..03a7aa8619 100644 --- a/nipype/interfaces/cmtk/tests/test_nbs.py +++ b/nipype/interfaces/cmtk/tests/test_nbs.py @@ -31,12 +31,12 @@ def test_importerror(creating_graphs, tmpdir): graphlist = creating_graphs group1 = graphlist[:3] group2 = graphlist[3:] - + nbs = NetworkBasedStatistic() nbs.inputs.in_group1 = group1 nbs.inputs.in_group2 = group2 nbs.inputs.edge_key = "weight" - + with pytest.raises(ImportError) as e: nbs.run() assert "cviewer library is not available" == str(e.value) diff --git a/nipype/interfaces/niftyfit/asl.py b/nipype/interfaces/niftyfit/asl.py index 366f9a6eca..8f95a48192 100644 --- a/nipype/interfaces/niftyfit/asl.py +++ b/nipype/interfaces/niftyfit/asl.py @@ -147,7 +147,7 @@ class FitAsl(NiftyFitCommand): >>> from nipype.interfaces import niftyfit >>> node = niftyfit.FitAsl() >>> node.inputs.source_file = 'asl.nii.gz' - >>> node.cmdline + >>> node.cmdline 'fit_asl -source asl.nii.gz -cbf asl_cbf.nii.gz -error asl_error.nii.gz \ -syn asl_syn.nii.gz' diff --git a/nipype/pipeline/engine/tests/test_utils.py b/nipype/pipeline/engine/tests/test_utils.py index 34ec45cfa8..23c7a16fc6 100644 --- a/nipype/pipeline/engine/tests/test_utils.py +++ b/nipype/pipeline/engine/tests/test_utils.py @@ -23,7 +23,7 @@ def test_identitynode_removal(tmpdir): def test_function(arg1, arg2, arg3): import numpy as np return (np.array(arg1) + arg2 + arg3).tolist() - + wf = pe.Workflow(name="testidentity", base_dir=tmpdir.strpath) From 1e1dcc0c10b58e14f9a9c4d8e8f66546ddae8c6b Mon Sep 17 00:00:00 2001 From: Matteo Mancini Date: Wed, 13 Dec 2017 04:01:49 -0500 Subject: [PATCH 600/643] Removed last trailing spaces --- doc/users/config_file.rst | 10 +++++----- doc/users/plugins.rst | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/doc/users/config_file.rst b/doc/users/config_file.rst index 279dc1aadd..060549b01e 100644 --- a/doc/users/config_file.rst +++ b/doc/users/config_file.rst @@ -74,11 +74,11 @@ Execution *display_variable* Override the ``$DISPLAY`` environment variable for interfaces that require - an X server. This option is useful if there is a running X server, but - ``$DISPLAY`` was not defined in nipype's environment. For example, if an X + an X server. This option is useful if there is a running X server, but + ``$DISPLAY`` was not defined in nipype's environment. For example, if an X server is listening on the default port of 6000, set ``display_variable = :0`` - to enable nipype interfaces to use it. It may also point to displays provided - by VNC, `xnest `_ + to enable nipype interfaces to use it. It may also point to displays provided + by VNC, `xnest `_ or `Xvfb `_. If neither ``display_variable`` nor the ``$DISPLAY`` environment variable are set, nipype will try to configure a new virtual server using Xvfb. @@ -170,7 +170,7 @@ Resource Monitor Indicates where the summary file collecting all profiling information from the resource monitor should be stored after execution of a workflow. The ``summary_file`` does not apply to interfaces run independently. - (unset by default, in which case the summary file will be written out to + (unset by default, in which case the summary file will be written out to ``/resource_monitor.json`` of the top-level workflow). *summary_append* diff --git a/doc/users/plugins.rst b/doc/users/plugins.rst index e655e5f6db..501e7aa1d6 100644 --- a/doc/users/plugins.rst +++ b/doc/users/plugins.rst @@ -82,9 +82,9 @@ Optional arguments:: exceed the total amount of resources available (memory and threads), when ``False`` (default), only a warning will be issued. - maxtasksperchild : number of nodes to run on each process before refreshing + maxtasksperchild : number of nodes to run on each process before refreshing the worker (default: 10). - + To distribute processing on a multicore machine, simply call:: From e92e11296ccd4e1894ef835d431977bc67834955 Mon Sep 17 00:00:00 2001 From: Matteo Mancini Date: Wed, 13 Dec 2017 04:04:58 -0500 Subject: [PATCH 601/643] Removed last trailing spaces --- doc/users/config_file.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/users/config_file.rst b/doc/users/config_file.rst index 060549b01e..f53a2900db 100644 --- a/doc/users/config_file.rst +++ b/doc/users/config_file.rst @@ -74,11 +74,11 @@ Execution *display_variable* Override the ``$DISPLAY`` environment variable for interfaces that require - an X server. This option is useful if there is a running X server, but - ``$DISPLAY`` was not defined in nipype's environment. For example, if an X + an X server. This option is useful if there is a running X server, but + ``$DISPLAY`` was not defined in nipype's environment. For example, if an X server is listening on the default port of 6000, set ``display_variable = :0`` - to enable nipype interfaces to use it. It may also point to displays provided - by VNC, `xnest `_ + to enable nipype interfaces to use it. It may also point to displays provided + by VNC, `xnest `_ or `Xvfb `_. If neither ``display_variable`` nor the ``$DISPLAY`` environment variable are set, nipype will try to configure a new virtual server using Xvfb. From 4ac916217b6cd0bdc7cb5e00cfcbe74cee9bae40 Mon Sep 17 00:00:00 2001 From: salma1601 Date: Wed, 13 Dec 2017 11:25:36 +0100 Subject: [PATCH 602/643] quiet clfrac and t2_up parameters --- .../interfaces/afni/tests/test_auto_Unifize.py | 6 ++++++ nipype/interfaces/afni/utils.py | 16 ++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/nipype/interfaces/afni/tests/test_auto_Unifize.py b/nipype/interfaces/afni/tests/test_auto_Unifize.py index e9f5095619..e1b67ee285 100644 --- a/nipype/interfaces/afni/tests/test_auto_Unifize.py +++ b/nipype/interfaces/afni/tests/test_auto_Unifize.py @@ -6,6 +6,8 @@ def test_Unifize_inputs(): input_map = dict(args=dict(argstr='%s', ), + cl_frac=dict(argstr='-clfrac %f', + ), environ=dict(nohash=True, usedefault=True, ), @@ -33,12 +35,16 @@ def test_Unifize_inputs(): name_source='in_file', ), outputtype=dict(), + quiet=dict(argstr='-quiet', + ), rbt=dict(argstr='-rbt %f %f %f', ), scale_file=dict(argstr='-ssave %s', ), t2=dict(argstr='-T2', ), + t2_up=dict(argstr='-T2up %f', + ), terminal_output=dict(deprecated='1.0.0', nohash=True, ), diff --git a/nipype/interfaces/afni/utils.py b/nipype/interfaces/afni/utils.py index 3e03adda92..64f59040f5 100644 --- a/nipype/interfaces/afni/utils.py +++ b/nipype/interfaces/afni/utils.py @@ -2337,6 +2337,22 @@ class UnifizeInputSpec(AFNICommandInputSpec): 'b = bottom percentile of normalizing data range, [default=70.0]\n' 'r = top percentile of normalizing data range, [default=80.0]\n', argstr='-rbt %f %f %f') + t2_up = traits.Float( + desc='Option for AFNI experts only.' + 'Set the upper percentile point used for T2-T1 inversion. ' + 'Allowed to be anything between 90 and 100 (inclusive), with ' + 'default to 98.5 (for no good reason).', + argstr='-T2up %f') + cl_frac = traits.Float( + desc='Option for AFNI experts only.' + 'Set the automask \'clip level fraction\'. Must be between ' + '0.1 and 0.9. A small fraction means to make the initial ' + 'threshold for clipping (a la 3dClipLevel) smaller, which ' + 'will tend to make the mask larger. [default=0.1]', + argstr='-clfrac %f') + quiet = traits.Bool( + desc='Don\'t print the progress messages.', + argstr='-quiet') class UnifizeOutputSpec(TraitedSpec): From cbc904d1ef8c54a2924fa53ef1d38c26902486ee Mon Sep 17 00:00:00 2001 From: salma1601 Date: Wed, 13 Dec 2017 14:50:19 +0100 Subject: [PATCH 603/643] use '_unifized' as template for out_file --- nipype/interfaces/afni/tests/test_auto_Unifize.py | 1 + nipype/interfaces/afni/utils.py | 1 + 2 files changed, 2 insertions(+) diff --git a/nipype/interfaces/afni/tests/test_auto_Unifize.py b/nipype/interfaces/afni/tests/test_auto_Unifize.py index e1b67ee285..1d82e5aed5 100644 --- a/nipype/interfaces/afni/tests/test_auto_Unifize.py +++ b/nipype/interfaces/afni/tests/test_auto_Unifize.py @@ -33,6 +33,7 @@ def test_Unifize_inputs(): ), out_file=dict(argstr='-prefix %s', name_source='in_file', + name_template='%s_unifized', ), outputtype=dict(), quiet=dict(argstr='-quiet', diff --git a/nipype/interfaces/afni/utils.py b/nipype/interfaces/afni/utils.py index 64f59040f5..6ffe3d6ffa 100644 --- a/nipype/interfaces/afni/utils.py +++ b/nipype/interfaces/afni/utils.py @@ -2291,6 +2291,7 @@ class UnifizeInputSpec(AFNICommandInputSpec): exists=True, copyfile=False) out_file = File( + name_template='%s_unifized', desc='output image file name', argstr='-prefix %s', name_source='in_file') From 03a67a96f68e06b0f862a20f0a32e5e95eea10c4 Mon Sep 17 00:00:00 2001 From: salma1601 Date: Sun, 17 Dec 2017 13:42:50 +0100 Subject: [PATCH 604/643] add verbosity options --- nipype/interfaces/afni/preprocess.py | 6 ++++++ nipype/interfaces/afni/tests/test_auto_Allineate.py | 4 ++++ nipype/interfaces/afni/tests/test_auto_Copy.py | 2 ++ nipype/interfaces/afni/tests/test_auto_TCat.py | 2 ++ nipype/interfaces/afni/tests/test_auto_TStat.py | 2 ++ nipype/interfaces/afni/utils.py | 9 +++++++++ 6 files changed, 25 insertions(+) diff --git a/nipype/interfaces/afni/preprocess.py b/nipype/interfaces/afni/preprocess.py index c96616273d..7c3b3359f4 100644 --- a/nipype/interfaces/afni/preprocess.py +++ b/nipype/interfaces/afni/preprocess.py @@ -438,6 +438,12 @@ class AllineateInputSpec(AFNICommandInputSpec): traits.Enum(*_dirs), argstr='-nwarp_fixdep%s', desc='To fix non-linear warp dependency along directions.') + verb = traits.Bool( + argstr='-verb', + desc='Print out verbose progress reports.') + quiet = traits.Bool( + argstr='-quiet', + desc='Don\'t print out verbose progress reports.') class AllineateOutputSpec(TraitedSpec): diff --git a/nipype/interfaces/afni/tests/test_auto_Allineate.py b/nipype/interfaces/afni/tests/test_auto_Allineate.py index b8b79df004..0fd29f1479 100644 --- a/nipype/interfaces/afni/tests/test_auto_Allineate.py +++ b/nipype/interfaces/afni/tests/test_auto_Allineate.py @@ -95,6 +95,8 @@ def test_Allineate_inputs(): outputtype=dict(), overwrite=dict(argstr='-overwrite', ), + quiet=dict(argstr='-quiet', + ), reference=dict(argstr='-base %s', ), replacebase=dict(argstr='-replacebase', @@ -118,6 +120,8 @@ def test_Allineate_inputs(): ), usetemp=dict(argstr='-usetemp', ), + verb=dict(argstr='-verb', + ), warp_type=dict(argstr='-warp %s', ), warpfreeze=dict(argstr='-warpfreeze', diff --git a/nipype/interfaces/afni/tests/test_auto_Copy.py b/nipype/interfaces/afni/tests/test_auto_Copy.py index 0917a0628e..273cb9bbb6 100644 --- a/nipype/interfaces/afni/tests/test_auto_Copy.py +++ b/nipype/interfaces/afni/tests/test_auto_Copy.py @@ -30,6 +30,8 @@ def test_Copy_inputs(): terminal_output=dict(deprecated='1.0.0', nohash=True, ), + verb=dict(argstr='-verb', + ), ) inputs = Copy.input_spec() diff --git a/nipype/interfaces/afni/tests/test_auto_TCat.py b/nipype/interfaces/afni/tests/test_auto_TCat.py index 597ead13cb..b28f983fa7 100644 --- a/nipype/interfaces/afni/tests/test_auto_TCat.py +++ b/nipype/interfaces/afni/tests/test_auto_TCat.py @@ -32,6 +32,8 @@ def test_TCat_inputs(): terminal_output=dict(deprecated='1.0.0', nohash=True, ), + verb=dict(argstr='-verb', + ), ) inputs = TCat.input_spec() diff --git a/nipype/interfaces/afni/tests/test_auto_TStat.py b/nipype/interfaces/afni/tests/test_auto_TStat.py index 2315d81512..f2a0bc561b 100644 --- a/nipype/interfaces/afni/tests/test_auto_TStat.py +++ b/nipype/interfaces/afni/tests/test_auto_TStat.py @@ -33,6 +33,8 @@ def test_TStat_inputs(): terminal_output=dict(deprecated='1.0.0', nohash=True, ), + verbose=dict(argstr='-verb %s', + ), ) inputs = TStat.input_spec() diff --git a/nipype/interfaces/afni/utils.py b/nipype/interfaces/afni/utils.py index 3e03adda92..0a71ea340a 100644 --- a/nipype/interfaces/afni/utils.py +++ b/nipype/interfaces/afni/utils.py @@ -751,6 +751,9 @@ class CopyInputSpec(AFNICommandInputSpec): argstr='%s', position=-1, name_source='in_file') + verb = traits.Bool( + desc='print progress reports', + argstr='-verb') class Copy(AFNICommand): @@ -1377,6 +1380,9 @@ class MaskToolInputSpec(AFNICommandInputSpec): 'or using the labels in {R,L,A,P,I,S}.', argstr='-fill_dirs %s', requires=['fill_holes']) + verbose = traits.Int( + desc='specify verbosity level, for 0 to 3', + argstr='-verb %s') class MaskToolOutputSpec(TraitedSpec): @@ -1985,6 +1991,9 @@ class TCatInputSpec(AFNICommandInputSpec): 'dataset mean back in. Option -rlt++ adds overall mean of all ' 'dataset timeseries back in.', position=1) + verb = traits.Bool( + desc='Print out some verbose output as the program', + argstr='-verb') class TCat(AFNICommand): From a9099ed219d8aa9171f527db6bcdb553bf6a4c6e Mon Sep 17 00:00:00 2001 From: salma1601 Date: Sun, 17 Dec 2017 13:47:29 +0100 Subject: [PATCH 605/643] update MaskTool test --- nipype/interfaces/afni/tests/test_auto_MaskTool.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nipype/interfaces/afni/tests/test_auto_MaskTool.py b/nipype/interfaces/afni/tests/test_auto_MaskTool.py index 775b34adab..eeaef55562 100644 --- a/nipype/interfaces/afni/tests/test_auto_MaskTool.py +++ b/nipype/interfaces/afni/tests/test_auto_MaskTool.py @@ -49,6 +49,8 @@ def test_MaskTool_inputs(): ), union=dict(argstr='-union', ), + verbose=dict(argstr='-verb %s', + ), ) inputs = MaskTool.input_spec() From 6e487b76968b0b177c7efd7a8c3c3945c22d51db Mon Sep 17 00:00:00 2001 From: salma1601 Date: Sun, 17 Dec 2017 13:47:52 +0100 Subject: [PATCH 606/643] update Tstat test --- nipype/interfaces/afni/tests/test_auto_TStat.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/nipype/interfaces/afni/tests/test_auto_TStat.py b/nipype/interfaces/afni/tests/test_auto_TStat.py index f2a0bc561b..2315d81512 100644 --- a/nipype/interfaces/afni/tests/test_auto_TStat.py +++ b/nipype/interfaces/afni/tests/test_auto_TStat.py @@ -33,8 +33,6 @@ def test_TStat_inputs(): terminal_output=dict(deprecated='1.0.0', nohash=True, ), - verbose=dict(argstr='-verb %s', - ), ) inputs = TStat.input_spec() From 6829757e45360fec94c0d7aefe80f02d8f2c444a Mon Sep 17 00:00:00 2001 From: salma1601 Date: Mon, 18 Dec 2017 16:56:17 +0100 Subject: [PATCH 607/643] rather use verbose than verb --- nipype/interfaces/afni/preprocess.py | 4 ++-- nipype/interfaces/afni/tests/test_auto_Allineate.py | 2 +- nipype/interfaces/afni/tests/test_auto_Copy.py | 2 +- nipype/interfaces/afni/tests/test_auto_TCat.py | 2 +- nipype/interfaces/afni/utils.py | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/nipype/interfaces/afni/preprocess.py b/nipype/interfaces/afni/preprocess.py index 7c3b3359f4..5d90591953 100644 --- a/nipype/interfaces/afni/preprocess.py +++ b/nipype/interfaces/afni/preprocess.py @@ -438,12 +438,12 @@ class AllineateInputSpec(AFNICommandInputSpec): traits.Enum(*_dirs), argstr='-nwarp_fixdep%s', desc='To fix non-linear warp dependency along directions.') - verb = traits.Bool( + verbose = traits.Bool( argstr='-verb', desc='Print out verbose progress reports.') quiet = traits.Bool( argstr='-quiet', - desc='Don\'t print out verbose progress reports.') + desc="Don't print out verbose progress reports.") class AllineateOutputSpec(TraitedSpec): diff --git a/nipype/interfaces/afni/tests/test_auto_Allineate.py b/nipype/interfaces/afni/tests/test_auto_Allineate.py index 0fd29f1479..73ecc66414 100644 --- a/nipype/interfaces/afni/tests/test_auto_Allineate.py +++ b/nipype/interfaces/afni/tests/test_auto_Allineate.py @@ -120,7 +120,7 @@ def test_Allineate_inputs(): ), usetemp=dict(argstr='-usetemp', ), - verb=dict(argstr='-verb', + verbose=dict(argstr='-verb', ), warp_type=dict(argstr='-warp %s', ), diff --git a/nipype/interfaces/afni/tests/test_auto_Copy.py b/nipype/interfaces/afni/tests/test_auto_Copy.py index 273cb9bbb6..43fa537eb4 100644 --- a/nipype/interfaces/afni/tests/test_auto_Copy.py +++ b/nipype/interfaces/afni/tests/test_auto_Copy.py @@ -30,7 +30,7 @@ def test_Copy_inputs(): terminal_output=dict(deprecated='1.0.0', nohash=True, ), - verb=dict(argstr='-verb', + verbose=dict(argstr='-verb', ), ) inputs = Copy.input_spec() diff --git a/nipype/interfaces/afni/tests/test_auto_TCat.py b/nipype/interfaces/afni/tests/test_auto_TCat.py index b28f983fa7..f74a122828 100644 --- a/nipype/interfaces/afni/tests/test_auto_TCat.py +++ b/nipype/interfaces/afni/tests/test_auto_TCat.py @@ -32,7 +32,7 @@ def test_TCat_inputs(): terminal_output=dict(deprecated='1.0.0', nohash=True, ), - verb=dict(argstr='-verb', + verbose=dict(argstr='-verb', ), ) inputs = TCat.input_spec() diff --git a/nipype/interfaces/afni/utils.py b/nipype/interfaces/afni/utils.py index 0a71ea340a..bce63c61e0 100644 --- a/nipype/interfaces/afni/utils.py +++ b/nipype/interfaces/afni/utils.py @@ -751,7 +751,7 @@ class CopyInputSpec(AFNICommandInputSpec): argstr='%s', position=-1, name_source='in_file') - verb = traits.Bool( + verbose = traits.Bool( desc='print progress reports', argstr='-verb') @@ -1991,7 +1991,7 @@ class TCatInputSpec(AFNICommandInputSpec): 'dataset mean back in. Option -rlt++ adds overall mean of all ' 'dataset timeseries back in.', position=1) - verb = traits.Bool( + verbose = traits.Bool( desc='Print out some verbose output as the program', argstr='-verb') From c3ccafe47abad8cf8974e11b387f448e507752c8 Mon Sep 17 00:00:00 2001 From: Matteo Mancini Date: Tue, 19 Dec 2017 11:54:26 -0500 Subject: [PATCH 608/643] Minor fixes (style) --- nipype/interfaces/mrtrix3/preprocess.py | 8 ++++---- nipype/interfaces/mrtrix3/reconst.py | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/nipype/interfaces/mrtrix3/preprocess.py b/nipype/interfaces/mrtrix3/preprocess.py index 0ef19d763b..0eedc3f449 100644 --- a/nipype/interfaces/mrtrix3/preprocess.py +++ b/nipype/interfaces/mrtrix3/preprocess.py @@ -23,7 +23,7 @@ class ResponseSDInputSpec(MRTrix3BaseInputSpec): algorithm = traits.Enum('msmt_5tt','dhollander','tournier','tax', argstr='%s', position=-6, mandatory=True, desc='response estimation algorithm (multi-tissue)') - dwi_file = File(exists=True, argstr='%s', position=-5, + in_file = File(exists=True, argstr='%s', position=-5, mandatory=True, desc='input DWI image') mtt_file = File(argstr='%s', position=-4, desc='input 5tt image') wm_file = File('wm.txt', argstr='%s', position=-3, usedefault=True, @@ -52,7 +52,7 @@ class ResponseSD(MRTrix3Base): >>> import nipype.interfaces.mrtrix3 as mrt >>> resp = mrt.ResponseSD() - >>> resp.inputs.dwi_file = 'dwi.mif' + >>> resp.inputs.in_file = 'dwi.mif' >>> resp.inputs.algorithm = 'tournier' >>> resp.inputs.grad_fsl = ('bvecs', 'bvals') >>> resp.cmdline # doctest: +ELLIPSIS @@ -67,9 +67,9 @@ class ResponseSD(MRTrix3Base): def _list_outputs(self): outputs = self.output_spec().get() outputs['wm_file'] = op.abspath(self.inputs.wm_file) - if self.inputs.gm_file!=Undefined: + if self.inputs.gm_file != Undefined: outputs['gm_file'] = op.abspath(self.inputs.gm_file) - if self.inputs.csf_file!=Undefined: + if self.inputs.csf_file != Undefined: outputs['csf_file'] = op.abspath(self.inputs.csf_file) return outputs diff --git a/nipype/interfaces/mrtrix3/reconst.py b/nipype/interfaces/mrtrix3/reconst.py index a5ce55b506..f7ea4f01e4 100644 --- a/nipype/interfaces/mrtrix3/reconst.py +++ b/nipype/interfaces/mrtrix3/reconst.py @@ -76,7 +76,7 @@ def _list_outputs(self): class EstimateFODInputSpec(MRTrix3BaseInputSpec): algorithm = traits.Enum('csd','msmt_csd', argstr='%s', position=-8, mandatory=True, desc='FOD algorithm') - dwi_file = File(exists=True, argstr='%s', position=-7, + in_file = File(exists=True, argstr='%s', position=-7, mandatory=True, desc='input DWI image') wm_txt = File(argstr='%s', position=-6, mandatory=True, desc='WM response text file') @@ -118,7 +118,7 @@ class EstimateFOD(MRTrix3Base): >>> import nipype.interfaces.mrtrix3 as mrt >>> fod = mrt.EstimateFOD() >>> fod.inputs.algorithm = 'csd' - >>> fod.inputs.dwi_file = 'dwi.mif' + >>> fod.inputs.in_file = 'dwi.mif' >>> fod.inputs.wm_txt = 'wm.txt' >>> fod.inputs.grad_fsl = ('bvecs', 'bvals') >>> fod.cmdline # doctest: +ELLIPSIS @@ -133,9 +133,9 @@ class EstimateFOD(MRTrix3Base): def _list_outputs(self): outputs = self.output_spec().get() outputs['wm_odf'] = op.abspath(self.inputs.wm_odf) - if self.inputs.gm_odf!=Undefined: + if self.inputs.gm_odf != Undefined: outputs['gm_odf'] = op.abspath(self.inputs.gm_odf) - if self.inputs.csf_odf!=Undefined: + if self.inputs.csf_odf != Undefined: outputs['csf_odf'] = op.abspath(self.inputs.csf_odf) return outputs From 119730769173e4a97aa13cfddfea2daad3b06017 Mon Sep 17 00:00:00 2001 From: Matteo Mancini Date: Tue, 19 Dec 2017 12:01:44 -0500 Subject: [PATCH 609/643] Minor fixes (tests) --- nipype/interfaces/mrtrix3/tests/test_auto_EstimateFOD.py | 8 ++++---- nipype/interfaces/mrtrix3/tests/test_auto_ResponseSD.py | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/nipype/interfaces/mrtrix3/tests/test_auto_EstimateFOD.py b/nipype/interfaces/mrtrix3/tests/test_auto_EstimateFOD.py index b1836bd6d9..a62c21d989 100644 --- a/nipype/interfaces/mrtrix3/tests/test_auto_EstimateFOD.py +++ b/nipype/interfaces/mrtrix3/tests/test_auto_EstimateFOD.py @@ -18,10 +18,6 @@ def test_EstimateFOD_inputs(): csf_txt=dict(argstr='%s', position=-2, ), - dwi_file=dict(argstr='%s', - mandatory=True, - position=-7, - ), environ=dict(nohash=True, usedefault=True, ), @@ -44,6 +40,10 @@ def test_EstimateFOD_inputs(): ), in_dirs=dict(argstr='-directions %s', ), + in_file=dict(argstr='%s', + mandatory=True, + position=-7, + ), mask_file=dict(argstr='-mask %s', ), max_sh=dict(argstr='-lmax %d', diff --git a/nipype/interfaces/mrtrix3/tests/test_auto_ResponseSD.py b/nipype/interfaces/mrtrix3/tests/test_auto_ResponseSD.py index 0917f5d6a3..ff93d1a8a9 100644 --- a/nipype/interfaces/mrtrix3/tests/test_auto_ResponseSD.py +++ b/nipype/interfaces/mrtrix3/tests/test_auto_ResponseSD.py @@ -15,10 +15,6 @@ def test_ResponseSD_inputs(): csf_file=dict(argstr='%s', position=-1, ), - dwi_file=dict(argstr='%s', - mandatory=True, - position=-5, - ), environ=dict(nohash=True, usedefault=True, ), @@ -36,6 +32,10 @@ def test_ResponseSD_inputs(): in_bval=dict(), in_bvec=dict(argstr='-fslgrad %s %s', ), + in_file=dict(argstr='%s', + mandatory=True, + position=-5, + ), in_mask=dict(argstr='-mask %s', ), max_sh=dict(argstr='-lmax %d', From a98420289882924b3aed8f9c5dda63ac2e0fe703 Mon Sep 17 00:00:00 2001 From: oesteban Date: Thu, 21 Dec 2017 15:53:40 -0800 Subject: [PATCH 610/643] wip - refactoring --- nipype/pipeline/engine/nodes.py | 882 +++++++++++++++++--------------- 1 file changed, 473 insertions(+), 409 deletions(-) diff --git a/nipype/pipeline/engine/nodes.py b/nipype/pipeline/engine/nodes.py index e0caaa194a..900b9db0fd 100644 --- a/nipype/pipeline/engine/nodes.py +++ b/nipype/pipeline/engine/nodes.py @@ -149,38 +149,41 @@ def __init__(self, interface, name, iterables=None, itersource=None, multiprocessing pool """ - base_dir = None - if 'base_dir' in kwargs: - base_dir = kwargs['base_dir'] - super(Node, self).__init__(name, base_dir) - # Make sure an interface is set, and that it is an Interface if interface is None: raise IOError('Interface must be provided') if not isinstance(interface, Interface): raise IOError('interface must be an instance of an Interface') + + base_dir = None + if 'base_dir' in kwargs: + base_dir = kwargs['base_dir'] + super(Node, self).__init__(name, base_dir) + self._interface = interface self.name = name - + self._got_inputs = False self._output_dir = None self.iterables = iterables self.synchronize = synchronize self.itersource = itersource self.overwrite = overwrite self.parameterization = None - self.run_without_submitting = run_without_submitting self.input_source = {} - self.needed_outputs = [] self.plugin_args = {} + self.run_without_submitting = run_without_submitting self._mem_gb = mem_gb self._n_procs = n_procs + + # Downstream n_procs if hasattr(self._interface.inputs, 'num_threads') and self._n_procs is not None: self._interface.inputs.num_threads = self._n_procs + # Initialize needed_outputs + self.needed_outputs = [] if needed_outputs: self.needed_outputs = sorted(needed_outputs) - self._got_inputs = False @property def interface(self): @@ -189,7 +192,7 @@ def interface(self): @property def result(self): - return self._load_resultfile(self.output_dir())[0] + return _load_resultfile(self.output_dir(), self.name)[0] @property def inputs(self): @@ -246,7 +249,7 @@ def output_dir(self): if self.parameterization: params_str = ['{}'.format(p) for p in self.parameterization] if not str2bool(self.config['execution']['parameterize_dirs']): - params_str = [self._parameterization_dir(p) for p in params_str] + params_str = [_parameterization_dir(p) for p in params_str] outputdir = op.join(outputdir, *params_str) self._output_dir = op.abspath(op.join(outputdir, self.name)) @@ -254,7 +257,7 @@ def output_dir(self): def set_input(self, parameter, val): """ Set interface input value""" - logger.debug('setting nodelevel(%s) input %s = %s', + logger.debug('[Node] %s - setting input %s = %s', self.name, parameter, to_str(val)) setattr(self.inputs, parameter, deepcopy(val)) @@ -267,36 +270,63 @@ def help(self): self._interface.help() def hash_exists(self, updatehash=False): + """ + Check if the interface has been run previously, and whether + cached results are viable for reuse + """ + # Get a dictionary with hashed filenames and a hashvalue # of the dictionary itself. hashed_inputs, hashvalue = self._get_hashval() outdir = self.output_dir() hashfile = op.join(outdir, '_0x%s.json' % hashvalue) - logger.debug('Node hash value: %s', hashvalue) + hash_exists = op.exists(hashfile) + + logger.debug('[Node] hash value=%s, exists=%s', hashvalue, hash_exists) if op.exists(outdir): + # Find previous hashfiles + hashfiles = glob(op.join(outdir, '_0x*.json')) + if len(hashfiles) > 1: + raise RuntimeError( + '[Node] Cache ERROR - Found %d previous hashfiles that indicate ' + 'that the ``base_dir`` for this node went stale. Please re-run the ' + 'workflow.' % len(hashfiles)) + # Find unfinished hashfiles and error if any unfinished = glob(op.join(outdir, '_0x*_unfinished.json')) if unfinished: raise RuntimeError( - '[Caching Node Error] Found unfinished hashfiles (%d) that indicate ' + '[Node] Cache ERROR - Found unfinished hashfiles (%d) that indicate ' 'that the ``base_dir`` for this node went stale. Please re-run the ' 'workflow.' % len(unfinished)) - # Find previous hashfiles - hashfiles = glob(op.join(outdir, '_0x*.json')) - # Remove hashfiles if more than one found or the one found is outdated - if hashfiles and (len(hashfiles) > 1 or hashfiles[0] != hashfile): - logger.info('Removing hashfiles (%s) and forcing node to rerun', - ', '.join(['"%s"' % op.basename(h) for h in hashfiles])) - for hf in hashfiles: - os.remove(hf) + # Remove outdated hashfile + if hashfiles and hashfiles[0] != hashfile: + logger.info('[Node] Removing outdated hashfile (%s) and forcing node to rerun', + op.basename(hashfiles[0])) - if updatehash: - logger.debug("Updating hash: %s", hashvalue) - self._save_hashfile(hashfile, hashed_inputs) + # In DEBUG, print diff between hashes + log_debug = config.get('logging', 'workflow_level') == 'DEBUG' + if log_debug and hash_exists: # Lazy logging - only debug + split_out = split_filename(hashfiles[0]) + exp_hash_file_base = split_out[1] + exp_hash = exp_hash_file_base[len('_0x'):] + logger.debug("Previous node hash = %s", exp_hash) + try: + prev_inputs = load_json(hashfiles[0]) + except Exception: + pass + else: + logging.logdebug_dict_differences( + prev_inputs, hashed_inputs) + os.remove(hashfiles[0]) + + # Update only possible if it exists + if hash_exists and updatehash: + logger.debug("[Node] Updating hash: %s", hashvalue) + _save_hashfile(hashfile, hashed_inputs) - hash_exists = op.exists(hashfile) logger.debug( 'updatehash=%s, overwrite=%s, always_run=%s, hash_exists=%s, ' 'hash_method=%s', updatehash, self.overwrite, self._interface.always_run, @@ -312,15 +342,11 @@ def run(self, updatehash=False): updatehash: boolean Update the hash stored in the output directory """ - cwd = os.getcwd() # First thing, keep track of where we are if self.config is None: self.config = {} self.config = merge_dict(deepcopy(config._sections), self.config) - - if not self._got_inputs: - self._get_inputs() - self._got_inputs = True + self._get_inputs() # Check if output directory exists outdir = self.output_dir() @@ -328,18 +354,14 @@ def run(self, updatehash=False): logger.debug('Output directory (%s) exists and is %sempty,', outdir, 'not ' * bool(os.listdir(outdir))) - # Make sure outdir is created - makedirs(outdir, exist_ok=True) - os.chdir(outdir) - # Check hash, check whether run should be enforced logger.info('[Node] Setting-up "%s" in "%s".', self.fullname, outdir) hash_info = self.hash_exists(updatehash=updatehash) hash_exists, hashvalue, hashfile, hashed_inputs = hash_info force_run = self.overwrite or (self.overwrite is None and self._interface.always_run) - # If the node is cached, set-up pklz files and exit - if updatehash or (hash_exists and not force_run): + # If the node is cached, check on pklz files and finish + if hash_exists and (updatehash or not force_run): logger.debug("Only updating node hashes or skipping execution") inputs_file = op.join(outdir, '_inputs.pklz') if not op.exists(inputs_file): @@ -351,34 +373,14 @@ def run(self, updatehash=False): logger.debug('Creating node file %s', node_file) savepkl(node_file, self) - self._run_interface(execute=False, updatehash=updatehash) - logger.info('[Node] Cached "%s".', self.fullname) - os.chdir(cwd) - return self.result + result = self._run_interface(execute=False, updatehash=updatehash) + logger.info('[Node] "%s" found cached%s.', self.fullname, + ' (and hash updated)' * updatehash) + return result # by rerunning we mean only nodes that did finish to run previously - json_pat = op.join(outdir, '_0x*.json') - json_unfinished_pat = op.join(outdir, '_0x*_unfinished.json') - is_mapnode = isinstance(self, MapNode) - need_rerun = (not is_mapnode and - glob(json_pat) and not glob(json_unfinished_pat)) - if need_rerun: - log_debug = config.get('logging', 'workflow_level') == 'DEBUG' + if hash_exists and not isinstance(self, MapNode): logger.debug('[Node] Rerunning "%s"', self.fullname) - if log_debug and not hash_exists: # Lazy logging - only debug - exp_hash_paths = glob(json_pat) - if len(exp_hash_paths) == 1: - split_out = split_filename(exp_hash_paths[0]) - exp_hash_file_base = split_out[1] - exp_hash = exp_hash_file_base[len('_0x'):] - logger.debug("Previous node hash = %s", exp_hash) - try: - prev_inputs = load_json(exp_hash_paths[0]) - except: - pass - else: - logging.logdebug_dict_differences(prev_inputs, - hashed_inputs) if not force_run and str2bool(self.config['execution']['stop_on_first_rerun']): raise Exception('Cannot rerun when "stop_on_first_rerun" is set to True') @@ -389,60 +391,51 @@ def run(self, updatehash=False): os.remove(hashfile) # Delete directory contents if this is not a MapNode or can't resume - rm_outdir = not is_mapnode and not ( + rm_outdir = not isinstance(self, MapNode) and not ( self._interface.can_resume and op.isfile(hashfile_unfinished)) if rm_outdir: emptydirs(outdir) else: - logger.debug( - "%s hashfile=%s", '[MapNode] Resume -' if is_mapnode - else '[Node] Resume - can_resume=True,', hashfile_unfinished) - if is_mapnode: + logger.debug('[%sNode] Resume - hashfile=%s', + 'Map' * int(isinstance(self, MapNode)), + hashfile_unfinished) + if isinstance(self, MapNode): # remove old json files for filename in glob(op.join(outdir, '_0x*.json')): os.remove(filename) + # Make sure outdir is created + makedirs(outdir, exist_ok=True) + # Store runtime-hashfile, pre-execution report, the node and the inputs set. - self._save_hashfile(hashfile_unfinished, hashed_inputs) - self.write_report(report_type='preexec', cwd=outdir) + _save_hashfile(hashfile_unfinished, hashed_inputs) + write_report(self, report_type='preexec', cwd=outdir) savepkl(op.join(outdir, '_node.pklz'), self) savepkl(op.join(outdir, '_inputs.pklz'), self.inputs.get_traitsfree()) + + cwd = os.getcwd() + os.chdir(outdir) try: - self._run_interface(execute=True) - except: + result = self._run_interface(execute=True) + except Exception: logger.warning('[Node] Exception "%s" (%s)', self.fullname, outdir) # Tear-up after error os.remove(hashfile_unfinished) - os.chdir(cwd) raise + finally: # Ensure we come back to the original CWD + os.chdir(cwd) # Tear-up after success shutil.move(hashfile_unfinished, hashfile) - self.write_report(report_type='postexec', cwd=outdir) + write_report(self, report_type='postexec', cwd=outdir) logger.info('[Node] Finished "%s".', self.fullname) - os.chdir(cwd) - return self.result - - # Private functions - def _parameterization_dir(self, param): - """ - Returns the directory name for the given parameterization string as follows: - - If the parameterization is longer than 32 characters, then - return the SHA-1 hex digest. - - Otherwise, return the parameterization unchanged. - """ - if len(param) > 32: - return sha1(param.encode()).hexdigest() - else: - return param + return result def _get_hashval(self): """Return a hash of the input state""" - if not self._got_inputs: - self._get_inputs() - self._got_inputs = True + self._get_inputs() hashed_inputs, hashvalue = self.inputs.get_hashval( hash_method=self.config['execution']['hash_method']) rm_extra = self.config['execution']['remove_unnecessary_outputs'] @@ -455,30 +448,15 @@ def _get_hashval(self): hashed_inputs.append(('needed_outputs', sorted_outputs)) return hashed_inputs, hashvalue - def _save_hashfile(self, hashfile, hashed_inputs): - try: - save_json(hashfile, hashed_inputs) - except (IOError, TypeError): - err_type = sys.exc_info()[0] - if err_type is TypeError: - # XXX - SG current workaround is to just - # create the hashed file and not put anything - # in it - with open(hashfile, 'wt') as fd: - fd.writelines(str(hashed_inputs)) - - logger.debug( - 'Unable to write a particular type to the json file') - else: - logger.critical('Unable to open the file in write mode: %s', - hashfile) - def _get_inputs(self): """Retrieve inputs from pointers to results file This mechanism can be easily extended/replaced to retrieve data from other data sources (e.g., XNAT, HTTP, etc.,.) """ + if self._got_inputs: + return + logger.debug('Setting node inputs') for key, info in list(self.input_source.items()): logger.debug('input: %s', key) @@ -490,9 +468,8 @@ def _get_inputs(self): output_name = info[1][0] value = getattr(results.outputs, output_name) if isdefined(value): - output_value = evaluate_connect_function(info[1][1], - info[1][2], - value) + output_value = evaluate_connect_function( + info[1][1], info[1][2], value) else: output_name = info[1] try: @@ -511,85 +488,16 @@ def _get_inputs(self): e.args = (e.args[0] + "\n" + '\n'.join(msg),) raise + # Successfully set inputs + self._got_inputs = True + def _run_interface(self, execute=True, updatehash=False): if updatehash: - return + return self._load_results(self.output_dir()) return self._run_command(execute) - def _save_results(self, result, cwd): - resultsfile = op.join(cwd, 'result_%s.pklz' % self.name) - if result.outputs: - try: - outputs = result.outputs.get() - except TypeError: - outputs = result.outputs.dictcopy() # outputs was a bunch - result.outputs.set(**modify_paths(outputs, relative=True, - basedir=cwd)) - - savepkl(resultsfile, result) - logger.debug('saved results in %s', resultsfile) - - if result.outputs: - result.outputs.set(**outputs) - - def _load_resultfile(self, cwd): - """Load results if it exists in cwd - - Parameter - --------- - - cwd : working directory of node - - Returns - ------- - - result : InterfaceResult structure - aggregate : boolean indicating whether node should aggregate_outputs - attribute error : boolean indicating whether there was some mismatch in - versions of traits used to store result and hence node needs to - rerun - """ - aggregate = True - resultsoutputfile = op.join(cwd, 'result_%s.pklz' % self.name) - result = None - attribute_error = False - if op.exists(resultsoutputfile): - pkl_file = gzip.open(resultsoutputfile, 'rb') - try: - result = pickle.load(pkl_file) - except UnicodeDecodeError: - # Was this pickle created with Python 2.x? - pickle.load(pkl_file, fix_imports=True, encoding='utf-8') - logger.warn('Successfully loaded pickle in compatibility mode') - except (traits.TraitError, AttributeError, ImportError, - EOFError) as err: - if isinstance(err, (AttributeError, ImportError)): - attribute_error = True - logger.debug('attribute error: %s probably using ' - 'different trait pickled file', str(err)) - else: - logger.debug( - 'some file does not exist. hence trait cannot be set') - else: - if result.outputs: - try: - outputs = result.outputs.get() - except TypeError: - outputs = result.outputs.dictcopy() # outputs == Bunch - try: - result.outputs.set(**modify_paths(outputs, - relative=False, - basedir=cwd)) - except FileNotFoundError: - logger.debug('conversion to full path results in ' - 'non existent file') - aggregate = False - pkl_file.close() - logger.debug('Aggregate: %s', aggregate) - return result, aggregate, attribute_error - def _load_results(self, cwd): - result, aggregate, attribute_error = self._load_resultfile(cwd) + result, aggregate, attribute_error = _load_resultfile(cwd, self.name) # try aggregating first if aggregate: logger.debug('aggregating results') @@ -609,176 +517,122 @@ def _load_results(self, cwd): runtime=runtime, inputs=self._interface.inputs.get_traitsfree(), outputs=aggouts) - self._save_results(result, cwd) + _save_resultfile(result, cwd, self.name) else: logger.debug('aggregating mapnode results') result = self._run_interface() return result def _run_command(self, execute, copyfiles=True): - cwd = os.getcwd() - if execute and copyfiles: + outdir = self.output_dir() + + if not execute: + try: + result = self._load_results(outdir) + except (FileNotFoundError, AttributeError): + # if aggregation does not work, rerun the node + logger.info("[Node] Some of the outputs were not found: " + "rerunning node.") + copyfiles = False # OE: this was like this before, + execute = True # I'll keep them for safety + else: + logger.info( + "[Node] Cached - collecting precomputed outputs") + return result + + # Run command: either execute is true or load_results failed. + runtime = Bunch(returncode=1, + environ=dict(os.environ), + hostname=socket.gethostname()) + result = InterfaceResult( + interface=self._interface.__class__, + runtime=runtime, + inputs=self._interface.inputs.get_traitsfree()) + + if copyfiles: self._originputs = deepcopy(self._interface.inputs) - if execute: - runtime = Bunch(returncode=1, - environ=dict(os.environ), - hostname=socket.gethostname()) - result = InterfaceResult( - interface=self._interface.__class__, - runtime=runtime, - inputs=self._interface.inputs.get_traitsfree()) - - if copyfiles: - self._copyfiles_to_wd(cwd, execute) - - message = '[Node] Running "%s" ("%s.%s")' - if issubclass(self._interface.__class__, CommandLine): - try: - cmd = self._interface.cmdline - except Exception as msg: - result.runtime.stderr = msg - raise - cmdfile = op.join(cwd, 'command.txt') - with open(cmdfile, 'wt') as fd: - print(cmd + "\n", file=fd) - message += ', a CommandLine Interface with command:\n%s' % cmd - logger.info(message + '.', self.name, self._interface.__module__, - self._interface.__class__.__name__) + self._copyfiles_to_wd(outdir, execute) + + message = '[Node] Running "%s" ("%s.%s")' + if issubclass(self._interface.__class__, CommandLine): try: - result = self._interface.run() + cmd = self._interface.cmdline except Exception as msg: - self._save_results(result, cwd) result.runtime.stderr = msg raise + cmdfile = op.join(outdir, 'command.txt') + with open(cmdfile, 'wt') as fd: + print(cmd + "\n", file=fd) + message += ', a CommandLine Interface with command:\n%s' % cmd + logger.info(message, self.name, self._interface.__module__, + self._interface.__class__.__name__) + try: + result = self._interface.run() + except Exception as msg: + _save_resultfile(result, outdir, self.name) + result.runtime.stderr = msg + raise - dirs2keep = None - if isinstance(self, MapNode): - dirs2keep = [op.join(cwd, 'mapflow')] - result.outputs = clean_working_directory(result.outputs, cwd, - self._interface.inputs, - self.needed_outputs, - self.config, - dirs2keep=dirs2keep) - self._save_results(result, cwd) - else: - logger.info("Collecting precomputed outputs") - try: - result = self._load_results(cwd) - except (FileNotFoundError, AttributeError): - # if aggregation does not work, rerun the node - logger.info(("Some of the outputs were not found: " - "rerunning node.")) - result = self._run_command(execute=True, copyfiles=False) - return result + dirs2keep = None + if isinstance(self, MapNode): + dirs2keep = [op.join(outdir, 'mapflow')] + result.outputs = clean_working_directory(result.outputs, outdir, + self._interface.inputs, + self.needed_outputs, + self.config, + dirs2keep=dirs2keep) + _save_resultfile(result, outdir, self.name) - def _strip_temp(self, files, wd): - out = [] - for f in files: - if isinstance(f, list): - out.append(self._strip_temp(f, wd)) - else: - out.append(f.replace(op.join(wd, '_tempinput'), wd)) - return out + return result def _copyfiles_to_wd(self, outdir, execute, linksonly=False): """ copy files over and change the inputs""" - if hasattr(self._interface, '_get_filecopy_info'): - logger.debug('copying files to wd [execute=%s, linksonly=%s]', - str(execute), str(linksonly)) - if execute and linksonly: - olddir = outdir - outdir = op.join(outdir, '_tempinput') - makedirs(outdir, exist_ok=True) - for info in self._interface._get_filecopy_info(): - files = self.inputs.get().get(info['key']) - if not isdefined(files): - continue - if files: - infiles = filename_to_list(files) - if execute: - if linksonly: - if not info['copy']: - newfiles = copyfiles(infiles, - [outdir], - copy=info['copy'], - create_new=True) - else: - newfiles = fnames_presuffix(infiles, - newpath=outdir) - newfiles = self._strip_temp( - newfiles, - op.abspath(olddir).split(op.sep)[-1]) - else: - newfiles = copyfiles(infiles, - [outdir], - copy=info['copy'], - create_new=True) + if not hasattr(self._interface, '_get_filecopy_info'): + # Nothing to be done + return + + logger.debug('copying files to wd [execute=%s, linksonly=%s]', + execute, linksonly) + if execute and linksonly: + olddir = outdir + outdir = op.join(outdir, '_tempinput') + makedirs(outdir, exist_ok=True) + + for info in self._interface._get_filecopy_info(): + files = self.inputs.get().get(info['key']) + if not isdefined(files) or not files: + continue + + infiles = filename_to_list(files) + if execute: + if linksonly: + if not info['copy']: + newfiles = copyfiles(infiles, + [outdir], + copy=info['copy'], + create_new=True) else: - newfiles = fnames_presuffix(infiles, newpath=outdir) - if not isinstance(files, list): - newfiles = list_to_filename(newfiles) - setattr(self.inputs, info['key'], newfiles) - if execute and linksonly: - rmtree(outdir) + newfiles = fnames_presuffix(infiles, + newpath=outdir) + newfiles = _strip_temp( + newfiles, + op.abspath(olddir).split(op.sep)[-1]) + else: + newfiles = copyfiles(infiles, + [outdir], + copy=info['copy'], + create_new=True) + else: + newfiles = fnames_presuffix(infiles, newpath=outdir) + if not isinstance(files, list): + newfiles = list_to_filename(newfiles) + setattr(self.inputs, info['key'], newfiles) + if execute and linksonly: + rmtree(outdir) def update(self, **opts): self.inputs.update(**opts) - def write_report(self, report_type=None, cwd=None): - if not str2bool(self.config['execution']['create_report']): - return - report_dir = op.join(cwd, '_report') - report_file = op.join(report_dir, 'report.rst') - makedirs(report_dir, exist_ok=True) - - if report_type == 'preexec': - logger.debug('writing pre-exec report to %s', report_file) - fp = open(report_file, 'wt') - fp.writelines(write_rst_header('Node: %s' % get_print_name(self), - level=0)) - fp.writelines(write_rst_list(['Hierarchy : %s' % self.fullname, - 'Exec ID : %s' % self._id])) - fp.writelines(write_rst_header('Original Inputs', level=1)) - fp.writelines(write_rst_dict(self.inputs.get())) - if report_type == 'postexec': - logger.debug('writing post-exec report to %s', report_file) - fp = open(report_file, 'at') - fp.writelines(write_rst_header('Execution Inputs', level=1)) - fp.writelines(write_rst_dict(self.inputs.get())) - exit_now = (not hasattr(self.result, 'outputs') or - self.result.outputs is None) - if exit_now: - return - fp.writelines(write_rst_header('Execution Outputs', level=1)) - if isinstance(self.result.outputs, Bunch): - fp.writelines(write_rst_dict(self.result.outputs.dictcopy())) - elif self.result.outputs: - fp.writelines(write_rst_dict(self.result.outputs.get())) - if isinstance(self, MapNode): - fp.close() - return - fp.writelines(write_rst_header('Runtime info', level=1)) - # Init rst dictionary of runtime stats - rst_dict = {'hostname': self.result.runtime.hostname, - 'duration': self.result.runtime.duration} - # Try and insert memory/threads usage if available - if config.resource_monitor: - rst_dict['mem_peak_gb'] = self.result.runtime.mem_peak_gb - rst_dict['cpu_percent'] = self.result.runtime.cpu_percent - - if hasattr(self.result.runtime, 'cmdline'): - rst_dict['command'] = self.result.runtime.cmdline - fp.writelines(write_rst_dict(rst_dict)) - else: - fp.writelines(write_rst_dict(rst_dict)) - if hasattr(self.result.runtime, 'merged'): - fp.writelines(write_rst_header('Terminal output', level=2)) - fp.writelines(write_rst_list(self.result.runtime.merged)) - if hasattr(self.result.runtime, 'environ'): - fp.writelines(write_rst_header('Environment', level=2)) - fp.writelines(write_rst_dict(self.result.runtime.environ)) - fp.close() - class JoinNode(Node): """Wraps interface objects that join inputs into a list. @@ -1099,9 +953,7 @@ def _set_mapnode_input(self, object, name, newvalue): def _get_hashval(self): """ Compute hash including iterfield lists.""" - if not self._got_inputs: - self._get_inputs() - self._got_inputs = True + self._get_inputs() self._check_iterfield() hashinputs = deepcopy(self._interface.inputs) for name in self.iterfield: @@ -1147,7 +999,7 @@ def _make_nodes(self, cwd=None): else: nitems = len(filename_to_list(getattr(self.inputs, self.iterfield[0]))) for i in range(nitems): - nodename = '_' + self.name + str(i) + nodename = '_%s%d' % (self.name, i) node = Node(deepcopy(self._interface), n_procs=self._n_procs, mem_gb=self._mem_gb, @@ -1169,20 +1021,6 @@ def _make_nodes(self, cwd=None): node.config = self.config yield i, node - def _node_runner(self, nodes, updatehash=False): - old_cwd = os.getcwd() - for i, node in nodes: - err = None - try: - node.run(updatehash=updatehash) - except Exception as this_err: - err = this_err - if str2bool(self.config['execution']['stop_on_first_crash']): - raise - finally: - os.chdir(old_cwd) - yield i, node, err - def _collate_results(self, nodes): result = InterfaceResult( interface=[], runtime=[], provenance=[], inputs=[], @@ -1235,43 +1073,14 @@ def _collate_results(self, nodes): return result - def write_report(self, report_type=None, cwd=None): - if not str2bool(self.config['execution']['create_report']): - return - if report_type == 'preexec': - super(MapNode, self).write_report(report_type=report_type, cwd=cwd) - if report_type == 'postexec': - super(MapNode, self).write_report(report_type=report_type, cwd=cwd) - report_dir = op.join(cwd, '_report') - report_file = op.join(report_dir, 'report.rst') - fp = open(report_file, 'at') - fp.writelines(write_rst_header('Subnode reports', level=1)) - nitems = len(filename_to_list( - getattr(self.inputs, self.iterfield[0]))) - subnode_report_files = [] - for i in range(nitems): - nodename = '_' + self.name + str(i) - subnode_report_files.insert(i, 'subnode %d' % i + ' : ' + - op.join(cwd, - 'mapflow', - nodename, - '_report', - 'report.rst')) - fp.writelines(write_rst_list(subnode_report_files)) - fp.close() - def get_subnodes(self): - if not self._got_inputs: - self._get_inputs() - self._got_inputs = True + self._get_inputs() self._check_iterfield() - self.write_report(report_type='preexec', cwd=self.output_dir()) + write_report(self, report_type='preexec', cwd=self.output_dir()) return [node for _, node in self._make_nodes()] def num_subnodes(self): - if not self._got_inputs: - self._get_inputs() - self._got_inputs = True + self._get_inputs() self._check_iterfield() if self._serial: return 1 @@ -1314,30 +1123,285 @@ def _run_interface(self, execute=True, updatehash=False): This is primarily intended for serial execution of mapnode. A parallel execution requires creation of new nodes that can be spawned """ - old_cwd = os.getcwd() - cwd = self.output_dir() - os.chdir(cwd) self._check_iterfield() - if execute: - if self.nested: - nitems = len(filename_to_list(flatten(getattr(self.inputs, - self.iterfield[0])))) + cwd = self.output_dir() + if not execute: + result = self._load_results(cwd) + return result + + # Set up mapnode folder names + if self.nested: + nitems = len(filename_to_list(flatten(getattr(self.inputs, + self.iterfield[0])))) + else: + nitems = len(filename_to_list(getattr(self.inputs, + self.iterfield[0]))) + nnametpl = '_%s{}' % self.name + nodenames = [nnametpl.format(i) for i in range(nitems)] + + # Run mapnode + result = self._collate_results(self._node_runner( + self._make_nodes(cwd), + updatehash=updatehash, + stop_first=str2bool(self.config['execution']['stop_on_first_crash']) + )) + # And store results + _save_resultfile(result, cwd, self.name) + # remove any node directories no longer required + dirs2remove = [] + for path in glob(op.join(cwd, 'mapflow', '*')): + if op.isdir(path): + if path.split(op.sep)[-1] not in nodenames: + dirs2remove.append(path) + for path in dirs2remove: + shutil.rmtree(path) + + return result + + +def _parameterization_dir(param): + """ + Returns the directory name for the given parameterization string as follows: + - If the parameterization is longer than 32 characters, then + return the SHA-1 hex digest. + - Otherwise, return the parameterization unchanged. + """ + if len(param) > 32: + return sha1(param.encode()).hexdigest() + else: + return param + + +def _save_hashfile(hashfile, hashed_inputs): + try: + save_json(hashfile, hashed_inputs) + except (IOError, TypeError): + err_type = sys.exc_info()[0] + if err_type is TypeError: + # XXX - SG current workaround is to just + # create the hashed file and not put anything + # in it + with open(hashfile, 'wt') as fd: + fd.writelines(str(hashed_inputs)) + + logger.debug( + 'Unable to write a particular type to the json file') + else: + logger.critical('Unable to open the file in write mode: %s', + hashfile) + + +def _node_runner(nodes, updatehash=False, stop_first=False): + """ + A generator that iterates and over a list of ``nodes`` and + executes them. + + """ + for i, node in nodes: + err = None + try: + result = node.run(updatehash=updatehash) + except Exception as this_err: + err = this_err + if stop_first: + raise + finally: + yield i, result, err + + +def write_report(node, report_type=None, cwd=None): + if not str2bool(node.config['execution']['create_report']): + return + + if cwd is None: + cwd = node.output_dir() + + if report_type not in ['preexec', 'postexec']: + logger.warning('[Node] Unknown report type "%s".', report_type) + return + + report_dir = op.join(cwd, '_report') + report_file = op.join(report_dir, 'report.rst') + makedirs(report_dir, exist_ok=True) + + logger.debug('[Node] Writing %s-exec report to "%s"', + report_type[:-4], report_file) + if report_type.startswith('pre'): + lines = [ + write_rst_header('Node: %s' % get_print_name(node), level=0), + write_rst_list(['Hierarchy : %s' % node.fullname, + 'Exec ID : %s' % node._id]), + write_rst_header('Original Inputs', level=1), + write_rst_dict(node.inputs.get()), + ] + with open(report_file, 'wt') as fp: + fp.write('\n'.join(lines)) + return + + lines = [ + write_rst_header('Execution Inputs', level=1), + write_rst_dict(node.inputs.get()), + ] + + result = node.result # Locally cache result + outputs = result.get('outputs') + + if outputs is None: + with open(report_file, 'at') as fp: + fp.write('\n'.join(lines)) + return + + lines.append(write_rst_header('Execution Outputs', level=1)) + + if isinstance(outputs, Bunch): + lines.append(write_rst_dict(outputs.dictcopy())) + elif outputs: + lines.append(write_rst_dict(outputs.get())) + + if isinstance(node, MapNode): + lines.append(write_rst_header('Subnode reports', level=1)) + nitems = len(filename_to_list( + getattr(node.inputs, node.iterfield[0]))) + subnode_report_files = [] + for i in range(nitems): + nodecwd = op.join( + cwd, 'mapflow', '_%s%d' % (node.name, i), + '_report', 'report.rst') + subnode_report_files.append( + 'subnode %d : %s' % (i, nodecwd)) + + lines.append(write_rst_list(subnode_report_files)) + + with open(report_file, 'at') as fp: + fp.write('\n'.join(lines)) + return + + lines.append(write_rst_header('Runtime info', level=1)) + # Init rst dictionary of runtime stats + rst_dict = { + 'hostname': result.runtime.hostname, + 'duration': result.runtime.duration, + } + + if hasattr(result.runtime, 'cmdline'): + rst_dict['command'] = result.runtime.cmdline + + # Try and insert memory/threads usage if available + if node.config.resource_monitor: + rst_dict['mem_peak_gb'] = result.runtime.mem_peak_gb + rst_dict['cpu_percent'] = result.runtime.cpu_percent + + lines.append(write_rst_dict(rst_dict)) + + # Collect terminal output + if hasattr(result.runtime, 'merged'): + lines += [ + write_rst_header('Terminal output', level=2), + write_rst_list(result.runtime.merged), + ] + if hasattr(result.runtime, 'stdout'): + lines += [ + write_rst_header('Terminal - standard output', level=2), + write_rst_list(result.runtime.stdout), + ] + if hasattr(result.runtime, 'stderr'): + lines += [ + write_rst_header('Terminal - standard error', level=2), + write_rst_list(result.runtime.stderr), + ] + + # Store environment + if hasattr(result.runtime, 'environ'): + lines += [ + write_rst_header('Environment', level=2), + write_rst_dict(result.runtime.environ), + ] + + with open(report_file, 'at') as fp: + fp.write('\n'.join(lines)) + return + + +def _save_resultfile(result, cwd, name): + """Save a result pklz file to ``cwd``""" + resultsfile = op.join(cwd, 'result_%s.pklz' % name) + if result.outputs: + try: + outputs = result.outputs.get() + except TypeError: + outputs = result.outputs.dictcopy() # outputs was a bunch + result.outputs.set(**modify_paths( + outputs, relative=True, basedir=cwd)) + + savepkl(resultsfile, result) + logger.debug('saved results in %s', resultsfile) + + if result.outputs: + result.outputs.set(**outputs) + + +def _load_resultfile(cwd, name): + """Load results if it exists in cwd + + Parameter + --------- + + cwd : working directory of node + + Returns + ------- + + result : InterfaceResult structure + aggregate : boolean indicating whether node should aggregate_outputs + attribute error : boolean indicating whether there was some mismatch in + versions of traits used to store result and hence node needs to + rerun + """ + aggregate = True + resultsoutputfile = op.join(cwd, 'result_%s.pklz' % name) + result = None + attribute_error = False + if op.exists(resultsoutputfile): + pkl_file = gzip.open(resultsoutputfile, 'rb') + try: + result = pickle.load(pkl_file) + except UnicodeDecodeError: + # Was this pickle created with Python 2.x? + pickle.load(pkl_file, fix_imports=True, encoding='utf-8') + logger.warn('Successfully loaded pickle in compatibility mode') + except (traits.TraitError, AttributeError, ImportError, + EOFError) as err: + if isinstance(err, (AttributeError, ImportError)): + attribute_error = True + logger.debug('attribute error: %s probably using ' + 'different trait pickled file', str(err)) else: - nitems = len(filename_to_list(getattr(self.inputs, - self.iterfield[0]))) - nodenames = ['_' + self.name + str(i) for i in range(nitems)] - result = self._collate_results( - self._node_runner(self._make_nodes(cwd), - updatehash=updatehash)) - self._save_results(result, cwd) - # remove any node directories no longer required - dirs2remove = [] - for path in glob(op.join(cwd, 'mapflow', '*')): - if op.isdir(path): - if path.split(op.sep)[-1] not in nodenames: - dirs2remove.append(path) - for path in dirs2remove: - shutil.rmtree(path) + logger.debug( + 'some file does not exist. hence trait cannot be set') else: - result = self._load_results(cwd) - os.chdir(old_cwd) + if result.outputs: + try: + outputs = result.outputs.get() + except TypeError: + outputs = result.outputs.dictcopy() # outputs == Bunch + try: + result.outputs.set(**modify_paths(outputs, + relative=False, + basedir=cwd)) + except FileNotFoundError: + logger.debug('conversion to full path results in ' + 'non existent file') + aggregate = False + pkl_file.close() + logger.debug('Aggregate: %s', aggregate) + return result, aggregate, attribute_error + + +def _strip_temp(files, wd): + out = [] + for f in files: + if isinstance(f, list): + out.append(_strip_temp(f, wd)) + else: + out.append(f.replace(op.join(wd, '_tempinput'), wd)) + return out From e975626d57a43dc946a4d6420500ace94000d91f Mon Sep 17 00:00:00 2001 From: oesteban Date: Thu, 21 Dec 2017 19:27:51 -0800 Subject: [PATCH 611/643] fix emptydirs --- nipype/pipeline/engine/nodes.py | 2 +- nipype/utils/filemanip.py | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/nipype/pipeline/engine/nodes.py b/nipype/pipeline/engine/nodes.py index 900b9db0fd..4ad5fbca45 100644 --- a/nipype/pipeline/engine/nodes.py +++ b/nipype/pipeline/engine/nodes.py @@ -395,7 +395,7 @@ def run(self, updatehash=False): self._interface.can_resume and op.isfile(hashfile_unfinished)) if rm_outdir: - emptydirs(outdir) + emptydirs(outdir, noexist_ok=True) else: logger.debug('[%sNode] Resume - hashfile=%s', 'Map' * int(isinstance(self, MapNode)), diff --git a/nipype/utils/filemanip.py b/nipype/utils/filemanip.py index adc2752f56..5ffefc1af1 100644 --- a/nipype/utils/filemanip.py +++ b/nipype/utils/filemanip.py @@ -699,9 +699,10 @@ def makedirs(path, exist_ok=False): return path -def emptydirs(path): +def emptydirs(path, noexist_ok=False): """ - Empty an existing directory, without deleting it + Empty an existing directory, without deleting it. Do not + raise error if the path does not exist and noexist_ok is True. Parameters ---------- @@ -709,8 +710,11 @@ def emptydirs(path): """ fmlogger.debug("Removing contents of %s", path) - pathconts = os.listdir(path) + if noexist_ok and not os.path.exists(path): + return True + + pathconts = os.listdir(path) if not pathconts: return True From 73ec692d98faf51689564ed3cc8747bf87ce5283 Mon Sep 17 00:00:00 2001 From: oesteban Date: Thu, 21 Dec 2017 20:07:45 -0800 Subject: [PATCH 612/643] fix write_report --- nipype/pipeline/engine/nodes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nipype/pipeline/engine/nodes.py b/nipype/pipeline/engine/nodes.py index 4ad5fbca45..33b9a24cbc 100644 --- a/nipype/pipeline/engine/nodes.py +++ b/nipype/pipeline/engine/nodes.py @@ -1244,7 +1244,7 @@ def write_report(node, report_type=None, cwd=None): ] result = node.result # Locally cache result - outputs = result.get('outputs') + outputs = result.outputs if outputs is None: with open(report_file, 'at') as fp: From ead00d703c24add30330df12a068b4d618f107f4 Mon Sep 17 00:00:00 2001 From: oesteban Date: Fri, 22 Dec 2017 14:12:46 -0800 Subject: [PATCH 613/643] refactor nodes --- nipype/pipeline/engine/nodes.py | 438 +++++--------------- nipype/pipeline/engine/tests/test_engine.py | 1 - nipype/pipeline/engine/utils.py | 313 ++++++++++++-- nipype/pipeline/engine/workflows.py | 7 - nipype/utils/filemanip.py | 124 ++++-- 5 files changed, 458 insertions(+), 425 deletions(-) diff --git a/nipype/pipeline/engine/nodes.py b/nipype/pipeline/engine/nodes.py index 33b9a24cbc..34aa2028d3 100644 --- a/nipype/pipeline/engine/nodes.py +++ b/nipype/pipeline/engine/nodes.py @@ -19,25 +19,22 @@ from collections import OrderedDict -from copy import deepcopy -import pickle -from glob import glob -import gzip import os import os.path as op import shutil import socket -from shutil import rmtree -import sys +from copy import deepcopy +from glob import glob + from tempfile import mkdtemp -from hashlib import sha1 +from future import standard_library from ... import config, logging from ...utils.misc import (flatten, unflatten, str2bool) from ...utils.filemanip import ( - md5, save_json, FileNotFoundError, filename_to_list, list_to_filename, + md5, FileNotFoundError, filename_to_list, list_to_filename, copyfiles, fnames_presuffix, loadpkl, split_filename, load_json, makedirs, - emptydirs, savepkl, write_rst_header, write_rst_dict, write_rst_list, to_str + emptydirs, savepkl, to_str ) from ...interfaces.base import ( @@ -45,19 +42,26 @@ Bunch, InterfaceResult, Interface, isdefined ) from .utils import ( - modify_paths, clean_working_directory, get_print_name, + _parameterization_dir, + save_hashfile as _save_hashfile, + load_resultfile as _load_resultfile, + save_resultfile as _save_resultfile, + nodelist_runner as _node_runner, + strip_temp as _strip_temp, + write_report, + clean_working_directory, merge_dict, evaluate_connect_function ) from .base import EngineBase -from future import standard_library standard_library.install_aliases() logger = logging.getLogger('workflow') class Node(EngineBase): - """Wraps interface objects for use in pipeline + """ + Wraps interface objects for use in pipeline A Node creates a sandbox-like directory for executing the underlying interface. It will copy or link inputs into this directory to ensure that @@ -155,14 +159,13 @@ def __init__(self, interface, name, iterables=None, itersource=None, if not isinstance(interface, Interface): raise IOError('interface must be an instance of an Interface') - base_dir = None - if 'base_dir' in kwargs: - base_dir = kwargs['base_dir'] - super(Node, self).__init__(name, base_dir) + super(Node, self).__init__(name, kwargs.get('base_dir')) - self._interface = interface self.name = name + self._interface = interface + self._hierarchy = None self._got_inputs = False + self._originputs = None self._output_dir = None self.iterables = iterables self.synchronize = synchronize @@ -192,6 +195,7 @@ def interface(self): @property def result(self): + """Get result from result file (do not hold it in memory)""" return _load_resultfile(self.output_dir(), self.name)[0] @property @@ -219,11 +223,11 @@ def n_procs(self): """Get the estimated number of processes/threads""" if self._n_procs is not None: return self._n_procs - elif hasattr(self._interface.inputs, 'num_threads') and isdefined( - self._interface.inputs.num_threads): + if hasattr(self._interface.inputs, + 'num_threads') and isdefined(self._interface.inputs.num_threads): return self._interface.inputs.num_threads - else: - return 1 + + return 1 @n_procs.setter def n_procs(self, value): @@ -295,7 +299,8 @@ def hash_exists(self, updatehash=False): # Find unfinished hashfiles and error if any unfinished = glob(op.join(outdir, '_0x*_unfinished.json')) - if unfinished: + + if unfinished and updatehash: raise RuntimeError( '[Node] Cache ERROR - Found unfinished hashfiles (%d) that indicate ' 'that the ``base_dir`` for this node went stale. Please re-run the ' @@ -410,7 +415,8 @@ def run(self, updatehash=False): # Store runtime-hashfile, pre-execution report, the node and the inputs set. _save_hashfile(hashfile_unfinished, hashed_inputs) - write_report(self, report_type='preexec', cwd=outdir) + write_report(self, report_type='preexec', + is_mapnode=isinstance(self, MapNode)) savepkl(op.join(outdir, '_node.pklz'), self) savepkl(op.join(outdir, '_inputs.pklz'), self.inputs.get_traitsfree()) @@ -429,7 +435,8 @@ def run(self, updatehash=False): # Tear-up after success shutil.move(hashfile_unfinished, hashfile) - write_report(self, report_type='postexec', cwd=outdir) + write_report(self, report_type='postexec', + is_mapnode=isinstance(self, MapNode)) logger.info('[Node] Finished "%s".', self.fullname) return result @@ -493,10 +500,11 @@ def _get_inputs(self): def _run_interface(self, execute=True, updatehash=False): if updatehash: - return self._load_results(self.output_dir()) + return self._load_results() return self._run_command(execute) - def _load_results(self, cwd): + def _load_results(self): + cwd = self.output_dir() result, aggregate, attribute_error = _load_resultfile(cwd, self.name) # try aggregating first if aggregate: @@ -505,7 +513,7 @@ def _load_results(self, cwd): old_inputs = loadpkl(op.join(cwd, '_inputs.pklz')) self.inputs.trait_set(**old_inputs) if not isinstance(self, MapNode): - self._copyfiles_to_wd(cwd, True, linksonly=True) + self._copyfiles_to_wd(linksonly=True) aggouts = self._interface.aggregate_outputs( needed_outputs=self.needed_outputs) runtime = Bunch(cwd=cwd, @@ -524,11 +532,10 @@ def _load_results(self, cwd): return result def _run_command(self, execute, copyfiles=True): - outdir = self.output_dir() if not execute: try: - result = self._load_results(outdir) + result = self._load_results() except (FileNotFoundError, AttributeError): # if aggregation does not work, rerun the node logger.info("[Node] Some of the outputs were not found: " @@ -549,16 +556,19 @@ def _run_command(self, execute, copyfiles=True): runtime=runtime, inputs=self._interface.inputs.get_traitsfree()) + outdir = self.output_dir() if copyfiles: - self._originputs = deepcopy(self._interface.inputs) - self._copyfiles_to_wd(outdir, execute) + self._originputs = deepcopy(self.interface.inputs) + self._copyfiles_to_wd(execute=execute) message = '[Node] Running "%s" ("%s.%s")' if issubclass(self._interface.__class__, CommandLine): try: cmd = self._interface.cmdline except Exception as msg: - result.runtime.stderr = msg + result.runtime.stderr = '%s\n\n%s' % ( + getattr(result.runtime, 'stderr', ''), msg) + _save_resultfile(result, outdir, self.name) raise cmdfile = op.join(outdir, 'command.txt') with open(cmdfile, 'wt') as fd: @@ -569,23 +579,27 @@ def _run_command(self, execute, copyfiles=True): try: result = self._interface.run() except Exception as msg: + result.runtime.stderr = '%s\n\n%s' % ( + getattr(result.runtime, 'stderr', ''), msg) _save_resultfile(result, outdir, self.name) - result.runtime.stderr = msg raise dirs2keep = None if isinstance(self, MapNode): dirs2keep = [op.join(outdir, 'mapflow')] - result.outputs = clean_working_directory(result.outputs, outdir, - self._interface.inputs, - self.needed_outputs, - self.config, - dirs2keep=dirs2keep) + + result.outputs = clean_working_directory( + result.outputs, outdir, + self._interface.inputs, + self.needed_outputs, + self.config, + dirs2keep=dirs2keep + ) _save_resultfile(result, outdir, self.name) return result - def _copyfiles_to_wd(self, outdir, execute, linksonly=False): + def _copyfiles_to_wd(self, execute=True, linksonly=False): """ copy files over and change the inputs""" if not hasattr(self._interface, '_get_filecopy_info'): # Nothing to be done @@ -593,12 +607,14 @@ def _copyfiles_to_wd(self, outdir, execute, linksonly=False): logger.debug('copying files to wd [execute=%s, linksonly=%s]', execute, linksonly) + + outdir = self.output_dir() if execute and linksonly: olddir = outdir outdir = op.join(outdir, '_tempinput') makedirs(outdir, exist_ok=True) - for info in self._interface._get_filecopy_info(): + for info in self.interface._get_filecopy_info(): files = self.inputs.get().get(info['key']) if not isdefined(files) or not files: continue @@ -628,9 +644,10 @@ def _copyfiles_to_wd(self, outdir, execute, linksonly=False): newfiles = list_to_filename(newfiles) setattr(self.inputs, info['key'], newfiles) if execute and linksonly: - rmtree(outdir) + emptydirs(outdir, noexist_ok=True) def update(self, **opts): + """Update inputs""" self.inputs.update(**opts) @@ -684,7 +701,8 @@ def __init__(self, interface, name, joinsource, joinfield=None, """ super(JoinNode, self).__init__(interface, name, **kwargs) - self.joinsource = joinsource + self._joinsource = None # The member should be defined + self.joinsource = joinsource # Let the setter do the job """the join predecessor iterable node""" if not joinfield: @@ -759,7 +777,7 @@ def _add_join_item_field(self, field, index): Return the new field name """ # the new field name - name = self._join_item_field_name(field, index) + name = "%sJ%d" % (field, index + 1) # make a copy of the join trait trait = self._inputs.trait(field, False, True) # add the join item trait to the override traits @@ -767,10 +785,6 @@ def _add_join_item_field(self, field, index): return name - def _join_item_field_name(self, field, index): - """Return the field suffixed by the index + 1""" - return "%sJ%d" % (field, index + 1) - def _override_join_traits(self, basetraits, fields): """Convert the given join fields to accept an input that is a list item rather than a list. Non-join fields @@ -846,13 +860,14 @@ def _collate_input_value(self, field): basetrait = self._interface.inputs.trait(field) if isinstance(basetrait.trait_type, traits.Set): return set(val) - elif self._unique: + + if self._unique: return list(OrderedDict.fromkeys(val)) - else: - return val + + return val def _slot_value(self, field, index): - slot_field = self._join_item_field_name(field, index) + slot_field = "%sJ%d" % (field, index + 1) try: return getattr(self._inputs, slot_field) except AttributeError as e: @@ -894,10 +909,11 @@ def __init__(self, interface, iterfield, name, serial=False, nested=False, **kwa serial : boolean flag to enforce executing the jobs of the mapnode in a serial manner rather than parallel - nested : boolea - support for nested lists, if set the input list will be flattened - before running, and the nested list structure of the outputs will - be resored + nested : boolean + support for nested lists. If set, the input list will be flattened + before running and the nested list structure of the outputs will + be resored. + See Node docstring for additional keyword arguments. """ @@ -941,9 +957,9 @@ def set_input(self, parameter, val): """ logger.debug('setting nodelevel(%s) input %s = %s', to_str(self), parameter, to_str(val)) - self._set_mapnode_input(self.inputs, parameter, deepcopy(val)) + self._set_mapnode_input(parameter, deepcopy(val)) - def _set_mapnode_input(self, object, name, newvalue): + def _set_mapnode_input(self, name, newvalue): logger.debug('setting mapnode(%s) input: %s -> %s', to_str(self), name, to_str(newvalue)) if name in self.iterfield: @@ -988,8 +1004,6 @@ def inputs(self): def outputs(self): if self._interface._outputs(): return Bunch(self._interface._outputs().get()) - else: - return None def _make_nodes(self, cwd=None): if cwd is None: @@ -1011,6 +1025,7 @@ def _make_nodes(self, cwd=None): node.plugin_args = self.plugin_args node._interface.inputs.trait_set( **deepcopy(self._interface.inputs.get())) + node.interface.resource_monitor = self._interface.resource_monitor for field in self.iterfield: if self.nested: fieldvals = flatten(filename_to_list(getattr(self.inputs, field))) @@ -1022,20 +1037,22 @@ def _make_nodes(self, cwd=None): yield i, node def _collate_results(self, nodes): - result = InterfaceResult( + finalresult = InterfaceResult( interface=[], runtime=[], provenance=[], inputs=[], outputs=self.outputs) returncode = [] - for i, node, err in nodes: - result.runtime.insert(i, None) - if node.result: - if hasattr(node.result, 'runtime'): - result.interface.insert(i, node.result.interface) - result.inputs.insert(i, node.result.inputs) - result.runtime[i] = node.result.runtime - if hasattr(node.result, 'provenance'): - result.provenance.insert(i, node.result.provenance) + for i, nresult, err in nodes: + finalresult.runtime.insert(i, None) returncode.insert(i, err) + + if nresult: + if hasattr(nresult, 'runtime'): + finalresult.interface.insert(i, nresult.interface) + finalresult.inputs.insert(i, nresult.inputs) + finalresult.runtime[i] = nresult.runtime + if hasattr(nresult, 'provenance'): + finalresult.provenance.insert(i, nresult.provenance) + if self.outputs: for key, _ in list(self.outputs.items()): rm_extra = (self.config['execution'] @@ -1043,52 +1060,52 @@ def _collate_results(self, nodes): if str2bool(rm_extra) and self.needed_outputs: if key not in self.needed_outputs: continue - values = getattr(result.outputs, key) + values = getattr(finalresult.outputs, key) if not isdefined(values): values = [] - if node.result.outputs: - values.insert(i, node.result.outputs.get()[key]) + if nresult and nresult.outputs: + values.insert(i, nresult.outputs.get()[key]) else: values.insert(i, None) defined_vals = [isdefined(val) for val in values] - if any(defined_vals) and result.outputs: - setattr(result.outputs, key, values) + if any(defined_vals) and finalresult.outputs: + setattr(finalresult.outputs, key, values) if self.nested: for key, _ in list(self.outputs.items()): - values = getattr(result.outputs, key) + values = getattr(finalresult.outputs, key) if isdefined(values): values = unflatten(values, filename_to_list( getattr(self.inputs, self.iterfield[0]))) - setattr(result.outputs, key, values) + setattr(finalresult.outputs, key, values) if returncode and any([code is not None for code in returncode]): msg = [] for i, code in enumerate(returncode): if code is not None: msg += ['Subnode %d failed' % i] - msg += ['Error:', str(code)] + msg += ['Error: %s' % str(code)] raise Exception('Subnodes of node: %s failed:\n%s' % (self.name, '\n'.join(msg))) - return result + return finalresult def get_subnodes(self): + """Generate subnodes of a mapnode and write pre-execution report""" self._get_inputs() self._check_iterfield() - write_report(self, report_type='preexec', cwd=self.output_dir()) + write_report(self, report_type='preexec', is_mapnode=True) return [node for _, node in self._make_nodes()] def num_subnodes(self): + """Get the number of subnodes to iterate in this MapNode""" self._get_inputs() self._check_iterfield() if self._serial: return 1 - else: - if self.nested: - return len(filename_to_list(flatten(getattr(self.inputs, self.iterfield[0])))) - else: - return len(filename_to_list(getattr(self.inputs, self.iterfield[0]))) + if self.nested: + return len(filename_to_list(flatten(getattr(self.inputs, self.iterfield[0])))) + return len(filename_to_list(getattr(self.inputs, self.iterfield[0]))) def _get_inputs(self): old_inputs = self._inputs.get() @@ -1126,8 +1143,7 @@ def _run_interface(self, execute=True, updatehash=False): self._check_iterfield() cwd = self.output_dir() if not execute: - result = self._load_results(cwd) - return result + return self._load_results() # Set up mapnode folder names if self.nested: @@ -1140,7 +1156,7 @@ def _run_interface(self, execute=True, updatehash=False): nodenames = [nnametpl.format(i) for i in range(nitems)] # Run mapnode - result = self._collate_results(self._node_runner( + result = self._collate_results(_node_runner( self._make_nodes(cwd), updatehash=updatehash, stop_first=str2bool(self.config['execution']['stop_on_first_crash']) @@ -1157,251 +1173,3 @@ def _run_interface(self, execute=True, updatehash=False): shutil.rmtree(path) return result - - -def _parameterization_dir(param): - """ - Returns the directory name for the given parameterization string as follows: - - If the parameterization is longer than 32 characters, then - return the SHA-1 hex digest. - - Otherwise, return the parameterization unchanged. - """ - if len(param) > 32: - return sha1(param.encode()).hexdigest() - else: - return param - - -def _save_hashfile(hashfile, hashed_inputs): - try: - save_json(hashfile, hashed_inputs) - except (IOError, TypeError): - err_type = sys.exc_info()[0] - if err_type is TypeError: - # XXX - SG current workaround is to just - # create the hashed file and not put anything - # in it - with open(hashfile, 'wt') as fd: - fd.writelines(str(hashed_inputs)) - - logger.debug( - 'Unable to write a particular type to the json file') - else: - logger.critical('Unable to open the file in write mode: %s', - hashfile) - - -def _node_runner(nodes, updatehash=False, stop_first=False): - """ - A generator that iterates and over a list of ``nodes`` and - executes them. - - """ - for i, node in nodes: - err = None - try: - result = node.run(updatehash=updatehash) - except Exception as this_err: - err = this_err - if stop_first: - raise - finally: - yield i, result, err - - -def write_report(node, report_type=None, cwd=None): - if not str2bool(node.config['execution']['create_report']): - return - - if cwd is None: - cwd = node.output_dir() - - if report_type not in ['preexec', 'postexec']: - logger.warning('[Node] Unknown report type "%s".', report_type) - return - - report_dir = op.join(cwd, '_report') - report_file = op.join(report_dir, 'report.rst') - makedirs(report_dir, exist_ok=True) - - logger.debug('[Node] Writing %s-exec report to "%s"', - report_type[:-4], report_file) - if report_type.startswith('pre'): - lines = [ - write_rst_header('Node: %s' % get_print_name(node), level=0), - write_rst_list(['Hierarchy : %s' % node.fullname, - 'Exec ID : %s' % node._id]), - write_rst_header('Original Inputs', level=1), - write_rst_dict(node.inputs.get()), - ] - with open(report_file, 'wt') as fp: - fp.write('\n'.join(lines)) - return - - lines = [ - write_rst_header('Execution Inputs', level=1), - write_rst_dict(node.inputs.get()), - ] - - result = node.result # Locally cache result - outputs = result.outputs - - if outputs is None: - with open(report_file, 'at') as fp: - fp.write('\n'.join(lines)) - return - - lines.append(write_rst_header('Execution Outputs', level=1)) - - if isinstance(outputs, Bunch): - lines.append(write_rst_dict(outputs.dictcopy())) - elif outputs: - lines.append(write_rst_dict(outputs.get())) - - if isinstance(node, MapNode): - lines.append(write_rst_header('Subnode reports', level=1)) - nitems = len(filename_to_list( - getattr(node.inputs, node.iterfield[0]))) - subnode_report_files = [] - for i in range(nitems): - nodecwd = op.join( - cwd, 'mapflow', '_%s%d' % (node.name, i), - '_report', 'report.rst') - subnode_report_files.append( - 'subnode %d : %s' % (i, nodecwd)) - - lines.append(write_rst_list(subnode_report_files)) - - with open(report_file, 'at') as fp: - fp.write('\n'.join(lines)) - return - - lines.append(write_rst_header('Runtime info', level=1)) - # Init rst dictionary of runtime stats - rst_dict = { - 'hostname': result.runtime.hostname, - 'duration': result.runtime.duration, - } - - if hasattr(result.runtime, 'cmdline'): - rst_dict['command'] = result.runtime.cmdline - - # Try and insert memory/threads usage if available - if node.config.resource_monitor: - rst_dict['mem_peak_gb'] = result.runtime.mem_peak_gb - rst_dict['cpu_percent'] = result.runtime.cpu_percent - - lines.append(write_rst_dict(rst_dict)) - - # Collect terminal output - if hasattr(result.runtime, 'merged'): - lines += [ - write_rst_header('Terminal output', level=2), - write_rst_list(result.runtime.merged), - ] - if hasattr(result.runtime, 'stdout'): - lines += [ - write_rst_header('Terminal - standard output', level=2), - write_rst_list(result.runtime.stdout), - ] - if hasattr(result.runtime, 'stderr'): - lines += [ - write_rst_header('Terminal - standard error', level=2), - write_rst_list(result.runtime.stderr), - ] - - # Store environment - if hasattr(result.runtime, 'environ'): - lines += [ - write_rst_header('Environment', level=2), - write_rst_dict(result.runtime.environ), - ] - - with open(report_file, 'at') as fp: - fp.write('\n'.join(lines)) - return - - -def _save_resultfile(result, cwd, name): - """Save a result pklz file to ``cwd``""" - resultsfile = op.join(cwd, 'result_%s.pklz' % name) - if result.outputs: - try: - outputs = result.outputs.get() - except TypeError: - outputs = result.outputs.dictcopy() # outputs was a bunch - result.outputs.set(**modify_paths( - outputs, relative=True, basedir=cwd)) - - savepkl(resultsfile, result) - logger.debug('saved results in %s', resultsfile) - - if result.outputs: - result.outputs.set(**outputs) - - -def _load_resultfile(cwd, name): - """Load results if it exists in cwd - - Parameter - --------- - - cwd : working directory of node - - Returns - ------- - - result : InterfaceResult structure - aggregate : boolean indicating whether node should aggregate_outputs - attribute error : boolean indicating whether there was some mismatch in - versions of traits used to store result and hence node needs to - rerun - """ - aggregate = True - resultsoutputfile = op.join(cwd, 'result_%s.pklz' % name) - result = None - attribute_error = False - if op.exists(resultsoutputfile): - pkl_file = gzip.open(resultsoutputfile, 'rb') - try: - result = pickle.load(pkl_file) - except UnicodeDecodeError: - # Was this pickle created with Python 2.x? - pickle.load(pkl_file, fix_imports=True, encoding='utf-8') - logger.warn('Successfully loaded pickle in compatibility mode') - except (traits.TraitError, AttributeError, ImportError, - EOFError) as err: - if isinstance(err, (AttributeError, ImportError)): - attribute_error = True - logger.debug('attribute error: %s probably using ' - 'different trait pickled file', str(err)) - else: - logger.debug( - 'some file does not exist. hence trait cannot be set') - else: - if result.outputs: - try: - outputs = result.outputs.get() - except TypeError: - outputs = result.outputs.dictcopy() # outputs == Bunch - try: - result.outputs.set(**modify_paths(outputs, - relative=False, - basedir=cwd)) - except FileNotFoundError: - logger.debug('conversion to full path results in ' - 'non existent file') - aggregate = False - pkl_file.close() - logger.debug('Aggregate: %s', aggregate) - return result, aggregate, attribute_error - - -def _strip_temp(files, wd): - out = [] - for f in files: - if isinstance(f, list): - out.append(_strip_temp(f, wd)) - else: - out.append(f.replace(op.join(wd, '_tempinput'), wd)) - return out diff --git a/nipype/pipeline/engine/tests/test_engine.py b/nipype/pipeline/engine/tests/test_engine.py index 8b4d559ec0..034174758a 100644 --- a/nipype/pipeline/engine/tests/test_engine.py +++ b/nipype/pipeline/engine/tests/test_engine.py @@ -488,7 +488,6 @@ def func1(in1): name='n1') n1.inputs.in1 = [[1, [2]], 3, [4, 5]] n1.run() - print(n1.get_output('out')) assert n1.get_output('out') == [[2, [3]], 4, [5, 6]] n2 = MapNode(Function(input_names=['in1'], diff --git a/nipype/pipeline/engine/utils.py b/nipype/pipeline/engine/utils.py index 5c223329ff..f5a9214d95 100644 --- a/nipype/pipeline/engine/utils.py +++ b/nipype/pipeline/engine/utils.py @@ -15,6 +15,15 @@ from glob import glob from distutils.version import LooseVersion +from traceback import format_exception +from hashlib import sha1 +import gzip + +from ...utils.filemanip import ( + save_json, savepkl, + write_rst_header, write_rst_dict, write_rst_list +) + try: from inspect import signature except ImportError: @@ -25,12 +34,13 @@ import networkx as nx from ...utils.filemanip import ( - makedirs, fname_presuffix, to_str, - filename_to_list, get_related_files) + relpath, makedirs, fname_presuffix, to_str, + filename_to_list, get_related_files, FileNotFoundError) from ...utils.misc import str2bool from ...utils.functions import create_function_from_source -from ...interfaces.base import (CommandLine, isdefined, Undefined, - InterfaceResult) +from ...interfaces.base import ( + Bunch, CommandLine, isdefined, Undefined, + InterfaceResult, traits) from ...interfaces.utility import IdentityInterface from ...utils.provenance import ProvStore, pm, nipype_ns, get_id @@ -47,39 +57,268 @@ dfs_preorder = nx.dfs_preorder_nodes logger.debug('networkx 1.4 dev or higher detected') -try: - from os.path import relpath -except ImportError: - import os.path as op - - def relpath(path, start=None): - """Return a relative version of a path""" - if start is None: - start = os.curdir - if not path: - raise ValueError("no path specified") - start_list = op.abspath(start).split(op.sep) - path_list = op.abspath(path).split(op.sep) - if start_list[0].lower() != path_list[0].lower(): - unc_path, rest = op.splitunc(path) - unc_start, rest = op.splitunc(start) - if bool(unc_path) ^ bool(unc_start): - raise ValueError(("Cannot mix UNC and non-UNC paths " - "(%s and %s)") % (path, start)) - else: - raise ValueError("path is on drive %s, start on drive %s" - % (path_list[0], start_list[0])) - # Work out how much of the filepath is shared by start and path. - for i in range(min(len(start_list), len(path_list))): - if start_list[i].lower() != path_list[i].lower(): - break + +def _parameterization_dir(param): + """ + Returns the directory name for the given parameterization string as follows: + - If the parameterization is longer than 32 characters, then + return the SHA-1 hex digest. + - Otherwise, return the parameterization unchanged. + """ + if len(param) > 32: + return sha1(param.encode()).hexdigest() + return param + + +def save_hashfile(hashfile, hashed_inputs): + """Store a hashfile""" + try: + save_json(hashfile, hashed_inputs) + except (IOError, TypeError): + err_type = sys.exc_info()[0] + if err_type is TypeError: + # XXX - SG current workaround is to just + # create the hashed file and not put anything + # in it + with open(hashfile, 'wt') as fd: + fd.writelines(str(hashed_inputs)) + + logger.debug( + 'Unable to write a particular type to the json file') else: - i += 1 + logger.critical('Unable to open the file in write mode: %s', + hashfile) + + +def nodelist_runner(nodes, updatehash=False, stop_first=False): + """ + A generator that iterates and over a list of ``nodes`` and + executes them. + + """ + for i, node in nodes: + err = None + result = None + try: + result = node.run(updatehash=updatehash) + except Exception: + if stop_first: + raise + + result = node._load_results() + err = [] + if result.runtime and hasattr(result.runtime, 'traceback'): + err = [result.runtime.traceback] + + err += format_exception(*sys.exc_info()) + err = '\n'.join(err) + finally: + yield i, result, err + + +def write_report(node, report_type=None, is_mapnode=False): + """ + Write a report file for a node + + """ + if not str2bool(node.config['execution']['create_report']): + return + + if report_type not in ['preexec', 'postexec']: + logger.warning('[Node] Unknown report type "%s".', report_type) + return + + cwd = node.output_dir() + report_dir = os.path.join(cwd, '_report') + report_file = os.path.join(report_dir, 'report.rst') + makedirs(report_dir, exist_ok=True) + + logger.debug('[Node] Writing %s-exec report to "%s"', + report_type[:-4], report_file) + if report_type.startswith('pre'): + lines = [ + write_rst_header('Node: %s' % get_print_name(node), level=0), + write_rst_list(['Hierarchy : %s' % node.fullname, + 'Exec ID : %s' % node._id]), + write_rst_header('Original Inputs', level=1), + write_rst_dict(node.inputs.get()), + ] + with open(report_file, 'wt') as fp: + fp.write('\n'.join(lines)) + return + + lines = [ + write_rst_header('Execution Inputs', level=1), + write_rst_dict(node.inputs.get()), + ] + + result = node.result # Locally cache result + outputs = result.outputs + + if outputs is None: + with open(report_file, 'at') as fp: + fp.write('\n'.join(lines)) + return + + lines.append(write_rst_header('Execution Outputs', level=1)) + + if isinstance(outputs, Bunch): + lines.append(write_rst_dict(outputs.dictcopy())) + elif outputs: + lines.append(write_rst_dict(outputs.get())) + + if is_mapnode: + lines.append(write_rst_header('Subnode reports', level=1)) + nitems = len(filename_to_list( + getattr(node.inputs, node.iterfield[0]))) + subnode_report_files = [] + for i in range(nitems): + nodecwd = os.path.join( + cwd, 'mapflow', '_%s%d' % (node.name, i), + '_report', 'report.rst') + subnode_report_files.append( + 'subnode %d : %s' % (i, nodecwd)) + + lines.append(write_rst_list(subnode_report_files)) + + with open(report_file, 'at') as fp: + fp.write('\n'.join(lines)) + return + + lines.append(write_rst_header('Runtime info', level=1)) + # Init rst dictionary of runtime stats + rst_dict = { + 'hostname': result.runtime.hostname, + 'duration': result.runtime.duration, + } + + if hasattr(result.runtime, 'cmdline'): + rst_dict['command'] = result.runtime.cmdline + + # Try and insert memory/threads usage if available + if hasattr(result.runtime, 'mem_peak_gb'): + rst_dict['mem_peak_gb'] = result.runtime.mem_peak_gb + + if hasattr(result.runtime, 'cpu_percent'): + rst_dict['cpu_percent'] = result.runtime.cpu_percent + + lines.append(write_rst_dict(rst_dict)) + + # Collect terminal output + if hasattr(result.runtime, 'merged'): + lines += [ + write_rst_header('Terminal output', level=2), + write_rst_list(result.runtime.merged), + ] + if hasattr(result.runtime, 'stdout'): + lines += [ + write_rst_header('Terminal - standard output', level=2), + write_rst_list(result.runtime.stdout), + ] + if hasattr(result.runtime, 'stderr'): + lines += [ + write_rst_header('Terminal - standard error', level=2), + write_rst_list(result.runtime.stderr), + ] + + # Store environment + if hasattr(result.runtime, 'environ'): + lines += [ + write_rst_header('Environment', level=2), + write_rst_dict(result.runtime.environ), + ] + + with open(report_file, 'at') as fp: + fp.write('\n'.join(lines)) + return + + +def save_resultfile(result, cwd, name): + """Save a result pklz file to ``cwd``""" + resultsfile = os.path.join(cwd, 'result_%s.pklz' % name) + if result.outputs: + try: + outputs = result.outputs.get() + except TypeError: + outputs = result.outputs.dictcopy() # outputs was a bunch + result.outputs.set(**modify_paths( + outputs, relative=True, basedir=cwd)) + + savepkl(resultsfile, result) + logger.debug('saved results in %s', resultsfile) + + if result.outputs: + result.outputs.set(**outputs) + + +def load_resultfile(path, name): + """ + Load InterfaceResult file from path + + Parameter + --------- + + path : base_dir of node + name : name of node + + Returns + ------- - rel_list = [op.pardir] * (len(start_list) - i) + path_list[i:] - if not rel_list: - return os.curdir - return op.join(*rel_list) + result : InterfaceResult structure + aggregate : boolean indicating whether node should aggregate_outputs + attribute error : boolean indicating whether there was some mismatch in + versions of traits used to store result and hence node needs to + rerun + """ + aggregate = True + resultsoutputfile = os.path.join(path, 'result_%s.pklz' % name) + result = None + attribute_error = False + if os.path.exists(resultsoutputfile): + pkl_file = gzip.open(resultsoutputfile, 'rb') + try: + result = pickle.load(pkl_file) + except UnicodeDecodeError: + # Was this pickle created with Python 2.x? + pickle.load(pkl_file, fix_imports=True, encoding='utf-8') + logger.warn('Successfully loaded pickle in compatibility mode') + except (traits.TraitError, AttributeError, ImportError, + EOFError) as err: + if isinstance(err, (AttributeError, ImportError)): + attribute_error = True + logger.debug('attribute error: %s probably using ' + 'different trait pickled file', str(err)) + else: + logger.debug( + 'some file does not exist. hence trait cannot be set') + else: + if result.outputs: + try: + outputs = result.outputs.get() + except TypeError: + outputs = result.outputs.dictcopy() # outputs == Bunch + try: + result.outputs.set(**modify_paths(outputs, + relative=False, + basedir=path)) + except FileNotFoundError: + logger.debug('conversion to full path results in ' + 'non existent file') + aggregate = False + pkl_file.close() + logger.debug('Aggregate: %s', aggregate) + return result, aggregate, attribute_error + + +def strip_temp(files, wd): + """Remove temp from a list of file paths""" + out = [] + for f in files: + if isinstance(f, list): + out.append(strip_temp(f, wd)) + else: + out.append(f.replace(os.path.join(wd, '_tempinput'), wd)) + return out def _write_inputs(node): @@ -91,7 +330,7 @@ def _write_inputs(node): if type(val) == str: try: func = create_function_from_source(val) - except RuntimeError as e: + except RuntimeError: lines.append("%s.inputs.%s = '%s'" % (nodename, key, val)) else: funcname = [name for name in func.__globals__ @@ -903,7 +1142,7 @@ def _standardize_iterables(node): fields = set(node.inputs.copyable_trait_names()) # Flag indicating whether the iterables are in the alternate # synchronize form and are not converted to a standard format. - synchronize = False + # synchronize = False # OE: commented out since it is not used # A synchronize iterables node without an itersource can be in # [fields, value tuples] format rather than # [(field, value list), (field, value list), ...] diff --git a/nipype/pipeline/engine/workflows.py b/nipype/pipeline/engine/workflows.py index b0ff7fcadc..e00f105c5e 100644 --- a/nipype/pipeline/engine/workflows.py +++ b/nipype/pipeline/engine/workflows.py @@ -24,7 +24,6 @@ from copy import deepcopy import pickle import shutil -from warnings import warn import numpy as np import networkx as nx @@ -560,12 +559,6 @@ def run(self, plugin=None, plugin_args=None, updatehash=False): runner = plugin_mod(plugin_args=plugin_args) flatgraph = self._create_flat_graph() self.config = merge_dict(deepcopy(config._sections), self.config) - if 'crashdump_dir' in self.config: - warn(("Deprecated: workflow.config['crashdump_dir']\n" - "Please use config['execution']['crashdump_dir']")) - crash_dir = self.config['crashdump_dir'] - self.config['execution']['crashdump_dir'] = crash_dir - del self.config['crashdump_dir'] logger.info('Workflow %s settings: %s', self.name, to_str(sorted(self.config))) self._set_needed_outputs(flatgraph) execgraph = generate_expanded_graph(deepcopy(flatgraph)) diff --git a/nipype/utils/filemanip.py b/nipype/utils/filemanip.py index 5ffefc1af1..d87f498d00 100644 --- a/nipype/utils/filemanip.py +++ b/nipype/utils/filemanip.py @@ -15,6 +15,7 @@ import locale from hashlib import md5 import os +import os.path as op import re import shutil import posixpath @@ -76,8 +77,8 @@ def split_filename(fname): special_extensions = [".nii.gz", ".tar.gz"] - pth = os.path.dirname(fname) - fname = os.path.basename(fname) + pth = op.dirname(fname) + fname = op.basename(fname) ext = None for special_ext in special_extensions: @@ -88,7 +89,7 @@ def split_filename(fname): fname = fname[:-ext_len] break if not ext: - fname, ext = os.path.splitext(fname) + fname, ext = op.splitext(fname) return pth, fname, ext @@ -187,8 +188,8 @@ def fname_presuffix(fname, prefix='', suffix='', newpath=None, use_ext=True): # No need for isdefined: bool(Undefined) evaluates to False if newpath: - pth = os.path.abspath(newpath) - return os.path.join(pth, prefix + fname + suffix + ext) + pth = op.abspath(newpath) + return op.join(pth, prefix + fname + suffix + ext) def fnames_presuffix(fnames, prefix='', suffix='', newpath=None, use_ext=True): @@ -206,14 +207,14 @@ def hash_rename(filename, hashvalue): """ path, name, ext = split_filename(filename) newfilename = ''.join((name, '_0x', hashvalue, ext)) - return os.path.join(path, newfilename) + return op.join(path, newfilename) def check_forhash(filename): """checks if file has a hash in its filename""" if isinstance(filename, list): filename = filename[0] - path, name = os.path.split(filename) + path, name = op.split(filename) if re.search('(_0x[a-z0-9]{32})', name): hashvalue = re.findall('(_0x[a-z0-9]{32})', name) return True, hashvalue @@ -224,7 +225,7 @@ def check_forhash(filename): def hash_infile(afile, chunk_len=8192, crypto=hashlib.md5): """ Computes hash of a file using 'crypto' module""" hex = None - if os.path.isfile(afile): + if op.isfile(afile): crypto_obj = crypto() with open(afile, 'rb') as fp: while True: @@ -239,7 +240,7 @@ def hash_infile(afile, chunk_len=8192, crypto=hashlib.md5): def hash_timestamp(afile): """ Computes md5 hash of the timestamp of a file """ md5hex = None - if os.path.isfile(afile): + if op.isfile(afile): md5obj = md5() stat = os.stat(afile) md5obj.update(str(stat.st_size).encode()) @@ -333,7 +334,7 @@ def copyfile(originalfile, newfile, copy=False, create_new=False, fmlogger.debug(newfile) if create_new: - while os.path.exists(newfile): + while op.exists(newfile): base, fname, ext = split_filename(newfile) s = re.search('_c[0-9]{4,4}$', fname) i = 0 @@ -363,9 +364,9 @@ def copyfile(originalfile, newfile, copy=False, create_new=False, # copy of file (same hash) (keep) # different file (diff hash) (unlink) keep = False - if os.path.lexists(newfile): - if os.path.islink(newfile): - if all((os.readlink(newfile) == os.path.realpath(originalfile), + if op.lexists(newfile): + if op.islink(newfile): + if all((os.readlink(newfile) == op.realpath(originalfile), not use_hardlink, not copy)): keep = True elif posixpath.samefile(newfile, originalfile): @@ -395,7 +396,7 @@ def copyfile(originalfile, newfile, copy=False, create_new=False, try: fmlogger.debug('Linking File: %s->%s', newfile, originalfile) # Use realpath to avoid hardlinking symlinks - os.link(os.path.realpath(originalfile), newfile) + os.link(op.realpath(originalfile), newfile) except OSError: use_hardlink = False # Disable hardlink for associated files else: @@ -422,7 +423,7 @@ def copyfile(originalfile, newfile, copy=False, create_new=False, related_file_pairs = (get_related_files(f, include_this_file=False) for f in (originalfile, newfile)) for alt_ofile, alt_nfile in zip(*related_file_pairs): - if os.path.exists(alt_ofile): + if op.exists(alt_ofile): copyfile(alt_ofile, alt_nfile, copy, hashmethod=hashmethod, use_hardlink=use_hardlink, copy_related_files=False) @@ -447,7 +448,7 @@ def get_related_files(filename, include_this_file=True): if this_type in type_set: for related_type in type_set: if include_this_file or related_type != this_type: - related_files.append(os.path.join(path, name + related_type)) + related_files.append(op.join(path, name + related_type)) if not len(related_files): related_files = [filename] return related_files @@ -519,9 +520,9 @@ def check_depends(targets, dependencies): """ tgts = filename_to_list(targets) deps = filename_to_list(dependencies) - return all(map(os.path.exists, tgts)) and \ - min(map(os.path.getmtime, tgts)) > \ - max(list(map(os.path.getmtime, deps)) + [0]) + return all(map(op.exists, tgts)) and \ + min(map(op.getmtime, tgts)) > \ + max(list(map(op.getmtime, deps)) + [0]) def save_json(filename, data): @@ -668,8 +669,8 @@ def dist_is_editable(dist): # Borrowed from `pip`'s' API """ for path_item in sys.path: - egg_link = os.path.join(path_item, dist + '.egg-link') - if os.path.isfile(egg_link): + egg_link = op.join(path_item, dist + '.egg-link') + if op.isfile(egg_link): return True return False @@ -688,13 +689,13 @@ def makedirs(path, exist_ok=False): return path # this odd approach deals with concurrent directory cureation - if not os.path.exists(os.path.abspath(path)): + if not op.exists(op.abspath(path)): fmlogger.debug("Creating directory %s", path) try: os.makedirs(path) except OSError: fmlogger.debug("Problem creating directory %s", path) - if not os.path.exists(path): + if not op.exists(path): raise OSError('Could not create directory %s' % path) return path @@ -711,30 +712,27 @@ def emptydirs(path, noexist_ok=False): """ fmlogger.debug("Removing contents of %s", path) - if noexist_ok and not os.path.exists(path): + if noexist_ok and not op.exists(path): return True - pathconts = os.listdir(path) - if not pathconts: - return True + if op.isfile(path): + raise OSError('path "%s" should be a directory' % path) - for el in pathconts: - if os.path.isfile(el): - os.remove(el) + try: + shutil.rmtree(path) + except OSError as ex: + elcont = os.listdir(path) + if ex.errno == errno.ENOTEMPTY and not elcont: + fmlogger.warning( + 'An exception was raised trying to remove old %s, but the path ' + 'seems empty. Is it an NFS mount?. Passing the exception.', path) + elif ex.errno == errno.ENOTEMPTY and elcont: + fmlogger.debug('Folder %s contents (%d items).', path, len(elcont)) + raise ex else: - try: - shutil.rmtree(el) - except OSError as ex: - elcont = os.listdir(el) - if ex.errno == errno.ENOTEMPTY and not elcont: - fmlogger.warning( - 'An exception was raised trying to remove old %s, but the path ' - 'seems empty. Is it an NFS mount?. Passing the exception.', el) - elif ex.errno == errno.ENOTEMPTY and elcont: - fmlogger.debug('Folder %s contents (%d items).', el, len(elcont)) - raise ex - else: - raise ex + raise ex + + makedirs(path) def which(cmd, env=None, pathext=None): @@ -765,8 +763,8 @@ def which(cmd, env=None, pathext=None): for ext in pathext: extcmd = cmd + ext for directory in path.split(os.pathsep): - filename = os.path.join(directory, extcmd) - if os.path.exists(filename): + filename = op.join(directory, extcmd) + if op.exists(filename): return filename return None @@ -822,3 +820,39 @@ def canonicalize_env(env): val = val.encode('utf-8') out_env[key] = val return out_env + + +def relpath(path, start=None): + """Return a relative version of a path""" + + try: + return op.relpath(path, start) + except AttributeError: + pass + + if start is None: + start = os.curdir + if not path: + raise ValueError("no path specified") + start_list = op.abspath(start).split(op.sep) + path_list = op.abspath(path).split(op.sep) + if start_list[0].lower() != path_list[0].lower(): + unc_path, rest = op.splitunc(path) + unc_start, rest = op.splitunc(start) + if bool(unc_path) ^ bool(unc_start): + raise ValueError(("Cannot mix UNC and non-UNC paths " + "(%s and %s)") % (path, start)) + else: + raise ValueError("path is on drive %s, start on drive %s" + % (path_list[0], start_list[0])) + # Work out how much of the filepath is shared by start and path. + for i in range(min(len(start_list), len(path_list))): + if start_list[i].lower() != path_list[i].lower(): + break + else: + i += 1 + + rel_list = [op.pardir] * (len(start_list) - i) + path_list[i:] + if not rel_list: + return os.curdir + return op.join(*rel_list) From 16eafc0ec1cdacf9957631d533e1483bedb810a2 Mon Sep 17 00:00:00 2001 From: oesteban Date: Fri, 22 Dec 2017 14:13:08 -0800 Subject: [PATCH 614/643] Update SPM interfaces to use the new PackageInfo --- .../freesurfer/tests/test_FSSurfaceCommand.py | 4 +- nipype/interfaces/spm/base.py | 78 ++++++++++++++----- nipype/interfaces/spm/tests/test_base.py | 12 +-- nipype/interfaces/spm/tests/test_model.py | 8 +- .../interfaces/spm/tests/test_preprocess.py | 12 +-- nipype/workflows/fmri/spm/preprocess.py | 62 +++++++++------ 6 files changed, 109 insertions(+), 67 deletions(-) diff --git a/nipype/interfaces/freesurfer/tests/test_FSSurfaceCommand.py b/nipype/interfaces/freesurfer/tests/test_FSSurfaceCommand.py index acaa5d466d..70701e5f57 100644 --- a/nipype/interfaces/freesurfer/tests/test_FSSurfaceCommand.py +++ b/nipype/interfaces/freesurfer/tests/test_FSSurfaceCommand.py @@ -29,9 +29,11 @@ def test_FSSurfaceCommand_inputs(): @pytest.mark.skipif(fs.no_freesurfer(), reason="freesurfer is not installed") -def test_associated_file(): +def test_associated_file(tmpdir): fssrc = FreeSurferSource(subjects_dir=fs.Info.subjectsdir(), subject_id='fsaverage', hemi='lh') + fssrc.base_dir = tmpdir.strpath + fssrc.resource_monitor = False fsavginfo = fssrc.run().outputs.get() diff --git a/nipype/interfaces/spm/base.py b/nipype/interfaces/spm/base.py index 391528e83b..bd76e868dc 100644 --- a/nipype/interfaces/spm/base.py +++ b/nipype/interfaces/spm/base.py @@ -29,8 +29,11 @@ # Local imports from ... import logging from ...utils import spm_docs as sd, NUMPY_MMAP -from ..base import (BaseInterface, traits, isdefined, InputMultiPath, - BaseInterfaceInputSpec, Directory, Undefined, ImageFile) +from ..base import ( + BaseInterface, traits, isdefined, InputMultiPath, + BaseInterfaceInputSpec, Directory, Undefined, + ImageFile, PackageInfo +) from ..matlab import MatlabCommand from ...external.due import due, Doi, BibTeX @@ -123,12 +126,34 @@ def scans_for_fnames(fnames, keep4d=False, separate_sessions=False): return flist -class Info(object): +class Info(PackageInfo): """Handles SPM version information """ - @staticmethod - def version(matlab_cmd=None, paths=None, use_mcr=None): - """Returns the path to the SPM directory in the Matlab path + _path = None + _name = None + + @classmethod + def path(klass, matlab_cmd=None, paths=None, use_mcr=None): + if klass._path: + return klass._path + return klass.getinfo(matlab_cmd, paths, use_mcr)['path'] + + @classmethod + def version(klass, matlab_cmd=None, paths=None, use_mcr=None): + if klass._version: + return klass._version + return klass.getinfo(matlab_cmd, paths, use_mcr)['release'] + + @classmethod + def name(klass, matlab_cmd=None, paths=None, use_mcr=None): + if klass._name: + return klass._name + return klass.getinfo(matlab_cmd, paths, use_mcr)['name'] + + @classmethod + def getinfo(klass, matlab_cmd=None, paths=None, use_mcr=None): + """ + Returns the path to the SPM directory in the Matlab path If path not found, returns None. Parameters @@ -152,6 +177,13 @@ def version(matlab_cmd=None, paths=None, use_mcr=None): returns None of path not found """ + if klass._name and klass._path and klass._version: + return { + 'name': klass._name, + 'path': klass._path, + 'release': klass._version + } + use_mcr = use_mcr or 'FORCE_SPMMCR' in os.environ matlab_cmd = ((use_mcr and os.getenv('SPMMCRCMD')) or os.getenv('MATLABCMD') or @@ -184,13 +216,17 @@ def version(matlab_cmd=None, paths=None, use_mcr=None): # No Matlab -- no spm logger.debug('%s', e) return None - else: - out = sd._strip_header(out.runtime.stdout) - out_dict = {} - for part in out.split('|'): - key, val = part.split(':') - out_dict[key] = val - return out_dict + + out = sd._strip_header(out.runtime.stdout) + out_dict = {} + for part in out.split('|'): + key, val = part.split(':') + out_dict[key] = val + + klass._version = out_dict['release'] + klass._path = out_dict['path'] + klass._name = out_dict['name'] + return out_dict def no_spm(): @@ -288,13 +324,15 @@ def _matlab_cmd_update(self): @property def version(self): - version_dict = Info.version(matlab_cmd=self.inputs.matlab_cmd, - paths=self.inputs.paths, - use_mcr=self.inputs.use_mcr) - if version_dict: - return '.'.join((version_dict['name'].split('SPM')[-1], - version_dict['release'])) - return version_dict + info_dict = Info.getinfo( + matlab_cmd=self.inputs.matlab_cmd, + paths=self.inputs.paths, + use_mcr=self.inputs.use_mcr + ) + if info_dict: + return '%s.%s' % ( + info_dict['name'].split('SPM')[-1], + info_dict['release']) @property def jobtype(self): diff --git a/nipype/interfaces/spm/tests/test_base.py b/nipype/interfaces/spm/tests/test_base.py index d1c517a0d3..57d0d88c21 100644 --- a/nipype/interfaces/spm/tests/test_base.py +++ b/nipype/interfaces/spm/tests/test_base.py @@ -16,12 +16,8 @@ from nipype.interfaces.spm.base import SPMCommandInputSpec from nipype.interfaces.base import traits -try: - matlab_cmd = os.environ['MATLABCMD'] -except: - matlab_cmd = 'matlab' - -mlab.MatlabCommand.set_default_matlab_cmd(matlab_cmd) +mlab.MatlabCommand.set_default_matlab_cmd( + os.getenv('MATLABCMD', 'matlab')) def test_scan_for_fnames(create_files_in_directory): @@ -35,10 +31,10 @@ def test_scan_for_fnames(create_files_in_directory): if not save_time: @pytest.mark.skipif(no_spm(), reason="spm is not installed") def test_spm_path(): - spm_path = spm.Info.version()['path'] + spm_path = spm.Info.path() if spm_path is not None: assert isinstance(spm_path, (str, bytes)) - assert 'spm' in spm_path + assert 'spm' in spm_path.lower() def test_use_mfile(): diff --git a/nipype/interfaces/spm/tests/test_model.py b/nipype/interfaces/spm/tests/test_model.py index e9e8a48849..307c4f1786 100644 --- a/nipype/interfaces/spm/tests/test_model.py +++ b/nipype/interfaces/spm/tests/test_model.py @@ -6,12 +6,8 @@ import nipype.interfaces.spm.model as spm import nipype.interfaces.matlab as mlab -try: - matlab_cmd = os.environ['MATLABCMD'] -except: - matlab_cmd = 'matlab' - -mlab.MatlabCommand.set_default_matlab_cmd(matlab_cmd) +mlab.MatlabCommand.set_default_matlab_cmd( + os.getenv('MATLABCMD', 'matlab')) def test_level1design(): diff --git a/nipype/interfaces/spm/tests/test_preprocess.py b/nipype/interfaces/spm/tests/test_preprocess.py index 4bf86285ad..f167ad521a 100644 --- a/nipype/interfaces/spm/tests/test_preprocess.py +++ b/nipype/interfaces/spm/tests/test_preprocess.py @@ -10,12 +10,8 @@ from nipype.interfaces.spm import no_spm import nipype.interfaces.matlab as mlab -try: - matlab_cmd = os.environ['MATLABCMD'] -except: - matlab_cmd = 'matlab' - -mlab.MatlabCommand.set_default_matlab_cmd(matlab_cmd) +mlab.MatlabCommand.set_default_matlab_cmd( + os.getenv('MATLABCMD', 'matlab')) def test_slicetiming(): @@ -88,7 +84,7 @@ def test_normalize12_list_outputs(create_files_in_directory): @pytest.mark.skipif(no_spm(), reason="spm is not installed") def test_segment(): - if spm.Info.version()['name'] == "SPM12": + if spm.Info.name() == "SPM12": assert spm.Segment()._jobtype == 'tools' assert spm.Segment()._jobname == 'oldseg' else: @@ -98,7 +94,7 @@ def test_segment(): @pytest.mark.skipif(no_spm(), reason="spm is not installed") def test_newsegment(): - if spm.Info.version()['name'] == "SPM12": + if spm.Info.name() == "SPM12": assert spm.NewSegment()._jobtype == 'spatial' assert spm.NewSegment()._jobname == 'preproc' else: diff --git a/nipype/workflows/fmri/spm/preprocess.py b/nipype/workflows/fmri/spm/preprocess.py index 384284434d..1a8b8cddee 100644 --- a/nipype/workflows/fmri/spm/preprocess.py +++ b/nipype/workflows/fmri/spm/preprocess.py @@ -8,7 +8,6 @@ from ....interfaces import spm as spm from ....interfaces import utility as niu from ....pipeline import engine as pe -from ....interfaces.matlab import no_matlab from ...smri.freesurfer.utils import create_getmask_flow from .... import logging @@ -141,7 +140,8 @@ def create_vbm_preproc(name='vbmpreproc'): >>> preproc = create_vbm_preproc() >>> preproc.inputs.inputspec.fwhm = 8 - >>> preproc.inputs.inputspec.structural_files = [os.path.abspath('s1.nii'), os.path.abspath('s3.nii')] + >>> preproc.inputs.inputspec.structural_files = [ + ... os.path.abspath('s1.nii'), os.path.abspath('s3.nii')] >>> preproc.inputs.inputspec.template_prefix = 'Template' >>> preproc.run() # doctest: +SKIP @@ -185,7 +185,9 @@ def getclass1images(class_images): class1images.extend(session[0]) return class1images - workflow.connect(dartel_template, ('segment.native_class_images', getclass1images), norm2mni, 'apply_to_files') + workflow.connect( + dartel_template, ('segment.native_class_images', getclass1images), + norm2mni, 'apply_to_files') workflow.connect(inputnode, 'fwhm', norm2mni, 'fwhm') def compute_icv(class_images): @@ -217,10 +219,11 @@ def compute_icv(class_images): "icv" ]), name="outputspec") - workflow.connect([(dartel_template, outputnode, [('outputspec.template_file', 'template_file')]), - (norm2mni, outputnode, [("normalized_files", "normalized_files")]), - (calc_icv, outputnode, [("icv", "icv")]), - ]) + workflow.connect([ + (dartel_template, outputnode, [('outputspec.template_file', 'template_file')]), + (norm2mni, outputnode, [("normalized_files", "normalized_files")]), + (calc_icv, outputnode, [("icv", "icv")]), + ]) return workflow @@ -233,7 +236,8 @@ def create_DARTEL_template(name='dartel_template'): ------- >>> preproc = create_DARTEL_template() - >>> preproc.inputs.inputspec.structural_files = [os.path.abspath('s1.nii'), os.path.abspath('s3.nii')] + >>> preproc.inputs.inputspec.structural_files = [ + ... os.path.abspath('s1.nii'), os.path.abspath('s3.nii')] >>> preproc.inputs.inputspec.template_prefix = 'Template' >>> preproc.run() # doctest: +SKIP @@ -259,24 +263,34 @@ def create_DARTEL_template(name='dartel_template'): name='segment') workflow.connect(inputnode, 'structural_files', segment, 'channel_files') - version = spm.Info.version() - if version: - spm_path = version['path'] - if version['name'] == 'SPM8': - tissue1 = ((os.path.join(spm_path, 'toolbox/Seg/TPM.nii'), 1), 2, (True, True), (False, False)) - tissue2 = ((os.path.join(spm_path, 'toolbox/Seg/TPM.nii'), 2), 2, (True, True), (False, False)) - tissue3 = ((os.path.join(spm_path, 'toolbox/Seg/TPM.nii'), 3), 2, (True, False), (False, False)) - tissue4 = ((os.path.join(spm_path, 'toolbox/Seg/TPM.nii'), 4), 3, (False, False), (False, False)) - tissue5 = ((os.path.join(spm_path, 'toolbox/Seg/TPM.nii'), 5), 4, (False, False), (False, False)) - tissue6 = ((os.path.join(spm_path, 'toolbox/Seg/TPM.nii'), 6), 2, (False, False), (False, False)) - elif version['name'] == 'SPM12': - spm_path = version['path'] + spm_info = spm.Info.getinfo() + if spm_info: + spm_path = spm_info['path'] + if spm_info['name'] == 'SPM8': + tissue1 = ((os.path.join(spm_path, 'toolbox/Seg/TPM.nii'), 1), + 2, (True, True), (False, False)) + tissue2 = ((os.path.join(spm_path, 'toolbox/Seg/TPM.nii'), 2), + 2, (True, True), (False, False)) + tissue3 = ((os.path.join(spm_path, 'toolbox/Seg/TPM.nii'), 3), + 2, (True, False), (False, False)) + tissue4 = ((os.path.join(spm_path, 'toolbox/Seg/TPM.nii'), 4), + 3, (False, False), (False, False)) + tissue5 = ((os.path.join(spm_path, 'toolbox/Seg/TPM.nii'), 5), + 4, (False, False), (False, False)) + tissue6 = ((os.path.join(spm_path, 'toolbox/Seg/TPM.nii'), 6), + 2, (False, False), (False, False)) + elif spm_info['name'] == 'SPM12': + spm_path = spm_info['path'] tissue1 = ((os.path.join(spm_path, 'tpm/TPM.nii'), 1), 1, (True, True), (False, False)) tissue2 = ((os.path.join(spm_path, 'tpm/TPM.nii'), 2), 1, (True, True), (False, False)) - tissue3 = ((os.path.join(spm_path, 'tpm/TPM.nii'), 3), 2, (True, False), (False, False)) - tissue4 = ((os.path.join(spm_path, 'tpm/TPM.nii'), 4), 3, (False, False), (False, False)) - tissue5 = ((os.path.join(spm_path, 'tpm/TPM.nii'), 5), 4, (False, False), (False, False)) - tissue6 = ((os.path.join(spm_path, 'tpm/TPM.nii'), 6), 2, (False, False), (False, False)) + tissue3 = ((os.path.join(spm_path, 'tpm/TPM.nii'), 3), + 2, (True, False), (False, False)) + tissue4 = ((os.path.join(spm_path, 'tpm/TPM.nii'), 4), + 3, (False, False), (False, False)) + tissue5 = ((os.path.join(spm_path, 'tpm/TPM.nii'), 5), + 4, (False, False), (False, False)) + tissue6 = ((os.path.join(spm_path, 'tpm/TPM.nii'), 6), + 2, (False, False), (False, False)) else: logger.critical('Unsupported version of SPM') From db479b17d45471c661a037b6d6bebb28fb4d3c86 Mon Sep 17 00:00:00 2001 From: oesteban Date: Fri, 22 Dec 2017 16:06:47 -0800 Subject: [PATCH 615/643] fix spm.Info when spm is not installed --- nipype/interfaces/spm/base.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/nipype/interfaces/spm/base.py b/nipype/interfaces/spm/base.py index bd76e868dc..7882fa1280 100644 --- a/nipype/interfaces/spm/base.py +++ b/nipype/interfaces/spm/base.py @@ -136,19 +136,22 @@ class Info(PackageInfo): def path(klass, matlab_cmd=None, paths=None, use_mcr=None): if klass._path: return klass._path - return klass.getinfo(matlab_cmd, paths, use_mcr)['path'] + klass.getinfo(matlab_cmd, paths, use_mcr) + return klass._path @classmethod def version(klass, matlab_cmd=None, paths=None, use_mcr=None): if klass._version: return klass._version - return klass.getinfo(matlab_cmd, paths, use_mcr)['release'] + klass.getinfo(matlab_cmd, paths, use_mcr) + return klass._version @classmethod def name(klass, matlab_cmd=None, paths=None, use_mcr=None): if klass._name: return klass._name - return klass.getinfo(matlab_cmd, paths, use_mcr)['name'] + klass.getinfo(matlab_cmd, paths, use_mcr) + return klass._name @classmethod def getinfo(klass, matlab_cmd=None, paths=None, use_mcr=None): @@ -185,9 +188,9 @@ def getinfo(klass, matlab_cmd=None, paths=None, use_mcr=None): } use_mcr = use_mcr or 'FORCE_SPMMCR' in os.environ - matlab_cmd = ((use_mcr and os.getenv('SPMMCRCMD')) or - os.getenv('MATLABCMD') or - 'matlab -nodesktop -nosplash') + matlab_cmd = ( + (use_mcr and os.getenv('SPMMCRCMD')) or + os.getenv('MATLABCMD', 'matlab -nodesktop -nosplash')) mlab = MatlabCommand(matlab_cmd=matlab_cmd, resource_monitor=False) From 94a46042fdcd9689285837748b21199dd9139605 Mon Sep 17 00:00:00 2001 From: Oscar Esteban Date: Sun, 31 Dec 2017 09:54:08 -0800 Subject: [PATCH 616/643] improve logging of nodes with updated hash --- nipype/pipeline/engine/nodes.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/nipype/pipeline/engine/nodes.py b/nipype/pipeline/engine/nodes.py index 34aa2028d3..69b144d570 100644 --- a/nipype/pipeline/engine/nodes.py +++ b/nipype/pipeline/engine/nodes.py @@ -308,12 +308,11 @@ def hash_exists(self, updatehash=False): # Remove outdated hashfile if hashfiles and hashfiles[0] != hashfile: - logger.info('[Node] Removing outdated hashfile (%s) and forcing node to rerun', - op.basename(hashfiles[0])) + logger.info('[Node] Outdated hashfile found for "%s", removing and forcing node ' + 'to rerun', self.fullname) - # In DEBUG, print diff between hashes - log_debug = config.get('logging', 'workflow_level') == 'DEBUG' - if log_debug and hash_exists: # Lazy logging - only debug + # If logging is more verbose than INFO (20), print diff between hashes + if logger.getEffectiveLevel() < 20 and hash_exists: # Lazy logging: only < INFO split_out = split_filename(hashfiles[0]) exp_hash_file_base = split_out[1] exp_hash = exp_hash_file_base[len('_0x'):] @@ -426,7 +425,7 @@ def run(self, updatehash=False): try: result = self._run_interface(execute=True) except Exception: - logger.warning('[Node] Exception "%s" (%s)', self.fullname, outdir) + logger.warning('[Node] Error on "%s" (%s)', self.fullname, outdir) # Tear-up after error os.remove(hashfile_unfinished) raise From 37554d045462690783afc05396201ee7b6575423 Mon Sep 17 00:00:00 2001 From: Oscar Esteban Date: Sun, 31 Dec 2017 10:59:49 -0800 Subject: [PATCH 617/643] remove hashfiles on error situations, improve logging the diff of hashvalues --- nipype/pipeline/engine/nodes.py | 24 +++++++++----- nipype/utils/logger.py | 43 +++---------------------- nipype/utils/misc.py | 56 ++++++++++++++++++++++++++++++++- 3 files changed, 75 insertions(+), 48 deletions(-) diff --git a/nipype/pipeline/engine/nodes.py b/nipype/pipeline/engine/nodes.py index 69b144d570..627e77428d 100644 --- a/nipype/pipeline/engine/nodes.py +++ b/nipype/pipeline/engine/nodes.py @@ -30,7 +30,7 @@ from future import standard_library from ... import config, logging -from ...utils.misc import (flatten, unflatten, str2bool) +from ...utils.misc import flatten, unflatten, str2bool, dict_diff from ...utils.filemanip import ( md5, FileNotFoundError, filename_to_list, list_to_filename, copyfiles, fnames_presuffix, loadpkl, split_filename, load_json, makedirs, @@ -292,38 +292,46 @@ def hash_exists(self, updatehash=False): # Find previous hashfiles hashfiles = glob(op.join(outdir, '_0x*.json')) if len(hashfiles) > 1: + for rmfile in hashfiles: + os.remove(rmfile) + raise RuntimeError( - '[Node] Cache ERROR - Found %d previous hashfiles that indicate ' + '[Node] Cache ERROR - Found %d previous hashfiles indicating ' 'that the ``base_dir`` for this node went stale. Please re-run the ' 'workflow.' % len(hashfiles)) # Find unfinished hashfiles and error if any unfinished = glob(op.join(outdir, '_0x*_unfinished.json')) + # This should not happen, but clean up and break if so. if unfinished and updatehash: + for rmfile in unfinished: + os.remove(rmfile) + raise RuntimeError( - '[Node] Cache ERROR - Found unfinished hashfiles (%d) that indicate ' + '[Node] Cache ERROR - Found unfinished hashfiles (%d) indicating ' 'that the ``base_dir`` for this node went stale. Please re-run the ' 'workflow.' % len(unfinished)) # Remove outdated hashfile if hashfiles and hashfiles[0] != hashfile: logger.info('[Node] Outdated hashfile found for "%s", removing and forcing node ' - 'to rerun', self.fullname) + 'to rerun.', self.fullname) # If logging is more verbose than INFO (20), print diff between hashes - if logger.getEffectiveLevel() < 20 and hash_exists: # Lazy logging: only < INFO + loglevel = logger.getEffectiveLevel() + if loglevel < 20: # Lazy logging: only < INFO split_out = split_filename(hashfiles[0]) exp_hash_file_base = split_out[1] exp_hash = exp_hash_file_base[len('_0x'):] - logger.debug("Previous node hash = %s", exp_hash) + logger.log(loglevel, "[Node] Old/new hashes = %s/%s", exp_hash, hashvalue) try: prev_inputs = load_json(hashfiles[0]) except Exception: pass else: - logging.logdebug_dict_differences( - prev_inputs, hashed_inputs) + logger.log(loglevel, dict_diff(prev_inputs, hashed_inputs, 10)) + os.remove(hashfiles[0]) # Update only possible if it exists diff --git a/nipype/utils/logger.py b/nipype/utils/logger.py index 4604cc4145..2bdc54c791 100644 --- a/nipype/utils/logger.py +++ b/nipype/utils/logger.py @@ -97,42 +97,7 @@ def logdebug_dict_differences(self, dold, dnew, prefix=""): typical use -- log difference for hashed_inputs """ - # First check inputs, since they usually are lists of tuples - # and dicts are required. - if isinstance(dnew, list): - dnew = dict(dnew) - if isinstance(dold, list): - dold = dict(dold) - - # Compare against hashed_inputs - # Keys: should rarely differ - new_keys = set(dnew.keys()) - old_keys = set(dold.keys()) - if len(new_keys - old_keys): - self._logger.debug("%s not previously seen: %s" - % (prefix, new_keys - old_keys)) - if len(old_keys - new_keys): - self._logger.debug("%s not presently seen: %s" - % (prefix, old_keys - new_keys)) - - # Values in common keys would differ quite often, - # so we need to join the messages together - msgs = [] - for k in new_keys.intersection(old_keys): - same = False - try: - new, old = dnew[k], dold[k] - same = new == old - if not same: - # Since JSON does not discriminate between lists and - # tuples, we might need to cast them into the same type - # as the last resort. And lets try to be more generic - same = old.__class__(new) == old - except Exception as e: - same = False - if not same: - msgs += ["%s: %r != %r" - % (k, dnew[k], dold[k])] - if len(msgs): - self._logger.debug("%s values differ in fields: %s" % (prefix, - ", ".join(msgs))) + from .misc import dict_diff + self._logger.warning("logdebug_dict_differences has been deprecated, please use " + "nipype.utils.misc.dict_diff.") + self._logger.debug(dict_diff(dold, dnew)) diff --git a/nipype/utils/misc.py b/nipype/utils/misc.py index 81b29366a1..3cc77ee58c 100644 --- a/nipype/utils/misc.py +++ b/nipype/utils/misc.py @@ -15,7 +15,7 @@ import inspect from distutils.version import LooseVersion -from textwrap import dedent +from textwrap import dedent, indent as textwrap_indent import numpy as np def human_order_sorted(l): @@ -229,3 +229,57 @@ def normalize_mc_params(params, source): params[-1:2:-1] = aff2euler(matrix) return params + + +def dict_diff(dold, dnew, indent=0): + """Helper to log what actually changed from old to new values of + dictionaries. + + typical use -- log difference for hashed_inputs + """ + # First check inputs, since they usually are lists of tuples + # and dicts are required. + if isinstance(dnew, list): + dnew = dict(dnew) + if isinstance(dold, list): + dold = dict(dold) + + # Compare against hashed_inputs + # Keys: should rarely differ + new_keys = set(dnew.keys()) + old_keys = set(dold.keys()) + + diff = [] + if new_keys - old_keys: + diff += [" * keys not previously seen: %s" % (new_keys - old_keys)] + + if old_keys - new_keys: + diff += [" * keys not presently seen: %s" % (old_keys - new_keys)] + + # Add topical message + if diff: + diff.insert(0, "Dictionaries had differing keys:") + + diffkeys = len(diff) + + # Values in common keys would differ quite often, + # so we need to join the messages together + for k in new_keys.intersection(old_keys): + same = False + try: + new, old = dnew[k], dold[k] + same = new == old + if not same: + # Since JSON does not discriminate between lists and + # tuples, we might need to cast them into the same type + # as the last resort. And lets try to be more generic + same = old.__class__(new) == old + except Exception: + same = False + if not same: + diff += ["%s: %r != %r" % (k, dnew[k], dold[k])] + + if len(diff) > diffkeys: + diff.insert(diffkeys, "Some dictionary entries had differing values:") + + return textwrap_indent('\n'.join(diff), ' ' * indent) From a0b2b04e5a0d3ebecec695984eddb653d08a0a1c Mon Sep 17 00:00:00 2001 From: Oscar Esteban Date: Sun, 31 Dec 2017 18:56:21 -0800 Subject: [PATCH 618/643] python2 compat, sty fixes --- nipype/utils/misc.py | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/nipype/utils/misc.py b/nipype/utils/misc.py index 3cc77ee58c..0d5942940a 100644 --- a/nipype/utils/misc.py +++ b/nipype/utils/misc.py @@ -4,19 +4,29 @@ """Miscellaneous utility functions """ from __future__ import print_function, unicode_literals, division, absolute_import -from future import standard_library -standard_library.install_aliases() from builtins import next, str -from future.utils import raise_from import sys import re from collections import Iterator -import inspect from distutils.version import LooseVersion -from textwrap import dedent, indent as textwrap_indent + import numpy as np +from future.utils import raise_from +from future import standard_library +try: + from textwrap import indent as textwrap_indent +except ImportError: + def textwrap_indent(text, prefix): + """ A textwrap.indent replacement for Python < 3.3 """ + if not prefix: + return text + splittext = text.splitlines(True) + return prefix + prefix.join(splittext) + +standard_library.install_aliases() + def human_order_sorted(l): """Sorts string in human order (i.e. 'stat10' will go after 'stat2')""" @@ -197,11 +207,11 @@ def unflatten(in_list, prev_structure): if not isinstance(prev_structure, list): return next(in_list) - else: - out = [] - for item in prev_structure: - out.append(unflatten(in_list, item)) - return out + + out = [] + for item in prev_structure: + out.append(unflatten(in_list, item)) + return out def normalize_mc_params(params, source): @@ -277,7 +287,7 @@ def dict_diff(dold, dnew, indent=0): except Exception: same = False if not same: - diff += ["%s: %r != %r" % (k, dnew[k], dold[k])] + diff += [" * %s: %r != %r" % (k, dnew[k], dold[k])] if len(diff) > diffkeys: diff.insert(diffkeys, "Some dictionary entries had differing values:") From 2daabf044205f35a3724ecfd9900f4058c0ff303 Mon Sep 17 00:00:00 2001 From: oesteban Date: Tue, 2 Jan 2018 17:21:50 -0800 Subject: [PATCH 619/643] [FIX] Fix surf_reg input trait Close #1078 as this PR supercedes that one --- .../freesurfer/tests/test_auto_SampleToSurface.py | 2 +- nipype/interfaces/freesurfer/utils.py | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/nipype/interfaces/freesurfer/tests/test_auto_SampleToSurface.py b/nipype/interfaces/freesurfer/tests/test_auto_SampleToSurface.py index fd6440f10f..e479518cf3 100644 --- a/nipype/interfaces/freesurfer/tests/test_auto_SampleToSurface.py +++ b/nipype/interfaces/freesurfer/tests/test_auto_SampleToSurface.py @@ -93,7 +93,7 @@ def test_SampleToSurface_inputs(): ), subject_id=dict(), subjects_dir=dict(), - surf_reg=dict(argstr='--surfreg', + surf_reg=dict(argstr='--surfreg %s', requires=['target_subject'], ), surface=dict(argstr='--surf %s', diff --git a/nipype/interfaces/freesurfer/utils.py b/nipype/interfaces/freesurfer/utils.py index a5568ebbcb..97ae831b26 100644 --- a/nipype/interfaces/freesurfer/utils.py +++ b/nipype/interfaces/freesurfer/utils.py @@ -139,8 +139,9 @@ class SampleToSurfaceInputSpec(FSTraitedSpec): subject_id = traits.String(desc="subject id") target_subject = traits.String(argstr="--trgsubject %s", desc="sample to surface of different subject than source") - surf_reg = traits.Bool(argstr="--surfreg", requires=["target_subject"], - desc="use surface registration to target subject") + surf_reg = traits.Either(traits.Bool, traits.Str(), + argstr="--surfreg %s", requires=["target_subject"], + desc="use surface registration to target subject") ico_order = traits.Int(argstr="--icoorder %d", requires=["target_subject"], desc="icosahedron order when target_subject is 'ico'") @@ -238,6 +239,10 @@ def _format_arg(self, name, spec, value): if value in implicit_filetypes: return "" + if name == 'surf_reg': + if value is True: + return spec.argstr % 'sphere.reg' + return super(SampleToSurface, self)._format_arg(name, spec, value) def _get_outfilename(self, opt="out_file"): From afa74b71fa81d4eb124e28d7a6b07ef415bf6530 Mon Sep 17 00:00:00 2001 From: Oscar Esteban Date: Tue, 2 Jan 2018 22:43:02 -0800 Subject: [PATCH 620/643] make sure the OSError when cwd is deleted by other process is handled gracefully --- nipype/pipeline/engine/nodes.py | 16 ++++++++++++---- nipype/pipeline/plugins/base.py | 2 +- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/nipype/pipeline/engine/nodes.py b/nipype/pipeline/engine/nodes.py index 627e77428d..a00165764e 100644 --- a/nipype/pipeline/engine/nodes.py +++ b/nipype/pipeline/engine/nodes.py @@ -428,7 +428,14 @@ def run(self, updatehash=False): savepkl(op.join(outdir, '_inputs.pklz'), self.inputs.get_traitsfree()) - cwd = os.getcwd() + try: + cwd = os.getcwd() + except OSError: + # Changing back to cwd is probably not necessary + # but this makes sure there's somewhere to change to. + cwd = os.path.split(outdir)[0] + logger.debug('Current folder does not exist, changing to "%s" instead.', cwd) + os.chdir(outdir) try: result = self._run_interface(execute=True) @@ -1009,8 +1016,8 @@ def inputs(self): @property def outputs(self): - if self._interface._outputs(): - return Bunch(self._interface._outputs().get()) + if self.interface._outputs(): + return Bunch(self.interface._outputs().get()) def _make_nodes(self, cwd=None): if cwd is None: @@ -1030,7 +1037,7 @@ def _make_nodes(self, cwd=None): base_dir=op.join(cwd, 'mapflow'), name=nodename) node.plugin_args = self.plugin_args - node._interface.inputs.trait_set( + node.interface.inputs.trait_set( **deepcopy(self._interface.inputs.get())) node.interface.resource_monitor = self._interface.resource_monitor for field in self.iterfield: @@ -1177,6 +1184,7 @@ def _run_interface(self, execute=True, updatehash=False): if path.split(op.sep)[-1] not in nodenames: dirs2remove.append(path) for path in dirs2remove: + logger.debug('[MapNode] Removing folder "%s".' , path) shutil.rmtree(path) return result diff --git a/nipype/pipeline/plugins/base.py b/nipype/pipeline/plugins/base.py index e27733ab77..ec8c68a148 100644 --- a/nipype/pipeline/plugins/base.py +++ b/nipype/pipeline/plugins/base.py @@ -408,7 +408,7 @@ def _remove_node_dirs(self): continue if self.proc_done[idx] and (not self.proc_pending[idx]): self.refidx[idx, idx] = -1 - outdir = self.procs[idx]._output_directory() + outdir = self.procs[idx].output_dir() logger.info(('[node dependencies finished] ' 'removing node: %s from directory %s') % (self.procs[idx]._id, outdir)) From 8fc2771e2cc40381e7d7503903df5274ce1b6c5d Mon Sep 17 00:00:00 2001 From: miykael Date: Fri, 5 Jan 2018 16:28:12 +0100 Subject: [PATCH 621/643] STY: correct for tailing spaces and newline at end of file --- CONTRIBUTING.md | 4 ++-- codecov.yml | 2 +- doc/_static/nipype.css | 2 +- doc/devel/gitwash/git_links.inc | 4 ++-- doc/searchresults.rst | 2 +- doc/users/aws.rst | 2 +- doc/users/config_file.rst | 2 +- doc/users/install.rst | 2 +- doc/users/plugins.rst | 4 ++-- doc/users/sphinx_ext.rst | 2 +- examples/nipype_tutorial.ipynb | 2 +- nipype/external/d3.js | 2 +- nipype/interfaces/fsl/model_templates/feat_fe_header.tcl | 2 +- nipype/interfaces/fsl/model_templates/feat_header.tcl | 8 ++++---- nipype/interfaces/fsl/model_templates/feat_header_l1.tcl | 4 ++-- nipype/interfaces/fsl/model_templates/featreg_header.tcl | 2 +- nipype/pytest.ini | 2 +- nipype/testing/data/bedpostxout/do_not_delete.txt | 2 +- nipype/testing/data/fmri_timeseries_nolabels.csv | 2 +- nipype/testing/data/jsongrabber.txt | 2 +- nipype/testing/data/realign_json.json | 2 +- nipype/testing/data/smri_ants_registration_settings.json | 2 +- nipype/testing/data/tbss_dir/do_not_delete.txt | 2 +- nipype/utils/spm_flat_config.m | 2 +- nipype/workflows/data/ecc.sch | 4 ++-- nipype/workflows/data/hmc.sch | 4 ++-- 26 files changed, 35 insertions(+), 35 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 083507547e..06ff582266 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -16,8 +16,8 @@ * The person who accepts/merges your PR will include an update to the CHANGES file: prefix: description (URL of pull request) * Run `make check-before-commit` before submitting the PR. This will require you to either install or be in developer mode with: `python setup.py install/develop`. -* In general, do not catch exceptions without good reason. - * catching non-fatal exceptions. +* In general, do not catch exceptions without good reason. + * catching non-fatal exceptions. Log the exception as a warning. * adding more information about what may have caused the error. Raise a new exception using ``raise_from(NewException("message"), oldException)`` from ``future``. diff --git a/codecov.yml b/codecov.yml index 2724855129..8a1ce2c18a 100644 --- a/codecov.yml +++ b/codecov.yml @@ -25,4 +25,4 @@ coverage: ignore: # files and folders that will be removed during processing - "nipype/external/*" - "tools/*" - - "doc/*" \ No newline at end of file + - "doc/*" diff --git a/doc/_static/nipype.css b/doc/_static/nipype.css index 7d0de1db74..cec080b3d6 100644 --- a/doc/_static/nipype.css +++ b/doc/_static/nipype.css @@ -57,4 +57,4 @@ div.doc2.container ul{ div.doc2 .reference.internal{ font-size: 14px; -} \ No newline at end of file +} diff --git a/doc/devel/gitwash/git_links.inc b/doc/devel/gitwash/git_links.inc index 14a76f5056..a679f2d78a 100644 --- a/doc/devel/gitwash/git_links.inc +++ b/doc/devel/gitwash/git_links.inc @@ -2,7 +2,7 @@ and name substitutions. It may be included in many files, therefore it should only contain link targets and name substitutions. Try grepping for "^\.\. _" to find plausible - candidates for this list. + candidates for this list. .. NOTE: reST targets are __not_case_sensitive__, so only one target definition is needed for @@ -42,7 +42,7 @@ .. _git config: http://www.kernel.org/pub/software/scm/git/docs/git-config.html .. _why the -a flag?: http://www.gitready.com/beginner/2009/01/18/the-staging-area.html .. _git staging area: http://www.gitready.com/beginner/2009/01/18/the-staging-area.html -.. _tangled working copy problem: http://tomayko.com/writings/the-thing-about-git +.. _tangled working copy problem: http://tomayko.com/writings/the-thing-about-git .. _git management: http://kerneltrap.org/Linux/Git_Management .. _linux git workflow: http://www.mail-archive.com/dri-devel@lists.sourceforge.net/msg39091.html .. _git parable: http://tom.preston-werner.com/2009/05/19/the-git-parable.html diff --git a/doc/searchresults.rst b/doc/searchresults.rst index e02449f3a8..bef3894672 100644 --- a/doc/searchresults.rst +++ b/doc/searchresults.rst @@ -170,4 +170,4 @@ Search results .gsc-resultsHeader { clear: none; } - \ No newline at end of file + diff --git a/doc/users/aws.rst b/doc/users/aws.rst index 832072ba62..7ca7f1f3db 100644 --- a/doc/users/aws.rst +++ b/doc/users/aws.rst @@ -99,4 +99,4 @@ s3://mybucket/path/to/output/dir/sub001/motion/realigned_file1.nii.gz Using S3DataGrabber ====================== -Coming soon... \ No newline at end of file +Coming soon... diff --git a/doc/users/config_file.rst b/doc/users/config_file.rst index f53a2900db..279dc1aadd 100644 --- a/doc/users/config_file.rst +++ b/doc/users/config_file.rst @@ -170,7 +170,7 @@ Resource Monitor Indicates where the summary file collecting all profiling information from the resource monitor should be stored after execution of a workflow. The ``summary_file`` does not apply to interfaces run independently. - (unset by default, in which case the summary file will be written out to + (unset by default, in which case the summary file will be written out to ``/resource_monitor.json`` of the top-level workflow). *summary_append* diff --git a/doc/users/install.rst b/doc/users/install.rst index 9f500e7ec4..e5ca16f3be 100644 --- a/doc/users/install.rst +++ b/doc/users/install.rst @@ -117,4 +117,4 @@ Developers should start `here <../devel/testing_nipype.html>`_. Developers can also use this docker container: `docker pull nipype/nipype:master` -.. include:: ../links_names.txt \ No newline at end of file +.. include:: ../links_names.txt diff --git a/doc/users/plugins.rst b/doc/users/plugins.rst index 501e7aa1d6..e655e5f6db 100644 --- a/doc/users/plugins.rst +++ b/doc/users/plugins.rst @@ -82,9 +82,9 @@ Optional arguments:: exceed the total amount of resources available (memory and threads), when ``False`` (default), only a warning will be issued. - maxtasksperchild : number of nodes to run on each process before refreshing + maxtasksperchild : number of nodes to run on each process before refreshing the worker (default: 10). - + To distribute processing on a multicore machine, simply call:: diff --git a/doc/users/sphinx_ext.rst b/doc/users/sphinx_ext.rst index 6326a6041a..02832ef7f8 100644 --- a/doc/users/sphinx_ext.rst +++ b/doc/users/sphinx_ext.rst @@ -11,4 +11,4 @@ and simplify the generation process. .. automodule:: nipype.sphinxext.plot_workflow :undoc-members: - :noindex: \ No newline at end of file + :noindex: diff --git a/examples/nipype_tutorial.ipynb b/examples/nipype_tutorial.ipynb index f18cc6b187..4a01645fe5 100644 --- a/examples/nipype_tutorial.ipynb +++ b/examples/nipype_tutorial.ipynb @@ -1747,4 +1747,4 @@ "metadata": {} } ] -} \ No newline at end of file +} diff --git a/nipype/external/d3.js b/nipype/external/d3.js index 4577992aee..e1ddb0379e 100644 --- a/nipype/external/d3.js +++ b/nipype/external/d3.js @@ -9252,4 +9252,4 @@ } else { this.d3 = d3; } -}(); \ No newline at end of file +}(); diff --git a/nipype/interfaces/fsl/model_templates/feat_fe_header.tcl b/nipype/interfaces/fsl/model_templates/feat_fe_header.tcl index 1caee22a46..4d4d1939fa 100644 --- a/nipype/interfaces/fsl/model_templates/feat_fe_header.tcl +++ b/nipype/interfaces/fsl/model_templates/feat_fe_header.tcl @@ -259,7 +259,7 @@ set fmri(regstandard_dof) 12 set fmri(regstandard_nonlinear_yn) 0 # Control nonlinear warp field resolution -set fmri(regstandard_nonlinear_warpres) 10 +set fmri(regstandard_nonlinear_warpres) 10 # High pass filter cutoff set fmri(paradigm_hp) 100 diff --git a/nipype/interfaces/fsl/model_templates/feat_header.tcl b/nipype/interfaces/fsl/model_templates/feat_header.tcl index 6f5d895129..806d50c517 100644 --- a/nipype/interfaces/fsl/model_templates/feat_header.tcl +++ b/nipype/interfaces/fsl/model_templates/feat_header.tcl @@ -17,7 +17,7 @@ set fmri(level) 1 # 2 : Stats # 6 : Stats + Post-stats # 4 : Post-stats -set fmri(analysis) $analysis_stages +set fmri(analysis) $analysis_stages # Use relative filenames set fmri(relative_yn) 0 @@ -57,7 +57,7 @@ set fmri(inputtype) 1 # Carry out pre-stats processing? set fmri(filtering_yn) 0 -# Brain/background threshold, +# Brain/background threshold, set fmri(brain_thresh) 10 # Critical z for design efficiency calculation @@ -157,7 +157,7 @@ set fmri(evs_real) $num_evs set fmri(evs_vox) 0 # Number of contrasts -set fmri(ncon_orig) $num_contrasts +set fmri(ncon_orig) $num_contrasts set fmri(ncon_real) $num_contrasts # Number of F-tests @@ -259,7 +259,7 @@ set fmri(regstandard_dof) 12 set fmri(regstandard_nonlinear_yn) 0 # Control nonlinear warp field resolution -set fmri(regstandard_nonlinear_warpres) 10 +set fmri(regstandard_nonlinear_warpres) 10 # High pass filter cutoff set fmri(paradigm_hp) 100 diff --git a/nipype/interfaces/fsl/model_templates/feat_header_l1.tcl b/nipype/interfaces/fsl/model_templates/feat_header_l1.tcl index b810b272bf..fc63166cd5 100644 --- a/nipype/interfaces/fsl/model_templates/feat_header_l1.tcl +++ b/nipype/interfaces/fsl/model_templates/feat_header_l1.tcl @@ -57,7 +57,7 @@ set fmri(inputtype) 2 # Carry out pre-stats processing? set fmri(filtering_yn) 0 -# Brain/background threshold, +# Brain/background threshold, set fmri(brain_thresh) 10 # Critical z for design efficiency calculation @@ -259,7 +259,7 @@ set fmri(regstandard_dof) 0 set fmri(regstandard_nonlinear_yn) 0 # Control nonlinear warp field resolution -set fmri(regstandard_nonlinear_warpres) 10 +set fmri(regstandard_nonlinear_warpres) 10 # High pass filter cutoff set fmri(paradigm_hp) $high_pass_filter_cutoff diff --git a/nipype/interfaces/fsl/model_templates/featreg_header.tcl b/nipype/interfaces/fsl/model_templates/featreg_header.tcl index c0b0170819..a73b17bb44 100644 --- a/nipype/interfaces/fsl/model_templates/featreg_header.tcl +++ b/nipype/interfaces/fsl/model_templates/featreg_header.tcl @@ -259,7 +259,7 @@ set fmri(regstandard_dof) $regdof set fmri(regstandard_nonlinear_yn) 0 # Control nonlinear warp field resolution -set fmri(regstandard_nonlinear_warpres) 10 +set fmri(regstandard_nonlinear_warpres) 10 # High pass filter cutoff set fmri(paradigm_hp) 100 diff --git a/nipype/pytest.ini b/nipype/pytest.ini index ea149d6ed1..835b6381c9 100644 --- a/nipype/pytest.ini +++ b/nipype/pytest.ini @@ -1,4 +1,4 @@ [pytest] norecursedirs = .git build dist doc nipype/external tools examples src addopts = --doctest-modules -doctest_optionflags = ALLOW_UNICODE NORMALIZE_WHITESPACE \ No newline at end of file +doctest_optionflags = ALLOW_UNICODE NORMALIZE_WHITESPACE diff --git a/nipype/testing/data/bedpostxout/do_not_delete.txt b/nipype/testing/data/bedpostxout/do_not_delete.txt index a1df420e34..9c5c450dfa 100644 --- a/nipype/testing/data/bedpostxout/do_not_delete.txt +++ b/nipype/testing/data/bedpostxout/do_not_delete.txt @@ -1 +1 @@ -This file has to be here because git ignores empty folders. \ No newline at end of file +This file has to be here because git ignores empty folders. diff --git a/nipype/testing/data/fmri_timeseries_nolabels.csv b/nipype/testing/data/fmri_timeseries_nolabels.csv index 78df6fbd0b..c0fed6c90f 100644 --- a/nipype/testing/data/fmri_timeseries_nolabels.csv +++ b/nipype/testing/data/fmri_timeseries_nolabels.csv @@ -1 +1 @@ -10125.9,10112.8,9219.5,-7.39443,-8.74936,7.28395,13.7953,32.2328,32.4809,18.958,-12.2383,-6.86466,-23.0912,-16.425,-5.70842,11.2467,-1.58574,-4.53717,-17.3842,0.912601,13.0428,2.44622,2.08875,-8.74373,-9.47217,-6.87574,-8.11158,-14.54,0.414787,6.04424,0.540389 10136.8,10115.1,9222.54,-0.120582,-1.94906,6.92247,4.75197,11.0735,0.972766,10.2285,0.717545,-1.04488,-7.64424,-2.10875,-2.44368,1.52535,-1.14131,-1.72589,-1.1247,-0.993354,2.98318,1.29855,2.0688,1.00297,0.135373,-3.25325,-3.12065,0.913296,-1.7868,1.58829,-0.735248 10148,10122.2,9228.62,4.24336,-0.689111,5.12782,0.132862,-6.64526,-14.7952,5.19361,3.68198,2.77598,-0.691866,1.07559,1.71444,-1.30287,-2.75746,1.74208,4.75944,1.80799,-0.064464,2.37174,1.09905,3.5756,2.98064,-0.238711,0.822007,5.07188,-0.864496,-0.208741,-1.31367 10156.6,10132.2,9236.11,-0.047434,-1.79438,-0.767925,-3.78683,-2.46365,-12.9433,2.00586,-0.48292,1.16216,0.113706,-0.639879,-0.0445654,-2.82995,-2.22008,1.46544,3.70217,2.84476,-3.32792,6.701,0.982599,0.145487,0.0501163,-1.16747,-0.630382,-0.0550437,-0.0563951,0.0449386,-0.715988 10162.9,10141.8,9243.46,-0.3687,0.640608,-2.93969,-0.37466,-5.42813,-8.55527,-4.70566,-3.62351,-3.94857,0.847112,0.357187,1.39279,-3.07124,0.779726,5.12671,3.62277,2.86265,3.44378,5.49842,0.895482,-2.1777,0.14728,-0.491475,-0.0257423,-0.32504,2.28464,-0.610659,2.01955 10168.7,10149.5,9249.62,-0.272231,3.00751,-2.20783,-5.50238,-1.65733,-2.39574,-6.82249,-1.5591,-5.38806,-0.315138,2.41171,-0.227563,-0.306796,1.26618,4.45885,3.55662,3.14737,-0.0497907,2.76691,1.04757,-2.50276,3.25334,1.90194,3.54754,3.2308,0.393197,0.115407,1.88919 10175.3,10155.8,9253.09,0.271133,3.11725,-1.24188,-5.32432,6.94595,5.40219,2.63329,1.77742,-0.434798,3.20784,3.1926,-2.12653,1.4207,-0.162939,1.57116,1.20026,2.14004,-4.36978,-0.074248,0.344989,-2.79157,3.57441,2.795,6.81971,4.61981,-3.15395,-0.556388,-0.951462 10181,10160.9,9253.62,-1.52186,-1.02665,-1.31765,-8.89055,1.45638,-6.40533,-8.20284,3.42071,6.34151,7.32703,2.81444,-5.56924,-2.07761,-2.82472,1.75969,1.56549,2.59032,-4.99642,-0.861721,0.661704,1.27294,4.24609,5.72265,7.93181,6.46356,-4.54558,-2.93302,-2.55741 10182,10163.1,9253.53,-4.12759,-5.01517,-1.383,-11.7032,7.03273,-0.354258,-4.14846,2.56836,5.49077,2.70724,-0.00938943,-7.91268,-3.33257,-3.77932,-2.70035,-1.95288,1.51899,-10.5021,0.604386,1.13765,2.8031,0.719838,5.10986,5.4321,3.01561,-5.05514,-2.51591,-2.29453 10178.9,10161.7,9255.33,-2.09727,-3.23639,-0.971464,-6.47564,-1.86208,1.47429,-8.69004,2.23012,2.64935,4.20852,-0.00802028,-4.11236,-1.54808,-1.73414,-2.21966,-2.31888,0.521142,-4.49634,-1.66003,1.37105,1.47741,-1.17943,3.52554,2.31201,0.381259,-1.24137,-0.930002,-0.860505 10176.3,10158.2,9258.8,-2.87976,-1.16821,-1.15587,-7.36873,-2.70663,3.69409,-6.23946,3.17083,3.67683,5.95472,2.6739,-2.5798,1.61294,2.31642,-4.31408,-1.6647,-0.422612,-6.13843,-0.39141,1.92345,-2.82275,-0.742784,1.68164,-0.706688,-1.87652,0.172975,1.51911,1.04727 10176.2,10155.4,9261.93,-1.79655,0.511159,-2.91648,-1.19976,-6.01265,2.43062,-4.91165,1.64787,2.485,6.04132,2.79139,1.36683,2.36631,4.70105,-3.09068,-0.875835,-2.73203,-1.04036,0.0279962,0.57264,-4.70596,0.399049,0.109101,0.540718,-2.52779,1.90878,1.47212,2.48712 10177,10154.3,9263.36,-2.06935,1.47151,-1.59814,1.1621,-8.21806,2.74994,-4.8666,1.6535,2.86737,3.56179,1.87379,3.98852,2.20191,7.00018,-2.12026,-0.322149,-0.459427,1.99009,-0.386875,-1.65524,-2.88602,2.5405,3.09752,5.52644,1.72241,3.28467,2.06659,4.48929 10176.7,10153.6,9262.97,-2.47996,0.0736981,-1.18826,-1.40068,-2.38119,-1.33094,-3.87199,0.498621,1.31667,-0.952908,0.481976,0.0885501,1.11339,4.67043,-2.37383,-2.32579,0.991108,-0.25346,2.41941,-1.44295,0.0394728,1.67752,2.73018,4.10445,2.29859,0.993454,2.7469,3.39394 10174.9,10153,9261.77,-0.957748,-0.455644,0.885525,1.7746,0.0437147,0.878291,0.0855234,-0.572903,1.39546,0.00119098,1.69176,-1.96049,0.156938,2.84845,-1.18488,-2.65197,1.35428,1.98606,1.65427,-0.643756,-1.03602,-0.0406435,-0.236011,-0.961959,1.28125,-0.464305,1.75539,1.84618 10173.4,10153.5,9261.3,-0.583682,-0.792331,1.36077,0.644185,-3.55594,-0.618864,-4.88099,-0.136266,1.51362,2.73872,3.65897,-2.63062,0.416981,0.735765,0.533665,-0.326252,1.0146,2.83848,2.16063,2.30307,-2.01136,0.638055,-0.22921,-3.19692,0.947596,-0.379132,0.678065,0.747812 10174.5,10155.7,9262.24,-0.685336,0.856591,-2.63545,-0.959601,3.25442,0.791955,-2.20612,0.263046,-1.34292,4.47114,2.99912,-2.56858,-0.21931,-1.56389,-0.808263,0.311028,-2.34261,-0.965718,1.98615,3.50723,-1.41951,-0.258476,-1.16227,-1.73014,0.372641,-0.118946,-0.422557,-1.3986 10179.6,10157.8,9264.01,2.59538,3.68921,-1.9033,3.99249,0.109215,-1.86778,-4.51336,0.591929,-1.29086,1.52475,1.01934,0.773735,0.0652847,-3.00075,1.79923,2.1369,-2.11635,3.17035,-1.87907,2.19309,0.880052,-0.480886,-1.94369,-0.204693,1.63785,1.43004,-2.081,-3.24652 10186.9,10157.6,9265.4,2.10402,4.02633,0.884264,0.1708,-3.27208,-4.9215,-1.0364,1.60796,1.70888,-1.43476,1.10519,1.26841,0.0627916,-2.97727,1.13683,2.82663,-0.301705,-0.592683,-3.81587,-0.70989,1.60855,0.103857,-2.48043,-1.22737,-0.312858,1.31617,-1.91269,-3.98886 10192.2,10155.4,9265.29,1.6824,4.26755,1.57687,1.43194,-5.98808,-2.25097,0.153789,0.168572,0.879003,1.68604,0.75956,3.65922,-0.869793,-2.49312,0.497574,2.41553,-1.34226,-0.127659,-3.59295,-1.56547,0.88849,-0.785242,-4.24845,-5.15572,-4.81836,2.77035,-1.44493,-3.44434 10193.6,10153.7,9263.38,1.6491,4.80854,1.08823,5.10222,-5.26833,5.52263,-0.997094,-0.959485,-1.52356,6.15147,0.897033,7.60472,-1.50848,-0.576994,0.845199,3.25263,-2.21353,2.36454,-2.11918,-0.480371,1.405,-1.24949,-1.88424,-5.50221,-4.39822,4.6832,-0.575266,-0.350337 10193.7,10153.5,9260.14,0.371243,3.4575,-0.922956,2.86612,3.70316,4.4652,-2.35097,-2.08567,-4.55866,2.05406,0.20181,5.48777,-0.851734,-0.932792,0.852325,2.66059,-2.76402,-0.836483,3.32512,2.58318,3.54953,-1.82575,1.03107,-3.58566,-4.1055,2.71087,0.64122,1.16036 10193.4,10154.1,9256.45,0.655998,2.95689,-0.961572,2.95967,6.90968,-0.0847335,-1.13659,-2.64581,-3.78971,-2.43015,-0.722449,3.08777,-0.234356,-0.603156,1.30068,1.14368,-2.23215,0.241084,3.91588,3.38796,4.07024,-1.08082,1.15617,-0.375163,-2.54369,1.29418,0.795869,1.31402 10190.3,10152.8,9253.2,2.59279,1.93007,1.93861,4.82647,-1.84288,-5.84018,-7.03235,-2.16958,-0.8999,-4.4747,-1.99497,2.40008,0.0349671,-0.825783,2.00993,-0.184404,-0.576706,6.30193,1.43455,3.63536,2.34484,0.148851,-1.22127,-0.718508,-0.716753,1.50537,0.412978,0.73252 10185.2,10148.2,9250.73,1.88291,-0.127643,2.41457,0.38457,3.28565,2.40364,1.07674,-0.352091,-0.192694,-2.80281,-2.45121,-0.746935,0.454781,-0.345492,-2.38393,-2.35152,-0.468918,-0.28004,0.207449,2.6636,-1.39254,-2.09536,-4.44811,-4.48824,-2.93117,-0.770421,1.19,0.219788 10183,10142.2,9248.93,3.78484,0.701338,-0.71552,3.48407,0.454755,4.3743,3.68099,-0.668556,-3.42636,5.52772,-1.23863,-0.405148,0.665698,1.06479,-0.0251586,-0.48849,-0.847741,1.4814,-5.36764,-0.405219,-1.51485,-3.88226,-5.12764,-5.33767,-4.3365,-1.173,0.417418,0.415356 10185.4,10138.4,9247.93,3.11727,0.196163,-2.018,0.721283,-2.5075,-1.06349,0.331823,-1.2182,-4.01712,4.78444,0.452166,-2.16432,0.55673,1.61447,1.16718,1.44415,0.569846,-0.812131,-8.14324,-2.91296,2.43154,-1.45218,-0.730675,-1.0947,-2.25658,-3.52675,-0.361214,1.09266 10188,10139,9248.05,1.52249,-1.16117,-2.4591,-2.41492,-0.35832,-7.48161,-0.0490082,-2.1421,-3.52013,0.903896,-0.958215,-5.8036,-2.36788,-0.368615,-1.88998,-1.40466,-1.28791,-4.79995,-5.58563,-3.57656,4.13739,-0.274441,1.53352,2.93946,-1.96753,-6.76034,-1.87752,-0.324793 10186.8,10142.9,9249.23,2.29541,-0.414867,0.263844,-2.42527,-9.23597,-12.7958,-5.40665,-1.3296,-0.255947,1.05195,-3.09731,-3.83996,-4.40177,-0.0123634,-1.79533,-2.22933,-1.59891,-1.58539,-4.29444,-3.24283,2.73497,0.939395,2.25632,3.98042,0.672842,-4.87272,-3.0871,0.140664 10183.8,10146.3,9250.93,1.04007,-0.107056,-0.719832,-5.17314,-6.41206,-13.4527,-3.51115,-1.82372,-1.0661,0.164654,-4.87432,-3.16371,-3.16216,0.547311,-2.31938,-3.32366,-2.59406,-3.07878,1.07584,0.135595,-0.15385,-0.198986,-1.76614,-0.364142,-1.44816,-3.17832,-0.666637,0.539005 10182.5,10148.1,9252.57,1.58315,0.552138,-2.38854,1.84879,-2.25441,-6.8381,0.208721,-2.73312,-3.19332,-2.49192,-4.21087,0.445019,0.0651566,2.67403,-0.780414,-2.43461,-3.10543,1.48742,-0.123359,0.0321366,-2.00728,-1.30717,-5.02137,-5.05394,-3.39985,-0.233706,2.10556,1.51466 10182.7,10149.6,9253.33,0.671616,-1.8801,-5.19861,1.6691,-0.386439,-6.73637,0.390118,-1.36276,-2.8229,-3.74619,-1.53148,0.15594,0.934737,1.96014,-1.35363,-0.924511,-3.00858,0.653744,-1.84706,-3.59509,-0.247233,0.962108,-1.40552,-3.28119,-2.22432,0.0626129,2.48273,0.969888 10182.9,10150.9,9252.01,0.0166707,-2.52456,-5.48285,2.26653,-2.03587,-6.50283,-1.00325,0.264499,-1.46362,-0.822672,-1.11829,0.403605,-0.734484,-0.382999,-0.186567,1.24812,-2.13095,1.80897,-2.82131,-6.15356,2.54337,2.39696,2.51379,2.41699,0.307725,-0.195503,-0.252349,-0.890546 10182.1,10151,9248.33,-1.21698,-1.52567,-2.334,0.102378,3.74418,-1.36756,3.51501,1.50357,-1.80774,-0.855037,-2.71284,0.0746735,-1.2904,-2.37263,-0.326812,1.37779,0.0811662,-2.04277,0.452769,-4.37491,4.60025,0.785458,0.944597,2.57121,-0.443829,-1.9031,-1.78376,-2.25217 10180.2,10149.4,9243.85,-0.498632,0.815261,-1.05027,1.32586,2.65892,-5.17029,-0.588453,1.63481,-3.33979,4.4087,-1.26981,2.01576,-3.03953,-3.66687,1.33091,1.62961,0.568999,0.53543,0.477935,-1.78405,3.91722,-1.12653,-3.07327,-2.27103,-2.21119,-0.0469714,-3.05949,-3.83303 10176.1,10146.3,9240.54,-0.464849,1.25223,-1.14736,-0.645201,4.96922,-0.805424,1.85313,1.43677,-1.45072,6.22509,1.54511,2.89442,-3.56094,-4.35854,-0.476689,0.39343,-0.929162,-1.07774,0.941846,-0.57756,0.363373,-1.13491,-1.30865,-3.06369,-1.8739,2.47973,-3.19611,-5.38414 10169.3,10142.4,9238.91,2.28739,1.91951,-0.759834,1.17008,-1.10807,0.137649,-1.76481,-0.427729,-0.592675,2.50623,0.607717,4.10404,-2.20382,-5.11375,1.80008,0.383348,-3.40396,4.33491,0.605228,-0.0871236,0.185566,0.480246,2.74078,1.48145,2.07534,4.96863,-2.65852,-5.78272 10162.1,10139,9238.14,2.03262,2.32633,0.46709,-2.26524,5.80967,5.85587,5.67759,0.185696,-0.246666,-0.787877,-0.201738,0.61348,-0.542043,-3.51173,0.345287,-0.426571,-4.01566,0.315299,2.10005,-0.391753,2.39343,1.28396,3,4.99164,5.3145,2.31592,0.0224444,-4.14279 10158.4,10136.9,9237.31,2.77556,2.83113,1.37245,1.19159,2.19923,-2.0116,3.1913,1.03754,-0.929092,0.870894,1.00256,-0.624392,-0.561338,-2.99529,2.23674,0.823539,-1.63024,3.75817,0.298891,-1.18515,4.54738,1.25951,1.91277,3.57793,5.44217,0.785618,0.025315,-3.27161 10158.5,10135.5,9236.37,0.0672571,0.761886,2.35427,-0.889999,6.73976,-1.98269,8.45302,1.1398,0.0604089,-1.15193,1.32222,-2.47069,0.131408,-3.48238,-0.669944,0.753279,3.07189,-2.04262,0.174304,-2.32107,2.83224,0.708328,3.23848,0.984911,2.384,-1.28385,-0.548071,-3.32946 10160.6,10134.8,9236.46,-0.783525,0.239203,0.00548465,1.88108,6.83171,-2.89703,7.27976,-2.71585,-1.47417,2.12383,-1.04536,-1.14095,0.145875,-4.3962,-0.139564,0.781551,3.40043,-0.28834,-0.343608,-2.36391,0.0938093,-0.36295,1.0276,-0.578692,-0.619797,-0.489157,-1.92106,-4.163 10166.1,10135,9239.02,0.124276,1.29463,-1.44975,3.21172,2.53479,-3.38317,-0.20102,-4.72755,-2.14129,5.53743,-1.24849,0.994366,0.436372,-3.09635,2.19121,1.13794,1.52365,3.0586,0.622146,-0.699363,0.103461,0.316277,-1.73095,-0.195395,0.490618,1.44514,-2.50878,-3.62472 10175.6,10136.9,9243.9,1.67228,1.70099,-0.125799,2.04051,6.74509,2.05118,7.82124,-3.08565,-1.70842,3.37127,-0.160655,1.32998,0.57087,-1.46351,1.80831,-0.585194,-0.267853,0.719624,2.12333,-0.931791,2.61407,0.519467,-1.78038,1.70819,2.66646,1.47407,-2.48388,-2.6294 10184.4,10140.5,9249.09,4.05746,1.49391,3.1491,4.74869,1.42089,-7.65297,4.6083,-1.50292,-0.681543,0.792377,-1.54194,2.19467,-1.449,-2.54459,5.38937,-0.0662613,0.683022,6.46847,-1.151,-2.09676,5.40097,0.0884146,-0.584039,0.411805,2.87021,2.70096,-3.69024,-2.72328 10185.2,10143.8,9252.71,2.20708,-1.9117,6.2705,-1.38994,9.88462,0.984595,14.8745,1.09177,3.01497,-6.59006,-3.06879,0.864155,-0.352553,-2.42934,1.6214,-0.899998,2.90809,-2.62154,-0.748965,-1.78716,3.1828,-0.76616,1.51574,-1.80336,0.759499,1.08543,-1.48814,-0.830864 10176.5,10145.2,9254.8,3.08758,-1.24415,2.30133,1.5123,4.9996,-2.25743,5.71269,0.326257,0.862459,-5.32366,-2.15784,1.98295,-0.769376,-3.24456,1.73394,-1.18022,0.303592,1.19388,-1.18318,1.1848,-0.484859,-3.12715,-2.31674,-4.16244,-1.41399,2.32149,-1.0187,-1.70219 10164.6,10145.4,9256.92,1.59078,-1.06701,-0.557541,-2.88977,3.22953,-0.245042,-0.474481,0.0498212,-1.16809,-8.33134,-0.306573,0.38113,0.242976,-2.39828,-1.29092,-1.68013,-0.127576,-1.94114,1.03024,1.7825,-1.44807,-2.86352,-4.13379,-1.78466,1.5241,1.16147,-0.513496,-2.30027 10156.4,10145.9,9260.21,0.0333157,-1.40254,-1.63643,-2.63202,2.15792,2.8366,-1.32406,-2.25364,-4.61227,-7.74587,-1.005,0.107792,-0.131513,-2.0428,-1.28031,-1.65736,-0.0589992,-0.767749,0.0451012,-1.23948,0.334266,-2.05544,-5.74107,1.40617,2.47259,0.129519,-1.22605,-3.50154 10152.5,10145.2,9264.25,-2.23854,-3.34598,0.871046,-4.48776,-5.12246,-0.367558,-7.49548,-3.04105,-2.99035,-3.84367,-2.67766,1.19195,0.695189,-1.99211,2.38266,0.800284,2.92667,1.82052,-0.796218,-1.82753,3.43662,1.60186,-2.49788,2.02216,2.59346,0.975508,-0.397427,-2.78437 10148.6,10141.1,9267.56,-4.64613,-5.4569,3.80281,-6.22039,0.554038,5.00519,-0.395733,-3.04225,0.570141,-6.95862,-4.49105,-0.00732036,3.78285,-2.09066,1.46914,-0.873643,3.95228,-2.08532,2.8568,0.749314,1.78963,1.02579,-0.808831,-1.60113,-1.17483,0.544949,1.95805,-1.27827 10142.4,10134.6,9268.73,-4.02228,-5.3818,4.39201,-6.57399,-2.68308,-0.146626,-0.297909,-1.28233,3.72363,-10.5635,-3.46562,-0.498293,3.92457,-1.10422,0.725311,-0.888612,3.1725,-1.82837,4.64182,1.32637,-0.56378,0.781271,3.29557,-0.557202,-0.712584,0.587691,2.76212,1.05325 10137.8,10128,9266.83,-2.98689,-3.62614,2.49614,-3.78405,5.33483,-3.24499,-1.4797,-1.49474,0.75769,-13.0722,-3.57543,-1.73535,1.13307,-2.81826,-2.67056,-2.75063,-0.407379,-1.38965,7.67619,2.2374,-2.93415,-2.1994,0.956463,-2.25511,-4.42128,-0.889014,2.30781,-0.144069 10139.6,10121.2,9261.84,-1.19244,-2.09691,-1.17019,-2.92359,1.84257,-9.64131,-8.2266,-2.48032,-2.29368,-7.41116,-3.60172,0.404837,-2.31741,-3.52505,-1.14341,-1.1367,-2.22469,2.93998,5.91064,0.841518,-1.68308,-1.06298,-0.398387,-1.68239,-3.53445,0.38234,1.02165,-0.403129 10146.2,10113.8,9255.3,-3.35595,-3.34535,-1.74811,-10.4556,3.60927,-0.776329,-3.08604,-1.29687,0.835023,-5.76979,-1.7646,-2.22816,-1.31439,-0.382083,-1.73312,-0.792276,0.206848,-4.1992,4.29806,-0.830575,-1.71405,1.40452,2.00247,0.106559,-0.768805,-1.08451,1.11784,1.22578 10152.4,10107.8,9249.87,-2.49869,-3.87311,-1.98238,-6.90342,-1.23671,2.90852,2.97754,-0.581043,2.81778,-2.71728,-1.21684,-5.07044,0.497485,2.01224,-0.365556,-1.64542,1.17956,-3.76085,-0.573467,-2.58111,-2.12663,0.378165,4.18795,1.24581,-1.36196,-2.87649,0.482267,1.63454 10154.8,10107.2,9247.27,-4.01788,-5.39388,-1.72161,-10.3153,-0.251037,-1.57831,1.61553,1.18147,5.7765,-0.599766,-1.22598,-10.0294,0.895145,2.02015,-4.45992,-2.58818,2.98391,-9.45103,-1.41902,-1.29446,-0.55725,-0.180421,6.94249,-0.594659,-3.53394,-6.50742,1.38112,1.51458 10153,10112.2,9246.76,-3.24249,-5.01072,-2.02956,-7.46567,0.0264794,-1.5224,-3.31193,1.53111,5.32332,2.5335,0.40251,-7.05633,-0.711568,2.89381,-5.39998,-1.36446,2.04786,-7.02942,-4.53297,-0.88262,-0.357391,0.595822,6.5409,-2.84395,-2.64994,-5.7378,1.39939,2.97985 10148.7,10119,9246.16,-3.96002,-4.42756,-3.26432,-8.69557,4.03628,0.616301,-3.92147,2.76458,1.652,2.17356,4.22927,-4.5247,-2.33417,3.89508,-5.29918,-0.309883,-0.288513,-8.36711,-3.09529,-0.126421,-1.8539,2.38545,3.61409,-1.26649,0.429596,-4.19612,1.45711,3.95651 10145,10125.2,9244.17,-1.75695,-0.511195,-1.73883,-3.34742,-1.26592,5.24499,-3.03549,2.78645,-2.1334,0.220919,5.88292,0.160927,-1.7455,5.37331,-1.59599,1.91312,-0.631146,-3.16886,-2.94994,0.34822,-3.01289,2.84951,0.356135,3.47859,4.18276,-0.12287,0.984563,3.64398 10143.1,10130.2,9241.27,-1.71615,1.12867,1.04805,-6.57347,2.41341,16.2593,7.00371,0.924589,-2.71609,-6.2656,3.57183,0.37743,1.96421,5.66573,-2.3041,2.26799,0.668846,-8.32571,2.30148,2.66333,-1.75615,2.71555,1.44408,6.00224,4.85886,0.685304,3.03234,2.82015 10140.7,10134.4,9239.05,-1.25992,2.46902,-0.556969,-2.76672,5.45596,12.4649,8.36959,-2.49709,-3.8708,-1.40646,1.38854,1.37064,2.12007,3.84209,0.459629,2.15086,-1.24194,-4.15365,4.52043,5.4809,0.876317,0.656659,-1.01116,2.09458,1.65028,2.77599,3.21635,0.381243 10133.6,10137.8,9238.32,-2.22442,1.37094,-0.787327,-1.05469,3.55443,5.14715,-0.0509983,-0.0905216,0.72894,3.96149,2.38061,1.75467,3.09083,4.18358,2.79613,3.29833,0.325666,-0.671704,6.07566,7.72379,3.13564,0.655668,-2.59152,-1.76199,1.58102,4.45884,3.34631,0.480564 10121.1,10140.7,9238.2,-2.17367,-0.866588,-2.79273,0.692199,10.1863,9.97874,6.04483,2.66482,1.76948,2.61332,1.9281,-1.1243,5.03132,3.85731,-0.443337,0.284932,-0.868815,-3.31091,8.51065,6.49177,2.23459,-1.67042,-3.77735,-2.781,-0.902713,1.50205,4.04064,0.197185 10110.8,10144,9237.47,0.303664,0.966366,-2.65365,4.69141,3.98147,5.09796,4.57488,3.26927,0.562439,5.41174,1.92471,-1.15766,3.6349,2.42314,-0.0874924,-0.0560302,-1.22366,1.9914,3.44357,1.69106,1.98031,-1.32375,-0.576816,-1.03349,0.269332,-0.300454,3.28264,-0.458562 10110.3,10147.7,9235.48,1.28867,0.940385,2.1165,-0.581377,-0.643187,-2.16313,1.69237,2.47912,1.37859,3.32286,1.26412,-0.720553,2.36863,-1.25903,0.0706914,0.944374,2.2859,0.229574,1.5842,-0.12766,4.43122,1.34327,3.34673,-0.404948,2.87655,-1.67866,3.04869,-0.25307 10116.7,10150.7,9232.33,0.394714,-0.833445,4.94793,-6.11826,9.22151,2.99358,11.1041,1.15853,2.93899,0.397365,0.0221406,-0.0976144,-1.13452,-3.42557,-3.72862,0.476803,3.69054,-8.12164,2.48493,0.363106,3.87676,0.504363,0.972674,-1.44388,2.15926,-0.828986,1.75931,-0.549928 10121.4,10152.8,9229.14,1.29508,-0.757006,3.12597,-1.6729,7.62364,-0.936804,6.48918,-1.03742,1.86227,-0.262351,-0.75051,2.31301,-4.8422,-4.5034,-2.66476,0.578808,1.27532,-2.04282,3.45288,3.01897,0.564668,-1.21876,-3.06331,-2.70583,0.257935,3.52846,-1.56111,-1.5308 10121.6,10152.4,9226.86,0.677648,0.378414,1.31475,-2.61018,4.91454,0.37514,2.86121,-0.193973,1.93324,-4.63591,1.10695,3.14457,-2.96694,-2.19304,-2.99025,0.50097,0.165722,-0.200595,6.85438,4.63234,-2.47705,0.342532,-1.30419,-0.141339,1.63084,4.32707,-1.19328,0.76139 10120.5,10149.2,9225.49,0.499478,1.88224,-2.14427,-2.77288,10.6927,1.71766,6.49787,0.43981,0.0705592,-5.13201,2.57263,1.48076,-1.20267,-0.591255,-4.74193,-1.79266,-1.46188,-3.42451,8.04316,3.54243,-2.30088,0.0710442,-2.83238,0.653942,0.240506,0.904871,0.430945,1.6283 10121.2,10144.8,9224.89,1.35965,2.80608,-1.94166,1.75583,0.26227,-8.26437,0.567312,1.6259,1.60009,0.0627174,2.62631,2.65738,-1.31444,1.36503,-0.138702,-0.303116,1.07964,0.805711,0.6712,-0.0379901,0.596301,1.49046,-2.9437,-0.0854658,1.7116,1.14138,0.19577,2.11315 10121.7,10140,9224.64,-0.625981,1.46152,0.571473,-0.708952,-3.97306,-7.60183,3.54876,2.52756,3.43643,-3.37318,1.25185,1.95327,-0.430742,1.99167,1.38528,0.439469,3.35733,-3.21518,-3.33649,-3.33716,1.63613,2.87364,0.216347,-1.19264,2.34646,1.38095,0.250252,2.26893 10117.5,10135.7,9223.59,-0.644241,3.50756,1.18011,1.32346,-4.09529,-1.15572,8.91836,0.864807,0.810206,-4.21922,0.85698,1.54667,-0.984211,1.49262,0.424346,0.272079,0.55043,-3.11065,-4.92549,-5.21789,0.616593,0.933381,0.453042,-0.907799,0.816878,0.888407,-1.07882,0.897744 10109,10134,9221.44,1.24811,3.97674,3.11247,-1.16572,-9.20759,1.26864,10.07,0.861166,0.629341,-5.07074,1.84156,0.554677,0.501606,2.3508,-1.99158,1.42546,-0.0624237,-4.75601,-4.11731,-5.27973,3.12042,0.927954,2.01431,1.91643,2.26937,-2.42322,-1.85499,2.11246 10103,10135.6,9219.87,2.2046,4.10281,1.87105,-2.44462,-1.81059,2.73657,16.517,1.49188,0.862687,-1.50652,2.91423,-2.27191,-0.311967,3.16828,-6.05317,-0.647296,-0.600809,-9.86797,-3.317,-4.05579,3.51099,-1.77799,-1.17227,0.17711,-2.12588,-5.86398,-2.08211,1.43944 10103.9,10138.7,9220.3,3.77174,5.49059,1.2637,1.03751,-12.6254,-6.24364,0.90728,3.65224,3.71822,2.59825,4.31988,1.86088,-2.62582,4.43061,-1.00461,2.10803,1.47555,-3.28777,-8.18549,-4.31695,2.95113,-1.34785,0.676274,-1.38936,-3.04336,-1.37001,-2.35773,2.00922 10108.6,10140.8,9221.82,-0.70593,3.90046,-1.14247,-3.0764,-1.47295,-1.10809,-0.510284,3.79285,2.60078,-1.28697,3.77566,2.32766,-3.54475,2.99719,-1.20306,1.33262,-0.719923,-9.06449,-7.33119,-4.80493,-0.721145,-2.4024,1.79362,-1.97223,-5.04385,0.0875954,-1.73778,0.950888 10113.1,10142.1,9223.55,-1.06377,0.843971,-1.44889,-5.32939,2.69029,-3.83385,-5.63119,0.535717,-1.61039,-5.59267,1.26514,2.05707,-3.31026,-0.958826,1.33732,1.46551,-3.13585,-9.66605,-6.00234,-4.35532,-0.26599,-0.831562,2.98878,0.128679,-2.54674,-0.278737,-3.58409,-1.324 10120.7,10142.9,9227.01,3.56995,1.04759,3.75113,-1.7421,5.12807,3.1454,2.38504,-1.62768,-2.93793,-5.71266,-0.530001,2.84448,-2.04436,-1.31251,2.17243,2.11298,-0.867238,-7.66197,-6.87331,-3.32769,-0.373459,-0.116178,2.03689,0.379397,-0.00605166,-0.182103,-4.1657,-1.22794 10135.1,10142.1,9232.63,4.13322,3.14571,5.42112,-9.50857,6.61076,-1.5265,-1.3563,-0.229734,-0.953633,-2.39287,0.0907423,-2.25912,-2.95494,-0.622513,-0.878638,3.11006,2.20909,-12.7591,-4.65267,-0.652931,-0.508727,-0.484787,-1.43884,-3.89903,-1.68783,-1.20607,-1.47415,-0.30987 10150.6,10139.9,9237.26,7.08686,7.1115,3.05908,-7.31514,-2.75139,-6.15754,-6.75994,1.34201,0.583247,1.72791,0.0586144,-1.05549,-2.23348,1.35232,0.957745,3.9225,0.27845,-7.28043,-8.71747,-3.21629,1.12263,-1.08286,-3.72117,-4.10901,-0.817087,-0.319549,-0.171801,1.86899 10161.3,10137.9,9238.2,5.45348,5.872,0.0360833,-8.71486,1.68904,-1.57501,-9.84544,2.70784,2.39605,-1.45535,-0.548901,-2.93743,2.31592,2.21738,-0.0678836,1.75621,-1.90485,-7.83172,-5.34721,-0.902631,2.89369,0.938874,1.08004,0.946796,3.39736,-3.2386,1.23533,3.43628 10168.7,10135,9236.89,1.9988,3.16081,-0.959961,-1.65775,15.8147,12.2058,-6.43511,1.69639,2.59198,-2.06327,-0.47323,-4.35241,3.77438,3.79233,-2.16153,-2.08622,-2.56136,-3.89096,-0.736348,5.49778,-0.475583,0.770127,3.05002,3.17719,3.81221,-4.99556,1.59718,3.01185 10178.3,10131.2,9237.28,0.818385,-0.233269,1.46873,6.63122,10.9706,17.5879,-3.54675,0.677416,3.72244,0.655626,-0.201865,-1.16835,1.57109,5.42876,-0.444523,-1.12764,-0.256929,5.62565,-1.99386,6.4084,-2.47406,1.18593,3.2834,3.0293,3.51573,-2.53776,0.959038,3.23253 10193.3,10130.2,9242.16,-2.48525,-2.35837,2.98987,5.98816,11.4719,15.9039,-4.84232,-0.825315,2.54659,1.43064,-0.659643,-2.96556,0.571285,2.41784,-2.00371,-0.757574,1.41844,6.37057,1.42823,7.71148,-4.93994,-1.54988,-0.232174,-1.34349,-1.26249,-2.05601,1.26179,0.464125 10210.2,10133.3,9250.5,-0.302459,-1.69801,0.843368,2.30597,6.15326,11.0157,-5.9274,-1.05244,-1.68469,-0.278629,-0.694935,-0.891837,1.23651,-0.21345,-0.305015,-0.0987808,0.160233,4.91775,0.166271,3.92353,-3.88399,-2.55526,0.198425,-0.923912,-1.86728,-0.552523,1.22445,1.15572 10221,10137.3,9258.6,-1.56339,-0.256664,0.840544,-1.61826,11.0061,14.4706,-2.59098,0.449882,-1.65171,-1.89163,-1.35949,-1.40198,3.60618,0.270121,-1.02351,-1.1912,0.778059,-0.110922,0.867721,2.27546,-5.20223,-2.14642,1.17716,-1.36266,-2.51971,-1.10085,2.42789,2.32548 10222.9,10141.6,9264.61,-4.74868,-0.212232,1.05283,-1.29221,10.744,4.75459,-2.81401,0.644295,0.850172,0.179994,-3.01777,-4.30435,2.71079,-1.12735,-1.29174,-2.07496,1.34575,1.0376,2.5823,1.95702,-4.5778,-1.28586,-0.494008,-4.39926,-5.46478,-2.40477,1.70545,-0.546783 10222.5,10148.7,9269.02,-3.49502,-0.678579,-0.213247,8.06515,8.4472,0.736921,12.8231,-0.680516,1.09355,1.44143,-3.62765,-2.08929,0.194595,-2.35671,-0.392866,-2.86869,-0.655593,6.76095,0.52286,-1.94996,-0.69629,-1.94695,-3.05311,-3.36287,-5.8798,-2.04553,-0.962602,-2.08692 10226.3,10155.2,9271.48,-1.96969,-0.131236,-7.34816,10.3469,1.43629,-18.1274,6.28789,-1.94889,-4.21799,9.10578,-0.96868,-0.513386,-5.07894,-4.75252,3.07715,-1.21549,-4.62974,12.6049,-2.11208,-4.5134,4.07597,-2.26695,-5.31607,-0.080814,-4.75562,0.0499323,-2.60796,-2.05158 10230.1,10151.7,9270.27,-0.441668,1.99564,-2.24149,10.4542,-4.09391,-6.45561,-1.77752,0.712394,-1.02642,8.25875,2.54249,4.31177,-1.67116,1.28898,3.90167,2.27301,-0.292013,13.1856,-3.31394,-4.23242,0.509949,-0.582218,-1.55254,1.54596,0.383257,3.15094,0.659781,3.83919 10224.9,10138.7,9266.49,4.67287,5.1299,-1.26323,13.4301,-10.2745,-9.49416,-12.2719,-1.18436,-2.87586,6.16837,2.83569,6.07774,-2.8315,2.00898,6.40272,2.01559,-1.86315,15.8694,-4.72684,-3.25468,-2.65905,-3.311,-6.24296,-4.21139,-3.70695,4.80612,0.395122,1.76566 10212.8,10131.4,9265.67,3.01888,4.86272,2.80549,9.41976,5.08199,16.7307,3.01517,-1.39232,-0.901598,-3.17761,2.70511,2.89126,0.206015,2.09237,1.79821,0.427067,-0.286912,4.97158,1.88506,1.52106,-4.78901,-3.10639,-5.19696,-1.88352,-1.17405,1.76068,1.66502,-0.462334 10205.3,10137.3,9271.29,5.0191,6.44861,-1.029,10.2232,1.46143,6.79866,-7.1328,-3.52906,-8.32347,-3.93806,2.03961,4.301,-3.73195,-3.92217,6.44854,2.90593,-2.49697,11.4551,-0.562561,1.57056,0.711111,-0.350636,-4.25263,3.76126,3.75639,3.70316,-1.79131,-3.47622 10205.7,10147.7,9278.59,5.83546,6.36501,-0.202118,7.16455,-12.9828,-12.4607,-27.3389,-3.33415,-9.60681,-6.26496,-0.539386,6.78879,-3.91681,-6.10831,9.8609,6.12423,0.502419,17.71,-2.72276,0.90307,5.89102,4.35576,1.47131,6.87862,9.08531,6.44279,-3.45175,-1.92878 10205.4,10153.7,9279.43,2.61204,3.79426,2.8599,4.2373,-6.30104,-6.55433,-17.9117,-2.30217,-4.33352,-8.56342,-2.54108,4.06241,-0.221565,-2.25183,3.87958,2.42384,1.7425,10.0636,-0.274803,1.38918,2.9688,2.49859,1.85002,3.57782,5.56749,4.25356,-1.57246,0.769565 10198.3,10155.2,9271.53,1.79363,-0.436721,3.46418,1.17919,-6.21503,-12.0337,-14.7144,-0.753172,-0.422946,-10.0673,-1.05729,0.16841,0.00393219,0.329848,3.06417,0.641188,1.13987,4.50086,-1.96838,-0.158451,2.22687,1.01485,-0.617827,-1.82684,0.837829,1.35672,-0.969077,2.83866 10187,10154.7,9258.9,0.357944,-3.85399,-0.403587,-0.905802,-6.94279,-16.6984,-17.7781,-0.22625,-1.87358,-4.80273,-0.208291,-3.41762,-1.38116,-0.435891,4.56144,1.47257,0.881539,4.31043,-2.35524,-0.63135,2.49929,2.73787,-0.3439,-0.967951,0.479767,-1.25236,-0.198644,2.70849 10175.5,10150.8,9245.55,-2.22289,-4.64417,-1.57873,-3.37822,-3.35046,-9.88201,-14.3071,0.168661,-0.756661,-2.69992,-1.57269,-4.61371,-0.741804,-0.794809,1.95045,1.34471,1.90438,0.670421,-1.36383,-0.0207592,1.95603,4.44548,1.70081,0.896225,1.96219,-2.68814,1.37985,1.21966 10163.9,10144.5,9233.39,-1.0609,-3.6573,-1.22008,-1.66234,-8.72059,-9.8591,-9.71449,-0.237702,2.4907,-0.383432,-2.45784,-2.52105,-0.451308,-0.95008,0.101755,0.998499,0.0147502,0.763548,-2.08901,-0.286814,2.08671,3.24587,1.98374,-1.03823,1.41551,-1.64013,0.866956,-0.452541 10152.5,10140.9,9224.11,1.58528,-1.3177,-2.21666,-0.770113,-12.1162,-14.2306,-0.877621,-0.372338,1.62768,2.76293,-0.69447,0.389726,-2.24466,-0.492948,-1.07534,1.2119,-2.84085,1.62365,-4.58137,-3.47859,2.38127,-0.58689,-1.20067,-5.12188,-1.38938,0.191315,-1.00868,-0.231626 10144.9,10141,9218.45,2.9188,-0.174985,-4.58083,-6.94645,-12.0718,-23.1781,-6.27315,-0.364715,-3.24703,1.70145,0.993811,-0.598274,-3.56103,-0.759525,0.496704,2.46032,-1.89983,0.597576,-2.01394,-2.93857,4.73883,-0.682548,-1.34504,-3.70636,-1.23983,0.0550942,-2.01066,1.58053 10141.8,10139.7,9215.32,1.06474,0.421951,-5.29652,-9.2234,8.36446,-5.7284,0.960531,-0.909556,-4.90704,0.770291,1.54135,-5.62095,-2.20122,-1.09503,-2.35206,-0.974175,-1.0101,-7.23319,3.01594,0.768168,2.39478,-1.32615,-1.6404,1.53725,-1.51813,-3.97654,-1.7665,0.833795 10141.4,10134.3,9214.23,0.86273,1.35397,-0.657898,-4.72598,2.71892,1.93911,-8.71178,0.127278,0.812447,5.14689,3.34014,-5.47575,-0.124804,-2.70815,-0.541837,-0.600256,1.53834,-3.53843,0.0605411,2.43643,0.689316,0.936364,1.45495,3.58725,0.917646,-4.12549,-2.16127,-1.91164 10145.6,10128.8,9217.09,0.035273,1.26692,3.11502,-4.96307,-6.78084,1.02172,-8.79811,2.69846,4.94751,11.3598,6.51275,-2.0705,0.657905,-2.59061,-0.35795,1.18908,3.42851,-3.05799,-3.41004,0.806424,0.399374,2.92706,4.4301,0.273598,0.553543,-1.76552,-0.755718,-3.46001 10157.5,10128.8,9225.31,0.248702,0.312336,2.57768,-4.36878,-7.1619,-0.049009,-3.2758,2.7151,1.99544,11.1247,7.80862,3.2311,1.05086,1.13953,0.117826,1.5885,2.6575,-2.74279,-2.82058,-0.206648,1.25493,1.71967,2.81266,-4.13773,-2.45207,2.50385,0.789243,-0.268176 10170.7,10133.1,9236.11,-2.23675,-0.885477,2.34602,-6.30375,3.19378,12.3402,5.26964,2.51006,1.86666,4.33237,6.63528,4.85198,3.48519,8.46812,-2.52066,-0.634166,3.57125,-6.40349,1.46869,0.818123,-1.68738,1.2743,1.91738,-0.951766,-0.403311,4.63843,3.18061,7.04436 10176.7,10136.2,9243.78,0.782244,0.338989,-0.179665,0.677035,-11.8864,-9.98092,-16.6014,-0.0876104,-1.39338,0.511794,2.05749,5.37285,2.64871,7.7119,4.8232,-1.23349,2.56586,8.98335,0.643413,1.73431,-0.63479,2.49537,-0.600719,2.26345,1.69812,6.71431,2.31721,8.10433 10176.8,10136.6,9245.84,-3.20567,1.13405,3.92668,-1.78597,-0.236073,-2.19382,-11.4115,3.08973,1.33702,-3.27145,0.727769,-0.100717,5.38921,8.19297,0.492232,-2.20151,5.25989,3.6589,4.08819,2.21554,-1.32513,3.54291,0.119275,3.23854,3.862,2.19948,5.28701,6.25834 10178.4,10137.4,9245.74,-5.53585,0.420645,5.85295,-4.47724,14.54,12.4497,8.36972,4.99424,2.57479,-4.3639,0.677018,-2.6813,6.67898,7.5884,-5.54187,-1.3688,4.05586,-6.15054,4.2909,-0.899213,-1.24567,1.90686,-0.469126,1.72139,5.00978,-1.65339,6.96518,3.71489 10184.8,10141.1,9247.89,-4.95644,-1.91401,3.7243,-7.95873,7.49028,6.40526,5.31843,3.53676,4.4376,-3.95261,0.746514,-2.92295,5.17495,5.09822,-5.56387,2.13589,1.74219,-7.51099,1.13636,-2.24892,-0.712168,1.40767,0.401594,-0.663717,6.22808,-1.51586,5.59537,1.86444 10195.1,10147.9,9253.27,-3.98,-3.06823,-2.05534,-6.10099,3.83685,4.55708,3.92119,0.928846,2.49159,0.0763172,1.14792,-2.88509,3.3624,3.14131,-4.76678,1.53759,-2.49281,-5.00974,0.3227,-1.57677,-2.36177,0.558465,1.76223,-0.153596,3.21585,-0.248642,3.44061,1.09292 10206.6,10155.3,9259.98,-4.64998,-1.64546,-4.6585,-6.92405,-1.23826,-1.4651,-7.80907,2.03872,0.322905,5.35637,2.9557,-1.90346,0.941137,2.90995,-2.25745,1.6362,-2.73525,-3.06893,0.361893,-0.410406,-1.95298,3.18373,4.96997,3.18307,2.09522,2.29277,1.29516,1.46329 10215.1,10159.8,9265.65,-5.64262,-2.22323,-2.32616,-8.62966,1.24852,3.53986,-7.11813,2.5704,-0.221435,0.41167,0.765415,-1.44792,2.10023,1.14341,-1.90736,0.761342,-0.0657556,-6.90094,4.60419,2.00852,-1.1143,4.44335,7.23913,4.6059,2.18355,1.92624,1.0442,1.06642 10218.9,10161,9269.98,-5.54728,-2.69742,0.623383,-4.54971,5.62832,12.115,1.60837,0.527375,0.225195,-4.35554,-1.09064,-1.69716,2.68584,-2.42078,-3.28377,-0.48855,1.46337,-7.59929,7.41232,3.78152,-1.52786,1.12019,5.14455,0.902689,0.791392,0.171231,1.01653,-2.1951 10225.1,10161.4,9274.87,-4.18459,-1.40959,4.0543,-3.78563,4.56469,13.1486,7.4468,1.32559,4.01602,-4.26528,2.47676,-0.706977,1.49841,-2.44619,-4.48237,0.314642,3.21848,-7.78537,6.45365,2.67192,-0.518631,-0.579868,3.1551,-3.30298,0.42352,0.385421,1.09082,-3.38628 10238.6,10163.7,9281.72,0.163978,0.29531,1.39945,-1.88245,0.770367,3.01996,6.47156,0.843119,3.05229,-2.89342,3.69162,1.01002,0.156961,-1.63668,-1.88068,0.459627,0.572044,-3.8789,6.07964,1.73877,1.04155,-0.952277,-0.352698,-3.89818,-1.13337,1.63306,0.655322,-3.05775 10252.3,10168.8,9289.58,1.69242,0.803041,0.969081,-1.57571,10.1963,10.1486,9.01137,-0.23779,2.45598,-11.8335,0.764195,0.347471,0.63322,0.818036,-2.67947,-0.48707,-0.0121974,-5.92175,4.75178,1.31186,-0.59319,-0.865273,-2.13114,-0.629395,-0.22624,0.187864,0.687159,-1.38416 10258.4,10175.1,9296.44,0.693656,-1.47018,1.57507,-4.07861,13.9151,7.913,3.87705,-2.41045,1.40643,-18.8401,-3.38044,-3.78137,0.444306,-0.142111,-3.19856,-0.633983,1.26609,-6.96487,4.03731,1.86282,-0.255938,0.885239,0.576534,4.16798,1.48633,-2.91027,0.44246,-1.26861 10259.2,10179.7,9301.13,-1.11281,-2.9356,3.48279,-4.07376,14.5961,4.75668,2.95063,-2.50321,1.99968,-15.2573,-3.94817,-6.19421,0.994523,-0.409685,-3.36826,-1.30752,2.89435,-7.11783,2.3961,1.75016,-0.287404,0.839505,2.32354,3.16514,0.431073,-4.23834,0.224613,-1.13459 10258.9,10180.8,9303.2,-3.70956,-2.93593,3.76222,-6.98265,14.1006,4.36509,3.13521,0.524873,3.4745,-8.19672,-0.812591,-7.54285,2.87285,0.165482,-4.34303,-3.00502,3.10194,-11.8146,3.48326,1.87454,-2.39007,-1.71717,-0.0308325,-3.00344,-3.10099,-5.07511,0.999296,-0.291248 10259.7,10178.9,9302.61,-2.50722,-0.863499,1.6361,-7.29671,5.65875,7.35687,6.74534,2.86707,2.5541,-4.10002,1.92641,-4.21325,3.79643,1.11564,-2.85299,-3.384,0.718232,-13.5344,2.15514,-0.378278,-3.09826,-4.48668,-4.09564,-6.07121,-4.62941,-4.63714,1.35609,1.33932 10264.3,10176.2,9300.58,-1.50986,-0.476834,0.153861,-9.03392,2.34462,9.76008,11.2624,0.958254,-0.70443,-6.3101,0.886002,-3.04957,4.20237,0.687347,-2.59931,-4.30057,-0.344332,-15.3463,3.30618,0.212706,-1.83037,-5.39362,-6.37009,-5.79293,-5.6463,-5.17005,1.45394,1.2199 10270.2,10175.5,9299.06,-1.8193,-1.62584,1.49621,-15.2891,-0.19176,0.694336,7.97111,-0.906134,-1.88497,-6.47048,-0.900237,-3.70282,1.23614,0.322582,-3.93212,-3.45866,1.71962,-16.8955,0.58688,-0.409914,-0.259588,-2.68512,-3.64588,-3.35838,-4.51583,-4.19392,0.240148,0.159851 10270.2,10179.6,9298.63,-1.90388,-3.42457,3.36972,-15.5947,6.83754,-2.72512,7.96959,-1.26132,-2.35887,-7.13988,-3.00989,-4.84946,-1.32472,-2.90407,-7.21556,-3.99747,1.63284,-18.121,1.49353,-0.486008,-0.289734,-2.44221,-2.61409,-4.74746,-6.81336,-4.22186,-0.397997,-3.01155 10263.1,10186.3,9296.94,0.1046,-2.95923,0.55802,-3.53552,11.956,6.06043,20.0157,-0.175478,-1.81809,-1.77528,-2.10279,-0.283075,-3.48288,-4.09089,-6.41457,-3.4926,-1.98205,-11.2644,1.51324,-2.56718,2.01317,-3.17178,-3.03644,-4.28621,-6.82533,-2.57386,-0.732198,-4.52782 10250.3,10186.7,9289.82,0.787893,-2.63004,-4.83671,4.59987,9.90165,5.11396,20.1712,-1.49013,-0.900383,3.2704,-1.38302,1.01612,-3.51797,-3.65748,-2.01906,-2.31487,-4.58178,-0.663723,4.99631,0.0846666,6.20019,-1.32911,-0.366123,-0.708005,-3.05462,-1.4169,-1.33549,-4.03837 10229.6,10174.2,9276.51,2.92922,1.43172,-8.45959,7.92191,9.82817,0.906035,15.1761,-5.66535,-4.80598,8.92318,-1.50732,0.863702,-4.19618,-1.72605,1.43049,-1.60336,-7.78679,7.9456,2.20311,0.976306,4.6808,-2.0774,-1.41618,1.52784,-1.00485,0.251303,-2.51818,-3.24837 10203.9,10154.8,9263.01,1.97737,4.88419,1.86761,-1.89071,16.8831,21.8027,18.6752,-2.85592,-0.407409,1.1857,1.57668,2.90834,1.42619,5.01683,-2.88862,1.13125,-1.02838,-3.77013,-1.83294,-0.874118,-1.82318,-1.06152,0.617181,1.34269,3.38069,1.15764,1.12216,1.38647 10184.5,10141.2,9256.68,5.24597,7.64832,2.18557,1.58328,4.92602,9.28816,-0.0172234,-2.70209,-2.36954,2.63625,2.45988,6.65341,1.30855,2.45772,0.884071,4.15289,-0.306199,0.501745,-3.91598,-0.843063,-3.78083,-0.751671,-0.908618,-0.353576,1.46737,4.59599,1.10914,-1.05414 10178.9,10140.4,9258.57,8.5511,8.38576,-0.704081,10.0442,3.87995,9.53107,4.06474,-2.33977,-3.33414,3.45052,0.769206,8.44243,0.151836,-0.110094,2.50423,3.89258,-1.86971,4.86933,-2.34618,0.208276,-3.54318,-0.382483,-0.444637,3.17545,1.86638,6.31308,-0.0788599,-2.11239 10182.7,10148,9263.52,7.664,6.75263,-0.540997,5.42972,-5.04193,-7.98425,-8.29464,-0.166299,-0.588527,3.31557,0.500806,4.72146,-2.51571,-1.43305,5.52369,5.671,1.03703,8.03067,0.0463032,4.16527,0.993743,2.27,2.01907,5.48701,6.28587,6.50446,-0.915646,-0.555951 10185.6,10156.6,9266.64,4.26252,2.60407,3.65205,1.35764,1.93964,-1.71464,3.62386,0.664968,2.07164,-1.84774,-1.41728,2.03742,-1.93901,-0.955849,2.55509,2.24827,3.4143,2.08534,1.52467,4.36357,2.40504,-0.149419,1.87333,2.56701,3.76988,3.58853,-0.290298,1.53656 10182.8,10164.1,9266.99,3.44774,1.00051,3.58435,5.06036,-3.20427,-1.32409,2.16178,-1.24869,0.986594,2.68824,-3.10496,3.75494,-3.03899,-1.36189,2.85639,-0.797041,2.25309,6.84226,-1.01807,1.45026,1.64915,-1.77668,1.47461,1.32051,0.0174875,3.15498,-1.91103,0.915561 10177.6,10169.5,9265.47,2.97062,0.742454,2.19308,3.39405,-10.2555,-6.11354,-8.35604,-2.29312,-0.492631,4.2024,-2.46282,2.85236,-2.05854,-1.07623,3.34902,-1.67951,1.43015,9.72371,1.0556,1.2093,0.0329592,0.933345,2.62882,4.14907,1.43657,2.25242,-2.21302,0.424466 10175.1,10171.1,9262.53,2.78573,0.66686,2.0545,2.76769,-2.38316,1.38611,1.33538,-1.98843,-1.22362,0.719734,-1.48276,0.571928,-0.303568,1.13172,0.533248,-2.57485,0.218063,4.75694,4.12677,1.25451,-2.29974,1.77459,2.18864,5.66448,2.31972,-0.197648,-0.423422,1.24127 10176.1,10170.7,9258.49,5.31438,0.737423,2.23937,7.15555,-6.03862,-6.93885,2.59027,-2.08985,-1.82474,1.76361,-1.51506,2.40133,-2.94977,1.13326,2.34185,-1.4691,-0.319475,6.55378,0.151184,-0.820336,-1.03183,0.737373,1.0173,1.60097,0.120988,0.706961,-1.06361,1.61191 10177.1,10171.1,9253.43,5.27989,0.124242,0.594136,6.40228,-14.4792,-17.9873,-7.83873,-2.70593,-2.84279,6.19952,-1.02819,4.22035,-3.89328,-0.655654,4.6427,-0.543649,-0.312946,7.67303,-3.34568,-2.99026,0.892734,0.193866,0.437901,-1.37172,-2.06494,3.10779,-2.09072,0.969194 10175,10171.9,9247.28,2.27598,-1.11333,-0.371999,2.70022,-5.44405,-1.24932,2.95574,-2.54561,-3.07604,2.81372,-0.48024,4.11824,2.04907,-0.370621,1.24343,-2.71039,-1.27809,-0.906837,-1.29061,-4.80376,-0.177684,-0.68347,-0.0356975,0.976652,-2.58184,2.60538,-0.53245,1.0079 10170.6,10171.1,9240.98,0.484599,0.0646839,-1.51326,2.89899,-3.4319,-0.213982,2.47953,-0.834731,-2.00581,5.72898,0.227883,2.67222,2.27602,0.0505934,1.31844,-2.26552,-2.6972,-0.975391,-0.869576,-3.70984,-1.26158,-0.292123,-0.590846,2.58737,-1.84822,1.62378,-0.526111,-0.491878 10166.9,10167.6,9236.09,0.964725,-0.0392702,-0.079079,4.19696,-8.77705,-7.3393,-5.33084,1.7816,1.00552,6.00308,-0.645333,1.80016,-0.345783,0.537513,3.29513,-0.258503,-1.94323,3.02276,-2.07851,-0.708951,-0.985472,0.42465,-0.0047685,-0.0149723,-1.37113,0.550535,-0.779034,-0.484969 10166.1,10161.5,9233.6,-0.598547,-1.76595,-1.06041,-0.952044,-3.22733,-6.25839,-1.71002,3.5389,3.14678,2.52469,-0.94774,-0.697306,-1.82073,1.8162,-0.398189,-0.0962201,-1.17773,-3.11075,-1.86249,-0.148137,-0.912351,0.0729367,0.372787,-1.52491,-1.99794,-1.67208,0.753712,1.02245 10167.9,10154.5,9233.85,1.32924,-0.579085,-4.09528,3.27081,-6.78357,-9.38603,-3.06915,1.95927,0.70163,2.46784,-0.635142,0.854662,-1.03664,2.44479,0.381434,0.976493,-2.1874,1.35415,-3.25712,-1.85514,0.202589,0.286026,0.720155,0.627719,-0.687001,-0.872865,1.21871,2.25385 10170.4,10147.3,9236.23,1.55419,0.655793,-3.90119,3.65032,-6.92144,-3.81534,-0.829364,1.59907,-0.150104,0.588015,0.212751,1.04803,3.09472,3.79829,-0.218751,1.11779,-1.55055,0.933332,-1.25266,-2.59487,0.647035,1.39731,2.58953,2.8589,1.80309,-1.43261,2.52993,2.79953 10171.9,10139.7,9239.22,2.16966,0.513128,-2.93705,2.73804,-10.8601,-4.50483,3.76187,1.03924,-0.676839,-1.4866,-1.19577,1.6866,5.98311,3.12642,0.0885709,0.9896,-0.594518,0.533618,0.379411,-3.82145,2.32664,2.22298,3.60721,3.05218,2.2889,-1.98702,2.79897,1.35025 10172.4,10133.5,9242.05,0.627291,0.905709,1.39363,2.99372,-15.425,-9.09382,2.11414,1.04226,2.10526,-4.39506,-2.77953,2.15891,6.66724,1.70369,-0.372333,1.40462,2.59187,2.26874,-0.378224,-3.69675,3.0335,2.25396,3.10192,0.0429504,0.10951,-0.799702,2.66794,-0.282681 10173.8,10130.2,9245.36,-1.33644,1.42161,3.11004,3.93858,-17.0646,-12.116,1.67239,1.94826,5.54306,-3.85205,-1.5475,2.52019,4.33814,1.15019,-0.541069,1.99129,3.05378,4.25369,-2.76731,-2.80645,1.85733,0.988299,2.88783,-1.97077,-2.83768,1.85125,2.84766,0.389147 10176.4,10130.9,9250,-3.53503,0.391503,-0.270572,1.95882,-15.1875,-18.5758,-1.42497,2.28845,5.40786,-2.12974,1.20821,0.911564,0.2788,0.0689856,-0.00271805,2.01928,-0.20812,3.23848,-1.98612,0.0245125,0.488358,-1.18054,1.47019,-3.47437,-4.6287,2.11498,2.20934,0.993318 10178.8,10135.9,9255.56,-3.20255,-0.268054,-3.48033,2.47099,-11.3536,-16.9308,2.01776,1.40976,1.56328,0.853625,1.89586,1.47109,-1.50849,0.167668,0.627511,1.41809,-4.21425,2.05546,-2.39209,-0.416193,0.276633,-1.50971,-0.820011,-1.25927,-1.76,0.153711,0.431209,1.48315 10181.2,10144.1,9260.31,-2.49125,-0.613263,-3.86482,0.287362,-9.17309,-14.1157,3.48478,0.196793,-1.25386,2.83848,0.198147,-0.0165582,0.471677,-0.139327,-0.216901,-0.966032,-5.2193,-1.40546,-0.977273,-1.2574,1.78779,0.134179,-1.72164,0.653388,0.313432,-3.37716,-0.587605,0.861387 10186.6,10151.1,9263.12,-0.0358474,0.714951,-5.47328,-0.875177,-17.5089,-13.8361,0.471247,0.643912,-2.41975,9.9458,0.993041,0.803296,-0.226386,0.0668295,2.19176,-1.16819,-4.40868,0.69383,-3.38706,-3.58218,3.07732,2.10253,1.79789,2.06744,1.83904,-2.15516,-1.67344,0.661882 10193.4,10152.2,9264.85,-2.78688,1.85556,-1.96216,-7.27433,-5.61022,0.625161,3.91544,2.78407,0.13042,8.01854,3.573,-2.43853,-1.07905,0.148792,-1.48277,-2.3792,0.378784,-7.05144,-1.06108,-1.76148,0.135824,1.71393,3.80312,-1.43656,0.702495,-1.95731,-0.703674,-0.33177 10196.9,10148.7,9267.46,1.41437,4.41491,0.0330121,-0.96198,-19.7539,-11.561,-5.49424,1.03618,-0.588315,13.1158,4.11913,1.82776,-4.02743,-1.24038,4.49417,2.16391,1.61464,5.33203,-6.2827,-3.22771,2.42673,4.53812,5.27571,1.95384,4.83592,2.15944,-2.23414,-0.0179182 10195.1,10146.6,9271.67,-0.599083,4.08109,5.56207,-0.651956,-1.899,4.41751,8.64946,-0.00765143,1.65381,7.40697,3.13743,0.528221,-1.17274,-0.333192,-1.34405,0.810869,3.04978,-1.96585,-3.00608,-1.02587,-0.427114,2.63482,2.33223,1.44749,2.70602,-0.508442,-0.782524,0.838544 10190.6,10149.1,9275.95,0.560997,3.32623,0.00253245,1.6273,-9.62681,-9.32197,-7.13248,-1.74244,-2.26773,10.279,2.01853,1.79006,-2.32577,-1.861,2.70102,2.63733,-0.668516,4.89049,-2.56801,1.67809,-0.682542,1.07859,-0.730879,1.04436,0.219305,1.04839,-1.30085,-0.204558 10188,10153.1,9277.72,-1.05102,1.4439,-1.2902,0.37219,3.61058,7.8905,-0.13638,-0.797121,-3.203,3.7144,-0.467361,1.43319,1.01941,-0.964803,1.27849,1.32106,-0.71757,-0.281666,1.82319,4.43107,-2.93419,-0.102775,-2.79816,1.60946,-0.350934,0.837113,0.975085,-0.206216 10189.3,10155.8,9275.17,1.71247,1.79065,-0.806826,4.2591,-1.07113,5.08033,-3.80833,-1.05846,-3.93516,4.86697,-2.48519,4.41458,1.0147,-2.04319,5.76698,3.04901,0.621182,6.18537,-0.471514,3.74338,0.0954557,1.78055,-2.23478,4.29533,3.28968,4.08665,-0.45381,-1.12752 10190.8,10155.9,9267.91,0.0885688,1.62773,3.97676,0.475719,6.50171,12.0036,4.17355,0.0800788,0.877184,4.13283,-1.66529,2.3731,1.22312,-1.52431,1.32333,1.30085,4.02821,0.00402446,-0.278254,3.83144,-0.00616006,1.70507,0.14686,2.05675,3.75234,3.42709,-1.13997,-2.28219 10186.5,10152.6,9257.34,-0.152071,1.1051,2.98089,-3.26014,-3.23874,0.545145,-3.74253,0.650653,4.32612,4.55661,-0.349067,0.443991,-1.54712,-2.37082,1.08068,1.11666,3.19332,0.114235,-4.77887,1.03262,0.526047,1.57427,1.96416,-1.21359,2.2522,2.81775,-2.19914,-3.20958 10175.9,10146,9246.33,-2.37365,-0.801223,1.8448,-4.49245,2.73452,3.45587,0.665856,0.804743,7.15539,-1.25789,-1.25952,-2.70716,-1.07845,-2.04441,-1.93328,-1.35806,1.5978,-5.1161,-5.79834,-0.925826,-2.80177,-1.15512,-1.39234,-4.88988,-2.71874,-0.727928,-1.17586,-2.55528 10163.6,10137.3,9237.87,-0.803469,-2.78044,-0.895544,-1.96323,-0.541223,-3.95959,-1.23923,0.0489646,5.82687,-0.842944,-2.20839,-1.37161,-0.868195,-0.366623,-0.326653,-0.542204,-0.442138,-3.06811,-5.05951,-1.77693,-2.56412,-2.0747,-5.18551,-5.90628,-3.59607,-1.51359,-1.0358,-0.0442413 10154.4,10129.1,9233.99,1.23915,-3.76005,-2.64612,0.723829,-3.148,-4.96491,0.57486,-0.202117,2.21428,-0.386009,-2.61213,0.591537,-0.420445,2.51457,0.848114,0.0155665,-2.8099,-0.688955,-1.65728,-1.68576,-0.314736,-2.37588,-7.30164,-5.93878,-1.09582,-1.08092,-1.23666,3.04974 10147.7,10124.3,9234.84,0.130569,-3.33534,-5.30783,0.228073,-1.79103,-2.90284,1.72325,0.336059,-1.67646,0.805152,-2.51359,-1.68843,-1.08056,2.79024,0.667811,-0.918425,-5.25023,-0.613583,-1.21144,-3.86108,1.12026,-2.87087,-6.96217,-3.74878,-0.871173,-1.99148,-1.4983,3.13726 10141.9,10125,9238.34,-2.3342,-3.74514,-6.28736,0.247636,2.71253,3.12847,7.57994,-0.0401623,-2.07147,0.481455,-3.97685,-4.46362,-0.415913,1.42821,-0.575486,-2.68041,-4.57327,-2.24353,-2.60028,-5.84863,0.625916,-3.42977,-3.6369,-0.844099,-3.5874,-4.64335,-0.985747,1.2717 10139.9,10130.2,9242.19,-1.31024,-4.72475,-7.14762,0.73153,1.45053,-5.53508,5.90136,-2.31863,0.194991,0.488804,-6.97821,-4.41928,-2.29074,-1.35009,0.919216,-2.89533,-3.25509,-0.799203,-1.99553,-4.14064,2.04707,-1.98553,-0.137078,-0.0166083,-4.9352,-5.40326,-1.67739,-1.42035 10146.2,10135.6,9246.04,1.48702,-3.36982,-6.22071,1.74719,2.56435,-13.0074,1.99705,-3.21561,2.91416,0.844878,-6.7988,-2.16439,-5.4962,-1.85975,2.13575,-1.59383,-2.91884,1.52462,-1.3314,-1.85117,3.6544,-0.430522,0.692754,-0.840642,-3.31251,-2.33908,-3.05762,-2.1983 10158.1,10136.1,9250.8,0.841737,-2.49661,-1.39476,-1.47649,15.6927,0.965199,10.869,-0.546861,4.02682,-3.15137,-2.65822,-1.05518,-4.77058,0.229656,-2.58261,-1.60934,-0.689737,-5.44364,-0.234473,-1.95479,2.60062,-0.769404,0.484685,-2.21476,-2.21659,-0.527818,-2.3356,-0.631119 10167.2,10131.4,9256.17,1.43756,-1.64599,0.0828565,1.10643,1.09851,-8.71597,-1.14743,1.16785,1.24835,1.69522,0.678389,1.91657,-5.73395,-1.26925,0.618759,0.671225,0.99422,2.5392,-3.14056,-3.00047,3.39733,-0.267724,0.865602,-1.72338,-1.28093,1.59131,-3.58079,-1.60917 10168.5,10125.9,9259.95,0.111755,-1.49369,1.18289,-0.284048,-1.52165,-7.82514,1.91577,2.83987,1.30957,4.34859,2.31828,0.547347,-5.35341,-2.95714,0.120479,-0.07344,1.25038,0.863374,-1.97606,-2.63292,2.99367,-1.51317,-0.192761,-1.94301,-2.34527,-0.816782,-4.15688,-3.69083 10164.7,10123.5,9260.03,2.54631,0.123647,1.85441,0.291179,-2.26534,-5.622,0.403256,2.75151,1.92159,5.45502,4.02912,0.277333,-3.49437,-2.59529,1.68451,1.03176,0.611114,1.05444,-1.37086,-0.762577,2.09659,-3.15435,-1.66892,-4.18628,-2.03484,-0.59484,-4.5361,-4.06338 10160.7,10123.9,9256.02,4.16394,1.15842,1.00215,-1.41089,3.00077,3.69915,2.12147,1.50602,1.11373,3.7783,5.12886,1.27055,-1.0735,0.163066,0.715848,1.75274,0.248762,-1.87449,-2.70607,-0.0821427,-0.982237,-3.91753,-0.603176,-5.15131,-1.55797,1.9122,-2.63806,-2.45448 10157.6,10124.8,9249.1,1.13904,0.752742,1.28292,-3.44794,5.87463,13.5955,-3.90547,0.053564,0.392376,-2.17549,4.02652,0.800942,2.14933,0.991305,-1.00534,1.93346,1.74799,-4.3887,-2.62983,2.12002,-3.97726,-2.37985,1.92724,-3.91126,-1.80145,3.29901,0.515867,-2.07875 10155.9,10125.9,9241.01,-1.21278,1.24353,0.0902419,-1.38693,3.90257,17.0687,-1.7671,-0.621263,-0.743581,-3.56603,3.19768,0.515647,2.83626,-0.394058,-0.965446,2.53295,1.02968,-3.73706,-0.646373,4.19926,-3.90665,0.100245,2.07717,0.65145,-0.4389,3.45695,1.30478,-2.26372 10156.9,10129,9233.19,-0.519545,3.45514,-0.128203,0.470911,-4.34917,11.6069,-5.37302,-0.249794,0.0908138,-1.64961,3.7305,0.887725,1.28233,-0.50548,0.651175,4.68216,0.481759,0.131141,2.83721,7.4517,-1.51906,2.02591,0.478488,2.8447,3.96564,4.21205,0.0189546,-1.26083 10160.2,10134.9,9226.61,0.334619,3.63902,-1.33005,0.500933,-0.0390483,15.3466,3.49804,-1.22599,-0.443012,-1.29729,1.85728,0.83413,0.663791,1.08815,-1.61332,2.35978,-1.91003,-1.54128,7.06018,8.52392,-0.0931056,-0.631766,-1.8937,1.21041,3.92464,3.0125,0.582016,-0.0552563 10165.1,10142,9222.12,-0.0501124,2.72845,-2.35233,0.461804,-3.24106,3.89637,-4.4752,-1.7395,-0.658087,1.46568,0.74815,1.9358,-1.37579,1.26993,0.248403,2.1501,-1.97865,2.84403,4.93078,6.34449,2.55208,-1.66616,-1.28941,-0.85475,2.44335,3.28626,0.575625,0.0867697 10169,10147.2,9219.92,-2.57524,1.55278,1.64717,-0.408592,2.78686,3.93608,-3.35557,-1.05071,0.358949,-1.71793,1.23509,0.730307,-0.807758,0.469476,-0.799756,2.26666,1.42763,2.57756,3.31921,4.24278,2.32673,-1.92157,-0.625841,-1.7385,0.55312,2.469,0.416022,0.102824 10167.7,10149.8,9219.39,-2.61236,0.265041,4.14099,-1.10443,5.68968,5.75872,0.437178,-1.27371,-1.44794,-5.50529,0.962099,-1.7594,-0.014506,-1.47838,-2.10998,2.88166,2.32266,2.31558,3.04189,2.76494,1.13588,-2.76241,-2.5749,-1.37983,-0.132212,1.62609,0.00182996,-0.567092 10161.2,10151.5,9219.88,-1.00231,0.225002,2.94421,2.03312,-0.355979,4.16591,-0.636307,-0.980578,-3.17075,-4.4683,-0.0413473,-0.96548,-0.194949,-0.798368,-1.08568,3.94015,1.20872,6.21739,0.493017,0.663456,-1.20346,-2.76074,-4.99576,-0.484664,1.27829,1.87168,-0.0347963,-0.649195 10155.5,10153.9,9220.83,-0.939771,0.647249,0.0634509,3.2582,-1.62031,4.0693,-0.997477,-0.169163,-4.01209,-4.20755,-1.14083,-0.040949,0.676499,1.0769,-0.637069,2.85891,0.53402,4.18699,0.666861,0.369829,-2.63692,-0.336214,-3.73798,1.47577,2.81105,-0.292838,0.0270106,-0.151526 10154.1,10157.5,9221.67,-1.65802,1.59847,-3.57612,1.52401,6.37221,4.48866,-1.46299,-0.915699,-6.98915,-0.340048,-0.952717,-2.18866,-0.811792,-0.642645,-0.622625,-0.300884,-1.00057,-1.15759,2.44751,2.6773,-1.823,1.29837,-1.91591,2.49204,1.93197,-3.59974,-1.91245,-2.4109 10154.4,10160.7,9221.98,-0.583463,-0.108757,-4.6507,-0.0693877,5.35637,4.425,-6.56889,-1.82597,-8.57191,2.85503,-1.05825,-2.33955,-3.22781,-4.76081,2.05753,-0.861931,-1.83229,-0.124382,0.503483,2.18131,1.30665,2.42826,0.824233,3.84653,2.09007,-3.3925,-4.31649,-3.96112 10153.4,10159.2,9221.68,-2.76485,-4.09131,-2.87698,-1.10712,12.5336,12.9839,-4.34652,-1.87041,-6.50663,-1.43881,-2.78497,-4.09349,-3.27711,-7.58611,-0.918956,-2.43732,-1.68029,-2.93885,1.37614,1.00354,-0.202025,0.252735,-1.35224,2.14941,-1.22668,-3.85694,-3.91196,-5.39514 10153.1,10150.6,9221.82,-3.95579,-6.11602,-1.95691,-0.571033,7.36799,2.23424,-8.23593,-1.15065,-2.89936,-3.34966,-3.42278,-4.92737,-4.22729,-7.57776,-1.53936,-2.4826,-0.485854,-2.05301,1.35048,0.235875,-0.851581,0.299046,-3.65228,0.452501,-2.53126,-4.14097,-3.0318,-6.032 10156.5,10138.1,9224.22,-1.72219,-4.81284,-2.04034,3.64429,-3.40667,-8.21149,-2.06758,-0.247629,0.240041,0.844032,-2.55693,-2.29071,-5.62686,-4.10255,0.955484,-2.58578,-0.573095,1.96046,-2.89531,-2.47853,1.00662,1.59082,-2.31097,1.60096,-0.355857,-3.59741,-2.54995,-3.16362 10162.5,10126.5,9229.66,-1.48624,-2.31864,-1.19917,5.07688,-2.15075,-4.48733,6.81643,1.19375,3.4529,3.66948,-1.49639,-1.71619,-5.51437,-1.29231,-0.407537,-4.604,-2.54282,0.0824236,-5.27449,-4.81883,0.767691,-1.39492,-2.55861,-0.325428,-1.75464,-3.59903,-1.89829,-0.732932 10167.7,10118.7,9237.56,-1.06333,-0.880843,-0.709075,2.8371,-10.0447,-10.4348,-2.5904,3.18465,5.97115,6.33779,-0.55058,-1.01646,-4.14332,-1.6247,-0.0193591,-4.01402,-3.73144,0.38443,-5.50468,-6.41294,-0.295721,-3.62009,-2.70822,-3.1355,-4.45086,-2.10376,-1.79258,-1.22716 10172.5,10116.9,9247.18,1.551,0.130326,-0.490568,5.87654,-14.5436,-8.35183,-0.790109,3.39107,4.7174,8.28156,-0.0057788,2.6686,-1.84943,-1.48071,1.03911,-4.0934,-3.48936,2.7605,-6.22541,-8.72046,-2.487,-3.9855,-3.15508,-4.85806,-6.30628,-0.1826,-2.22861,-1.91313 10179.7,10122.6,9257.78,1.5355,1.00586,-2.46594,5.55739,-10.6179,-9.89219,1.01847,2.02002,1.55047,10.3651,1.59035,2.3257,-3.02423,-0.681756,0.379055,-4.13859,-2.86252,2.65539,-7.09955,-8.4785,-1.80811,-2.44766,-3.84586,-6.08215,-4.18234,0.309597,-3.66089,-1.78168 10188.9,10134.4,9267.84,0.423127,-1.44673,-6.16369,2.54558,-3.2605,-10.2788,1.93481,-0.460125,-1.55478,7.53447,1.04311,-2.037,-5.33297,-0.715827,-0.912315,-4.00679,-5.27357,1.32517,-7.02947,-5.6844,2.49,-1.1701,-4.14164,-4.46692,0.160721,-1.23591,-5.46575,-0.678645 10196.3,10145.5,9275.21,0.204833,-4.851,-9.24744,3.38063,-3.90706,-1.89916,-0.318999,-3.05687,-4.83175,3.88926,-1.68472,-4.52857,-6.76493,0.053409,0.356074,-2.44354,-9.25902,3.95243,-8.99635,-3.68403,4.07743,-1.41439,-4.06526,0.784286,2.50666,-1.59161,-6.31937,0.0761621 10200.4,10148.5,9278.92,-3.06966,-5.752,-6.27773,-0.452092,4.18213,13.2473,-12.0757,-4.47092,-6.49884,-5.96616,-4.08975,-9.08064,-3.65565,-1.03612,-1.9757,-2.79369,-8.22081,-3.13926,-2.68074,1.98539,-1.47914,-4.27865,-6.82097,-0.0420558,-2.72616,-3.80964,-3.69263,-2.81706 10202.3,10144.3,9279.66,1.7621,-1.2767,-1.87182,1.61337,-6.80859,14.4514,-16.815,-2.07514,-4.63562,0.0307544,-1.49074,-2.29138,-1.18636,-1.08621,1.86862,0.689509,-4.2555,-0.913166,-4.04706,-1.13903,-2.95495,-1.4359,-3.45987,4.36607,0.619825,-1.53464,-2.06409,-2.58631 10201.6,10141.5,9277.89,2.73427,2.11183,3.79277,1.71546,-5.8859,13.3557,-11.3022,2.79327,2.37116,13.2011,3.98285,0.966107,0.039656,-0.715821,2.85166,2.34242,2.77476,-0.0888099,-4.98538,-3.4432,-1.83877,3.57211,2.68075,7.05565,6.45616,-1.54302,-1.24469,-1.49869 10196,10143.8,9273.55,-2.52737,0.202188,7.08167,-4.89952,6.71679,10.6699,0.756855,5.54471,7.25909,13.9583,6.39787,-2.37566,0.745793,-1.45474,-1.09404,0.910205,7.21143,-6.92492,-3.24203,-2.89701,-0.543452,6.07649,7.33376,6.57894,6.15484,-4.40884,0.0587056,-1.11052 10186.2,10147.8,9267.63,-4.31786,0.145523,8.74123,-1.12372,3.61382,5.90919,-2.20636,4.87121,7.93339,10.8223,5.77747,-1.02016,1.70524,-1.23974,-1.99873,1.22043,7.18349,-2.02393,-4.52471,-1.19367,-1.87015,5.60664,6.92162,5.30532,3.03549,-3.16865,1.33872,-1.3693 10178.3,10151.3,9262.07,-1.01371,-0.36759,7.07326,3.03463,-3.67644,6.41668,1.01659,3.32806,5.69645,6.11989,4.17302,3.13986,4.40199,0.31144,-2.58094,-0.0539033,4.16067,1.49299,-3.2753,-1.39228,-2.172,3.33149,4.19598,3.46064,0.616277,-0.818505,3.98959,0.698301 10177.2,10154.3,9257.94,2.09186,0.0766925,2.17884,5.08344,-13.9717,-0.882929,-3.84368,2.86526,4.57806,7.77504,4.75117,6.29349,4.58116,4.04706,1.06485,0.914494,1.84175,7.12093,-3.92066,-3.04038,-1.76589,1.29071,2.74094,1.46176,1.98937,3.12251,5.09485,3.84087 10179.4,10155.4,9254.74,0.187596,-0.882072,-0.665652,4.15319,-3.56212,6.25634,3.46947,2.99756,3.30879,0.859046,5.1349,3.91232,5.90056,6.60019,0.839946,-0.162343,-0.484405,2.65509,-1.8674,-3.50916,-5.10299,-1.60522,1.28388,-0.0295086,1.05,2.81748,5.21994,5.53563 10178.8,10153.1,9251.26,-1.91139,-0.154839,-0.832651,7.32065,-8.14661,3.20829,-4.61065,3.9011,1.20806,1.29028,6.11631,4.24084,4.66918,7.38927,3.1094,1.72009,-0.436683,6.06925,-3.83738,-3.64103,-8.35166,-0.222316,1.74303,3.43329,2.82215,3.91599,3.2218,6.05878 10175,10149.2,9246.46,-3.00223,-0.829219,2.18951,8.12634,-8.29635,3.98254,-2.55022,3.58933,0.0476173,2.00734,2.85452,5.13863,4.39434,5.86178,1.57419,0.321093,2.11151,4.62819,-0.677836,-1.98205,-7.44972,1.36379,2.52895,5.12261,2.10196,3.15929,2.77152,6.16477 10170.8,10147.7,9240.32,-2.09934,-1.33891,3.77143,6.49402,-6.43302,-0.0826344,0.87837,1.12061,0.421557,1.06025,-1.52903,5.64507,3.68263,3.49536,1.25096,-1.4957,2.92854,4.60413,2.40658,-0.645265,-3.32217,0.987715,2.60908,1.94117,-0.424246,2.85508,2.71473,4.88469 10167.3,10148.7,9234.04,-1.71112,-2.89318,3.67043,1.66277,3.35424,4.57631,10.1924,-0.35173,1.35064,-5.80931,-1.82085,3.64176,4.57117,2.2882,0.924739,-2.41648,2.22467,2.19365,5.80375,-0.426137,-2.32705,-0.919332,2.09081,-2.34116,-2.25007,1.71251,3.40172,3.5108 10165.7,10149.1,9229.23,-1.45001,-3.05548,2.45599,-0.349391,3.71978,4.53119,5.144,-0.0754888,2.20722,-6.90377,0.948441,2.13514,3.08117,1.83942,2.86791,-0.010419,2.66035,5.23219,5.6626,-0.804354,-2.37724,-1.67323,0.673861,-3.53649,-1.59081,1.76997,2.75549,2.29186 10167.4,10147.1,9226.8,-1.49928,-2.70714,1.88393,-0.842721,-0.225431,3.25531,1.41947,0.140255,3.21042,-3.88608,1.41104,1.86088,-0.091131,0.642157,1.94581,0.307133,3.18746,6.22574,4.30938,-1.01513,-1.1936,-1.8575,-0.588364,-1.42784,-2.08205,1.85519,1.46316,1.06047 10171.1,10143.9,9226.48,-2.01672,-2.40053,3.06391,-0.0599903,-8.34303,2.94718,-5.04409,-0.199276,4.0892,-3.68083,-0.226057,2.75547,-0.686676,-0.843757,0.670264,-0.458086,3.08212,7.11729,2.84836,0.933537,-1.50789,-1.59001,0.179663,0.0589795,-2.55704,3.42709,0.775783,0.360096 10175,10140.6,9227.89,-1.34782,-2.60865,2.14445,1.39294,-10.3608,4.5868,-8.2559,-1.78039,0.356678,-10.0047,-3.28868,2.87133,1.85333,-3.67234,1.53223,-1.27653,0.113475,6.97877,4.49731,3.38158,-3.24882,-2.09817,-0.213742,-0.816136,-3.92766,4.36792,1.46638,-0.25462 10179,10139.5,9231.01,-0.683001,-1.14693,0.835389,1.45465,-4.93888,6.92044,-3.2459,-1.76518,-2.11784,-11.5638,-3.99539,3.25477,2.97649,-3.54233,2.62301,-0.286071,-1.99677,5.44349,5.35012,2.55683,-3.04093,-1.82791,-1.42661,0.583625,-2.6178,3.43693,2.29735,-0.308687 10185.5,10142.2,9235.77,-0.0852919,0.0218383,0.522022,1.091,-4.00515,-0.71681,-2.72016,-1.24891,-1.4593,-5.53454,-2.81228,2.98724,1.40275,-1.35994,4.37674,1.00841,-2.02092,6.34309,4.01241,0.223476,0.719167,-0.617158,-1.79277,2.19906,-0.00915837,1.60933,1.1106,-0.276707 10194.7,10147.7,9242.28,-0.507821,-1.45713,1.82236,1.06383,0.990703,1.16431,3.40878,-1.35424,0.436421,-3.7364,-2.82733,0.844561,2.18188,1.42103,2.14788,-1.48658,-0.956157,3.31294,2.03859,-1.09837,2.11718,-0.147919,0.113767,0.665977,1.0134,-0.758268,0.662046,1.48327 10202.3,10153,9250.68,-0.953894,-1.28733,1.09826,0.183582,-2.63676,-4.1377,-2.89907,-0.851983,3.07691,-0.452803,-2.18838,0.00930997,2.87142,4.0314,0.911046,-1.55443,1.18147,4.24956,-2.48362,-1.23019,1.72571,2.11001,5.29268,-0.281886,3.31927,-0.100871,1.85826,4.09941 10205.4,10156.4,9259.89,-1.27754,0.134823,0.181405,0.430733,3.94306,1.54036,2.99815,-1.16285,4.70226,-4.24342,-1.81256,1.00154,4.93307,6.24027,-1.59843,-1.48742,2.34844,2.10305,-2.00905,-0.662325,0.626241,1.17997,6.74123,-1.67701,1.35772,0.491316,4.32271,6.53414 10204.9,10157.9,9267.94,0.0906612,2.16352,-0.379486,5.42194,2.73054,2.84047,-1.4914,-1.83181,4.02307,-5.15449,-0.262248,3.79351,5.21678,7.80905,0.384689,1.27337,2.9796,6.90988,1.28339,2.20996,-0.91791,-0.163496,3.78903,-1.75168,-0.655347,2.9127,4.88667,7.66747 10203.5,10159,9273.39,2.81598,1.22437,-0.368556,7.79675,3.42922,7.94279,4.57077,-0.708312,0.0968463,-6.10539,0.906129,5.55489,5.11842,8.21484,-0.0671665,1.22889,2.37144,6.24544,4.97372,3.9233,-2.49967,0.267274,-0.310124,1.09266,-0.410233,4.04567,4.74621,8.0612 10203.2,10162.2,9275.77,5.91857,0.355765,0.897437,11.4606,-3.5509,6.21936,2.57301,-0.0103725,-3.12789,-4.93913,0.601331,6.94209,5.77388,6.93334,1.15761,0.716978,2.28439,10.4648,4.58557,4.39511,-2.76356,2.73426,-1.51427,4.03252,2.99548,5.47757,3.66414,6.66569 10203.5,10167.2,9275.21,3.60261,-0.370029,0.212296,6.53742,-1.17501,1.39057,4.60494,-1.59955,-3.36286,-6.83681,-0.619753,2.05525,7.21718,4.0699,-0.311278,-1.80144,1.07578,6.02142,4.81799,3.05296,-1.94492,1.84126,-1.66326,1.40391,1.77364,2.95825,3.1993,3.61198 10203.2,10169.7,9272.52,1.94895,1.27875,-0.411546,7.45768,-3.75161,0.551798,7.13428,-3.82068,-2.61405,-4.51085,-0.839975,-0.654388,7.59238,3.63367,1.11679,-0.895324,0.0589114,6.72608,0.605615,-0.28023,-1.84675,-0.134175,-0.468956,-1.06577,2.10307,1.19208,2.14254,2.35948 10201,10166,9269.14,-0.454618,0.774031,2.06017,2.8462,-0.622985,0.18548,5.53147,-2.50822,-2.46147,-4.96779,0.0109421,-5.95039,4.88549,1.45711,-1.36876,0.21175,1.58667,0.959389,-1.72767,-0.999701,-1.91612,-0.271218,-0.271307,-3.60937,2.2528,-2.81471,1.29832,0.342989 10196.9,10158.5,9266.51,1.16537,-1.9421,4.60098,6.66208,-8.91079,-4.05041,0.977918,-0.375912,-2.52562,-2.44083,-1.83608,-5.04574,0.870179,-2.88837,0.903319,2.45464,2.77487,7.13809,-7.32993,-2.29902,0.410437,1.61472,1.76486,-2.68616,2.88565,-3.79142,-0.830458,-1.20118 10194.1,10152.5,9265.18,-4.11534,-5.864,4.81522,5.05616,0.145339,-4.93641,2.59855,0.656712,1.10696,-4.83177,-6.68192,-7.2593,-1.01756,-6.50992,-0.623669,0.165413,3.83811,5.84041,-5.84841,-0.103661,1.98729,0.416145,1.34348,-6.16515,-2.67871,-5.57128,-1.65554,-3.26762 10194.1,10148.4,9264.07,-6.59722,-4.92656,-2.01588,3.7417,0.726794,-18.2936,5.15057,-0.276157,1.50739,-0.538248,-8.52874,-4.00362,-4.55022,-5.27015,0.604573,-0.930054,-0.109161,8.19838,-8.17669,-2.1092,4.17484,-1.56197,-1.02102,-5.8341,-5.50376,-1.7134,-2.50895,-3.06608 10193.9,10142,9261.25,-7.62788,-2.98611,1.9356,-1.40885,17.3716,4.06957,22.1809,1.39972,5.64224,-7.94302,-5.59134,-1.45901,0.439725,1.11211,-6.73411,-3.11746,1.4598,-4.78344,-2.09513,-0.404037,0.473396,-4.22587,-2.43839,-5.70551,-5.26427,-0.515338,1.20082,0.113119 10190.4,10132.9,9256.55,-0.061965,0.47587,-3.01478,1.28661,-2.15014,-14.2047,7.89898,0.463674,0.911903,2.0883,-1.64338,3.11185,-2.21723,0.781415,-1.37312,0.396228,-1.38267,3.09944,-1.8496,-1.29836,2.6087,-3.15966,-2.03297,-3.33185,-3.23065,2.92606,0.328003,-0.0324179 10185,10126,9252.36,-0.460313,1.71643,-3.7396,-2.47922,-1.49725,-15.3645,-1.80975,0.715758,-0.981069,-0.691494,-0.794101,-0.106849,-2.08179,-0.30971,-1.53311,0.428815,-0.320026,-0.221114,2.28648,0.175576,3.04606,-1.33911,-0.290353,-5.37868,-3.63253,0.919151,0.306196,-0.421839 10178.6,10124.8,9251.04,-1.00256,1.33259,-4.2472,-1.03971,2.95821,-4.55752,1.84476,0.117356,-4.36831,-4.27268,-1.02576,-0.886254,0.661063,-0.0446314,-0.718596,-0.508343,-2.00182,-0.337999,2.57329,-0.613947,2.18595,0.685998,2.2221,-1.4549,-2.89677,-0.0111036,1.2411,0.83044 10170.8,10127.6,9252.97,-1.71108,0.0714348,-2.91875,-0.0818013,10.0027,5.28964,4.84662,0.115636,-5.97389,-2.97492,0.466922,-1.16018,3.14319,-0.484977,-0.73996,-1.40938,-2.86898,-1.18229,2.85098,1.59393,-0.709864,0.769892,0.0526875,0.667581,-4.09633,-0.130706,2.87503,0.28772 10163.4,10130.8,9256.69,-0.0482655,-0.561906,-4.41924,-1.93638,1.00001,-3.80859,-6.74655,-0.693966,-6.90741,3.83606,-0.443929,0.133173,1.32042,-4.12952,2.21239,-0.401666,-2.83084,1.48444,3.60821,4.7162,0.0479322,1.57325,-2.9423,0.781086,-3.57562,1.01359,1.5974,-1.03302 10159.1,10132.9,9259.9,0.830676,1.38376,-3.59798,1.88876,1.90766,6.33722,1.16568,-1.88109,-5.49532,7.56995,-3.97276,2.47056,-1.10217,-4.02745,0.530141,-1.80729,-2.44923,1.11112,6.04583,5.79514,-1.61378,0.146823,-4.31812,1.65679,-0.82556,0.385538,-1.6035,-0.921055 10159.8,10135.2,9260.63,-0.16576,1.00018,-5.12473,0.442361,0.505831,-5.64864,-2.63413,-2.52592,-5.46478,4.95174,-4.3147,0.782684,-5.73615,-4.82371,0.266276,-1.86669,-4.0481,-1.31822,9.03428,5.18538,0.835431,-1.04748,-4.21294,1.0615,-0.105573,-1.22812,-5.24566,-3.63422 10165.2,10138.1,9258.46,0.205477,-0.680098,-4.46762,5.26891,1.18115,-1.68502,7.13137,-1.22722,-4.01706,-1.7858,-0.511666,3.55446,-3.85553,-2.43205,1.3525,-0.694302,-4.16672,-0.729833,7.26617,2.38627,0.742375,-2.04911,-3.24066,2.72775,2.10783,0.115275,-4.78462,-4.34396 10171.6,10139.6,9254.61,-1.51268,-2.23477,-5.13237,-3.29461,-0.317239,-10.5071,-7.94002,1.87205,-2.15615,-2.57627,4.52526,1.46446,-2.39092,-3.68309,1.44927,1.27351,-2.10555,-3.67494,7.0263,3.64847,0.370668,0.612656,-2.452,4.76347,5.31087,1.21101,-2.18927,-4.86589 10174.6,10139.6,9250.85,-0.380976,0.430706,-4.77251,1.24603,3.57465,-3.14504,-10.8805,1.4131,-3.82203,6.1265,4.05681,1.86576,-2.69539,-3.84931,0.571097,0.0445532,-3.61574,1.0929,5.45496,4.67637,-2.69117,0.376736,-3.44843,8.26613,5.44059,2.39248,-1.35143,-3.43895 10173.2,10141.8,9247.9,-0.967231,0.660605,-0.333774,0.682442,10.1733,9.80472,-4.02844,0.296976,-2.0856,1.70749,0.105393,-0.302007,-2.02762,-1.68176,-2.57321,-1.85542,-2.20576,-3.56605,7.81712,4.57148,-0.717533,0.00661063,0.070936,7.88567,3.00205,-0.188925,-1.30646,-0.417109 10169.8,10147.8,9245.05,1.57911,1.89614,-1.23894,5.44327,1.1255,2.7455,0.888702,-2.69789,-2.29535,1.37374,-2.16695,0.277041,-2.61632,-0.168021,1.19527,-0.966804,-1.39634,2.02717,6.13068,1.74285,2.61838,-0.673957,2.42798,5.71141,1.0237,-0.190537,-2.48355,-0.424022 10166.9,10152.4,9241.4,1.48812,1.56883,0.00439658,-1.99079,-5.3945,-7.45076,-2.79497,-1.09824,0.438405,1.08335,0.567998,-2.12211,0.537132,0.235065,2.13962,0.850241,2.33283,0.11668,5.71046,0.316621,2.37782,1.5783,4.38674,4.44102,2.85837,-0.867284,0.197126,-0.632035 10166,10149.9,9237.21,3.10346,3.20745,-0.0787972,3.26164,-1.99167,1.15174,7.73898,0.388067,-1.3872,7.93093,2.89628,-0.846609,2.95243,1.10786,0.0356645,-0.191303,-1.48335,3.06518,0.833731,-2.48298,-2.62814,-0.329278,-0.0454046,4.84244,1.50962,-0.571214,2.28968,0.0896905 10169.4,10141.9,9233.72,1.54047,2.79665,0.872984,0.435893,0.341067,4.50191,6.31086,2.24353,0.0763229,5.33021,2.30696,-1.94916,2.28551,1.6759,-3.55737,-0.57595,-3.31446,-1.28349,0.109544,-0.911539,-3.08755,0.149125,-2.57658,2.65457,-0.759677,-1.72314,1.73795,1.22082 10175.5,10134.5,9231.85,3.08721,1.31195,-0.463831,-2.78365,-16.0641,-12.4959,-7.90321,1.44639,2.2521,2.09953,-0.628689,0.674957,-0.991746,0.999703,0.501374,1.08647,-1.9555,-0.457535,-1.969,0.140249,0.679574,4.05153,-1.26929,2.9472,1.23177,0.0460567,-1.18548,1.19414 10178.5,10132.3,9231.94,4.8578,-0.156201,-1.83619,3.45539,-10.5983,-4.40534,-3.25278,-1.48511,1.7839,1.07398,-3.79721,3.44697,-0.661031,-0.19397,1.51898,-2.78611,-1.58924,-1.02247,-4.03291,-0.779814,-2.72459,1.42865,-4.44874,1.96164,0.024013,0.769821,-1.68183,-1.09525 10176,10135.5,9234.24,3.98434,-2.9881,-1.82932,-3.45496,-4.37718,-1.32479,-6.81161,0.242295,3.63988,0.773917,-2.92089,1.50769,1.03257,-1.29175,0.607123,-3.32519,0.794345,-7.2134,-4.18473,-2.11878,-3.48641,2.04926,-1.83971,2.5711,1.8547,-0.444122,0.204744,-0.633906 10170.3,10141.1,9238.24,4.5574,-1.21766,-1.92884,-3.3891,-4.53289,-3.61119,-11.1428,0.87067,2.52674,6.28098,-0.916225,0.833349,-0.285056,-2.02874,2.83162,-0.822357,0.836116,-2.02452,-4.36166,-2.46534,-2.40599,3.53798,0.439996,2.8824,2.66576,-0.190266,-0.411649,-0.335746 10164.8,10146.9,9241.73,1.14271,0.21175,2.54403,-5.97996,8.86795,9.92082,0.583279,0.92891,3.1377,1.52082,0.653327,-2.04189,-0.909795,-1.88382,-1.45444,-1.72465,2.94817,-6.9659,0.661566,-0.779148,-2.33549,3.61435,1.90115,-0.709103,0.572663,-2.44443,-1.61985,-1.24632 10161.8,10151.9,9242.42,0.429305,-0.24402,1.54324,-0.758714,1.99988,2.30697,-0.150645,-1.67843,-0.372931,2.68223,0.974669,-2.18675,-3.69726,-3.84373,0.315076,-1.61503,2.02219,-0.439987,1.5067,0.347441,-0.468043,1.85512,2.51346,-3.61534,-1.61311,-1.68631,-4.32277,-3.31289 10160.6,10154.5,9240.5,-1.6783,-2.7916,3.79283,-1.46484,1.8842,7.0456,3.61276,-2.08564,-1.14902,-3.90469,1.00738,-2.71903,-1.12392,-2.56102,-0.564502,-1.26929,2.87817,-3.80446,2.16188,1.69189,-0.17359,-0.806729,4.45158,-4.99401,-1.9224,-2.1335,-3.41399,-1.5215 10158.8,10152.9,9238.94,-1.26294,-1.55708,2.47997,-0.37092,-5.35681,-1.99801,-4.61673,-3.19995,-3.63982,-3.59422,0.268397,-1.15304,1.21312,-1.94008,2.37467,0.463918,1.03699,-0.249188,1.94821,3.1095,0.656428,-1.26258,5.17342,-2.5293,-0.911564,-0.727538,-1.60047,-0.657086 10157.1,10148.4,9241.47,-0.729297,1.90628,1.50273,8.02209,4.5029,7.25435,-0.943104,-3.87229,-5.15977,-0.605295,-0.786266,-0.00624273,3.2036,-0.99694,1.83674,-0.424322,-0.759934,4.69506,3.12589,4.93905,-1.14094,-2.37706,0.896838,-1.15642,-2.07425,-0.341439,0.651623,-1.90525 10159.3,10145.1,9249.53,-3.61489,-0.368775,4.8318,0.654323,13.8953,20.2332,9.01061,0.740005,1.06482,-1.98312,1.43178,-2.39481,5.44965,2.23927,-2.07082,1.84445,3.36316,-2.3874,5.82791,5.13504,0.331121,1.17574,4.11636,2.46863,2.53744,-2.31289,3.73605,1.261 10166.4,10146.2,9260.39,-0.690065,-0.196533,2.57149,3.28245,1.26863,3.07282,2.3288,0.343504,0.7493,7.7189,2.47287,-2.19401,1.83016,1.49389,2.04941,5.57015,1.68587,7.37325,4.33035,3.86901,3.21355,1.31074,4.30838,4.34097,4.14204,-0.792683,1.91579,1.4487 10174.6,10153.3,9268.63,0.973864,0.288282,4.67663,-0.604468,1.35396,1.77193,6.1612,0.928573,3.56181,0.301872,1.61496,-1.94891,1.37811,1.784,-0.829802,4.5252,2.98522,2.05165,3.03006,0.33278,4.9167,0.692046,4.78248,3.89965,4.1223,-1.28055,0.902128,2.44014 10179.4,10165.9,9270.91,0.383028,0.372248,2.91142,5.26445,-4.52355,-0.481389,-1.47582,-0.0802922,4.09074,-3.4789,-1.84054,-0.641665,1.60157,2.15213,-0.406849,1.24052,1.05589,7.69175,-4.79723,-3.42058,1.48542,-2.69221,-0.604027,-2.8823,-1.41943,-0.386671,1.59434,1.71786 10180.9,10180.3,9268.76,-7.39108,-4.07938,1.96913,5.84801,-1.99672,13.1344,-8.45676,2.45664,8.74322,0.00440195,-3.70354,-4.02376,5.09873,7.07674,-2.94009,-6.27334,-2.18896,9.06615,-15.5002,-6.518,-12.659,-9.2251,-8.78964,-16.0646,-15.2285,-1.36974,7.28841,2.96689 \ No newline at end of file +10125.9,10112.8,9219.5,-7.39443,-8.74936,7.28395,13.7953,32.2328,32.4809,18.958,-12.2383,-6.86466,-23.0912,-16.425,-5.70842,11.2467,-1.58574,-4.53717,-17.3842,0.912601,13.0428,2.44622,2.08875,-8.74373,-9.47217,-6.87574,-8.11158,-14.54,0.414787,6.04424,0.540389 10136.8,10115.1,9222.54,-0.120582,-1.94906,6.92247,4.75197,11.0735,0.972766,10.2285,0.717545,-1.04488,-7.64424,-2.10875,-2.44368,1.52535,-1.14131,-1.72589,-1.1247,-0.993354,2.98318,1.29855,2.0688,1.00297,0.135373,-3.25325,-3.12065,0.913296,-1.7868,1.58829,-0.735248 10148,10122.2,9228.62,4.24336,-0.689111,5.12782,0.132862,-6.64526,-14.7952,5.19361,3.68198,2.77598,-0.691866,1.07559,1.71444,-1.30287,-2.75746,1.74208,4.75944,1.80799,-0.064464,2.37174,1.09905,3.5756,2.98064,-0.238711,0.822007,5.07188,-0.864496,-0.208741,-1.31367 10156.6,10132.2,9236.11,-0.047434,-1.79438,-0.767925,-3.78683,-2.46365,-12.9433,2.00586,-0.48292,1.16216,0.113706,-0.639879,-0.0445654,-2.82995,-2.22008,1.46544,3.70217,2.84476,-3.32792,6.701,0.982599,0.145487,0.0501163,-1.16747,-0.630382,-0.0550437,-0.0563951,0.0449386,-0.715988 10162.9,10141.8,9243.46,-0.3687,0.640608,-2.93969,-0.37466,-5.42813,-8.55527,-4.70566,-3.62351,-3.94857,0.847112,0.357187,1.39279,-3.07124,0.779726,5.12671,3.62277,2.86265,3.44378,5.49842,0.895482,-2.1777,0.14728,-0.491475,-0.0257423,-0.32504,2.28464,-0.610659,2.01955 10168.7,10149.5,9249.62,-0.272231,3.00751,-2.20783,-5.50238,-1.65733,-2.39574,-6.82249,-1.5591,-5.38806,-0.315138,2.41171,-0.227563,-0.306796,1.26618,4.45885,3.55662,3.14737,-0.0497907,2.76691,1.04757,-2.50276,3.25334,1.90194,3.54754,3.2308,0.393197,0.115407,1.88919 10175.3,10155.8,9253.09,0.271133,3.11725,-1.24188,-5.32432,6.94595,5.40219,2.63329,1.77742,-0.434798,3.20784,3.1926,-2.12653,1.4207,-0.162939,1.57116,1.20026,2.14004,-4.36978,-0.074248,0.344989,-2.79157,3.57441,2.795,6.81971,4.61981,-3.15395,-0.556388,-0.951462 10181,10160.9,9253.62,-1.52186,-1.02665,-1.31765,-8.89055,1.45638,-6.40533,-8.20284,3.42071,6.34151,7.32703,2.81444,-5.56924,-2.07761,-2.82472,1.75969,1.56549,2.59032,-4.99642,-0.861721,0.661704,1.27294,4.24609,5.72265,7.93181,6.46356,-4.54558,-2.93302,-2.55741 10182,10163.1,9253.53,-4.12759,-5.01517,-1.383,-11.7032,7.03273,-0.354258,-4.14846,2.56836,5.49077,2.70724,-0.00938943,-7.91268,-3.33257,-3.77932,-2.70035,-1.95288,1.51899,-10.5021,0.604386,1.13765,2.8031,0.719838,5.10986,5.4321,3.01561,-5.05514,-2.51591,-2.29453 10178.9,10161.7,9255.33,-2.09727,-3.23639,-0.971464,-6.47564,-1.86208,1.47429,-8.69004,2.23012,2.64935,4.20852,-0.00802028,-4.11236,-1.54808,-1.73414,-2.21966,-2.31888,0.521142,-4.49634,-1.66003,1.37105,1.47741,-1.17943,3.52554,2.31201,0.381259,-1.24137,-0.930002,-0.860505 10176.3,10158.2,9258.8,-2.87976,-1.16821,-1.15587,-7.36873,-2.70663,3.69409,-6.23946,3.17083,3.67683,5.95472,2.6739,-2.5798,1.61294,2.31642,-4.31408,-1.6647,-0.422612,-6.13843,-0.39141,1.92345,-2.82275,-0.742784,1.68164,-0.706688,-1.87652,0.172975,1.51911,1.04727 10176.2,10155.4,9261.93,-1.79655,0.511159,-2.91648,-1.19976,-6.01265,2.43062,-4.91165,1.64787,2.485,6.04132,2.79139,1.36683,2.36631,4.70105,-3.09068,-0.875835,-2.73203,-1.04036,0.0279962,0.57264,-4.70596,0.399049,0.109101,0.540718,-2.52779,1.90878,1.47212,2.48712 10177,10154.3,9263.36,-2.06935,1.47151,-1.59814,1.1621,-8.21806,2.74994,-4.8666,1.6535,2.86737,3.56179,1.87379,3.98852,2.20191,7.00018,-2.12026,-0.322149,-0.459427,1.99009,-0.386875,-1.65524,-2.88602,2.5405,3.09752,5.52644,1.72241,3.28467,2.06659,4.48929 10176.7,10153.6,9262.97,-2.47996,0.0736981,-1.18826,-1.40068,-2.38119,-1.33094,-3.87199,0.498621,1.31667,-0.952908,0.481976,0.0885501,1.11339,4.67043,-2.37383,-2.32579,0.991108,-0.25346,2.41941,-1.44295,0.0394728,1.67752,2.73018,4.10445,2.29859,0.993454,2.7469,3.39394 10174.9,10153,9261.77,-0.957748,-0.455644,0.885525,1.7746,0.0437147,0.878291,0.0855234,-0.572903,1.39546,0.00119098,1.69176,-1.96049,0.156938,2.84845,-1.18488,-2.65197,1.35428,1.98606,1.65427,-0.643756,-1.03602,-0.0406435,-0.236011,-0.961959,1.28125,-0.464305,1.75539,1.84618 10173.4,10153.5,9261.3,-0.583682,-0.792331,1.36077,0.644185,-3.55594,-0.618864,-4.88099,-0.136266,1.51362,2.73872,3.65897,-2.63062,0.416981,0.735765,0.533665,-0.326252,1.0146,2.83848,2.16063,2.30307,-2.01136,0.638055,-0.22921,-3.19692,0.947596,-0.379132,0.678065,0.747812 10174.5,10155.7,9262.24,-0.685336,0.856591,-2.63545,-0.959601,3.25442,0.791955,-2.20612,0.263046,-1.34292,4.47114,2.99912,-2.56858,-0.21931,-1.56389,-0.808263,0.311028,-2.34261,-0.965718,1.98615,3.50723,-1.41951,-0.258476,-1.16227,-1.73014,0.372641,-0.118946,-0.422557,-1.3986 10179.6,10157.8,9264.01,2.59538,3.68921,-1.9033,3.99249,0.109215,-1.86778,-4.51336,0.591929,-1.29086,1.52475,1.01934,0.773735,0.0652847,-3.00075,1.79923,2.1369,-2.11635,3.17035,-1.87907,2.19309,0.880052,-0.480886,-1.94369,-0.204693,1.63785,1.43004,-2.081,-3.24652 10186.9,10157.6,9265.4,2.10402,4.02633,0.884264,0.1708,-3.27208,-4.9215,-1.0364,1.60796,1.70888,-1.43476,1.10519,1.26841,0.0627916,-2.97727,1.13683,2.82663,-0.301705,-0.592683,-3.81587,-0.70989,1.60855,0.103857,-2.48043,-1.22737,-0.312858,1.31617,-1.91269,-3.98886 10192.2,10155.4,9265.29,1.6824,4.26755,1.57687,1.43194,-5.98808,-2.25097,0.153789,0.168572,0.879003,1.68604,0.75956,3.65922,-0.869793,-2.49312,0.497574,2.41553,-1.34226,-0.127659,-3.59295,-1.56547,0.88849,-0.785242,-4.24845,-5.15572,-4.81836,2.77035,-1.44493,-3.44434 10193.6,10153.7,9263.38,1.6491,4.80854,1.08823,5.10222,-5.26833,5.52263,-0.997094,-0.959485,-1.52356,6.15147,0.897033,7.60472,-1.50848,-0.576994,0.845199,3.25263,-2.21353,2.36454,-2.11918,-0.480371,1.405,-1.24949,-1.88424,-5.50221,-4.39822,4.6832,-0.575266,-0.350337 10193.7,10153.5,9260.14,0.371243,3.4575,-0.922956,2.86612,3.70316,4.4652,-2.35097,-2.08567,-4.55866,2.05406,0.20181,5.48777,-0.851734,-0.932792,0.852325,2.66059,-2.76402,-0.836483,3.32512,2.58318,3.54953,-1.82575,1.03107,-3.58566,-4.1055,2.71087,0.64122,1.16036 10193.4,10154.1,9256.45,0.655998,2.95689,-0.961572,2.95967,6.90968,-0.0847335,-1.13659,-2.64581,-3.78971,-2.43015,-0.722449,3.08777,-0.234356,-0.603156,1.30068,1.14368,-2.23215,0.241084,3.91588,3.38796,4.07024,-1.08082,1.15617,-0.375163,-2.54369,1.29418,0.795869,1.31402 10190.3,10152.8,9253.2,2.59279,1.93007,1.93861,4.82647,-1.84288,-5.84018,-7.03235,-2.16958,-0.8999,-4.4747,-1.99497,2.40008,0.0349671,-0.825783,2.00993,-0.184404,-0.576706,6.30193,1.43455,3.63536,2.34484,0.148851,-1.22127,-0.718508,-0.716753,1.50537,0.412978,0.73252 10185.2,10148.2,9250.73,1.88291,-0.127643,2.41457,0.38457,3.28565,2.40364,1.07674,-0.352091,-0.192694,-2.80281,-2.45121,-0.746935,0.454781,-0.345492,-2.38393,-2.35152,-0.468918,-0.28004,0.207449,2.6636,-1.39254,-2.09536,-4.44811,-4.48824,-2.93117,-0.770421,1.19,0.219788 10183,10142.2,9248.93,3.78484,0.701338,-0.71552,3.48407,0.454755,4.3743,3.68099,-0.668556,-3.42636,5.52772,-1.23863,-0.405148,0.665698,1.06479,-0.0251586,-0.48849,-0.847741,1.4814,-5.36764,-0.405219,-1.51485,-3.88226,-5.12764,-5.33767,-4.3365,-1.173,0.417418,0.415356 10185.4,10138.4,9247.93,3.11727,0.196163,-2.018,0.721283,-2.5075,-1.06349,0.331823,-1.2182,-4.01712,4.78444,0.452166,-2.16432,0.55673,1.61447,1.16718,1.44415,0.569846,-0.812131,-8.14324,-2.91296,2.43154,-1.45218,-0.730675,-1.0947,-2.25658,-3.52675,-0.361214,1.09266 10188,10139,9248.05,1.52249,-1.16117,-2.4591,-2.41492,-0.35832,-7.48161,-0.0490082,-2.1421,-3.52013,0.903896,-0.958215,-5.8036,-2.36788,-0.368615,-1.88998,-1.40466,-1.28791,-4.79995,-5.58563,-3.57656,4.13739,-0.274441,1.53352,2.93946,-1.96753,-6.76034,-1.87752,-0.324793 10186.8,10142.9,9249.23,2.29541,-0.414867,0.263844,-2.42527,-9.23597,-12.7958,-5.40665,-1.3296,-0.255947,1.05195,-3.09731,-3.83996,-4.40177,-0.0123634,-1.79533,-2.22933,-1.59891,-1.58539,-4.29444,-3.24283,2.73497,0.939395,2.25632,3.98042,0.672842,-4.87272,-3.0871,0.140664 10183.8,10146.3,9250.93,1.04007,-0.107056,-0.719832,-5.17314,-6.41206,-13.4527,-3.51115,-1.82372,-1.0661,0.164654,-4.87432,-3.16371,-3.16216,0.547311,-2.31938,-3.32366,-2.59406,-3.07878,1.07584,0.135595,-0.15385,-0.198986,-1.76614,-0.364142,-1.44816,-3.17832,-0.666637,0.539005 10182.5,10148.1,9252.57,1.58315,0.552138,-2.38854,1.84879,-2.25441,-6.8381,0.208721,-2.73312,-3.19332,-2.49192,-4.21087,0.445019,0.0651566,2.67403,-0.780414,-2.43461,-3.10543,1.48742,-0.123359,0.0321366,-2.00728,-1.30717,-5.02137,-5.05394,-3.39985,-0.233706,2.10556,1.51466 10182.7,10149.6,9253.33,0.671616,-1.8801,-5.19861,1.6691,-0.386439,-6.73637,0.390118,-1.36276,-2.8229,-3.74619,-1.53148,0.15594,0.934737,1.96014,-1.35363,-0.924511,-3.00858,0.653744,-1.84706,-3.59509,-0.247233,0.962108,-1.40552,-3.28119,-2.22432,0.0626129,2.48273,0.969888 10182.9,10150.9,9252.01,0.0166707,-2.52456,-5.48285,2.26653,-2.03587,-6.50283,-1.00325,0.264499,-1.46362,-0.822672,-1.11829,0.403605,-0.734484,-0.382999,-0.186567,1.24812,-2.13095,1.80897,-2.82131,-6.15356,2.54337,2.39696,2.51379,2.41699,0.307725,-0.195503,-0.252349,-0.890546 10182.1,10151,9248.33,-1.21698,-1.52567,-2.334,0.102378,3.74418,-1.36756,3.51501,1.50357,-1.80774,-0.855037,-2.71284,0.0746735,-1.2904,-2.37263,-0.326812,1.37779,0.0811662,-2.04277,0.452769,-4.37491,4.60025,0.785458,0.944597,2.57121,-0.443829,-1.9031,-1.78376,-2.25217 10180.2,10149.4,9243.85,-0.498632,0.815261,-1.05027,1.32586,2.65892,-5.17029,-0.588453,1.63481,-3.33979,4.4087,-1.26981,2.01576,-3.03953,-3.66687,1.33091,1.62961,0.568999,0.53543,0.477935,-1.78405,3.91722,-1.12653,-3.07327,-2.27103,-2.21119,-0.0469714,-3.05949,-3.83303 10176.1,10146.3,9240.54,-0.464849,1.25223,-1.14736,-0.645201,4.96922,-0.805424,1.85313,1.43677,-1.45072,6.22509,1.54511,2.89442,-3.56094,-4.35854,-0.476689,0.39343,-0.929162,-1.07774,0.941846,-0.57756,0.363373,-1.13491,-1.30865,-3.06369,-1.8739,2.47973,-3.19611,-5.38414 10169.3,10142.4,9238.91,2.28739,1.91951,-0.759834,1.17008,-1.10807,0.137649,-1.76481,-0.427729,-0.592675,2.50623,0.607717,4.10404,-2.20382,-5.11375,1.80008,0.383348,-3.40396,4.33491,0.605228,-0.0871236,0.185566,0.480246,2.74078,1.48145,2.07534,4.96863,-2.65852,-5.78272 10162.1,10139,9238.14,2.03262,2.32633,0.46709,-2.26524,5.80967,5.85587,5.67759,0.185696,-0.246666,-0.787877,-0.201738,0.61348,-0.542043,-3.51173,0.345287,-0.426571,-4.01566,0.315299,2.10005,-0.391753,2.39343,1.28396,3,4.99164,5.3145,2.31592,0.0224444,-4.14279 10158.4,10136.9,9237.31,2.77556,2.83113,1.37245,1.19159,2.19923,-2.0116,3.1913,1.03754,-0.929092,0.870894,1.00256,-0.624392,-0.561338,-2.99529,2.23674,0.823539,-1.63024,3.75817,0.298891,-1.18515,4.54738,1.25951,1.91277,3.57793,5.44217,0.785618,0.025315,-3.27161 10158.5,10135.5,9236.37,0.0672571,0.761886,2.35427,-0.889999,6.73976,-1.98269,8.45302,1.1398,0.0604089,-1.15193,1.32222,-2.47069,0.131408,-3.48238,-0.669944,0.753279,3.07189,-2.04262,0.174304,-2.32107,2.83224,0.708328,3.23848,0.984911,2.384,-1.28385,-0.548071,-3.32946 10160.6,10134.8,9236.46,-0.783525,0.239203,0.00548465,1.88108,6.83171,-2.89703,7.27976,-2.71585,-1.47417,2.12383,-1.04536,-1.14095,0.145875,-4.3962,-0.139564,0.781551,3.40043,-0.28834,-0.343608,-2.36391,0.0938093,-0.36295,1.0276,-0.578692,-0.619797,-0.489157,-1.92106,-4.163 10166.1,10135,9239.02,0.124276,1.29463,-1.44975,3.21172,2.53479,-3.38317,-0.20102,-4.72755,-2.14129,5.53743,-1.24849,0.994366,0.436372,-3.09635,2.19121,1.13794,1.52365,3.0586,0.622146,-0.699363,0.103461,0.316277,-1.73095,-0.195395,0.490618,1.44514,-2.50878,-3.62472 10175.6,10136.9,9243.9,1.67228,1.70099,-0.125799,2.04051,6.74509,2.05118,7.82124,-3.08565,-1.70842,3.37127,-0.160655,1.32998,0.57087,-1.46351,1.80831,-0.585194,-0.267853,0.719624,2.12333,-0.931791,2.61407,0.519467,-1.78038,1.70819,2.66646,1.47407,-2.48388,-2.6294 10184.4,10140.5,9249.09,4.05746,1.49391,3.1491,4.74869,1.42089,-7.65297,4.6083,-1.50292,-0.681543,0.792377,-1.54194,2.19467,-1.449,-2.54459,5.38937,-0.0662613,0.683022,6.46847,-1.151,-2.09676,5.40097,0.0884146,-0.584039,0.411805,2.87021,2.70096,-3.69024,-2.72328 10185.2,10143.8,9252.71,2.20708,-1.9117,6.2705,-1.38994,9.88462,0.984595,14.8745,1.09177,3.01497,-6.59006,-3.06879,0.864155,-0.352553,-2.42934,1.6214,-0.899998,2.90809,-2.62154,-0.748965,-1.78716,3.1828,-0.76616,1.51574,-1.80336,0.759499,1.08543,-1.48814,-0.830864 10176.5,10145.2,9254.8,3.08758,-1.24415,2.30133,1.5123,4.9996,-2.25743,5.71269,0.326257,0.862459,-5.32366,-2.15784,1.98295,-0.769376,-3.24456,1.73394,-1.18022,0.303592,1.19388,-1.18318,1.1848,-0.484859,-3.12715,-2.31674,-4.16244,-1.41399,2.32149,-1.0187,-1.70219 10164.6,10145.4,9256.92,1.59078,-1.06701,-0.557541,-2.88977,3.22953,-0.245042,-0.474481,0.0498212,-1.16809,-8.33134,-0.306573,0.38113,0.242976,-2.39828,-1.29092,-1.68013,-0.127576,-1.94114,1.03024,1.7825,-1.44807,-2.86352,-4.13379,-1.78466,1.5241,1.16147,-0.513496,-2.30027 10156.4,10145.9,9260.21,0.0333157,-1.40254,-1.63643,-2.63202,2.15792,2.8366,-1.32406,-2.25364,-4.61227,-7.74587,-1.005,0.107792,-0.131513,-2.0428,-1.28031,-1.65736,-0.0589992,-0.767749,0.0451012,-1.23948,0.334266,-2.05544,-5.74107,1.40617,2.47259,0.129519,-1.22605,-3.50154 10152.5,10145.2,9264.25,-2.23854,-3.34598,0.871046,-4.48776,-5.12246,-0.367558,-7.49548,-3.04105,-2.99035,-3.84367,-2.67766,1.19195,0.695189,-1.99211,2.38266,0.800284,2.92667,1.82052,-0.796218,-1.82753,3.43662,1.60186,-2.49788,2.02216,2.59346,0.975508,-0.397427,-2.78437 10148.6,10141.1,9267.56,-4.64613,-5.4569,3.80281,-6.22039,0.554038,5.00519,-0.395733,-3.04225,0.570141,-6.95862,-4.49105,-0.00732036,3.78285,-2.09066,1.46914,-0.873643,3.95228,-2.08532,2.8568,0.749314,1.78963,1.02579,-0.808831,-1.60113,-1.17483,0.544949,1.95805,-1.27827 10142.4,10134.6,9268.73,-4.02228,-5.3818,4.39201,-6.57399,-2.68308,-0.146626,-0.297909,-1.28233,3.72363,-10.5635,-3.46562,-0.498293,3.92457,-1.10422,0.725311,-0.888612,3.1725,-1.82837,4.64182,1.32637,-0.56378,0.781271,3.29557,-0.557202,-0.712584,0.587691,2.76212,1.05325 10137.8,10128,9266.83,-2.98689,-3.62614,2.49614,-3.78405,5.33483,-3.24499,-1.4797,-1.49474,0.75769,-13.0722,-3.57543,-1.73535,1.13307,-2.81826,-2.67056,-2.75063,-0.407379,-1.38965,7.67619,2.2374,-2.93415,-2.1994,0.956463,-2.25511,-4.42128,-0.889014,2.30781,-0.144069 10139.6,10121.2,9261.84,-1.19244,-2.09691,-1.17019,-2.92359,1.84257,-9.64131,-8.2266,-2.48032,-2.29368,-7.41116,-3.60172,0.404837,-2.31741,-3.52505,-1.14341,-1.1367,-2.22469,2.93998,5.91064,0.841518,-1.68308,-1.06298,-0.398387,-1.68239,-3.53445,0.38234,1.02165,-0.403129 10146.2,10113.8,9255.3,-3.35595,-3.34535,-1.74811,-10.4556,3.60927,-0.776329,-3.08604,-1.29687,0.835023,-5.76979,-1.7646,-2.22816,-1.31439,-0.382083,-1.73312,-0.792276,0.206848,-4.1992,4.29806,-0.830575,-1.71405,1.40452,2.00247,0.106559,-0.768805,-1.08451,1.11784,1.22578 10152.4,10107.8,9249.87,-2.49869,-3.87311,-1.98238,-6.90342,-1.23671,2.90852,2.97754,-0.581043,2.81778,-2.71728,-1.21684,-5.07044,0.497485,2.01224,-0.365556,-1.64542,1.17956,-3.76085,-0.573467,-2.58111,-2.12663,0.378165,4.18795,1.24581,-1.36196,-2.87649,0.482267,1.63454 10154.8,10107.2,9247.27,-4.01788,-5.39388,-1.72161,-10.3153,-0.251037,-1.57831,1.61553,1.18147,5.7765,-0.599766,-1.22598,-10.0294,0.895145,2.02015,-4.45992,-2.58818,2.98391,-9.45103,-1.41902,-1.29446,-0.55725,-0.180421,6.94249,-0.594659,-3.53394,-6.50742,1.38112,1.51458 10153,10112.2,9246.76,-3.24249,-5.01072,-2.02956,-7.46567,0.0264794,-1.5224,-3.31193,1.53111,5.32332,2.5335,0.40251,-7.05633,-0.711568,2.89381,-5.39998,-1.36446,2.04786,-7.02942,-4.53297,-0.88262,-0.357391,0.595822,6.5409,-2.84395,-2.64994,-5.7378,1.39939,2.97985 10148.7,10119,9246.16,-3.96002,-4.42756,-3.26432,-8.69557,4.03628,0.616301,-3.92147,2.76458,1.652,2.17356,4.22927,-4.5247,-2.33417,3.89508,-5.29918,-0.309883,-0.288513,-8.36711,-3.09529,-0.126421,-1.8539,2.38545,3.61409,-1.26649,0.429596,-4.19612,1.45711,3.95651 10145,10125.2,9244.17,-1.75695,-0.511195,-1.73883,-3.34742,-1.26592,5.24499,-3.03549,2.78645,-2.1334,0.220919,5.88292,0.160927,-1.7455,5.37331,-1.59599,1.91312,-0.631146,-3.16886,-2.94994,0.34822,-3.01289,2.84951,0.356135,3.47859,4.18276,-0.12287,0.984563,3.64398 10143.1,10130.2,9241.27,-1.71615,1.12867,1.04805,-6.57347,2.41341,16.2593,7.00371,0.924589,-2.71609,-6.2656,3.57183,0.37743,1.96421,5.66573,-2.3041,2.26799,0.668846,-8.32571,2.30148,2.66333,-1.75615,2.71555,1.44408,6.00224,4.85886,0.685304,3.03234,2.82015 10140.7,10134.4,9239.05,-1.25992,2.46902,-0.556969,-2.76672,5.45596,12.4649,8.36959,-2.49709,-3.8708,-1.40646,1.38854,1.37064,2.12007,3.84209,0.459629,2.15086,-1.24194,-4.15365,4.52043,5.4809,0.876317,0.656659,-1.01116,2.09458,1.65028,2.77599,3.21635,0.381243 10133.6,10137.8,9238.32,-2.22442,1.37094,-0.787327,-1.05469,3.55443,5.14715,-0.0509983,-0.0905216,0.72894,3.96149,2.38061,1.75467,3.09083,4.18358,2.79613,3.29833,0.325666,-0.671704,6.07566,7.72379,3.13564,0.655668,-2.59152,-1.76199,1.58102,4.45884,3.34631,0.480564 10121.1,10140.7,9238.2,-2.17367,-0.866588,-2.79273,0.692199,10.1863,9.97874,6.04483,2.66482,1.76948,2.61332,1.9281,-1.1243,5.03132,3.85731,-0.443337,0.284932,-0.868815,-3.31091,8.51065,6.49177,2.23459,-1.67042,-3.77735,-2.781,-0.902713,1.50205,4.04064,0.197185 10110.8,10144,9237.47,0.303664,0.966366,-2.65365,4.69141,3.98147,5.09796,4.57488,3.26927,0.562439,5.41174,1.92471,-1.15766,3.6349,2.42314,-0.0874924,-0.0560302,-1.22366,1.9914,3.44357,1.69106,1.98031,-1.32375,-0.576816,-1.03349,0.269332,-0.300454,3.28264,-0.458562 10110.3,10147.7,9235.48,1.28867,0.940385,2.1165,-0.581377,-0.643187,-2.16313,1.69237,2.47912,1.37859,3.32286,1.26412,-0.720553,2.36863,-1.25903,0.0706914,0.944374,2.2859,0.229574,1.5842,-0.12766,4.43122,1.34327,3.34673,-0.404948,2.87655,-1.67866,3.04869,-0.25307 10116.7,10150.7,9232.33,0.394714,-0.833445,4.94793,-6.11826,9.22151,2.99358,11.1041,1.15853,2.93899,0.397365,0.0221406,-0.0976144,-1.13452,-3.42557,-3.72862,0.476803,3.69054,-8.12164,2.48493,0.363106,3.87676,0.504363,0.972674,-1.44388,2.15926,-0.828986,1.75931,-0.549928 10121.4,10152.8,9229.14,1.29508,-0.757006,3.12597,-1.6729,7.62364,-0.936804,6.48918,-1.03742,1.86227,-0.262351,-0.75051,2.31301,-4.8422,-4.5034,-2.66476,0.578808,1.27532,-2.04282,3.45288,3.01897,0.564668,-1.21876,-3.06331,-2.70583,0.257935,3.52846,-1.56111,-1.5308 10121.6,10152.4,9226.86,0.677648,0.378414,1.31475,-2.61018,4.91454,0.37514,2.86121,-0.193973,1.93324,-4.63591,1.10695,3.14457,-2.96694,-2.19304,-2.99025,0.50097,0.165722,-0.200595,6.85438,4.63234,-2.47705,0.342532,-1.30419,-0.141339,1.63084,4.32707,-1.19328,0.76139 10120.5,10149.2,9225.49,0.499478,1.88224,-2.14427,-2.77288,10.6927,1.71766,6.49787,0.43981,0.0705592,-5.13201,2.57263,1.48076,-1.20267,-0.591255,-4.74193,-1.79266,-1.46188,-3.42451,8.04316,3.54243,-2.30088,0.0710442,-2.83238,0.653942,0.240506,0.904871,0.430945,1.6283 10121.2,10144.8,9224.89,1.35965,2.80608,-1.94166,1.75583,0.26227,-8.26437,0.567312,1.6259,1.60009,0.0627174,2.62631,2.65738,-1.31444,1.36503,-0.138702,-0.303116,1.07964,0.805711,0.6712,-0.0379901,0.596301,1.49046,-2.9437,-0.0854658,1.7116,1.14138,0.19577,2.11315 10121.7,10140,9224.64,-0.625981,1.46152,0.571473,-0.708952,-3.97306,-7.60183,3.54876,2.52756,3.43643,-3.37318,1.25185,1.95327,-0.430742,1.99167,1.38528,0.439469,3.35733,-3.21518,-3.33649,-3.33716,1.63613,2.87364,0.216347,-1.19264,2.34646,1.38095,0.250252,2.26893 10117.5,10135.7,9223.59,-0.644241,3.50756,1.18011,1.32346,-4.09529,-1.15572,8.91836,0.864807,0.810206,-4.21922,0.85698,1.54667,-0.984211,1.49262,0.424346,0.272079,0.55043,-3.11065,-4.92549,-5.21789,0.616593,0.933381,0.453042,-0.907799,0.816878,0.888407,-1.07882,0.897744 10109,10134,9221.44,1.24811,3.97674,3.11247,-1.16572,-9.20759,1.26864,10.07,0.861166,0.629341,-5.07074,1.84156,0.554677,0.501606,2.3508,-1.99158,1.42546,-0.0624237,-4.75601,-4.11731,-5.27973,3.12042,0.927954,2.01431,1.91643,2.26937,-2.42322,-1.85499,2.11246 10103,10135.6,9219.87,2.2046,4.10281,1.87105,-2.44462,-1.81059,2.73657,16.517,1.49188,0.862687,-1.50652,2.91423,-2.27191,-0.311967,3.16828,-6.05317,-0.647296,-0.600809,-9.86797,-3.317,-4.05579,3.51099,-1.77799,-1.17227,0.17711,-2.12588,-5.86398,-2.08211,1.43944 10103.9,10138.7,9220.3,3.77174,5.49059,1.2637,1.03751,-12.6254,-6.24364,0.90728,3.65224,3.71822,2.59825,4.31988,1.86088,-2.62582,4.43061,-1.00461,2.10803,1.47555,-3.28777,-8.18549,-4.31695,2.95113,-1.34785,0.676274,-1.38936,-3.04336,-1.37001,-2.35773,2.00922 10108.6,10140.8,9221.82,-0.70593,3.90046,-1.14247,-3.0764,-1.47295,-1.10809,-0.510284,3.79285,2.60078,-1.28697,3.77566,2.32766,-3.54475,2.99719,-1.20306,1.33262,-0.719923,-9.06449,-7.33119,-4.80493,-0.721145,-2.4024,1.79362,-1.97223,-5.04385,0.0875954,-1.73778,0.950888 10113.1,10142.1,9223.55,-1.06377,0.843971,-1.44889,-5.32939,2.69029,-3.83385,-5.63119,0.535717,-1.61039,-5.59267,1.26514,2.05707,-3.31026,-0.958826,1.33732,1.46551,-3.13585,-9.66605,-6.00234,-4.35532,-0.26599,-0.831562,2.98878,0.128679,-2.54674,-0.278737,-3.58409,-1.324 10120.7,10142.9,9227.01,3.56995,1.04759,3.75113,-1.7421,5.12807,3.1454,2.38504,-1.62768,-2.93793,-5.71266,-0.530001,2.84448,-2.04436,-1.31251,2.17243,2.11298,-0.867238,-7.66197,-6.87331,-3.32769,-0.373459,-0.116178,2.03689,0.379397,-0.00605166,-0.182103,-4.1657,-1.22794 10135.1,10142.1,9232.63,4.13322,3.14571,5.42112,-9.50857,6.61076,-1.5265,-1.3563,-0.229734,-0.953633,-2.39287,0.0907423,-2.25912,-2.95494,-0.622513,-0.878638,3.11006,2.20909,-12.7591,-4.65267,-0.652931,-0.508727,-0.484787,-1.43884,-3.89903,-1.68783,-1.20607,-1.47415,-0.30987 10150.6,10139.9,9237.26,7.08686,7.1115,3.05908,-7.31514,-2.75139,-6.15754,-6.75994,1.34201,0.583247,1.72791,0.0586144,-1.05549,-2.23348,1.35232,0.957745,3.9225,0.27845,-7.28043,-8.71747,-3.21629,1.12263,-1.08286,-3.72117,-4.10901,-0.817087,-0.319549,-0.171801,1.86899 10161.3,10137.9,9238.2,5.45348,5.872,0.0360833,-8.71486,1.68904,-1.57501,-9.84544,2.70784,2.39605,-1.45535,-0.548901,-2.93743,2.31592,2.21738,-0.0678836,1.75621,-1.90485,-7.83172,-5.34721,-0.902631,2.89369,0.938874,1.08004,0.946796,3.39736,-3.2386,1.23533,3.43628 10168.7,10135,9236.89,1.9988,3.16081,-0.959961,-1.65775,15.8147,12.2058,-6.43511,1.69639,2.59198,-2.06327,-0.47323,-4.35241,3.77438,3.79233,-2.16153,-2.08622,-2.56136,-3.89096,-0.736348,5.49778,-0.475583,0.770127,3.05002,3.17719,3.81221,-4.99556,1.59718,3.01185 10178.3,10131.2,9237.28,0.818385,-0.233269,1.46873,6.63122,10.9706,17.5879,-3.54675,0.677416,3.72244,0.655626,-0.201865,-1.16835,1.57109,5.42876,-0.444523,-1.12764,-0.256929,5.62565,-1.99386,6.4084,-2.47406,1.18593,3.2834,3.0293,3.51573,-2.53776,0.959038,3.23253 10193.3,10130.2,9242.16,-2.48525,-2.35837,2.98987,5.98816,11.4719,15.9039,-4.84232,-0.825315,2.54659,1.43064,-0.659643,-2.96556,0.571285,2.41784,-2.00371,-0.757574,1.41844,6.37057,1.42823,7.71148,-4.93994,-1.54988,-0.232174,-1.34349,-1.26249,-2.05601,1.26179,0.464125 10210.2,10133.3,9250.5,-0.302459,-1.69801,0.843368,2.30597,6.15326,11.0157,-5.9274,-1.05244,-1.68469,-0.278629,-0.694935,-0.891837,1.23651,-0.21345,-0.305015,-0.0987808,0.160233,4.91775,0.166271,3.92353,-3.88399,-2.55526,0.198425,-0.923912,-1.86728,-0.552523,1.22445,1.15572 10221,10137.3,9258.6,-1.56339,-0.256664,0.840544,-1.61826,11.0061,14.4706,-2.59098,0.449882,-1.65171,-1.89163,-1.35949,-1.40198,3.60618,0.270121,-1.02351,-1.1912,0.778059,-0.110922,0.867721,2.27546,-5.20223,-2.14642,1.17716,-1.36266,-2.51971,-1.10085,2.42789,2.32548 10222.9,10141.6,9264.61,-4.74868,-0.212232,1.05283,-1.29221,10.744,4.75459,-2.81401,0.644295,0.850172,0.179994,-3.01777,-4.30435,2.71079,-1.12735,-1.29174,-2.07496,1.34575,1.0376,2.5823,1.95702,-4.5778,-1.28586,-0.494008,-4.39926,-5.46478,-2.40477,1.70545,-0.546783 10222.5,10148.7,9269.02,-3.49502,-0.678579,-0.213247,8.06515,8.4472,0.736921,12.8231,-0.680516,1.09355,1.44143,-3.62765,-2.08929,0.194595,-2.35671,-0.392866,-2.86869,-0.655593,6.76095,0.52286,-1.94996,-0.69629,-1.94695,-3.05311,-3.36287,-5.8798,-2.04553,-0.962602,-2.08692 10226.3,10155.2,9271.48,-1.96969,-0.131236,-7.34816,10.3469,1.43629,-18.1274,6.28789,-1.94889,-4.21799,9.10578,-0.96868,-0.513386,-5.07894,-4.75252,3.07715,-1.21549,-4.62974,12.6049,-2.11208,-4.5134,4.07597,-2.26695,-5.31607,-0.080814,-4.75562,0.0499323,-2.60796,-2.05158 10230.1,10151.7,9270.27,-0.441668,1.99564,-2.24149,10.4542,-4.09391,-6.45561,-1.77752,0.712394,-1.02642,8.25875,2.54249,4.31177,-1.67116,1.28898,3.90167,2.27301,-0.292013,13.1856,-3.31394,-4.23242,0.509949,-0.582218,-1.55254,1.54596,0.383257,3.15094,0.659781,3.83919 10224.9,10138.7,9266.49,4.67287,5.1299,-1.26323,13.4301,-10.2745,-9.49416,-12.2719,-1.18436,-2.87586,6.16837,2.83569,6.07774,-2.8315,2.00898,6.40272,2.01559,-1.86315,15.8694,-4.72684,-3.25468,-2.65905,-3.311,-6.24296,-4.21139,-3.70695,4.80612,0.395122,1.76566 10212.8,10131.4,9265.67,3.01888,4.86272,2.80549,9.41976,5.08199,16.7307,3.01517,-1.39232,-0.901598,-3.17761,2.70511,2.89126,0.206015,2.09237,1.79821,0.427067,-0.286912,4.97158,1.88506,1.52106,-4.78901,-3.10639,-5.19696,-1.88352,-1.17405,1.76068,1.66502,-0.462334 10205.3,10137.3,9271.29,5.0191,6.44861,-1.029,10.2232,1.46143,6.79866,-7.1328,-3.52906,-8.32347,-3.93806,2.03961,4.301,-3.73195,-3.92217,6.44854,2.90593,-2.49697,11.4551,-0.562561,1.57056,0.711111,-0.350636,-4.25263,3.76126,3.75639,3.70316,-1.79131,-3.47622 10205.7,10147.7,9278.59,5.83546,6.36501,-0.202118,7.16455,-12.9828,-12.4607,-27.3389,-3.33415,-9.60681,-6.26496,-0.539386,6.78879,-3.91681,-6.10831,9.8609,6.12423,0.502419,17.71,-2.72276,0.90307,5.89102,4.35576,1.47131,6.87862,9.08531,6.44279,-3.45175,-1.92878 10205.4,10153.7,9279.43,2.61204,3.79426,2.8599,4.2373,-6.30104,-6.55433,-17.9117,-2.30217,-4.33352,-8.56342,-2.54108,4.06241,-0.221565,-2.25183,3.87958,2.42384,1.7425,10.0636,-0.274803,1.38918,2.9688,2.49859,1.85002,3.57782,5.56749,4.25356,-1.57246,0.769565 10198.3,10155.2,9271.53,1.79363,-0.436721,3.46418,1.17919,-6.21503,-12.0337,-14.7144,-0.753172,-0.422946,-10.0673,-1.05729,0.16841,0.00393219,0.329848,3.06417,0.641188,1.13987,4.50086,-1.96838,-0.158451,2.22687,1.01485,-0.617827,-1.82684,0.837829,1.35672,-0.969077,2.83866 10187,10154.7,9258.9,0.357944,-3.85399,-0.403587,-0.905802,-6.94279,-16.6984,-17.7781,-0.22625,-1.87358,-4.80273,-0.208291,-3.41762,-1.38116,-0.435891,4.56144,1.47257,0.881539,4.31043,-2.35524,-0.63135,2.49929,2.73787,-0.3439,-0.967951,0.479767,-1.25236,-0.198644,2.70849 10175.5,10150.8,9245.55,-2.22289,-4.64417,-1.57873,-3.37822,-3.35046,-9.88201,-14.3071,0.168661,-0.756661,-2.69992,-1.57269,-4.61371,-0.741804,-0.794809,1.95045,1.34471,1.90438,0.670421,-1.36383,-0.0207592,1.95603,4.44548,1.70081,0.896225,1.96219,-2.68814,1.37985,1.21966 10163.9,10144.5,9233.39,-1.0609,-3.6573,-1.22008,-1.66234,-8.72059,-9.8591,-9.71449,-0.237702,2.4907,-0.383432,-2.45784,-2.52105,-0.451308,-0.95008,0.101755,0.998499,0.0147502,0.763548,-2.08901,-0.286814,2.08671,3.24587,1.98374,-1.03823,1.41551,-1.64013,0.866956,-0.452541 10152.5,10140.9,9224.11,1.58528,-1.3177,-2.21666,-0.770113,-12.1162,-14.2306,-0.877621,-0.372338,1.62768,2.76293,-0.69447,0.389726,-2.24466,-0.492948,-1.07534,1.2119,-2.84085,1.62365,-4.58137,-3.47859,2.38127,-0.58689,-1.20067,-5.12188,-1.38938,0.191315,-1.00868,-0.231626 10144.9,10141,9218.45,2.9188,-0.174985,-4.58083,-6.94645,-12.0718,-23.1781,-6.27315,-0.364715,-3.24703,1.70145,0.993811,-0.598274,-3.56103,-0.759525,0.496704,2.46032,-1.89983,0.597576,-2.01394,-2.93857,4.73883,-0.682548,-1.34504,-3.70636,-1.23983,0.0550942,-2.01066,1.58053 10141.8,10139.7,9215.32,1.06474,0.421951,-5.29652,-9.2234,8.36446,-5.7284,0.960531,-0.909556,-4.90704,0.770291,1.54135,-5.62095,-2.20122,-1.09503,-2.35206,-0.974175,-1.0101,-7.23319,3.01594,0.768168,2.39478,-1.32615,-1.6404,1.53725,-1.51813,-3.97654,-1.7665,0.833795 10141.4,10134.3,9214.23,0.86273,1.35397,-0.657898,-4.72598,2.71892,1.93911,-8.71178,0.127278,0.812447,5.14689,3.34014,-5.47575,-0.124804,-2.70815,-0.541837,-0.600256,1.53834,-3.53843,0.0605411,2.43643,0.689316,0.936364,1.45495,3.58725,0.917646,-4.12549,-2.16127,-1.91164 10145.6,10128.8,9217.09,0.035273,1.26692,3.11502,-4.96307,-6.78084,1.02172,-8.79811,2.69846,4.94751,11.3598,6.51275,-2.0705,0.657905,-2.59061,-0.35795,1.18908,3.42851,-3.05799,-3.41004,0.806424,0.399374,2.92706,4.4301,0.273598,0.553543,-1.76552,-0.755718,-3.46001 10157.5,10128.8,9225.31,0.248702,0.312336,2.57768,-4.36878,-7.1619,-0.049009,-3.2758,2.7151,1.99544,11.1247,7.80862,3.2311,1.05086,1.13953,0.117826,1.5885,2.6575,-2.74279,-2.82058,-0.206648,1.25493,1.71967,2.81266,-4.13773,-2.45207,2.50385,0.789243,-0.268176 10170.7,10133.1,9236.11,-2.23675,-0.885477,2.34602,-6.30375,3.19378,12.3402,5.26964,2.51006,1.86666,4.33237,6.63528,4.85198,3.48519,8.46812,-2.52066,-0.634166,3.57125,-6.40349,1.46869,0.818123,-1.68738,1.2743,1.91738,-0.951766,-0.403311,4.63843,3.18061,7.04436 10176.7,10136.2,9243.78,0.782244,0.338989,-0.179665,0.677035,-11.8864,-9.98092,-16.6014,-0.0876104,-1.39338,0.511794,2.05749,5.37285,2.64871,7.7119,4.8232,-1.23349,2.56586,8.98335,0.643413,1.73431,-0.63479,2.49537,-0.600719,2.26345,1.69812,6.71431,2.31721,8.10433 10176.8,10136.6,9245.84,-3.20567,1.13405,3.92668,-1.78597,-0.236073,-2.19382,-11.4115,3.08973,1.33702,-3.27145,0.727769,-0.100717,5.38921,8.19297,0.492232,-2.20151,5.25989,3.6589,4.08819,2.21554,-1.32513,3.54291,0.119275,3.23854,3.862,2.19948,5.28701,6.25834 10178.4,10137.4,9245.74,-5.53585,0.420645,5.85295,-4.47724,14.54,12.4497,8.36972,4.99424,2.57479,-4.3639,0.677018,-2.6813,6.67898,7.5884,-5.54187,-1.3688,4.05586,-6.15054,4.2909,-0.899213,-1.24567,1.90686,-0.469126,1.72139,5.00978,-1.65339,6.96518,3.71489 10184.8,10141.1,9247.89,-4.95644,-1.91401,3.7243,-7.95873,7.49028,6.40526,5.31843,3.53676,4.4376,-3.95261,0.746514,-2.92295,5.17495,5.09822,-5.56387,2.13589,1.74219,-7.51099,1.13636,-2.24892,-0.712168,1.40767,0.401594,-0.663717,6.22808,-1.51586,5.59537,1.86444 10195.1,10147.9,9253.27,-3.98,-3.06823,-2.05534,-6.10099,3.83685,4.55708,3.92119,0.928846,2.49159,0.0763172,1.14792,-2.88509,3.3624,3.14131,-4.76678,1.53759,-2.49281,-5.00974,0.3227,-1.57677,-2.36177,0.558465,1.76223,-0.153596,3.21585,-0.248642,3.44061,1.09292 10206.6,10155.3,9259.98,-4.64998,-1.64546,-4.6585,-6.92405,-1.23826,-1.4651,-7.80907,2.03872,0.322905,5.35637,2.9557,-1.90346,0.941137,2.90995,-2.25745,1.6362,-2.73525,-3.06893,0.361893,-0.410406,-1.95298,3.18373,4.96997,3.18307,2.09522,2.29277,1.29516,1.46329 10215.1,10159.8,9265.65,-5.64262,-2.22323,-2.32616,-8.62966,1.24852,3.53986,-7.11813,2.5704,-0.221435,0.41167,0.765415,-1.44792,2.10023,1.14341,-1.90736,0.761342,-0.0657556,-6.90094,4.60419,2.00852,-1.1143,4.44335,7.23913,4.6059,2.18355,1.92624,1.0442,1.06642 10218.9,10161,9269.98,-5.54728,-2.69742,0.623383,-4.54971,5.62832,12.115,1.60837,0.527375,0.225195,-4.35554,-1.09064,-1.69716,2.68584,-2.42078,-3.28377,-0.48855,1.46337,-7.59929,7.41232,3.78152,-1.52786,1.12019,5.14455,0.902689,0.791392,0.171231,1.01653,-2.1951 10225.1,10161.4,9274.87,-4.18459,-1.40959,4.0543,-3.78563,4.56469,13.1486,7.4468,1.32559,4.01602,-4.26528,2.47676,-0.706977,1.49841,-2.44619,-4.48237,0.314642,3.21848,-7.78537,6.45365,2.67192,-0.518631,-0.579868,3.1551,-3.30298,0.42352,0.385421,1.09082,-3.38628 10238.6,10163.7,9281.72,0.163978,0.29531,1.39945,-1.88245,0.770367,3.01996,6.47156,0.843119,3.05229,-2.89342,3.69162,1.01002,0.156961,-1.63668,-1.88068,0.459627,0.572044,-3.8789,6.07964,1.73877,1.04155,-0.952277,-0.352698,-3.89818,-1.13337,1.63306,0.655322,-3.05775 10252.3,10168.8,9289.58,1.69242,0.803041,0.969081,-1.57571,10.1963,10.1486,9.01137,-0.23779,2.45598,-11.8335,0.764195,0.347471,0.63322,0.818036,-2.67947,-0.48707,-0.0121974,-5.92175,4.75178,1.31186,-0.59319,-0.865273,-2.13114,-0.629395,-0.22624,0.187864,0.687159,-1.38416 10258.4,10175.1,9296.44,0.693656,-1.47018,1.57507,-4.07861,13.9151,7.913,3.87705,-2.41045,1.40643,-18.8401,-3.38044,-3.78137,0.444306,-0.142111,-3.19856,-0.633983,1.26609,-6.96487,4.03731,1.86282,-0.255938,0.885239,0.576534,4.16798,1.48633,-2.91027,0.44246,-1.26861 10259.2,10179.7,9301.13,-1.11281,-2.9356,3.48279,-4.07376,14.5961,4.75668,2.95063,-2.50321,1.99968,-15.2573,-3.94817,-6.19421,0.994523,-0.409685,-3.36826,-1.30752,2.89435,-7.11783,2.3961,1.75016,-0.287404,0.839505,2.32354,3.16514,0.431073,-4.23834,0.224613,-1.13459 10258.9,10180.8,9303.2,-3.70956,-2.93593,3.76222,-6.98265,14.1006,4.36509,3.13521,0.524873,3.4745,-8.19672,-0.812591,-7.54285,2.87285,0.165482,-4.34303,-3.00502,3.10194,-11.8146,3.48326,1.87454,-2.39007,-1.71717,-0.0308325,-3.00344,-3.10099,-5.07511,0.999296,-0.291248 10259.7,10178.9,9302.61,-2.50722,-0.863499,1.6361,-7.29671,5.65875,7.35687,6.74534,2.86707,2.5541,-4.10002,1.92641,-4.21325,3.79643,1.11564,-2.85299,-3.384,0.718232,-13.5344,2.15514,-0.378278,-3.09826,-4.48668,-4.09564,-6.07121,-4.62941,-4.63714,1.35609,1.33932 10264.3,10176.2,9300.58,-1.50986,-0.476834,0.153861,-9.03392,2.34462,9.76008,11.2624,0.958254,-0.70443,-6.3101,0.886002,-3.04957,4.20237,0.687347,-2.59931,-4.30057,-0.344332,-15.3463,3.30618,0.212706,-1.83037,-5.39362,-6.37009,-5.79293,-5.6463,-5.17005,1.45394,1.2199 10270.2,10175.5,9299.06,-1.8193,-1.62584,1.49621,-15.2891,-0.19176,0.694336,7.97111,-0.906134,-1.88497,-6.47048,-0.900237,-3.70282,1.23614,0.322582,-3.93212,-3.45866,1.71962,-16.8955,0.58688,-0.409914,-0.259588,-2.68512,-3.64588,-3.35838,-4.51583,-4.19392,0.240148,0.159851 10270.2,10179.6,9298.63,-1.90388,-3.42457,3.36972,-15.5947,6.83754,-2.72512,7.96959,-1.26132,-2.35887,-7.13988,-3.00989,-4.84946,-1.32472,-2.90407,-7.21556,-3.99747,1.63284,-18.121,1.49353,-0.486008,-0.289734,-2.44221,-2.61409,-4.74746,-6.81336,-4.22186,-0.397997,-3.01155 10263.1,10186.3,9296.94,0.1046,-2.95923,0.55802,-3.53552,11.956,6.06043,20.0157,-0.175478,-1.81809,-1.77528,-2.10279,-0.283075,-3.48288,-4.09089,-6.41457,-3.4926,-1.98205,-11.2644,1.51324,-2.56718,2.01317,-3.17178,-3.03644,-4.28621,-6.82533,-2.57386,-0.732198,-4.52782 10250.3,10186.7,9289.82,0.787893,-2.63004,-4.83671,4.59987,9.90165,5.11396,20.1712,-1.49013,-0.900383,3.2704,-1.38302,1.01612,-3.51797,-3.65748,-2.01906,-2.31487,-4.58178,-0.663723,4.99631,0.0846666,6.20019,-1.32911,-0.366123,-0.708005,-3.05462,-1.4169,-1.33549,-4.03837 10229.6,10174.2,9276.51,2.92922,1.43172,-8.45959,7.92191,9.82817,0.906035,15.1761,-5.66535,-4.80598,8.92318,-1.50732,0.863702,-4.19618,-1.72605,1.43049,-1.60336,-7.78679,7.9456,2.20311,0.976306,4.6808,-2.0774,-1.41618,1.52784,-1.00485,0.251303,-2.51818,-3.24837 10203.9,10154.8,9263.01,1.97737,4.88419,1.86761,-1.89071,16.8831,21.8027,18.6752,-2.85592,-0.407409,1.1857,1.57668,2.90834,1.42619,5.01683,-2.88862,1.13125,-1.02838,-3.77013,-1.83294,-0.874118,-1.82318,-1.06152,0.617181,1.34269,3.38069,1.15764,1.12216,1.38647 10184.5,10141.2,9256.68,5.24597,7.64832,2.18557,1.58328,4.92602,9.28816,-0.0172234,-2.70209,-2.36954,2.63625,2.45988,6.65341,1.30855,2.45772,0.884071,4.15289,-0.306199,0.501745,-3.91598,-0.843063,-3.78083,-0.751671,-0.908618,-0.353576,1.46737,4.59599,1.10914,-1.05414 10178.9,10140.4,9258.57,8.5511,8.38576,-0.704081,10.0442,3.87995,9.53107,4.06474,-2.33977,-3.33414,3.45052,0.769206,8.44243,0.151836,-0.110094,2.50423,3.89258,-1.86971,4.86933,-2.34618,0.208276,-3.54318,-0.382483,-0.444637,3.17545,1.86638,6.31308,-0.0788599,-2.11239 10182.7,10148,9263.52,7.664,6.75263,-0.540997,5.42972,-5.04193,-7.98425,-8.29464,-0.166299,-0.588527,3.31557,0.500806,4.72146,-2.51571,-1.43305,5.52369,5.671,1.03703,8.03067,0.0463032,4.16527,0.993743,2.27,2.01907,5.48701,6.28587,6.50446,-0.915646,-0.555951 10185.6,10156.6,9266.64,4.26252,2.60407,3.65205,1.35764,1.93964,-1.71464,3.62386,0.664968,2.07164,-1.84774,-1.41728,2.03742,-1.93901,-0.955849,2.55509,2.24827,3.4143,2.08534,1.52467,4.36357,2.40504,-0.149419,1.87333,2.56701,3.76988,3.58853,-0.290298,1.53656 10182.8,10164.1,9266.99,3.44774,1.00051,3.58435,5.06036,-3.20427,-1.32409,2.16178,-1.24869,0.986594,2.68824,-3.10496,3.75494,-3.03899,-1.36189,2.85639,-0.797041,2.25309,6.84226,-1.01807,1.45026,1.64915,-1.77668,1.47461,1.32051,0.0174875,3.15498,-1.91103,0.915561 10177.6,10169.5,9265.47,2.97062,0.742454,2.19308,3.39405,-10.2555,-6.11354,-8.35604,-2.29312,-0.492631,4.2024,-2.46282,2.85236,-2.05854,-1.07623,3.34902,-1.67951,1.43015,9.72371,1.0556,1.2093,0.0329592,0.933345,2.62882,4.14907,1.43657,2.25242,-2.21302,0.424466 10175.1,10171.1,9262.53,2.78573,0.66686,2.0545,2.76769,-2.38316,1.38611,1.33538,-1.98843,-1.22362,0.719734,-1.48276,0.571928,-0.303568,1.13172,0.533248,-2.57485,0.218063,4.75694,4.12677,1.25451,-2.29974,1.77459,2.18864,5.66448,2.31972,-0.197648,-0.423422,1.24127 10176.1,10170.7,9258.49,5.31438,0.737423,2.23937,7.15555,-6.03862,-6.93885,2.59027,-2.08985,-1.82474,1.76361,-1.51506,2.40133,-2.94977,1.13326,2.34185,-1.4691,-0.319475,6.55378,0.151184,-0.820336,-1.03183,0.737373,1.0173,1.60097,0.120988,0.706961,-1.06361,1.61191 10177.1,10171.1,9253.43,5.27989,0.124242,0.594136,6.40228,-14.4792,-17.9873,-7.83873,-2.70593,-2.84279,6.19952,-1.02819,4.22035,-3.89328,-0.655654,4.6427,-0.543649,-0.312946,7.67303,-3.34568,-2.99026,0.892734,0.193866,0.437901,-1.37172,-2.06494,3.10779,-2.09072,0.969194 10175,10171.9,9247.28,2.27598,-1.11333,-0.371999,2.70022,-5.44405,-1.24932,2.95574,-2.54561,-3.07604,2.81372,-0.48024,4.11824,2.04907,-0.370621,1.24343,-2.71039,-1.27809,-0.906837,-1.29061,-4.80376,-0.177684,-0.68347,-0.0356975,0.976652,-2.58184,2.60538,-0.53245,1.0079 10170.6,10171.1,9240.98,0.484599,0.0646839,-1.51326,2.89899,-3.4319,-0.213982,2.47953,-0.834731,-2.00581,5.72898,0.227883,2.67222,2.27602,0.0505934,1.31844,-2.26552,-2.6972,-0.975391,-0.869576,-3.70984,-1.26158,-0.292123,-0.590846,2.58737,-1.84822,1.62378,-0.526111,-0.491878 10166.9,10167.6,9236.09,0.964725,-0.0392702,-0.079079,4.19696,-8.77705,-7.3393,-5.33084,1.7816,1.00552,6.00308,-0.645333,1.80016,-0.345783,0.537513,3.29513,-0.258503,-1.94323,3.02276,-2.07851,-0.708951,-0.985472,0.42465,-0.0047685,-0.0149723,-1.37113,0.550535,-0.779034,-0.484969 10166.1,10161.5,9233.6,-0.598547,-1.76595,-1.06041,-0.952044,-3.22733,-6.25839,-1.71002,3.5389,3.14678,2.52469,-0.94774,-0.697306,-1.82073,1.8162,-0.398189,-0.0962201,-1.17773,-3.11075,-1.86249,-0.148137,-0.912351,0.0729367,0.372787,-1.52491,-1.99794,-1.67208,0.753712,1.02245 10167.9,10154.5,9233.85,1.32924,-0.579085,-4.09528,3.27081,-6.78357,-9.38603,-3.06915,1.95927,0.70163,2.46784,-0.635142,0.854662,-1.03664,2.44479,0.381434,0.976493,-2.1874,1.35415,-3.25712,-1.85514,0.202589,0.286026,0.720155,0.627719,-0.687001,-0.872865,1.21871,2.25385 10170.4,10147.3,9236.23,1.55419,0.655793,-3.90119,3.65032,-6.92144,-3.81534,-0.829364,1.59907,-0.150104,0.588015,0.212751,1.04803,3.09472,3.79829,-0.218751,1.11779,-1.55055,0.933332,-1.25266,-2.59487,0.647035,1.39731,2.58953,2.8589,1.80309,-1.43261,2.52993,2.79953 10171.9,10139.7,9239.22,2.16966,0.513128,-2.93705,2.73804,-10.8601,-4.50483,3.76187,1.03924,-0.676839,-1.4866,-1.19577,1.6866,5.98311,3.12642,0.0885709,0.9896,-0.594518,0.533618,0.379411,-3.82145,2.32664,2.22298,3.60721,3.05218,2.2889,-1.98702,2.79897,1.35025 10172.4,10133.5,9242.05,0.627291,0.905709,1.39363,2.99372,-15.425,-9.09382,2.11414,1.04226,2.10526,-4.39506,-2.77953,2.15891,6.66724,1.70369,-0.372333,1.40462,2.59187,2.26874,-0.378224,-3.69675,3.0335,2.25396,3.10192,0.0429504,0.10951,-0.799702,2.66794,-0.282681 10173.8,10130.2,9245.36,-1.33644,1.42161,3.11004,3.93858,-17.0646,-12.116,1.67239,1.94826,5.54306,-3.85205,-1.5475,2.52019,4.33814,1.15019,-0.541069,1.99129,3.05378,4.25369,-2.76731,-2.80645,1.85733,0.988299,2.88783,-1.97077,-2.83768,1.85125,2.84766,0.389147 10176.4,10130.9,9250,-3.53503,0.391503,-0.270572,1.95882,-15.1875,-18.5758,-1.42497,2.28845,5.40786,-2.12974,1.20821,0.911564,0.2788,0.0689856,-0.00271805,2.01928,-0.20812,3.23848,-1.98612,0.0245125,0.488358,-1.18054,1.47019,-3.47437,-4.6287,2.11498,2.20934,0.993318 10178.8,10135.9,9255.56,-3.20255,-0.268054,-3.48033,2.47099,-11.3536,-16.9308,2.01776,1.40976,1.56328,0.853625,1.89586,1.47109,-1.50849,0.167668,0.627511,1.41809,-4.21425,2.05546,-2.39209,-0.416193,0.276633,-1.50971,-0.820011,-1.25927,-1.76,0.153711,0.431209,1.48315 10181.2,10144.1,9260.31,-2.49125,-0.613263,-3.86482,0.287362,-9.17309,-14.1157,3.48478,0.196793,-1.25386,2.83848,0.198147,-0.0165582,0.471677,-0.139327,-0.216901,-0.966032,-5.2193,-1.40546,-0.977273,-1.2574,1.78779,0.134179,-1.72164,0.653388,0.313432,-3.37716,-0.587605,0.861387 10186.6,10151.1,9263.12,-0.0358474,0.714951,-5.47328,-0.875177,-17.5089,-13.8361,0.471247,0.643912,-2.41975,9.9458,0.993041,0.803296,-0.226386,0.0668295,2.19176,-1.16819,-4.40868,0.69383,-3.38706,-3.58218,3.07732,2.10253,1.79789,2.06744,1.83904,-2.15516,-1.67344,0.661882 10193.4,10152.2,9264.85,-2.78688,1.85556,-1.96216,-7.27433,-5.61022,0.625161,3.91544,2.78407,0.13042,8.01854,3.573,-2.43853,-1.07905,0.148792,-1.48277,-2.3792,0.378784,-7.05144,-1.06108,-1.76148,0.135824,1.71393,3.80312,-1.43656,0.702495,-1.95731,-0.703674,-0.33177 10196.9,10148.7,9267.46,1.41437,4.41491,0.0330121,-0.96198,-19.7539,-11.561,-5.49424,1.03618,-0.588315,13.1158,4.11913,1.82776,-4.02743,-1.24038,4.49417,2.16391,1.61464,5.33203,-6.2827,-3.22771,2.42673,4.53812,5.27571,1.95384,4.83592,2.15944,-2.23414,-0.0179182 10195.1,10146.6,9271.67,-0.599083,4.08109,5.56207,-0.651956,-1.899,4.41751,8.64946,-0.00765143,1.65381,7.40697,3.13743,0.528221,-1.17274,-0.333192,-1.34405,0.810869,3.04978,-1.96585,-3.00608,-1.02587,-0.427114,2.63482,2.33223,1.44749,2.70602,-0.508442,-0.782524,0.838544 10190.6,10149.1,9275.95,0.560997,3.32623,0.00253245,1.6273,-9.62681,-9.32197,-7.13248,-1.74244,-2.26773,10.279,2.01853,1.79006,-2.32577,-1.861,2.70102,2.63733,-0.668516,4.89049,-2.56801,1.67809,-0.682542,1.07859,-0.730879,1.04436,0.219305,1.04839,-1.30085,-0.204558 10188,10153.1,9277.72,-1.05102,1.4439,-1.2902,0.37219,3.61058,7.8905,-0.13638,-0.797121,-3.203,3.7144,-0.467361,1.43319,1.01941,-0.964803,1.27849,1.32106,-0.71757,-0.281666,1.82319,4.43107,-2.93419,-0.102775,-2.79816,1.60946,-0.350934,0.837113,0.975085,-0.206216 10189.3,10155.8,9275.17,1.71247,1.79065,-0.806826,4.2591,-1.07113,5.08033,-3.80833,-1.05846,-3.93516,4.86697,-2.48519,4.41458,1.0147,-2.04319,5.76698,3.04901,0.621182,6.18537,-0.471514,3.74338,0.0954557,1.78055,-2.23478,4.29533,3.28968,4.08665,-0.45381,-1.12752 10190.8,10155.9,9267.91,0.0885688,1.62773,3.97676,0.475719,6.50171,12.0036,4.17355,0.0800788,0.877184,4.13283,-1.66529,2.3731,1.22312,-1.52431,1.32333,1.30085,4.02821,0.00402446,-0.278254,3.83144,-0.00616006,1.70507,0.14686,2.05675,3.75234,3.42709,-1.13997,-2.28219 10186.5,10152.6,9257.34,-0.152071,1.1051,2.98089,-3.26014,-3.23874,0.545145,-3.74253,0.650653,4.32612,4.55661,-0.349067,0.443991,-1.54712,-2.37082,1.08068,1.11666,3.19332,0.114235,-4.77887,1.03262,0.526047,1.57427,1.96416,-1.21359,2.2522,2.81775,-2.19914,-3.20958 10175.9,10146,9246.33,-2.37365,-0.801223,1.8448,-4.49245,2.73452,3.45587,0.665856,0.804743,7.15539,-1.25789,-1.25952,-2.70716,-1.07845,-2.04441,-1.93328,-1.35806,1.5978,-5.1161,-5.79834,-0.925826,-2.80177,-1.15512,-1.39234,-4.88988,-2.71874,-0.727928,-1.17586,-2.55528 10163.6,10137.3,9237.87,-0.803469,-2.78044,-0.895544,-1.96323,-0.541223,-3.95959,-1.23923,0.0489646,5.82687,-0.842944,-2.20839,-1.37161,-0.868195,-0.366623,-0.326653,-0.542204,-0.442138,-3.06811,-5.05951,-1.77693,-2.56412,-2.0747,-5.18551,-5.90628,-3.59607,-1.51359,-1.0358,-0.0442413 10154.4,10129.1,9233.99,1.23915,-3.76005,-2.64612,0.723829,-3.148,-4.96491,0.57486,-0.202117,2.21428,-0.386009,-2.61213,0.591537,-0.420445,2.51457,0.848114,0.0155665,-2.8099,-0.688955,-1.65728,-1.68576,-0.314736,-2.37588,-7.30164,-5.93878,-1.09582,-1.08092,-1.23666,3.04974 10147.7,10124.3,9234.84,0.130569,-3.33534,-5.30783,0.228073,-1.79103,-2.90284,1.72325,0.336059,-1.67646,0.805152,-2.51359,-1.68843,-1.08056,2.79024,0.667811,-0.918425,-5.25023,-0.613583,-1.21144,-3.86108,1.12026,-2.87087,-6.96217,-3.74878,-0.871173,-1.99148,-1.4983,3.13726 10141.9,10125,9238.34,-2.3342,-3.74514,-6.28736,0.247636,2.71253,3.12847,7.57994,-0.0401623,-2.07147,0.481455,-3.97685,-4.46362,-0.415913,1.42821,-0.575486,-2.68041,-4.57327,-2.24353,-2.60028,-5.84863,0.625916,-3.42977,-3.6369,-0.844099,-3.5874,-4.64335,-0.985747,1.2717 10139.9,10130.2,9242.19,-1.31024,-4.72475,-7.14762,0.73153,1.45053,-5.53508,5.90136,-2.31863,0.194991,0.488804,-6.97821,-4.41928,-2.29074,-1.35009,0.919216,-2.89533,-3.25509,-0.799203,-1.99553,-4.14064,2.04707,-1.98553,-0.137078,-0.0166083,-4.9352,-5.40326,-1.67739,-1.42035 10146.2,10135.6,9246.04,1.48702,-3.36982,-6.22071,1.74719,2.56435,-13.0074,1.99705,-3.21561,2.91416,0.844878,-6.7988,-2.16439,-5.4962,-1.85975,2.13575,-1.59383,-2.91884,1.52462,-1.3314,-1.85117,3.6544,-0.430522,0.692754,-0.840642,-3.31251,-2.33908,-3.05762,-2.1983 10158.1,10136.1,9250.8,0.841737,-2.49661,-1.39476,-1.47649,15.6927,0.965199,10.869,-0.546861,4.02682,-3.15137,-2.65822,-1.05518,-4.77058,0.229656,-2.58261,-1.60934,-0.689737,-5.44364,-0.234473,-1.95479,2.60062,-0.769404,0.484685,-2.21476,-2.21659,-0.527818,-2.3356,-0.631119 10167.2,10131.4,9256.17,1.43756,-1.64599,0.0828565,1.10643,1.09851,-8.71597,-1.14743,1.16785,1.24835,1.69522,0.678389,1.91657,-5.73395,-1.26925,0.618759,0.671225,0.99422,2.5392,-3.14056,-3.00047,3.39733,-0.267724,0.865602,-1.72338,-1.28093,1.59131,-3.58079,-1.60917 10168.5,10125.9,9259.95,0.111755,-1.49369,1.18289,-0.284048,-1.52165,-7.82514,1.91577,2.83987,1.30957,4.34859,2.31828,0.547347,-5.35341,-2.95714,0.120479,-0.07344,1.25038,0.863374,-1.97606,-2.63292,2.99367,-1.51317,-0.192761,-1.94301,-2.34527,-0.816782,-4.15688,-3.69083 10164.7,10123.5,9260.03,2.54631,0.123647,1.85441,0.291179,-2.26534,-5.622,0.403256,2.75151,1.92159,5.45502,4.02912,0.277333,-3.49437,-2.59529,1.68451,1.03176,0.611114,1.05444,-1.37086,-0.762577,2.09659,-3.15435,-1.66892,-4.18628,-2.03484,-0.59484,-4.5361,-4.06338 10160.7,10123.9,9256.02,4.16394,1.15842,1.00215,-1.41089,3.00077,3.69915,2.12147,1.50602,1.11373,3.7783,5.12886,1.27055,-1.0735,0.163066,0.715848,1.75274,0.248762,-1.87449,-2.70607,-0.0821427,-0.982237,-3.91753,-0.603176,-5.15131,-1.55797,1.9122,-2.63806,-2.45448 10157.6,10124.8,9249.1,1.13904,0.752742,1.28292,-3.44794,5.87463,13.5955,-3.90547,0.053564,0.392376,-2.17549,4.02652,0.800942,2.14933,0.991305,-1.00534,1.93346,1.74799,-4.3887,-2.62983,2.12002,-3.97726,-2.37985,1.92724,-3.91126,-1.80145,3.29901,0.515867,-2.07875 10155.9,10125.9,9241.01,-1.21278,1.24353,0.0902419,-1.38693,3.90257,17.0687,-1.7671,-0.621263,-0.743581,-3.56603,3.19768,0.515647,2.83626,-0.394058,-0.965446,2.53295,1.02968,-3.73706,-0.646373,4.19926,-3.90665,0.100245,2.07717,0.65145,-0.4389,3.45695,1.30478,-2.26372 10156.9,10129,9233.19,-0.519545,3.45514,-0.128203,0.470911,-4.34917,11.6069,-5.37302,-0.249794,0.0908138,-1.64961,3.7305,0.887725,1.28233,-0.50548,0.651175,4.68216,0.481759,0.131141,2.83721,7.4517,-1.51906,2.02591,0.478488,2.8447,3.96564,4.21205,0.0189546,-1.26083 10160.2,10134.9,9226.61,0.334619,3.63902,-1.33005,0.500933,-0.0390483,15.3466,3.49804,-1.22599,-0.443012,-1.29729,1.85728,0.83413,0.663791,1.08815,-1.61332,2.35978,-1.91003,-1.54128,7.06018,8.52392,-0.0931056,-0.631766,-1.8937,1.21041,3.92464,3.0125,0.582016,-0.0552563 10165.1,10142,9222.12,-0.0501124,2.72845,-2.35233,0.461804,-3.24106,3.89637,-4.4752,-1.7395,-0.658087,1.46568,0.74815,1.9358,-1.37579,1.26993,0.248403,2.1501,-1.97865,2.84403,4.93078,6.34449,2.55208,-1.66616,-1.28941,-0.85475,2.44335,3.28626,0.575625,0.0867697 10169,10147.2,9219.92,-2.57524,1.55278,1.64717,-0.408592,2.78686,3.93608,-3.35557,-1.05071,0.358949,-1.71793,1.23509,0.730307,-0.807758,0.469476,-0.799756,2.26666,1.42763,2.57756,3.31921,4.24278,2.32673,-1.92157,-0.625841,-1.7385,0.55312,2.469,0.416022,0.102824 10167.7,10149.8,9219.39,-2.61236,0.265041,4.14099,-1.10443,5.68968,5.75872,0.437178,-1.27371,-1.44794,-5.50529,0.962099,-1.7594,-0.014506,-1.47838,-2.10998,2.88166,2.32266,2.31558,3.04189,2.76494,1.13588,-2.76241,-2.5749,-1.37983,-0.132212,1.62609,0.00182996,-0.567092 10161.2,10151.5,9219.88,-1.00231,0.225002,2.94421,2.03312,-0.355979,4.16591,-0.636307,-0.980578,-3.17075,-4.4683,-0.0413473,-0.96548,-0.194949,-0.798368,-1.08568,3.94015,1.20872,6.21739,0.493017,0.663456,-1.20346,-2.76074,-4.99576,-0.484664,1.27829,1.87168,-0.0347963,-0.649195 10155.5,10153.9,9220.83,-0.939771,0.647249,0.0634509,3.2582,-1.62031,4.0693,-0.997477,-0.169163,-4.01209,-4.20755,-1.14083,-0.040949,0.676499,1.0769,-0.637069,2.85891,0.53402,4.18699,0.666861,0.369829,-2.63692,-0.336214,-3.73798,1.47577,2.81105,-0.292838,0.0270106,-0.151526 10154.1,10157.5,9221.67,-1.65802,1.59847,-3.57612,1.52401,6.37221,4.48866,-1.46299,-0.915699,-6.98915,-0.340048,-0.952717,-2.18866,-0.811792,-0.642645,-0.622625,-0.300884,-1.00057,-1.15759,2.44751,2.6773,-1.823,1.29837,-1.91591,2.49204,1.93197,-3.59974,-1.91245,-2.4109 10154.4,10160.7,9221.98,-0.583463,-0.108757,-4.6507,-0.0693877,5.35637,4.425,-6.56889,-1.82597,-8.57191,2.85503,-1.05825,-2.33955,-3.22781,-4.76081,2.05753,-0.861931,-1.83229,-0.124382,0.503483,2.18131,1.30665,2.42826,0.824233,3.84653,2.09007,-3.3925,-4.31649,-3.96112 10153.4,10159.2,9221.68,-2.76485,-4.09131,-2.87698,-1.10712,12.5336,12.9839,-4.34652,-1.87041,-6.50663,-1.43881,-2.78497,-4.09349,-3.27711,-7.58611,-0.918956,-2.43732,-1.68029,-2.93885,1.37614,1.00354,-0.202025,0.252735,-1.35224,2.14941,-1.22668,-3.85694,-3.91196,-5.39514 10153.1,10150.6,9221.82,-3.95579,-6.11602,-1.95691,-0.571033,7.36799,2.23424,-8.23593,-1.15065,-2.89936,-3.34966,-3.42278,-4.92737,-4.22729,-7.57776,-1.53936,-2.4826,-0.485854,-2.05301,1.35048,0.235875,-0.851581,0.299046,-3.65228,0.452501,-2.53126,-4.14097,-3.0318,-6.032 10156.5,10138.1,9224.22,-1.72219,-4.81284,-2.04034,3.64429,-3.40667,-8.21149,-2.06758,-0.247629,0.240041,0.844032,-2.55693,-2.29071,-5.62686,-4.10255,0.955484,-2.58578,-0.573095,1.96046,-2.89531,-2.47853,1.00662,1.59082,-2.31097,1.60096,-0.355857,-3.59741,-2.54995,-3.16362 10162.5,10126.5,9229.66,-1.48624,-2.31864,-1.19917,5.07688,-2.15075,-4.48733,6.81643,1.19375,3.4529,3.66948,-1.49639,-1.71619,-5.51437,-1.29231,-0.407537,-4.604,-2.54282,0.0824236,-5.27449,-4.81883,0.767691,-1.39492,-2.55861,-0.325428,-1.75464,-3.59903,-1.89829,-0.732932 10167.7,10118.7,9237.56,-1.06333,-0.880843,-0.709075,2.8371,-10.0447,-10.4348,-2.5904,3.18465,5.97115,6.33779,-0.55058,-1.01646,-4.14332,-1.6247,-0.0193591,-4.01402,-3.73144,0.38443,-5.50468,-6.41294,-0.295721,-3.62009,-2.70822,-3.1355,-4.45086,-2.10376,-1.79258,-1.22716 10172.5,10116.9,9247.18,1.551,0.130326,-0.490568,5.87654,-14.5436,-8.35183,-0.790109,3.39107,4.7174,8.28156,-0.0057788,2.6686,-1.84943,-1.48071,1.03911,-4.0934,-3.48936,2.7605,-6.22541,-8.72046,-2.487,-3.9855,-3.15508,-4.85806,-6.30628,-0.1826,-2.22861,-1.91313 10179.7,10122.6,9257.78,1.5355,1.00586,-2.46594,5.55739,-10.6179,-9.89219,1.01847,2.02002,1.55047,10.3651,1.59035,2.3257,-3.02423,-0.681756,0.379055,-4.13859,-2.86252,2.65539,-7.09955,-8.4785,-1.80811,-2.44766,-3.84586,-6.08215,-4.18234,0.309597,-3.66089,-1.78168 10188.9,10134.4,9267.84,0.423127,-1.44673,-6.16369,2.54558,-3.2605,-10.2788,1.93481,-0.460125,-1.55478,7.53447,1.04311,-2.037,-5.33297,-0.715827,-0.912315,-4.00679,-5.27357,1.32517,-7.02947,-5.6844,2.49,-1.1701,-4.14164,-4.46692,0.160721,-1.23591,-5.46575,-0.678645 10196.3,10145.5,9275.21,0.204833,-4.851,-9.24744,3.38063,-3.90706,-1.89916,-0.318999,-3.05687,-4.83175,3.88926,-1.68472,-4.52857,-6.76493,0.053409,0.356074,-2.44354,-9.25902,3.95243,-8.99635,-3.68403,4.07743,-1.41439,-4.06526,0.784286,2.50666,-1.59161,-6.31937,0.0761621 10200.4,10148.5,9278.92,-3.06966,-5.752,-6.27773,-0.452092,4.18213,13.2473,-12.0757,-4.47092,-6.49884,-5.96616,-4.08975,-9.08064,-3.65565,-1.03612,-1.9757,-2.79369,-8.22081,-3.13926,-2.68074,1.98539,-1.47914,-4.27865,-6.82097,-0.0420558,-2.72616,-3.80964,-3.69263,-2.81706 10202.3,10144.3,9279.66,1.7621,-1.2767,-1.87182,1.61337,-6.80859,14.4514,-16.815,-2.07514,-4.63562,0.0307544,-1.49074,-2.29138,-1.18636,-1.08621,1.86862,0.689509,-4.2555,-0.913166,-4.04706,-1.13903,-2.95495,-1.4359,-3.45987,4.36607,0.619825,-1.53464,-2.06409,-2.58631 10201.6,10141.5,9277.89,2.73427,2.11183,3.79277,1.71546,-5.8859,13.3557,-11.3022,2.79327,2.37116,13.2011,3.98285,0.966107,0.039656,-0.715821,2.85166,2.34242,2.77476,-0.0888099,-4.98538,-3.4432,-1.83877,3.57211,2.68075,7.05565,6.45616,-1.54302,-1.24469,-1.49869 10196,10143.8,9273.55,-2.52737,0.202188,7.08167,-4.89952,6.71679,10.6699,0.756855,5.54471,7.25909,13.9583,6.39787,-2.37566,0.745793,-1.45474,-1.09404,0.910205,7.21143,-6.92492,-3.24203,-2.89701,-0.543452,6.07649,7.33376,6.57894,6.15484,-4.40884,0.0587056,-1.11052 10186.2,10147.8,9267.63,-4.31786,0.145523,8.74123,-1.12372,3.61382,5.90919,-2.20636,4.87121,7.93339,10.8223,5.77747,-1.02016,1.70524,-1.23974,-1.99873,1.22043,7.18349,-2.02393,-4.52471,-1.19367,-1.87015,5.60664,6.92162,5.30532,3.03549,-3.16865,1.33872,-1.3693 10178.3,10151.3,9262.07,-1.01371,-0.36759,7.07326,3.03463,-3.67644,6.41668,1.01659,3.32806,5.69645,6.11989,4.17302,3.13986,4.40199,0.31144,-2.58094,-0.0539033,4.16067,1.49299,-3.2753,-1.39228,-2.172,3.33149,4.19598,3.46064,0.616277,-0.818505,3.98959,0.698301 10177.2,10154.3,9257.94,2.09186,0.0766925,2.17884,5.08344,-13.9717,-0.882929,-3.84368,2.86526,4.57806,7.77504,4.75117,6.29349,4.58116,4.04706,1.06485,0.914494,1.84175,7.12093,-3.92066,-3.04038,-1.76589,1.29071,2.74094,1.46176,1.98937,3.12251,5.09485,3.84087 10179.4,10155.4,9254.74,0.187596,-0.882072,-0.665652,4.15319,-3.56212,6.25634,3.46947,2.99756,3.30879,0.859046,5.1349,3.91232,5.90056,6.60019,0.839946,-0.162343,-0.484405,2.65509,-1.8674,-3.50916,-5.10299,-1.60522,1.28388,-0.0295086,1.05,2.81748,5.21994,5.53563 10178.8,10153.1,9251.26,-1.91139,-0.154839,-0.832651,7.32065,-8.14661,3.20829,-4.61065,3.9011,1.20806,1.29028,6.11631,4.24084,4.66918,7.38927,3.1094,1.72009,-0.436683,6.06925,-3.83738,-3.64103,-8.35166,-0.222316,1.74303,3.43329,2.82215,3.91599,3.2218,6.05878 10175,10149.2,9246.46,-3.00223,-0.829219,2.18951,8.12634,-8.29635,3.98254,-2.55022,3.58933,0.0476173,2.00734,2.85452,5.13863,4.39434,5.86178,1.57419,0.321093,2.11151,4.62819,-0.677836,-1.98205,-7.44972,1.36379,2.52895,5.12261,2.10196,3.15929,2.77152,6.16477 10170.8,10147.7,9240.32,-2.09934,-1.33891,3.77143,6.49402,-6.43302,-0.0826344,0.87837,1.12061,0.421557,1.06025,-1.52903,5.64507,3.68263,3.49536,1.25096,-1.4957,2.92854,4.60413,2.40658,-0.645265,-3.32217,0.987715,2.60908,1.94117,-0.424246,2.85508,2.71473,4.88469 10167.3,10148.7,9234.04,-1.71112,-2.89318,3.67043,1.66277,3.35424,4.57631,10.1924,-0.35173,1.35064,-5.80931,-1.82085,3.64176,4.57117,2.2882,0.924739,-2.41648,2.22467,2.19365,5.80375,-0.426137,-2.32705,-0.919332,2.09081,-2.34116,-2.25007,1.71251,3.40172,3.5108 10165.7,10149.1,9229.23,-1.45001,-3.05548,2.45599,-0.349391,3.71978,4.53119,5.144,-0.0754888,2.20722,-6.90377,0.948441,2.13514,3.08117,1.83942,2.86791,-0.010419,2.66035,5.23219,5.6626,-0.804354,-2.37724,-1.67323,0.673861,-3.53649,-1.59081,1.76997,2.75549,2.29186 10167.4,10147.1,9226.8,-1.49928,-2.70714,1.88393,-0.842721,-0.225431,3.25531,1.41947,0.140255,3.21042,-3.88608,1.41104,1.86088,-0.091131,0.642157,1.94581,0.307133,3.18746,6.22574,4.30938,-1.01513,-1.1936,-1.8575,-0.588364,-1.42784,-2.08205,1.85519,1.46316,1.06047 10171.1,10143.9,9226.48,-2.01672,-2.40053,3.06391,-0.0599903,-8.34303,2.94718,-5.04409,-0.199276,4.0892,-3.68083,-0.226057,2.75547,-0.686676,-0.843757,0.670264,-0.458086,3.08212,7.11729,2.84836,0.933537,-1.50789,-1.59001,0.179663,0.0589795,-2.55704,3.42709,0.775783,0.360096 10175,10140.6,9227.89,-1.34782,-2.60865,2.14445,1.39294,-10.3608,4.5868,-8.2559,-1.78039,0.356678,-10.0047,-3.28868,2.87133,1.85333,-3.67234,1.53223,-1.27653,0.113475,6.97877,4.49731,3.38158,-3.24882,-2.09817,-0.213742,-0.816136,-3.92766,4.36792,1.46638,-0.25462 10179,10139.5,9231.01,-0.683001,-1.14693,0.835389,1.45465,-4.93888,6.92044,-3.2459,-1.76518,-2.11784,-11.5638,-3.99539,3.25477,2.97649,-3.54233,2.62301,-0.286071,-1.99677,5.44349,5.35012,2.55683,-3.04093,-1.82791,-1.42661,0.583625,-2.6178,3.43693,2.29735,-0.308687 10185.5,10142.2,9235.77,-0.0852919,0.0218383,0.522022,1.091,-4.00515,-0.71681,-2.72016,-1.24891,-1.4593,-5.53454,-2.81228,2.98724,1.40275,-1.35994,4.37674,1.00841,-2.02092,6.34309,4.01241,0.223476,0.719167,-0.617158,-1.79277,2.19906,-0.00915837,1.60933,1.1106,-0.276707 10194.7,10147.7,9242.28,-0.507821,-1.45713,1.82236,1.06383,0.990703,1.16431,3.40878,-1.35424,0.436421,-3.7364,-2.82733,0.844561,2.18188,1.42103,2.14788,-1.48658,-0.956157,3.31294,2.03859,-1.09837,2.11718,-0.147919,0.113767,0.665977,1.0134,-0.758268,0.662046,1.48327 10202.3,10153,9250.68,-0.953894,-1.28733,1.09826,0.183582,-2.63676,-4.1377,-2.89907,-0.851983,3.07691,-0.452803,-2.18838,0.00930997,2.87142,4.0314,0.911046,-1.55443,1.18147,4.24956,-2.48362,-1.23019,1.72571,2.11001,5.29268,-0.281886,3.31927,-0.100871,1.85826,4.09941 10205.4,10156.4,9259.89,-1.27754,0.134823,0.181405,0.430733,3.94306,1.54036,2.99815,-1.16285,4.70226,-4.24342,-1.81256,1.00154,4.93307,6.24027,-1.59843,-1.48742,2.34844,2.10305,-2.00905,-0.662325,0.626241,1.17997,6.74123,-1.67701,1.35772,0.491316,4.32271,6.53414 10204.9,10157.9,9267.94,0.0906612,2.16352,-0.379486,5.42194,2.73054,2.84047,-1.4914,-1.83181,4.02307,-5.15449,-0.262248,3.79351,5.21678,7.80905,0.384689,1.27337,2.9796,6.90988,1.28339,2.20996,-0.91791,-0.163496,3.78903,-1.75168,-0.655347,2.9127,4.88667,7.66747 10203.5,10159,9273.39,2.81598,1.22437,-0.368556,7.79675,3.42922,7.94279,4.57077,-0.708312,0.0968463,-6.10539,0.906129,5.55489,5.11842,8.21484,-0.0671665,1.22889,2.37144,6.24544,4.97372,3.9233,-2.49967,0.267274,-0.310124,1.09266,-0.410233,4.04567,4.74621,8.0612 10203.2,10162.2,9275.77,5.91857,0.355765,0.897437,11.4606,-3.5509,6.21936,2.57301,-0.0103725,-3.12789,-4.93913,0.601331,6.94209,5.77388,6.93334,1.15761,0.716978,2.28439,10.4648,4.58557,4.39511,-2.76356,2.73426,-1.51427,4.03252,2.99548,5.47757,3.66414,6.66569 10203.5,10167.2,9275.21,3.60261,-0.370029,0.212296,6.53742,-1.17501,1.39057,4.60494,-1.59955,-3.36286,-6.83681,-0.619753,2.05525,7.21718,4.0699,-0.311278,-1.80144,1.07578,6.02142,4.81799,3.05296,-1.94492,1.84126,-1.66326,1.40391,1.77364,2.95825,3.1993,3.61198 10203.2,10169.7,9272.52,1.94895,1.27875,-0.411546,7.45768,-3.75161,0.551798,7.13428,-3.82068,-2.61405,-4.51085,-0.839975,-0.654388,7.59238,3.63367,1.11679,-0.895324,0.0589114,6.72608,0.605615,-0.28023,-1.84675,-0.134175,-0.468956,-1.06577,2.10307,1.19208,2.14254,2.35948 10201,10166,9269.14,-0.454618,0.774031,2.06017,2.8462,-0.622985,0.18548,5.53147,-2.50822,-2.46147,-4.96779,0.0109421,-5.95039,4.88549,1.45711,-1.36876,0.21175,1.58667,0.959389,-1.72767,-0.999701,-1.91612,-0.271218,-0.271307,-3.60937,2.2528,-2.81471,1.29832,0.342989 10196.9,10158.5,9266.51,1.16537,-1.9421,4.60098,6.66208,-8.91079,-4.05041,0.977918,-0.375912,-2.52562,-2.44083,-1.83608,-5.04574,0.870179,-2.88837,0.903319,2.45464,2.77487,7.13809,-7.32993,-2.29902,0.410437,1.61472,1.76486,-2.68616,2.88565,-3.79142,-0.830458,-1.20118 10194.1,10152.5,9265.18,-4.11534,-5.864,4.81522,5.05616,0.145339,-4.93641,2.59855,0.656712,1.10696,-4.83177,-6.68192,-7.2593,-1.01756,-6.50992,-0.623669,0.165413,3.83811,5.84041,-5.84841,-0.103661,1.98729,0.416145,1.34348,-6.16515,-2.67871,-5.57128,-1.65554,-3.26762 10194.1,10148.4,9264.07,-6.59722,-4.92656,-2.01588,3.7417,0.726794,-18.2936,5.15057,-0.276157,1.50739,-0.538248,-8.52874,-4.00362,-4.55022,-5.27015,0.604573,-0.930054,-0.109161,8.19838,-8.17669,-2.1092,4.17484,-1.56197,-1.02102,-5.8341,-5.50376,-1.7134,-2.50895,-3.06608 10193.9,10142,9261.25,-7.62788,-2.98611,1.9356,-1.40885,17.3716,4.06957,22.1809,1.39972,5.64224,-7.94302,-5.59134,-1.45901,0.439725,1.11211,-6.73411,-3.11746,1.4598,-4.78344,-2.09513,-0.404037,0.473396,-4.22587,-2.43839,-5.70551,-5.26427,-0.515338,1.20082,0.113119 10190.4,10132.9,9256.55,-0.061965,0.47587,-3.01478,1.28661,-2.15014,-14.2047,7.89898,0.463674,0.911903,2.0883,-1.64338,3.11185,-2.21723,0.781415,-1.37312,0.396228,-1.38267,3.09944,-1.8496,-1.29836,2.6087,-3.15966,-2.03297,-3.33185,-3.23065,2.92606,0.328003,-0.0324179 10185,10126,9252.36,-0.460313,1.71643,-3.7396,-2.47922,-1.49725,-15.3645,-1.80975,0.715758,-0.981069,-0.691494,-0.794101,-0.106849,-2.08179,-0.30971,-1.53311,0.428815,-0.320026,-0.221114,2.28648,0.175576,3.04606,-1.33911,-0.290353,-5.37868,-3.63253,0.919151,0.306196,-0.421839 10178.6,10124.8,9251.04,-1.00256,1.33259,-4.2472,-1.03971,2.95821,-4.55752,1.84476,0.117356,-4.36831,-4.27268,-1.02576,-0.886254,0.661063,-0.0446314,-0.718596,-0.508343,-2.00182,-0.337999,2.57329,-0.613947,2.18595,0.685998,2.2221,-1.4549,-2.89677,-0.0111036,1.2411,0.83044 10170.8,10127.6,9252.97,-1.71108,0.0714348,-2.91875,-0.0818013,10.0027,5.28964,4.84662,0.115636,-5.97389,-2.97492,0.466922,-1.16018,3.14319,-0.484977,-0.73996,-1.40938,-2.86898,-1.18229,2.85098,1.59393,-0.709864,0.769892,0.0526875,0.667581,-4.09633,-0.130706,2.87503,0.28772 10163.4,10130.8,9256.69,-0.0482655,-0.561906,-4.41924,-1.93638,1.00001,-3.80859,-6.74655,-0.693966,-6.90741,3.83606,-0.443929,0.133173,1.32042,-4.12952,2.21239,-0.401666,-2.83084,1.48444,3.60821,4.7162,0.0479322,1.57325,-2.9423,0.781086,-3.57562,1.01359,1.5974,-1.03302 10159.1,10132.9,9259.9,0.830676,1.38376,-3.59798,1.88876,1.90766,6.33722,1.16568,-1.88109,-5.49532,7.56995,-3.97276,2.47056,-1.10217,-4.02745,0.530141,-1.80729,-2.44923,1.11112,6.04583,5.79514,-1.61378,0.146823,-4.31812,1.65679,-0.82556,0.385538,-1.6035,-0.921055 10159.8,10135.2,9260.63,-0.16576,1.00018,-5.12473,0.442361,0.505831,-5.64864,-2.63413,-2.52592,-5.46478,4.95174,-4.3147,0.782684,-5.73615,-4.82371,0.266276,-1.86669,-4.0481,-1.31822,9.03428,5.18538,0.835431,-1.04748,-4.21294,1.0615,-0.105573,-1.22812,-5.24566,-3.63422 10165.2,10138.1,9258.46,0.205477,-0.680098,-4.46762,5.26891,1.18115,-1.68502,7.13137,-1.22722,-4.01706,-1.7858,-0.511666,3.55446,-3.85553,-2.43205,1.3525,-0.694302,-4.16672,-0.729833,7.26617,2.38627,0.742375,-2.04911,-3.24066,2.72775,2.10783,0.115275,-4.78462,-4.34396 10171.6,10139.6,9254.61,-1.51268,-2.23477,-5.13237,-3.29461,-0.317239,-10.5071,-7.94002,1.87205,-2.15615,-2.57627,4.52526,1.46446,-2.39092,-3.68309,1.44927,1.27351,-2.10555,-3.67494,7.0263,3.64847,0.370668,0.612656,-2.452,4.76347,5.31087,1.21101,-2.18927,-4.86589 10174.6,10139.6,9250.85,-0.380976,0.430706,-4.77251,1.24603,3.57465,-3.14504,-10.8805,1.4131,-3.82203,6.1265,4.05681,1.86576,-2.69539,-3.84931,0.571097,0.0445532,-3.61574,1.0929,5.45496,4.67637,-2.69117,0.376736,-3.44843,8.26613,5.44059,2.39248,-1.35143,-3.43895 10173.2,10141.8,9247.9,-0.967231,0.660605,-0.333774,0.682442,10.1733,9.80472,-4.02844,0.296976,-2.0856,1.70749,0.105393,-0.302007,-2.02762,-1.68176,-2.57321,-1.85542,-2.20576,-3.56605,7.81712,4.57148,-0.717533,0.00661063,0.070936,7.88567,3.00205,-0.188925,-1.30646,-0.417109 10169.8,10147.8,9245.05,1.57911,1.89614,-1.23894,5.44327,1.1255,2.7455,0.888702,-2.69789,-2.29535,1.37374,-2.16695,0.277041,-2.61632,-0.168021,1.19527,-0.966804,-1.39634,2.02717,6.13068,1.74285,2.61838,-0.673957,2.42798,5.71141,1.0237,-0.190537,-2.48355,-0.424022 10166.9,10152.4,9241.4,1.48812,1.56883,0.00439658,-1.99079,-5.3945,-7.45076,-2.79497,-1.09824,0.438405,1.08335,0.567998,-2.12211,0.537132,0.235065,2.13962,0.850241,2.33283,0.11668,5.71046,0.316621,2.37782,1.5783,4.38674,4.44102,2.85837,-0.867284,0.197126,-0.632035 10166,10149.9,9237.21,3.10346,3.20745,-0.0787972,3.26164,-1.99167,1.15174,7.73898,0.388067,-1.3872,7.93093,2.89628,-0.846609,2.95243,1.10786,0.0356645,-0.191303,-1.48335,3.06518,0.833731,-2.48298,-2.62814,-0.329278,-0.0454046,4.84244,1.50962,-0.571214,2.28968,0.0896905 10169.4,10141.9,9233.72,1.54047,2.79665,0.872984,0.435893,0.341067,4.50191,6.31086,2.24353,0.0763229,5.33021,2.30696,-1.94916,2.28551,1.6759,-3.55737,-0.57595,-3.31446,-1.28349,0.109544,-0.911539,-3.08755,0.149125,-2.57658,2.65457,-0.759677,-1.72314,1.73795,1.22082 10175.5,10134.5,9231.85,3.08721,1.31195,-0.463831,-2.78365,-16.0641,-12.4959,-7.90321,1.44639,2.2521,2.09953,-0.628689,0.674957,-0.991746,0.999703,0.501374,1.08647,-1.9555,-0.457535,-1.969,0.140249,0.679574,4.05153,-1.26929,2.9472,1.23177,0.0460567,-1.18548,1.19414 10178.5,10132.3,9231.94,4.8578,-0.156201,-1.83619,3.45539,-10.5983,-4.40534,-3.25278,-1.48511,1.7839,1.07398,-3.79721,3.44697,-0.661031,-0.19397,1.51898,-2.78611,-1.58924,-1.02247,-4.03291,-0.779814,-2.72459,1.42865,-4.44874,1.96164,0.024013,0.769821,-1.68183,-1.09525 10176,10135.5,9234.24,3.98434,-2.9881,-1.82932,-3.45496,-4.37718,-1.32479,-6.81161,0.242295,3.63988,0.773917,-2.92089,1.50769,1.03257,-1.29175,0.607123,-3.32519,0.794345,-7.2134,-4.18473,-2.11878,-3.48641,2.04926,-1.83971,2.5711,1.8547,-0.444122,0.204744,-0.633906 10170.3,10141.1,9238.24,4.5574,-1.21766,-1.92884,-3.3891,-4.53289,-3.61119,-11.1428,0.87067,2.52674,6.28098,-0.916225,0.833349,-0.285056,-2.02874,2.83162,-0.822357,0.836116,-2.02452,-4.36166,-2.46534,-2.40599,3.53798,0.439996,2.8824,2.66576,-0.190266,-0.411649,-0.335746 10164.8,10146.9,9241.73,1.14271,0.21175,2.54403,-5.97996,8.86795,9.92082,0.583279,0.92891,3.1377,1.52082,0.653327,-2.04189,-0.909795,-1.88382,-1.45444,-1.72465,2.94817,-6.9659,0.661566,-0.779148,-2.33549,3.61435,1.90115,-0.709103,0.572663,-2.44443,-1.61985,-1.24632 10161.8,10151.9,9242.42,0.429305,-0.24402,1.54324,-0.758714,1.99988,2.30697,-0.150645,-1.67843,-0.372931,2.68223,0.974669,-2.18675,-3.69726,-3.84373,0.315076,-1.61503,2.02219,-0.439987,1.5067,0.347441,-0.468043,1.85512,2.51346,-3.61534,-1.61311,-1.68631,-4.32277,-3.31289 10160.6,10154.5,9240.5,-1.6783,-2.7916,3.79283,-1.46484,1.8842,7.0456,3.61276,-2.08564,-1.14902,-3.90469,1.00738,-2.71903,-1.12392,-2.56102,-0.564502,-1.26929,2.87817,-3.80446,2.16188,1.69189,-0.17359,-0.806729,4.45158,-4.99401,-1.9224,-2.1335,-3.41399,-1.5215 10158.8,10152.9,9238.94,-1.26294,-1.55708,2.47997,-0.37092,-5.35681,-1.99801,-4.61673,-3.19995,-3.63982,-3.59422,0.268397,-1.15304,1.21312,-1.94008,2.37467,0.463918,1.03699,-0.249188,1.94821,3.1095,0.656428,-1.26258,5.17342,-2.5293,-0.911564,-0.727538,-1.60047,-0.657086 10157.1,10148.4,9241.47,-0.729297,1.90628,1.50273,8.02209,4.5029,7.25435,-0.943104,-3.87229,-5.15977,-0.605295,-0.786266,-0.00624273,3.2036,-0.99694,1.83674,-0.424322,-0.759934,4.69506,3.12589,4.93905,-1.14094,-2.37706,0.896838,-1.15642,-2.07425,-0.341439,0.651623,-1.90525 10159.3,10145.1,9249.53,-3.61489,-0.368775,4.8318,0.654323,13.8953,20.2332,9.01061,0.740005,1.06482,-1.98312,1.43178,-2.39481,5.44965,2.23927,-2.07082,1.84445,3.36316,-2.3874,5.82791,5.13504,0.331121,1.17574,4.11636,2.46863,2.53744,-2.31289,3.73605,1.261 10166.4,10146.2,9260.39,-0.690065,-0.196533,2.57149,3.28245,1.26863,3.07282,2.3288,0.343504,0.7493,7.7189,2.47287,-2.19401,1.83016,1.49389,2.04941,5.57015,1.68587,7.37325,4.33035,3.86901,3.21355,1.31074,4.30838,4.34097,4.14204,-0.792683,1.91579,1.4487 10174.6,10153.3,9268.63,0.973864,0.288282,4.67663,-0.604468,1.35396,1.77193,6.1612,0.928573,3.56181,0.301872,1.61496,-1.94891,1.37811,1.784,-0.829802,4.5252,2.98522,2.05165,3.03006,0.33278,4.9167,0.692046,4.78248,3.89965,4.1223,-1.28055,0.902128,2.44014 10179.4,10165.9,9270.91,0.383028,0.372248,2.91142,5.26445,-4.52355,-0.481389,-1.47582,-0.0802922,4.09074,-3.4789,-1.84054,-0.641665,1.60157,2.15213,-0.406849,1.24052,1.05589,7.69175,-4.79723,-3.42058,1.48542,-2.69221,-0.604027,-2.8823,-1.41943,-0.386671,1.59434,1.71786 10180.9,10180.3,9268.76,-7.39108,-4.07938,1.96913,5.84801,-1.99672,13.1344,-8.45676,2.45664,8.74322,0.00440195,-3.70354,-4.02376,5.09873,7.07674,-2.94009,-6.27334,-2.18896,9.06615,-15.5002,-6.518,-12.659,-9.2251,-8.78964,-16.0646,-15.2285,-1.36974,7.28841,2.96689 \ No newline at end of file diff --git a/nipype/testing/data/jsongrabber.txt b/nipype/testing/data/jsongrabber.txt index 4554d7beb4..c81d99fa2a 100644 --- a/nipype/testing/data/jsongrabber.txt +++ b/nipype/testing/data/jsongrabber.txt @@ -1 +1 @@ -{"param2": 4, "param1": "exampleStr"} \ No newline at end of file +{"param2": 4, "param1": "exampleStr"} diff --git a/nipype/testing/data/realign_json.json b/nipype/testing/data/realign_json.json index 12a5b41a0a..5bf1936476 100644 --- a/nipype/testing/data/realign_json.json +++ b/nipype/testing/data/realign_json.json @@ -31,4 +31,4 @@ "write_mask": null, "write_which": null, "write_wrap": null -} \ No newline at end of file +} diff --git a/nipype/testing/data/smri_ants_registration_settings.json b/nipype/testing/data/smri_ants_registration_settings.json index 54f27908e4..53f33e33e2 100644 --- a/nipype/testing/data/smri_ants_registration_settings.json +++ b/nipype/testing/data/smri_ants_registration_settings.json @@ -177,4 +177,4 @@ ], "dimension": 3, "collapse_output_transforms": false -} \ No newline at end of file +} diff --git a/nipype/testing/data/tbss_dir/do_not_delete.txt b/nipype/testing/data/tbss_dir/do_not_delete.txt index a1df420e34..9c5c450dfa 100644 --- a/nipype/testing/data/tbss_dir/do_not_delete.txt +++ b/nipype/testing/data/tbss_dir/do_not_delete.txt @@ -1 +1 @@ -This file has to be here because git ignores empty folders. \ No newline at end of file +This file has to be here because git ignores empty folders. diff --git a/nipype/utils/spm_flat_config.m b/nipype/utils/spm_flat_config.m index 8e46914667..6e489251b2 100644 --- a/nipype/utils/spm_flat_config.m +++ b/nipype/utils/spm_flat_config.m @@ -36,4 +36,4 @@ else objlist = {objlist{:} astruct}; end -end \ No newline at end of file +end diff --git a/nipype/workflows/data/ecc.sch b/nipype/workflows/data/ecc.sch index a7de1f2b0b..b9e8d8c3c3 100644 --- a/nipype/workflows/data/ecc.sch +++ b/nipype/workflows/data/ecc.sch @@ -3,7 +3,7 @@ setscale 4 setoption smoothing 6 setoption paramsubset 1 0 0 0 0 0 0 1 1 1 1 1 1 clear U -clear UA +clear UA clear UB clear US clear UP @@ -53,7 +53,7 @@ clear U setrow UG 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 optimise 7 UG 0.0 0.0 0.0 0.0 0.0 0.0 0.0 abs 2 sort U -copy U UG +copy U UG # 1mm scale setscale 1 setoption smoothing 2 diff --git a/nipype/workflows/data/hmc.sch b/nipype/workflows/data/hmc.sch index 08f3e76e85..aeabcae29a 100644 --- a/nipype/workflows/data/hmc.sch +++ b/nipype/workflows/data/hmc.sch @@ -2,7 +2,7 @@ setscale 4 setoption smoothing 6 clear U -clear UA +clear UA clear UB clear US clear UP @@ -51,7 +51,7 @@ clear U setrow UG 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 optimise 7 UG 0.0 0.0 0.0 0.0 0.0 0.0 0.0 abs 2 sort U -copy U UG +copy U UG # 1mm scale setscale 1 setoption smoothing 2 From 08e4d660dc58d4d7f0d4b379f80023e9dbcf08ee Mon Sep 17 00:00:00 2001 From: miykael Date: Fri, 5 Jan 2018 16:28:26 +0100 Subject: [PATCH 622/643] STY: correct for tailing spaces and newline at end of file --- .dockerignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.dockerignore b/.dockerignore index c44710d14e..fb4be03ec9 100644 --- a/.dockerignore +++ b/.dockerignore @@ -34,4 +34,4 @@ Vagrantfile .mailmap # Previous coverage results -.coverage \ No newline at end of file +.coverage From d0dd3e14bcf4f4c465b23c864dc18abaf9ff5cbf Mon Sep 17 00:00:00 2001 From: miykael Date: Fri, 5 Jan 2018 17:00:13 +0100 Subject: [PATCH 623/643] STY: correct for newline at end of file --- nipype/testing/data/README | 2 +- nipype/testing/data/spminfo | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/nipype/testing/data/README b/nipype/testing/data/README index 825acd11e2..550854c57e 100644 --- a/nipype/testing/data/README +++ b/nipype/testing/data/README @@ -3,4 +3,4 @@ in the doctests of nipype. For verion 0.3 of nipype, we're using Traits and for input files, the code checks to confirm the assigned files actually exist. It doesn't matter what the files are, or even if they contain "real data", only that they exist. Again, these files -are only meant to serve as documentation in the doctests. \ No newline at end of file +are only meant to serve as documentation in the doctests. diff --git a/nipype/testing/data/spminfo b/nipype/testing/data/spminfo index a24b0a57c4..32317debc4 100644 --- a/nipype/testing/data/spminfo +++ b/nipype/testing/data/spminfo @@ -6,9 +6,9 @@ try, end; spm_path = spm('dir'); fprintf(1, 'NIPYPE %s', spm_path); - + ,catch ME, fprintf(2,'MATLAB code threw an exception:\n'); fprintf(2,'%s\n',ME.message); if length(ME.stack) ~= 0, fprintf(2,'File:%s\nName:%s\nLine:%d\n',ME.stack.file,ME.stack.name,ME.stack.line);, end; -end; \ No newline at end of file +end; From adf002610d936a8d7a355fa4b25c17b886153979 Mon Sep 17 00:00:00 2001 From: miykael Date: Fri, 5 Jan 2018 20:15:01 +0100 Subject: [PATCH 624/643] STY: delets heading newline in textfiles --- doc/users/caching_tutorial.rst | 1 - doc/users/sphinx_ext.rst | 1 - nipype/refs.py | 1 - 3 files changed, 3 deletions(-) diff --git a/doc/users/caching_tutorial.rst b/doc/users/caching_tutorial.rst index 8cd51917a2..4d648277bd 100644 --- a/doc/users/caching_tutorial.rst +++ b/doc/users/caching_tutorial.rst @@ -1,4 +1,3 @@ - .. _caching: =========================== diff --git a/doc/users/sphinx_ext.rst b/doc/users/sphinx_ext.rst index 02832ef7f8..9e6732a2ef 100644 --- a/doc/users/sphinx_ext.rst +++ b/doc/users/sphinx_ext.rst @@ -1,4 +1,3 @@ - .. _sphinx_ext: Sphinx extensions diff --git a/nipype/refs.py b/nipype/refs.py index 12e435316e..3b4d394136 100644 --- a/nipype/refs.py +++ b/nipype/refs.py @@ -1,4 +1,3 @@ - # Use duecredit (duecredit.org) to provide a citation to relevant work to # be cited. This does nothing, unless the user has duecredit installed, # And calls this with duecredit (as in `python -m duecredit script.py`): From e3dffeec697d97bc731e8c498bfd4fa1bc433f12 Mon Sep 17 00:00:00 2001 From: miykael Date: Fri, 5 Jan 2018 20:28:34 +0100 Subject: [PATCH 625/643] STY: adds newline to end of file --- nipype/workflows/fmri/fsl/tests/test_preprocess.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nipype/workflows/fmri/fsl/tests/test_preprocess.py b/nipype/workflows/fmri/fsl/tests/test_preprocess.py index ac9960514c..4f382bdc1a 100644 --- a/nipype/workflows/fmri/fsl/tests/test_preprocess.py +++ b/nipype/workflows/fmri/fsl/tests/test_preprocess.py @@ -22,4 +22,4 @@ def test_create_featreg_preproc(): # test methods assert wf.get_node('extractref') - assert wf._get_dot() \ No newline at end of file + assert wf._get_dot() From 77e5257abebb395f268f9c337e8253d5f0e659c7 Mon Sep 17 00:00:00 2001 From: Oscar Esteban Date: Sun, 7 Jan 2018 10:59:43 -0800 Subject: [PATCH 626/643] improve log trace when ``os.getcwd()`` failed --- nipype/pipeline/engine/nodes.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nipype/pipeline/engine/nodes.py b/nipype/pipeline/engine/nodes.py index a00165764e..88375bf81f 100644 --- a/nipype/pipeline/engine/nodes.py +++ b/nipype/pipeline/engine/nodes.py @@ -434,7 +434,8 @@ def run(self, updatehash=False): # Changing back to cwd is probably not necessary # but this makes sure there's somewhere to change to. cwd = os.path.split(outdir)[0] - logger.debug('Current folder does not exist, changing to "%s" instead.', cwd) + logger.debug('Current folder "%s" does not exist, changing to "%s" instead.', + os.getenv('PWD', 'unknown'), cwd) os.chdir(outdir) try: From a1c780b4784ae62fcff7c838ae1ebf26112d934f Mon Sep 17 00:00:00 2001 From: Oscar Esteban Date: Sun, 7 Jan 2018 11:04:03 -0800 Subject: [PATCH 627/643] cache cwd in config object, handle os.getcwd errors --- nipype/utils/config.py | 45 +++++++++++++++++++++++++++++++----------- 1 file changed, 34 insertions(+), 11 deletions(-) diff --git a/nipype/utils/config.py b/nipype/utils/config.py index 3c9218f2a6..c02be71f64 100644 --- a/nipype/utils/config.py +++ b/nipype/utils/config.py @@ -15,7 +15,6 @@ import errno import atexit from warnings import warn -from io import StringIO from distutils.version import LooseVersion import configparser import numpy as np @@ -37,21 +36,19 @@ NUMPY_MMAP = LooseVersion(np.__version__) >= LooseVersion('1.12.0') -# Get home directory in platform-agnostic way -homedir = os.path.expanduser('~') -default_cfg = """ +DEFAULT_CONFIG_TPL = """\ [logging] workflow_level = INFO utils_level = INFO interface_level = INFO log_to_file = false -log_directory = %s +log_directory = {log_dir} log_size = 16384000 log_rotate = 4 [execution] create_report = true -crashdump_dir = %s +crashdump_dir = {crashdump_dir} hash_method = timestamp job_finished_timeout = 5 keep_inputs = false @@ -79,7 +76,7 @@ [check] interval = 1209600 -""" % (homedir, os.getcwd()) +""".format def mkdir_p(path): @@ -97,15 +94,17 @@ class NipypeConfig(object): def __init__(self, *args, **kwargs): self._config = configparser.ConfigParser() + self._cwd = None + config_dir = os.path.expanduser('~/.nipype') - config_file = os.path.join(config_dir, 'nipype.cfg') self.data_file = os.path.join(config_dir, 'nipype.json') - self._config.readfp(StringIO(default_cfg)) + + self.set_default_config() self._display = None self._resource_monitor = None if os.path.exists(config_dir): - self._config.read([config_file, 'nipype.cfg']) + self._config.read([os.path.join(config_dir, 'nipype.cfg'), 'nipype.cfg']) for option in CONFIG_DEPRECATIONS: for section in ['execution', 'logging', 'monitoring']: @@ -115,8 +114,32 @@ def __init__(self, *args, **kwargs): # Warn implicit in get self.set(new_section, new_option, self.get(section, option)) + @property + def cwd(self): + """Cache current working directory ASAP""" + # Run getcwd only once, preventing multiproc to finish + # with error having changed to the wrong path + if self._cwd is None: + try: + self._cwd = os.getcwd() + except OSError: + warn('Trying to run Nipype from a nonexistent directory "%s".', + os.getenv('PWD', 'unknown')) + raise + return self._cwd + def set_default_config(self): - self._config.readfp(StringIO(default_cfg)) + """Read default settings template and set into config object""" + default_cfg = DEFAULT_CONFIG_TPL( + log_dir=os.path.expanduser('~'), # Get $HOME in a platform-agnostic way + crashdump_dir=self.cwd # Read cached cwd + ) + + try: + self._config.read_string(default_cfg) # Python >= 3.2 + except AttributeError: + from io import StringIO + self._config.readfp(StringIO(default_cfg)) def enable_debug_mode(self): """Enables debug configuration""" From d0e1ec880f8bcd9e8020cc37c2b0a30375c98022 Mon Sep 17 00:00:00 2001 From: Oscar Esteban Date: Sun, 7 Jan 2018 11:28:38 -0800 Subject: [PATCH 628/643] elevate trace to warning --- nipype/pipeline/engine/nodes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nipype/pipeline/engine/nodes.py b/nipype/pipeline/engine/nodes.py index 88375bf81f..468bb4a682 100644 --- a/nipype/pipeline/engine/nodes.py +++ b/nipype/pipeline/engine/nodes.py @@ -434,8 +434,8 @@ def run(self, updatehash=False): # Changing back to cwd is probably not necessary # but this makes sure there's somewhere to change to. cwd = os.path.split(outdir)[0] - logger.debug('Current folder "%s" does not exist, changing to "%s" instead.', - os.getenv('PWD', 'unknown'), cwd) + logger.warning('Current folder "%s" does not exist, changing to "%s" instead.', + os.getenv('PWD', 'unknown'), cwd) os.chdir(outdir) try: From ee7c70b87d57c3ecf1e8e24a59fd8312cfe47a61 Mon Sep 17 00:00:00 2001 From: Oscar Esteban Date: Sun, 7 Jan 2018 11:28:55 -0800 Subject: [PATCH 629/643] add test for cwd --- nipype/utils/tests/test_config.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/nipype/utils/tests/test_config.py b/nipype/utils/tests/test_config.py index 869b733c2e..7684bdd55e 100644 --- a/nipype/utils/tests/test_config.py +++ b/nipype/utils/tests/test_config.py @@ -193,3 +193,9 @@ def test_display_empty_macosx(monkeypatch): monkeypatch.setattr(sys, 'platform', 'darwin') with pytest.raises(RuntimeError): config.get_display() + +def test_cwd_cached(tmpdir): + """Check that changing dirs does not change nipype's cwd""" + oldcwd = config.cwd + tmpdir.chdir() + assert config.cwd == oldcwd From 459e0ac3b75e8e873b3cb106aefc7797b9b959e7 Mon Sep 17 00:00:00 2001 From: Oscar Esteban Date: Sun, 7 Jan 2018 11:59:48 -0800 Subject: [PATCH 630/643] cleaning pe.utils --- nipype/pipeline/engine/utils.py | 162 +++++++++++++++----------------- 1 file changed, 76 insertions(+), 86 deletions(-) diff --git a/nipype/pipeline/engine/utils.py b/nipype/pipeline/engine/utils.py index 896d9b0234..213a8aaa2c 100644 --- a/nipype/pipeline/engine/utils.py +++ b/nipype/pipeline/engine/utils.py @@ -1,8 +1,7 @@ # -*- coding: utf-8 -*- # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: -"""Utility routines for workflow graphs -""" +"""Utility routines for workflow graphs""" from __future__ import print_function, division, unicode_literals, absolute_import from builtins import str, open, next, zip, range @@ -13,29 +12,24 @@ import re from copy import deepcopy from glob import glob -from distutils.version import LooseVersion from traceback import format_exception from hashlib import sha1 import gzip -from ...utils.filemanip import ( - save_json, savepkl, - write_rst_header, write_rst_dict, write_rst_list -) - -try: - from inspect import signature -except ImportError: - from funcsigs import signature - from functools import reduce + import numpy as np import networkx as nx +from future import standard_library +from ... import logging, config, LooseVersion from ...utils.filemanip import ( relpath, makedirs, fname_presuffix, to_str, - filename_to_list, get_related_files, FileNotFoundError) + filename_to_list, get_related_files, FileNotFoundError, + save_json, savepkl, + write_rst_header, write_rst_dict, write_rst_list, +) from ...utils.misc import str2bool from ...utils.functions import create_function_from_source from ...interfaces.base import ( @@ -44,8 +38,11 @@ from ...interfaces.utility import IdentityInterface from ...utils.provenance import ProvStore, pm, nipype_ns, get_id -from ... import logging, config -from future import standard_library + +try: + from inspect import signature +except ImportError: + from funcsigs import signature standard_library.install_aliases() logger = logging.getLogger('workflow') @@ -105,7 +102,7 @@ def nodelist_runner(nodes, updatehash=False, stop_first=False): if stop_first: raise - result = node._load_results() + result = node.result err = [] if result.runtime and hasattr(result.runtime, 'traceback'): err = [result.runtime.traceback] @@ -117,10 +114,7 @@ def nodelist_runner(nodes, updatehash=False, stop_first=False): def write_report(node, report_type=None, is_mapnode=False): - """ - Write a report file for a node - - """ + """Write a report file for a node""" if not str2bool(node.config['execution']['create_report']): return @@ -281,7 +275,7 @@ def load_resultfile(path, name): except UnicodeDecodeError: # Was this pickle created with Python 2.x? pickle.load(pkl_file, fix_imports=True, encoding='utf-8') - logger.warn('Successfully loaded pickle in compatibility mode') + logger.warning('Successfully loaded pickle in compatibility mode') except (traits.TraitError, AttributeError, ImportError, EOFError) as err: if isinstance(err, (AttributeError, ImportError)): @@ -327,7 +321,7 @@ def _write_inputs(node): for key, _ in list(node.inputs.items()): val = getattr(node.inputs, key) if isdefined(val): - if type(val) == str: + if isinstance(val, (str, bytes)): try: func = create_function_from_source(val) except RuntimeError: @@ -355,18 +349,18 @@ def format_node(node, format='python', include_config=False): lines = [] name = node.fullname.replace('.', '_') if format == 'python': - klass = node._interface + klass = node.interface importline = 'from %s import %s' % (klass.__module__, klass.__class__.__name__) comment = '# Node: %s' % node.fullname - spec = signature(node._interface.__init__) + spec = signature(node.interface.__init__) args = [p.name for p in list(spec.parameters.values())] args = args[1:] if args: filled_args = [] for arg in args: - if hasattr(node._interface, '_%s' % arg): - filled_args.append('%s=%s' % (arg, getattr(node._interface, + if hasattr(node.interface, '_%s' % arg): + filled_args.append('%s=%s' % (arg, getattr(node.interface, '_%s' % arg))) args = ', '.join(filled_args) else: @@ -450,8 +444,8 @@ def get_print_name(node, simple_form=True): """ name = node.fullname if hasattr(node, '_interface'): - pkglist = node._interface.__class__.__module__.split('.') - interface = node._interface.__class__.__name__ + pkglist = node.interface.__class__.__module__.split('.') + interface = node.interface.__class__.__name__ destclass = '' if len(pkglist) > 2: destclass = '.%s' % pkglist[2] @@ -487,17 +481,18 @@ def _create_dot_graph(graph, show_connectinfo=False, simple_form=True): def _write_detailed_dot(graph, dotfilename): - """Create a dot file with connection info - - digraph structs { - node [shape=record]; - struct1 [label=" left| mid\ dle| right"]; - struct2 [label=" one| two"]; - struct3 [label="hello\nworld |{ b |{c| d|e}| f}| g | h"]; - struct1:f1 -> struct2:f0; - struct1:f0 -> struct2:f1; - struct1:f2 -> struct3:here; - } + r""" + Create a dot file with connection info :: + + digraph structs { + node [shape=record]; + struct1 [label=" left| middle| right"]; + struct2 [label=" one| two"]; + struct3 [label="hello\nworld |{ b |{c| d|e}| f}| g | h"]; + struct1:f1 -> struct2:f0; + struct1:f0 -> struct2:f1; + struct1:f2 -> struct3:here; + } """ text = ['digraph structs {', 'node [shape=record];'] # write nodes @@ -535,7 +530,7 @@ def _write_detailed_dot(graph, dotfilename): for oport in sorted(outports)] + ['}'] srcpackage = '' if hasattr(n, '_interface'): - pkglist = n._interface.__class__.__module__.split('.') + pkglist = n.interface.__class__.__module__.split('.') if len(pkglist) > 2: srcpackage = pkglist[2] srchierarchy = '.'.join(nodename.split('.')[1:-1]) @@ -578,8 +573,7 @@ def _get_valid_pathstr(pathstr): def expand_iterables(iterables, synchronize=False): if synchronize: return synchronize_iterables(iterables) - else: - return list(walk(list(iterables.items()))) + return list(walk(list(iterables.items()))) def count_iterables(iterables, synchronize=False): @@ -590,10 +584,7 @@ def count_iterables(iterables, synchronize=False): Otherwise, the count is the product of the iterables value list sizes. """ - if synchronize: - op = max - else: - op = lambda x, y: x * y + op = max if synchronize else lambda x, y: x * y return reduce(op, [len(func()) for _, func in list(iterables.items())]) @@ -762,14 +753,13 @@ def _merge_graphs(supergraph, nodes, subgraph, nodeid, iterables, logger.debug('Parameterization: paramstr=%s', paramstr) levels = get_levels(Gc) for n in Gc.nodes(): - """ - update parameterization of the node to reflect the location of - the output directory. For example, if the iterables along a - path of the directed graph consisted of the variables 'a' and - 'b', then every node in the path including and after the node - with iterable 'b' will be placed in a directory - _a_aval/_b_bval/. - """ + # update parameterization of the node to reflect the location of + # the output directory. For example, if the iterables along a + # path of the directed graph consisted of the variables 'a' and + # 'b', then every node in the path including and after the node + # with iterable 'b' will be placed in a directory + # _a_aval/_b_bval/. + path_length = levels[n] # enter as negative numbers so that earlier iterables with longer # path lengths get precedence in a sort @@ -821,7 +811,7 @@ def _identity_nodes(graph, include_iterables): to True. """ return [node for node in nx.topological_sort(graph) - if isinstance(node._interface, IdentityInterface) and + if isinstance(node.interface, IdentityInterface) and (include_iterables or getattr(node, 'iterables') is None)] @@ -836,7 +826,7 @@ def _remove_identity_node(graph, node): else: _propagate_root_output(graph, node, field, connections) graph.remove_nodes_from([node]) - logger.debug("Removed the identity node %s from the graph." % node) + logger.debug("Removed the identity node %s from the graph.", node) def _node_ports(graph, node): @@ -927,12 +917,12 @@ def generate_expanded_graph(graph_in): # the iterable nodes inodes = _iterable_nodes(graph_in) - logger.debug("Detected iterable nodes %s" % inodes) + logger.debug("Detected iterable nodes %s", inodes) # while there is an iterable node, expand the iterable node's # subgraphs while inodes: inode = inodes[0] - logger.debug("Expanding the iterable node %s..." % inode) + logger.debug("Expanding the iterable node %s...", inode) # the join successor nodes of the current iterable node jnodes = [node for node in graph_in.nodes() @@ -953,8 +943,8 @@ def generate_expanded_graph(graph_in): for src, dest in edges2remove: graph_in.remove_edge(src, dest) - logger.debug("Excised the %s -> %s join node in-edge." - % (src, dest)) + logger.debug("Excised the %s -> %s join node in-edge.", + src, dest) if inode.itersource: # the itersource is a (node name, fields) tuple @@ -971,8 +961,8 @@ def generate_expanded_graph(graph_in): raise ValueError("The node %s itersource %s was not found" " among the iterable predecessor nodes" % (inode, src_name)) - logger.debug("The node %s has iterable source node %s" - % (inode, iter_src)) + logger.debug("The node %s has iterable source node %s", + inode, iter_src) # look up the iterables for this particular itersource descendant # using the iterable source ancestor values as a key iterables = {} @@ -998,7 +988,7 @@ def make_field_func(*pair): else: iterables = inode.iterables.copy() inode.iterables = None - logger.debug('node: %s iterables: %s' % (inode, iterables)) + logger.debug('node: %s iterables: %s', inode, iterables) # collect the subnodes to expand subnodes = [s for s in dfs_preorder(graph_in, inode)] @@ -1006,7 +996,7 @@ def make_field_func(*pair): for s in subnodes: prior_prefix.extend(re.findall('\.(.)I', s._id)) prior_prefix = sorted(prior_prefix) - if not len(prior_prefix): + if not prior_prefix: iterable_prefix = 'a' else: if prior_prefix[-1] == 'z': @@ -1036,12 +1026,12 @@ def make_field_func(*pair): # the edge source node replicates expansions = defaultdict(list) for node in graph_in.nodes(): - for src_id, edge_data in list(old_edge_dict.items()): + for src_id in list(old_edge_dict.keys()): if node.itername.startswith(src_id): expansions[src_id].append(node) for in_id, in_nodes in list(expansions.items()): logger.debug("The join node %s input %s was expanded" - " to %d nodes." % (jnode, in_id, len(in_nodes))) + " to %d nodes.", jnode, in_id, len(in_nodes)) # preserve the node iteration order by sorting on the node id for in_nodes in list(expansions.values()): in_nodes.sort(key=lambda node: node._id) @@ -1081,12 +1071,12 @@ def make_field_func(*pair): if dest_field in slots: slot_field = slots[dest_field] connects[con_idx] = (src_field, slot_field) - logger.debug("Qualified the %s -> %s join field" - " %s as %s." % - (in_node, jnode, dest_field, slot_field)) + logger.debug( + "Qualified the %s -> %s join field %s as %s.", + in_node, jnode, dest_field, slot_field) graph_in.add_edge(in_node, jnode, **newdata) logger.debug("Connected the join node %s subgraph to the" - " expanded join point %s" % (jnode, in_node)) + " expanded join point %s", jnode, in_node) # nx.write_dot(graph_in, '%s_post.dot' % node) # the remaining iterable nodes @@ -1217,9 +1207,9 @@ def _transpose_iterables(fields, values): if val is not None: transposed[fields[idx]][key].append(val) return list(transposed.items()) - else: - return list(zip(fields, [[v for v in list(transpose) if v is not None] - for transpose in zip(*values)])) + + return list(zip(fields, [[v for v in list(transpose) if v is not None] + for transpose in zip(*values)])) def export_graph(graph_in, base_dir=None, show=False, use_execgraph=False, @@ -1265,7 +1255,7 @@ def export_graph(graph_in, base_dir=None, show=False, use_execgraph=False, res = CommandLine(cmd, terminal_output='allatonce', resource_monitor=False).run() if res.runtime.returncode: - logger.warn('dot2png: %s', res.runtime.stderr) + logger.warning('dot2png: %s', res.runtime.stderr) pklgraph = _create_dot_graph(graph, show_connectinfo, simple_form) simplefname = fname_presuffix(dotfilename, suffix='.dot', @@ -1277,7 +1267,7 @@ def export_graph(graph_in, base_dir=None, show=False, use_execgraph=False, res = CommandLine(cmd, terminal_output='allatonce', resource_monitor=False).run() if res.runtime.returncode: - logger.warn('dot2png: %s', res.runtime.stderr) + logger.warning('dot2png: %s', res.runtime.stderr) if show: pos = nx.graphviz_layout(pklgraph, prog='dot') nx.draw(pklgraph, pos) @@ -1320,7 +1310,7 @@ def walk_outputs(object): """ out = [] if isinstance(object, dict): - for key, val in sorted(object.items()): + for _, val in sorted(object.items()): if isdefined(val): out.extend(walk_outputs(val)) elif isinstance(object, (list, tuple)): @@ -1377,13 +1367,13 @@ def clean_working_directory(outputs, cwd, inputs, needed_outputs, config, for filename in needed_files: temp.extend(get_related_files(filename)) needed_files = temp - logger.debug('Needed files: %s' % (';'.join(needed_files))) - logger.debug('Needed dirs: %s' % (';'.join(needed_dirs))) + logger.debug('Needed files: %s', ';'.join(needed_files)) + logger.debug('Needed dirs: %s', ';'.join(needed_dirs)) files2remove = [] if str2bool(config['execution']['remove_unnecessary_outputs']): for f in walk_files(cwd): if f not in needed_files: - if len(needed_dirs) == 0: + if not needed_dirs: files2remove.append(f) elif not any([f.startswith(dname) for dname in needed_dirs]): files2remove.append(f) @@ -1396,7 +1386,7 @@ def clean_working_directory(outputs, cwd, inputs, needed_outputs, config, for f in walk_files(cwd): if f in input_files and f not in needed_files: files2remove.append(f) - logger.debug('Removing files: %s' % (';'.join(files2remove))) + logger.debug('Removing files: %s', ';'.join(files2remove)) for f in files2remove: os.remove(f) for key in outputs.copyable_trait_names(): @@ -1460,9 +1450,9 @@ def write_workflow_prov(graph, filename=None, format='all'): processes = [] nodes = graph.nodes() - for idx, node in enumerate(nodes): + for node in nodes: result = node.result - classname = node._interface.__class__.__name__ + classname = node.interface.__class__.__name__ _, hashval, _, _ = node.hash_exists() attrs = {pm.PROV["type"]: nipype_ns[classname], pm.PROV["label"]: '_'.join((classname, node.name)), @@ -1478,7 +1468,7 @@ def write_workflow_prov(graph, filename=None, format='all'): if idx < len(result.inputs): subresult.inputs = result.inputs[idx] if result.outputs: - for key, value in list(result.outputs.items()): + for key in list(result.outputs.keys()): values = getattr(result.outputs, key) if isdefined(values) and idx < len(values): subresult.outputs[key] = values[idx] @@ -1552,9 +1542,9 @@ def write_workflow_resources(graph, filename=None, append=None): with open(filename, 'r' if PY3 else 'rb') as rsf: big_dict = json.load(rsf) - for idx, node in enumerate(graph.nodes()): + for _, node in enumerate(graph.nodes()): nodename = node.fullname - classname = node._interface.__class__.__name__ + classname = node.interface.__class__.__name__ params = '' if node.parameterization: From 172551584ed0808250e0da073adebac78779fc54 Mon Sep 17 00:00:00 2001 From: Oscar Esteban Date: Sun, 7 Jan 2018 12:04:30 -0800 Subject: [PATCH 631/643] finishing pe.nodes cleanup --- nipype/pipeline/engine/nodes.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/nipype/pipeline/engine/nodes.py b/nipype/pipeline/engine/nodes.py index 468bb4a682..cfffbe4685 100644 --- a/nipype/pipeline/engine/nodes.py +++ b/nipype/pipeline/engine/nodes.py @@ -260,7 +260,7 @@ def output_dir(self): return self._output_dir def set_input(self, parameter, val): - """ Set interface input value""" + """Set interface input value""" logger.debug('[Node] %s - setting input %s = %s', self.name, parameter, to_str(val)) setattr(self.inputs, parameter, deepcopy(val)) @@ -270,7 +270,7 @@ def get_output(self, parameter): return getattr(self.result.outputs, parameter, None) def help(self): - """ Print interface help""" + """Print interface help""" self._interface.help() def hash_exists(self, updatehash=False): @@ -573,7 +573,7 @@ def _run_command(self, execute, copyfiles=True): outdir = self.output_dir() if copyfiles: - self._originputs = deepcopy(self.interface.inputs) + self._originputs = deepcopy(self._interface.inputs) self._copyfiles_to_wd(execute=execute) message = '[Node] Running "%s" ("%s.%s")' @@ -615,7 +615,7 @@ def _run_command(self, execute, copyfiles=True): return result def _copyfiles_to_wd(self, execute=True, linksonly=False): - """ copy files over and change the inputs""" + """copy files over and change the inputs""" if not hasattr(self._interface, '_get_filecopy_info'): # Nothing to be done return @@ -629,7 +629,7 @@ def _copyfiles_to_wd(self, execute=True, linksonly=False): outdir = op.join(outdir, '_tempinput') makedirs(outdir, exist_ok=True) - for info in self.interface._get_filecopy_info(): + for info in self._interface._get_filecopy_info(): files = self.inputs.get().get(info['key']) if not isdefined(files) or not files: continue @@ -966,8 +966,8 @@ def _create_dynamic_traits(self, basetraits, fields=None, nitems=None): return output def set_input(self, parameter, val): - """ Set interface input value or nodewrapper attribute - + """ + Set interface input value or nodewrapper attribute Priority goes to interface. """ logger.debug('setting nodelevel(%s) input %s = %s', @@ -983,7 +983,7 @@ def _set_mapnode_input(self, name, newvalue): setattr(self._interface.inputs, name, newvalue) def _get_hashval(self): - """ Compute hash including iterfield lists.""" + """Compute hash including iterfield lists.""" self._get_inputs() self._check_iterfield() hashinputs = deepcopy(self._interface.inputs) @@ -1017,8 +1017,8 @@ def inputs(self): @property def outputs(self): - if self.interface._outputs(): - return Bunch(self.interface._outputs().get()) + if self._interface._outputs(): + return Bunch(self._interface._outputs().get()) def _make_nodes(self, cwd=None): if cwd is None: From 4e0f6e1b9a1f1ac853eec6c69e9acc11d4409934 Mon Sep 17 00:00:00 2001 From: Oscar Esteban Date: Sun, 7 Jan 2018 12:12:50 -0800 Subject: [PATCH 632/643] finishing pe.nodes - unfinished hashfiles --- nipype/pipeline/engine/nodes.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/nipype/pipeline/engine/nodes.py b/nipype/pipeline/engine/nodes.py index cfffbe4685..86a46531d0 100644 --- a/nipype/pipeline/engine/nodes.py +++ b/nipype/pipeline/engine/nodes.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # -*- coding: utf-8 -*- # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: @@ -290,7 +289,9 @@ def hash_exists(self, updatehash=False): if op.exists(outdir): # Find previous hashfiles - hashfiles = glob(op.join(outdir, '_0x*.json')) + globhashes = glob(op.join(outdir, '_0x*.json')) + unfinished = [path for path in globhashes if path.endswith('_unfinished.json')] + hashfiles = list(set(globhashes) - set(unfinished)) if len(hashfiles) > 1: for rmfile in hashfiles: os.remove(rmfile) @@ -300,9 +301,6 @@ def hash_exists(self, updatehash=False): 'that the ``base_dir`` for this node went stale. Please re-run the ' 'workflow.' % len(hashfiles)) - # Find unfinished hashfiles and error if any - unfinished = glob(op.join(outdir, '_0x*_unfinished.json')) - # This should not happen, but clean up and break if so. if unfinished and updatehash: for rmfile in unfinished: @@ -433,7 +431,7 @@ def run(self, updatehash=False): except OSError: # Changing back to cwd is probably not necessary # but this makes sure there's somewhere to change to. - cwd = os.path.split(outdir)[0] + cwd = op.split(outdir)[0] logger.warning('Current folder "%s" does not exist, changing to "%s" instead.', os.getenv('PWD', 'unknown'), cwd) From 396aa1e9c89de2eba7418598b6a6a190ef9128c0 Mon Sep 17 00:00:00 2001 From: Oscar Esteban Date: Sun, 7 Jan 2018 14:26:58 -0800 Subject: [PATCH 633/643] fix Bunch does not have keys() --- nipype/pipeline/engine/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nipype/pipeline/engine/utils.py b/nipype/pipeline/engine/utils.py index 213a8aaa2c..61937faac3 100644 --- a/nipype/pipeline/engine/utils.py +++ b/nipype/pipeline/engine/utils.py @@ -1468,7 +1468,7 @@ def write_workflow_prov(graph, filename=None, format='all'): if idx < len(result.inputs): subresult.inputs = result.inputs[idx] if result.outputs: - for key in list(result.outputs.keys()): + for key, _ in list(result.outputs.items()): values = getattr(result.outputs, key) if isdefined(values) and idx < len(values): subresult.outputs[key] = values[idx] From bb905b9214b2c01d10e86a2fccfb3fd9c8c07e2d Mon Sep 17 00:00:00 2001 From: Oscar Esteban Date: Sun, 7 Jan 2018 17:55:37 -0800 Subject: [PATCH 634/643] [skip ci] fix ordering as per @djarecka --- nipype/pipeline/engine/nodes.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/nipype/pipeline/engine/nodes.py b/nipype/pipeline/engine/nodes.py index 86a46531d0..52708d42e0 100644 --- a/nipype/pipeline/engine/nodes.py +++ b/nipype/pipeline/engine/nodes.py @@ -394,16 +394,17 @@ def run(self, updatehash=False): if not force_run and str2bool(self.config['execution']['stop_on_first_rerun']): raise Exception('Cannot rerun when "stop_on_first_rerun" is set to True') - # Hashfile while running, remove if exists already - hashfile_unfinished = op.join( - outdir, '_0x%s_unfinished.json' % hashvalue) + # Remove hashfile if it exists at this point (re-running) if op.exists(hashfile): os.remove(hashfile) + # Hashfile while running + hashfile_unfinished = op.join( + outdir, '_0x%s_unfinished.json' % hashvalue) + # Delete directory contents if this is not a MapNode or can't resume rm_outdir = not isinstance(self, MapNode) and not ( self._interface.can_resume and op.isfile(hashfile_unfinished)) - if rm_outdir: emptydirs(outdir, noexist_ok=True) else: From 4e4c670fff7b1f3da8fd892b2f679a227c3a7133 Mon Sep 17 00:00:00 2001 From: Oscar Esteban Date: Sun, 7 Jan 2018 18:00:35 -0800 Subject: [PATCH 635/643] [skip ci] Extend docstring as per @djarecka --- nipype/pipeline/engine/nodes.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nipype/pipeline/engine/nodes.py b/nipype/pipeline/engine/nodes.py index 52708d42e0..ed1fde9d28 100644 --- a/nipype/pipeline/engine/nodes.py +++ b/nipype/pipeline/engine/nodes.py @@ -350,7 +350,9 @@ def run(self, updatehash=False): ---------- updatehash: boolean - Update the hash stored in the output directory + When the hash stored in the output directory as a result of a previous run + does not match that calculated for this execution, updatehash=True only + updates the hash without re-running. """ if self.config is None: From a80c9b1bd3e041d2d7eab097c782e0ee2ccbc3fd Mon Sep 17 00:00:00 2001 From: Oscar Esteban Date: Sun, 7 Jan 2018 18:11:30 -0800 Subject: [PATCH 636/643] [skip ci] Update CHANGES --- CHANGES | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES b/CHANGES index 061d161a06..01a09b735a 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,7 @@ Upcoming release (0.14.1) ================ +* MAINT: Cleaning / simplify ``Node`` (https://github.com/nipy/nipype/pull/#2325) 0.14.0 (November 29, 2017) ========================== From 6f7ae7145c16b93a1977a7efaec8c9bbfe5307ab Mon Sep 17 00:00:00 2001 From: Michael Notter Date: Mon, 8 Jan 2018 10:59:35 +0100 Subject: [PATCH 637/643] Reset change to make hash assertion happy Reset change to make hash assertion at https://github.com/nipy/nipype/blob/master/nipype/interfaces/base/tests/test_support.py#L60 happy. From 132bd89e1b324e38755160b5b461a66cf679dd8f Mon Sep 17 00:00:00 2001 From: miykael Date: Mon, 8 Jan 2018 11:33:37 +0100 Subject: [PATCH 638/643] FIX: Reset change to make hash assertion happy --- nipype/testing/data/realign_json.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nipype/testing/data/realign_json.json b/nipype/testing/data/realign_json.json index 5bf1936476..12a5b41a0a 100644 --- a/nipype/testing/data/realign_json.json +++ b/nipype/testing/data/realign_json.json @@ -31,4 +31,4 @@ "write_mask": null, "write_which": null, "write_wrap": null -} +} \ No newline at end of file From 974ae093adb9c9c212e7b27231e08d8991988a84 Mon Sep 17 00:00:00 2001 From: miykael Date: Mon, 8 Jan 2018 12:30:06 +0100 Subject: [PATCH 639/643] FIX: updates hash to accept newline in realign_json.json --- nipype/interfaces/base/tests/test_support.py | 2 +- nipype/testing/data/realign_json.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nipype/interfaces/base/tests/test_support.py b/nipype/interfaces/base/tests/test_support.py index 733501f5fd..260a5eb882 100644 --- a/nipype/interfaces/base/tests/test_support.py +++ b/nipype/interfaces/base/tests/test_support.py @@ -57,7 +57,7 @@ def test_bunch_hash(): otherthing='blue', yat=True) newbdict, bhash = b._get_bunch_hash() - assert bhash == 'ddcc7b4ec5675df8cf317a48bd1857fa' + assert bhash == 'd1f46750044c3de102efc847720fc35f' # Make sure the hash stored in the json file for `infile` is correct. jshash = md5() with open(json_pth, 'r') as fp: diff --git a/nipype/testing/data/realign_json.json b/nipype/testing/data/realign_json.json index 12a5b41a0a..5bf1936476 100644 --- a/nipype/testing/data/realign_json.json +++ b/nipype/testing/data/realign_json.json @@ -31,4 +31,4 @@ "write_mask": null, "write_which": null, "write_wrap": null -} \ No newline at end of file +} From c31d7cd09d176224e9b5407a93bb1a73eab85190 Mon Sep 17 00:00:00 2001 From: Matteo Mancini Date: Mon, 8 Jan 2018 11:48:08 -0500 Subject: [PATCH 640/643] Minor fix (test) --- .../afni/tests/test_auto_TCatSubBrick.py | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 nipype/interfaces/afni/tests/test_auto_TCatSubBrick.py diff --git a/nipype/interfaces/afni/tests/test_auto_TCatSubBrick.py b/nipype/interfaces/afni/tests/test_auto_TCatSubBrick.py new file mode 100644 index 0000000000..58fc2108e3 --- /dev/null +++ b/nipype/interfaces/afni/tests/test_auto_TCatSubBrick.py @@ -0,0 +1,49 @@ +# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT +from __future__ import unicode_literals +from ..utils import TCatSubBrick + + +def test_TCatSubBrick_inputs(): + input_map = dict(args=dict(argstr='%s', + ), + environ=dict(nohash=True, + usedefault=True, + ), + ignore_exception=dict(deprecated='1.0.0', + nohash=True, + usedefault=True, + ), + in_files=dict(argstr='%s%s ...', + copyfile=False, + mandatory=True, + position=-1, + ), + num_threads=dict(nohash=True, + usedefault=True, + ), + out_file=dict(argstr='-prefix %s', + genfile=True, + ), + outputtype=dict(), + rlt=dict(argstr='-rlt%s', + position=1, + ), + terminal_output=dict(deprecated='1.0.0', + nohash=True, + ), + ) + inputs = TCatSubBrick.input_spec() + + for key, metadata in list(input_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(inputs.traits()[key], metakey) == value + + +def test_TCatSubBrick_outputs(): + output_map = dict(out_file=dict(), + ) + outputs = TCatSubBrick.output_spec() + + for key, metadata in list(output_map.items()): + for metakey, value in list(metadata.items()): + assert getattr(outputs.traits()[key], metakey) == value From ee06cc858383382c53ce4c35adb61f3280709cc2 Mon Sep 17 00:00:00 2001 From: Dorota Jarecka Date: Tue, 9 Jan 2018 05:07:51 -0500 Subject: [PATCH 641/643] updating the auto test --- .../interfaces/diffusion_toolkit/tests/test_auto_DTITracker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nipype/interfaces/diffusion_toolkit/tests/test_auto_DTITracker.py b/nipype/interfaces/diffusion_toolkit/tests/test_auto_DTITracker.py index db5c48c1c9..0a0a66ffb1 100644 --- a/nipype/interfaces/diffusion_toolkit/tests/test_auto_DTITracker.py +++ b/nipype/interfaces/diffusion_toolkit/tests/test_auto_DTITracker.py @@ -48,7 +48,7 @@ def test_DTITracker_inputs(): ), primary_vector=dict(argstr='-%s', ), - random_seed=dict(argstr='-rseed', + random_seed=dict(argstr='-rseed %d', ), step_length=dict(argstr='-l %f', ), From 00ef467b48066c59c2e2cd0a7b9cd850dcb1fc50 Mon Sep 17 00:00:00 2001 From: Oscar Esteban Date: Wed, 10 Jan 2018 11:23:28 -0800 Subject: [PATCH 642/643] [HOTFIX] Incorrect call to warnings.warn --- nipype/utils/config.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nipype/utils/config.py b/nipype/utils/config.py index c02be71f64..15dfe0f447 100644 --- a/nipype/utils/config.py +++ b/nipype/utils/config.py @@ -123,8 +123,8 @@ def cwd(self): try: self._cwd = os.getcwd() except OSError: - warn('Trying to run Nipype from a nonexistent directory "%s".', - os.getenv('PWD', 'unknown')) + warn('Trying to run Nipype from a nonexistent directory "{}".'.format( + os.getenv('PWD', 'unknown')), RuntimeWarning) raise return self._cwd From 3fedaabf20a75690e998067e7f5985fec33ffa6e Mon Sep 17 00:00:00 2001 From: mathiasg Date: Wed, 10 Jan 2018 16:43:08 -0500 Subject: [PATCH 643/643] fix: randomise autotest --- nipype/interfaces/fsl/tests/test_auto_Randomise.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nipype/interfaces/fsl/tests/test_auto_Randomise.py b/nipype/interfaces/fsl/tests/test_auto_Randomise.py index bcf65a0419..432455e4a8 100644 --- a/nipype/interfaces/fsl/tests/test_auto_Randomise.py +++ b/nipype/interfaces/fsl/tests/test_auto_Randomise.py @@ -10,9 +10,9 @@ def test_Randomise_inputs(): position=1, usedefault=True, ), - c_thresh=dict(argstr='-c %.2f', + c_thresh=dict(argstr='-c %.1f', ), - cm_thresh=dict(argstr='-C %.2f', + cm_thresh=dict(argstr='-C %.1f', ), demean=dict(argstr='-D', ),