mirror of
https://github.com/deepset-ai/haystack.git
synced 2025-07-17 05:51:22 +00:00

* update to PineconeDocumentStore to remove dependency on SQL db * Update Documentation & Code Style * typing fixes * Update Documentation & Code Style * fixed embedding generator to yield Documents * Update Documentation & Code Style * fixes for final typing issues * fixes for pylint * Update Documentation & Code Style * uncomment pinecone tests * added new params to docstrings * Update Documentation & Code Style * Update Documentation & Code Style * Update haystack/document_stores/pinecone.py Co-authored-by: Sara Zan <sarazanzo94@gmail.com> * Update haystack/document_stores/pinecone.py Co-authored-by: Sara Zan <sarazanzo94@gmail.com> * Update Documentation & Code Style * Update haystack/document_stores/pinecone.py Co-authored-by: Sara Zan <sarazanzo94@gmail.com> * Update haystack/document_stores/pinecone.py Co-authored-by: Sara Zan <sarazanzo94@gmail.com> * Update haystack/document_stores/pinecone.py Co-authored-by: Sara Zan <sarazanzo94@gmail.com> * Update haystack/document_stores/pinecone.py Co-authored-by: Sara Zan <sarazanzo94@gmail.com> * changes based on comments, updated errors and install * Update Documentation & Code Style * mypy * implement simple filtering in pinecone mock * typo * typo in reverse * account for missing meta key in filtering * typo * added metadata filtering to describe index * added handling for users switching indexes in same doc store, and handling duplicate docs in write * syntax tweaks * added index option to document/embedding count calls * labels implementation in progress * added metadata fields to be indexed for pinecone tests * further changes to mock * WIP implementation of labels+multilabels * switched to rely on labels namespace rather than filter * simpler delete_labels * label fixes, remove debug code * Apply dostring fixes Co-authored-by: Agnieszka Marzec <97166305+agnieszka-m@users.noreply.github.com> * mypy * pylint * docs * temporarily un-mock Pinecone * Small Pinecone test suite * pylint * Add fake test key to pass the None check * Add again fake test key to pass the None check * Add Pinecone to default docstores and fix filters * Fix field name * Change field name * Change field value * Remove comments * forgot to upgrade pyproject.toml Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Sara Zan <sara.zanzottera@deepset.ai> Co-authored-by: Sara Zan <sarazanzo94@gmail.com> Co-authored-by: Agnieszka Marzec <97166305+agnieszka-m@users.noreply.github.com>
25 lines
1.2 KiB
Python
25 lines
1.2 KiB
Python
def pytest_addoption(parser):
|
|
parser.addoption(
|
|
"--document_store_type",
|
|
action="store",
|
|
default="elasticsearch, faiss, sql, memory, milvus1, milvus, weaviate, pinecone",
|
|
)
|
|
|
|
|
|
def pytest_generate_tests(metafunc):
|
|
# Get selected docstores from CLI arg
|
|
document_store_type = metafunc.config.option.document_store_type
|
|
selected_doc_stores = [item.strip() for item in document_store_type.split(",")]
|
|
|
|
# parametrize document_store fixture if it's in the test function argument list
|
|
# but does not have an explicit parametrize annotation e.g
|
|
# @pytest.mark.parametrize("document_store", ["memory"], indirect=False)
|
|
found_mark_parametrize_document_store = False
|
|
for marker in metafunc.definition.iter_markers("parametrize"):
|
|
if "document_store" in marker.args[0]:
|
|
found_mark_parametrize_document_store = True
|
|
break
|
|
# for all others that don't have explicit parametrization, we add the ones from the CLI arg
|
|
if "document_store" in metafunc.fixturenames and not found_mark_parametrize_document_store:
|
|
metafunc.parametrize("document_store", selected_doc_stores, indirect=True)
|