Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-101100: Docs: Check Sphinx warnings and fail if improved#106460

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
hugovk merged 8 commits intopython:mainfromhugovk:docs-check-sphinx-warnings
Jul 22, 2023

Conversation

hugovk
Copy link
Member

@hugovkhugovk commentedJul 5, 2023
edited by bedevere-bot
Loading

Recently I improved some colour contrast forPygments, and they have a file of current contrast ratios. If they're improved by a PR, the CI willfail to make sure the ratio constants are updated, to ensure continual improvement with no regressions.

This is a good idea!

Let's add it here, to check if any files in.nitignore (which may have Sphinx warnings) switch to having no warnings. Then we can remove them from.nitignore to make sure they remain free of warnings.

I was going to add another Sphinx build, a fourth, to touch the relevant files, so only those would be rebuilt. But four builds is far too many!

Instead, let's build only once and save the warnings to a file. Then we can process the file and do the three phases:

  • Annotate PRs with Sphinx nitpicks (as before)
  • Ensure some files always pass Sphinx nit-picky mode (as before)
  • Check for improved files that can be removed from.nitignore (new!)

📚 Documentation preview 📚:https://cpython-previews--106460.org.readthedocs.build/

@hugovkhugovk changed the titleDocs: Check Sphinx warnings and fail if improvedgh-101100: Docs: Check Sphinx warnings and fail if improvedJul 5, 2023
@hugovk
Copy link
MemberAuthor

Marked as draft to make some temporary commits to demonstrate errors.

First, the new check finds five files that no longer contain warnings!

Congratulations! You improved:Doc/c-api/dict.rstDoc/c-api/weakref.rstDoc/library/cgi.rstDoc/library/cmath.rstDoc/library/curses.ascii.rstPlease remove from Doc/tools/.nitignore

https://github.com/python/cpython/actions/runs/5468129112/jobs/9955353278?pr=106460

Some of these files were deleted along withPEP 594's dead batteries. Others have been "accidentally" fixed since.nitignore was first compiled.

AlexWaygood reacted with hooray emoji

@hugovkhugovk added the docsDocumentation in the Doc dir labelJul 5, 2023
@hugovk
Copy link
MemberAuthor

hugovk commentedJul 5, 2023
edited
Loading

Adding a (temporary) warning to3.12.rst, which is not allowed warning, gives:

Error: must not contain warnings:Doc/whatsnew/3.12.rst  9: WARNING: c:func reference target not found: PyFrame_BlockSetup

Plus the file is annotated.

https://github.com/python/cpython/actions/runs/5468217855/jobs/9955568557?pr=106460

(Edit: output updated per3522e2c)

@hugovkhugovk marked this pull request as ready for reviewJuly 5, 2023 20:19
@hugovk
Copy link
MemberAuthor

Updating from main finds a new file that's been fixed! 🎉

Congratulations! You improved:Doc/library/getopt.rstPlease remove from Doc/tools/.nitignore

@hugovkhugovk added the needs backport to 3.12only security fixes labelJul 21, 2023
@hugovkhugovkenabled auto-merge (squash)July 22, 2023 08:00
@hugovkhugovk merged commit806d7c9 intopython:mainJul 22, 2023
@hugovkhugovk deleted the docs-check-sphinx-warnings branchJuly 22, 2023 08:12
@miss-islington
Copy link
Contributor

Thanks@hugovk for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

Sorry@hugovk, I had trouble checking out the3.12 backport branch.
Please retry by removing and re-adding the "needs backport to 3.12" label.
Alternatively, you can backport usingcherry_picker on the command line.
cherry_picker 806d7c98a5da5c1fd2e52a5b666f36ca4f545092 3.12

@hugovk
Copy link
MemberAuthor

3.12 doesn't yet have the refactored.github/workflows/reusable-docs.yml workflow, so let's leave this backport for that 👍

@CAM-Gerlach
Copy link
Member

Looks like that was landed and this is required to backport#108065 , so retrying the backport.

@CAM-GerlachCAM-Gerlach added the needs backport to 3.12only security fixes labelAug 18, 2023
@miss-islington
Copy link
Contributor

Thanks@hugovk for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

Sorry,@hugovk, I could not cleanly backport this to3.12 due to a conflict.
Please backport usingcherry_picker on command line.
cherry_picker 806d7c98a5da5c1fd2e52a5b666f36ca4f545092 3.12

CAM-Gerlach pushed a commit to CAM-Gerlach/cpython that referenced this pull requestAug 18, 2023
CAM-Gerlach added a commit to CAM-Gerlach/cpython that referenced this pull requestAug 18, 2023
…ved (pythonGH-106460).(cherry picked from commit806d7c9)Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
@bedevere-bot
Copy link

GH-108116 is a backport of this pull request to the3.12 branch.

@bedevere-botbedevere-bot removed the needs backport to 3.12only security fixes labelAug 18, 2023
@CAM-Gerlach
Copy link
Member

Had to manually backport it due to conflicts in .nitignore, and might need to resolve a few additional discrepancies there once it builds.

hugovk reacted with thumbs up emoji

CAM-Gerlach added a commit to CAM-Gerlach/cpython that referenced this pull requestAug 18, 2023
…ved (pythonGH-106460).(cherry picked from commit806d7c9)Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Yhg1s pushed a commit that referenced this pull requestAug 18, 2023
…H-106460) (#108116)*gh-101100: Docs: Check Sphinx warnings and fail if improved (#106460)(cherry picked from commit806d7c9)* [3.12]gh-101100: Docs: Check Sphinx warnings and fail if improved (GH-106460).(cherry picked from commit806d7c9)Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>---------Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@ezio-melottiezio-melottiAwaiting requested review from ezio-melottiezio-melotti is a code owner

Assignees

@hugovkhugovk

Labels
docsDocumentation in the Doc dirskip news
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

4 participants
@hugovk@miss-islington@CAM-Gerlach@bedevere-bot

[8]ページ先頭

©2009-2025 Movatter.jp