Skip to content

Issue #11004: enable additional docstring snippets in CI validation#11464

Open
TanKaizokuO wants to merge 3 commits into
deepset-ai:mainfrom
TanKaizokuO:fix/11004-enable-docstring-ci-tests
Open

Issue #11004: enable additional docstring snippets in CI validation#11464
TanKaizokuO wants to merge 3 commits into
deepset-ai:mainfrom
TanKaizokuO:fix/11004-enable-docstring-ci-tests

Conversation

@TanKaizokuO
Copy link
Copy Markdown

@TanKaizokuO TanKaizokuO commented Jun 1, 2026

Related Issues

Proposed Changes

Enabled 8 additional docstring code snippets to run in CI by removing <!-- test-ignore --> markers and making examples CI-friendly.

Key updates:

  • Replaced nonexistent file references with valid test assets or ByteStream.
  • Mocked OpenAI client initialization and API responses in OpenAI embedder examples.
  • Mocked Sentence Transformers backend to avoid model downloads.
  • Mocked Hugging Face backend for NamedEntityExtractor.
  • Mocked OpenAPIClient.from_spec to avoid external requests.

How did you test it?

Regenerated docs and validated snippets:

hatch run docs

hatch -e test run python docs-website/scripts/test_python_snippets.py --verbose \
tmp_api_reference/converters_api.md \
tmp_api_reference/embedders_api.md \
tmp_api_reference/extractors_api.md \
tmp_api_reference/connectors_api.md

Additional passing snippets:

  • converters: +2
  • embedders: +4
  • extractors: +1
  • connectors: +1

Total: +8 passing snippets

Also verified:

hatch run fmt
hatch run test:types

Notes for the reviewer

  • Changes are limited to documentation examples.
  • Mocking is used to make examples deterministic and CI-compatible.
  • All removed <!-- test-ignore --> markers were validated successfully.

Checklist

  • I have read the contributors guidelines and code of conduct.
  • I have updated the related issue with new insights and changes.
  • I have added unit tests and updated the docstrings.
  • I've used a conventional commit type for my PR title.
  • I have documented my code.
  • I have added a release note file.
  • I have run pre-commit hooks and fixed any issues.

@TanKaizokuO TanKaizokuO requested a review from a team as a code owner June 1, 2026 13:53
@TanKaizokuO TanKaizokuO requested review from anakin87 and removed request for a team June 1, 2026 13:53
@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 1, 2026

@TanKaizokuO is attempting to deploy a commit to the deepset Team on Vercel.

A member of the Team first needs to authorize it.

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Jun 1, 2026

CLA assistant check
All committers have signed the CLA.

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.

Please sign the CLA, then I'll review the PR

@anakin87
Copy link
Copy Markdown
Member

anakin87 commented Jun 1, 2026

See #11468 (review)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants