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

Meta-ticket: Sage docbuild #20080

Open
nthiery opened this issue Feb 18, 2016 · 30 comments
Open

Meta-ticket: Sage docbuild #20080

nthiery opened this issue Feb 18, 2016 · 30 comments

Comments

@nthiery
Copy link
Contributor

nthiery commented Feb 18, 2016

Docbuild tickets:

Sphinx tickets:

See also:


Overview of Sphinx custom code in Sage's documentation build system

The goal of this ticket is to write an overview of the various bits and pieces of custom Sphinx code in Sage, with the long term goal to see which pieces could be:

  • thrown away, using features that are now in Sphinx
  • generalized and submitted upstream
  • cleaned up

Here is a list of files with their relative roles:

src/sage/docs

  • __init__.py: empty file

  • conf.py: standard Sphinx configuration file.

src/sage_docbuild (was src/sage_setup/docbuild)

  • __init__.py: top-level docbuilder, contains classes for the various documents (e.g. reference manual).

  • __main__.py: stub entry point for sage --docbuild, calls main() from __init__.py

  • build_options.py: Parse the option for building.

  • sphinxbuild.py: Sage's version of the sphinx-build script

    mainly deals with logging and error reporting.

src/sage_docbuild/ext (was src/sage_setup/docbuild/ext)

  • inventory_builder.py:

    A customized HTML builder which only generates intersphinx "object.inv"
    inventory files and pickle files. The documentation files are not written.
    This is supposed to be used with multidocs below.

  • multidocs.py:

    The goal of this extension is to manage a multi documentation in Sphinx.
    To be able to compile Sage's huge documentation in parallel, the
    documentation is cut into a bunch of independent documentations called
    "subdocs", which are compiled separately. There is a master document which
    points to all the subdocs. The intersphinx extension ensures that the
    cross-link between the subdocs are correctly resolved. However some work
    is needed to build a global index. This is the goal of multidocs.

    More precisely this extension ensures the correct merging of

      1. the todo list if this extension is activated;
      2. the python indexes;
      3. the list of python modules;
      4. the javascript index;
      5. the citations.
    
  • sage_autodoc.py

    This is a patched version of sphinx.ext.autodoc, which started to diverge
    before 2011. As far as I (Florent) understand, the role here is to

      1. allows to correctly fetch the Cython doc and argspec
      2. get correctly the argspec of callable (from the `_sage_argspec_`
         attribute) #9976
      3. deals correctly with LazyImport #17455
      4. In particular document CachedFunction as a function and not a class
         instance #9976.
      5. correctly handles classe aliases and nested classed #7448 #5986
    

    This file probably need to be completely reworked since Sphinx seems to
    have now various plugin and Mixin.

src/sage/misc

  • sphinxify.py

    script which calls Sphinx to format a single docstring for help from the
    command line or the notebook. Has its own configuration.

CC: @egourgoulhon @jhpalmieri @dimpase @kwankyu @haraldschilly

Component: documentation

Issue created by migration from https://trac.sagemath.org/ticket/20080

@nthiery nthiery added this to the sage-7.1 milestone Feb 18, 2016
@nthiery

This comment has been minimized.

@nthiery

This comment has been minimized.

@hivert

This comment has been minimized.

@jdemeyer

This comment has been minimized.

@jdemeyer

This comment has been minimized.

@kiwifb
Copy link
Member

kiwifb commented Feb 18, 2016

comment:6

I would like to mention sphinxify.py which is currently part of sagenb but should be moved to inside sage proper ASAP. sphinxify is called from sage/misc/sagedoc.py both at doc building time and run time.

@jdemeyer

This comment has been minimized.

@jdemeyer

This comment has been minimized.

@kcrisman
Copy link
Member

comment:10

I would like to mention sphinxify.py which is currently part of sagenb but should be moved to inside sage proper ASAP. sphinxify is called from sage/misc/sagedoc.py both at doc building time and run time.

I'm open to PRs, as this seems pretty reasonable - docbuild shouldn't depend on sagenb, though we would still want the doc to work from within it.

@hivert

This comment has been minimized.

@embray
Copy link
Contributor

embray commented Jul 27, 2016

comment:12

Could someone clarify what

This is a slightly hacked-up version of the Sphinx-multidoc plugin

means?

I can't find any reference to a Sphinx multidoc plugin outside of Sage.

@jdemeyer

This comment has been minimized.

@jdemeyer
Copy link

comment:13

Fixed :-)

@jdemeyer

This comment has been minimized.

@embray
Copy link
Contributor

embray commented Jul 27, 2016

comment:15

I'm having "fun" finally taking the time to fully understand the doc builds system... :)

@dimpase
Copy link
Member

dimpase commented Jun 29, 2020

comment:16

it would be a good idea to revise this, or perhaps just start from scratch. It's not clear to me whether most/all of this can be achieved with vanilla Sphinx 3 or 4.

@mkoeppe
Copy link
Member

mkoeppe commented Jul 16, 2020

comment:17

Related: #30010 - Split sage_setup.docbuild out to a separate distribution (distutils package)

@dimpase
Copy link
Member

dimpase commented Jul 17, 2020

comment:18

One of sphinx devs,
Takeshi KOMIYA, is going to do a comparison with "native" sphinx for the reference manual - sphinx-doc/sphinx#7891

@nthiery
Copy link
Contributor Author

nthiery commented Jul 21, 2020

comment:19

Cool!

@mkoeppe

This comment has been minimized.

@mkoeppe mkoeppe changed the title Overview of Sphinx custom code in Sage's documentation build system Meta-ticket: Sage docbuild Sep 8, 2020
@mkoeppe mkoeppe modified the milestones: sage-7.1, sage-9.3 Sep 8, 2020
@jhpalmieri

This comment has been minimized.

@egourgoulhon

This comment has been minimized.

@mkoeppe
Copy link
Member

mkoeppe commented Feb 13, 2021

comment:23

Setting new milestone based on a cursory review of ticket status, priority, and last modification date.

@mkoeppe mkoeppe removed this from the sage-9.3 milestone Feb 13, 2021
@mkoeppe mkoeppe added this to the sage-9.4 milestone Feb 13, 2021
@mkoeppe

This comment has been minimized.

@mkoeppe

This comment has been minimized.

@mkoeppe

This comment has been minimized.

@mkoeppe

This comment has been minimized.

@mkoeppe

This comment has been minimized.

@mkoeppe

This comment has been minimized.

@mkoeppe mkoeppe modified the milestones: sage-9.4, sage-9.5 Aug 10, 2021
@mkoeppe mkoeppe modified the milestones: sage-9.5, sage-9.6 Dec 18, 2021
@mkoeppe

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants