-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Summary
Remove all Memgraph (graph database) code and infrastructure from the codebase. The project no longer uses Memgraph and keeping it adds unnecessary complexity and maintenance burden.
Removal Plan
Phase 1: Tests First
- Add/adjust tests to reflect a Postgres-only system: no Memgraph client initialization, no Memgraph fixtures
- Update
tests/test_database.py- remove Memgraph connection tests - Update
tests/test_bill_ingestion.py- remove Memgraph integration - Update
tests/test_bill_ingestor_unit.py- mock only what's needed - Update
tests/test_advanced_search.py- remove Memgraph mocks/usage - Update
tests/conftest.py- remove Memgraph from integration marker
Phase 2: Core Library Code
- Delete
lib/db/memgraph_client.py - Refactor
api/search_api.py- remove Memgraph import, globals, startup,_get_memgraph() - Refactor
lib/advanced_search_features.py- Postgres-only, remove Memgraph-backed methods - Refactor
lib/processors/bill_ingestor.py- remove graph writes, Memgraph constructor - Update
lib/chat_agent.py- fix any call sites for changed signatures - Delete
lib/knowledge_graph/ingestor.py(Memgraph-only) - Update
lib/knowledge_graph/__init__.py - Remove Memgraph config from
lib/utils/config.py
Phase 3: Scripts
- Delete
scripts/kg_sync_memgraph.py - Remove Memgraph from
scripts/ingest_knowledge_graph.py - Remove Memgraph from
scripts/migrate_transcripts.py - Remove Memgraph from
scripts/ingest_bills.py
Phase 4: Infrastructure & Config
- Remove
pymgclientfromrequirements.txt - Remove Memgraph env vars from
.env.example - Remove Memgraph service/volume from
docker-compose.yml - Remove Memgraph branches from
db.sh
Phase 5: Documentation
- Remove Memgraph references from
docs/KG_PLAN.md - Remove Memgraph references from
docs/CODE_MAP_AND_REVIEW.md - Update
frontend/README.mdif endpoint behavior changes
Phase 6: Verification
-
rg -ni \"memgraph|pymgclient|MEMGRAPH_\"returns no project references -
ruff check .passes -
mypy lib/passes -
pytest tests/ -vpasses -
docker-compose up -dstarts only Postgres - API startup has no Memgraph warnings
Files to Delete
lib/db/memgraph_client.pyscripts/kg_sync_memgraph.pylib/knowledge_graph/ingestor.py
Files to Modify
api/search_api.pylib/advanced_search_features.pylib/processors/bill_ingestor.pylib/chat_agent.pylib/knowledge_graph/__init__.pylib/utils/config.pyscripts/ingest_knowledge_graph.pyscripts/migrate_transcripts.pyscripts/ingest_bills.pytests/test_database.pytests/test_bill_ingestion.pytests/test_bill_ingestor_unit.pytests/test_advanced_search.pytests/conftest.pydocker-compose.yml.env.examplerequirements.txtdb.shdocs/KG_PLAN.mddocs/CODE_MAP_AND_REVIEW.md
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels