https://prefect.io logo
Title
k

Kyle Foreman (Convoy)

11/14/2019, 11:27 PM
any suggested design patterns for creating libraries of reusable flows? I.e. if I want to wrap up
A -> B -> C
so that user 1 can create
A -> B -> C -> X1 -> Y1
and user 2 can create
A -> B -> C -> Q2
by simply importing and building off an existing
A -> B -> C
flow?
c

Chris White

11/14/2019, 11:31 PM
Someone else should definitely chime in here, but the
update
method on Flows would most likely be useful for a pattern like this: https://docs.prefect.io/api/unreleased/core/flow.html#prefect-core-flow-flow-update
k

Kyle Foreman (Convoy)

11/14/2019, 11:37 PM
ah, cool!
j

Jeremiah

11/15/2019, 12:32 AM
@Kyle Foreman (Convoy) this is a pattern we definitely want to promote, so please suggest APIs that would be helpful to you!
k

Kyle Foreman (Convoy)

11/15/2019, 12:36 AM
in terms of discoverability, I searched the docs for both
merge
and
union
since I was trying to think of relevant graph terms and
update
didn't show up for either - maybe adding one of those terms to the docstring on
update
would help?
j

Jeremiah

11/15/2019, 12:36 AM
Interesting idea thanks
We chose
update
to mimic the dict API but we’ll definitely work to make it more discoverable and that’s a great starting place
k

Kyle Foreman (Convoy)

11/15/2019, 12:39 AM
ah, gotcha - I think of Prefect more in terms of graphs than dicts, so I didn't even think of that
j

Jeremiah

11/15/2019, 1:01 AM
See that’s good insight right there 😉 appreciate the feedback!