Skip to content

CI Make templated rst files clickable in the check rendered doc action #29948

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

Conversation

jeremiedbb
Copy link
Member

@jeremiedbb jeremiedbb commented Sep 27, 2024

Changes to .rst.template files can't be directly checked in the check rendered doc action because the script in charge of generating the _changed.html file creates broken links. This PR extends the existing logic to handle .rst.template files.

cc/ @lesteve @Charlie-XIAO

Copy link

github-actions bot commented Sep 27, 2024

✔️ Linting Passed

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

Generated for commit: 7e45b0b. Link to the linter CI: here

@jeremiedbb
Copy link
Member Author

The working link can be seen in this previous build https://output.circle-artifacts.com/output/job/0315fdb6-151a-43f1-8c56-1b591afaf6ab/artifacts/0/doc/_changed.html (where I added a temporary change in a .template file).

@jeremiedbb
Copy link
Member Author

The fix is simple enough so I think it's worth merging it as is, but in the future I might consider reimplementing this script as a python script which I think will ease its maintenance.

@jeremiedbb jeremiedbb marked this pull request as ready for review October 1, 2024 12:24
Copy link
Contributor

@Charlie-XIAO Charlie-XIAO left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @jeremiedbb!

The fix is simple enough so I think it's worth merging it as is, but in the future I might consider reimplementing this script as a python script which I think will ease its maintenance.

Indeed and it would be hard to implement more complicated logic in bash script. For instance the doc/api/module.rst.template template is actually mapped to actual module pages rather than doc/api/module.rst, for this we may want to import from doc/conf.py and use a Python script to do more complex things. I don't think we need to take this into account in the current PR though.

@lesteve lesteve merged commit 02423d4 into scikit-learn:main Oct 2, 2024
32 checks passed
@lesteve
Copy link
Member

lesteve commented Oct 2, 2024

Merging, thanks!

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