Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
mike dupont committed Oct 21, 2023
1 parent 3bafd29 commit b5a978a
Show file tree
Hide file tree
Showing 24 changed files with 523,438 additions and 49 deletions.
521,773 changes: 521,770 additions & 3 deletions index.html

Large diffs are not rendered by default.

15 changes: 9 additions & 6 deletions pyre/graphs.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,12 +192,15 @@ def graph_interactive_network(
# nx.
#largest_components = sorted(nx.connected_components(dag), key=len, reverse=True)[:n]
size = 10
#ag = dag.to_undirected()
largest_components = sorted(nx.strongly_connected_components(dag), key=len, reverse=True)[:size]
dag = dag.to_undirected()
#largest_components = sorted(nx.strongly_connected_components(dag), key=len, reverse=True)[:size]
largest_components = sorted(nx.connected_components(dag), key=len, reverse=True)[:size]
for index in range(size):
name= f'Component{index}'
component=dag.subgraph(largest_components[index])
nt = Network(notebook=True, width="100%", height="800px", directed=True)
nt = Network(notebook=True, width="100%", height="800px",
#directed=True
)
for edge in component.edges():
source_id_str = edge[0]
target_id_str = edge[1]
Expand All @@ -209,9 +212,9 @@ def graph_interactive_network(
nt.add_edge(source_id_str, target_id_str, id=edge_id_str)
hierarchical_options = {
"enabled": True,
"levelSeparation": 200, # Increased vertical spacing between levels
"nodeSpacing": 250, # Increased spacing between nodes on the same level
"treeSpacing": 250, # Increased spacing between different trees (for forest)
#"levelSeparation": 200, # Increased vertical spacing between levels
#"nodeSpacing": 250, # Increased spacing between nodes on the same level
#"treeSpacing": 250, # Increased spacing between different trees (for forest)
"blockShifting": True,
"edgeMinimization": True,
"parentCentralization": True,
Expand Down
101 changes: 98 additions & 3 deletions pyre/graphs/graphComponent0.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pyre/graphs/graphComponent0.json

Large diffs are not rendered by default.

101 changes: 98 additions & 3 deletions pyre/graphs/graphComponent1.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pyre/graphs/graphComponent1.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions pyre/graphs/graphComponent2.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pyre/graphs/graphComponent2.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions pyre/graphs/graphComponent3.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pyre/graphs/graphComponent3.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions pyre/graphs/graphComponent4.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pyre/graphs/graphComponent4.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions pyre/graphs/graphComponent5.html
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ <h1></h1>


// parsing and collecting nodes and edges from the python
nodes = new vis.DataSet([{"color": "#97c2fc", "id": "autogpts.autogpt.autogpt.core.utils.json_schema.JSONSchema.to_typescript_object_interface", "label": "autogpts.autogpt.autogpt.core.utils.json_schema.JSONSchema.to_typescript_object_interface", "shape": "dot"}, {"color": "#97c2fc", "id": "autogpts.autogpt.autogpt.core.utils.json_schema.JSONSchema.typescript_type", "label": "autogpts.autogpt.autogpt.core.utils.json_schema.JSONSchema.typescript_type", "shape": "dot"}]);
edges = new vis.DataSet([{"arrows": "to", "from": "autogpts.autogpt.autogpt.core.utils.json_schema.JSONSchema.to_typescript_object_interface", "id": "autogpts.autogpt.autogpt.core.utils.json_schema.JSONSchema.to_typescript_object_interface_to_autogpts.autogpt.autogpt.core.utils.json_schema.JSONSchema.typescript_type", "to": "autogpts.autogpt.autogpt.core.utils.json_schema.JSONSchema.typescript_type"}, {"arrows": "to", "from": "autogpts.autogpt.autogpt.core.utils.json_schema.JSONSchema.typescript_type", "id": "autogpts.autogpt.autogpt.core.utils.json_schema.JSONSchema.typescript_type_to_autogpts.autogpt.autogpt.core.utils.json_schema.JSONSchema.typescript_type", "to": "autogpts.autogpt.autogpt.core.utils.json_schema.JSONSchema.typescript_type"}, {"arrows": "to", "from": "autogpts.autogpt.autogpt.core.utils.json_schema.JSONSchema.typescript_type", "id": "autogpts.autogpt.autogpt.core.utils.json_schema.JSONSchema.typescript_type_to_autogpts.autogpt.autogpt.core.utils.json_schema.JSONSchema.to_typescript_object_interface", "to": "autogpts.autogpt.autogpt.core.utils.json_schema.JSONSchema.to_typescript_object_interface"}]);
nodes = new vis.DataSet([{"color": "#97c2fc", "id": "autogpts.autogpt.autogpt.core.ability.base.Ability.parameters", "label": "autogpts.autogpt.autogpt.core.ability.base.Ability.parameters", "shape": "dot"}, {"color": "#97c2fc", "id": "autogpts.autogpt.autogpt.core.ability.base.Ability.spec", "label": "autogpts.autogpt.autogpt.core.ability.base.Ability.spec", "shape": "dot"}, {"color": "#97c2fc", "id": "autogpts.autogpt.autogpt.core.ability.base.Ability.dump", "label": "autogpts.autogpt.autogpt.core.ability.base.Ability.dump", "shape": "dot"}, {"color": "#97c2fc", "id": "autogpts.autogpt.autogpt.core.ability.base.Ability.__str__", "label": "autogpts.autogpt.autogpt.core.ability.base.Ability.__str__", "shape": "dot"}, {"color": "#97c2fc", "id": "autogpts.autogpt.autogpt.core.ability.base.Ability.name", "label": "autogpts.autogpt.autogpt.core.ability.base.Ability.name", "shape": "dot"}, {"color": "#97c2fc", "id": "autogpts.autogpt.autogpt.core.ability.base.Ability.description", "label": "autogpts.autogpt.autogpt.core.ability.base.Ability.description", "shape": "dot"}, {"color": "#97c2fc", "id": "autogpts.autogpt.autogpt.core.ability.base.Ability.arguments", "label": "autogpts.autogpt.autogpt.core.ability.base.Ability.arguments", "shape": "dot"}, {"color": "#97c2fc", "id": "autogpts.autogpt.autogpt.core.ability.base.Ability.required_arguments", "label": "autogpts.autogpt.autogpt.core.ability.base.Ability.required_arguments", "shape": "dot"}]);
edges = new vis.DataSet([{"from": "autogpts.autogpt.autogpt.core.ability.base.Ability.parameters", "id": "autogpts.autogpt.autogpt.core.ability.base.Ability.parameters_to_autogpts.autogpt.autogpt.core.ability.base.Ability.spec", "to": "autogpts.autogpt.autogpt.core.ability.base.Ability.spec"}, {"from": "autogpts.autogpt.autogpt.core.ability.base.Ability.dump", "id": "autogpts.autogpt.autogpt.core.ability.base.Ability.dump_to_autogpts.autogpt.autogpt.core.ability.base.Ability.__str__", "to": "autogpts.autogpt.autogpt.core.ability.base.Ability.__str__"}, {"from": "autogpts.autogpt.autogpt.core.ability.base.Ability.dump", "id": "autogpts.autogpt.autogpt.core.ability.base.Ability.dump_to_autogpts.autogpt.autogpt.core.ability.base.Ability.name", "to": "autogpts.autogpt.autogpt.core.ability.base.Ability.name"}, {"from": "autogpts.autogpt.autogpt.core.ability.base.Ability.dump", "id": "autogpts.autogpt.autogpt.core.ability.base.Ability.dump_to_autogpts.autogpt.autogpt.core.ability.base.Ability.description", "to": "autogpts.autogpt.autogpt.core.ability.base.Ability.description"}, {"from": "autogpts.autogpt.autogpt.core.ability.base.Ability.dump", "id": "autogpts.autogpt.autogpt.core.ability.base.Ability.dump_to_autogpts.autogpt.autogpt.core.ability.base.Ability.arguments", "to": "autogpts.autogpt.autogpt.core.ability.base.Ability.arguments"}, {"from": "autogpts.autogpt.autogpt.core.ability.base.Ability.dump", "id": "autogpts.autogpt.autogpt.core.ability.base.Ability.dump_to_autogpts.autogpt.autogpt.core.ability.base.Ability.required_arguments", "to": "autogpts.autogpt.autogpt.core.ability.base.Ability.required_arguments"}, {"from": "autogpts.autogpt.autogpt.core.ability.base.Ability.description", "id": "autogpts.autogpt.autogpt.core.ability.base.Ability.description_to_autogpts.autogpt.autogpt.core.ability.base.Ability.spec", "to": "autogpts.autogpt.autogpt.core.ability.base.Ability.spec"}, {"from": "autogpts.autogpt.autogpt.core.ability.base.Ability.name", "id": "autogpts.autogpt.autogpt.core.ability.base.Ability.name_to_autogpts.autogpt.autogpt.core.ability.base.Ability.spec", "to": "autogpts.autogpt.autogpt.core.ability.base.Ability.spec"}, {"from": "autogpts.autogpt.autogpt.core.ability.base.Ability.spec", "id": "autogpts.autogpt.autogpt.core.ability.base.Ability.spec_to_autogpts.autogpt.autogpt.core.ability.base.Ability.__str__", "to": "autogpts.autogpt.autogpt.core.ability.base.Ability.__str__"}]);

nodeColors = {};
allNodes = nodes.get({ returnType: "Object" });
Expand All @@ -100,7 +100,7 @@ <h1></h1>
// adding nodes and edges to the graph
data = {nodes: nodes, edges: edges};

var options = {"nodes": {"font": {"size": 20, "color": "black"}, "shapeProperties": {"useBorderWithImage": true}}, "edges": {"length": 250}, "physics": {"stabilization": {"enabled": true, "iterations": 1000}, "hierarchicalRepulsion": {"centralGravity": 0.0, "springLength": 200, "springConstant": 0.01, "nodeDistance": 250, "damping": 0.09}, "solver": "hierarchicalRepulsion", "timestep": 0.5}, "layout": {"hierarchical": {"enabled": true, "levelSeparation": 200, "nodeSpacing": 250, "treeSpacing": 250, "blockShifting": true, "edgeMinimization": true, "parentCentralization": true, "direction": "UD", "sortMethod": "directed"}}};
var options = {"nodes": {"font": {"size": 20, "color": "black"}, "shapeProperties": {"useBorderWithImage": true}}, "edges": {"length": 250}, "physics": {"stabilization": {"enabled": true, "iterations": 1000}, "hierarchicalRepulsion": {"centralGravity": 0.0, "springLength": 200, "springConstant": 0.01, "nodeDistance": 250, "damping": 0.09}, "solver": "hierarchicalRepulsion", "timestep": 0.5}, "layout": {"hierarchical": {"enabled": true, "blockShifting": true, "edgeMinimization": true, "parentCentralization": true, "direction": "UD", "sortMethod": "directed"}}};



Expand Down
2 changes: 1 addition & 1 deletion pyre/graphs/graphComponent5.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"nodes": [{"color": "#97c2fc", "id": "autogpts.autogpt.autogpt.core.utils.json_schema.JSONSchema.to_typescript_object_interface", "label": "autogpts.autogpt.autogpt.core.utils.json_schema.JSONSchema.to_typescript_object_interface", "shape": "dot"}, {"color": "#97c2fc", "id": "autogpts.autogpt.autogpt.core.utils.json_schema.JSONSchema.typescript_type", "label": "autogpts.autogpt.autogpt.core.utils.json_schema.JSONSchema.typescript_type", "shape": "dot"}], "edges": [{"id": "autogpts.autogpt.autogpt.core.utils.json_schema.JSONSchema.to_typescript_object_interface_to_autogpts.autogpt.autogpt.core.utils.json_schema.JSONSchema.typescript_type", "from": "autogpts.autogpt.autogpt.core.utils.json_schema.JSONSchema.to_typescript_object_interface", "to": "autogpts.autogpt.autogpt.core.utils.json_schema.JSONSchema.typescript_type", "arrows": "to"}, {"id": "autogpts.autogpt.autogpt.core.utils.json_schema.JSONSchema.typescript_type_to_autogpts.autogpt.autogpt.core.utils.json_schema.JSONSchema.typescript_type", "from": "autogpts.autogpt.autogpt.core.utils.json_schema.JSONSchema.typescript_type", "to": "autogpts.autogpt.autogpt.core.utils.json_schema.JSONSchema.typescript_type", "arrows": "to"}, {"id": "autogpts.autogpt.autogpt.core.utils.json_schema.JSONSchema.typescript_type_to_autogpts.autogpt.autogpt.core.utils.json_schema.JSONSchema.to_typescript_object_interface", "from": "autogpts.autogpt.autogpt.core.utils.json_schema.JSONSchema.typescript_type", "to": "autogpts.autogpt.autogpt.core.utils.json_schema.JSONSchema.to_typescript_object_interface", "arrows": "to"}]}
{"nodes": [{"color": "#97c2fc", "id": "autogpts.autogpt.autogpt.core.ability.base.Ability.parameters", "label": "autogpts.autogpt.autogpt.core.ability.base.Ability.parameters", "shape": "dot"}, {"color": "#97c2fc", "id": "autogpts.autogpt.autogpt.core.ability.base.Ability.spec", "label": "autogpts.autogpt.autogpt.core.ability.base.Ability.spec", "shape": "dot"}, {"color": "#97c2fc", "id": "autogpts.autogpt.autogpt.core.ability.base.Ability.dump", "label": "autogpts.autogpt.autogpt.core.ability.base.Ability.dump", "shape": "dot"}, {"color": "#97c2fc", "id": "autogpts.autogpt.autogpt.core.ability.base.Ability.__str__", "label": "autogpts.autogpt.autogpt.core.ability.base.Ability.__str__", "shape": "dot"}, {"color": "#97c2fc", "id": "autogpts.autogpt.autogpt.core.ability.base.Ability.name", "label": "autogpts.autogpt.autogpt.core.ability.base.Ability.name", "shape": "dot"}, {"color": "#97c2fc", "id": "autogpts.autogpt.autogpt.core.ability.base.Ability.description", "label": "autogpts.autogpt.autogpt.core.ability.base.Ability.description", "shape": "dot"}, {"color": "#97c2fc", "id": "autogpts.autogpt.autogpt.core.ability.base.Ability.arguments", "label": "autogpts.autogpt.autogpt.core.ability.base.Ability.arguments", "shape": "dot"}, {"color": "#97c2fc", "id": "autogpts.autogpt.autogpt.core.ability.base.Ability.required_arguments", "label": "autogpts.autogpt.autogpt.core.ability.base.Ability.required_arguments", "shape": "dot"}], "edges": [{"id": "autogpts.autogpt.autogpt.core.ability.base.Ability.parameters_to_autogpts.autogpt.autogpt.core.ability.base.Ability.spec", "from": "autogpts.autogpt.autogpt.core.ability.base.Ability.parameters", "to": "autogpts.autogpt.autogpt.core.ability.base.Ability.spec"}, {"id": "autogpts.autogpt.autogpt.core.ability.base.Ability.dump_to_autogpts.autogpt.autogpt.core.ability.base.Ability.__str__", "from": "autogpts.autogpt.autogpt.core.ability.base.Ability.dump", "to": "autogpts.autogpt.autogpt.core.ability.base.Ability.__str__"}, {"id": "autogpts.autogpt.autogpt.core.ability.base.Ability.dump_to_autogpts.autogpt.autogpt.core.ability.base.Ability.name", "from": "autogpts.autogpt.autogpt.core.ability.base.Ability.dump", "to": "autogpts.autogpt.autogpt.core.ability.base.Ability.name"}, {"id": "autogpts.autogpt.autogpt.core.ability.base.Ability.dump_to_autogpts.autogpt.autogpt.core.ability.base.Ability.description", "from": "autogpts.autogpt.autogpt.core.ability.base.Ability.dump", "to": "autogpts.autogpt.autogpt.core.ability.base.Ability.description"}, {"id": "autogpts.autogpt.autogpt.core.ability.base.Ability.dump_to_autogpts.autogpt.autogpt.core.ability.base.Ability.arguments", "from": "autogpts.autogpt.autogpt.core.ability.base.Ability.dump", "to": "autogpts.autogpt.autogpt.core.ability.base.Ability.arguments"}, {"id": "autogpts.autogpt.autogpt.core.ability.base.Ability.dump_to_autogpts.autogpt.autogpt.core.ability.base.Ability.required_arguments", "from": "autogpts.autogpt.autogpt.core.ability.base.Ability.dump", "to": "autogpts.autogpt.autogpt.core.ability.base.Ability.required_arguments"}, {"id": "autogpts.autogpt.autogpt.core.ability.base.Ability.description_to_autogpts.autogpt.autogpt.core.ability.base.Ability.spec", "from": "autogpts.autogpt.autogpt.core.ability.base.Ability.description", "to": "autogpts.autogpt.autogpt.core.ability.base.Ability.spec"}, {"id": "autogpts.autogpt.autogpt.core.ability.base.Ability.name_to_autogpts.autogpt.autogpt.core.ability.base.Ability.spec", "from": "autogpts.autogpt.autogpt.core.ability.base.Ability.name", "to": "autogpts.autogpt.autogpt.core.ability.base.Ability.spec"}, {"id": "autogpts.autogpt.autogpt.core.ability.base.Ability.spec_to_autogpts.autogpt.autogpt.core.ability.base.Ability.__str__", "from": "autogpts.autogpt.autogpt.core.ability.base.Ability.spec", "to": "autogpts.autogpt.autogpt.core.ability.base.Ability.__str__"}]}
6 changes: 3 additions & 3 deletions pyre/graphs/graphComponent6.html
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ <h1></h1>


// parsing and collecting nodes and edges from the python
nodes = new vis.DataSet([{"color": "#97c2fc", "id": "watchman.build.fbcode_builder.getdeps.load.ManifestLoader.get_project_hash", "label": "watchman.build.fbcode_builder.getdeps.load.ManifestLoader.get_project_hash", "shape": "dot"}, {"color": "#97c2fc", "id": "watchman.build.fbcode_builder.getdeps.load.ManifestLoader._compute_project_hash", "label": "watchman.build.fbcode_builder.getdeps.load.ManifestLoader._compute_project_hash", "shape": "dot"}]);
edges = new vis.DataSet([{"arrows": "to", "from": "watchman.build.fbcode_builder.getdeps.load.ManifestLoader.get_project_hash", "id": "watchman.build.fbcode_builder.getdeps.load.ManifestLoader.get_project_hash_to_watchman.build.fbcode_builder.getdeps.load.ManifestLoader._compute_project_hash", "to": "watchman.build.fbcode_builder.getdeps.load.ManifestLoader._compute_project_hash"}, {"arrows": "to", "from": "watchman.build.fbcode_builder.getdeps.load.ManifestLoader._compute_project_hash", "id": "watchman.build.fbcode_builder.getdeps.load.ManifestLoader._compute_project_hash_to_watchman.build.fbcode_builder.getdeps.load.ManifestLoader.get_project_hash", "to": "watchman.build.fbcode_builder.getdeps.load.ManifestLoader.get_project_hash"}]);
nodes = new vis.DataSet([{"color": "#97c2fc", "id": "organizer.test_file_organizer.TestFileOrganizer.test_identify_file_type", "label": "organizer.test_file_organizer.TestFileOrganizer.test_identify_file_type", "shape": "dot"}, {"color": "#97c2fc", "id": "examples.codezilla.file", "label": "examples.codezilla.file", "shape": "dot"}, {"color": "#97c2fc", "id": "organizer.test_file_organizer.TestFileOrganizer.test_move_files", "label": "organizer.test_file_organizer.TestFileOrganizer.test_move_files", "shape": "dot"}, {"color": "#97c2fc", "id": "organizer.test_file_organizer.TestFileOrganizer.test_handle_duplicate_file_names", "label": "organizer.test_file_organizer.TestFileOrganizer.test_handle_duplicate_file_names", "shape": "dot"}, {"color": "#97c2fc", "id": "organizer.file_organizer.identify_file_type", "label": "organizer.file_organizer.identify_file_type", "shape": "dot"}, {"color": "#97c2fc", "id": "organizer.file_organizer.handle_duplicate_file_names", "label": "organizer.file_organizer.handle_duplicate_file_names", "shape": "dot"}, {"color": "#97c2fc", "id": "organizer.file_organizer.handle_command_line_options", "label": "organizer.file_organizer.handle_command_line_options", "shape": "dot"}]);
edges = new vis.DataSet([{"from": "organizer.test_file_organizer.TestFileOrganizer.test_identify_file_type", "id": "organizer.test_file_organizer.TestFileOrganizer.test_identify_file_type_to_examples.codezilla.file", "to": "examples.codezilla.file"}, {"from": "examples.codezilla.file", "id": "examples.codezilla.file_to_organizer.test_file_organizer.TestFileOrganizer.test_move_files", "to": "organizer.test_file_organizer.TestFileOrganizer.test_move_files"}, {"from": "examples.codezilla.file", "id": "examples.codezilla.file_to_organizer.test_file_organizer.TestFileOrganizer.test_handle_duplicate_file_names", "to": "organizer.test_file_organizer.TestFileOrganizer.test_handle_duplicate_file_names"}, {"from": "examples.codezilla.file", "id": "examples.codezilla.file_to_organizer.file_organizer.identify_file_type", "to": "organizer.file_organizer.identify_file_type"}, {"from": "examples.codezilla.file", "id": "examples.codezilla.file_to_organizer.file_organizer.handle_duplicate_file_names", "to": "organizer.file_organizer.handle_duplicate_file_names"}, {"from": "examples.codezilla.file", "id": "examples.codezilla.file_to_organizer.file_organizer.handle_command_line_options", "to": "organizer.file_organizer.handle_command_line_options"}]);

nodeColors = {};
allNodes = nodes.get({ returnType: "Object" });
Expand All @@ -100,7 +100,7 @@ <h1></h1>
// adding nodes and edges to the graph
data = {nodes: nodes, edges: edges};

var options = {"nodes": {"font": {"size": 20, "color": "black"}, "shapeProperties": {"useBorderWithImage": true}}, "edges": {"length": 250}, "physics": {"stabilization": {"enabled": true, "iterations": 1000}, "hierarchicalRepulsion": {"centralGravity": 0.0, "springLength": 200, "springConstant": 0.01, "nodeDistance": 250, "damping": 0.09}, "solver": "hierarchicalRepulsion", "timestep": 0.5}, "layout": {"hierarchical": {"enabled": true, "levelSeparation": 200, "nodeSpacing": 250, "treeSpacing": 250, "blockShifting": true, "edgeMinimization": true, "parentCentralization": true, "direction": "UD", "sortMethod": "directed"}}};
var options = {"nodes": {"font": {"size": 20, "color": "black"}, "shapeProperties": {"useBorderWithImage": true}}, "edges": {"length": 250}, "physics": {"stabilization": {"enabled": true, "iterations": 1000}, "hierarchicalRepulsion": {"centralGravity": 0.0, "springLength": 200, "springConstant": 0.01, "nodeDistance": 250, "damping": 0.09}, "solver": "hierarchicalRepulsion", "timestep": 0.5}, "layout": {"hierarchical": {"enabled": true, "blockShifting": true, "edgeMinimization": true, "parentCentralization": true, "direction": "UD", "sortMethod": "directed"}}};



Expand Down
Loading

0 comments on commit b5a978a

Please sign in to comment.