Skip to content

armgit / txtai

Public Imported from GitHub
0

💡 All-in-one AI framework for semantic search, LLM orchestration and language model workflows

RDBMS graph.delete tests and upgrade graph dependency, closes #837

davidmezzetti6cc886aaad8a
diff --git a/setup.py b/setup.py
index e6c6884e..09db1616 100644
--- a/setup.py
+++ b/setup.py
@@ -49,7 +49,7 @@ extras["console"] = ["rich>=12.0.1"]
extras["database"] = ["duckdb>=0.7.1", "pillow>=7.1.2", "sqlalchemy>=2.0.20"]
-extras["graph"] = ["grand-cypher>=0.6.0", "grand-graph>=0.5.0", "networkx>=2.6.3", "python-louvain>=0.16", "sqlalchemy>=2.0.20"]
+extras["graph"] = ["grand-cypher>=0.6.0", "grand-graph>=0.6.0", "networkx>=2.6.3", "python-louvain>=0.16", "sqlalchemy>=2.0.20"]
extras["model"] = ["onnx>=1.11.0", "onnxruntime>=1.11.0"]
diff --git a/test/python/testgraph.py b/test/python/testgraph.py
index e11f41ed..e5c7e03d 100644
--- a/test/python/testgraph.py
+++ b/test/python/testgraph.py
@@ -138,6 +138,11 @@ class TestGraph(unittest.TestCase):
graph.load(None)
self.assertEqual(list(graph.scan()), [str(x) for x in range(5)])
+ # Test remove node
+ graph.delete([0])
+ self.assertFalse(graph.hasnode(0))
+ self.assertFalse(graph.hasedge(0))
+
# Close graph
graph.close()