Closed XertroV closed 9 months ago
Thanks for noting this out.
I agree than node binding approach is bad design, and when you modify graph you need to use this helper functions all around. I will add methods for adding and removing node to the Graph
api. This is discussed here #135.
The readme and examples use
g.add_node(..)
instead ofadd_node(g, ..)
. Or at the very least it should specify that if you update the graph later you need to need to use that helper function.Though IDK why it isn't implemented on
Graph
, that would make more sense.This isn't at all obvious is you are initializing an empty graph and building it from a live data source.
If you don't do this, you run into all kinds of issues like the
.unwrap()
s infn id()
s.Might make some PRs