sagemath / sage

Main repository of SageMath. Now open for Issues and Pull Requests.
https://www.sagemath.org
Other
1.08k stars 394 forks source link

`sage.features.topcom` #37858

Open mkoeppe opened 2 weeks ago

mkoeppe commented 2 weeks ago

We also change how the SPKG index in the reference manual is generated. index.rst is now a static file that uses .. include directives to read in generated files index_standard.rst, index_optional.rst, etc.

:memo: Checklist

:hourglass: Dependencies

github-actions[bot] commented 2 weeks ago

Documentation preview for this PR (built with commit 313ca17cd38d24c3451885c08217c6be14f40d95; changes) is ready! :tada: This preview will update shortly after each push to this PR.

kwankyu commented 2 weeks ago

This needs to be updated: https://github.com/sagemath/sage/blob/15fcf52fbd6a72f0d0f226c02fe1a74b21bbfaf5/src/doc/bootstrap#L163

(btw, I think this list should be automatically generated and split from spkgs list and moved to a new location.)

mkoeppe commented 2 weeks ago

Shall we use a sphinx .. include directive for that?

kwankyu commented 2 weeks ago

I don't know. Anyway, this is for a new PR. I may work on it later.

mkoeppe commented 2 weeks ago

Here's an attempt. The list of features is not autogenerated (we don't do that for any Python modules); but at least it's now in an ordinary editable index file.

mkoeppe commented 2 weeks ago

Thank you!

vbraun commented 2 weeks ago

I'm getting

[sagemath_doc_html-none] [spkg-install] sage --docbuild --no-pdf-links reference/modules inventory --no-prune-empty-dirs
[sagemath_doc_html-none] [spkg-install] [spkg     ] The inventory file is in ../../local/share/doc/sage/inventory/en/reference/spkg.
[sagemath_doc_html-none] [spkg-install] Error building the documentation.
[sagemath_doc_html-none] [spkg-install] Traceback (most recent call last):
[sagemath_doc_html-none] [spkg-install]   File "<frozen runpy>", line 198, in _run_module_as_main
[sagemath_doc_html-none] [spkg-install]   File "<frozen runpy>", line 88, in _run_code
[sagemath_doc_html-none] [spkg-install]   File "/home/release/Sage/src/sage_docbuild/__main__.py", line 514, in <module>
[sagemath_doc_html-none] [spkg-install]     sys.exit(main())
[sagemath_doc_html-none] [spkg-install]              ^^^^^^
[sagemath_doc_html-none] [spkg-install]   File "/home/release/Sage/src/sage_docbuild/__main__.py", line 510, in main
[sagemath_doc_html-none] [spkg-install]     builder()
[sagemath_doc_html-none] [spkg-install]   File "/home/release/Sage/src/sage_docbuild/builders.py", line 823, in _wrapper
[sagemath_doc_html-none] [spkg-install]     getattr(DocBuilder, build_type)(self, *args, **kwds)
[sagemath_doc_html-none] [spkg-install]   File "/home/release/Sage/src/sage_docbuild/builders.py", line 163, in f
[sagemath_doc_html-none] [spkg-install]     runsphinx()
[sagemath_doc_html-none] [spkg-install]   File "/home/release/Sage/src/sage_docbuild/sphinxbuild.py", line 319, in runsphinx
[sagemath_doc_html-none] [spkg-install]     sys.stderr.raise_errors()
[sagemath_doc_html-none] [spkg-install]   File "/home/release/Sage/src/sage_docbuild/sphinxbuild.py", line 255, in raise_errors
[sagemath_doc_html-none] [spkg-install]     raise OSError(self._error)
[sagemath_doc_html-none] [spkg-install] OSError: /home/release/Sage/src/doc/en/reference/spkg/index.rst:28: WARNING: toctree contains reference to nonexisting document 'sage/features'
mkoeppe commented 2 weeks ago

@vbraun Is that in an incremental build? This looks like #37786.

Anyway I have pushed a possible fix

vbraun commented 2 weeks ago

Yes, incremental

vbraun commented 1 week ago

Still fails. Try

./bootstrap
cd src/doc
make doc-inventory--reference-spkg     # fail
make doc-inventory--reference-spkg     # succeeds