-
Notifications
You must be signed in to change notification settings - Fork 4
nxadb_to_nx cleanup #32
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
Conversation
need to revisit failing assertions ASAP
G_NX._node = node_dict | ||
|
||
if isinstance(G_NX, nx.DiGraph): | ||
G_NX._succ = G._adj = adj_dict["succ"] | ||
G_NX._succ = G_NX._adj = adj_dict["succ"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was the bug culprit. I mistakenly overwrote the _adj
of the nxadb.Graph
object 😨
# NOTE: At this point, we _could_ choose to implement something similar to | ||
# NodeDict._fetch_all() and AdjListOuterDict._fetch_all() to iterate through | ||
# **node_dict** and **adj_dict**, and establish the "custom" Dictionary classes | ||
# that we've implemented in nx_arangodb.classes.dict. | ||
# However, this would involve adding additional for-loops and would likely be | ||
# slower than the current implementation. | ||
# Perhaps we should consider adding a feature flag to allow users to choose | ||
# between the two methods? e.g `build_remote_dicts=True/False` | ||
# If True, then we would return the (updated) nxadb.Graph that was passed in. | ||
# If False, then we would return the nx.Graph that is built below: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this would be an interesting point of discussion to address in a separate PR as an improvement
nxadb_to_nx
to return the easiest graph whenever possiblenxadb_to_nx
(and re-addressestest_algorithm
assertions because of this)