Skip to content

Commit 501e65f

Browse files
committed
Merge remote-tracking branch 'upstream/master' into sty/pepping
* upstream/master: [HOTFIX] Incorrect call to warnings.warn updating the auto test FIX: updates hash to accept newline in realign_json.json FIX: Reset change to make hash assertion happy Reset change to make hash assertion happy STY: adds newline to end of file STY: delets heading newline in textfiles STY: correct for newline at end of file STY: correct for tailing spaces and newline at end of file STY: correct for tailing spaces and newline at end of file [FIX] Fix surf_reg input trait Update dti.py
2 parents b6f9f15 + 00ef467 commit 501e65f

37 files changed

+52
-50
lines changed

.dockerignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ Vagrantfile
3434
.mailmap
3535

3636
# Previous coverage results
37-
.coverage
37+
.coverage

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
* The person who accepts/merges your PR will include an update to the CHANGES file: prefix: description (URL of pull request)
1717
* Run `make check-before-commit` before submitting the PR.
1818
This will require you to either install or be in developer mode with: `python setup.py install/develop`.
19-
* In general, do not catch exceptions without good reason.
20-
* catching non-fatal exceptions.
19+
* In general, do not catch exceptions without good reason.
20+
* catching non-fatal exceptions.
2121
Log the exception as a warning.
2222
* adding more information about what may have caused the error.
2323
Raise a new exception using ``raise_from(NewException("message"), oldException)`` from ``future``.

codecov.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ coverage:
2525
ignore: # files and folders that will be removed during processing
2626
- "nipype/external/*"
2727
- "tools/*"
28-
- "doc/*"
28+
- "doc/*"

doc/_static/nipype.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,4 @@ div.doc2.container ul{
5757

5858
div.doc2 .reference.internal{
5959
font-size: 14px;
60-
}
60+
}

doc/devel/gitwash/git_links.inc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
and name substitutions. It may be included in many files,
33
therefore it should only contain link targets and name
44
substitutions. Try grepping for "^\.\. _" to find plausible
5-
candidates for this list.
5+
candidates for this list.
66
77
.. NOTE: reST targets are
88
__not_case_sensitive__, so only one target definition is needed for
@@ -42,7 +42,7 @@
4242
.. _git config: http://www.kernel.org/pub/software/scm/git/docs/git-config.html
4343
.. _why the -a flag?: http://www.gitready.com/beginner/2009/01/18/the-staging-area.html
4444
.. _git staging area: http://www.gitready.com/beginner/2009/01/18/the-staging-area.html
45-
.. _tangled working copy problem: http://tomayko.com/writings/the-thing-about-git
45+
.. _tangled working copy problem: http://tomayko.com/writings/the-thing-about-git
4646
.. _git management: http://kerneltrap.org/Linux/Git_Management
4747
.. _linux git workflow: http://www.mail-archive.com/[email protected]/msg39091.html
4848
.. _git parable: http://tom.preston-werner.com/2009/05/19/the-git-parable.html

doc/searchresults.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,4 +170,4 @@ Search results
170170
.gsc-resultsHeader {
171171
clear: none;
172172
}
173-
</style>
173+
</style>

doc/users/aws.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,4 +99,4 @@ s3://mybucket/path/to/output/dir/sub001/motion/realigned_file1.nii.gz
9999

100100
Using S3DataGrabber
101101
======================
102-
Coming soon...
102+
Coming soon...

doc/users/caching_tutorial.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
.. _caching:
32

43
===========================

doc/users/config_file.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ Resource Monitor
170170
Indicates where the summary file collecting all profiling information from the
171171
resource monitor should be stored after execution of a workflow.
172172
The ``summary_file`` does not apply to interfaces run independently.
173-
(unset by default, in which case the summary file will be written out to
173+
(unset by default, in which case the summary file will be written out to
174174
``<base_dir>/resource_monitor.json`` of the top-level workflow).
175175

176176
*summary_append*

doc/users/install.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,4 +117,4 @@ Developers should start `here <../devel/testing_nipype.html>`_.
117117

118118
Developers can also use this docker container: `docker pull nipype/nipype:master`
119119

120-
.. include:: ../links_names.txt
120+
.. include:: ../links_names.txt

doc/users/plugins.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,9 @@ Optional arguments::
8282
exceed the total amount of resources available (memory and threads), when
8383
``False`` (default), only a warning will be issued.
8484

85-
maxtasksperchild : number of nodes to run on each process before refreshing
85+
maxtasksperchild : number of nodes to run on each process before refreshing
8686
the worker (default: 10).
87-
87+
8888

8989
To distribute processing on a multicore machine, simply call::
9090

doc/users/sphinx_ext.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
.. _sphinx_ext:
32

43
Sphinx extensions
@@ -11,4 +10,4 @@ and simplify the generation process.
1110

1211
.. automodule:: nipype.sphinxext.plot_workflow
1312
:undoc-members:
14-
:noindex:
13+
:noindex:

examples/nipype_tutorial.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1747,4 +1747,4 @@
17471747
"metadata": {}
17481748
}
17491749
]
1750-
}
1750+
}

nipype/external/d3.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9252,4 +9252,4 @@
92529252
} else {
92539253
this.d3 = d3;
92549254
}
9255-
}();
9255+
}();

nipype/interfaces/base/tests/test_support.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def test_bunch_hash():
5757
otherthing='blue',
5858
yat=True)
5959
newbdict, bhash = b._get_bunch_hash()
60-
assert bhash == 'ddcc7b4ec5675df8cf317a48bd1857fa'
60+
assert bhash == 'd1f46750044c3de102efc847720fc35f'
6161
# Make sure the hash stored in the json file for `infile` is correct.
6262
jshash = md5()
6363
with open(json_pth, 'r') as fp:

nipype/interfaces/diffusion_toolkit/dti.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ class DTITrackerInputSpec(CommandLineInputSpec):
131131
angle_threshold_weight = traits.Float(desc="set angle threshold weighting factor. weighting will be be applied \
132132
on top of the angle_threshold", argstr="-atw %f")
133133
random_seed = traits.Int(desc="use random location in a voxel instead of the center of the voxel \
134-
to seed. can also define number of seed per voxel. default is 1", argstr="-rseed")
134+
to seed. can also define number of seed per voxel. default is 1", argstr="-rseed %d")
135135
invert_x = traits.Bool(desc="invert x component of the vector", argstr="-ix")
136136
invert_y = traits.Bool(desc="invert y component of the vector", argstr="-iy")
137137
invert_z = traits.Bool(desc="invert z component of the vector", argstr="-iz")

nipype/interfaces/diffusion_toolkit/tests/test_auto_DTITracker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def test_DTITracker_inputs():
4848
),
4949
primary_vector=dict(argstr='-%s',
5050
),
51-
random_seed=dict(argstr='-rseed',
51+
random_seed=dict(argstr='-rseed %d',
5252
),
5353
step_length=dict(argstr='-l %f',
5454
),

nipype/interfaces/freesurfer/tests/test_auto_SampleToSurface.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def test_SampleToSurface_inputs():
9393
),
9494
subject_id=dict(),
9595
subjects_dir=dict(),
96-
surf_reg=dict(argstr='--surfreg',
96+
surf_reg=dict(argstr='--surfreg %s',
9797
requires=['target_subject'],
9898
),
9999
surface=dict(argstr='--surf %s',

nipype/interfaces/freesurfer/utils.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,9 @@ class SampleToSurfaceInputSpec(FSTraitedSpec):
142142
subject_id = traits.String(desc="subject id")
143143
target_subject = traits.String(argstr="--trgsubject %s",
144144
desc="sample to surface of different subject than source")
145-
surf_reg = traits.Bool(argstr="--surfreg", requires=["target_subject"],
146-
desc="use surface registration to target subject")
145+
surf_reg = traits.Either(traits.Bool, traits.Str(),
146+
argstr="--surfreg %s", requires=["target_subject"],
147+
desc="use surface registration to target subject")
147148
ico_order = traits.Int(argstr="--icoorder %d", requires=["target_subject"],
148149
desc="icosahedron order when target_subject is 'ico'")
149150

@@ -241,6 +242,10 @@ def _format_arg(self, name, spec, value):
241242

242243
if value in implicit_filetypes:
243244
return ""
245+
if name == 'surf_reg':
246+
if value is True:
247+
return spec.argstr % 'sphere.reg'
248+
244249
return super(SampleToSurface, self)._format_arg(name, spec, value)
245250

246251
def _get_outfilename(self, opt="out_file"):

nipype/interfaces/fsl/model_templates/feat_fe_header.tcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ set fmri(regstandard_dof) 12
259259
set fmri(regstandard_nonlinear_yn) 0
260260

261261
# Control nonlinear warp field resolution
262-
set fmri(regstandard_nonlinear_warpres) 10
262+
set fmri(regstandard_nonlinear_warpres) 10
263263

264264
# High pass filter cutoff
265265
set fmri(paradigm_hp) 100

nipype/interfaces/fsl/model_templates/feat_header.tcl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ set fmri(level) 1
1717
# 2 : Stats
1818
# 6 : Stats + Post-stats
1919
# 4 : Post-stats
20-
set fmri(analysis) $analysis_stages
20+
set fmri(analysis) $analysis_stages
2121

2222
# Use relative filenames
2323
set fmri(relative_yn) 0
@@ -57,7 +57,7 @@ set fmri(inputtype) 1
5757
# Carry out pre-stats processing?
5858
set fmri(filtering_yn) 0
5959

60-
# Brain/background threshold,
60+
# Brain/background threshold,
6161
set fmri(brain_thresh) 10
6262

6363
# Critical z for design efficiency calculation
@@ -157,7 +157,7 @@ set fmri(evs_real) $num_evs
157157
set fmri(evs_vox) 0
158158

159159
# Number of contrasts
160-
set fmri(ncon_orig) $num_contrasts
160+
set fmri(ncon_orig) $num_contrasts
161161
set fmri(ncon_real) $num_contrasts
162162

163163
# Number of F-tests
@@ -259,7 +259,7 @@ set fmri(regstandard_dof) 12
259259
set fmri(regstandard_nonlinear_yn) 0
260260

261261
# Control nonlinear warp field resolution
262-
set fmri(regstandard_nonlinear_warpres) 10
262+
set fmri(regstandard_nonlinear_warpres) 10
263263

264264
# High pass filter cutoff
265265
set fmri(paradigm_hp) 100

nipype/interfaces/fsl/model_templates/feat_header_l1.tcl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ set fmri(inputtype) 2
5757
# Carry out pre-stats processing?
5858
set fmri(filtering_yn) 0
5959

60-
# Brain/background threshold,
60+
# Brain/background threshold,
6161
set fmri(brain_thresh) 10
6262

6363
# Critical z for design efficiency calculation
@@ -259,7 +259,7 @@ set fmri(regstandard_dof) 0
259259
set fmri(regstandard_nonlinear_yn) 0
260260

261261
# Control nonlinear warp field resolution
262-
set fmri(regstandard_nonlinear_warpres) 10
262+
set fmri(regstandard_nonlinear_warpres) 10
263263

264264
# High pass filter cutoff
265265
set fmri(paradigm_hp) $high_pass_filter_cutoff

nipype/interfaces/fsl/model_templates/featreg_header.tcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ set fmri(regstandard_dof) $regdof
259259
set fmri(regstandard_nonlinear_yn) 0
260260

261261
# Control nonlinear warp field resolution
262-
set fmri(regstandard_nonlinear_warpres) 10
262+
set fmri(regstandard_nonlinear_warpres) 10
263263

264264
# High pass filter cutoff
265265
set fmri(paradigm_hp) 100

nipype/pytest.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[pytest]
22
norecursedirs = .git build dist doc nipype/external tools examples src
33
addopts = --doctest-modules
4-
doctest_optionflags = ALLOW_UNICODE NORMALIZE_WHITESPACE
4+
doctest_optionflags = ALLOW_UNICODE NORMALIZE_WHITESPACE

nipype/refs.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
# Use duecredit (duecredit.org) to provide a citation to relevant work to
32
# be cited. This does nothing, unless the user has duecredit installed,
43
# And calls this with duecredit (as in `python -m duecredit script.py`):

nipype/testing/data/README

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ in the doctests of nipype. For verion 0.3 of nipype, we're using
33
Traits and for input files, the code checks to confirm the assigned
44
files actually exist. It doesn't matter what the files are, or even
55
if they contain "real data", only that they exist. Again, these files
6-
are only meant to serve as documentation in the doctests.
6+
are only meant to serve as documentation in the doctests.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
This file has to be here because git ignores empty folders.
1+
This file has to be here because git ignores empty folders.

nipype/testing/data/fmri_timeseries_nolabels.csv

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

nipype/testing/data/jsongrabber.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"param2": 4, "param1": "exampleStr"}
1+
{"param2": 4, "param1": "exampleStr"}

nipype/testing/data/realign_json.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@
3131
"write_mask": null,
3232
"write_which": null,
3333
"write_wrap": null
34-
}
34+
}

nipype/testing/data/smri_ants_registration_settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,4 +177,4 @@
177177
],
178178
"dimension": 3,
179179
"collapse_output_transforms": false
180-
}
180+
}

nipype/testing/data/spminfo

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ try,
66
end;
77
spm_path = spm('dir');
88
fprintf(1, 'NIPYPE %s', spm_path);
9-
9+
1010
,catch ME,
1111
fprintf(2,'MATLAB code threw an exception:\n');
1212
fprintf(2,'%s\n',ME.message);
1313
if length(ME.stack) ~= 0, fprintf(2,'File:%s\nName:%s\nLine:%d\n',ME.stack.file,ME.stack.name,ME.stack.line);, end;
14-
end;
14+
end;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
This file has to be here because git ignores empty folders.
1+
This file has to be here because git ignores empty folders.

nipype/utils/config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,8 @@ def cwd(self):
126126
try:
127127
self._cwd = os.getcwd()
128128
except OSError:
129-
warn('Trying to run Nipype from a nonexistent directory "%s".',
130-
os.getenv('PWD', 'unknown'))
129+
warn('Trying to run Nipype from a nonexistent directory "{}".'.format(
130+
os.getenv('PWD', 'unknown')), RuntimeWarning)
131131
raise
132132
return self._cwd
133133

nipype/utils/spm_flat_config.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,4 @@
3636
else
3737
objlist = {objlist{:} astruct};
3838
end
39-
end
39+
end

nipype/workflows/data/ecc.sch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ setscale 4
33
setoption smoothing 6
44
setoption paramsubset 1 0 0 0 0 0 0 1 1 1 1 1 1
55
clear U
6-
clear UA
6+
clear UA
77
clear UB
88
clear US
99
clear UP
@@ -53,7 +53,7 @@ clear U
5353
setrow UG 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1
5454
optimise 7 UG 0.0 0.0 0.0 0.0 0.0 0.0 0.0 abs 2
5555
sort U
56-
copy U UG
56+
copy U UG
5757
# 1mm scale
5858
setscale 1
5959
setoption smoothing 2

nipype/workflows/data/hmc.sch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
setscale 4
33
setoption smoothing 6
44
clear U
5-
clear UA
5+
clear UA
66
clear UB
77
clear US
88
clear UP
@@ -51,7 +51,7 @@ clear U
5151
setrow UG 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1
5252
optimise 7 UG 0.0 0.0 0.0 0.0 0.0 0.0 0.0 abs 2
5353
sort U
54-
copy U UG
54+
copy U UG
5555
# 1mm scale
5656
setscale 1
5757
setoption smoothing 2

0 commit comments

Comments
 (0)