MCPcopy Create free account
hub / github.com/datastax/astrapy / sync_table_multiplevectorize

Function sync_table_multiplevectorize

tests/base/conftest.py:647–669  ·  view source on GitHub ↗

An actual table on DB, in the main keyspace

(
    data_api_credentials_kwargs: DataAPICredentials,
    sync_database: Database,
    service_collection_parameters: dict[str, Any],
)

Source from the content-addressed store, hash-verified

645###
646@pytest.fixture(scope="session")
647def sync_table_multiplevectorize(
648 data_api_credentials_kwargs: DataAPICredentials,
649 sync_database: Database,
650 service_collection_parameters: dict[str, Any],
651) -> Iterable[DefaultTable]:
652 """An actual table on DB, in the main keyspace"""
653 params = service_collection_parameters
654
655 table = sync_database.create_table(
656 TEST_MULTIPLEVECTORIZE_TABLE_NAME,
657 definition=TEST_MULTIPLEVECTORIZE_TABLE_DEFINITION,
658 embedding_api_key=params["api_key"],
659 )
660 for index_name, index_column in TEST_MULTIPLEVECTORIZE_TABLE_INDEXES:
661 table.create_vector_index(
662 index_name,
663 index_column,
664 options=TEST_MULTIPLEVECTORIZE_TABLE_INDEX_OPTIONS,
665 )
666
667 yield table
668
669 sync_database.drop_table(TEST_MULTIPLEVECTORIZE_TABLE_NAME)
670
671
672@pytest.fixture(scope="function")

Callers

nothing calls this directly

Calls 3

create_tableMethod · 0.45
create_vector_indexMethod · 0.45
drop_tableMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…