Sphinx build configuration

This file contains configuration needed to customize Sphinx input and output behavior.

class sage_docbuild.conf.Ignore(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)[source]

Bases: SphinxDirective

has_content = True

May the directive have content?

run()[source]
class sage_docbuild.conf.SagecodeTransform(document, startnode=None)[source]

Bases: SphinxTransform

Transform a code block to a live code block enabled by jupyter-sphinx.

Effectively a code block like:

EXAMPLE::

    sage: 1 + 1
    2

is transformed into:

EXAMPLE::

    sage: 1 + 1
    2

.. ONLY:: html

    .. JUPYTER-EXECUTE::
        :hide-code:
        :hide-output:
        :raises:
        :stderr:

        1 + 1

enabling live execution of the code.

apply()[source]
default_priority = 170

Numerical priority of this transform, 0 through 999 (override).

sage_docbuild.conf.add_page_context(app, pagename, templatename, context, doctree)[source]
sage_docbuild.conf.call_intersphinx(app, env, node, contnode)[source]

Call intersphinx and make links between Sage manuals relative.

sage_docbuild.conf.check_nested_class_picklability(app, what, name, obj, skip, options)[source]

Print a warning if pickling is broken for nested classes.

sage_docbuild.conf.debug_inf(app, message)[source]
sage_docbuild.conf.feature_tags()[source]

Try to find dangling link in local module imports or all.py.

sage_docbuild.conf.linkcode_resolve(domain, info)[source]
sage_docbuild.conf.set_intersphinx_mappings(app, config)[source]

Add precompiled inventory (the objects.inv)

sage_docbuild.conf.setup(app)[source]
sage_docbuild.conf.skip_member(app, what, name, obj, skip, options)[source]

To suppress Sphinx warnings / errors, we

  • Don’t include [aliases of] builtins.

  • Don’t include the docstring for any nested class which has been inserted into its module by sage.misc.NestedClassMetaclass only for pickling. The class will be properly documented inside its surrounding class.

  • Optionally, check whether pickling is broken for nested classes.

  • Optionally, include objects whose name begins with an underscore (‘_’), i.e., “private” or “hidden” attributes, methods, etc.

Otherwise, we abide by Sphinx’s decision. Note: The object obj is excluded (included) if this handler returns True (False).