Skip to content

[GA-157] Recursive GraphDict #17

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

Merged
merged 13 commits into from
Aug 2, 2024
Merged

[GA-157] Recursive GraphDict #17

merged 13 commits into from
Aug 2, 2024

Conversation

hkernbach
Copy link
Member

No description provided.

@hkernbach hkernbach marked this pull request as ready for review July 31, 2024 11:31
@hkernbach hkernbach requested a review from aMahanna July 31, 2024 11:31
@hkernbach hkernbach changed the title Recursive GraphDict [GA-157] Recursive GraphDict Jul 31, 2024
Copy link
Member

@aMahanna aMahanna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Encountered some unexpected behaviour with this snippet:

import nx_arangodb as nxadb
G_adb = nxadb.Graph(
    graph_name="KarateGraph",
    foo="bar",
    bar={"a":4},
)

G_adb.graph["bar"] = {"b": 5} # expecting "bar" to be set to {"b": 5}, but it is {"a": 4, "b": 5}
G_adb.graph["bar"]["b"] = 6 # "b" is now 6, but it has been also duplicated at the top-level of the graph document
G_adb.clear() # Clear the local graph cache (i.e clear G.graph.data)
G_adb.graph["bar"] # fails with KeyError: 'bar'

@hkernbach
Copy link
Member Author

import nx_arangodb as nxadb
G_adb = nxadb.Graph(
graph_name="KarateGraph",
foo="bar",
bar={"a":4},
)

G_adb.graph["bar"] = {"b": 5} # expecting "bar" to be set to {"b": 5}, but it is {"a": 4, "b": 5}
G_adb.graph["bar"]["b"] = 6 # "b" is now 6, but it has been also duplicated at the top-level of the graph document
G_adb.clear() # Clear the local graph cache (i.e clear G.graph.data)
G_adb.graph["bar"] # fails with KeyError: 'bar'

This behavior got fixed by the commits which will arrive now.

Copy link
Member

@aMahanna aMahanna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 🚀

@aMahanna aMahanna merged commit 867ac10 into main Aug 2, 2024
2 checks passed
@aMahanna aMahanna deleted the feat/GA-157 branch August 2, 2024 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants