Skip to content

Instantly share code, notes, and snippets.

@domitry
Created March 19, 2018 19:02
Show Gist options
  • Select an option

  • Save domitry/7aa70a1ebab06d183fbaa45cd1cbe255 to your computer and use it in GitHub Desktop.

Select an option

Save domitry/7aa70a1ebab06d183fbaa45cd1cbe255 to your computer and use it in GitHub Desktop.

Revisions

  1. domitry created this gist Mar 19, 2018.
    22 changes: 22 additions & 0 deletions patch.diff
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,22 @@
    diff --git a/graphspace_python/graphs/classes/gsgraph.py b/graphspace_python/graphs/classes/gsgraph.py
    index abf024c..790f3ab 100644
    --- a/graphspace_python/graphs/classes/gsgraph.py
    +++ b/graphspace_python/graphs/classes/gsgraph.py
    @@ -470,7 +470,7 @@ class GSGraph(nx.DiGraph):
    attr_dict.update({"source": source, "target": target})

    GSGraph.validate_edge_data_properties(data_properties=attr_dict, nodes_list=self.nodes())
    - super(GSGraph, self).add_edge(source, target, attr_dict)
    + super(GSGraph, self).add_edge(source, target, **attr_dict)

    def add_node(self, node_name, attr_dict=None, parent=None, label=None, popup=None, k=None, **attr):
    """Add a node to the graph.
    @@ -520,7 +520,7 @@ class GSGraph(nx.DiGraph):
    attr_dict.update({"name": node_name, "id": node_name})

    GSGraph.validate_node_data_properties(data_properties=attr_dict, nodes_list=self.nodes())
    - super(GSGraph, self).add_node(node_name, attr_dict)
    + super(GSGraph, self).add_node(node_name, **attr_dict)

    def add_node_style(self, node_name, attr_dict=None, content=None, shape='ellipse', color='#FFFFFF', height=None,
    width=None, bubble=None, valign='center', halign='center', style="solid",