Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion data.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import datetime
import faker
import uuid

Expand Down Expand Up @@ -27,7 +28,7 @@
number_of_fields = 1
excluded_tables = ["system_setting"]
tables_to_fill = ["user"]
graph = False
graph = True

fields = [
{
Expand Down
6 changes: 2 additions & 4 deletions src/populate.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,15 +318,13 @@ def arrange_graph(self):
The function arranges identified inheritance relations in a directed graph and orders them
topologically.
"""
task = self.job_progress.advance(self.identifying_relations)

graph = nx.DiGraph()

step = 60 / len(self.inheritance_relations)
for table, inherited_tables in self.inheritance_relations.items():
if inherited_tables:
for inherited_table in inherited_tables:
graph.add_edge(inherited_table, table)
if table != inherited_table: # Skip self-references
graph.add_edge(inherited_table, table)
else:
graph.add_node(table)

Expand Down