Some clean up in docbuilding
jdemeyer opened this issue · 52 comments
No change in functionality, just some clean up.
In particular:
- move the code for running Sphinx to
src/sage_setup/docbuild - do not create and delete empty directories, instead silence the Sphinx warnings about non-existing directories
- instead of
compile(), useimport - add a new variable
SAGE_DOC_OUTPUTforsrc/doc/output(this is moved tolocal/share/doc/sagein #19963)
Depends on #19950
CC: @hivert @nathanncohen
Component: build
Author: Jeroen Demeyer
Branch: 0455d14
Reviewer: Marc Mezzarobba
Issue created by migration from https://trac.sagemath.org/ticket/19127
Branch: u/jdemeyer/ticket/19127
Branch pushed to git repo; I updated commit sha1. New commits:
d959af4 | builder/__init__.py should not be executable |
Branch pushed to git repo; I updated commit sha1. New commits:
9b12694 | Merge tag '6.10.beta3' into t/19127/ticket/19127 |
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
97a6f82 | Merge tag '7.0.beta3' into t/19127/ticket/19127 |
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
ea7efaa | Docbuilder cleanup |
Branch pushed to git repo; I updated commit sha1. New commits:
f0f0e4c | Use `__main__` to run docbuilder |
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
2fbfe8e | Docbuilder cleanup |
Description changed:
---
+++
@@ -1,7 +1,7 @@
No change in functionality, just some clean up.
In particular:
-- move the code for running Sphinx to `src/doc/builder`
+- move the code for running Sphinx to `src/sage_setup/docbuild`
- do not create and delete empty directories, instead silence the Sphinx warnings about non-existing directories
- instead of `compile()`, use `import`
- add a new variable `SAGE_DOC_OUTPUT` for `src/doc/output` (with the idea that this might be moved to `local/share/doc` in the future)Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
93339c2 | Docbuilder cleanup |
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
67b8e35 | Docbuilder cleanup |
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
7c98158 | Docbuilder cleanup |
I don't understand what SAGE_DOC_OUTPUT is supposed to do: I tried (without reading the code)
SAGE_DOC_OUTPUT=. sage -docbuild tutorial pdf
but the pdf file still ends up at its usual location.
Replying to @mezzarobba:
I don't understand what
SAGE_DOC_OUTPUTis supposed to do
Such variables really need an absolute path, not relative.
LGTM. Two minor comments though:
- I wonder why you renamed the logger to
doc.builder(the obvious reason to change the name would be to follow the more-or-less standard convention of “namespacing” it using the corresponding Python module name, but that's not what you do). - The developer guide contains a mention of
SAGE_ROOT/src/doc/builder/__init__.pythat probably should be updated or removed.
Branch pushed to git repo; I updated commit sha1. New commits:
537d9d2 | Minor fixes |
Reviewer: Marc Mezzarobba
Description changed:
---
+++
@@ -4,4 +4,4 @@
- move the code for running Sphinx to `src/sage_setup/docbuild`
- do not create and delete empty directories, instead silence the Sphinx warnings about non-existing directories
- instead of `compile()`, use `import`
-- add a new variable `SAGE_DOC_OUTPUT` for `src/doc/output` (with the idea that this might be moved to `local/share/doc` in the future)
+- add a new variable `SAGE_DOC_OUTPUT` for `src/doc/output` (this is moved to `local/share/doc/sage` in #19963)That failure looks unrelated to the documentation, so I would be surprised if that buildbot error was due to this ticket. Which other tickets did you test?
Unrelated to the doctest failure: should the clean target in src/doc/Makefile also do something like rm -f common/*.pyc? It would be good to clean up common/builder.pyc and other left-over files.
The problem seems to be that doctesting the old src/doc/output files fails because they are no longer consider "Sage library" files. Easily fixed by removing src/doc/output.
Branch pushed to git repo; I updated commit sha1. New commits:
2b37da3 | Remove old src/doc/ouput and .pyc files |
Oops, I was confusing this ticket with #19963. Never mind this last commit.
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
Branch pushed to git repo; I updated commit sha1. New commits:
2f8fe6b | Use force_lib=True for "doc" modules |
Changed branch from u/jdemeyer/ticket/19127 to 0455d14