Skip to content

Commit

Permalink
Merge pull request #164 from effigies/dev_version
Browse files Browse the repository at this point in the history
Dev version: Use last release + 0.0.1 + '-dev'
  • Loading branch information
effigies authored May 25, 2017
2 parents e5fff38 + e042944 commit 1d87134
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 7 deletions.
11 changes: 9 additions & 2 deletions niworkflows/anat/mni.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import shutil
import pkg_resources as pkgr
from multiprocessing import cpu_count
from packaging.version import Version

from nipype.interfaces.ants.registration import Registration, RegistrationOutputSpec
from nipype.interfaces.ants.resampling import ApplyTransforms
Expand All @@ -16,19 +17,25 @@
File, InputMultiPath)

from niworkflows.data import getters
from niworkflows import __packagename__, NIWORKFLOWS_LOG
from niworkflows import __packagename__, NIWORKFLOWS_LOG, __version__

niworkflows_version = Version(__version__)


import nibabel as nb
import numpy as np

class RobustMNINormalizationInputSpec(BaseInterfaceInputSpec):
# Enable deprecation
package_version = niworkflows_version

moving_image = File(exists=True, mandatory=True, desc='image to apply transformation to')
reference_image = File(exists=True, desc='override the reference image')
moving_mask = File(exists=True, desc='moving image mask')
reference_mask = File(exists=True, desc='reference image mask')
num_threads = traits.Int(cpu_count(), usedefault=True, nohash=True,
desc="Number of ITK threads to use")
testing = traits.Bool(False, deprecated='99.99.99', desc='use testing settings')
testing = traits.Bool(False, deprecated='0.0.7', desc='use testing settings')
flavor = traits.Enum('precise', 'testing', 'fast', usedefault=True,
desc='registration settings parameter set')
orientation = traits.Enum('RAS', 'LAS', mandatory=True, usedefault=True,
Expand Down
4 changes: 2 additions & 2 deletions niworkflows/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from __future__ import absolute_import, division, print_function
import datetime

__version__ = '99.99.99'
__version__ = '0.0.7-dev'
__packagename__ = 'niworkflows'
__author__ = 'The CRN developers'
__copyright__ = 'Copyright {}, Center for Reproducible Neuroscience, Stanford University'.format(
Expand Down Expand Up @@ -40,7 +40,7 @@
]

REQUIRES = ['nipype', 'future', 'nilearn>=0.2.6', 'sklearn', 'pandas', 'matplotlib',
'jinja2', 'svgutils', 'tinycss']
'jinja2', 'svgutils', 'tinycss', 'packaging']
SETUP_REQUIRES = []
REQUIRES += SETUP_REQUIRES

Expand Down
14 changes: 12 additions & 2 deletions niworkflows/tests/test_reports.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@
import pkg_resources as pkgr
from multiprocessing import cpu_count
from shutil import copy
import warnings

import nibabel as nb
from nilearn import image
from nipype.utils.tmpdirs import InTemporaryDirectory
from nibabel.testing import clear_and_catch_warnings


from niworkflows.data.getters import (get_mni_template_ras, get_ds003_downsampled,
Expand Down Expand Up @@ -107,16 +109,24 @@ def test_BBRegisterRPT(self):
def test_RobustMNINormalizationRPT(self):
""" the RobustMNINormalizationRPT report capable test """
ants_rpt = RobustMNINormalizationRPT(
generate_report=True, moving_image=self.moving, testing=True)
generate_report=True, moving_image=self.moving, flavor='testing')
_smoke_test_report(ants_rpt, 'testRobustMNINormalizationRPT.svg')

def test_RobustMNINormalizationRPT_masked(self):
""" the RobustMNINormalizationRPT report capable test with masking """
ants_rpt = RobustMNINormalizationRPT(
generate_report=True, moving_image=self.moving,
reference_mask=self.reference_mask, testing=True)
reference_mask=self.reference_mask, flavor='testing')
_smoke_test_report(ants_rpt, 'testRobustMNINormalizationRPT_masked.svg')

def test_RobustMNINormalizationRPT_deprecation(self):
with clear_and_catch_warnings() as w:
warnings.simplefilter('always', UserWarning)
assert len(w) == 0
RobustMNINormalizationRPT(
generate_report=True, moving_image=self.moving, testing=True)
assert len(w) == 1

def test_ANTSRegistrationRPT(self):
""" the RobustMNINormalizationRPT report capable test """
ants_rpt = ANTSRegistrationRPT(
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
-e git+https://github.com/nipy/nipype.git@cda3fdc3be231f2c9d7bdbdbadee472a0bad9e92#egg=nipype
-e git+https://github.com/nipy/nipype.git@c13f967506aa426c63ad4131cf29b655f742649c#egg=nipype

0 comments on commit 1d87134

Please sign in to comment.