Skip to content

Commit

Permalink
just some test changes
Browse files Browse the repository at this point in the history
  • Loading branch information
brifordwylie committed Jan 12, 2025
1 parent 47e32e6 commit 827efd2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
3 changes: 2 additions & 1 deletion src/workbench/algorithms/graph/light/proximity_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ def _build_graph(self, store_features: bool) -> None:
"""
# Retrieve all neighbors and their distances
id_column = self.proximity.id_column
log.info("Retrieving all neighbors...")
all_neighbors_df = self.proximity.all_neighbors()

# Add nodes with attributes (features)
Expand Down Expand Up @@ -174,7 +175,7 @@ def get_neighborhood(self, node_id: Union[str, int], radius: int = 1) -> nx.Grap

fs = FeatureSet("aqsol_mol_descriptors")
df = fs.pull_dataframe()
df = df.sample(100)
df = df.sample(1000)
df = compute_morgan_fingerprints(df)

# Build a graph using FingerprintProximity
Expand Down
12 changes: 6 additions & 6 deletions src/workbench/api/graph_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def delete(self, location: str):
d["weight"] = 1.0

# Store the graph
graph_store.upsert("test_graph", G)
graph_store.upsert("test/test_graph", G)

# Get a summary of the graphs
print("Graph Store Summary:")
Expand All @@ -139,19 +139,19 @@ def delete(self, location: str):
print(graph_store.details())

# Last modified date
print("Last modified:", graph_store.last_modified("test_graph"))
print("Last modified:", graph_store.last_modified("test/test_graph"))

# List all graphs
print("List all graphs in the store:")
print(graph_store.list())

# Retrieve and display the graph
retrieved_graph = graph_store.get("test_graph")
retrieved_graph = graph_store.get("test/test_graph")
print("Retrieved Graph Edges:", retrieved_graph.edges(data=True))

# Check if the graph exists
print("Graph exists:", graph_store.check("test_graph"))
print("Graph exists:", graph_store.check("test/test_graph"))

# Delete the graph
graph_store.delete("test_graph")
print("Graph exists after deletion:", graph_store.check("test_graph"))
graph_store.delete("test/test_graph")
print("Graph exists after deletion:", graph_store.check("test/test_graph"))

0 comments on commit 827efd2

Please sign in to comment.