Skip to content

Graph-Native Infrastructure for Context and Accountable AI Systems

Cleanup temporary and update scripts

KaifAhmad1ad6dd1af4f08
diff --git a/test.txt b/test.txt
deleted file mode 100644
index 2a93d009..00000000
Binary files a/test.txt and /dev/null differ
diff --git a/test_simple.py b/test_simple.py
deleted file mode 100644
index 67bdd6aa..00000000
--- a/test_simple.py
+++ /dev/null
@@ -1,8 +0,0 @@
-import unittest
-
-class TestSimple(unittest.TestCase):
- def test_true(self):
- self.assertTrue(True)
-
-if __name__ == '__main__':
- unittest.main()
\ No newline at end of file
diff --git a/update_codebase_refs.py b/update_codebase_refs.py
deleted file mode 100644
index bc41f03c..00000000
--- a/update_codebase_refs.py
+++ /dev/null
@@ -1,57 +0,0 @@
-import os
-
-replacements = [
- ("Adapter Pattern", "Backend Pattern"),
- ("Store Adapters", "Store Backends"),
- ("Store Adapter", "Store Backend"),
- ("FAISSAdapter", "FAISSStore"),
- ("MilvusAdapter", "MilvusStore"),
- ("QdrantAdapter", "QdrantStore"),
- ("WeaviateAdapter", "WeaviateStore"),
- ("Neo4jAdapter", "Neo4jStore"),
- ("FalkorDBAdapter", "FalkorDBStore"),
- ("BlazegraphAdapter", "BlazegraphStore"),
- ("JenaAdapter", "JenaStore"),
- ("RDF4JAdapter", "RDF4JStore"),
- ("VirtuosoAdapter", "VirtuosoStore"),
- ("faiss_adapter", "faiss_store"),
- ("milvus_adapter", "milvus_store"),
- ("qdrant_adapter", "qdrant_store"),
- ("weaviate_adapter", "weaviate_store"),
- ("neo4j_adapter", "neo4j_store"),
- ("falkordb_adapter", "falkordb_store"),
- ("blazegraph_adapter", "blazegraph_store"),
- ("jena_adapter", "jena_store"),
- ("rdf4j_adapter", "rdf4j_store"),
- ("virtuoso_adapter", "virtuoso_store"),
- ("store_adapter", "store_backend"),
-]
-
-files = [
- "semantica/vector_store/__init__.py",
- "semantica/graph_store/__init__.py",
- "semantica/vector_store/vector_store_usage.md",
- "semantica/graph_store/graph_store_usage.md",
- "semantica/triplet_store/triplet_store_usage.md",
- "tests/test_graph_store.py",
- "tests/vector_store/test_pinecone_removal.py",
- "cookbook/introduction/20_Triplet_Store.ipynb",
-]
-
-for file_path in files:
- if os.path.exists(file_path):
- with open(file_path, 'r', encoding='utf-8') as f:
- content = f.read()
-
- original_content = content
- for old, new in replacements:
- content = content.replace(old, new)
-
- if content != original_content:
- with open(file_path, 'w', encoding='utf-8') as f:
- f.write(content)
- print(f"Updated {file_path}")
- else:
- print(f"No changes in {file_path}")
- else:
- print(f"File not found: {file_path}")
diff --git a/update_project_refs.py b/update_project_refs.py
deleted file mode 100644
index f41e7e0a..00000000
--- a/update_project_refs.py
+++ /dev/null
@@ -1,80 +0,0 @@
-import os
-
-root_dir = r"c:/Users/Mohd Kaif/semantica"
-
-replacements = {
- # Class names
- "FAISSAdapter": "FAISSStore",
- "MilvusAdapter": "MilvusStore",
- "QdrantAdapter": "QdrantStore",
- "WeaviateAdapter": "WeaviateStore",
- "FalkorDBAdapter": "FalkorDBStore",
- "Neo4jAdapter": "Neo4jStore",
-
- # Filename references in imports
- "semantica.vector_store.faiss_adapter": "semantica.vector_store.faiss_store",
- "semantica.vector_store.milvus_adapter": "semantica.vector_store.milvus_store",
- "semantica.vector_store.qdrant_adapter": "semantica.vector_store.qdrant_store",
- "semantica.vector_store.weaviate_adapter": "semantica.vector_store.weaviate_store",
- "semantica.graph_store.falkordb_adapter": "semantica.graph_store.falkordb_store",
- "semantica.graph_store.neo4j_adapter": "semantica.graph_store.neo4j_store",
-
- # Module references (local imports)
- "from .faiss_adapter": "from .faiss_store",
- "from .milvus_adapter": "from .milvus_store",
- "from .qdrant_adapter": "from .qdrant_store",
- "from .weaviate_adapter": "from .weaviate_store",
- "from .falkordb_adapter": "from .falkordb_store",
- "from .neo4j_adapter": "from .neo4j_store",
-
- # Variable names (optional but requested "better nameing")
- # "faiss_adapter": "faiss_store",
- # "milvus_adapter": "milvus_store",
- # Be careful with variable names, but let's try to be consistent if it's safe.
- # I'll stick to explicit classes and imports first to avoid breaking local vars too much unless I'm sure.
- # Actually user said "Change all the name from adapter to store... update everything".
- # I'll replace "Adapter" with "Store" in text/comments if it refers to the class.
-
- # Docstrings and Text
- "FAISS Adapter": "FAISS Store",
- "Milvus Adapter": "Milvus Store",
- "Qdrant Adapter": "Qdrant Store",
- "Weaviate Adapter": "Weaviate Store",
- "FalkorDB Adapter": "FalkorDB Store",
- "Neo4j Adapter": "Neo4j Store",
-
- # Generic "Adapter" to "Store" in specific contexts?
- # Maybe risky. Let's stick to the specific ones.
-}
-
-extensions = ['.py', '.ipynb', '.md']
-
-for root, dirs, files in os.walk(root_dir):
- if ".git" in root or "__pycache__" in root:
- continue
-
- for file in files:
- if any(file.endswith(ext) for ext in extensions):
- file_path = os.path.join(root, file)
- # Skip the script itself
- if "update_project_refs.py" in file_path or "update_store_names.py" in file_path:
- continue
-
- try:
- with open(file_path, 'r', encoding='utf-8') as f:
- content = f.read()
-
- new_content = content
- changed = False
- for old, new in replacements.items():
- if old in new_content:
- new_content = new_content.replace(old, new)
- changed = True
-
- if changed:
- with open(file_path, 'w', encoding='utf-8') as f:
- f.write(new_content)
- print(f"Updated {file_path}")
- except Exception as e:
- print(f"Error processing {file_path}: {e}")
-
diff --git a/update_store_names.py b/update_store_names.py
deleted file mode 100644
index 05211701..00000000
--- a/update_store_names.py
+++ /dev/null
@@ -1,47 +0,0 @@
-import os
-
-files_to_update = [
- r"c:/Users/Mohd Kaif/semantica/semantica/vector_store/faiss_store.py",
- r"c:/Users/Mohd Kaif/semantica/semantica/vector_store/milvus_store.py",
- r"c:/Users/Mohd Kaif/semantica/semantica/vector_store/qdrant_store.py",
- r"c:/Users/Mohd Kaif/semantica/semantica/vector_store/weaviate_store.py",
- r"c:/Users/Mohd Kaif/semantica/semantica/graph_store/falkordb_store.py",
- r"c:/Users/Mohd Kaif/semantica/semantica/graph_store/neo4j_store.py"
-]
-
-replacements = {
- "FAISSAdapter": "FAISSStore",
- "MilvusAdapter": "MilvusStore",
- "QdrantAdapter": "QdrantStore",
- "WeaviateAdapter": "WeaviateStore",
- "FalkorDBAdapter": "FalkorDBStore",
- "Neo4jAdapter": "Neo4jStore",
- "FAISS adapter": "FAISS store",
- "Milvus adapter": "Milvus store",
- "Qdrant adapter": "Qdrant store",
- "Weaviate adapter": "Weaviate store",
- "FalkorDB adapter": "FalkorDB store",
- "Neo4j adapter": "Neo4j store",
- "faiss_adapter": "faiss_store",
- "milvus_adapter": "milvus_store",
- "qdrant_adapter": "qdrant_store",
- "weaviate_adapter": "weaviate_store",
- "falkordb_adapter": "falkordb_store",
- "neo4j_adapter": "neo4j_store"
-}
-
-for file_path in files_to_update:
- if not os.path.exists(file_path):
- print(f"File not found: {file_path}")
- continue
-
- with open(file_path, 'r', encoding='utf-8') as f:
- content = f.read()
-
- new_content = content
- for old, new in replacements.items():
- new_content = new_content.replace(old, new)
-
- with open(file_path, 'w', encoding='utf-8') as f:
- f.write(new_content)
- print(f"Updated {file_path}")
diff --git a/update_triplet_store.py b/update_triplet_store.py
deleted file mode 100644
index 5ed120df..00000000
--- a/update_triplet_store.py
+++ /dev/null
@@ -1,49 +0,0 @@
-import os
-
-replacements = {
- "semantica/triplet_store/blazegraph_store.py": ("BlazegraphAdapter", "BlazegraphStore"),
- "semantica/triplet_store/jena_store.py": ("JenaAdapter", "JenaStore"),
- "semantica/triplet_store/rdf4j_store.py": ("RDF4JAdapter", "RDF4JStore"),
- "semantica/triplet_store/virtuoso_store.py": ("VirtuosoAdapter", "VirtuosoStore"),
-}
-
-for file_path, (old, new) in replacements.items():
- if os.path.exists(file_path):
- with open(file_path, 'r', encoding='utf-8') as f:
- content = f.read()
-
- new_content = content.replace(old, new)
-
- with open(file_path, 'w', encoding='utf-8') as f:
- f.write(new_content)
- print(f"Updated {file_path}")
- else:
- print(f"File not found: {file_path}")
-
-# Update __init__.py
-init_path = "semantica/triplet_store/__init__.py"
-if os.path.exists(init_path):
- with open(init_path, 'r', encoding='utf-8') as f:
- content = f.read()
-
- # Update imports
- content = content.replace("from .blazegraph_adapter import BlazegraphAdapter", "from .blazegraph_store import BlazegraphStore")
- content = content.replace("from .jena_adapter import JenaAdapter", "from .jena_store import JenaStore")
- content = content.replace("from .rdf4j_adapter import RDF4JAdapter", "from .rdf4j_store import RDF4JStore")
- content = content.replace("from .virtuoso_adapter import VirtuosoAdapter", "from .virtuoso_store import VirtuosoStore")
-
- # Update __all__ and other references
- content = content.replace("BlazegraphAdapter", "BlazegraphStore")
- content = content.replace("JenaAdapter", "JenaStore")
- content = content.replace("RDF4JAdapter", "RDF4JStore")
- content = content.replace("VirtuosoAdapter", "VirtuosoStore")
-
- # Update docstrings
- content = content.replace("Store Adapters:", "Store Backends:")
- content = content.replace("Store Adapter Pattern", "Store Backend Pattern")
- content = content.replace("Adapter Pattern:", "Backend Pattern:")
- content = content.replace("Adapter Pattern", "Backend Pattern")
-
- with open(init_path, 'w', encoding='utf-8') as f:
- f.write(content)
- print(f"Updated {init_path}")