Loading autocnet/graph/network.py +6 −1 Original line number Diff line number Diff line Loading @@ -83,6 +83,8 @@ class CandidateGraph(nx.Graph): self.graph['creationdate'] = strftime("%Y-%m-%d %H:%M:%S", gmtime()) self.graph['modifieddate'] = strftime("%Y-%m-%d %H:%M:%S", gmtime()) self._order_adjacency() def __eq__(self, other): eq = True # Check the nodes Loading @@ -94,6 +96,9 @@ class CandidateGraph(nx.Graph): eq = False return eq def _order_adjacency(self): # pragma: no cover self.adj = sorted(self.adj.items()) @property def maxsize(self): if not hasattr(self, '_maxsize'): Loading Loading @@ -222,8 +227,8 @@ class CandidateGraph(nx.Graph): ---------- """ raise NotImplementedError self._order_adjacency() def extract_features(self, band=1, *args, **kwargs): # pragma: no cover """ Loading autocnet/io/network.py +2 −0 Original line number Diff line number Diff line Loading @@ -126,4 +126,6 @@ def load(projectname): pass # Add a mock edge cg.edge[e['source']][e['target']] = edge cg._order_adjacency return cg Loading
autocnet/graph/network.py +6 −1 Original line number Diff line number Diff line Loading @@ -83,6 +83,8 @@ class CandidateGraph(nx.Graph): self.graph['creationdate'] = strftime("%Y-%m-%d %H:%M:%S", gmtime()) self.graph['modifieddate'] = strftime("%Y-%m-%d %H:%M:%S", gmtime()) self._order_adjacency() def __eq__(self, other): eq = True # Check the nodes Loading @@ -94,6 +96,9 @@ class CandidateGraph(nx.Graph): eq = False return eq def _order_adjacency(self): # pragma: no cover self.adj = sorted(self.adj.items()) @property def maxsize(self): if not hasattr(self, '_maxsize'): Loading Loading @@ -222,8 +227,8 @@ class CandidateGraph(nx.Graph): ---------- """ raise NotImplementedError self._order_adjacency() def extract_features(self, band=1, *args, **kwargs): # pragma: no cover """ Loading
autocnet/io/network.py +2 −0 Original line number Diff line number Diff line Loading @@ -126,4 +126,6 @@ def load(projectname): pass # Add a mock edge cg.edge[e['source']][e['target']] = edge cg._order_adjacency return cg