Skip to content

Automatically generate examples documentation (#19294)#19491

Closed
cj-zhukov wants to merge 1 commit intoapache:mainfrom
cj-zhukov:cj-zhukov/automatically-generate-examples-documentation
Closed

Automatically generate examples documentation (#19294)#19491
cj-zhukov wants to merge 1 commit intoapache:mainfrom
cj-zhukov:cj-zhukov/automatically-generate-examples-documentation

Conversation

@cj-zhukov
Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Rationale for this change

What changes are included in this PR?

Are these changes tested?

Are there any user-facing changes?

@github-actions github-actions Bot added the development-process Related to development process of DataFusion label Dec 25, 2025
@cj-zhukov
Copy link
Copy Markdown
Contributor Author

High-Level Overview

This PR introduces a helper script generate_examples_docs.sh for generating examples documentation in a consistent format. The script discovers example groups and subcommands and emits a Markdown table skeleton that matches the structure enforced by the CI documentation check.
It can be used to generate documentation for all example groups:

 ./ci/scripts/generate_examples_docs.sh

or for a specific group:

 ./ci/scripts/generate_examples_docs.sh --group builtin_functions

@cj-zhukov
Copy link
Copy Markdown
Contributor Author

@Jefffrey since you helped review and discuss the earlier examples documentation PR, you might be interested in this follow-up as well. This one adds a small helper script to generate example documentation in the format enforced by the CI check. Feedback is very welcome.

@Jefffrey
Copy link
Copy Markdown
Contributor

Is the intention to eventually have two scripts, one to check and one to generate? They seem quite similar, and I think a common pattern we have is to only have the generate script, then in CI we rerun the generate script and do a git diff to ensure they are matching.

@cj-zhukov
Copy link
Copy Markdown
Contributor Author

Is the intention to eventually have two scripts, one to check and one to generate? They seem quite similar, and I think a common pattern we have is to only have the generate script, then in CI we rerun the generate script and do a git diff to ensure they are matching.

Good point, thanks for calling this out.

It makes sense to rely on a single generate script and have CI re-run it and check for diffs, rather than maintaining separate generate and check logic.

I can update this PR to drop the standalone check script and wire CI to run generate_examples_docs.sh and fail on git diff instead.

@Jefffrey
Copy link
Copy Markdown
Contributor

Is the intention to eventually have two scripts, one to check and one to generate? They seem quite similar, and I think a common pattern we have is to only have the generate script, then in CI we rerun the generate script and do a git diff to ensure they are matching.

Good point, thanks for calling this out.

It makes sense to rely on a single generate script and have CI re-run it and check for diffs, rather than maintaining separate generate and check logic.

I can update this PR to drop the standalone check script and wire CI to run generate_examples_docs.sh and fail on git diff instead.

That sounds good

@cj-zhukov
Copy link
Copy Markdown
Contributor Author

The work described in this draft PR was completed in #19750, which has now been merged.
Therefore this draft is no longer needed and can be closed.

@cj-zhukov cj-zhukov closed this Feb 18, 2026
@cj-zhukov cj-zhukov deleted the cj-zhukov/automatically-generate-examples-documentation branch February 18, 2026 06:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

development-process Related to development process of DataFusion

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants