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

Add a workflow to test imports #8504

Closed
anakin87 opened this issue Oct 30, 2024 · 0 comments · Fixed by #8594
Closed

Add a workflow to test imports #8504

anakin87 opened this issue Oct 30, 2024 · 0 comments · Fixed by #8594
Assignees
Labels
P2 Medium priority, add to the next sprint if no P1 available topic:CI topic:tests

Comments

@anakin87
Copy link
Member

anakin87 commented Oct 30, 2024

One thing that happens often:

  • we introduce a dependency in a lazy import block
  • we forget to wrap types coming from the optional dependency in forward references in method signatures (hf_output: TextGenerationStreamOutput instead of hf_output: "TextGenerationStreamOutput")
  • tests do not catch the error because the test environment contains the optional dependency
  • we figure out the error from the nightly failures in tutorials or core-integrations, which also test with haystack main branch but without the optional dependencies.

I remember some attempts to solve this problem in the past (I can't find the issue).
I would like to create a testing workflow, which

  • uses the default environment - no optional dependencies
  • tries to detect and import modules
  • raises an error or exits
@julian-risch julian-risch added the P2 Medium priority, add to the next sprint if no P1 available label Nov 25, 2024
@anakin87 anakin87 self-assigned this Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 Medium priority, add to the next sprint if no P1 available topic:CI topic:tests
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants