From f59ddcab74315cd65cdae87ecefc798547aea0d6 Mon Sep 17 00:00:00 2001 From: Christophe Bornet Date: Wed, 21 Feb 2024 01:58:56 +0100 Subject: [PATCH] partners/astradb: Use single file instead of module for AstraDBVectorStore (#17644) --- .../{vectorstores/astradb.py => vectorstores.py} | 0 .../astradb/langchain_astradb/vectorstores/__init__.py | 5 ----- .../{vectorstores/test_astradb.py => test_vectorstores.py} | 3 +-- 3 files changed, 1 insertion(+), 7 deletions(-) rename libs/partners/astradb/langchain_astradb/{vectorstores/astradb.py => vectorstores.py} (100%) delete mode 100644 libs/partners/astradb/langchain_astradb/vectorstores/__init__.py rename libs/partners/astradb/tests/integration_tests/{vectorstores/test_astradb.py => test_vectorstores.py} (99%) diff --git a/libs/partners/astradb/langchain_astradb/vectorstores/astradb.py b/libs/partners/astradb/langchain_astradb/vectorstores.py similarity index 100% rename from libs/partners/astradb/langchain_astradb/vectorstores/astradb.py rename to libs/partners/astradb/langchain_astradb/vectorstores.py diff --git a/libs/partners/astradb/langchain_astradb/vectorstores/__init__.py b/libs/partners/astradb/langchain_astradb/vectorstores/__init__.py deleted file mode 100644 index 310732d125f..00000000000 --- a/libs/partners/astradb/langchain_astradb/vectorstores/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -from langchain_astradb.vectorstores.astradb import AstraDBVectorStore - -__all__ = [ - "AstraDBVectorStore", -] diff --git a/libs/partners/astradb/tests/integration_tests/vectorstores/test_astradb.py b/libs/partners/astradb/tests/integration_tests/test_vectorstores.py similarity index 99% rename from libs/partners/astradb/tests/integration_tests/vectorstores/test_astradb.py rename to libs/partners/astradb/tests/integration_tests/test_vectorstores.py index de68c016a98..8e6d20152b9 100644 --- a/libs/partners/astradb/tests/integration_tests/vectorstores/test_astradb.py +++ b/libs/partners/astradb/tests/integration_tests/test_vectorstores.py @@ -10,7 +10,7 @@ Required to run this test: - optionally this as well (otherwise defaults are used): export ASTRA_DB_KEYSPACE="my_keyspace" - optionally: - export SKIP_COLLECTION_DELETE="0" ("1" = no deletions, default) + export ASTRA_DB_SKIP_COLLECTION_DELETIONS="0" ("1" = no deletions, default) """ import json @@ -157,7 +157,6 @@ def store_parseremb( v_store.clear() -@pytest.mark.requires("astrapy") @pytest.mark.skipif(not _has_env_vars(), reason="Missing Astra DB env. vars") class TestAstraDBVectorStore: def test_astradb_vectorstore_create_delete(