The examples follow directly from the previous chapter examples. The comment is well-taken, but perhaps should apply to the that chapter as well.

One word of caution: Since IdentityInterface nodes are excised from the execution graph, examples might not work the same when using II nodes.

Fred

From: Michael Waskom <notifications@github.com<mailto:notifications@github.com>>
Reply-To: nipy/nipype <reply@reply.github.com<mailto:reply@reply.github.com>>
Date: Sunday, September 15, 2013 7:49 PM
To: nipy/nipype <nipype@noreply.github.com<mailto:nipype@noreply.github.com>>
Cc: Me <loneyf@ohsu.edu<mailto:loneyf@ohsu.edu>>
Subject: Re: [nipype] Rebased version of JoinNode PR (#658)


In doc/users/joinnode_and_itersource.rst:

> +
> +  import nipype.pipeline.engine as pe
> +  a = pe.Node(interface=A(), name="a")
> +  b = pe.Node(interface=B(), name="b")
> +  b.iterables = ("in_file", images)
> +  c = pe.Node(interface=C(), name="c")
> +  d = pe.JoinNode(interface=D(), joinsource="b",
> +                  joinfield="in_files", name="d")
> +
> +  my_workflow = pe.Workflow(name="my_workflow")
> +  my_workflow.connect([(a,b,[('subject','subject')]),
> +                       (b,c,[('out_file','in_file')])
> +                       (c,d,[('out_file','in_files')])
> +                       ])
> +
> +This example assumes that interface "A" has one output *subject*,


This whole thing might be more explicit/easier to follow if the example nodes were IdentityInterface or Function nodes where the input and output names are part of the interface declaration.

—
Reply to this email directly or view it on GitHub<https://github.com/nipy/nipype/pull/658/files#r6369257>.