langchain/libs/community/tests/unit_tests
Eric Pinzur f636c83321
community: Cassandra Vector Store: modernize implementation (#27253)
**Description:** 

This PR updates `CassandraGraphVectorStore` to be based off
`CassandraVectorStore`, instead of using a custom CQL implementation.
This allows users using a `CassandraVectorStore` to upgrade to a
`GraphVectorStore` without having to change their database schema or
re-embed documents.

This PR also updates the documentation of the `GraphVectorStore` base
class and contains native async implementations for the standard graph
methods: `traversal_search` and `mmr_traversal_search` in
`CassandraVectorStore`.

**Issue:** No issue number.

**Dependencies:** https://github.com/langchain-ai/langchain/pull/27078
(already-merged)

**Lint and test**: 
- Lint and tests all pass, including existing
`CassandraGraphVectorStore` tests.
- Also added numerous additional tests based of the tests in
`langchain-astradb` which cover many more scenarios than the existing
tests for `Cassandra` and `CassandraGraphVectorStore`

** BREAKING CHANGE**

Note that this is a breaking change for existing users of
`CassandraGraphVectorStore`. They will need to wipe their database table
and restart.

However:
- The interfaces have not changed. Just the underlying storage
mechanism.
- Any one using `langchain_community.vectorstores.Cassandra` can instead
use `langchain_community.graph_vectorstores.CassandraGraphVectorStore`
and they will gain Graph capabilities without having to re-embed their
existing documents. This is the primary goal of this PR.

---------

Co-authored-by: Erick Friis <erick@langchain.dev>
2024-10-22 18:11:11 +00:00
..
agent_toolkits community[patch]: Fix requests alias for load_tools (#23734) 2024-07-01 15:02:14 -07:00
agents multiple: pydantic 2 compatibility, v0.3 (#26443) 2024-09-13 14:38:45 -07:00
callbacks core[patch]: Fix "argument of type 'NoneType' is not iterable" error in LangChainTracer (#26576) 2024-09-17 10:29:46 -07:00
chains multiple: pydantic 2 compatibility, v0.3 (#26443) 2024-09-13 14:38:45 -07:00
chat_loaders infra: update mypy 1.10, ruff 0.5 (#23721) 2024-07-03 10:33:27 -07:00
chat_message_histories community[patch]: restore compatibility with SQLAlchemy 1.x (#22546) 2024-06-19 17:58:57 +00:00
chat_models community: Update OCI data science integration (#27083) 2024-10-15 08:32:54 -07:00
cross_encoders community[patch]: cross_encoders flatten namespaces (#20183) 2024-04-08 20:50:23 -04:00
data community: Resolve refs recursively when generating openai_fn from OpenAPI spec (#19002) 2024-09-02 13:17:39 -07:00
docstore infra: update mypy 1.10, ruff 0.5 (#23721) 2024-07-03 10:33:27 -07:00
document_compressors community[minor]: add Volcengine Rerank (#22700) 2024-06-10 13:41:05 -07:00
document_loaders community[patch]: add web loader tests (#26728) 2024-09-20 18:29:54 -04:00
document_transformers infra: update mypy 1.10, ruff 0.5 (#23721) 2024-07-03 10:33:27 -07:00
embeddings multiple: rely on asyncio_mode auto in tests (#27200) 2024-10-15 16:26:38 +00:00
evaluation infra: update mypy 1.10, ruff 0.5 (#23721) 2024-07-03 10:33:27 -07:00
examples
graph_vectorstores community: Cassandra Vector Store: modernize implementation (#27253) 2024-10-22 18:11:11 +00:00
graphs community[minor]: add graph store implementation for apache age (#20582) 2024-04-20 14:31:04 -07:00
imports community[minor]: Adds a vector store for Azure Cosmos DB for NoSQL (#21676) 2024-06-11 10:34:01 -07:00
indexes
llms multiple: rely on asyncio_mode auto in tests (#27200) 2024-10-15 16:26:38 +00:00
load multiple: pydantic 2 compatibility, v0.3 (#26443) 2024-09-13 14:38:45 -07:00
query_constructors add neo4j query constructor for self query (#25288) 2024-08-30 14:54:33 +00:00
retrievers multiple: rely on asyncio_mode auto in tests (#27200) 2024-10-15 16:26:38 +00:00
storage infra: add min version testing to pr test flow (#24358) 2024-07-19 22:03:19 +00:00
tools multiple: rely on asyncio_mode auto in tests (#27200) 2024-10-15 16:26:38 +00:00
utilities multiple: rely on asyncio_mode auto in tests (#27200) 2024-10-15 16:26:38 +00:00
utils partners: Use simsimd types (#25299) 2024-08-23 10:41:39 -04:00
vectorstores community: add sqlite-vec vectorstore (#25003) 2024-09-26 17:37:10 +00:00
__init__.py
conftest.py infra: update mypy 1.10, ruff 0.5 (#23721) 2024-07-03 10:33:27 -07:00
test_cache.py infra: update mypy 1.10, ruff 0.5 (#23721) 2024-07-03 10:33:27 -07:00
test_dependencies.py multiple: pydantic 2 compatibility, v0.3 (#26443) 2024-09-13 14:38:45 -07:00
test_document_transformers.py infra: update mypy 1.10, ruff 0.5 (#23721) 2024-07-03 10:33:27 -07:00
test_graph_vectorstores.py core, community: move graph vectorstores to community (#26678) 2024-09-19 11:38:14 -07:00
test_imports.py community[patch]: Fix remaining __inits__ in community (#22037) 2024-05-22 17:42:17 +00:00
test_sql_database_schema.py infra: add min version testing to pr test flow (#24358) 2024-07-19 22:03:19 +00:00
test_sql_database.py infra: add min version testing to pr test flow (#24358) 2024-07-19 22:03:19 +00:00
test_sqlalchemy.py