Skip to content

Remove ability to conditionalize parts of the documentation #39990

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

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions src/doc/ca/intro/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@
from sage_docbuild.conf import release
from sage_docbuild.conf import * # NOQA


for tag in feature_tags():
tags.add(tag)


# Add any paths that contain custom static files (such as style sheets),
# relative to this directory to html_static_path. They are copied after the
# builtin static files, so a file named "default.css" will overwrite the
Expand Down
5 changes: 0 additions & 5 deletions src/doc/de/a_tour_of_sage/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@
from sage_docbuild.conf import release
from sage_docbuild.conf import * # NOQA


for tag in feature_tags():
tags.add(tag)


# Add any paths that contain custom static files (such as style sheets),
# relative to this directory to html_static_path. They are copied after the
# builtin static files, so a file named "default.css" will overwrite the
Expand Down
5 changes: 0 additions & 5 deletions src/doc/de/thematische_anleitungen/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@
from sage_docbuild.conf import release
from sage_docbuild.conf import * # NOQA


for tag in feature_tags():
tags.add(tag)


# Add any paths that contain custom static files (such as style sheets),
# relative to this directory to html_static_path. They are copied after the
# builtin static files, so a file named "default.css" will overwrite the
Expand Down
5 changes: 0 additions & 5 deletions src/doc/de/tutorial/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@
from sage_docbuild.conf import release
from sage_docbuild.conf import * # NOQA


for tag in feature_tags():
tags.add(tag)


# Add any paths that contain custom static files (such as style sheets),
# relative to this directory to html_static_path. They are copied after the
# builtin static files, so a file named "default.css" will overwrite the
Expand Down
5 changes: 0 additions & 5 deletions src/doc/el/a_tour_of_sage/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@
from sage_docbuild.conf import release
from sage_docbuild.conf import * # NOQA


for tag in feature_tags():
tags.add(tag)


# Add any paths that contain custom static files (such as style sheets),
# relative to this directory to html_static_path. They are copied after the
# builtin static files, so a file named "default.css" will overwrite the
Expand Down
5 changes: 0 additions & 5 deletions src/doc/en/a_tour_of_sage/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@
from sage_docbuild.conf import release
from sage_docbuild.conf import * # NOQA


for tag in feature_tags():
tags.add(tag)


# Add any paths that contain custom static files (such as style sheets),
# relative to this directory to html_static_path. They are copied after the
# builtin static files, so a file named "default.css" will overwrite the
Expand Down
5 changes: 0 additions & 5 deletions src/doc/en/constructions/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@
from sage_docbuild.conf import release
from sage_docbuild.conf import * # NOQA


for tag in feature_tags():
tags.add(tag)


# Add any paths that contain custom static files (such as style sheets),
# relative to this directory to html_static_path. They are copied after the
# builtin static files, so a file named "default.css" will overwrite the
Expand Down
5 changes: 0 additions & 5 deletions src/doc/en/developer/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@
from sage_docbuild.conf import release
from sage_docbuild.conf import * # NOQA


for tag in feature_tags():
tags.add(tag)


# Add any paths that contain custom static files (such as style sheets),
# relative to this directory to html_static_path. They are copied after the
# builtin static files, so a file named "default.css" will overwrite the
Expand Down
11 changes: 0 additions & 11 deletions src/doc/en/developer/packaging_sage_library.rst
Original file line number Diff line number Diff line change
Expand Up @@ -495,17 +495,6 @@ requiring all of Sage to be present.
mechanism mentioned above can also be used for this.


Dependencies of the Sage documentation
--------------------------------------

The documentation will not be modularized.

However, some parts of the Sage reference manual may depend on functionality
provided by optional packages. These portions of the reference manual
should be conditionalized using the Sphinx directive ``.. ONLY::``,
as explained in :ref:`section-documentation-conditional`.


Version constraints of dependencies
-----------------------------------

Expand Down
26 changes: 0 additions & 26 deletions src/doc/en/developer/sage_manuals.rst
Original file line number Diff line number Diff line change
Expand Up @@ -299,32 +299,6 @@ procedure is different:
* Add your file to the index contained in
:sage_root:`src/doc/en/reference/combinat/module_list.rst`.

.. _section-documentation-conditional:

Making portions of the reference manual conditional on optional features
========================================================================

For every dynamically detectable feature such as :class:`graphviz
<~sage.features.graphviz.Graphviz>` or :class:`sage.symbolic
<sage.features.sagemath.sage__symbolic>` (see :mod:`sage.features`),
Sage defines a Sphinx tag that can be used with the `Sphinx
directive ".. ONLY::"
<https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#tags>`_.
Because Sphinx tags have to use Python identifier syntax, Sage uses
the format ``feature_``, followed by the feature name where dots are
replaced by underscores. Hence, conditionalizing on the features of
the previous examples would look as follows:

.. CODE-BLOCK:: rest

.. ONLY:: feature_graphviz

and:

.. CODE-BLOCK:: rest

.. ONLY:: feature_sage_symbolic

.. _section-building-manuals:

Building the manuals
Expand Down
5 changes: 0 additions & 5 deletions src/doc/en/faq/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@
from sage_docbuild.conf import release
from sage_docbuild.conf import *


for tag in feature_tags():
tags.add(tag)


# Add any paths that contain custom static files (such as style sheets),
# relative to this directory to html_static_path. They are copied after the
# builtin static files, so a file named "default.css" will overwrite the
Expand Down
5 changes: 0 additions & 5 deletions src/doc/en/installation/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@
from sage_docbuild.conf import release
from sage_docbuild.conf import * # NOQA


for tag in feature_tags():
tags.add(tag)


# Add any paths that contain custom static files (such as style sheets),
# relative to this directory to html_static_path. They are copied after the
# builtin static files, so a file named "default.css" will overwrite the
Expand Down
5 changes: 0 additions & 5 deletions src/doc/en/prep/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@
from sage_docbuild.conf import release
from sage_docbuild.conf import * # NOQA


for tag in feature_tags():
tags.add(tag)


# Add any paths that contain custom static files (such as style sheets),
# relative to this directory to html_static_path. They are copied after the
# builtin static files, so a file named "default.css" will overwrite the
Expand Down
5 changes: 0 additions & 5 deletions src/doc/en/reference/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@
from sage_docbuild.conf import release, latex_elements, exclude_patterns
from sage_docbuild.conf import *


for tag in feature_tags():
tags.add(tag)


# Add any paths that contain custom static files (such as style sheets),
# relative to this directory to html_static_path. They are copied after the
# builtin static files, so a file named "default.css" will overwrite the
Expand Down
5 changes: 0 additions & 5 deletions src/doc/en/reference/conf_sub.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@
from sage_docbuild.conf import release, exclude_patterns
from sage_docbuild.conf import *


for tag in feature_tags():
tags.add(tag)


# Add any paths that contain custom static files (such as style sheets),
# relative to this directory to html_static_path. They are copied after the
# builtin static files, so a file named "default.css" will overwrite the
Expand Down
8 changes: 3 additions & 5 deletions src/doc/en/reference/polynomial_rings/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,9 @@ Tropical Polynomials
Boolean Polynomials
-------------------

.. ONLY:: feature_sage_rings_polynomial_pbori

.. toctree::
:maxdepth: 1
.. toctree::
:maxdepth: 1

sage/rings/polynomial/pbori/pbori
sage/rings/polynomial/pbori/pbori

.. include:: ../footer.txt
5 changes: 0 additions & 5 deletions src/doc/en/thematic_tutorials/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@
from sage_docbuild.conf import release
from sage_docbuild.conf import *


for tag in feature_tags():
tags.add(tag)


# Add any paths that contain custom static files (such as style sheets),
# relative to this directory to html_static_path. They are copied after the
# builtin static files, so a file named "default.css" will overwrite the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@
from sage_docbuild.conf import release
from sage_docbuild.conf import * # NOQA


for tag in feature_tags():
tags.add(tag)


# Add any paths that contain custom static files (such as style sheets),
# relative to this directory to html_static_path. They are copied after the
# builtin static files, so a file named "default.css" will overwrite the
Expand Down
5 changes: 0 additions & 5 deletions src/doc/en/thematic_tutorials/numerical_sage/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@
from sage_docbuild.conf import release
from sage_docbuild.conf import * # NOQA


for tag in feature_tags():
tags.add(tag)


# Add any paths that contain custom static files (such as style sheets),
# relative to this directory to html_static_path. They are copied after the
# builtin static files, so a file named "default.css" will overwrite the
Expand Down
5 changes: 0 additions & 5 deletions src/doc/en/tutorial/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@
from sage_docbuild.conf import release
from sage_docbuild.conf import * # NOQA


for tag in feature_tags():
tags.add(tag)


