Skip to content

GA-169 | rename graph_name to name #38

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 9 commits into from
Aug 21, 2024
Merged

GA-169 | rename graph_name to name #38

merged 9 commits into from
Aug 21, 2024

Conversation

hkernbach
Copy link
Member

No description provided.

@hkernbach hkernbach marked this pull request as ready for review August 20, 2024 17:39
@hkernbach hkernbach requested a review from aMahanna August 20, 2024 17:39
@aMahanna aMahanna changed the title first commit graph name var to name only rename graph_name to name Aug 20, 2024
aMahanna
aMahanna previously approved these changes Aug 20, 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.

Looks good! just one small addition needed

@aMahanna aMahanna changed the title rename graph_name to name GA-169 | rename graph_name to name Aug 20, 2024
@aMahanna
Copy link
Member

Thinking about this again, we should make sure that the name cannot be modified once it is set.

i.e this should not be possible:

import nx_arangodb as nxadb

G = nxadb.Graph(name='myGraph')
G.add_node(...)
G.add_edge(...)

G.name = 'myNewGraph'
# or
G.graph["name"] = 'myNewGraph'

This should be possible if we add an override for the setter method: https://github.com/networkx/networkx/blob/main/networkx/classes/graph.py#L400-L412

@hkernbach hkernbach requested a review from aMahanna August 21, 2024 14:25
@aMahanna aMahanna merged commit 4320293 into main Aug 21, 2024
4 checks passed
@aMahanna aMahanna deleted the feature/GA-169 branch August 21, 2024 14:33
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