Skip to content

added SPM12's new Normalize routine and updated version info and manual links #986

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

Merged
merged 11 commits into from
Nov 5, 2014

Conversation

miykael
Copy link
Collaborator

@miykael miykael commented Nov 1, 2014

No description provided.

@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling 0e1b497 on miykael:master into 636f32a on nipy:master.

@miykael miykael changed the title small SPM12 updates (version info and manual links) added SPM12's new Normalize routine and updated version info and manual links Nov 1, 2014
desc='file y_*.nii containing 3 deformation fields for the deformation in x, y and z dimension',
copyfile=False)
jobtype = traits.Enum('estwrite', 'est', 'write',
desc='one of: est, write, estwrite (opt, estwrite)',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't need to put opt or defaults anymore in description, the help generator automatically does this.

@satra
Copy link
Member

satra commented Nov 1, 2014

looks good overall - could you please run through PEP8 fixes and make sure the tests pass. since this is a new interface, when you run make specs it will create a new test_auto_Normalize12.py file that should be added to the repo. (check using git status)

@miykael
Copy link
Collaborator Author

miykael commented Nov 1, 2014

Thank you @satra for the feedback and sorry for the commit chaos, I had a bit of a mixup.
I've done PEP8 check for my changes as well as for some other parts of spm's preprocess.py and included the test_auto_Normalize12.py file.

But the running of make specs also generates a file called nipype/algorithms/tests/test_auto_Overlap.py. I don't see a direct link between my commit and this file, does it also have to be commited?

Here's the content of this file:

# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from nipype.testing import assert_equal
from nipype.algorithms.misc import Overlap

def test_Overlap_inputs():
    input_map = dict(bg_overlap=dict(mandatory=True,
    usedefault=True,
    ),
    ignore_exception=dict(nohash=True,
    usedefault=True,
    ),
    mask_volume=dict(),
    out_file=dict(usedefault=True,
    ),
    vol_units=dict(mandatory=True,
    usedefault=True,
    ),
    volume1=dict(mandatory=True,
    ),
    volume2=dict(mandatory=True,
    ),
    weighting=dict(usedefault=True,
    ),
    )
    inputs = Overlap.input_spec()

    for key, metadata in input_map.items():
        for metakey, value in metadata.items():
            yield assert_equal, getattr(inputs.traits()[key], metakey), value

def test_Overlap_outputs():
    output_map = dict(dice=dict(),
    diff_file=dict(),
    jaccard=dict(),
    labels=dict(),
    roi_di=dict(),
    roi_ji=dict(),
    roi_voldiff=dict(),
    volume_difference=dict(),
    )
    outputs = Overlap.output_spec()

    for key, metadata in output_map.items():
        for metakey, value in metadata.items():
            yield assert_equal, getattr(outputs.traits()[key], metakey), value

@chrisgorgo
Copy link
Member

Interesting. When I do make specs it does not generate this file. However I get a message that Overlap has a nonautotests. Presumably autotests are not generated if there are other tests for the class? right @satra?

$ make specs
Checking specs and autogenerating spec tests
python tools/checkspecs.py
141101-21:47:40,38 workflow DEBUG:
     networkx 1.4 dev or higher detected
Overlap has nonautotest
Overlap has nonautotest
Please install cfflib to use the connectome file format converter
BEDPOSTX has nonautotest
XFibres has nonautotest
FILMGLS has nonautotest
nipype.interfaces.slicer.surface:ModelMaker:Outputs:modelSceneFile:exists

satra added 2 commits November 4, 2014 08:42
* upstream/master:
  fix: ensure ipython engine is not left in an undefined directory - closes nipy#983
  Updated ApplyTransform Specs
  fixed ants ApplyTransformInputSpec
  fix error
  Enable lowb greater than zero in b0_average
@satra
Copy link
Member

satra commented Nov 4, 2014

@miykael - could you please also update the CHANGES file with these lines:

* ENH: SPM12 Normalize interface (https://github.com/nipy/nipype/pull/986)
* FIX: Utility interface test dir (https://github.com/nipy/nipype/pull/986)
* FIX: IPython engine directory reset after crash (https://github.com/nipy/nipype/pull/987)

i know that last one didn't happen with this PR, but just getting things up to speed. we will try to adopt this style for any future merges.

@satra
Copy link
Member

satra commented Nov 4, 2014

@miykael - can you merge my pull request too?

@miykael
Copy link
Collaborator Author

miykael commented Nov 4, 2014

sorry, didn't see your merge. should be all done now.

@satra
Copy link
Member

satra commented Nov 4, 2014

@chrisfilo - just to answer the question on nonautotest - for any interface if there is a test file in the tests directory named test_interfacename.py it will override the generation of the automatic test for that interface when make specs is run. this allows us to create specific tests for certain interfaces that are sensitive to versions of installed software.

satra added a commit that referenced this pull request Nov 5, 2014
added SPM12's new Normalize routine and updated version info and manual links
@satra satra merged commit 1e56c91 into nipy:master Nov 5, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants