-
Notifications
You must be signed in to change notification settings - Fork 21
Now runs with new networkx #61
Conversation
nxmetis/__init__.py
Outdated
@@ -127,7 +127,7 @@ def node_nested_dissection(G, weight='weight', options=None): | |||
if len(G) == 0: | |||
return [] | |||
|
|||
vwgt = [G.node[u].get(weight, 1) for u in G] | |||
vwgt = [dict(G.nodes)[u].get(weight, 1) for u in G] |
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.
G.node[u]
-- > G.nodes[u]
should work.
nxmetis/tests/test_metis.py
Outdated
@@ -24,7 +24,7 @@ def setUp(self): | |||
self.node_list = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', | |||
1, 2, 3, 4, 5, 6] | |||
self.G = nx.Graph() | |||
self.G.add_path(self.node_list) | |||
self.G.update(nx.path_graph(self.node_list)) |
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.
self.G.add_path(stuff)
-- > nx.add_path(self.G, stuff)
is a good way to add a path.
This repository hasn't been actively updated in a while. |
I haven't worked with travis yet, should we replace travis.yml with something similar to https://github.com/networkx/networkx/blob/master/.travis.yml? |
Can you try a more simple change first? I'm hoping it doesn't require the more heavy lifting. Change it to python versions 3.6, 3.7, 3.8, pypy3 and let's see what Travis says. |
Seems like that works |
Excellent -- anything else before we merge? |
Not from my side. Could we get this into pypi? |
I'll look into getting it into pypi. |
The change of networkx graph data structure broke this package.