Skip to content

DOC [PST] use jinja2 template for rst generation #28511

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

Merged
merged 4 commits into from
Feb 27, 2024

Conversation

Charlie-XIAO
Copy link
Contributor

@Charlie-XIAO Charlie-XIAO commented Feb 23, 2024

Please note that this PR targets the new_web_theme branch!

Towards #28084. This uses jinja2 to convert template rst into actual rst. My reasons are:

  • It simplifies conf.py. Instead of creating a different function to generate each file, the templating approach allows to generate all files with a uniform function.
  • It is easier to know the structure from a template rst instead of by looking at the generating function.
  • One would have syntax highlighting (to some extent) for those files.
  • I found pandas using this approach and thought it is nice.

By the way I forgot to add doc/index.rst to .gitignore in #28331 and added it here.

Copy link

github-actions bot commented Feb 23, 2024

✔️ Linting Passed

All linting checks passed. Your pull request is in excellent shape! ☀️

Generated for commit: 3e4ddbc. Link to the linter CI: here

Copy link
Member

@adrinjalali adrinjalali left a comment

Choose a reason for hiding this comment

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

I agree this seems much cleaner.

@thomasjpfan thomasjpfan merged commit 51a36eb into scikit-learn:new_web_theme Feb 27, 2024
@Charlie-XIAO Charlie-XIAO deleted the pst-rst-template branch February 29, 2024 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants