Skip to content

Commit 421600b

Browse files
committed
Merge remote-tracking branch 'upstream/master' into dev/2.0
2 parents f4f7865 + f6247b3 commit 421600b

21 files changed

+788
-146
lines changed

.circleci/config.yml

+18-6
Original file line numberDiff line numberDiff line change
@@ -316,9 +316,18 @@ jobs:
316316
- run:
317317
name: Check pypi preconditions
318318
command: |
319-
pip install twine future wheel readme_renderer
319+
pip install --upgrade twine future wheel readme_renderer setuptools
320320
python setup.py check -r -s
321321
python setup.py sdist bdist_wheel
322+
- run:
323+
name: Validate Python 3 installation
324+
command: |
325+
pyenv local 3.5.2
326+
pip install dist/nipype-*-py2.py3-none-any.whl
327+
# Futures should not install in Python 3
328+
test $(pip show futures 2>/dev/null | wc -l) = "0"
329+
- store_artifacts:
330+
path: /home/circleci/nipype/dist
322331

323332
deploy_pypi:
324333
machine: *machine_kwds
@@ -329,7 +338,7 @@ jobs:
329338
- run:
330339
name: Deploy to PyPI
331340
command: |
332-
pip install twine future wheel readme_renderer
341+
pip install --upgrade twine future wheel readme_renderer setuptools
333342
python setup.py check -r -s
334343
python setup.py sdist bdist_wheel
335344
twine upload dist/*
@@ -370,6 +379,12 @@ workflows:
370379
version: 2
371380
build_test_deploy:
372381
jobs:
382+
- pypi_precheck:
383+
filters:
384+
branches:
385+
only: /rel\/.*/
386+
tags:
387+
only: /.*/
373388
- compare_base_dockerfiles:
374389
filters:
375390
tags:
@@ -405,6 +420,7 @@ workflows:
405420
tags:
406421
only: /.*/
407422
requires:
423+
- pypi_precheck
408424
- test_pytest
409425
- update_feedstock:
410426
context: nipybot
@@ -413,7 +429,3 @@ workflows:
413429
only: /rel\/.*/
414430
tags:
415431
only: /.*/
416-
- pypi_precheck:
417-
filters:
418-
branches:
419-
only: /rel\/.*/

.github/ISSUE_TEMPLATE.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,13 @@ Please put URL to code or code here (if not too long).
1212

1313
### Platform details:
1414

15-
Please paste the output of: `python -c "import nipype; print(nipype.get_info()); print(nipype.__version__)"`
15+
<!-- Please run the following code from your shell and place the output between the triple ticks, below.
16+
python -c "import nipype; from pprint import pprint; pprint(nipype.get_info())"
17+
-->
18+
19+
```
20+
21+
```
1622

1723
### Execution environment
1824

.travis.yml

-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ before_install:
5353
export FSLOUTPUTTYPE=NIFTI_GZ;
5454
fi;
5555

56-
- travis_retry pip install --upgrade pytest>=3.4 # Work around pip failure
5756
- travis_retry pip install -r requirements.txt
5857
- travis_retry pip install grabbit==0.1.2
5958
- travis_retry git clone https://github.com/INCF/pybids.git ${HOME}/pybids &&

.zenodo.json

+5-1
Original file line numberDiff line numberDiff line change
@@ -574,6 +574,10 @@
574574
{
575575
"name": "McDermottroe, Conor"
576576
},
577+
{
578+
"affiliation": "Institute of Imaging & Computer Vision, RWTH Aachen University, Germany",
579+
"name": "Weninger, Leon"
580+
},
577581
{
578582
"affiliation": "MIT, HMS",
579583
"name": "Ghosh, Satrajit",
@@ -587,4 +591,4 @@
587591
],
588592
"license": "Apache-2.0",
589593
"upload_type": "software"
590-
}
594+
}

doc/changelog/1.X.X-changelog

+17
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
1.1.2 (August 11, 2018)
2+
=======================
3+
4+
Hot-fix release, resolving incorrect dependencies in 1.1.1 wheel.
5+
6+
##### [Full changelog](https://github.com/nipy/nipype/milestone/23?closed=1)
7+
8+
* FIX: Read BIDS config.json under grabbids or layout (https://github.com/nipy/nipype/pull/2679)
9+
* FIX: Node __repr__ and detailed graph expansion (https://github.com/nipy/nipype/pull/2669)
10+
* FIX: Prevent double-collapsing of nested lists by OutputMultiObject (https://github.com/nipy/nipype/pull/2673)
11+
* ENH: Add interface to SPM realign_unwarp (https://github.com/nipy/nipype/pull/2635)
12+
* MAINT: Fix wheel build to ensure futures is only required in Python 2 (https://github.com/nipy/nipype/pull/2678)
13+
* MAINT: ensure interface _cmd only includes executable (https://github.com/nipy/nipype/pull/2674)
14+
* MAINT: Issue template: Pretty print platform details (https://github.com/nipy/nipype/pull/2671)
15+
* CI: removing travis_retry for pip install pytest xdist 1.22.5 (https://github.com/nipy/nipype/pull/2664)
16+
17+
118
1.1.1 (July 30, 2018)
219
=====================
320

nipype/interfaces/afni/preprocess.py

+51-101
Original file line numberDiff line numberDiff line change
@@ -2949,107 +2949,6 @@ def _list_outputs(self):
29492949
return outputs
29502950

29512951

2952-
class QwarpPlusMinusInputSpec(CommandLineInputSpec):
2953-
source_file = File(
2954-
desc=
2955-
'Source image (opposite phase encoding direction than base image).',
2956-
argstr='-source %s',
2957-
mandatory=True,
2958-
exists=True,
2959-
copyfile=False)
2960-
base_file = File(
2961-
desc=
2962-
'Base image (opposite phase encoding direction than source image).',
2963-
argstr='-base %s',
2964-
mandatory=True,
2965-
exists=True,
2966-
copyfile=False)
2967-
pblur = traits.List(
2968-
traits.Float(),
2969-
desc='The fraction of the patch size that'
2970-
'is used for the progressive blur by providing a '
2971-
'value between 0 and 0.25. If you provide TWO '
2972-
'values, the first fraction is used for '
2973-
'progressively blurring the base image and the '
2974-
'second for the source image.',
2975-
argstr='-pblur %s',
2976-
minlen=1,
2977-
maxlen=2)
2978-
blur = traits.List(
2979-
traits.Float(),
2980-
desc="Gaussian blur the input images by (FWHM) voxels "
2981-
"before doing the alignment (the output dataset "
2982-
"will not be blurred). The default is 2.345 (for "
2983-
"no good reason). Optionally, you can provide 2 "
2984-
"values, and then the first one is applied to the "
2985-
"base volume, the second to the source volume. A "
2986-
"negative blur radius means to use 3D median "
2987-
"filtering, rather than Gaussian blurring. This "
2988-
"type of filtering will better preserve edges, "
2989-
"which can be important in alignment.",
2990-
argstr='-blur %s',
2991-
minlen=1,
2992-
maxlen=2)
2993-
noweight = traits.Bool(
2994-
desc='If you want a binary weight (the old default), use this option.'
2995-
'That is, each voxel in the base volume automask will be'
2996-
'weighted the same in the computation of the cost functional.',
2997-
argstr='-noweight')
2998-
minpatch = traits.Int(
2999-
desc="Set the minimum patch size for warp searching to 'mm' voxels.",
3000-
argstr='-minpatch %d')
3001-
nopadWARP = traits.Bool(
3002-
desc='If for some reason you require the warp volume to'
3003-
'match the base volume, then use this option to have the output'
3004-
'WARP dataset(s) truncated.',
3005-
argstr='-nopadWARP')
3006-
3007-
3008-
class QwarpPlusMinusOutputSpec(TraitedSpec):
3009-
warped_source = File(desc='Undistorted source file.', exists=True)
3010-
warped_base = File(desc='Undistorted base file.', exists=True)
3011-
source_warp = File(
3012-
desc="Field suceptibility correction warp (in 'mm') for source image.",
3013-
exists=True)
3014-
base_warp = File(
3015-
desc="Field suceptibility correction warp (in 'mm') for base image.",
3016-
exists=True)
3017-
3018-
3019-
class QwarpPlusMinus(CommandLine):
3020-
"""A version of 3dQwarp for performing field susceptibility correction
3021-
using two images with opposing phase encoding directions.
3022-
3023-
For complete details, see the `3dQwarp Documentation.
3024-
<https://afni.nimh.nih.gov/pub/dist/doc/program_help/3dQwarp.html>`_
3025-
3026-
Examples
3027-
========
3028-
3029-
>>> from nipype.interfaces import afni
3030-
>>> qwarp = afni.QwarpPlusMinus()
3031-
>>> qwarp.inputs.source_file = 'sub-01_dir-LR_epi.nii.gz'
3032-
>>> qwarp.inputs.nopadWARP = True
3033-
>>> qwarp.inputs.base_file = 'sub-01_dir-RL_epi.nii.gz'
3034-
>>> qwarp.cmdline
3035-
'3dQwarp -prefix Qwarp.nii.gz -plusminus -base sub-01_dir-RL_epi.nii.gz -nopadWARP -source sub-01_dir-LR_epi.nii.gz'
3036-
>>> res = warp.run() # doctest: +SKIP
3037-
3038-
"""
3039-
_cmd = '3dQwarp -prefix Qwarp.nii.gz -plusminus'
3040-
input_spec = QwarpPlusMinusInputSpec
3041-
output_spec = QwarpPlusMinusOutputSpec
3042-
3043-
def _list_outputs(self):
3044-
outputs = self.output_spec().get()
3045-
outputs['warped_source'] = os.path.abspath("Qwarp_PLUS.nii.gz")
3046-
outputs['warped_base'] = os.path.abspath("Qwarp_MINUS.nii.gz")
3047-
outputs['source_warp'] = os.path.abspath("Qwarp_PLUS_WARP.nii.gz")
3048-
outputs['base_warp'] = os.path.abspath("Qwarp_MINUS_WARP.nii.gz")
3049-
3050-
return outputs
3051-
3052-
30532952
class QwarpInputSpec(AFNICommandInputSpec):
30542953
in_file = File(
30552954
desc=
@@ -3718,3 +3617,54 @@ def _list_outputs(self):
37183617
def _gen_filename(self, name):
37193618
if name == 'out_file':
37203619
return self._gen_fname(self.inputs.source_file, suffix='_QW')
3620+
3621+
3622+
class QwarpPlusMinusInputSpec(QwarpInputSpec):
3623+
source_file = File(
3624+
desc='Source image (opposite phase encoding direction than base image)',
3625+
argstr='-source %s',
3626+
exists=True,
3627+
deprecated='1.1.2',
3628+
new_name='in_file',
3629+
copyfile=False)
3630+
out_file = File(
3631+
argstr='-prefix %s',
3632+
value='Qwarp.nii.gz',
3633+
position=0,
3634+
usedefault=True,
3635+
desc="Output file")
3636+
plusminus = traits.Bool(
3637+
True,
3638+
usedefault=True,
3639+
position=1,
3640+
desc='Normally, the warp displacements dis(x) are defined to match'
3641+
'base(x) to source(x+dis(x)). With this option, the match'
3642+
'is between base(x-dis(x)) and source(x+dis(x)) -- the two'
3643+
'images \'meet in the middle\'. For more info, view Qwarp` interface',
3644+
argstr='-plusminus',
3645+
xor=['duplo', 'allsave', 'iwarp'])
3646+
3647+
3648+
class QwarpPlusMinus(Qwarp):
3649+
"""A version of 3dQwarp for performing field susceptibility correction
3650+
using two images with opposing phase encoding directions.
3651+
3652+
For complete details, see the `3dQwarp Documentation.
3653+
<https://afni.nimh.nih.gov/pub/dist/doc/program_help/3dQwarp.html>`_
3654+
3655+
Examples
3656+
========
3657+
3658+
>>> from nipype.interfaces import afni
3659+
>>> qwarp = afni.QwarpPlusMinus()
3660+
>>> qwarp.inputs.in_file = 'sub-01_dir-LR_epi.nii.gz'
3661+
>>> qwarp.inputs.nopadWARP = True
3662+
>>> qwarp.inputs.base_file = 'sub-01_dir-RL_epi.nii.gz'
3663+
>>> qwarp.cmdline
3664+
'3dQwarp -prefix Qwarp.nii.gz -plusminus -base sub-01_dir-RL_epi.nii.gz \
3665+
-source sub-01_dir-LR_epi.nii.gz -nopadWARP'
3666+
>>> res = warp.run() # doctest: +SKIP
3667+
3668+
"""
3669+
3670+
input_spec = QwarpPlusMinusInputSpec

0 commit comments

Comments
 (0)