Skip to content

gh-69405: Automate creation of idlelib/help.html from Doc/.../idle.html #132723

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

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

StanFromIreland
Copy link
Contributor

@StanFromIreland StanFromIreland commented Apr 19, 2025

I think this would be the best way to keep it consistently synced.

secrets should already be set up as it is used in stale.yml

Pushing to PR's won't work. Two other options

  • Push to main after idle.rst is modified (current)
  • Fail if idle.rst is modified and help.html is not in sync
2nd Option POC
name: Check if Lib/idlelib/help.html is in sync with Doc/library/idle.rst

on:
  push:
    paths:
      - "Doc/library/idle.rst"

jobs:
  check-help-html:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0
          persist-credentials: false
      - uses: actions/setup-python@v5
        with:
          python-version: '3.x'
      - name: Bild and copy
        run: |
          cd Doc
          make venv
          make html
          cd ..
          python -c "from Lib.idlelib.help import copy_strip; copy_strip()"
      - run: |
          if ! git diff --quiet Lib/idlelib/help.html; then
            exit 1

Requesting: @terryjreedy


Test run 0: https://github.com/python/cpython/actions/runs/14548774396/job/40817476539?pr=132723
Test run 1: https://github.com/python/cpython/actions/runs/14548788199/job/40817507527?pr=132723


@StanFromIreland
Copy link
Contributor Author

@terryjreedy What do you think? An action that fails if the file is out of sync and it would be on the submitter to modify it, like is expected for clinic, config etc.?

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.

1 participant