Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

REL: 1.5.0 #3174

Merged
merged 35 commits into from
Mar 31, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
cbb1ab9
NEP29+1y: Set minimum python to 3.6, numpy to 1.13
effigies Mar 14, 2020
e925c68
DOC: Update changelog
effigies Mar 14, 2020
21c5b19
MNT: Update Zenodo ordering, adding Adam Kimbler to Zenodo
effigies Mar 14, 2020
c9d59f4
MNT: Fix SyntaxError, and disable telemetry for checkspecs.py
effigies Mar 14, 2020
b872215
FIX: add usedefault metadata to trait with default
effigies Mar 14, 2020
33f3a80
TEST: make specs
effigies Mar 14, 2020
faef7d0
STY: black
effigies Mar 14, 2020
79f11d9
MNT: Add Zenodo blacklist
effigies Mar 14, 2020
69f35d9
Merge remote-tracking branch 'upstream/master' into rel/1.5.0
oesteban Mar 14, 2020
3c1c6fa
CI: Drop Python 3.5 tests
effigies Mar 15, 2020
ff72cd7
DOC: Update changelog
effigies Mar 15, 2020
d94a8da
REL: 1.5.0-rc1
effigies Mar 15, 2020
b17a21b
MNT: 1.5.0-rc1.post-dev
effigies Mar 15, 2020
6364521
Adding reverse_forward_transforms and reverse_forward_invert_flags to…
sulantha2006 Mar 21, 2020
fdd0955
TEST: Mock terminal output before testing changing default value
effigies Mar 23, 2020
4061b76
TEST: Remove xfail from test_dcm2niix_dti
effigies Mar 23, 2020
f8a2e53
doctest: +ELLIPSIS fix
sulantha2006 Mar 23, 2020
f6ba809
Fix test_auto_Registration.py
sulantha2006 Mar 24, 2020
199dc2e
Use PackageInfo to get NiftyReg version
fepegar Mar 24, 2020
328bd4e
Remove version decoding
fepegar Mar 24, 2020
1ca5d4e
Merge pull request #3194 from fepegar/2615-packageinfo-niftyreg
effigies Mar 24, 2020
5c69cd1
TEST: Explicitly specify dataset in datalad get call
effigies Mar 29, 2020
933f64f
TEST: Skip PBS test in absence of qsub, use tmp_path fixture
effigies Mar 24, 2020
46b505c
TEST: Skip OAR test in absence of oarsub, use tmp_path fixture
effigies Mar 24, 2020
f847fa7
Merge pull request #3193 from effigies/test/mock_terminal_output
effigies Mar 29, 2020
35f83b9
TEST: Raise SkipTest when TempFATFS fails
effigies Mar 25, 2020
5fed3fb
TEST: Require rdflib 5.0 for prov tests
effigies Mar 25, 2020
e78bda1
TEST: Purge mock for unittest.mock
effigies Mar 29, 2020
f864267
TEST: Relax version constraints when checking FSL version
effigies Mar 30, 2020
2b1957e
TEST: Validate NIPYPE_NO_ET when NIPYPE_NO_ET is set
effigies Mar 30, 2020
68a7e4f
CI: Clean up travis.yml
effigies Mar 30, 2020
e6ed8c6
RF: Use etelemetry.check_available_version
effigies Mar 30, 2020
fe15295
Merge pull request #3192 from sulantha2006/master
effigies Mar 30, 2020
6d160c3
Merge pull request #3195 from effigies/test/fixes
effigies Mar 31, 2020
47de76e
Merge branch 'rel/1.5.0'
effigies Mar 31, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,19 @@
os: linux
dist: xenial
sudo: true

language: python
# our build matrix
python:
- 3.5
- 3.6
- 3.7

# NOTE: Any changes to the matrix section should be duplicated below for
# Python 3.4
env:
global:
- EXTRA_WHEELS="https://5cf40426d9f06eb7461d-6fe47d9331aba7cd62fc36c7196769e4.ssl.cf2.rackcdn.com"
- PRE_WHEELS="https://7933911d6844c6c53a7d-47bd50c35cd79bd838daf386af554a83.ssl.cf2.rackcdn.com"
- EXTRA_PIP_FLAGS="--find-links=$EXTRA_WHEELS"
- CHECK_TYPE=test
matrix:
jobs:
- INSTALL_DEB_DEPENDECIES=true
NIPYPE_EXTRAS="doc,tests,nipy,profiler"
CI_SKIP_TEST=1
Expand All @@ -31,7 +28,7 @@ env:
EXTRA_PIP_FLAGS="--pre $EXTRA_PIP_FLAGS --find-links $PRE_WHEELS --upgrade"
CI_SKIP_TEST=1

matrix:
jobs:
include:
- python: 3.7
env:
Expand Down
74 changes: 42 additions & 32 deletions .zenodo.json
Original file line number Diff line number Diff line change
Expand Up @@ -157,11 +157,6 @@
"name": "De La Vega, Alejandro",
"orcid": "0000-0001-9062-3778"
},
{
"affiliation": "Charite Universitatsmedizin Berlin, Germany",
"name": "Waller, Lea",
"orcid": "0000-0002-3239-6957"
},
{
"affiliation": "MIT",
"name": "Kaczmarzyk, Jakub",
Expand All @@ -183,6 +178,11 @@
{
"name": "Erickson, Drew"
},
{
"affiliation": "Neuroscience Program, University of Iowa",
"name": "Kent, James D.",
"orcid": "0000-0002-4892-2659"
},
{
"affiliation": "Otto-von-Guericke-University Magdeburg, Germany",
"name": "Hanke, Michael",
Expand All @@ -195,11 +195,6 @@
{
"name": "Moloney, Brendan"
},
{
"affiliation": "Neuroscience Program, University of Iowa",
"name": "Kent, James D.",
"orcid": "0000-0002-4892-2659"
},
{
"affiliation": "SRI International",
"name": "Nichols, B. Nolan",
Expand Down Expand Up @@ -246,6 +241,11 @@
{
"name": "Mordom, David"
},
{
"affiliation": "University College London",
"name": "Mancini, Matteo",
"orcid": "0000-0001-7194-4568"
},
{
"affiliation": "ARAMIS LAB, Brain and Spine Institute (ICM), Paris, France.",
"name": "Guillon, Je\u0301re\u0301my",
Expand Down Expand Up @@ -291,16 +291,16 @@
{
"name": "Salvatore, John"
},
{
"affiliation": "University College London",
"name": "Mancini, Matteo",
"orcid": "0000-0001-7194-4568"
},
{
"affiliation": "CNRS LTCI, Telecom ParisTech, Universit\u00e9 Paris-Saclay",
"name": "Gramfort, Alexandre",
"orcid": "0000-0001-9791-4404"
},
{
"affiliation": "Department of Psychology, University of Bielefeld, Bielefeld, Germany.",
"name": "Doll, Anna",
"orcid": "0000-0002-0799-0831"
},
{
"name": "Buchanan, Colin"
},
Expand Down Expand Up @@ -393,9 +393,14 @@
"orcid": "0000-0003-2766-8425"
},
{
"affiliation": "Department of Psychology, University of Bielefeld, Bielefeld, Germany.",
"name": "Doll, Anna",
"orcid": "0000-0002-0799-0831"
"affiliation": "NIMH, Scientific and Statistical Computing Core",
"name": "Glen, Daniel",
"orcid": "0000-0001-8456-5647"
},
{
"affiliation": "Technische Universit\u00e4t Dresden, Faculty of Medicine, Department of Child and Adolescent Psychiatry",
"name": "Geisler, Daniel",
"orcid": "0000-0003-2076-5329"
},
{
"affiliation": "University of Iowa",
Expand All @@ -406,6 +411,11 @@
"name": "Triplett, William",
"orcid": "0000-0002-9546-1306"
},
{
"affiliation": "The University of Iowa",
"name": "Ghayoor, Ali",
"orcid": "0000-0002-8858-1254"
},
{
"affiliation": "Child Mind Institute",
"name": "Craddock, R. Cameron",
Expand Down Expand Up @@ -450,12 +460,12 @@
"name": "Rothmei, Simon"
},
{
"name": "Weinstein, Alejandro"
"affiliation": "Korea Advanced Institute of Science and Technology",
"name": "Kim, Sin",
"orcid": "0000-0003-4652-3758"
},
{
"affiliation": "The University of Iowa",
"name": "Ghayoor, Ali",
"orcid": "0000-0002-8858-1254"
"name": "Weinstein, Alejandro"
},
{
"affiliation": "University of Pennsylvania",
Expand Down Expand Up @@ -508,6 +518,11 @@
"name": "Linkersd\u00f6rfer, Janosch",
"orcid": "0000-0002-1577-1233"
},
{
"affiliation": "Charite Universitatsmedizin Berlin, Germany",
"name": "Waller, Lea",
"orcid": "0000-0002-3239-6957"
},
{
"name": "Renfro, Mandy"
},
Expand All @@ -521,11 +536,6 @@
{
"name": "K\u00fcttner, Ren\u00e9"
},
{
"affiliation": "Korea Advanced Institute of Science and Technology",
"name": "Kim, Sin",
"orcid": "0000-0003-4652-3758"
},
{
"affiliation": "California Institute of Technology",
"name": "Pauli, Wolfgang M.",
Expand All @@ -536,6 +546,11 @@
"name": "Glen, Daniel",
"orcid": "0000-0001-8456-5647"
},
{
"affiliation": "Florida International University",
"name": "Kimbler, Adam",
"orcid": "0000-0001-5885-9596"
},
{
"affiliation": "University of Pittsburgh",
"name": "Meyers, Benjamin",
Expand All @@ -544,11 +559,6 @@
{
"name": "Tarbert, Claire"
},
{
"affiliation": "Technische Universit\u00e4t Dresden, Faculty of Medicine, Department of Child and Adolescent Psychiatry",
"name": "Geisler, Daniel",
"orcid": "0000-0003-2076-5329"
},
{
"name": "Ginsburg, Daniel"
},
Expand Down
26 changes: 26 additions & 0 deletions doc/changelog/1.X.X-changelog.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,29 @@
1.5.0 (To be determined)
=========================

New feature release in the 1.5.x series.

In this release, the example scripts have been split out into their own package:
`niflow-nipype1-examples <https://github.com/niflows/nipype1-examples>`__.

(`Full changelog <https://github.com/nipy/nipype/milestone/1.5.0?closed=1>`__)

* FIX: Partial rollback of N4BiasFieldCorrection (https://github.com/nipy/nipype/pull/3188)
* FIX: ANTs' tools maintenance overhaul (https://github.com/nipy/nipype/pull/3180)
* FIX: load_resultfile crashes if open resultsfile from crashed job (https://github.com/nipy/nipype/pull/3182)
* FIX: FSL model.py make multiple F-tests (https://github.com/nipy/nipype/pull/3166)
* ENH: Improve workflow connect performance (https://github.com/nipy/nipype/pull/3184)
* ENH: Add ``ConstrainedSphericalDeconvolution`` interface to replace ``EstimateFOD`` for MRtrix3's ``dwi2fod`` (https://github.com/nipy/nipype/pull/3176)
* ENH: Detect values for EulerNumber interface (https://github.com/nipy/nipype/pull/3173)
* ENH: Remove examples from repository (https://github.com/nipy/nipype/pull/3172)
* REF: Prefer math.gcd to hand-rolled Euclid's algorithm (https://github.com/nipy/nipype/pull/3177)
* REF: Removed all uses of numpy_mmap (https://github.com/nipy/nipype/pull/3121)
* DOC: Update links, typos in contributing guide (https://github.com/nipy/nipype/pull/3160)
* DOC: Update SelectFiles docstring to match actual behavior (https://github.com/nipy/nipype/pull/3041)
* DOC: Updated .zenodo.json file (https://github.com/nipy/nipype/pull/3167)
* DOC: Update .zenodo.json (https://github.com/nipy/nipype/pull/3165)
* MNT: Update Zenodo ordering based on commit count (https://github.com/nipy/nipype/pull/3169)

1.4.2 (February 14, 2020)
=========================
(`Full changelog <https://github.com/nipy/nipype/milestone/1.4.2?closed=1>`__)
Expand Down
38 changes: 3 additions & 35 deletions nipype/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,41 +83,9 @@ def check_latest_version(raise_exception=False):
import etelemetry

logger = logging.getLogger("nipype.utils")

INIT_MSG = "Running {packname} version {version} (latest: {latest})".format

latest = {"version": "Unknown", "bad_versions": []}
result = None
try:
result = etelemetry.get_project("nipy/nipype")
except Exception as e:
logger.warning("Could not check for version updates: \n%s", e)
finally:
if result:
latest.update(**result)
if LooseVersion(__version__) != LooseVersion(latest["version"]):
logger.info(
INIT_MSG(
packname="nipype", version=__version__, latest=latest["version"]
)
)
else:
logger.info("No new version available.")
if latest["bad_versions"] and any(
[
LooseVersion(__version__) == LooseVersion(ver)
for ver in latest["bad_versions"]
]
):
message = (
"You are using a version of Nipype with a critical "
"bug. Please use a different version."
)
if raise_exception:
raise RuntimeError(message)
else:
logger.critical(message)
return latest
return etelemetry.check_available_version(
"nipy/nipype", __version__, logger, raise_exception
)


# Run telemetry on import for interactive sessions, such as IPython, Jupyter notebooks, Python REPL
Expand Down
6 changes: 2 additions & 4 deletions nipype/algorithms/tests/test_TSNR.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import pytest
import numpy.testing as npt
import mock
from unittest import mock
import nibabel as nb
import numpy as np
import os
Expand All @@ -16,9 +16,7 @@
class TestTSNR:
""" Note: Tests currently do a poor job of testing functionality """

in_filenames = {
"in_file": "tsnrinfile.nii",
}
in_filenames = {"in_file": "tsnrinfile.nii"}

out_filenames = { # default output file names
"detrended_file": "detrend.nii.gz",
Expand Down
10 changes: 4 additions & 6 deletions nipype/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

# nipype version information
# Remove -dev for release
__version__ = "1.5.0-dev"
__version__ = "1.5.0-rc1.post-dev"


def get_nipype_gitversion():
Expand Down Expand Up @@ -54,12 +54,11 @@ def get_nipype_gitversion():
"License :: OSI Approved :: Apache Software License",
"Operating System :: MacOS :: MacOS X",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Topic :: Scientific/Engineering",
]
PYTHON_REQUIRES = ">= 3.5"
PYTHON_REQUIRES = ">= 3.6"

description = "Neuroimaging in Python: Pipelines and Interfaces"

Expand Down Expand Up @@ -100,7 +99,7 @@ def get_nipype_gitversion():
# versions
NIBABEL_MIN_VERSION = "2.1.0"
NETWORKX_MIN_VERSION = "1.9"
NUMPY_MIN_VERSION = "1.12"
NUMPY_MIN_VERSION = "1.13"
# Numpy bug in python 3.7:
# https://www.opensourceanswers.com/blog/you-shouldnt-use-python-37-for-data-science-right-now.html
NUMPY_MIN_VERSION_37 = "1.15.3"
Expand Down Expand Up @@ -148,7 +147,7 @@ def get_nipype_gitversion():
"simplejson>=%s" % SIMPLEJSON_MIN_VERSION,
"traits>=%s,!=5.0" % TRAITS_MIN_VERSION,
"filelock>=3.0.0",
"etelemetry",
"etelemetry>=0.2.0",
]

# neurdflib has to come after prov
Expand All @@ -158,7 +157,6 @@ def get_nipype_gitversion():
TESTS_REQUIRES = [
"codecov",
"coverage<5",
"mock",
"pytest",
"pytest-cov",
"pytest-env",
Expand Down
15 changes: 15 additions & 0 deletions nipype/interfaces/ants/registration.py
Original file line number Diff line number Diff line change
Expand Up @@ -591,12 +591,18 @@ class RegistrationOutputSpec(TraitedSpec):
forward_transforms = traits.List(
File(exists=True), desc="List of output transforms for forward registration"
)
reverse_forward_transforms = traits.List(
File(exists=True), desc="List of output transforms for forward registration reversed for antsApplyTransform"
)
reverse_transforms = traits.List(
File(exists=True), desc="List of output transforms for reverse registration"
)
forward_invert_flags = traits.List(
traits.Bool(), desc="List of flags corresponding to the forward transforms"
)
reverse_forward_invert_flags = traits.List(
traits.Bool(), desc="List of flags corresponding to the forward transforms reversed for antsApplyTransform"
)
reverse_invert_flags = traits.List(
traits.Bool(), desc="List of flags corresponding to the reverse transforms"
)
Expand Down Expand Up @@ -797,6 +803,8 @@ class Registration(ANTSCommand):
'inverse_composite_transform': '...data/output_InverseComposite.h5',
'inverse_warped_image': <undefined>,
'metric_value': <undefined>,
'reverse_forward_invert_flags': [],
'reverse_forward_transforms': [],
'reverse_invert_flags': [],
'reverse_transforms': [],
'save_state': '...data/trans.mat',
Expand Down Expand Up @@ -826,6 +834,9 @@ class Registration(ANTSCommand):
'inverse_composite_transform': <undefined>,
'inverse_warped_image': <undefined>,
'metric_value': <undefined>,
'reverse_forward_invert_flags': [False, False],
'reverse_forward_transforms': ['...data/output_1Warp.nii.gz',
'...data/output_0GenericAffine.mat'],
'reverse_invert_flags': [True, False],
'reverse_transforms': ['...data/output_0GenericAffine.mat', \
'...data/output_1InverseWarp.nii.gz'],
Expand Down Expand Up @@ -1472,6 +1483,10 @@ def _list_outputs(self):
outputs["metric_value"] = self._metric_value
if self._elapsed_time:
outputs["elapsed_time"] = self._elapsed_time

outputs["reverse_forward_transforms"] = outputs["forward_transforms"][::-1]
outputs["reverse_forward_invert_flags"] = outputs["forward_invert_flags"][::-1]

return outputs


Expand Down
Loading