@@ -239,7 +239,20 @@ def version(self):
239
239
240
240
241
241
def format_help (cls ):
242
- """Prints help text of a Nipype interface"""
242
+ """
243
+ Prints help text of a Nipype interface
244
+
245
+ >>> from nipype.interfaces.afni import GCOR
246
+ >>> GCOR.help() # doctest: +ELLIPSIS, +NORMALIZE_WHITESPACE
247
+ Wraps the executable command ``@compute_gcor``.
248
+ <BLANKLINE>
249
+ Computes the average correlation between every voxel
250
+ and ever other voxel, over any give mask.
251
+ <BLANKLINE>
252
+ <BLANKLINE>
253
+ For complete details, ...
254
+
255
+ """
243
256
from ...utils .misc import trim
244
257
245
258
docstring = []
@@ -260,7 +273,14 @@ def format_help(cls):
260
273
261
274
262
275
def _inputs_help (cls ):
263
- """Prints description for input parameters"""
276
+ r"""
277
+ Prints description for input parameters
278
+
279
+ >>> from nipype.interfaces.afni import GCOR
280
+ >>> _inputs_help(GCOR) # doctest: +ELLIPSIS, +NORMALIZE_WHITESPACE
281
+ ['Inputs::', '', '\t[Mandatory]', '\tin_file: (an existing file name)', ...
282
+
283
+ """
264
284
helpstr = ['Inputs::' , '' ]
265
285
mandatory_keys = []
266
286
optional_items = []
@@ -286,7 +306,14 @@ def _inputs_help(cls):
286
306
287
307
288
308
def _outputs_help (cls ):
289
- """Prints description for output parameters"""
309
+ r"""
310
+ Prints description for output parameters
311
+
312
+ >>> from nipype.interfaces.afni import GCOR
313
+ >>> _outputs_help(GCOR) # doctest: +ELLIPSIS, +NORMALIZE_WHITESPACE
314
+ ['Outputs::', '', '\tout: (a float)\n\t\tglobal correlation value']
315
+
316
+ """
290
317
helpstr = ['Outputs::' , '' , '\t None' ]
291
318
if cls .output_spec :
292
319
outputs = cls .output_spec ()
@@ -346,13 +373,13 @@ def _get_trait_desc(inputs, name, spec):
346
373
pos = spec .position
347
374
if pos is not None :
348
375
manhelpstr += wrap (
349
- 'flag: %s , position: %s' % (argstr , pos ),
376
+ 'argument: ``%s`` , position: %s' % (argstr , pos ),
350
377
HELP_LINEWIDTH ,
351
378
initial_indent = '\t \t ' ,
352
379
subsequent_indent = '\t \t ' )
353
380
else :
354
381
manhelpstr += wrap (
355
- 'flag: %s ' % argstr ,
382
+ 'argument: ``%s`` ' % argstr ,
356
383
HELP_LINEWIDTH ,
357
384
initial_indent = '\t \t ' ,
358
385
subsequent_indent = '\t \t ' )
0 commit comments