Skip to content

Running build.py to render PEPs leaves residual files in a new topic/ folder #2659

Description

@pradyunsg

It seems that the auto-generation of documents that were added in #2579 also leaves the generated files on disk, and they are not git-ignored.

Details
❯ git status  
On branch main
Your branch is up to date with 'origin/main'.

nothing to commit, working tree clean

❯ git show HEAD --stat
commit 0ffc78187c3b33d3ede64156dbf9e79f823ec116 (HEAD -> main, upstream/main, upstream/HEAD, origin/main)
Author: Pradyun Gedam <pradyunsg@gmail.com>
Date:   Sat Jun 18 21:53:23 2022 +0100

    PEP 632: Remove `Topic: Packaging` header (#2656)

 pep-0632.rst | 1 -
 1 file changed, 1 deletion(-)

❯ python ./build.py                       
Running Sphinx v4.5.0
[snip]
❯ git status          
On branch main
Your branch is up to date with 'origin/main'.

Untracked files:
  (use "git add <file>..." to include in what will be committed)
        topic/

nothing added to commit but untracked files present (use "git add" to track)

❯ ls topic/
index.rst     packaging.rst

PS: While I still think it would be nicer to not generate .rst files in-memory (which would avoid this issue + the regeneration of the files on every run), I'm not gonna advocate for it anymore. :)

Activity

  1. pradyunsg commented on Jun 19, 2022

    @pradyunsg
    MemberAuthor

    FWIW, I noticed this because this broke the workflow I had, running sphinx-autobuild -b dirhtml . build/dirhtml. That isn't the only command affected, as showing in the "details" in the issue description above.

  2. added
    infraCore infrastructure for building and rendering PEPs
    on Jun 19, 2022
  3. hugovk commented on Jun 19, 2022

    @hugovk
    Member

    Shall we add the topic directory to .gitignore?

    We should have make clean wipe it too.

  4. CAM-Gerlach commented on Jun 25, 2022

    @CAM-Gerlach
    Member

    Seems reasonable to me; not sure if @pradyunsg has other suggestions...

    For the record, I generally think @pradyunsg 's idea to to have actual checked-in reST source files with whatever intro paragraph we want for each topic + PEP 0 itself, and have a directive to generate the index tables (parameterized by topic name) instead is a good one.

  5. hugovk commented on Jun 28, 2022

    @hugovk
    Member

    Please see PR #2683 to gitignore the generated topic dir and delete it via make clean.

    For the record, I generally think @pradyunsg 's idea to to have actual checked-in reST source files with whatever intro paragraph we want for each topic + PEP 0 itself, and have a directive to generate the index tables (parameterized by topic name) instead is a good one.

    Yeah, this could be useful for topics needing longer or more complex intro paragraph(s), and could be linted as part of an .rst too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    buginfraCore infrastructure for building and rendering PEPs

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions