Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
0fb1349
added ConditionalNode
oesteban Dec 14, 2015
a12ab6d
add ConditionalNode import
oesteban Dec 14, 2015
923fba6
simplify doctest for ConditionalNode
oesteban Dec 14, 2015
3fc9845
fix error when importing ConditionalNode
oesteban Dec 14, 2015
080446a
add new CheckInterface
oesteban Dec 14, 2015
0af3ce0
fixing doctests
oesteban Dec 14, 2015
b18b361
add new documentation file
oesteban Dec 14, 2015
a7ec6bb
initialize documentation for runtime decisions
oesteban Dec 14, 2015
3e98c37
introduce CachedWorkflows in documentation
oesteban Dec 14, 2015
f9a8f1c
get node inputs individually
oesteban Dec 14, 2015
d421182
add CachedWorkflow
oesteban Dec 14, 2015
ce3892e
undo rewrite of _get_inputs
oesteban Dec 14, 2015
9af37c1
an early functional version of CachedWorkflows
oesteban Dec 14, 2015
9e52d59
fix build AttributeError _check_result
oesteban Dec 14, 2015
72a4f51
add ConditionalWorkflow and derived CachedWorkflow from it
oesteban Dec 15, 2015
cdc27d7
final improvements
oesteban Dec 15, 2015
cc75ff7
Merge branch 'fix/CheckInputsLoggingHashDiff' into enh/ControlNodes
oesteban Dec 15, 2015
5094349
update CHANGES
oesteban Dec 15, 2015
b8e7c0c
Merge branch 'master' into enh/ControlNodes
oesteban Dec 15, 2015
b9b7c74
improve error message
oesteban Dec 15, 2015
7013b47
add tests
oesteban Dec 15, 2015
6f3a3aa
improve information reporting failed connection
oesteban Dec 15, 2015
b863fc0
simplifiy conditionalworkflow
oesteban Dec 16, 2015
9440077
Split nodes and workflows in engine
oesteban Dec 16, 2015
993039d
refactoring pipeline.engine
oesteban Dec 16, 2015
57684f2
cleaner implementation of ConditionalNode
oesteban Dec 16, 2015
b246756
refactoring control nodes and workflow
oesteban Dec 17, 2015
f260a88
adding new connection types (data, control)
oesteban Dec 18, 2015
4cb5aaf
fix use of logger before definition
oesteban Dec 18, 2015
1d3f580
Integrating CachedWorkflows in new engine
oesteban Dec 18, 2015
d318a7c
fix tests
oesteban Dec 18, 2015
84ae0f0
fix imports for tests
oesteban Dec 18, 2015
cbf10aa
fix several errors
oesteban Dec 18, 2015
5fc702d
Merge branch 'master' into enh/ControlNodes
oesteban Dec 18, 2015
7f32b1b
Solving too many values to unpack and imports
oesteban Dec 18, 2015
0a6512d
fixing paths and imports ...
oesteban Dec 18, 2015
d055d30
fixing errors and doctests
oesteban Dec 18, 2015
8d83ad7
temporarily disable specific tests
oesteban Dec 18, 2015
7fe023f
fix __init__
oesteban Dec 18, 2015
df5310e
add doctest for disable signal
oesteban Dec 19, 2015
d4d526e
add regression test
oesteban Dec 19, 2015
633705e
add testing nested workflows and disable
oesteban Dec 19, 2015
9fa9fc7
add regression test for CachedWorkflow
oesteban Dec 20, 2015
19e2d58
add new tests, fix workflows
oesteban Dec 20, 2015
ab1c59b
fix doctest
oesteban Dec 20, 2015
2d5728d
fixing logical errors in connect()
oesteban Dec 21, 2015
1d52259
add test case
oesteban Dec 21, 2015
2986f62
fix exception not raised
oesteban Dec 21, 2015
3f8f5f2
still fixing tests
oesteban Dec 21, 2015
0f6615b
fix error checking if workflow contains itself
oesteban Dec 21, 2015
d6894b2
CachedWorkflow test does not crash now
oesteban Dec 21, 2015
3dd5464
use sets to gather workflow inputs
oesteban Dec 21, 2015
d2c322e
report all duplicated connections
oesteban Dec 21, 2015
71edbdb
for some reason these tests would not pass
oesteban Dec 21, 2015
9c10acd
restore old tests, several fixes
oesteban Dec 22, 2015
c75788f
fix last test failing
oesteban Dec 22, 2015
d62950b
update documentation, fix error in circleci
oesteban Dec 22, 2015
a84fe07
propagate signals first
oesteban Dec 22, 2015
1726c85
Add signals to report
oesteban Dec 23, 2015
65378f3
add _control attr to fix race condition in nesting like
oesteban Dec 23, 2015
308f568
fix writting signals to report
oesteban Dec 23, 2015
010e6da
Merge branch 'master' into enh/ControlNodes
oesteban Dec 26, 2015
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
Solving too many values to unpack and imports
  • Loading branch information
oesteban committed Dec 18, 2015
commit 7f32b1b51cc61cd3e437676d3a340c91ec356ead
4 changes: 2 additions & 2 deletions nipype/pipeline/engine/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -665,8 +665,8 @@ def make_field_func(*pair):
# the (source, destination) field tuples
connects = newdata['connect']
# the join fields connected to the source
join_fields = [field for _, field in connects
if field in jnode.joinfield]
join_fields = [c[1] for c in connects
if c[1] in jnode.joinfield]
# the {field: slot fields} maps assigned to the input
# node, e.g. {'image': 'imageJ3', 'mask': 'maskJ3'}
# for the third join source expansion replicate of a
Expand Down
71 changes: 27 additions & 44 deletions nipype/pipeline/engine/tests/test_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ def test_connect():

yield assert_true, mod1 in pipe._graph.nodes()
yield assert_true, mod2 in pipe._graph.nodes()
yield assert_equal, pipe._graph.get_edge_data(mod1, mod2), {'connect': [('output1', 'input1')]}
yield assert_equal, pipe._graph.get_edge_data(
mod1, mod2), {'connect': [('output1', 'input1', 'data')]}


def test_add_nodes():
Expand Down Expand Up @@ -514,27 +515,21 @@ def test_mapnode_nested():
cwd = os.getcwd()
wd = mkdtemp()
os.chdir(wd)
from nipype import MapNode, Function
from nipype import Function

def func1(in1):
return in1 + 1
n1 = MapNode(Function(input_names=['in1'],
output_names=['out'],
function=func1),
iterfield=['in1'],
nested=True,
name='n1')
n1 = pe.MapNode(Function(
input_names=['in1'], output_names=['out'], function=func1),
iterfield=['in1'], nested=True, name='n1')
n1.inputs.in1 = [[1, [2]], 3, [4, 5]]
n1.run()
print(n1.get_output('out'))
yield assert_equal, n1.get_output('out'), [[2, [3]], 4, [5, 6]]

n2 = MapNode(Function(input_names=['in1'],
output_names=['out'],
function=func1),
iterfield=['in1'],
nested=False,
name='n1')
n2 = pe.MapNode(Function(
input_names=['in1'], output_names=['out'], function=func1),
iterfield=['in1'], nested=False, name='n1')
n2.inputs.in1 = [[1, [2]], 3, [4, 5]]
error_raised = False
try:
Expand All @@ -556,14 +551,10 @@ def func1():

def func2(a):
return a + 1
n1 = pe.Node(Function(input_names=[],
output_names=['a'],
function=func1),
name='n1')
n2 = pe.Node(Function(input_names=['a'],
output_names=['b'],
function=func2),
name='n2')
n1 = pe.Node(Function(
input_names=[], output_names=['a'], function=func1), name='n1')
n2 = pe.Node(Function(
input_names=['a'], output_names=['b'], function=func2), name='n2')
w1 = pe.Workflow(name='test')
modify = lambda x: x + 1
n1.inputs.a = 1
Expand Down Expand Up @@ -617,14 +608,10 @@ def func1():

def func2(a):
return a + 1
n1 = pe.Node(Function(input_names=[],
output_names=['a'],
function=func1),
name='n1')
n2 = pe.Node(Function(input_names=['a'],
output_names=['b'],
function=func2),
name='n2')
n1 = pe.Node(Function(
input_names=[], output_names=['a'], function=func1), name='n1')
n2 = pe.Node(Function(
input_names=['a'], output_names=['b'], function=func2), name='n2')
w1 = pe.Workflow(name='test')
modify = lambda x: x + 1
n1.inputs.a = 1
Expand All @@ -650,17 +637,15 @@ def test_mapnode_json():
cwd = os.getcwd()
wd = mkdtemp()
os.chdir(wd)
from nipype import MapNode, Function, Workflow
from nipype import Function

def func1(in1):
return in1 + 1
n1 = MapNode(Function(input_names=['in1'],
output_names=['out'],
function=func1),
iterfield=['in1'],
name='n1')
n1 = pe.MapNode(Function(
input_names=['in1'], output_names=['out'], function=func1),
iterfield=['in1'], name='n1')
n1.inputs.in1 = [1]
w1 = Workflow(name='test')
w1 = pe.Workflow(name='test')
w1.base_dir = wd
w1.config['execution']['crashdump_dir'] = wd
w1.add_nodes([n1])
Expand Down Expand Up @@ -693,18 +678,16 @@ def test_serial_input():
cwd = os.getcwd()
wd = mkdtemp()
os.chdir(wd)
from nipype import MapNode, Function, Workflow
from nipype import Function

def func1(in1):
return in1
n1 = MapNode(Function(input_names=['in1'],
output_names=['out'],
function=func1),
iterfield=['in1'],
name='n1')
n1 = pe.MapNode(Function(
input_names=['in1'], output_names=['out'],
function=func1), iterfield=['in1'], name='n1')
n1.inputs.in1 = [1, 2, 3]

w1 = Workflow(name='test')
w1 = pe.Workflow(name='test')
w1.base_dir = wd
w1.add_nodes([n1])
# set local check
Expand Down