Skip to content
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

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

Closed
pradyunsg opened this issue Jun 19, 2022 · 4 comments · Fixed by #2683
Closed

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

pradyunsg opened this issue Jun 19, 2022 · 4 comments · Fixed by #2683
Labels
bug infra Core infrastructure for building and rendering PEPs

Comments

@pradyunsg
Copy link
Member

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.

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

nothing to commit, working tree cleangit show HEAD --stat
commit 0ffc78187c3b33d3ede64156dbf9e79f823ec116 (HEAD -> main, upstream/main, upstream/HEAD, origin/main)
Author: Pradyun Gedam <[email protected]>
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. :)

@pradyunsg
Copy link
Member Author

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.

@pradyunsg pradyunsg added bug infra Core infrastructure for building and rendering PEPs labels Jun 19, 2022
@hugovk
Copy link
Member

hugovk commented Jun 19, 2022

Shall we add the topic directory to .gitignore?

We should have make clean wipe it too.

@CAM-Gerlach
Copy link
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.

@hugovk
Copy link
Member

hugovk commented Jun 28, 2022

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
Labels
bug infra Core infrastructure for building and rendering PEPs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants