Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
7b2b350
move _exists_in_path to filemanip, and update
oesteban Nov 22, 2017
f6f97b6
use nipype's which in nifty package
oesteban Nov 22, 2017
a984f9f
ensure which call in ants/segmentation is correct)
oesteban Nov 22, 2017
8b56e12
ensure which calls in interfaces/base are correct
oesteban Nov 22, 2017
6676d22
cleaning up imports
oesteban Nov 22, 2017
d6a4b90
move from base with deprecation the load_template method
oesteban Nov 23, 2017
833d716
mv Multi- traits to traits_extension
oesteban Nov 23, 2017
82411ae
deep refactor of nipype.interfaces.base
oesteban Nov 23, 2017
d9c7f3d
fix final errors and wrong imports
oesteban Nov 23, 2017
d663e2f
test passing locally
oesteban Nov 23, 2017
8629376
remove some unicode prefixes
oesteban Nov 23, 2017
6949323
simplify fname_presuffix adding test
oesteban Nov 23, 2017
4e37641
run test in temp directory
oesteban Nov 23, 2017
672d1a0
add some docstrings
oesteban Nov 23, 2017
92a8ce5
fixup DictStrStr
oesteban Nov 26, 2017
3b83940
member could be function, and use filemanip.hash_infile
oesteban Nov 26, 2017
59ae74c
amend to previous commit
oesteban Nov 26, 2017
290eb77
minor fixes
oesteban Nov 26, 2017
67491af
Merge remote-tracking branch 'upstream/master' into ref/interface-base
oesteban Nov 29, 2017
e5bb856
Merge branch 'ref/interface-base' of github.com:oesteban/nipype into …
oesteban Nov 29, 2017
281c0e7
Merge remote-tracking branch 'upstream/master' into ref/interface-base
oesteban Dec 2, 2017
5758373
change dict_ when they are list_
oesteban Dec 2, 2017
b454961
set base_dir
oesteban Dec 3, 2017
98f5c31
move fsl.model templates
oesteban Dec 3, 2017
79c22ee
final fixes
oesteban Dec 3, 2017
9147408
move tests, update specs
oesteban Dec 4, 2017
86792b9
split huge test_base into pieces
oesteban Dec 4, 2017
15cd86f
fix imports in new tests
oesteban Dec 4, 2017
609c505
Merge branch 'ref/interface-base' of github.com:oesteban/nipype into …
oesteban Dec 4, 2017
50580aa
fix tests
oesteban Dec 4, 2017
5512779
update specs [skip ci]
oesteban Dec 5, 2017
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix final errors and wrong imports
  • Loading branch information
oesteban committed Nov 23, 2017
commit d9c7f3d24a44a94cbbbf9ad297afbef7b4de934e
8 changes: 5 additions & 3 deletions nipype/interfaces/base/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,19 @@

"""
from .core import (
BaseInterface, SimpleInterface, CommandLine, StdOutCommandLine,
Interface, BaseInterface, SimpleInterface,
CommandLine, StdOutCommandLine,
MpiCommandLine, SEMLikeCommandLine, PackageInfo
)

from .specs import (
BaseTraitedSpec, BaseInterfaceInputSpec, CommandLineInputSpec,
BaseTraitedSpec, TraitedSpec, DynamicTraitedSpec,
BaseInterfaceInputSpec, CommandLineInputSpec,
)

from .traits_extension import (
traits, Undefined, TraitDictObject, TraitListObject, TraitError, isdefined,
File, Directory, Str, DictStrStr, has_metadata, ImageFile,
MultiPath, OutputMultiPath, InputMultiPath)

from .support import load_template
from .support import Bunch, InterfaceResult, load_template
2 changes: 1 addition & 1 deletion nipype/interfaces/base/specs.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,7 @@ class TraitedSpec(BaseTraitedSpec):

This is used in 90% of the cases.
"""
_ = traits.Disallow


class BaseInterfaceInputSpec(TraitedSpec):
Expand Down Expand Up @@ -354,7 +355,6 @@ def __deepcopy__(self, memo):
dup = self.clone_traits(memo=memo)
dup.trait_set(**dup_dict)
return dup
_ = traits.Disallow


class CommandLineInputSpec(BaseInterfaceInputSpec):
Expand Down
4 changes: 2 additions & 2 deletions nipype/pipeline/engine/nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@
copyfiles, fnames_presuffix, loadpkl,
split_filename, load_json, savepkl,
write_rst_header, write_rst_dict,
write_rst_list, to_str)
write_rst_list, to_str, md5)
from ...interfaces.base import (traits, InputMultiPath, CommandLine,
Undefined, TraitedSpec, DynamicTraitedSpec,
Bunch, InterfaceResult, md5, Interface,
Bunch, InterfaceResult, Interface,
TraitDictObject, TraitListObject, isdefined)
from .utils import (generate_expanded_graph, modify_paths,
export_graph, make_output_dir, write_workflow_prov,
Expand Down
4 changes: 2 additions & 2 deletions nipype/pipeline/engine/workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@
from ...utils.functions import (getsource, create_function_from_source)
from ...interfaces.base import (traits, InputMultiPath, CommandLine,
Undefined, TraitedSpec, DynamicTraitedSpec,
Bunch, InterfaceResult, md5, Interface,
Bunch, InterfaceResult, Interface,
TraitDictObject, TraitListObject, isdefined)

from ...utils.filemanip import (save_json, FileNotFoundError,
from ...utils.filemanip import (save_json, FileNotFoundError, md5,
filename_to_list, list_to_filename,
copyfiles, fnames_presuffix, loadpkl,
split_filename, load_json, savepkl,
Expand Down
6 changes: 3 additions & 3 deletions nipype/utils/filemanip.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@

from .. import logging, config
from .misc import is_container
from ..interfaces.traits_extension import isdefined

from future import standard_library
standard_library.install_aliases()

Expand Down Expand Up @@ -181,7 +179,9 @@ def fname_presuffix(fname, prefix='', suffix='', newpath=None, use_ext=True):
pth, fname, ext = split_filename(fname)
if not use_ext:
ext = ''
if newpath and isdefined(newpath):

# Avoid cyclic references importing isdefined
if newpath and ('%s' % newpath) != '<undefined>':
pth = os.path.abspath(newpath)
return os.path.join(pth, prefix + fname + suffix + ext)

Expand Down