ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Thu, 31 Aug 2023 01:52:00 +0200Using docbuild on an external packagehttps://ask.sagemath.org/question/72984/using-docbuild-on-an-external-package/I am attempting to use docbuild to build Sage-style documentation for a package that is external to Sage. I haven't been able to find information on how to set up and run the docbuild pipeline and am running into several errors. Is there any information available on how to configure docbuild for external packages?
I'm running the command as `sage --docbuild file=/path/to/file html`. I was running into a missing theme, but downloading this directory: https://github.com/sagemath/sage/tree/develop/src/doc/common (which was missing from my `mamba` installation of Sage) and running the command from with the `.../site-packages/sage` directory seems have to solved that.
A few errors I'm still running into:
- `SAGE_DOC_SRC` seems to be set to the wrong location. I think this is because `SAGE_ROOT` is being set to `/home/user/mamba/envs/sage` instead of `.../site-packages/sage`, but I haven't been able to resolve this.
- I'm running into an error in `sphinx.ext.doctest` where `doctest.DocTestParser()` is raising `AttributeError: module 'doctest' has no attribute 'DocTestParser'`Tue, 29 Aug 2023 03:42:48 +0200https://ask.sagemath.org/question/72984/using-docbuild-on-an-external-package/Comment by John Palmieri for <p>I am attempting to use docbuild to build Sage-style documentation for a package that is external to Sage. I haven't been able to find information on how to set up and run the docbuild pipeline and am running into several errors. Is there any information available on how to configure docbuild for external packages?</p>
<p>I'm running the command as <code>sage --docbuild file=/path/to/file html</code>. I was running into a missing theme, but downloading this directory: <a href="https://github.com/sagemath/sage/tree/develop/src/doc/common">https://github.com/sagemath/sage/tree...</a> (which was missing from my <code>mamba</code> installation of Sage) and running the command from with the <code>.../site-packages/sage</code> directory seems have to solved that.</p>
<p>A few errors I'm still running into:</p>
<ul>
<li><code>SAGE_DOC_SRC</code> seems to be set to the wrong location. I think this is because <code>SAGE_ROOT</code> is being set to <code>/home/user/mamba/envs/sage</code> instead of <code>.../site-packages/sage</code>, but I haven't been able to resolve this.</li>
<li>I'm running into an error in <code>sphinx.ext.doctest</code> where <code>doctest.DocTestParser()</code> is raising <code>AttributeError: module 'doctest' has no attribute 'DocTestParser'</code></li>
</ul>
https://ask.sagemath.org/question/72984/using-docbuild-on-an-external-package/?comment=73060#post-id-73060See https://github.com/sagemath/sage/issues/6389: I don't think this is supported, although it would be nice if it were.Thu, 31 Aug 2023 01:52:00 +0200https://ask.sagemath.org/question/72984/using-docbuild-on-an-external-package/?comment=73060#post-id-73060Comment by eric_g for <p>I am attempting to use docbuild to build Sage-style documentation for a package that is external to Sage. I haven't been able to find information on how to set up and run the docbuild pipeline and am running into several errors. Is there any information available on how to configure docbuild for external packages?</p>
<p>I'm running the command as <code>sage --docbuild file=/path/to/file html</code>. I was running into a missing theme, but downloading this directory: <a href="https://github.com/sagemath/sage/tree/develop/src/doc/common">https://github.com/sagemath/sage/tree...</a> (which was missing from my <code>mamba</code> installation of Sage) and running the command from with the <code>.../site-packages/sage</code> directory seems have to solved that.</p>
<p>A few errors I'm still running into:</p>
<ul>
<li><code>SAGE_DOC_SRC</code> seems to be set to the wrong location. I think this is because <code>SAGE_ROOT</code> is being set to <code>/home/user/mamba/envs/sage</code> instead of <code>.../site-packages/sage</code>, but I haven't been able to resolve this.</li>
<li>I'm running into an error in <code>sphinx.ext.doctest</code> where <code>doctest.DocTestParser()</code> is raising <code>AttributeError: module 'doctest' has no attribute 'DocTestParser'</code></li>
</ul>
https://ask.sagemath.org/question/72984/using-docbuild-on-an-external-package/?comment=73026#post-id-73026Could https://github.com/sagemath/sage_sample be a source of inspiration?Tue, 29 Aug 2023 23:05:45 +0200https://ask.sagemath.org/question/72984/using-docbuild-on-an-external-package/?comment=73026#post-id-73026