From 4520ef02abe1c2a124b979d6da0c911c8aa85f87 Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Sun, 4 Aug 2024 22:38:23 +0900 Subject: [PATCH 01/10] Ignore initial spaces in locating a line for anchor --- .ci/create-changes-html.sh | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.ci/create-changes-html.sh b/.ci/create-changes-html.sh index 2cca91d81c8..6b5c431c7de 100755 --- a/.ci/create-changes-html.sh +++ b/.ci/create-changes-html.sh @@ -83,12 +83,18 @@ for block in diff_blocks: hunk_lines = [] search_result = re.search(r'@@ -(\d+),(\d+) \+(\d+),(\d+)', line) if search_result: - line_number = int(search_result.group(3)) + line_number = int(search_result.group(3)) - 1 span = int(search_result.group(4)) - for i in chain(range(line_number, line_number + span), range(line_number - 1, -1, -1)): - if content[i].startswith('<') and not content[i].startswith('' + content[i] + content[i] = ln[:idx] + f'' + ln[idx:] hunks.append(f'

hunk #{count}

') break hunk_lines.append(line) From d4e1298dd0f4a3f59e6492530f4bfaff0c570cf4 Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Mon, 5 Aug 2024 00:16:19 +0900 Subject: [PATCH 02/10] Fix merge conflicts #38467 --- .ci/create-changes-html.sh | 19 +++++++++++-------- .github/workflows/doc-build.yml | 7 ++++--- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/.ci/create-changes-html.sh b/.ci/create-changes-html.sh index 6b5c431c7de..8048ed35867 100755 --- a/.ci/create-changes-html.sh +++ b/.ci/create-changes-html.sh @@ -1,11 +1,12 @@ #!/bin/sh if [ $# != 2 ]; then - echo >&2 "usage: $0 BASE_DOC_COMMIT DOC_REPO" + echo >&2 "usage: $0 DIFF_TEXT DOC_REPO" echo >&2 "creates CHANGES.html in the current directory" - echo >&2 "for the diffs of DOC_REPO against BASE_DOC_COMMIT" + echo >&2 "and plant targets of anchors in DOC_REPO" + echo >&2 "according to diff hunks in DIFF_TEXT" exit 1 fi -BASE_DOC_COMMIT="$1" +DIFF_TEXT="$1" DOC_REPOSITORY="$2" # Create CHANGES.html @@ -52,11 +53,10 @@ diffParagraphs.forEach(paragraph => { EOF echo '' >> CHANGES.html echo '' >> CHANGES.html -(cd $DOC_REPOSITORY && git diff $BASE_DOC_COMMIT -- "*.html") > diff.txt python3 - << EOF import os, re, html from itertools import chain -with open('diff.txt', 'r') as f: +with open('$DIFF_TEXT', 'r') as f: diff_text = f.read() diff_blocks = re.split(r'^(?=diff --git)', diff_text, flags=re.MULTILINE) out_blocks = [] @@ -85,8 +85,11 @@ for block in diff_blocks: if search_result: line_number = int(search_result.group(3)) - 1 span = int(search_result.group(4)) - for i in chain(range(line_number, line_number + span), range(line_number, -1, -1)): - ln = content[i] + for i in chain(range(line_number, line_number + span), range(line_number - 1, -1, -1)): + try: + ln = content[i] + except IndexError: + continue for idx, char in enumerate(ln): if not char.isspace(): break @@ -113,4 +116,4 @@ EOF cat diff.html >> CHANGES.html echo '' >> CHANGES.html echo '' >> CHANGES.html -rm diff.txt diff.html +rm diff.html diff --git a/.github/workflows/doc-build.yml b/.github/workflows/doc-build.yml index c5ff832b591..7e595d461c9 100644 --- a/.github/workflows/doc-build.yml +++ b/.github/workflows/doc-build.yml @@ -204,9 +204,10 @@ jobs: -e 's;#L[0-9]*";";' \ && git commit -a -m 'wipe-out') # Since HEAD is at commit 'wipe-out', HEAD~1 is commit 'new' (new doc), HEAD~2 is commit 'old' (old doc) - .ci/create-changes-html.sh $(cd doc && git rev-parse HEAD~2) doc - # Restore the new doc with changes made in create-changes-html.sh but dropping changes by "wipe out" - (cd doc && git stash -q && git checkout -q -f HEAD~1 && git stash pop -q) + (cd doc && git diff $(git rev-parse HEAD~2) -- "*.html") > diff.txt + # Restore the new doc dropping changes by "wipe out" + (cd doc && git checkout -q -f HEAD~1) + .ci/create-changes-html.sh diff.txt doc # Sometimes rm -rf .git errors out because of some diehard hidden files # So we simply move it out of the doc directory (cd doc && mv .git ../git && mv .gitattributes ../gitattributes) From 922942c1805cf7d08ebd63e1c49deb7a9e1429a9 Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Tue, 6 Aug 2024 12:37:54 +0900 Subject: [PATCH 03/10] Polish help message --- .ci/create-changes-html.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.ci/create-changes-html.sh b/.ci/create-changes-html.sh index 8048ed35867..0e80d0d2814 100755 --- a/.ci/create-changes-html.sh +++ b/.ci/create-changes-html.sh @@ -1,9 +1,9 @@ #!/bin/sh if [ $# != 2 ]; then - echo >&2 "usage: $0 DIFF_TEXT DOC_REPO" - echo >&2 "creates CHANGES.html in the current directory" - echo >&2 "and plant targets of anchors in DOC_REPO" - echo >&2 "according to diff hunks in DIFF_TEXT" + echo >&2 "Usage: $0 DIFF_TEXT DOC_REPO" + echo >&2 "This script generates a CHANGES.html file in the current directory" + echo >&2 "and adds anchor targets in the documents within DOC_REPO" + echo >&2 "based on the diff hunks in the DIFF_TEXT file." exit 1 fi DIFF_TEXT="$1" From f5f519ffa57300a6ab75c209baf17fbd84b1ec0a Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 15 Jun 2024 11:24:24 -0700 Subject: [PATCH 04/10] build/pkgs/sagemath_doc_html: Make jupyter_sphinx an optional dependency only --- build/pkgs/sagemath_doc_html/dependencies | 2 +- build/pkgs/sagemath_doc_html/dependencies_optional | 1 + configure.ac | 2 +- src/sage_docbuild/conf.py | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 build/pkgs/sagemath_doc_html/dependencies_optional diff --git a/build/pkgs/sagemath_doc_html/dependencies b/build/pkgs/sagemath_doc_html/dependencies index 1d286fe50bc..801c36fcd9e 100644 --- a/build/pkgs/sagemath_doc_html/dependencies +++ b/build/pkgs/sagemath_doc_html/dependencies @@ -1,4 +1,4 @@ -sagelib sphinx sphinx_copybutton sphinx_inline_tabs pplpy_doc | $(SAGERUNTIME) maxima networkx scipy sympy matplotlib pillow mathjax mpmath ipykernel jupyter_client conway_polynomials tachyon jmol ipywidgets jupyter_sphinx sage_docbuild elliptic_curves furo fpylll graphs +sagelib sphinx sphinx_copybutton sphinx_inline_tabs pplpy_doc | $(SAGERUNTIME) maxima networkx scipy sympy matplotlib pillow mathjax mpmath ipykernel jupyter_client conway_polynomials tachyon jmol ipywidgets sage_docbuild elliptic_curves furo fpylll graphs # Building the documentation has many dependencies, because all # documented modules are imported and because we use matplotlib to diff --git a/build/pkgs/sagemath_doc_html/dependencies_optional b/build/pkgs/sagemath_doc_html/dependencies_optional new file mode 100644 index 00000000000..e9b59e89755 --- /dev/null +++ b/build/pkgs/sagemath_doc_html/dependencies_optional @@ -0,0 +1 @@ +jupyter_sphinx diff --git a/configure.ac b/configure.ac index df6a785251e..58adf54f78f 100644 --- a/configure.ac +++ b/configure.ac @@ -450,7 +450,7 @@ AC_ARG_ENABLE([cvxopt], AC_ARG_ENABLE([notebook], AS_HELP_STRING([--disable-notebook], [disable build of the Jupyter notebook and related packages]), [ - for pkg in notebook nbconvert beautifulsoup4 sagenb_export nbformat nbclient terminado send2trash prometheus_client mistune pandocfilters bleach defusedxml jsonschema jupyter_jsmol argon2_cffi argon2_cffi_bindings webencodings tinycss2 ipympl soupsieve fastjsonschema anyio arrow async_lru fqdn isoduration json5 jsonpointer jsonschema_specifications jupyter_events jupyter_lsp jupyter_server jupyter_server_terminals jupyterlab jupyterlab_server jupyterlab_pygments jupyterlab_mathjax2 notebook_shim overrides python_json_logger pyyaml referencing rfc3339_validator rfc3986_validator sniffio types_python_dateutil uri_template webcolors websocket_client; do + for pkg in notebook nbconvert beautifulsoup4 sagenb_export nbformat nbclient terminado send2trash prometheus_client mistune pandocfilters bleach defusedxml jsonschema jupyter_jsmol argon2_cffi argon2_cffi_bindings webencodings tinycss2 ipympl soupsieve fastjsonschema anyio arrow async_lru fqdn isoduration json5 jsonpointer jsonschema_specifications jupyter_events jupyter_lsp jupyter_server jupyter_server_terminals jupyterlab jupyterlab_server jupyterlab_pygments jupyterlab_mathjax2 jupyter_sphinx notebook_shim overrides python_json_logger pyyaml referencing rfc3339_validator rfc3986_validator sniffio types_python_dateutil uri_template webcolors websocket_client; do AS_VAR_SET([SAGE_ENABLE_$pkg], [$enableval]) done ]) diff --git a/src/sage_docbuild/conf.py b/src/sage_docbuild/conf.py index ddd64c2718f..e068c134b54 100644 --- a/src/sage_docbuild/conf.py +++ b/src/sage_docbuild/conf.py @@ -56,12 +56,12 @@ 'sphinx_inline_tabs', 'IPython.sphinxext.ipython_directive', 'matplotlib.sphinxext.plot_directive', - 'jupyter_sphinx', ] jupyter_execute_default_kernel = 'sagemath' if SAGE_LIVE_DOC == 'yes': + extensions.append('jupyter_sphinx') SAGE_JUPYTER_SERVER = os.environ.get('SAGE_JUPYTER_SERVER', 'binder') if SAGE_JUPYTER_SERVER.startswith('binder'): # format: "binder" or From 8db85d4020b9ccdd4d81d48ff38fb0c165ffbd5c Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 15 Jun 2024 22:02:01 -0700 Subject: [PATCH 05/10] src/sage_docbuild/conf.py: Conditionalize using tag 'jupyter_sphinx' --- src/doc/en/tutorial/latex.rst | 2 +- src/sage_docbuild/conf.py | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/doc/en/tutorial/latex.rst b/src/doc/en/tutorial/latex.rst index a173afd75c5..7bb143737e5 100644 --- a/src/doc/en/tutorial/latex.rst +++ b/src/doc/en/tutorial/latex.rst @@ -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 +.. ONLY:: html and jupyter_sphinx Thus, in the Jupyter notebook, you get diff --git a/src/sage_docbuild/conf.py b/src/sage_docbuild/conf.py index e068c134b54..f9c570ed17a 100644 --- a/src/sage_docbuild/conf.py +++ b/src/sage_docbuild/conf.py @@ -1080,3 +1080,7 @@ class Tags(set): for feature in all_features(): tags.add('feature_' + feature.name.replace('.', '_')) + + +if SAGE_LIVE_DOC == 'yes': + tags.add('jupyter_sphinx') From 0c1825e229e4a9215dd825a79cd9673c1304ce5c Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 16 Jun 2024 21:36:02 -0700 Subject: [PATCH 06/10] src/sage_docbuild/conf.py [!SAGE_LIVE_DOC]: define a fake JUPYTER-EXECUTE directive --- src/sage_docbuild/conf.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/sage_docbuild/conf.py b/src/sage_docbuild/conf.py index f9c570ed17a..be10c31b369 100644 --- a/src/sage_docbuild/conf.py +++ b/src/sage_docbuild/conf.py @@ -27,6 +27,7 @@ import sphinx.ext.intersphinx as intersphinx from sphinx import highlighting from sphinx.transforms import SphinxTransform +from sphinx.util.docutils import SphinxDirective from IPython.lib.lexers import IPythonConsoleLexer, IPyLexer from sage.misc.sagedoc import extlinks from sage.env import SAGE_DOC_SRC, SAGE_DOC, PPLPY_DOCS, MATHJAX_DIR @@ -1037,6 +1038,14 @@ def apply(self): parent.insert(index + 1, container) +class Ignore(SphinxDirective): + + has_content = True + + def run(self): + return [] + + # This replaces the setup() in sage.misc.sagedoc_conf def setup(app): app.connect('autodoc-process-docstring', process_docstring_cython) @@ -1050,6 +1059,12 @@ def setup(app): app.add_transform(SagemathTransform) if SAGE_LIVE_DOC == 'yes' or SAGE_PREPARSED_DOC == 'yes': app.add_transform(SagecodeTransform) + if SAGE_LIVE_DOC != 'yes': + app.add_directive("jupyter-execute", Ignore) + app.add_directive("jupyter-kernel", Ignore) + app.add_directive("jupyter-input", Ignore) + app.add_directive("jupyter-output", Ignore) + app.add_directive("thebe-button", Ignore) # When building the standard docs, app.srcdir is set to SAGE_DOC_SRC + # 'LANGUAGE/DOCNAME'. From b8313e47cec85f1db88bb16b5379823cfb3936a5 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 17 Jun 2024 10:08:05 -0700 Subject: [PATCH 07/10] src/sage/features/sphinx.py: Add jupyter_sphinx --- src/sage/features/sphinx.py | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/src/sage/features/sphinx.py b/src/sage/features/sphinx.py index ec7c8be17b6..672b826f59d 100644 --- a/src/sage/features/sphinx.py +++ b/src/sage/features/sphinx.py @@ -39,5 +39,33 @@ def __init__(self): PythonModule.__init__(self, 'sphinx', spkg='sphinx', type='standard') +class JupyterSphinx(PythonModule): + r""" + A :class:`sage.features.Feature` describing the presence of + :ref:`jupyter_sphinx `. + + It is provided by a standard package in the Sage distribution, + but it can be disabled by ``configure --disable-doc`` and + ``configure --disable-notebook``. + + EXAMPLES:: + + sage: from sage.features.sphinx import JupyterSphinx + sage: JupyterSphinx().is_present() # optional - jupyter_sphinx + FeatureTestResult('jupyter_sphinx', True) + """ + def __init__(self): + r""" + TESTS:: + + sage: from sage.features.sphinx import JupyterSphinx + sage: isinstance(JupyterSphinx(), JupyterSphinx) + True + """ + PythonModule.__init__(self, 'jupyter_sphinx', + spkg='jupyter_sphinx', type='standard') + + def all_features(): - return [Sphinx()] + return [Sphinx(), + JupyterSphinx()] From 11c2339d281d5718a83397cc8163b94a7d415444 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 17 Jun 2024 10:17:59 -0700 Subject: [PATCH 08/10] src/sage_docbuild/conf.py: Make jupyter_sphinx optional via Feature --- src/doc/en/tutorial/latex.rst | 2 +- src/sage_docbuild/conf.py | 13 ++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/doc/en/tutorial/latex.rst b/src/doc/en/tutorial/latex.rst index 7bb143737e5..73ef2df3a31 100644 --- a/src/doc/en/tutorial/latex.rst +++ b/src/doc/en/tutorial/latex.rst @@ -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 jupyter_sphinx +.. ONLY:: html and feature_jupyter_sphinx Thus, in the Jupyter notebook, you get diff --git a/src/sage_docbuild/conf.py b/src/sage_docbuild/conf.py index be10c31b369..319828e2a48 100644 --- a/src/sage_docbuild/conf.py +++ b/src/sage_docbuild/conf.py @@ -32,7 +32,7 @@ from sage.misc.sagedoc import extlinks from sage.env import SAGE_DOC_SRC, SAGE_DOC, PPLPY_DOCS, MATHJAX_DIR from sage.misc.latex_macros import sage_mathjax_macros -from sage.features import PythonModule +from sage.features.sphinx import JupyterSphinx from sage.features.all import all_features import sage.version @@ -59,10 +59,13 @@ 'matplotlib.sphinxext.plot_directive', ] +if JupyterSphinx().is_present(): + extensions.append('jupyter_sphinx') + jupyter_execute_default_kernel = 'sagemath' if SAGE_LIVE_DOC == 'yes': - extensions.append('jupyter_sphinx') + JupyterSphinx().require() SAGE_JUPYTER_SERVER = os.environ.get('SAGE_JUPYTER_SERVER', 'binder') if SAGE_JUPYTER_SERVER.startswith('binder'): # format: "binder" or @@ -1059,7 +1062,7 @@ def setup(app): app.add_transform(SagemathTransform) if SAGE_LIVE_DOC == 'yes' or SAGE_PREPARSED_DOC == 'yes': app.add_transform(SagecodeTransform) - if SAGE_LIVE_DOC != 'yes': + if not JupyterSphinx().is_present(): app.add_directive("jupyter-execute", Ignore) app.add_directive("jupyter-kernel", Ignore) app.add_directive("jupyter-input", Ignore) @@ -1095,7 +1098,3 @@ class Tags(set): for feature in all_features(): tags.add('feature_' + feature.name.replace('.', '_')) - - -if SAGE_LIVE_DOC == 'yes': - tags.add('jupyter_sphinx') From 78e9fc2ffd4359793fcb115b7de77d2299183b3a Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 3 Aug 2024 19:43:01 -0700 Subject: [PATCH 09/10] src/sage_docbuild/conf.py: Fix handling of tags --- src/sage_docbuild/conf.py | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/sage_docbuild/conf.py b/src/sage_docbuild/conf.py index 319828e2a48..0f0333338e3 100644 --- a/src/sage_docbuild/conf.py +++ b/src/sage_docbuild/conf.py @@ -1089,12 +1089,7 @@ def setup(app): # https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#tags # https://www.sphinx-doc.org/en/master/usage/configuration.html#conf-tags # https://github.com/readthedocs/readthedocs.org/issues/4603#issuecomment-1411594800 -# Workaround to allow importing this file from other confs -if 'tags' not in locals(): - class Tags(set): - has = set.__contains__ - tags = Tags() - - -for feature in all_features(): - tags.add('feature_' + feature.name.replace('.', '_')) +def feature_tags(): + for feature in all_features(): + if feature.is_present(): + yield 'feature_' + feature.name.replace('.', '_') From 61b9f0e91ca334c46ff3cf77533cd1b9a1688b33 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 3 Aug 2024 19:57:22 -0700 Subject: [PATCH 10/10] src/doc/**/conf.py: Fix handling of tags --- src/doc/ca/intro/conf.py | 5 +++++ src/doc/de/a_tour_of_sage/conf.py | 5 +++++ src/doc/de/thematische_anleitungen/conf.py | 5 +++++ src/doc/de/tutorial/conf.py | 5 +++++ src/doc/el/a_tour_of_sage/conf.py | 5 +++++ src/doc/en/a_tour_of_sage/conf.py | 5 +++++ src/doc/en/constructions/conf.py | 5 +++++ src/doc/en/developer/conf.py | 5 +++++ src/doc/en/faq/conf.py | 5 +++++ src/doc/en/installation/conf.py | 5 +++++ src/doc/en/prep/conf.py | 5 +++++ src/doc/en/reference/conf.py | 5 +++++ src/doc/en/reference/conf_sub.py | 5 +++++ src/doc/en/thematic_tutorials/conf.py | 5 +++++ .../explicit_methods_in_number_theory/conf.py | 5 +++++ src/doc/en/thematic_tutorials/numerical_sage/conf.py | 5 +++++ src/doc/en/tutorial/conf.py | 5 +++++ src/doc/en/website/conf.py | 5 +++++ src/doc/es/a_tour_of_sage/conf.py | 5 +++++ src/doc/es/tutorial/conf.py | 5 +++++ src/doc/fr/a_tour_of_sage/conf.py | 5 +++++ src/doc/fr/tutorial/conf.py | 5 +++++ src/doc/hu/a_tour_of_sage/conf.py | 5 +++++ src/doc/it/a_tour_of_sage/conf.py | 5 +++++ src/doc/it/faq/conf.py | 5 +++++ src/doc/it/tutorial/conf.py | 5 +++++ src/doc/ja/a_tour_of_sage/conf.py | 5 +++++ src/doc/ja/tutorial/conf.py | 5 +++++ src/doc/pt/a_tour_of_sage/conf.py | 5 +++++ src/doc/pt/tutorial/conf.py | 5 +++++ src/doc/ru/tutorial/conf.py | 5 +++++ src/doc/tr/a_tour_of_sage/conf.py | 5 +++++ 32 files changed, 160 insertions(+) diff --git a/src/doc/ca/intro/conf.py b/src/doc/ca/intro/conf.py index 71d81dcdbf3..877eba7eeb7 100644 --- a/src/doc/ca/intro/conf.py +++ b/src/doc/ca/intro/conf.py @@ -13,6 +13,11 @@ 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 diff --git a/src/doc/de/a_tour_of_sage/conf.py b/src/doc/de/a_tour_of_sage/conf.py index 71fc7ef9012..fb960f06ffd 100644 --- a/src/doc/de/a_tour_of_sage/conf.py +++ b/src/doc/de/a_tour_of_sage/conf.py @@ -15,6 +15,11 @@ 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 diff --git a/src/doc/de/thematische_anleitungen/conf.py b/src/doc/de/thematische_anleitungen/conf.py index 337f1a98c68..b8ec2573f90 100644 --- a/src/doc/de/thematische_anleitungen/conf.py +++ b/src/doc/de/thematische_anleitungen/conf.py @@ -13,6 +13,11 @@ 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 diff --git a/src/doc/de/tutorial/conf.py b/src/doc/de/tutorial/conf.py index 399a915e9f4..da1c19e0ffc 100644 --- a/src/doc/de/tutorial/conf.py +++ b/src/doc/de/tutorial/conf.py @@ -13,6 +13,11 @@ 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 diff --git a/src/doc/el/a_tour_of_sage/conf.py b/src/doc/el/a_tour_of_sage/conf.py index 5548c31525e..ff4e9436313 100644 --- a/src/doc/el/a_tour_of_sage/conf.py +++ b/src/doc/el/a_tour_of_sage/conf.py @@ -13,6 +13,11 @@ 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 diff --git a/src/doc/en/a_tour_of_sage/conf.py b/src/doc/en/a_tour_of_sage/conf.py index 7cf31297409..689eed59af3 100644 --- a/src/doc/en/a_tour_of_sage/conf.py +++ b/src/doc/en/a_tour_of_sage/conf.py @@ -13,6 +13,11 @@ 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 diff --git a/src/doc/en/constructions/conf.py b/src/doc/en/constructions/conf.py index b6bbbbaab3b..a28d011781c 100644 --- a/src/doc/en/constructions/conf.py +++ b/src/doc/en/constructions/conf.py @@ -13,6 +13,11 @@ 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 diff --git a/src/doc/en/developer/conf.py b/src/doc/en/developer/conf.py index e8877d61770..6e80447f4c7 100644 --- a/src/doc/en/developer/conf.py +++ b/src/doc/en/developer/conf.py @@ -13,6 +13,11 @@ 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 diff --git a/src/doc/en/faq/conf.py b/src/doc/en/faq/conf.py index 4c8a71bd9d1..a175e9cf0ee 100644 --- a/src/doc/en/faq/conf.py +++ b/src/doc/en/faq/conf.py @@ -15,6 +15,11 @@ 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 diff --git a/src/doc/en/installation/conf.py b/src/doc/en/installation/conf.py index ea6956d2678..7e6174b0d90 100644 --- a/src/doc/en/installation/conf.py +++ b/src/doc/en/installation/conf.py @@ -13,6 +13,11 @@ 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 diff --git a/src/doc/en/prep/conf.py b/src/doc/en/prep/conf.py index 645d451644d..03ff6ed7afc 100644 --- a/src/doc/en/prep/conf.py +++ b/src/doc/en/prep/conf.py @@ -13,6 +13,11 @@ 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 diff --git a/src/doc/en/reference/conf.py b/src/doc/en/reference/conf.py index 984c43363f2..92b8a8d45b4 100644 --- a/src/doc/en/reference/conf.py +++ b/src/doc/en/reference/conf.py @@ -15,6 +15,11 @@ 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 diff --git a/src/doc/en/reference/conf_sub.py b/src/doc/en/reference/conf_sub.py index 479e9c306d2..c7adc1da994 100644 --- a/src/doc/en/reference/conf_sub.py +++ b/src/doc/en/reference/conf_sub.py @@ -15,6 +15,11 @@ 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 diff --git a/src/doc/en/thematic_tutorials/conf.py b/src/doc/en/thematic_tutorials/conf.py index cb6d1662f47..581a8e89fc6 100644 --- a/src/doc/en/thematic_tutorials/conf.py +++ b/src/doc/en/thematic_tutorials/conf.py @@ -15,6 +15,11 @@ 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 diff --git a/src/doc/en/thematic_tutorials/explicit_methods_in_number_theory/conf.py b/src/doc/en/thematic_tutorials/explicit_methods_in_number_theory/conf.py index b8eef385e4f..9de7aa68adb 100644 --- a/src/doc/en/thematic_tutorials/explicit_methods_in_number_theory/conf.py +++ b/src/doc/en/thematic_tutorials/explicit_methods_in_number_theory/conf.py @@ -13,6 +13,11 @@ 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 diff --git a/src/doc/en/thematic_tutorials/numerical_sage/conf.py b/src/doc/en/thematic_tutorials/numerical_sage/conf.py index 5772289f6fa..c8e220f8f99 100644 --- a/src/doc/en/thematic_tutorials/numerical_sage/conf.py +++ b/src/doc/en/thematic_tutorials/numerical_sage/conf.py @@ -13,6 +13,11 @@ 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 diff --git a/src/doc/en/tutorial/conf.py b/src/doc/en/tutorial/conf.py index b566ec19677..52be3420ed1 100644 --- a/src/doc/en/tutorial/conf.py +++ b/src/doc/en/tutorial/conf.py @@ -13,6 +13,11 @@ 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 diff --git a/src/doc/en/website/conf.py b/src/doc/en/website/conf.py index 38f31e5d46f..b238169bb3c 100644 --- a/src/doc/en/website/conf.py +++ b/src/doc/en/website/conf.py @@ -13,6 +13,11 @@ 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 diff --git a/src/doc/es/a_tour_of_sage/conf.py b/src/doc/es/a_tour_of_sage/conf.py index dee2afa4d66..801f7cadb95 100644 --- a/src/doc/es/a_tour_of_sage/conf.py +++ b/src/doc/es/a_tour_of_sage/conf.py @@ -15,6 +15,11 @@ 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 diff --git a/src/doc/es/tutorial/conf.py b/src/doc/es/tutorial/conf.py index 43e23fdc568..dcb44232ca0 100644 --- a/src/doc/es/tutorial/conf.py +++ b/src/doc/es/tutorial/conf.py @@ -13,6 +13,11 @@ 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 diff --git a/src/doc/fr/a_tour_of_sage/conf.py b/src/doc/fr/a_tour_of_sage/conf.py index af1f453f3e4..9cca4b7d1f8 100644 --- a/src/doc/fr/a_tour_of_sage/conf.py +++ b/src/doc/fr/a_tour_of_sage/conf.py @@ -13,6 +13,11 @@ 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 diff --git a/src/doc/fr/tutorial/conf.py b/src/doc/fr/tutorial/conf.py index af70d3eb4ff..38e0160f3ba 100644 --- a/src/doc/fr/tutorial/conf.py +++ b/src/doc/fr/tutorial/conf.py @@ -13,6 +13,11 @@ 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 diff --git a/src/doc/hu/a_tour_of_sage/conf.py b/src/doc/hu/a_tour_of_sage/conf.py index b097f56dfe0..2e5215fcf5d 100644 --- a/src/doc/hu/a_tour_of_sage/conf.py +++ b/src/doc/hu/a_tour_of_sage/conf.py @@ -15,6 +15,11 @@ 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 diff --git a/src/doc/it/a_tour_of_sage/conf.py b/src/doc/it/a_tour_of_sage/conf.py index d06280ece36..48a568cc4d1 100644 --- a/src/doc/it/a_tour_of_sage/conf.py +++ b/src/doc/it/a_tour_of_sage/conf.py @@ -13,6 +13,11 @@ 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 diff --git a/src/doc/it/faq/conf.py b/src/doc/it/faq/conf.py index e3898184a1f..84a8ac93eab 100644 --- a/src/doc/it/faq/conf.py +++ b/src/doc/it/faq/conf.py @@ -15,6 +15,11 @@ 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 diff --git a/src/doc/it/tutorial/conf.py b/src/doc/it/tutorial/conf.py index 15186edb4ba..ea77f3199b0 100644 --- a/src/doc/it/tutorial/conf.py +++ b/src/doc/it/tutorial/conf.py @@ -13,6 +13,11 @@ 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 diff --git a/src/doc/ja/a_tour_of_sage/conf.py b/src/doc/ja/a_tour_of_sage/conf.py index e8ec7cca39b..eef0eba83b3 100644 --- a/src/doc/ja/a_tour_of_sage/conf.py +++ b/src/doc/ja/a_tour_of_sage/conf.py @@ -13,6 +13,11 @@ 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 diff --git a/src/doc/ja/tutorial/conf.py b/src/doc/ja/tutorial/conf.py index 9002593de99..eaaa4558a34 100644 --- a/src/doc/ja/tutorial/conf.py +++ b/src/doc/ja/tutorial/conf.py @@ -13,6 +13,11 @@ 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 diff --git a/src/doc/pt/a_tour_of_sage/conf.py b/src/doc/pt/a_tour_of_sage/conf.py index 267d499ca64..806bc1b77c8 100644 --- a/src/doc/pt/a_tour_of_sage/conf.py +++ b/src/doc/pt/a_tour_of_sage/conf.py @@ -13,6 +13,11 @@ 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 diff --git a/src/doc/pt/tutorial/conf.py b/src/doc/pt/tutorial/conf.py index a5cabc5b0d1..26368567ee4 100644 --- a/src/doc/pt/tutorial/conf.py +++ b/src/doc/pt/tutorial/conf.py @@ -13,6 +13,11 @@ 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 diff --git a/src/doc/ru/tutorial/conf.py b/src/doc/ru/tutorial/conf.py index 5d39f7d2600..f2f44113045 100644 --- a/src/doc/ru/tutorial/conf.py +++ b/src/doc/ru/tutorial/conf.py @@ -13,6 +13,11 @@ 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 diff --git a/src/doc/tr/a_tour_of_sage/conf.py b/src/doc/tr/a_tour_of_sage/conf.py index b7536470bd4..9d2a503d78d 100644 --- a/src/doc/tr/a_tour_of_sage/conf.py +++ b/src/doc/tr/a_tour_of_sage/conf.py @@ -13,6 +13,11 @@ 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