Remove runtime dependency on sage_docbuild introduced in #33763
mkoeppe opened this issue · 34 comments
(from #33763 comment:19)
We create a new module sage.misc.sagedoc_conf, to which we move the parts of sage_docbuild.conf needed by sage.misc.sphinxify.
Depends on #33922
CC: @kwankyu @jhpalmieri @antonio-rojas
Component: documentation
Author: Matthias Koeppe, Kwankyu Lee
Branch/Commit: 0a02496
Reviewer: Kwankyu Lee, Matthias Koeppe
Issue created by migration from https://trac.sagemath.org/ticket/33936
Description changed:
---
+++
@@ -1,3 +1,4 @@
(from [#33763 comment:19](https://github.com/sagemath/sage/issues/33763#comment:19))
+We create a new module `sage.misc.sagedoc_conf`, to which we move the parts of `sage_docbuild.conf` needed by `sage.misc.sphinxify`.
Author: Matthias Koeppe
This one setting is what is needed to pass the doctests of sage.misc.sagedoc.
Not sure what else is needed
Changed branch from u/mkoeppe/remove_runtime_dependency_on_sage_docbuild_introduced_in__33763 to u/klee/33936
Commit: 7b17c2d
Changed author from Matthias Koeppe to Matthias Koeppe, Kwankyu Lee
Branch pushed to git repo; I updated commit sha1. New commits:
282270f | Fix docs |
I moved more settings which seem to have been used by sphinxify.
I'm not very comfortable with the use of the os.environ variables in sagedoc_conf. I think it would be best if this was done in the docbuild only
Replying to @mkoeppe:
I'm not very comfortable with the use of the
os.environvariables in sagedoc_conf. I think it would be best if this was done in the docbuild only
os.environ is used in two places:
(1) in skip_member(): skip_member() skips problematic members of a module.
(2) in setup() to decide whether or not to include skip_TESTS_block(): skip_TESTS_block() skips TESTS: blocks.
For (1), SAGE_CHECK_NESTED and SAGE_DOC_UNDERSCORE environment variables are used
For (2), SAGE_SKIP_TESTS_BLOCKS environment variables is used.
If we decide on the defaults to these 3 variables, then we can remove them from sagedoc_conf. What would be reasonable defaults?
Replying to @kwankyu:
If we decide on the defaults to these 3 variables, then we can remove them from
sagedoc_conf. What would be reasonable defaults?
We may remove skip_member() altogether, and include skip_TESTS_block().
Branch pushed to git repo; I updated commit sha1. New commits:
c2766bf | Move skip_member() to sage_docbuild |
Replying to @sagetrac-git:
Branch pushed to git repo; I updated commit sha1. New commits:
c2766bf | Move skip_member() to sage_docbuild |
It's not completely moved it seems
sage: integrate?
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
Input In [1], in <cell line: 1>()
----> 1 get_ipython().run_line_magic('pinfo', 'integrate')
[...]
File /usr/lib/python3.10/site-packages/sage/misc/sagedoc_conf.py:160, in setup(app)
158 app.connect('autodoc-process-docstring', process_inherited)
159 app.connect('autodoc-process-docstring', skip_TESTS_block)
--> 160 app.connect('autodoc-skip-member', skip_member)
161 app.add_transform(SagemathTransform)
NameError: name 'skip_member' is not defined
Branch pushed to git repo; I updated commit sha1. New commits:
4296851 | Move the remnants of skip_member from sagedoc_conf |
Replying to @antonio-rojas:
It's not completely moved it seems
Obviously my mistake. Fixed now.
+ assert app.srcdir.startswith(SAGE_DOC_SRC)
I think this is not a good change because sage -docbuild is also used by user packages
Replying to @mkoeppe:
+ assert app.srcdir.startswith(SAGE_DOC_SRC)I think this is not a good change because
sage -docbuildis also used by user packages
Okay. Removed assert and restored if.
Reviewer: ..., Matthias Koeppe
positive review from my side
Changed reviewer from ..., Matthias Koeppe to Kwankyu Lee, Matthias Koeppe
Thank you.
Changed branch from u/klee/33936 to 0a02496