Skip to content

test: running docstrings code snippets which generate API docs#10993

Merged
davidsbatista merged 56 commits intomainfrom
test/fix-running-code-snippets
Apr 1, 2026
Merged

test: running docstrings code snippets which generate API docs#10993
davidsbatista merged 56 commits intomainfrom
test/fix-running-code-snippets

Conversation

@davidsbatista
Copy link
Copy Markdown
Contributor

@davidsbatista davidsbatista commented Mar 31, 2026

Related Issues

Proposed Changes:

Typical reasons for failing which were fixed:

  • Missing API Keys
  • Missing Optional Dependencies
  • Missing test files (e.g.: sample.pdf, sample.xls)

The majority are skipped because of the heuristic:

  • No import statement detected; treated as concept/illustrative

How did you test it?

  • local workflow loop:
    • code changes
    • manual generation of .md
    • running test script over md files
  • CI tests

Checklist

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 31, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
haystack-docs Ignored Ignored Preview Apr 1, 2026 11:29am

Request Review

@davidsbatista davidsbatista added the ignore-for-release-notes PRs with this flag won't be included in the release notes. label Mar 31, 2026
@coveralls
Copy link
Copy Markdown
Collaborator

coveralls commented Mar 31, 2026

Pull Request Test Coverage Report for Build 23846355211

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 131 unchanged lines in 28 files lost coverage.
  • Overall coverage decreased (-0.01%) to 92.892%

Files with Coverage Reduction New Missed Lines %
components/converters/docx.py 1 99.43%
components/embedders/image/sentence_transformers_doc_image_embedder.py 1 98.72%
components/generators/openai_dalle.py 1 95.45%
components/rankers/hugging_face_tei.py 1 98.59%
components/websearch/searchapi.py 1 98.65%
components/converters/pptx.py 2 97.1%
components/converters/pypdf.py 2 95.95%
components/converters/txt.py 2 91.18%
components/embedders/azure_document_embedder.py 2 96.0%
components/embedders/azure_text_embedder.py 2 95.45%
Totals Coverage Status
Change from base Build 23846041765: -0.01%
Covered Lines: 15878
Relevant Lines: 17093

💛 - Coveralls

@davidsbatista davidsbatista requested a review from anakin87 March 31, 2026 14:57
@davidsbatista
Copy link
Copy Markdown
Contributor Author

@anakin87 feel free to review - I'm removing some of the <!-- test-ignore -->

@davidsbatista davidsbatista requested a review from anakin87 April 1, 2026 09:37
@anakin87
Copy link
Copy Markdown
Member

anakin87 commented Apr 1, 2026

I opened a PR with mypy fixes: #11003

Copy link
Copy Markdown
Member

@anakin87 anakin87 left a comment

Choose a reason for hiding this comment

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

Looks good.

I suggest opening two additional issues: one about testing more ignored snippets, the other about standardizing print outputs in code examples (we might also let community contributors do this).

@davidsbatista davidsbatista enabled auto-merge (squash) April 1, 2026 10:26
@davidsbatista davidsbatista merged commit b6d9449 into main Apr 1, 2026
26 checks passed
@davidsbatista davidsbatista deleted the test/fix-running-code-snippets branch April 1, 2026 11:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ignore-for-release-notes PRs with this flag won't be included in the release notes. topic:CI topic:core type:documentation Improvements on the docs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants