cleaning code for pull

This commit is contained in:
Ken Wiltshire
2024-11-01 16:29:36 -04:00
parent 8547dd4941
commit 465c9a13d9
5 changed files with 64 additions and 96 deletions

22
test.py
View File

@@ -8,27 +8,7 @@ from pprint import pprint
# nest_asyncio.apply()
#########
WORKING_DIR = "./dickensTestEmbedcall"
# G = nx.read_graphml('./dickensTestEmbedcall/graph_chunk_entity_relation.graphml')
# nx.write_gexf(G, "graph_chunk_entity_relation.gefx")
import networkx as nx
from networkx_query import search_nodes, search_edges
G = nx.read_graphml('./dickensTestEmbedcall/graph_chunk_entity_relation.graphml')
query = {} # Empty query matches all nodes
result = search_nodes(G, query)
# Extract node IDs from the result
node_ids = sorted([node for node in result])
print("All node IDs in the graph:")
pprint(node_ids)
raise Exception
# raise Exception
WORKING_DIR = "./dickens"
if not os.path.exists(WORKING_DIR):
os.mkdir(WORKING_DIR)