Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: inherit from FilterDocumentsTestWithDataframe in Document Stores #1290

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

anakin87
Copy link
Member

@anakin87 anakin87 commented Jan 15, 2025

Related Issues

Proposed Changes:

  • make the Document Stores test suites inherit from FilterDocumentsTestWithDataframe, so that tests on dataframes will keep running

How did you test it?

CI

Checklist

@github-actions github-actions bot added the type:documentation Improvements or additions to documentation label Jan 15, 2025
@anakin87 anakin87 changed the title use FilterDocumentsTestWithDataframe testing class chore: inherit from FilterDocumentsTestWithDataframe in Document Stores Jan 15, 2025
Comment on lines -409 to -420
@pytest.mark.skip(reason="Filter on dataframe contents is not supported.")
def test_comparison_equal_with_dataframe(
self, document_store: ChromaDocumentStore, filterable_docs: List[Document]
):
pass

@pytest.mark.skip(reason="Filter on dataframe contents is not supported.")
def test_comparison_not_equal_with_dataframe(
self, document_store: ChromaDocumentStore, filterable_docs: List[Document]
):
pass

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Chroma does not support dataframes, so in this case I'm not using the new testing class.
It is no longer necessary to skip these tests: they are no longer part of the basic tests.

documents = create_filterable_docs(include_dataframe_docs=True)
for i in range(len(documents)):
if date := documents[i].meta.get("date"):
documents[i].meta["date"] = f"{date}Z"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for Weaviate, I simplified the existing code and added a new filterable_docs_with_dataframe fixture.

@anakin87 anakin87 marked this pull request as ready for review January 15, 2025 10:02
@anakin87 anakin87 requested a review from a team as a code owner January 15, 2025 10:02
@anakin87 anakin87 requested review from julian-risch and removed request for a team January 15, 2025 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inherit from FilterDocumentsTestWithDataframe in Document Stores tests after Haystack 2.9.0 release
1 participant