Skip to content

Commit

Permalink
Fixed graph loading.
Browse files Browse the repository at this point in the history
Fixes #22
  • Loading branch information
thvitt committed Mar 27, 2019
1 parent 3262a7d commit a884989
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/macrogen/graph.py
Expand Up @@ -289,7 +289,7 @@ def _load_from(self, load_from: Path):

# Now reconstruct the other data:
self.working: nx.MultiDiGraph = self.base.copy()
self.working = cleanup_graph(self.working)
self.working = cleanup_graph(self.working).copy()
self.dag = self.working.copy()

for u, v, k, attr in self.working.edges(keys=True, data=True):
Expand All @@ -308,6 +308,7 @@ def _load_from(self, load_from: Path):
check_acyclic(self.dag,
f'Base graph from {load_from} is not acyclic after removing conflicting and ignored edges.')
self.closure = nx.transitive_closure(self.dag)
self._augment_details()

def node(self, spec: Union[Reference, date, str]):
"""
Expand Down

0 comments on commit a884989

Please sign in to comment.