Skip to content

Commit e015f83

Browse files
committed
fix: make check-before-commit
1 parent 18a7fe5 commit e015f83

File tree

15 files changed

+126
-52
lines changed

15 files changed

+126
-52
lines changed

doc/users/resource_sched_profiler.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,17 +144,17 @@ The pandas_ Python package is required to use this feature.
144144
from nipype.pipeline.plugins.callback_log import log_nodes_cb
145145
args_dict = {'n_procs' : 8, 'memory_gb' : 10, 'status_callback' : log_nodes_cb}
146146
workflow.run(plugin='MultiProc', plugin_args=args_dict)
147-
147+
148148
# ...workflow finishes and writes callback log to '/home/user/run_stats.log'
149-
149+
150150
from nipype.utils.draw_gantt_chart import generate_gantt_chart
151151
generate_gantt_chart('/home/user/run_stats.log', cores=8)
152152
# ...creates gantt chart in '/home/user/run_stats.log.html'
153153

154154
The ``generate_gantt_chart`` function will create an html file that can be viewed
155155
in a browser. Below is an example of the gantt chart displayed in a web browser.
156156
Note that when the cursor is hovered over any particular node bubble or resource
157-
bubble, some additional information is shown in a pop-up.
157+
bubble, some additional information is shown in a pop-up.
158158

159159
* - .. image:: images/gantt_chart.png
160160
:width: 100 %

nipype/interfaces/afni/preprocess.py

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,7 @@ class DegreeCentralityInputSpec(CentralityInputSpec):
543543
argstr='-sparsity %f')
544544

545545
oned_file = traits.Str(desc='output filepath to text dump of correlation matrix',
546-
argstr='-out1D %s', mandatory=False)
546+
argstr='-out1D %s')
547547

548548

549549
class DegreeCentralityOutputSpec(AFNICommandOutputSpec):
@@ -567,7 +567,7 @@ class DegreeCentrality(AFNICommand):
567567
========
568568
569569
>>> from nipype.interfaces import afni as afni
570-
>>> degree = afni.DegreeCentrality()
570+
>>> degree = afni.DegreeCentrality()
571571
>>> degree.inputs.in_file = 'functional.nii'
572572
>>> degree.inputs.mask = 'mask.nii'
573573
>>> degree.inputs.sparsity = 1 # keep the top one percent of connections
@@ -1889,11 +1889,15 @@ class SegInputSpec(CommandLineInputSpec):
18891889
exists=True,
18901890
copyfile=True)
18911891

1892-
mask = traits.Str(desc='only non-zero voxels in mask are analyzed. mask can either be a dataset or the string \'AUTO\' which would use AFNI\'s automask function to create the mask.',
1893-
argstr='-mask %s',
1894-
position=-2,
1895-
mandatory=True,
1896-
exists=True)
1892+
mask = traits.Either(traits.Enum('AUTO'),
1893+
File(exists=True),
1894+
desc=('only non-zero voxels in mask are analyzed. '
1895+
'mask can either be a dataset or the string '
1896+
'"AUTO" which would use AFNI\'s automask '
1897+
'function to create the mask.'),
1898+
argstr='-mask %s',
1899+
position=-2,
1900+
mandatory=True)
18971901

18981902
blur_meth = traits.Enum('BFT', 'BIM',
18991903
argstr='-blur_meth %s',

nipype/interfaces/afni/tests/test_auto_DegreeCentrality.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ def test_DegreeCentrality_inputs():
2424
mask=dict(argstr='-mask %s',
2525
),
2626
oned_file=dict(argstr='-out1D %s',
27-
mandatory=False,
2827
),
2928
out_file=dict(argstr='-prefix %s',
3029
name_source=['in_file'],

nipype/interfaces/afni/tests/test_auto_Seg.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ def test_Seg_inputs():
3030
main_N=dict(argstr='-main_N %d',
3131
),
3232
mask=dict(argstr='-mask %s',
33-
exists=True,
3433
mandatory=True,
3534
position=-2,
3635
),

nipype/interfaces/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1197,7 +1197,7 @@ def _read(self, drain):
11971197
# Get number of threads for process
11981198
def _get_num_threads(proc):
11991199
"""Function to get the number of threads a process is using
1200-
NOTE: If
1200+
NOTE: If
12011201
12021202
Parameters
12031203
----------

nipype/interfaces/freesurfer/tests/test_auto_MRIsConvert.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ def test_MRIsConvert_inputs():
5454
),
5555
terminal_output=dict(nohash=True,
5656
),
57+
to_scanner=dict(argstr='--to-scanner',
58+
),
59+
to_tkr=dict(argstr='--to-tkr',
60+
),
5761
vertex=dict(argstr='-v',
5862
),
5963
xyz_ascii=dict(argstr='-a',

nipype/interfaces/freesurfer/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -857,7 +857,7 @@ class MRIsConvertInputSpec(FSTraitedSpec):
857857
"ICO: .ico, .tri GEO: .geo STL: .stl VTK: .vtk GIFTI: .gii MGH surface-encoded 'volume': .mgh, .mgz")
858858
to_scanner = traits.Bool(argstr="--to-scanner",
859859
desc="convert coordinates from native FS (tkr) coords to scanner coords")
860-
to_tkr = traits.Bool(agrstr="--to-tkr",
860+
to_tkr = traits.Bool(argstr="--to-tkr",
861861
desc="convert coordinates from scanner coords to native FS (tkr) coords")
862862

863863

nipype/interfaces/fsl/tests/test_Level1Design.py

Lines changed: 0 additions & 20 deletions
This file was deleted.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import os
2+
from nose.tools import assert_true
3+
from ...base import Undefined
4+
from ..model import Level1Design
5+
6+
7+
def test_level1design():
8+
l = Level1Design()
9+
runinfo = dict(cond=[{'name': 'test_condition', 'onset': [0, 10],
10+
'duration':[10, 10]}],regress=[])
11+
runidx = 0
12+
contrasts = Undefined
13+
usetd = False
14+
do_tempfilter = False
15+
for key, val in [('hrf', 3), ('dgamma', 3), ('gamma', 2), ('none', 0)]:
16+
output_num, output_txt = Level1Design._create_ev_files(l, os.getcwd(),
17+
runinfo, runidx,
18+
usetd, contrasts,
19+
do_tempfilter,
20+
key)
21+
yield assert_true, "set fmri(convolve1) {0}".format(val) in output_txt

nipype/interfaces/semtools/diffusion/tests/test_auto_DWIConvert.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44

55

66
def test_DWIConvert_inputs():
7-
input_map = dict(args=dict(argstr='%s',
7+
input_map = dict(allowLossyConversion=dict(argstr='--allowLossyConversion ',
8+
),
9+
args=dict(argstr='%s',
810
),
911
conversionMode=dict(argstr='--conversionMode %s',
1012
),
@@ -45,16 +47,14 @@ def test_DWIConvert_inputs():
4547
),
4648
terminal_output=dict(nohash=True,
4749
),
50+
transposeInputBVectors=dict(argstr='--transposeInputBVectors ',
51+
),
4852
useBMatrixGradientDirections=dict(argstr='--useBMatrixGradientDirections ',
4953
),
5054
useIdentityMeaseurementFrame=dict(argstr='--useIdentityMeaseurementFrame ',
5155
),
5256
writeProtocolGradientsFile=dict(argstr='--writeProtocolGradientsFile ',
5357
),
54-
allowLossyConversion=dict(argstr='--allowLossyConversion ',
55-
),
56-
transposeInputBVectors=dict(argstr='--transposeInputBVectors ',
57-
),
5858
)
5959
inputs = DWIConvert.input_spec()
6060

0 commit comments

Comments
 (0)