# Add any paths that contain custom static files (such as style sheets),
# relative to this directory to html_static_path. They are copied after the
# builtin static files, so a file named "default.css" will overwrite the
Expand Down
2 changes: 1 addition & 1 deletion src/doc/en/tutorial/latex.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ output of the entered commands automatically. You can start this
automatic rendering by executing ``%display latex`` (and stop by executing
``%display plain``).

.. ONLY:: html and feature_jupyter_sphinx
.. ONLY:: html

Thus, in the Jupyter notebook, you get

Expand Down
5 changes: 0 additions & 5 deletions src/doc/en/website/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@
from sage_docbuild.conf import release
from sage_docbuild.conf import * # NOQA


for tag in feature_tags():
tags.add(tag)


# Add any paths that contain custom static files (such as style sheets),
# relative to this directory to html_static_path. They are copied after the
# builtin static files, so a file named "default.css" will overwrite the
Expand Down
5 changes: 0 additions & 5 deletions src/doc/es/a_tour_of_sage/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@
from sage_docbuild.conf import release
from sage_docbuild.conf import *


for tag in feature_tags():
tags.add(tag)


# Add any paths that contain custom static files (such as style sheets),
# relative to this directory to html_static_path. They are copied after the
# builtin static files, so a file named "default.css" will overwrite the
Expand Down
5 changes: 0 additions & 5 deletions src/doc/es/tutorial/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@
from sage_docbuild.conf import release
from sage_docbuild.conf import *


for tag in feature_tags():
tags.add(tag)


# Add any paths that contain custom static files (such as style sheets),
# relative to this directory to html_static_path. They are copied after the
# builtin static files, so a file named "default.css" will overwrite the
Expand Down
5 changes: 0 additions & 5 deletions src/doc/fr/a_tour_of_sage/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@
from sage_docbuild.conf import release, latex_elements
from sage_docbuild.conf import * # NOQA


for tag in feature_tags():
tags.add(tag)


# Add any paths that contain custom static files (such as style sheets),
# relative to this directory to html_static_path. They are copied after the
# builtin static files, so a file named "default.css" will overwrite the
Expand Down
5 changes: 0 additions & 5 deletions src/doc/fr/tutorial/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@
from sage_docbuild.conf import release, latex_elements
from sage_docbuild.conf import * # NOQA


for tag in feature_tags():
tags.add(tag)


# Add any paths that contain custom static files (such as style sheets),
# relative to this directory to html_static_path. They are copied after the
# builtin static files, so a file named "default.css" will overwrite the
Expand Down
5 changes: 0 additions & 5 deletions src/doc/hu/a_tour_of_sage/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@
from sage_docbuild.conf import release
from sage_docbuild.conf import * # NOQA


for tag in feature_tags():
tags.add(tag)


# Add any paths that contain custom static files (such as style sheets),
# relative to this directory to html_static_path. They are copied after the
# builtin static files, so a file named "default.css" will overwrite the
Expand Down
5 changes: 0 additions & 5 deletions src/doc/it/a_tour_of_sage/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@
from sage_docbuild.conf import release, latex_elements
from sage_docbuild.conf import * # NOQA


for tag in feature_tags():
tags.add(tag)


# Add any paths that contain custom static files (such as style sheets),
# relative to this directory to html_static_path. They are copied after the
# builtin static files, so a file named "default.css" will overwrite the
Expand Down
5 changes: 0 additions & 5 deletions src/doc/it/faq/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@
from sage_docbuild.conf import release
from sage_docbuild.conf import *


for tag in feature_tags():
tags.add(tag)


# Add any paths that contain custom static files (such as style sheets),
# relative to this directory to html_static_path. They are copied after the
# builtin static files, so a file named "default.css" will overwrite the
Expand Down
5 changes: 0 additions & 5 deletions src/doc/it/tutorial/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@
from sage_docbuild.conf import release, latex_elements
from sage_docbuild.conf import * # NOQA


for tag in feature_tags():
tags.add(tag)


# Add any paths that contain custom static files (such as style sheets),
# relative to this directory to html_static_path. They are copied after the
# builtin static files, so a file named "default.css" will overwrite the
Expand Down
5 changes: 0 additions & 5 deletions src/doc/ja/a_tour_of_sage/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@
from sage_docbuild.conf import release, latex_elements
from sage_docbuild.conf import * # NOQA


for tag in feature_tags():
tags.add(tag)


# Add any paths that contain custom static files (such as style sheets),
# relative to this directory to html_static_path. They are copied after the
# builtin static files, so a file named "default.css" will overwrite the
Expand Down
Loading
Loading