Skip to content

fix: Update Component protocol to fix some type checking issues #7270

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

Merged
merged 4 commits into from
Mar 1, 2024

Conversation

silvanocerza
Copy link
Contributor

Related Issues

  • fixes #issue-number

Proposed Changes:

Changes the Component protocol so Pipeline.add_component() and other methods expecting a Component won't show a warning anymore. This happened only for Language Server and some type checkers.

Before:
Screenshot 2024-02-29 at 16 58 42

After:
Screenshot 2024-02-29 at 16 58 22

How did you test it?

I ran tests locally.

Notes for the reviewer

N/A

Checklist

@silvanocerza silvanocerza self-assigned this Feb 29, 2024
@silvanocerza silvanocerza requested review from a team as code owners February 29, 2024 16:03
@silvanocerza silvanocerza requested review from dfokina, vblagoje and wochinge and removed request for a team and vblagoje February 29, 2024 16:03
Copy link
Contributor

@wochinge wochinge left a comment

Choose a reason for hiding this comment

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

:shipit:

@vblagoje
Copy link
Member

vblagoje commented Mar 1, 2024

@silvanocerza amazing 🔥

@github-actions github-actions bot added topic:tests type:documentation Improvements on the docs labels Mar 1, 2024
@coveralls
Copy link
Collaborator

Pull Request Test Coverage Report for Build 8109321623

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 69 unchanged lines in 9 files lost coverage.
  • Overall coverage increased (+0.006%) to 89.912%

Files with Coverage Reduction New Missed Lines %
core/component/component.py 1 98.78%
components/embedders/sentence_transformers_document_embedder.py 2 95.56%
components/embedders/sentence_transformers_text_embedder.py 2 94.59%
components/embedders/hugging_face_tei_document_embedder.py 3 95.16%
components/embedders/hugging_face_tei_text_embedder.py 3 92.68%
components/embedders/openai_text_embedder.py 9 70.59%
components/embedders/azure_text_embedder.py 13 67.5%
components/embedders/openai_document_embedder.py 16 74.19%
components/embedders/azure_document_embedder.py 20 53.13%
Totals Coverage Status
Change from base Build 8098348721: 0.006%
Covered Lines: 5285
Relevant Lines: 5878

💛 - Coveralls

@silvanocerza silvanocerza merged commit d659795 into main Mar 1, 2024
@silvanocerza silvanocerza deleted the fix-component-type-checking-issues branch March 1, 2024 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants