Skip to content

Commit cb69df5

Browse files
committed
sty+tst: fix doc styles and tests
1 parent f876c37 commit cb69df5

16 files changed

+38
-49
lines changed

doc/documentation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Previous versions: `0.12.0 <http://nipype.readthedocs.io/en/0.12.0/>`_ `0.11.0
2929
:maxdepth: 2
3030

3131
users/index
32-
32+
3333
.. toctree::
3434
:maxdepth: 1
3535

doc/users/config_file.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ Execution
145145
crashfiles allow interactive debugging and rerunning of nodes, while text
146146
crashfiles allow portability across machines and shorter load time.
147147
(possible values: ``pklz`` and ``txt``; default value: ``pklz``)
148-
148+
149149
Example
150150
~~~~~~~
151151

nipype/interfaces/afni/preprocess.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2417,7 +2417,7 @@ class QwarpPlusMinusOutputSpec(TraitedSpec):
24172417

24182418

24192419
class QwarpPlusMinus(CommandLine):
2420-
"""A version of 3dQwarp for performing field susceptibility correction
2420+
"""A version of 3dQwarp for performing field susceptibility correction
24212421
using two images with opposing phase encoding directions.
24222422
24232423
For complete details, see the `3dQwarp Documentation.
@@ -2434,7 +2434,7 @@ class QwarpPlusMinus(CommandLine):
24342434
>>> qwarp.cmdline # doctest: +ALLOW_UNICODE
24352435
'3dQwarp -prefix Qwarp.nii.gz -plusminus -base sub-01_dir-RL_epi.nii.gz -nopadWARP -source sub-01_dir-LR_epi.nii.gz'
24362436
>>> res = warp.run() # doctest: +SKIP
2437-
2437+
24382438
"""
24392439
_cmd = '3dQwarp -prefix Qwarp.nii.gz -plusminus'
24402440
input_spec = QwarpPlusMinusInputSpec

nipype/interfaces/afni/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -695,7 +695,7 @@ class FWHMx(AFNICommandBase):
695695
_cmd = '3dFWHMx'
696696
input_spec = FWHMxInputSpec
697697
output_spec = FWHMxOutputSpec
698-
698+
699699
references_ = [{'entry': BibTeX('@article{CoxReynoldsTaylor2016,'
700700
'author={R.W. Cox, R.C. Reynolds, and P.A. Taylor},'
701701
'title={AFNI and clustering: false positive rates redux},'

nipype/interfaces/base.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,10 @@ def _generate_handlers(self):
386386
"""Find all traits with the 'xor' metadata and attach an event
387387
handler to them.
388388
"""
389+
has_xor = dict(xor=lambda t: t is not None)
390+
xors = self.trait_names(**has_xor)
391+
for elem in xors:
392+
self.on_trait_change(self._xor_warn, elem)
389393
has_deprecation = dict(deprecated=lambda t: t is not None)
390394
deprecated = self.trait_names(**has_deprecation)
391395
for elem in deprecated:

nipype/interfaces/fsl/utils.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class RobustFOVInputSpec(FSLCommandInputSpec):
7373
brainsize = traits.Int(desc=('size of brain in z-dimension (default '
7474
'170mm/150mm)'),
7575
argstr='-b %d')
76-
out_transform = File(desc=("Transformation matrix in_file to out_roi "
76+
out_transform = File(desc=("Transformation matrix in_file to out_roi "
7777
"output name"),
7878
argstr="-m %s",
7979
name_source=['in_file'], hash_files=False,
@@ -83,17 +83,17 @@ class RobustFOVInputSpec(FSLCommandInputSpec):
8383
class RobustFOVOutputSpec(TraitedSpec):
8484
out_roi = File(exists=True, desc="ROI volume output name")
8585
out_transform = File(exists=True,
86-
desc=("Transformation matrix in_file to out_roi "
86+
desc=("Transformation matrix in_file to out_roi "
8787
"output name"))
8888

8989

9090
class RobustFOV(FSLCommand):
9191
"""Automatically crops an image removing lower head and neck.
92-
93-
Interface is stable 5.0.0 to 5.0.9, but default brainsize changed from
92+
93+
Interface is stable 5.0.0 to 5.0.9, but default brainsize changed from
9494
150mm to 170mm.
9595
"""
96-
96+
9797
_cmd = 'robustfov'
9898
input_spec = RobustFOVInputSpec
9999
output_spec = RobustFOVOutputSpec

nipype/interfaces/niftyseg/em.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ class EM(NiftySegCommand):
117117
it's simplest form, it takes in one 2D or 3D image and segments it in n
118118
classes.
119119
120-
`Source code <http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg>`_ |
120+
`Source code <http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg>`_ |
121121
`Documentation <http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg_documentation>`_
122122
123123
Examples
@@ -127,7 +127,7 @@ class EM(NiftySegCommand):
127127
>>> node.inputs.in_file = 'im1.nii'
128128
>>> node.inputs.no_prior = 4
129129
>>> node.cmdline # doctest: +ALLOW_UNICODE
130-
'seg_EM -in im1.nii -nopriors 4 -bc_out im1_bc_em.nii.gz
130+
'seg_EM -in im1.nii -nopriors 4 -bc_out im1_bc_em.nii.gz
131131
-out im1_em.nii.gz -out_outlier im1_outlier_em.nii.gz'
132132
133133
"""

nipype/interfaces/niftyseg/label_fusion.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ class LabelFusion(NiftySegCommand):
133133
FusedSegmentation.nii -STEPS 2 15 TargetImage.nii \
134134
4D_Propagated_Intensities.nii
135135
136-
`Source code <http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg>`_ |
136+
`Source code <http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg>`_ |
137137
`Documentation <http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg_documentation>`_
138138
139139
Examples
@@ -278,7 +278,6 @@ class CalcTopNCCInputSpec(CommandLineInputSpec):
278278

279279
mask_file = File(argstr='-mask %s',
280280
exists=True,
281-
mandatory=False,
282281
desc='Filename of the ROI for label fusion')
283282

284283

nipype/interfaces/niftyseg/lesions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ class FillLesions(NiftySegCommand):
9999
100100
Fill all the masked lesions with WM intensity average.
101101
102-
`Source code <http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg>`_ |
102+
`Source code <http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg>`_ |
103103
`Documentation <http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg_documentation>`_
104104
105105
Examples

nipype/interfaces/niftyseg/maths.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ class UnaryMaths(MathsCommand):
103103
104104
Interface to use any unary mathematical operations that can be performed
105105
with the seg_maths command-line program. See below for those operations::
106-
106+
107107
-sqrt Square root of the image.
108108
-exp Exponential root of the image.
109109
-log Log of the image.
@@ -134,7 +134,7 @@ class UnaryMaths(MathsCommand):
134134
-4to5 Flip the 4th and 5th dimension.
135135
-range Reset the image range to the min max
136136
137-
`Source code <http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg>`_ |
137+
`Source code <http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg>`_ |
138138
`Documentation <http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg_documentation>`_
139139
140140
Examples
@@ -217,7 +217,7 @@ class BinaryMaths(MathsCommand):
217217
218218
Interface to use any binary mathematical operations that can be performed
219219
with the seg_maths command-line program. See below for those operations::
220-
220+
221221
-mul <float/file> Multiply image <float> value or by other image.
222222
-div <float/file> Divide image by <float> or by other image.
223223
-add <float/file> Add image by <float> or by other image.
@@ -249,7 +249,7 @@ class BinaryMaths(MathsCommand):
249249
-splitinter <x/y/z> Split interleaved slices in direction <x/y/z>
250250
into separate time points
251251
252-
`Source code <http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg>`_ |
252+
`Source code <http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg>`_ |
253253
`Documentation <http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg_documentation>`_
254254
255255
Examples
@@ -349,7 +349,7 @@ class BinaryMathsInteger(MathsCommand):
349349
350350
Interface to use any integer mathematical operations that can be performed
351351
with the seg_maths command-line program. See below for those operations::
352-
352+
353353
(requiring integer values)
354354
-equal <int> Get voxels equal to <int>
355355
-dil <int> Dilate the image <int> times (in voxels).
@@ -359,7 +359,7 @@ class BinaryMathsInteger(MathsCommand):
359359
-pad <int> Pad <int> voxels with NaN value around each 3D
360360
volume.
361361
362-
`Source code <http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg>`_ |
362+
`Source code <http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg>`_ |
363363
`Documentation <http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg_documentation>`_
364364
365365
Examples
@@ -437,15 +437,15 @@ class TupleMaths(MathsCommand):
437437
438438
Interface to use any tuple mathematical operations that can be performed
439439
with the seg_maths command-line program. See below for those operations::
440-
440+
441441
-lncc <file> <std> Local CC between current img and <file>
442442
on a kernel with <std>
443443
-lssd <file> <std> Local SSD between current img and <file>
444444
on a kernel with <std>
445445
-lltsnorm <file_norm> <float> Linear LTS normalisation assuming
446446
<float> percent outliers
447447
448-
`Source code <http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg>`_ |
448+
`Source code <http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg>`_ |
449449
`Documentation <http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg_documentation>`_
450450
451451
Examples
@@ -505,11 +505,11 @@ class Merge(MathsCommand):
505505
506506
Interface to use the merge operation that can be performed
507507
with the seg_maths command-line program. See below for this option::
508-
508+
509509
-merge <i> <d> <files> Merge <i> images and the working image in the
510510
<d> dimension
511511
512-
`Source code <http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg>`_ |
512+
`Source code <http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg>`_ |
513513
`Documentation <http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg_documentation>`_
514514
515515
Examples

0 commit comments

Comments
 (0)