Skip to content
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

Doc: Orphan Nodes / Chains incorrect #370

Open
Guilherme-B opened this issue Mar 3, 2020 · 1 comment
Open

Doc: Orphan Nodes / Chains incorrect #370

Guilherme-B opened this issue Mar 3, 2020 · 1 comment

Comments

@Guilherme-B
Copy link

As far as I can tell, the guide present in the Orphan Nodes / Chains is incorrect, or at least, not compliant with the current lib version.

Consider the following base:

def gen():
    yield 'asda'
    yield 'another1'
    
def upper(x):
    return x.upper()

def show(x):
    print(x)

Chaining directly:

graph = bonobo.Graph()
graph.add_chain(gen, upper, show)
bonobo.run(graph)

works just fine, prints the upper cased data as expected. However, applying the tutorial directly:

graph = bonobo.Graph()

graph.add_node(gen)
graph.add_node(upper)
graph.add_node(show)

graph.add_chain(_input = gen, _output = upper)
graph.add_chain(_input= upper, _output= show)

bonobo.run(graph)

And no output is given. The nodes seem to run independently, not being connected in any way - unfortunately I cannot test it with GraphViz.

@hartym
Copy link
Member

hartym commented Apr 30, 2020

Hello.

Would you be so kind to propose a documentation patch about this?

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants