Skip to content

Commit 9898fbf

Browse files
committed
fix: many miscellaneous fixes - mostly styles - but also for doc building the ipython extension has moved to ipython
1 parent d5419b5 commit 9898fbf

File tree

8 files changed

+109
-40
lines changed

8 files changed

+109
-40
lines changed

doc/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
'numpy_ext.numpydoc',
4040
'matplotlib.sphinxext.plot_directive',
4141
'matplotlib.sphinxext.only_directives',
42-
'matplotlib.sphinxext.ipython_directive',
42+
'IPython.sphinxext.ipython_directive',
4343
'ipython_console_highlighting'
4444
]
4545

nipype/interfaces/afni/preprocess.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1935,7 +1935,7 @@ def _overload_extension(self, value):
19351935

19361936
def _gen_filename(self, name):
19371937
return os.path.abspath(super(AFNItoNIFTI, self)._gen_filename(name))
1938-
1938+
19391939
class EvalInputSpec(AFNICommandInputSpec):
19401940
in_file_a = File(desc='input file to 1deval',
19411941
argstr='-a %s', position=0, mandatory=True, exists=True)
@@ -1955,15 +1955,15 @@ class EvalInputSpec(AFNICommandInputSpec):
19551955
requires=['start_idx'])
19561956
single_idx = traits.Int(desc='volume index for in_file_a')
19571957
other = File(desc='other options', argstr='')
1958-
1958+
19591959
class Eval(AFNICommand):
19601960
"""Evaluates an expression that may include columns of data from one or more text files
19611961
19621962
see AFNI Documentation: <http://afni.nimh.nih.gov/pub/dist/doc/program_help/1deval.html>
1963-
1963+
19641964
Examples
19651965
========
1966-
1966+
19671967
>>> from nipype.interfaces import afni as afni
19681968
>>> eval = afni.Eval()
19691969
>>> eval.inputs.in_file_a = 'seed.1D'
@@ -1996,7 +1996,7 @@ def _parse_inputs(self, skip=None):
19961996
"""
19971997
return super(Eval, self)._parse_inputs(
19981998
skip=('start_idx', 'stop_idx', 'out1D', 'other'))
1999-
1999+
20002000
class MeansInputSpec(AFNICommandInputSpec):
20012001
in_file_a = File(desc='input file to 3dMean',
20022002
argstr='%s',

nipype/interfaces/afni/svm.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,28 +24,28 @@
2424

2525
warn = warnings.warn
2626
warnings.filterwarnings('always', category=UserWarning)
27-
27+
2828
class SVMTrainInputSpec(AFNICommandInputSpec):
2929
#training options
30-
ttype = traits.Str(desc='tname: classification or regression',
30+
ttype = traits.Str(desc='tname: classification or regression',
3131
argstr='-type %s',
3232
mandatory=True)
3333
in_file = File(desc='A 3D+t AFNI brik dataset to be used for training.',
3434
argstr='-trainvol %s',
3535
mandatory=True,
3636
exists=True,
3737
copyfile=False)
38-
out_file = File(name_template="%s_vectors",
38+
out_file = File(name_template="%s_vectors",
3939
desc='output sum of weighted linear support vectors file name',
4040
argstr='-bucket %s',
41-
suffix='_bucket',
41+
suffix='_bucket',
4242
name_source="in_file")
4343
model = File(name_template="%s_model",
4444
desc='basename for the brik containing the SVM model',
4545
argstr='-model %s',
46-
suffix='_model',
47-
name_source="in_file")
48-
alphas = File(name_template="%s_alphas",
46+
suffix='_model',
47+
name_source="in_file")
48+
alphas = File(name_template="%s_alphas",
4949
desc='output alphas file name',
5050
argstr='-alpha %s',
5151
suffix='_alphas',
@@ -62,20 +62,20 @@ class SVMTrainInputSpec(AFNICommandInputSpec):
6262
exists=True)
6363
censor = File(desc='.1D censor file that allows the user to ignore certain samples in the training data.',
6464
argstr='-censor %s',
65-
exists=True)
65+
exists=True)
6666
kernel = traits.Str(desc='string specifying type of kernel function:linear, polynomial, rbf, sigmoid',
6767
argstr='-kernel %s')
6868
max_iterations = traits.Int(desc='Specify the maximum number of iterations for the optimization.',
6969
argstr='-max_iterations %d')
7070
w_out = traits.Bool(desc='output sum of weighted linear support vectors',
7171
argstr='-wout')
7272
options = traits.Str(desc='additional options for SVM-light', argstr='%s')
73-
73+
7474
class SVMTrainOutputSpec(TraitedSpec):
7575
out_file = File(desc='sum of weighted linear support vectors file name')
7676
model = File(desc='brik containing the SVM model file name')
7777
alphas = File(desc='output alphas file name')
78-
78+
7979
class SVMTrain(AFNICommand):
8080
"""Temporally predictive modeling with the support vector machine
8181
SVM Train Only
@@ -129,7 +129,7 @@ class SVMTestInputSpec(AFNICommandInputSpec):
129129
multiclass = traits.Bool(desc='Specifies multiclass algorithm for classification',
130130
argstr='-multiclass %s')
131131
options = traits.Str(desc='additional options for SVM-light', argstr='%s')
132-
132+
133133
class SVMTest(AFNICommand):
134134
"""Temporally predictive modeling with the support vector machine
135135
SVM Test Only

nipype/interfaces/camino/connectivity.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class ConmatInputSpec(CommandLineInputSpec):
3737
desc=("Tract statistic to use. See TractStats for other options."),
3838
requires=['scalar_file'],xor=['tract_prop'])
3939

40-
tract_prop = traits.Enum("length", "endpointsep", argstr='-tractstat %s',
40+
tract_prop = traits.Enum("length", "endpointsep", argstr='-tractstat %s',
4141
units='NA', xor=['tract_stat'],
4242
desc=('Tract property average to compute in the connectivity matrix. '
4343
'See TractStats for details.'))

nipype/interfaces/dcmstack.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ class DcmStackInputSpec(NiftiGeneratorBaseInputSpec):
8585
"any default exclude filters")
8686
include_regexes = traits.List(desc="Meta data to include, overriding any "
8787
"exclude filters")
88-
force_read = traits.Bool(True, usedefault=True,
88+
force_read = traits.Bool(True, usedefault=True,
8989
desc=('Force reading files without DICM marker'))
9090

9191

nipype/interfaces/fsl/epi.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -577,11 +577,11 @@ class EpiRegInputSpec(FSLCommandInputSpec):
577577
(use if fmap already registered)')
578578
no_clean = traits.Bool(False, argstr='--noclean',
579579
desc='do not clean up intermediate files')
580-
580+
581581

582582
class EpiRegOutputSpec(TraitedSpec):
583583
out_file = File(exists=True,
584-
desc='unwarped and coregistered epi input')
584+
desc='unwarped and coregistered epi input')
585585
out_1vol = File(exists=True,
586586
desc='unwarped and coregistered single volume')
587587
fmap2str_mat = File(exists=True,
@@ -607,7 +607,7 @@ class EpiRegOutputSpec(TraitedSpec):
607607
class EpiReg(FSLCommand):
608608
"""
609609
610-
Runs FSL epi_reg script for simultaneous coregistration and fieldmap
610+
Runs FSL epi_reg script for simultaneous coregistration and fieldmap
611611
unwarping.
612612
613613
Examples
@@ -629,7 +629,7 @@ class EpiReg(FSLCommand):
629629
--fmapmag=fieldmap_mag.nii --fmapmagbrain=fieldmap_mag_brain.nii --pedir=y \
630630
--epi=epi.nii --t1=T1.nii --t1brain=T1_brain.nii --out=epi2struct'
631631
>>> epireg.run() # doctest: +SKIP
632-
632+
633633
"""
634634
_cmd = 'epi_reg'
635635
input_spec = EpiRegInputSpec

nipype/interfaces/fsl/tests/test_auto_BEDPOSTX.py

Lines changed: 68 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,39 +3,85 @@
33
from nipype.interfaces.fsl.dti import BEDPOSTX
44

55
def test_BEDPOSTX_inputs():
6-
input_map = dict(args=dict(argstr='%s',
6+
input_map = dict(all_ard=dict(argstr='--allard',
7+
xor=('no_ard', 'all_ard'),
78
),
8-
bpx_directory=dict(argstr='%s',
9-
usedefault=True,
9+
args=dict(argstr='%s',
10+
),
11+
burn_in=dict(argstr='--burnin=%d',
12+
),
13+
burn_in_no_ard=dict(argstr='--burninnoard=%d',
1014
),
11-
burn_period=dict(argstr='-b %d',
15+
bvals=dict(argstr='--bvals=%s',
16+
mandatory=True,
1217
),
13-
bvals=dict(mandatory=True,
18+
bvecs=dict(argstr='--bvecs=%s',
19+
mandatory=True,
1420
),
15-
bvecs=dict(mandatory=True,
21+
cnlinear=dict(argstr='--cnonlinear',
22+
xor=('no_spat', 'non_linear', 'cnlinear'),
1623
),
17-
dwi=dict(mandatory=True,
24+
dwi=dict(argstr='--data=%s',
25+
mandatory=True,
1826
),
1927
environ=dict(nohash=True,
2028
usedefault=True,
2129
),
22-
fibres=dict(argstr='-n %d',
30+
f0_ard=dict(argstr='--f0 --ardf0',
31+
xor=['f0_noard', 'f0_ard', 'all_ard'],
32+
),
33+
f0_noard=dict(argstr='--f0',
34+
xor=['f0_noard', 'f0_ard'],
35+
),
36+
force_dir=dict(argstr='--forcedir',
37+
usedefault=True,
38+
),
39+
fudge=dict(argstr='--fudge=%d',
40+
),
41+
gradnonlin=dict(argstr='-g',
2342
),
2443
ignore_exception=dict(nohash=True,
2544
usedefault=True,
2645
),
27-
jumps=dict(argstr='-j %d',
46+
logdir=dict(argstr='--logdir=%s',
47+
usedefault=True,
48+
),
49+
mask=dict(argstr='--mask=%s',
50+
mandatory=True,
2851
),
29-
mask=dict(mandatory=True,
52+
model=dict(argstr='--model=%d',
53+
),
54+
n_fibres=dict(argstr='--nfibres=%d',
55+
),
56+
n_jumps=dict(argstr='--njumps=%d',
57+
),
58+
no_ard=dict(argstr='--noard',
59+
xor=('no_ard', 'all_ard'),
60+
),
61+
no_spat=dict(argstr='--nospat',
62+
xor=('no_spat', 'non_linear', 'cnlinear'),
63+
),
64+
non_linear=dict(argstr='--nonlinear',
65+
xor=('no_spat', 'non_linear', 'cnlinear'),
66+
),
67+
out_dir=dict(argstr='%s',
68+
mandatory=True,
69+
position=1,
70+
usedefault=True,
3071
),
3172
output_type=dict(),
32-
sampling=dict(argstr='-s %d',
73+
rician=dict(argstr='--rician',
74+
),
75+
sample_every=dict(argstr='--sampleevery=%d',
76+
),
77+
seed=dict(argstr='--seed=%d',
3378
),
3479
terminal_output=dict(mandatory=True,
3580
nohash=True,
3681
),
37-
weight=dict(argstr='-w %.2f',
82+
update_proposal_every=dict(argstr='--updateproposalevery=%d',
3883
),
84+
use_gpu=dict(),
3985
)
4086
inputs = BEDPOSTX.input_spec()
4187

@@ -44,15 +90,23 @@ def test_BEDPOSTX_inputs():
4490
yield assert_equal, getattr(inputs.traits()[key], metakey), value
4591

4692
def test_BEDPOSTX_outputs():
47-
output_map = dict(bpx_out_directory=dict(),
93+
output_map = dict(d_stdsamples=dict(),
94+
dsamples=dict(),
4895
dyads=dict(),
96+
dyads_disp=dict(),
97+
fsamples=dict(),
98+
mean_S0samples=dict(),
99+
mean_d_stdsamples=dict(),
100+
mean_dsamples=dict(),
49101
mean_fsamples=dict(),
50102
mean_phsamples=dict(),
103+
mean_tausamples=dict(),
51104
mean_thsamples=dict(),
52105
merged_fsamples=dict(),
53106
merged_phsamples=dict(),
54107
merged_thsamples=dict(),
55-
xfms_directory=dict(),
108+
phsamples=dict(),
109+
thsamples=dict(),
56110
)
57111
outputs = BEDPOSTX.output_spec()
58112

nipype/interfaces/fsl/tests/test_auto_XFibres.py

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,21 @@ def test_XFibres_inputs():
1818
bvecs=dict(argstr='--bvecs=%s',
1919
mandatory=True,
2020
),
21+
cnlinear=dict(argstr='--cnonlinear',
22+
xor=('no_spat', 'non_linear', 'cnlinear'),
23+
),
2124
dwi=dict(argstr='--data=%s',
2225
mandatory=True,
2326
),
2427
environ=dict(nohash=True,
2528
usedefault=True,
2629
),
30+
f0_ard=dict(argstr='--f0 --ardf0',
31+
xor=['f0_noard', 'f0_ard', 'all_ard'],
32+
),
33+
f0_noard=dict(argstr='--f0',
34+
xor=['f0_noard', 'f0_ard'],
35+
),
2736
force_dir=dict(argstr='--forcedir',
2837
usedefault=True,
2938
),
@@ -50,12 +59,14 @@ def test_XFibres_inputs():
5059
xor=('no_ard', 'all_ard'),
5160
),
5261
no_spat=dict(argstr='--nospat',
53-
xor=('no_spat', 'non_linear'),
62+
xor=('no_spat', 'non_linear', 'cnlinear'),
5463
),
5564
non_linear=dict(argstr='--nonlinear',
56-
xor=('no_spat', 'non_linear'),
65+
xor=('no_spat', 'non_linear', 'cnlinear'),
5766
),
5867
output_type=dict(),
68+
rician=dict(argstr='--rician',
69+
),
5970
sample_every=dict(argstr='--sampleevery=%d',
6071
),
6172
seed=dict(argstr='--seed=%d',
@@ -73,11 +84,15 @@ def test_XFibres_inputs():
7384
yield assert_equal, getattr(inputs.traits()[key], metakey), value
7485

7586
def test_XFibres_outputs():
76-
output_map = dict(dyads=dict(),
87+
output_map = dict(d_stdsamples=dict(),
88+
dsamples=dict(),
89+
dyads=dict(),
7790
fsamples=dict(),
7891
mean_S0samples=dict(),
92+
mean_d_stdsamples=dict(),
7993
mean_dsamples=dict(),
8094
mean_fsamples=dict(),
95+
mean_tausamples=dict(),
8196
phsamples=dict(),
8297
thsamples=dict(),
8398
)

0 commit comments

Comments
 (0)