Skip to content

docs: add PythonCodeSplitter documentation page and register in index#11437

Open
AbdullahUsama wants to merge 2 commits into
deepset-ai:mainfrom
AbdullahUsama:feat/docs-python-code-splitter
Open

docs: add PythonCodeSplitter documentation page and register in index#11437
AbdullahUsama wants to merge 2 commits into
deepset-ai:mainfrom
AbdullahUsama:feat/docs-python-code-splitter

Conversation

@AbdullahUsama
Copy link
Copy Markdown

Related Issues

Proposed Changes:

  • Added a dedicated documentation page (pythoncodesplitter.mdx) for the newly introduced PythonCodeSplitter component under docs-website/docs/pipeline-components/preprocessors/.
  • Documented the component's core purpose, standard standalone usage, pipeline integration snippet, and its respective input/output parameters.
  • Registered and linked the new component in the central preprocessors category index file (preprocessors.mdx).

How did you test it?

  • Manual Verification: Ran the documentation website locally using npm run start inside the docs-website directory. Verified that the PythonCodeSplitter page renders correctly, the code block formatting is intact, and the link from the category index navigates to the page seamlessly without any build or runtime compilation errors.

Notes for the reviewer

The new .mdx page closely mirrors the design structure of existing preprocessor component docs (like DocumentSplitter) to maintain consistency across the Haystack documentation ecosystem.

Checklist

  • I have read the contributors guidelines and the code of conduct.
  • I have updated the related issue with new insights and changes.
  • I have added unit tests and updated the docstrings. (N/A: Pure documentation PR)
  • I've used one of the conventional commit types for my PR title: fix:, feat:, build:, chore:, ci:, docs:, style:, refactor:, perf:, test: and added ! in case the PR includes breaking changes.
  • I have documented my code.
  • I have added a release note file, following the contributors guidelines. (N/A: Typically not required for minor documentation fixes unless specified by maintainers)
  • I have run pre-commit hooks and fixed any issue.

@AbdullahUsama AbdullahUsama requested a review from a team as a code owner May 29, 2026 18:18
@AbdullahUsama AbdullahUsama requested review from Copilot and sjrl and removed request for a team May 29, 2026 18:18
@vercel
Copy link
Copy Markdown

vercel Bot commented May 29, 2026

@AbdullahUsama 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 May 29, 2026

CLA assistant check
All committers have signed the CLA.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds documentation for the new PythonCodeSplitter preprocessor and links it from the main PreProcessors documentation index.

Changes:

  • Added a new docs page describing PythonCodeSplitter, including behavior details, metadata, parameters, and usage examples.
  • Added PythonCodeSplitter to the PreProcessors component list.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
docs-website/docs/pipeline-components/preprocessors/pythoncodesplitter.mdx New component documentation page for PythonCodeSplitter (overview, metadata, parameters, examples).
docs-website/docs/pipeline-components/preprocessors.mdx Adds PythonCodeSplitter entry to the preprocessor list/table.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +94 to +99
splitter = PythonCodeSplitter(
min_effective_lines=20,
max_effective_lines=100,
strip_docstrings=True,
)
result = splitter.run(documents=[Document(content=source, meta={"file_name": "my_module.py"})])
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.

Docs: Add a docs page for PythonCodeSplitter

3 participants