From dbf1d9370922d3069e79cfc3145612fc0e68eadb Mon Sep 17 00:00:00 2001 From: Antonio Rojas Date: Sun, 2 Jun 2024 14:38:06 +0200 Subject: [PATCH 01/50] Fix test failure with ImageMagick 7.1.1.33 The `convert` command is deprecated and throws a warning at runtime. --- src/sage/plot/plot3d/tachyon.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage/plot/plot3d/tachyon.py b/src/sage/plot/plot3d/tachyon.py index 4dc3a9ce34a..843717e0f46 100644 --- a/src/sage/plot/plot3d/tachyon.py +++ b/src/sage/plot/plot3d/tachyon.py @@ -124,7 +124,7 @@ sage: fname_ppm = tmp_filename(ext='.ppm') sage: T.save(fname_png) sage: r2 = os.system('convert '+fname_png+' '+fname_ppm) # optional -- ImageMagick - + ... sage: # optional - imagemagick sage: T = Tachyon(xres=800, yres=600, ....: camera_position=(-2.0,-.1,.3), From 1240c20cad4dc69d18467575fccc2cc39aa069da Mon Sep 17 00:00:00 2001 From: Antonio Rojas Date: Fri, 7 Jun 2024 19:54:59 +0200 Subject: [PATCH 02/50] Use 'magick' command instead of the deprecated 'convert' if available --- src/sage/doctest/external.py | 2 +- src/sage/features/imagemagick.py | 40 +++++++++++++++++-------------- src/sage/graphs/graph_latex.py | 4 ++-- src/sage/misc/latex.py | 41 ++++++++++++++++---------------- src/sage/plot/animate.py | 26 ++++++++++---------- src/sage/plot/plot3d/tachyon.py | 4 ++-- 6 files changed, 61 insertions(+), 56 deletions(-) diff --git a/src/sage/doctest/external.py b/src/sage/doctest/external.py index 4628db45f5c..8ed310c8d0f 100644 --- a/src/sage/doctest/external.py +++ b/src/sage/doctest/external.py @@ -274,7 +274,7 @@ def has_ffmpeg(): def has_imagemagick(): """ - Test if ImageMagick (command convert) is available. + Test if ImageMagick (command magick or convert) is available. EXAMPLES:: diff --git a/src/sage/features/imagemagick.py b/src/sage/features/imagemagick.py index fceeed8b727..5e4bb1e8661 100644 --- a/src/sage/features/imagemagick.py +++ b/src/sage/features/imagemagick.py @@ -1,8 +1,8 @@ r""" Feature for testing the presence of ``imagemagick`` -Currently we only check for the presence of ``convert``. When needed, other -commands like ``magick``, ``magick-script``, ``convert``, ``mogrify``, +Currently we only check for the presence of ``convert`` or ``magick``. When needed, other +commands like ``magick-script``, ``mogrify``, ``identify``, ``composite``, ``montage``, ``compare``, etc. could be also checked in this module. """ @@ -20,35 +20,39 @@ from . import Executable, FeatureTestResult from .join_feature import JoinFeature -class Convert(Executable): +class Magick(Executable): r""" - A :class:`~sage.features.Feature` describing the presence of ``convert``. + A :class:`~sage.features.Feature` describing the presence of ``magick`` or the deprecated ``convert``. EXAMPLES:: - sage: from sage.features.imagemagick import Convert - sage: Convert().is_present() # optional - imagemagick - FeatureTestResult('convert', True) + sage: from sage.features.imagemagick import Magick + sage: Magick().is_present() # optional - imagemagick + FeatureTestResult('magick', True) """ def __init__(self): r""" TESTS:: - sage: from sage.features.imagemagick import Convert - sage: isinstance(Convert(), Convert) + sage: from sage.features.imagemagick import Magick + sage: isinstance(Magick(), Magick) True """ - Executable.__init__(self, "convert", executable="convert") + Executable.__init__(self, "magick", executable="magick") + try: + _ = self.absolute_filename() + except: + Executable.__init__(self, "magick", executable="convert") def is_functional(self): r""" - Return whether command ``convert`` in the path is functional. + Return whether command ``magick`` or ``convert`` in the path is functional. EXAMPLES:: - sage: from sage.features.imagemagick import Convert - sage: Convert().is_functional() # optional - imagemagick - FeatureTestResult('convert', True) + sage: from sage.features.imagemagick import Magick + sage: Magick().is_functional() # optional - imagemagick + FeatureTestResult('magick', True) """ # Create the content of 1-pixel png file @@ -77,9 +81,9 @@ def is_functional(self): filename, _png = os.path.splitext(filename_png) filename_gif = filename + '.gif' - # running command convert (taken from sage/plot/animate.py) + # running command magick/convert (taken from sage/plot/animate.py) from subprocess import run - cmd = ['convert', '-dispose', 'Background', '-delay', '20', + cmd = [self.executable, '-dispose', 'Background', '-delay', '20', '-loop', '0', filename_png, filename_gif] try: @@ -109,7 +113,7 @@ class ImageMagick(JoinFeature): A :class:`~sage.features.Feature` describing the presence of :ref:`ImageMagick ` - Currently, only the availability of the :class:`convert` program is checked. + Currently, only the availability of the :class:`magick` (or :class:`convert`) program is checked. EXAMPLES:: @@ -126,7 +130,7 @@ def __init__(self): True """ JoinFeature.__init__(self, "imagemagick", - [Convert()], + [Magick()], spkg="imagemagick", url="https://www.imagemagick.org/") diff --git a/src/sage/graphs/graph_latex.py b/src/sage/graphs/graph_latex.py index 42cc1b369ab..b88dc892659 100644 --- a/src/sage/graphs/graph_latex.py +++ b/src/sage/graphs/graph_latex.py @@ -60,7 +60,7 @@ the four compass points To use LaTeX in Sage you of course need a working TeX installation and it will -work best if you have the ``dvipng`` and ``convert`` utilities. For graphs you +work best if you have the ``dvipng`` and ``magick`` utilities. For graphs you need the ``tkz-graph.sty`` and ``tkz-berge.sty`` style files of the tkz-graph package. TeX, dvipng, and convert should be widely available through package managers or installers. You may need to install the tkz-graph style files in @@ -69,7 +69,7 @@ - TeX: http://ctan.org/ - dvipng: http://sourceforge.net/projects/dvipng/ -- convert: http://www.imagemagick.org (the ImageMagick suite) +- magick: http://www.imagemagick.org (the ImageMagick suite) - tkz-graph: https://www.ctan.org/pkg/tkz-graph Customizing the output is accomplished in several ways. Suppose ``g`` is a diff --git a/src/sage/misc/latex.py b/src/sage/misc/latex.py index ec3ee067075..cddb14f972a 100644 --- a/src/sage/misc/latex.py +++ b/src/sage/misc/latex.py @@ -682,14 +682,14 @@ def _run_latex_(filename, debug=False, density=150, engine=None, png=False, do_i else: raise ValueError("Unsupported LaTeX engine.") - # if png output + latex, check to see if dvipng or convert is installed. + # if png output + latex, check to see if dvipng or magick/convert is installed. from sage.features.imagemagick import ImageMagick from sage.features.dvipng import dvipng if png: if ((not engine or engine == "latex") and not (dvipng().is_present() or ImageMagick().is_present())): print() - print("Error: neither dvipng nor convert (from the ImageMagick suite)") + print("Error: neither dvipng nor magick/convert (from the ImageMagick suite)") print("appear to be installed. Displaying LaTeX, PDFLaTeX output") print("requires at least one of these programs, so please install") print("and try again.") @@ -697,7 +697,7 @@ def _run_latex_(filename, debug=False, density=150, engine=None, png=False, do_i print("Go to http://sourceforge.net/projects/dvipng/ and") print("http://www.imagemagick.org to download these programs.") return "Error" - # if png output + [pdf|xe|lua]latex, check to see if convert is installed. + # if png output + [pdf|xe|lua]latex, check to see if magick/convert is installed. elif engine in ["pdflatex", "xelatex", "lualatex"]: ImageMagick().require() # check_validity: check to see if the dvi file is okay by trying @@ -706,7 +706,7 @@ def _run_latex_(filename, debug=False, density=150, engine=None, png=False, do_i # function. # # thus if not png output, check validity of dvi output if dvipng - # or convert is installed. + # or magick/convert is installed. else: check_validity = dvipng().is_present() # set up filenames, other strings: @@ -734,10 +734,11 @@ def _run_latex_(filename, debug=False, density=150, engine=None, png=False, do_i ps2pdf = ['ps2pdf', filename + '.ps'] - # We seem to need a larger size when using convert compared to + # We seem to need a larger size when using magick/convert compared to # when using dvipng: density = int(1.4 * density / 1.3) - convert = ['convert', '-density', + from sage.features.imagemagick import Magick + magick = [Magick().executable, '-density', '{0}x{0}'.format(density), '-trim', filename + '.' + suffix, filename + '.png'] @@ -755,10 +756,10 @@ def subpcall(x): if debug: print(lt) if png: - print(convert) + print(magick) e = subpcall(lt) if png: - e = e and subpcall(convert) + e = e and subpcall(magick) else: # latex if (png or check_validity): if dvipng().is_present(): @@ -769,19 +770,19 @@ def subpcall(x): dvipng_error = not os.path.exists(os.path.join(base, filename + '.png')) # If there is no png file, then either the latex # process failed or dvipng failed. Assume that dvipng - # failed, and try running dvips and convert. (If the - # latex process failed, then dvips and convert will + # failed, and try running dvips and magick/convert. (If the + # latex process failed, then dvips and magick/convert will # fail also, so we'll still catch the error.) if dvipng_error: if png: if ImageMagick().is_present(): if debug: - print("'dvipng' failed; trying 'convert' instead...") + print("'dvipng' failed; trying 'magick/convert' instead...") print(dvips) - print(convert) - e = subpcall(dvips) and subpcall(convert) + print(magick) + e = subpcall(dvips) and subpcall(magick) else: - print("Error: 'dvipng' failed and 'convert' is not installed.") + print("Error: 'dvipng' failed and 'magick/convert' is not installed.") return "Error: dvipng failed." else: # not png, i.e., check_validity return_suffix = "pdf" @@ -797,12 +798,12 @@ def subpcall(x): print("error running dvips and ps2pdf; trying pdflatex instead...") print(pdflt) e = subpcall(pdflt) - else: # do not have dvipng, so must have convert. run latex, dvips, convert. + else: # do not have dvipng, so must have magick/convert. run latex, dvips, magick/convert. if debug: print(lt) print(dvips) - print(convert) - e = subpcall(lt) and subpcall(dvips) and subpcall(convert) + print(magick) + e = subpcall(lt) and subpcall(dvips) and subpcall(magick) if not e: print("An error occurred.") try: @@ -903,7 +904,7 @@ class Latex(LatexCall): .. WARNING:: - You must have dvipng (or dvips and convert) installed + You must have dvipng (or dvips and magick/convert) installed on your operating system, or this command will not work. EXAMPLES:: @@ -1014,9 +1015,9 @@ def eval(self, x, globals, strip=False, filename=None, debug=None, .. WARNING:: When using ``'latex'`` (the default), you must have ``dvipng`` (or - ``dvips`` and ``convert``) installed on your operating system, or + ``dvips`` and ``magick/convert``) installed on your operating system, or this command will not work. When using ``'pdflatex'``, ``'xelatex'`` - or ``'lualatex'``, you must have ``convert`` installed. + or ``'lualatex'``, you must have ``magick/convert`` installed. OUTPUT: diff --git a/src/sage/plot/animate.py b/src/sage/plot/animate.py index 84eb72157de..0bf3c090221 100644 --- a/src/sage/plot/animate.py +++ b/src/sage/plot/animate.py @@ -8,7 +8,7 @@ object, creating a sequence of PNG files. These are then assembled to various target formats using different tools. -In particular, the ``convert`` program from ImageMagick_ can be used to +In particular, the ``magick/convert`` program from ImageMagick_ can be used to generate an animated GIF file. FFmpeg_ (with the command line program ``ffmpeg``) provides support for various video formats, but also an alternative method of generating @@ -20,7 +20,7 @@ Note that ``ImageMagick`` and ``FFmpeg`` are not included with Sage, and must be installed by the user. On unix systems, type ``which - convert`` at a command prompt to see if ``convert`` (part of the + magick`` at a command prompt to see if ``magick`` (part of the ``ImageMagick`` suite) is installed. If it is, you will be given its location. Similarly, you can check for ``ffmpeg`` with ``which ffmpeg``. See the websites of ImageMagick_ or FFmpeg_ for @@ -568,11 +568,11 @@ def gif(self, delay=20, savefile=None, iterations=0, show_path=False, objects in self. This method will only work if either (a) the ImageMagick - software suite is installed, i.e., you have the ``convert`` + software suite is installed, i.e., you have the ``magick/convert`` command or (b) ``ffmpeg`` is installed. See the web sites of ImageMagick_ and FFmpeg_ for more details. By default, this - produces the gif using ``convert`` if it is present. If this - can't find ``convert`` or if ``use_ffmpeg`` is True, then it + produces the gif using Imagemagick if it is present. If this + can't find ImageMagick or if ``use_ffmpeg`` is True, then it uses ``ffmpeg`` instead. INPUT: @@ -590,7 +590,7 @@ def gif(self, delay=20, savefile=None, iterations=0, show_path=False, print the path to the saved file - ``use_ffmpeg`` -- boolean (default: ``False``); if True, use - 'ffmpeg' by default instead of 'convert'. + 'ffmpeg' by default instead of ImageMagick If ``savefile`` is not specified: in notebook mode, display the animation; otherwise, save it to a default file name. @@ -652,7 +652,7 @@ def _gif_from_imagemagick(self, savefile=None, show_path=False, the frames in ``self``. This method will only work if ``imagemagick`` is installed (command - ``convert``). See https://www.imagemagick.org for information + ``magick`` or ``convert``). See https://www.imagemagick.org for information about ``imagemagick``. INPUT: @@ -691,12 +691,12 @@ def _gif_from_imagemagick(self, savefile=None, show_path=False, like this:: FeatureNotPresentError: imagemagick is not available. - Executable 'convert' not found on PATH. + Executable 'magick' not found on PATH. Further installation instructions might be available at https://www.imagemagick.org/. """ - from sage.features.imagemagick import ImageMagick + from sage.features.imagemagick import ImageMagick, Magick ImageMagick().require() if not savefile: @@ -707,7 +707,7 @@ def _gif_from_imagemagick(self, savefile=None, show_path=False, # running the command directory = self.png() - cmd = ['convert', '-dispose', 'Background', + cmd = [Magick().executablee, '-dispose', 'Background', '-delay', '%s' % int(delay), '-loop', '%s' % int(iterations), '*.png', savefile] from subprocess import run @@ -722,7 +722,7 @@ def _gif_from_imagemagick(self, savefile=None, show_path=False, result.stderr.strip(), result.stdout.strip())) raise OSError("Error: Cannot generate GIF animation. " - "The convert command (ImageMagick) is present but does " + "The magick/convert command (ImageMagick) is present but does " "not seem to be functional. Verify that the objects " "passed to the animate command can be saved in PNG " "image format. " @@ -826,7 +826,7 @@ def show(self, delay=None, iterations=None, **kwds): Currently this is done using an animated gif, though this could change in the future. This requires that either ffmpeg or the ImageMagick suite (in particular, the - ``convert`` command) is installed. + ``magick/convert`` command) is installed. See also the :meth:`ffmpeg` method. @@ -1121,7 +1121,7 @@ def save(self, filename=None, show_path=False, use_ffmpeg=False, **kwds): print the path to the saved file - ``use_ffmpeg`` -- boolean (default: ``False``); if True, use - 'ffmpeg' by default instead of 'convert' when creating GIF + 'ffmpeg' by default instead of ImageMagick when creating GIF files. If filename is None, then in notebook mode, display the diff --git a/src/sage/plot/plot3d/tachyon.py b/src/sage/plot/plot3d/tachyon.py index 843717e0f46..c4f136ec157 100644 --- a/src/sage/plot/plot3d/tachyon.py +++ b/src/sage/plot/plot3d/tachyon.py @@ -123,8 +123,8 @@ sage: fname_png = tmp_filename(ext='.png') sage: fname_ppm = tmp_filename(ext='.ppm') sage: T.save(fname_png) - sage: r2 = os.system('convert '+fname_png+' '+fname_ppm) # optional -- ImageMagick - ... + sage: from sage.features.imagemagick import Magick + sage: r2 = os.system(Magick().executable+' '+fname_png+' '+fname_ppm) # optional -- ImageMagick sage: # optional - imagemagick sage: T = Tachyon(xres=800, yres=600, ....: camera_position=(-2.0,-.1,.3), From 6b07208b4909f38276392c3c5fd24ce160ddd13a Mon Sep 17 00:00:00 2001 From: Antonio Rojas Date: Fri, 7 Jun 2024 19:58:57 +0200 Subject: [PATCH 03/50] Fix typo --- src/sage/plot/animate.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage/plot/animate.py b/src/sage/plot/animate.py index 0bf3c090221..d4f9eb7bf56 100644 --- a/src/sage/plot/animate.py +++ b/src/sage/plot/animate.py @@ -707,7 +707,7 @@ def _gif_from_imagemagick(self, savefile=None, show_path=False, # running the command directory = self.png() - cmd = [Magick().executablee, '-dispose', 'Background', + cmd = [Magick().executable, '-dispose', 'Background', '-delay', '%s' % int(delay), '-loop', '%s' % int(iterations), '*.png', savefile] from subprocess import run From 28bc6ed76f0c9822de49de003eed308a7e745885 Mon Sep 17 00:00:00 2001 From: Antonio Rojas Date: Sun, 9 Jun 2024 19:37:19 +0200 Subject: [PATCH 04/50] Fix ruff --- src/sage/features/imagemagick.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage/features/imagemagick.py b/src/sage/features/imagemagick.py index 5e4bb1e8661..ffcadfc68f9 100644 --- a/src/sage/features/imagemagick.py +++ b/src/sage/features/imagemagick.py @@ -41,7 +41,7 @@ def __init__(self): Executable.__init__(self, "magick", executable="magick") try: _ = self.absolute_filename() - except: + except RuntimeError: Executable.__init__(self, "magick", executable="convert") def is_functional(self): From c4f75f688a78271a7c019a3c7a0038ec1a134a42 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 15 Jun 2024 13:02:14 -0700 Subject: [PATCH 05/50] build/pkgs/setuptools_scm: Update to 8.1.0 --- build/pkgs/setuptools_scm/checksums.ini | 4 ++-- build/pkgs/setuptools_scm/package-version.txt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build/pkgs/setuptools_scm/checksums.ini b/build/pkgs/setuptools_scm/checksums.ini index 7d85feb982f..abae8c0a4f4 100644 --- a/build/pkgs/setuptools_scm/checksums.ini +++ b/build/pkgs/setuptools_scm/checksums.ini @@ -1,4 +1,4 @@ tarball=setuptools_scm-VERSION-py3-none-any.whl -sha1=cfde7254fe351b69cd4bf02e1b57e0b3c59aa9a6 -sha256=b47844cd2a84b83b3187a5782c71128c28b4c94cad8bfb871da2784a5cb54c4f +sha1=be606b6acb67714b96e9e1e9a9944feaca504e44 +sha256=897a3226a6fd4a6eb2f068745e49733261a21f70b1bb28fce0339feb978d9af3 upstream_url=https://pypi.io/packages/py3/s/setuptools_scm/setuptools_scm-VERSION-py3-none-any.whl diff --git a/build/pkgs/setuptools_scm/package-version.txt b/build/pkgs/setuptools_scm/package-version.txt index 50c496d20c6..8104cabd36f 100644 --- a/build/pkgs/setuptools_scm/package-version.txt +++ b/build/pkgs/setuptools_scm/package-version.txt @@ -1 +1 @@ -8.0.4 +8.1.0 From 8883d80f0e1a1f50aa1e31a9cd0e04e8882169c5 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 15 Jun 2024 13:05:11 -0700 Subject: [PATCH 06/50] build/pkgs/dateutil: Update to 2.9.0.post0, change to wheel package --- build/pkgs/dateutil/checksums.ini | 8 ++++---- build/pkgs/dateutil/dependencies | 2 +- build/pkgs/dateutil/package-version.txt | 2 +- build/pkgs/dateutil/spkg-install.in | 3 --- 4 files changed, 6 insertions(+), 9 deletions(-) delete mode 100644 build/pkgs/dateutil/spkg-install.in diff --git a/build/pkgs/dateutil/checksums.ini b/build/pkgs/dateutil/checksums.ini index 1c7783ac8fd..e4cd473a834 100644 --- a/build/pkgs/dateutil/checksums.ini +++ b/build/pkgs/dateutil/checksums.ini @@ -1,4 +1,4 @@ -tarball=python-dateutil-VERSION.tar.gz -sha1=c2ba10c775b7a52a4b57cac4d4110a0c0f812a82 -sha256=0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86 -upstream_url=https://files.pythonhosted.org/packages/source/p/python-dateutil/python-dateutil-VERSION.tar.gz +tarball=python_dateutil-VERSION-py2.py3-none-any.whl +sha1=323a8e8de7e00a254fadae9c77b1264d56525178 +sha256=a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427 +upstream_url=https://pypi.io/packages/py2.py3/p/python_dateutil/python_dateutil-VERSION-py2.py3-none-any.whl diff --git a/build/pkgs/dateutil/dependencies b/build/pkgs/dateutil/dependencies index a90844872ae..cc5427c91ec 100644 --- a/build/pkgs/dateutil/dependencies +++ b/build/pkgs/dateutil/dependencies @@ -1,4 +1,4 @@ - six | $(PYTHON_TOOLCHAIN) $(PYTHON) +six | pip $(PYTHON) ---------- All lines of this file are ignored except the first. diff --git a/build/pkgs/dateutil/package-version.txt b/build/pkgs/dateutil/package-version.txt index 1817afea416..629bd405c15 100644 --- a/build/pkgs/dateutil/package-version.txt +++ b/build/pkgs/dateutil/package-version.txt @@ -1 +1 @@ -2.8.2 +2.9.0.post0 diff --git a/build/pkgs/dateutil/spkg-install.in b/build/pkgs/dateutil/spkg-install.in deleted file mode 100644 index 058b1344dc2..00000000000 --- a/build/pkgs/dateutil/spkg-install.in +++ /dev/null @@ -1,3 +0,0 @@ -cd src - -sdh_pip_install . From 30de8554501fc6f05027bb52b24d1abfd2c159cb Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 15 Jun 2024 13:07:48 -0700 Subject: [PATCH 07/50] build/pkgs/asttokens: Update to 2.4.1, change to wheel package --- build/pkgs/asttokens/checksums.ini | 8 ++++---- build/pkgs/asttokens/dependencies | 2 +- build/pkgs/asttokens/spkg-install.in | 2 -- 3 files changed, 5 insertions(+), 7 deletions(-) delete mode 100644 build/pkgs/asttokens/spkg-install.in diff --git a/build/pkgs/asttokens/checksums.ini b/build/pkgs/asttokens/checksums.ini index 9c5d57c3a17..d9de4a44ea3 100644 --- a/build/pkgs/asttokens/checksums.ini +++ b/build/pkgs/asttokens/checksums.ini @@ -1,4 +1,4 @@ -tarball=asttokens-VERSION.tar.gz -sha1=d522a139240293953c99d32ca62c41542babb963 -sha256=b03869718ba9a6eb027e134bfdf69f38a236d681c83c160d510768af11254ba0 -upstream_url=https://pypi.io/packages/source/a/asttokens/asttokens-VERSION.tar.gz +tarball=asttokens-VERSION-py2.py3-none-any.whl +sha1=69a9448cd7fad3007a66f464f9daa35dd28183a6 +sha256=051ed49c3dcae8913ea7cd08e46a606dba30b79993209636c4875bc1d637bc24 +upstream_url=https://pypi.io/packages/py2.py3/a/asttokens/asttokens-VERSION-py2.py3-none-any.whl diff --git a/build/pkgs/asttokens/dependencies b/build/pkgs/asttokens/dependencies index 47296a7bace..cc5427c91ec 100644 --- a/build/pkgs/asttokens/dependencies +++ b/build/pkgs/asttokens/dependencies @@ -1,4 +1,4 @@ - | $(PYTHON_TOOLCHAIN) $(PYTHON) +six | pip $(PYTHON) ---------- All lines of this file are ignored except the first. diff --git a/build/pkgs/asttokens/spkg-install.in b/build/pkgs/asttokens/spkg-install.in deleted file mode 100644 index 37ac1a53437..00000000000 --- a/build/pkgs/asttokens/spkg-install.in +++ /dev/null @@ -1,2 +0,0 @@ -cd src -sdh_pip_install . From cfb4a67a7ff7ada5569ab32c1c2ee2ade2516219 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 15 Jun 2024 13:10:08 -0700 Subject: [PATCH 08/50] build/pkgs/cppy: Change to wheel package --- build/pkgs/cppy/checksums.ini | 8 ++++---- build/pkgs/cppy/dependencies | 2 +- build/pkgs/cppy/spkg-install.in | 1 - 3 files changed, 5 insertions(+), 6 deletions(-) delete mode 100644 build/pkgs/cppy/spkg-install.in diff --git a/build/pkgs/cppy/checksums.ini b/build/pkgs/cppy/checksums.ini index 8c1171ff28d..d042532c770 100644 --- a/build/pkgs/cppy/checksums.ini +++ b/build/pkgs/cppy/checksums.ini @@ -1,4 +1,4 @@ -tarball=cppy-VERSION.tar.gz -sha1=c82ee7a4f38e302bfe4de2a695d2bdfefb69951f -sha256=83b43bf17b1085ac15c5debdb42154f138b928234b21447358981f69d0d6fe1b -upstream_url=https://files.pythonhosted.org/packages/source/c/cppy/cppy-VERSION.tar.gz +tarball=cppy-VERSION-py3-none-any.whl +sha1=57304a8ceaaf7cb34e4315aa9b8084b17fc0332c +sha256=c5b5eac3d3f42593a07d35275b0bc27f447b76b9ad8f27c62e3cfa286dc1988a +upstream_url=https://pypi.io/packages/py3/c/cppy/cppy-VERSION-py3-none-any.whl diff --git a/build/pkgs/cppy/dependencies b/build/pkgs/cppy/dependencies index 47296a7bace..644ad35f773 100644 --- a/build/pkgs/cppy/dependencies +++ b/build/pkgs/cppy/dependencies @@ -1,4 +1,4 @@ - | $(PYTHON_TOOLCHAIN) $(PYTHON) + | pip $(PYTHON) ---------- All lines of this file are ignored except the first. diff --git a/build/pkgs/cppy/spkg-install.in b/build/pkgs/cppy/spkg-install.in deleted file mode 100644 index deba1bb42bb..00000000000 --- a/build/pkgs/cppy/spkg-install.in +++ /dev/null @@ -1 +0,0 @@ -cd src && sdh_pip_install . From 46b1b56751af2849c2d7ff7ec12dc8c75c1c16ee Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 15 Jun 2024 13:11:10 -0700 Subject: [PATCH 09/50] build/pkgs/executing: Update to 2.0.1, change to wheel package --- build/pkgs/executing/checksums.ini | 8 ++++---- build/pkgs/executing/dependencies | 2 +- build/pkgs/executing/package-version.txt | 2 +- build/pkgs/executing/spkg-install.in | 2 -- 4 files changed, 6 insertions(+), 8 deletions(-) delete mode 100644 build/pkgs/executing/spkg-install.in diff --git a/build/pkgs/executing/checksums.ini b/build/pkgs/executing/checksums.ini index 5add559f690..c316d78954d 100644 --- a/build/pkgs/executing/checksums.ini +++ b/build/pkgs/executing/checksums.ini @@ -1,4 +1,4 @@ -tarball=executing-VERSION.tar.gz -sha1=ac9b0cbedd1166bce7a3b9f8542f8d1fafdd8c73 -sha256=19da64c18d2d851112f09c287f8d3dbbdf725ab0e569077efb6cdcbd3497c107 -upstream_url=https://pypi.io/packages/source/e/executing/executing-VERSION.tar.gz +tarball=executing-VERSION-py2.py3-none-any.whl +sha1=c32699ff6868bf3613d56795016880fdadde4fc6 +sha256=eac49ca94516ccc753f9fb5ce82603156e590b27525a8bc32cce8ae302eb61bc +upstream_url=https://pypi.io/packages/py2.py3/e/executing/executing-VERSION-py2.py3-none-any.whl diff --git a/build/pkgs/executing/dependencies b/build/pkgs/executing/dependencies index 47296a7bace..644ad35f773 100644 --- a/build/pkgs/executing/dependencies +++ b/build/pkgs/executing/dependencies @@ -1,4 +1,4 @@ - | $(PYTHON_TOOLCHAIN) $(PYTHON) + | pip $(PYTHON) ---------- All lines of this file are ignored except the first. diff --git a/build/pkgs/executing/package-version.txt b/build/pkgs/executing/package-version.txt index 26aaba0e866..38f77a65b30 100644 --- a/build/pkgs/executing/package-version.txt +++ b/build/pkgs/executing/package-version.txt @@ -1 +1 @@ -1.2.0 +2.0.1 diff --git a/build/pkgs/executing/spkg-install.in b/build/pkgs/executing/spkg-install.in deleted file mode 100644 index 37ac1a53437..00000000000 --- a/build/pkgs/executing/spkg-install.in +++ /dev/null @@ -1,2 +0,0 @@ -cd src -sdh_pip_install . From bf15570a4360f9e8edc26ccd56b9d94b8a0b7037 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 15 Jun 2024 13:19:24 -0700 Subject: [PATCH 10/50] build/pkgs/jsonschema: Change to wheel package --- build/pkgs/jsonschema/checksums.ini | 8 ++++---- build/pkgs/jsonschema/dependencies | 2 +- build/pkgs/jsonschema/spkg-install.in | 14 -------------- 3 files changed, 5 insertions(+), 19 deletions(-) delete mode 100644 build/pkgs/jsonschema/spkg-install.in diff --git a/build/pkgs/jsonschema/checksums.ini b/build/pkgs/jsonschema/checksums.ini index 89a23a0d2cf..e709e36e5d3 100644 --- a/build/pkgs/jsonschema/checksums.ini +++ b/build/pkgs/jsonschema/checksums.ini @@ -1,4 +1,4 @@ -tarball=jsonschema-VERSION.tar.gz -sha1=9f762c6c2b92defddf1c441cce8132d021252b2c -sha256=0f864437ab8b6076ba6707453ef8f98a6a0d512a80e93f8abdb676f737ecb60d -upstream_url=https://pypi.io/packages/source/j/jsonschema/jsonschema-VERSION.tar.gz +tarball=jsonschema-VERSION-py3-none-any.whl +sha1=189537b18c91e60be991a3dba704577d19f8e48d +sha256=a870ad254da1a8ca84b6a2905cac29d265f805acc57af304784962a2aa6508f6 +upstream_url=https://pypi.io/packages/py3/j/jsonschema/jsonschema-VERSION-py3-none-any.whl diff --git a/build/pkgs/jsonschema/dependencies b/build/pkgs/jsonschema/dependencies index 1a62386aa97..8c7c4532c8d 100644 --- a/build/pkgs/jsonschema/dependencies +++ b/build/pkgs/jsonschema/dependencies @@ -1,4 +1,4 @@ -jsonschema_specifications pyrsistent attrs importlib_metadata fqdn isoduration jsonpointer uri_template webcolors | $(PYTHON_TOOLCHAIN) hatchling hatch_vcs hatch_fancy_pypi_readme $(PYTHON) +jsonschema_specifications pyrsistent attrs fqdn isoduration jsonpointer uri_template webcolors | $(PYTHON_TOOLCHAIN) $(PYTHON) ---------- All lines of this file are ignored except the first. diff --git a/build/pkgs/jsonschema/spkg-install.in b/build/pkgs/jsonschema/spkg-install.in deleted file mode 100644 index c2e2e774287..00000000000 --- a/build/pkgs/jsonschema/spkg-install.in +++ /dev/null @@ -1,14 +0,0 @@ -if [ -z "$SAGE_LOCAL" ]; then - echo >&2 "SAGE_LOCAL undefined ... exiting" - echo >&2 "Maybe run 'sage --sh'?" - exit 1 -fi - -cd src - -sdh_pip_install . - -if [ $? -ne 0 ]; then - echo "Error installing jsonschema ... exiting" - exit 1 -fi From 39bd477a67e035957f5ef777b4adb53fe99ea1b0 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 15 Jun 2024 13:22:05 -0700 Subject: [PATCH 11/50] build/pkgs/hatch_vcs: Remove --- build/pkgs/hatch_vcs/SPKG.rst | 18 ------------------ build/pkgs/hatch_vcs/checksums.ini | 4 ---- build/pkgs/hatch_vcs/dependencies | 4 ---- build/pkgs/hatch_vcs/distros/alpine.txt | 1 - build/pkgs/hatch_vcs/distros/arch.txt | 1 - build/pkgs/hatch_vcs/distros/debian.txt | 1 - build/pkgs/hatch_vcs/distros/fedora.txt | 1 - build/pkgs/hatch_vcs/distros/freebsd.txt | 1 - build/pkgs/hatch_vcs/distros/gentoo.txt | 1 - build/pkgs/hatch_vcs/distros/macports.txt | 1 - build/pkgs/hatch_vcs/distros/opensuse.txt | 1 - build/pkgs/hatch_vcs/distros/void.txt | 1 - build/pkgs/hatch_vcs/package-version.txt | 1 - build/pkgs/hatch_vcs/spkg-configure.m4 | 3 --- build/pkgs/hatch_vcs/type | 1 - build/pkgs/hatch_vcs/version_requirements.txt | 1 - 16 files changed, 41 deletions(-) delete mode 100644 build/pkgs/hatch_vcs/SPKG.rst delete mode 100644 build/pkgs/hatch_vcs/checksums.ini delete mode 100644 build/pkgs/hatch_vcs/dependencies delete mode 100644 build/pkgs/hatch_vcs/distros/alpine.txt delete mode 100644 build/pkgs/hatch_vcs/distros/arch.txt delete mode 100644 build/pkgs/hatch_vcs/distros/debian.txt delete mode 100644 build/pkgs/hatch_vcs/distros/fedora.txt delete mode 100644 build/pkgs/hatch_vcs/distros/freebsd.txt delete mode 100644 build/pkgs/hatch_vcs/distros/gentoo.txt delete mode 100644 build/pkgs/hatch_vcs/distros/macports.txt delete mode 100644 build/pkgs/hatch_vcs/distros/opensuse.txt delete mode 100644 build/pkgs/hatch_vcs/distros/void.txt delete mode 100644 build/pkgs/hatch_vcs/package-version.txt delete mode 100644 build/pkgs/hatch_vcs/spkg-configure.m4 delete mode 100644 build/pkgs/hatch_vcs/type delete mode 100644 build/pkgs/hatch_vcs/version_requirements.txt diff --git a/build/pkgs/hatch_vcs/SPKG.rst b/build/pkgs/hatch_vcs/SPKG.rst deleted file mode 100644 index 6c11d8d95fb..00000000000 --- a/build/pkgs/hatch_vcs/SPKG.rst +++ /dev/null @@ -1,18 +0,0 @@ -hatch_vcs: Hatch plugin for versioning with your preferred VCS -============================================================== - -Description ------------ - -Hatch plugin for versioning with your preferred VCS - -License -------- - -MIT - -Upstream Contact ----------------- - -https://pypi.org/project/hatch-vcs/ - diff --git a/build/pkgs/hatch_vcs/checksums.ini b/build/pkgs/hatch_vcs/checksums.ini deleted file mode 100644 index dcfa6ea3e03..00000000000 --- a/build/pkgs/hatch_vcs/checksums.ini +++ /dev/null @@ -1,4 +0,0 @@ -tarball=hatch_vcs-VERSION-py3-none-any.whl -sha1=a4da813bf9a745ed2020bf462f4bc19a1ab7fc11 -sha256=b8a2b6bee54cf6f9fc93762db73890017ae59c9081d1038a41f16235ceaf8b2c -upstream_url=https://pypi.io/packages/py3/h/hatch_vcs/hatch_vcs-VERSION-py3-none-any.whl diff --git a/build/pkgs/hatch_vcs/dependencies b/build/pkgs/hatch_vcs/dependencies deleted file mode 100644 index 36380aee4e7..00000000000 --- a/build/pkgs/hatch_vcs/dependencies +++ /dev/null @@ -1,4 +0,0 @@ -hatchling | pip $(PYTHON) - ----------- -All lines of this file are ignored except the first. diff --git a/build/pkgs/hatch_vcs/distros/alpine.txt b/build/pkgs/hatch_vcs/distros/alpine.txt deleted file mode 100644 index f83237884b5..00000000000 --- a/build/pkgs/hatch_vcs/distros/alpine.txt +++ /dev/null @@ -1 +0,0 @@ -py3-hatch-vcs diff --git a/build/pkgs/hatch_vcs/distros/arch.txt b/build/pkgs/hatch_vcs/distros/arch.txt deleted file mode 100644 index 8441f14bba2..00000000000 --- a/build/pkgs/hatch_vcs/distros/arch.txt +++ /dev/null @@ -1 +0,0 @@ -python-hatch-vcs diff --git a/build/pkgs/hatch_vcs/distros/debian.txt b/build/pkgs/hatch_vcs/distros/debian.txt deleted file mode 100644 index 5480b8bcdd9..00000000000 --- a/build/pkgs/hatch_vcs/distros/debian.txt +++ /dev/null @@ -1 +0,0 @@ -python3-hatch-vcs diff --git a/build/pkgs/hatch_vcs/distros/fedora.txt b/build/pkgs/hatch_vcs/distros/fedora.txt deleted file mode 100644 index 8441f14bba2..00000000000 --- a/build/pkgs/hatch_vcs/distros/fedora.txt +++ /dev/null @@ -1 +0,0 @@ -python-hatch-vcs diff --git a/build/pkgs/hatch_vcs/distros/freebsd.txt b/build/pkgs/hatch_vcs/distros/freebsd.txt deleted file mode 100644 index 53c6f650d58..00000000000 --- a/build/pkgs/hatch_vcs/distros/freebsd.txt +++ /dev/null @@ -1 +0,0 @@ -devel/py-hatch-vcs diff --git a/build/pkgs/hatch_vcs/distros/gentoo.txt b/build/pkgs/hatch_vcs/distros/gentoo.txt deleted file mode 100644 index ad6e0d96197..00000000000 --- a/build/pkgs/hatch_vcs/distros/gentoo.txt +++ /dev/null @@ -1 +0,0 @@ -dev-python/hatch-vcs diff --git a/build/pkgs/hatch_vcs/distros/macports.txt b/build/pkgs/hatch_vcs/distros/macports.txt deleted file mode 100644 index cdccfd5952e..00000000000 --- a/build/pkgs/hatch_vcs/distros/macports.txt +++ /dev/null @@ -1 +0,0 @@ -py-hatch-vcs diff --git a/build/pkgs/hatch_vcs/distros/opensuse.txt b/build/pkgs/hatch_vcs/distros/opensuse.txt deleted file mode 100644 index cb34dc58d71..00000000000 --- a/build/pkgs/hatch_vcs/distros/opensuse.txt +++ /dev/null @@ -1 +0,0 @@ -python-hatch_vcs diff --git a/build/pkgs/hatch_vcs/distros/void.txt b/build/pkgs/hatch_vcs/distros/void.txt deleted file mode 100644 index 04e2069fbb3..00000000000 --- a/build/pkgs/hatch_vcs/distros/void.txt +++ /dev/null @@ -1 +0,0 @@ -hatch-vcs diff --git a/build/pkgs/hatch_vcs/package-version.txt b/build/pkgs/hatch_vcs/package-version.txt deleted file mode 100644 index 1d0ba9ea182..00000000000 --- a/build/pkgs/hatch_vcs/package-version.txt +++ /dev/null @@ -1 +0,0 @@ -0.4.0 diff --git a/build/pkgs/hatch_vcs/spkg-configure.m4 b/build/pkgs/hatch_vcs/spkg-configure.m4 deleted file mode 100644 index aa5a1c212df..00000000000 --- a/build/pkgs/hatch_vcs/spkg-configure.m4 +++ /dev/null @@ -1,3 +0,0 @@ -SAGE_SPKG_CONFIGURE([hatch_vcs], [ - SAGE_PYTHON_PACKAGE_CHECK([hatch_vcs]) -]) diff --git a/build/pkgs/hatch_vcs/type b/build/pkgs/hatch_vcs/type deleted file mode 100644 index a6a7b9cd726..00000000000 --- a/build/pkgs/hatch_vcs/type +++ /dev/null @@ -1 +0,0 @@ -standard diff --git a/build/pkgs/hatch_vcs/version_requirements.txt b/build/pkgs/hatch_vcs/version_requirements.txt deleted file mode 100644 index 04e2069fbb3..00000000000 --- a/build/pkgs/hatch_vcs/version_requirements.txt +++ /dev/null @@ -1 +0,0 @@ -hatch-vcs From 7269c793ab4e987819d7ca88cbdf92e6b341ed46 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 15 Jun 2024 13:22:39 -0700 Subject: [PATCH 12/50] build/pkgs/hatch_fancy_pypi_readme: Remove --- build/pkgs/hatch_fancy_pypi_readme/SPKG.rst | 18 ------------------ .../pkgs/hatch_fancy_pypi_readme/checksums.ini | 4 ---- .../pkgs/hatch_fancy_pypi_readme/dependencies | 4 ---- .../hatch_fancy_pypi_readme/distros/alpine.txt | 1 - .../hatch_fancy_pypi_readme/distros/arch.txt | 1 - .../hatch_fancy_pypi_readme/distros/debian.txt | 1 - .../hatch_fancy_pypi_readme/distros/fedora.txt | 1 - .../distros/freebsd.txt | 1 - .../hatch_fancy_pypi_readme/distros/gentoo.txt | 1 - .../distros/macports.txt | 1 - .../distros/opensuse.txt | 1 - .../package-version.txt | 1 - .../hatch_fancy_pypi_readme/spkg-configure.m4 | 3 --- build/pkgs/hatch_fancy_pypi_readme/type | 1 - .../version_requirements.txt | 1 - 15 files changed, 40 deletions(-) delete mode 100644 build/pkgs/hatch_fancy_pypi_readme/SPKG.rst delete mode 100644 build/pkgs/hatch_fancy_pypi_readme/checksums.ini delete mode 100644 build/pkgs/hatch_fancy_pypi_readme/dependencies delete mode 100644 build/pkgs/hatch_fancy_pypi_readme/distros/alpine.txt delete mode 100644 build/pkgs/hatch_fancy_pypi_readme/distros/arch.txt delete mode 100644 build/pkgs/hatch_fancy_pypi_readme/distros/debian.txt delete mode 100644 build/pkgs/hatch_fancy_pypi_readme/distros/fedora.txt delete mode 100644 build/pkgs/hatch_fancy_pypi_readme/distros/freebsd.txt delete mode 100644 build/pkgs/hatch_fancy_pypi_readme/distros/gentoo.txt delete mode 100644 build/pkgs/hatch_fancy_pypi_readme/distros/macports.txt delete mode 100644 build/pkgs/hatch_fancy_pypi_readme/distros/opensuse.txt delete mode 100644 build/pkgs/hatch_fancy_pypi_readme/package-version.txt delete mode 100644 build/pkgs/hatch_fancy_pypi_readme/spkg-configure.m4 delete mode 100644 build/pkgs/hatch_fancy_pypi_readme/type delete mode 100644 build/pkgs/hatch_fancy_pypi_readme/version_requirements.txt diff --git a/build/pkgs/hatch_fancy_pypi_readme/SPKG.rst b/build/pkgs/hatch_fancy_pypi_readme/SPKG.rst deleted file mode 100644 index 4e076e4e3cb..00000000000 --- a/build/pkgs/hatch_fancy_pypi_readme/SPKG.rst +++ /dev/null @@ -1,18 +0,0 @@ -hatch_fancy_pypi_readme: Fancy PyPI READMEs with Hatch -====================================================== - -Description ------------ - -Fancy PyPI READMEs with Hatch - -License -------- - -MIT - -Upstream Contact ----------------- - -https://pypi.org/project/hatch-fancy-pypi-readme/ - diff --git a/build/pkgs/hatch_fancy_pypi_readme/checksums.ini b/build/pkgs/hatch_fancy_pypi_readme/checksums.ini deleted file mode 100644 index c624067269f..00000000000 --- a/build/pkgs/hatch_fancy_pypi_readme/checksums.ini +++ /dev/null @@ -1,4 +0,0 @@ -tarball=hatch_fancy_pypi_readme-VERSION-py3-none-any.whl -sha1=25cd6749c20a6803cbf1b6c4d29338c344a8f09c -sha256=26ec5c7cfd9f604eff0ae6c927d7b197b220706dca203f0aad1928abc81f3a46 -upstream_url=https://pypi.io/packages/py3/h/hatch_fancy_pypi_readme/hatch_fancy_pypi_readme-VERSION-py3-none-any.whl diff --git a/build/pkgs/hatch_fancy_pypi_readme/dependencies b/build/pkgs/hatch_fancy_pypi_readme/dependencies deleted file mode 100644 index 36380aee4e7..00000000000 --- a/build/pkgs/hatch_fancy_pypi_readme/dependencies +++ /dev/null @@ -1,4 +0,0 @@ -hatchling | pip $(PYTHON) - ----------- -All lines of this file are ignored except the first. diff --git a/build/pkgs/hatch_fancy_pypi_readme/distros/alpine.txt b/build/pkgs/hatch_fancy_pypi_readme/distros/alpine.txt deleted file mode 100644 index 0046a6941d0..00000000000 --- a/build/pkgs/hatch_fancy_pypi_readme/distros/alpine.txt +++ /dev/null @@ -1 +0,0 @@ -py3-hatch-fancy-pypi-readme diff --git a/build/pkgs/hatch_fancy_pypi_readme/distros/arch.txt b/build/pkgs/hatch_fancy_pypi_readme/distros/arch.txt deleted file mode 100644 index 7df4edcccd3..00000000000 --- a/build/pkgs/hatch_fancy_pypi_readme/distros/arch.txt +++ /dev/null @@ -1 +0,0 @@ -python-hatch-fancy-pypi-readme diff --git a/build/pkgs/hatch_fancy_pypi_readme/distros/debian.txt b/build/pkgs/hatch_fancy_pypi_readme/distros/debian.txt deleted file mode 100644 index 804dbbd0a98..00000000000 --- a/build/pkgs/hatch_fancy_pypi_readme/distros/debian.txt +++ /dev/null @@ -1 +0,0 @@ -python3-hatch-fancy-pypi-readme diff --git a/build/pkgs/hatch_fancy_pypi_readme/distros/fedora.txt b/build/pkgs/hatch_fancy_pypi_readme/distros/fedora.txt deleted file mode 100644 index 7df4edcccd3..00000000000 --- a/build/pkgs/hatch_fancy_pypi_readme/distros/fedora.txt +++ /dev/null @@ -1 +0,0 @@ -python-hatch-fancy-pypi-readme diff --git a/build/pkgs/hatch_fancy_pypi_readme/distros/freebsd.txt b/build/pkgs/hatch_fancy_pypi_readme/distros/freebsd.txt deleted file mode 100644 index b3e8d47dc5a..00000000000 --- a/build/pkgs/hatch_fancy_pypi_readme/distros/freebsd.txt +++ /dev/null @@ -1 +0,0 @@ -devel/py-hatch-fancy-pypi-readme diff --git a/build/pkgs/hatch_fancy_pypi_readme/distros/gentoo.txt b/build/pkgs/hatch_fancy_pypi_readme/distros/gentoo.txt deleted file mode 100644 index 88ad9653448..00000000000 --- a/build/pkgs/hatch_fancy_pypi_readme/distros/gentoo.txt +++ /dev/null @@ -1 +0,0 @@ -dev-python/hatch-fancy-pypi-readme diff --git a/build/pkgs/hatch_fancy_pypi_readme/distros/macports.txt b/build/pkgs/hatch_fancy_pypi_readme/distros/macports.txt deleted file mode 100644 index 442557c9f7f..00000000000 --- a/build/pkgs/hatch_fancy_pypi_readme/distros/macports.txt +++ /dev/null @@ -1 +0,0 @@ -py-hatch-fancy-pypi-readme diff --git a/build/pkgs/hatch_fancy_pypi_readme/distros/opensuse.txt b/build/pkgs/hatch_fancy_pypi_readme/distros/opensuse.txt deleted file mode 100644 index 7df4edcccd3..00000000000 --- a/build/pkgs/hatch_fancy_pypi_readme/distros/opensuse.txt +++ /dev/null @@ -1 +0,0 @@ -python-hatch-fancy-pypi-readme diff --git a/build/pkgs/hatch_fancy_pypi_readme/package-version.txt b/build/pkgs/hatch_fancy_pypi_readme/package-version.txt deleted file mode 100644 index 7c974b0f495..00000000000 --- a/build/pkgs/hatch_fancy_pypi_readme/package-version.txt +++ /dev/null @@ -1 +0,0 @@ -24.1.0 diff --git a/build/pkgs/hatch_fancy_pypi_readme/spkg-configure.m4 b/build/pkgs/hatch_fancy_pypi_readme/spkg-configure.m4 deleted file mode 100644 index 864f889676d..00000000000 --- a/build/pkgs/hatch_fancy_pypi_readme/spkg-configure.m4 +++ /dev/null @@ -1,3 +0,0 @@ -SAGE_SPKG_CONFIGURE([hatch_fancy_pypi_readme], [ - SAGE_PYTHON_PACKAGE_CHECK([hatch_fancy_pypi_readme]) -]) diff --git a/build/pkgs/hatch_fancy_pypi_readme/type b/build/pkgs/hatch_fancy_pypi_readme/type deleted file mode 100644 index a6a7b9cd726..00000000000 --- a/build/pkgs/hatch_fancy_pypi_readme/type +++ /dev/null @@ -1 +0,0 @@ -standard diff --git a/build/pkgs/hatch_fancy_pypi_readme/version_requirements.txt b/build/pkgs/hatch_fancy_pypi_readme/version_requirements.txt deleted file mode 100644 index 6d9a1f85903..00000000000 --- a/build/pkgs/hatch_fancy_pypi_readme/version_requirements.txt +++ /dev/null @@ -1 +0,0 @@ -hatch-fancy-pypi-readme From 32c450a808d896ba3cf35049dd36e3c270824bcc Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 15 Jun 2024 13:24:09 -0700 Subject: [PATCH 13/50] build/pkgs/pure_eval: Change to wheel package --- build/pkgs/pure_eval/checksums.ini | 8 ++++---- build/pkgs/pure_eval/dependencies | 2 +- build/pkgs/pure_eval/spkg-install.in | 2 -- 3 files changed, 5 insertions(+), 7 deletions(-) delete mode 100644 build/pkgs/pure_eval/spkg-install.in diff --git a/build/pkgs/pure_eval/checksums.ini b/build/pkgs/pure_eval/checksums.ini index 7fb86e03cc4..1cdf6f8d2a4 100644 --- a/build/pkgs/pure_eval/checksums.ini +++ b/build/pkgs/pure_eval/checksums.ini @@ -1,4 +1,4 @@ -tarball=pure_eval-VERSION.tar.gz -sha1=45813e75b359573c2ef49430673812ea3f8f81f2 -sha256=2b45320af6dfaa1750f543d714b6d1c520a1688dec6fd24d339063ce0aaa9ac3 -upstream_url=https://pypi.io/packages/source/p/pure_eval/pure_eval-VERSION.tar.gz +tarball=pure_eval-VERSION-py3-none-any.whl +sha1=dbd5eaa9eb5a4910cff5ccd42b570f866f581da4 +sha256=01eaab343580944bc56080ebe0a674b39ec44a945e6d09ba7db3cb8cec289350 +upstream_url=https://pypi.io/packages/py3/p/pure_eval/pure_eval-VERSION-py3-none-any.whl diff --git a/build/pkgs/pure_eval/dependencies b/build/pkgs/pure_eval/dependencies index 47296a7bace..644ad35f773 100644 --- a/build/pkgs/pure_eval/dependencies +++ b/build/pkgs/pure_eval/dependencies @@ -1,4 +1,4 @@ - | $(PYTHON_TOOLCHAIN) $(PYTHON) + | pip $(PYTHON) ---------- All lines of this file are ignored except the first. diff --git a/build/pkgs/pure_eval/spkg-install.in b/build/pkgs/pure_eval/spkg-install.in deleted file mode 100644 index 37ac1a53437..00000000000 --- a/build/pkgs/pure_eval/spkg-install.in +++ /dev/null @@ -1,2 +0,0 @@ -cd src -sdh_pip_install . From c24f2a94f0b331c3f636bae590449337d2645158 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 15 Jun 2024 13:27:03 -0700 Subject: [PATCH 14/50] build/pkgs/py: Change to wheel package --- build/pkgs/py/checksums.ini | 8 ++++---- build/pkgs/py/dependencies | 2 +- build/pkgs/py/spkg-install.in | 2 -- 3 files changed, 5 insertions(+), 7 deletions(-) delete mode 100644 build/pkgs/py/spkg-install.in diff --git a/build/pkgs/py/checksums.ini b/build/pkgs/py/checksums.ini index 9c10e7b6cf8..a10022af08f 100644 --- a/build/pkgs/py/checksums.ini +++ b/build/pkgs/py/checksums.ini @@ -1,4 +1,4 @@ -tarball=py-VERSION.tar.gz -sha1=bb8aa4f56e3ced1cd61906495150e7ca2dacc10b -sha256=51c75c4126074b472f746a24399ad32f6053d1b34b68d2fa41e558e6f4a98719 -upstream_url=https://pypi.io/packages/source/p/py/py-VERSION.tar.gz +tarball=py-VERSION-py2.py3-none-any.whl +sha1=44002baec8d2184d218bd2fa6049967cd9b4dbb5 +sha256=607c53218732647dff4acdfcd50cb62615cedf612e72d1724fb1a0cc6405b378 +upstream_url=https://pypi.io/packages/py2.py3/p/py/py-VERSION-py2.py3-none-any.whl diff --git a/build/pkgs/py/dependencies b/build/pkgs/py/dependencies index 995ddecb8f4..644ad35f773 100644 --- a/build/pkgs/py/dependencies +++ b/build/pkgs/py/dependencies @@ -1,4 +1,4 @@ - | $(PYTHON_TOOLCHAIN) setuptools_scm $(PYTHON) + | pip $(PYTHON) ---------- All lines of this file are ignored except the first. diff --git a/build/pkgs/py/spkg-install.in b/build/pkgs/py/spkg-install.in deleted file mode 100644 index 37ac1a53437..00000000000 --- a/build/pkgs/py/spkg-install.in +++ /dev/null @@ -1,2 +0,0 @@ -cd src -sdh_pip_install . From 64be4fc05b87207a118a13bfeac88f0da05a8f0d Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 15 Jun 2024 13:27:48 -0700 Subject: [PATCH 15/50] build/pkgs/stack_data: Change to wheel package --- build/pkgs/stack_data/checksums.ini | 8 ++++---- build/pkgs/stack_data/dependencies | 2 +- build/pkgs/stack_data/spkg-install.in | 2 -- 3 files changed, 5 insertions(+), 7 deletions(-) delete mode 100644 build/pkgs/stack_data/spkg-install.in diff --git a/build/pkgs/stack_data/checksums.ini b/build/pkgs/stack_data/checksums.ini index 5761a624c1e..4f749a287f0 100644 --- a/build/pkgs/stack_data/checksums.ini +++ b/build/pkgs/stack_data/checksums.ini @@ -1,4 +1,4 @@ -tarball=stack_data-VERSION.tar.gz -sha1=7f7627afc47570ffb06924c1b2fbb48e21bac724 -sha256=836a778de4fec4dcd1dcd89ed8abff8a221f58308462e1c4aa2a3cf30148f0b9 -upstream_url=https://pypi.io/packages/source/s/stack_data/stack_data-VERSION.tar.gz +tarball=stack_data-VERSION-py3-none-any.whl +sha1=96814b10bdc464e8ef00f4a07c60dd17a3dc9668 +sha256=d5558e0c25a4cb0853cddad3d77da9891a08cb85dd9f9f91b9f8cd66e511e695 +upstream_url=https://pypi.io/packages/py3/s/stack_data/stack_data-VERSION-py3-none-any.whl diff --git a/build/pkgs/stack_data/dependencies b/build/pkgs/stack_data/dependencies index 52b3edda4b5..26e1f2a1801 100644 --- a/build/pkgs/stack_data/dependencies +++ b/build/pkgs/stack_data/dependencies @@ -1,4 +1,4 @@ - executing asttokens pure_eval | $(PYTHON_TOOLCHAIN) $(PYTHON) +executing asttokens pure_eval | pip $(PYTHON) ---------- All lines of this file are ignored except the first. diff --git a/build/pkgs/stack_data/spkg-install.in b/build/pkgs/stack_data/spkg-install.in deleted file mode 100644 index 37ac1a53437..00000000000 --- a/build/pkgs/stack_data/spkg-install.in +++ /dev/null @@ -1,2 +0,0 @@ -cd src -sdh_pip_install . From 9184357a7b22bf593b260dcd16431aafdfd1ea20 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 15 Jun 2024 14:39:54 -0700 Subject: [PATCH 16/50] build/pkgs/httpx/dependencies: Add missing deps anyio, sniffio --- build/pkgs/httpx/dependencies | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/pkgs/httpx/dependencies b/build/pkgs/httpx/dependencies index 8df93e6d599..666b4944b30 100644 --- a/build/pkgs/httpx/dependencies +++ b/build/pkgs/httpx/dependencies @@ -1,4 +1,4 @@ -httpcore | $(PYTHON_TOOLCHAIN) $(PYTHON) +httpcore anyio sniffio | $(PYTHON_TOOLCHAIN) $(PYTHON) ---------- All lines of this file are ignored except the first. From a8d254d527efd9acfc11c07146f69739ee9e197d Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 15 Jun 2024 17:27:13 -0700 Subject: [PATCH 17/50] build/pkgs/types_python_dateutil: Update to 2.9.0.20240316 --- build/pkgs/types_python_dateutil/checksums.ini | 4 ++-- build/pkgs/types_python_dateutil/package-version.txt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build/pkgs/types_python_dateutil/checksums.ini b/build/pkgs/types_python_dateutil/checksums.ini index 6ebc189c635..08fb0805291 100644 --- a/build/pkgs/types_python_dateutil/checksums.ini +++ b/build/pkgs/types_python_dateutil/checksums.ini @@ -1,4 +1,4 @@ tarball=types_python_dateutil-VERSION-py3-none-any.whl -sha1=c039b93ad4b5f3ea1c6aac3d08386995e8c7b19e -sha256=f977b8de27787639986b4e28963263fd0e5158942b3ecef91b9335c130cb1ce9 +sha1=fc0a6cbd54667dd8dadb95c448014efe66c9ae0a +sha256=6b8cb66d960771ce5ff974e9dd45e38facb81718cc1e208b10b1baccbfdbee3b upstream_url=https://pypi.io/packages/py3/t/types_python_dateutil/types_python_dateutil-VERSION-py3-none-any.whl diff --git a/build/pkgs/types_python_dateutil/package-version.txt b/build/pkgs/types_python_dateutil/package-version.txt index b7ec6d6578b..8f5760fd520 100644 --- a/build/pkgs/types_python_dateutil/package-version.txt +++ b/build/pkgs/types_python_dateutil/package-version.txt @@ -1 +1 @@ -2.8.19.14 +2.9.0.20240316 From fd92c05bc95fc663dbe2838283e7677102d2f7de Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Sun, 23 Jun 2024 22:14:34 +0900 Subject: [PATCH 18/50] Fix doc build for releases --- .ci/create-changes-html.sh | 4 +- .github/workflows/doc-build-pdf.yml | 24 +++---- .github/workflows/doc-build.yml | 79 ++++++++++++----------- .github/workflows/doc-publish.yml | 98 +++++++++++++---------------- src/sage_docbuild/conf.py | 8 ++- 5 files changed, 107 insertions(+), 106 deletions(-) diff --git a/.ci/create-changes-html.sh b/.ci/create-changes-html.sh index 33fd9a52472..d061c725a68 100755 --- a/.ci/create-changes-html.sh +++ b/.ci/create-changes-html.sh @@ -19,7 +19,9 @@ echo '' >> CHANGES.html cat >> CHANGES.html << EOF ; d') # Create git repo from old doc - (cd docs && \ + (cd doc && \ git init && \ (echo "*.svg binary"; echo "*.pdf binary") >> .gitattributes && \ (echo ".buildinfo"; echo '*.inv'; echo '.git*'; echo '*.svg'; echo '*.pdf'; echo '*.png'; echo 'searchindex.js') > .gitignore; \ git add -A && git commit --quiet -m "old") - - name: Build docs + - name: Build doc id: docbuild - if: (success() || failure()) && steps.worktree.outcome == 'success' + if: (success() || failure()) && steps.worktree.outcome == 'success' && !startsWith(github.ref, 'refs/tags/') # Always non-incremental because of the concern that # incremental docbuild may introduce broken links (inter-file references) though build succeeds run: | @@ -157,50 +167,43 @@ jobs: ./config.status && make sagemath_doc_html-no-deps shell: sh .ci/docker-exec-script.sh BUILD /sage {0} - - name: Copy docs + - name: Copy doc id: copy if: (success() || failure()) && steps.docbuild.outcome == 'success' run: | set -ex # We copy everything to a local folder - docker cp BUILD:/sage/local/share/doc/sage/html docs - docker cp BUILD:/sage/local/share/doc/sage/index.html docs - (cd docs && git commit -a -m 'new') + docker cp --follow-link BUILD:/sage/local/share/doc/sage/html doc + docker cp --follow-link BUILD:/sage/local/share/doc/sage/index.html doc + (cd doc && git commit -a -m 'new') # Wipe out chronic diffs of new doc against old doc - (cd docs && \ + (cd doc && \ find . -name "*.html" | xargs sed -i -e '/This is documentation for/ s/ built with GitHub PR .*. Doc/. Doc/' \ -e '//dev/null && rm .gitattributes 2>/dev/null) + mv CHANGES.html doc # Zip everything for increased performance - zip -r docs.zip docs + zip -r doc.zip doc - - name: Upload docs + - name: Upload doc id: upload if: (success() || failure()) && steps.copy.outcome == 'success' - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: docs - path: docs.zip + name: doc + path: doc.zip - - name: Save space - id: savespace - if: (success() || failure()) && steps.upload.outcome == 'success' && github.repository == 'sagemath/sage' && github.ref == 'refs/heads/develop' - run: | - set -ex - # Save space on runner device before we start to build livedoc - rm -rf docs/ - rm -f docs.zip + # + # On release tags: live doc and wheels + # - name: Build live doc id: buildlivedoc - if: (success() || failure()) && steps.savespace.outcome == 'success' + if: (success() || failure()) && startsWith(github.ref, 'refs/tags/') run: | export MAKE="make -j5 --output-sync=recurse" SAGE_NUM_THREADS=5 export PATH="build/bin:$PATH" @@ -227,7 +230,7 @@ jobs: - name: Upload live doc if: (success() || failure()) && steps.copylivedoc.outcome == 'success' - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: livedoc path: livedoc.zip diff --git a/.github/workflows/doc-publish.yml b/.github/workflows/doc-publish.yml index bc12784cb9c..ee9de3c8c1c 100644 --- a/.github/workflows/doc-publish.yml +++ b/.github/workflows/doc-publish.yml @@ -14,9 +14,11 @@ permissions: pull-requests: write jobs: - upload-docs: + publish-doc: runs-on: ubuntu-latest if: github.event.workflow_run.conclusion == 'success' + env: + CAN_DEPLOY: ${{ secrets.NETLIFY_AUTH_TOKEN != '' && secrets.NETLIFY_SITE_ID != '' }} steps: - name: Get information about workflow origin uses: potiuk/get-workflow-origin@v1_5 @@ -24,44 +26,32 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} sourceRunId: ${{ github.event.workflow_run.id }} + if: env.CAN_DEPLOY == 'true' - # Once https://github.com/actions/download-artifact/issues/172 and/or https://github.com/actions/download-artifact/issues/60 is implemented, we can use the official download-artifact action - # For now use the solution from https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#using-data-from-the-triggering-workflow - - name: Download docs - uses: actions/github-script@v7.0.1 + - name: Download doc + id: download-doc + uses: actions/download-artifact@v4 with: - script: | - var artifacts = await github.rest.actions.listWorkflowRunArtifacts({ - owner: context.repo.owner, - repo: context.repo.repo, - run_id: ${{github.event.workflow_run.id }}, - }); - var matchArtifact = artifacts.data.artifacts.filter((artifact) => { - return artifact.name == "docs" - })[0]; - var download = await github.rest.actions.downloadArtifact({ - owner: context.repo.owner, - repo: context.repo.repo, - artifact_id: matchArtifact.id, - archive_format: 'zip', - }); - var fs = require('fs'); - fs.writeFileSync('${{github.workspace}}/docs.zip', Buffer.from(download.data)); + name: doc + github-token: ${{ secrets.GITHUB_TOKEN }} + repository: ${{ github.repository }} + run-id: ${{ github.event.workflow_run.id }} + if: steps.source-run-info.outputs.sourceEvent == 'pull_request' || (steps.source-run-info.outputs.sourceEvent == 'push' && steps.source-run-info.outputs.targetBranch == 'develop') - - name: Extract docs - run: unzip docs.zip -d docs && unzip docs/docs.zip -d docs/docs + - name: Extract doc + run: unzip doc.zip -d doc + if: steps.download-doc.outcome == 'success' - name: Deploy to Netlify - id: deploy-netlify uses: netlify/actions/cli@master with: - args: deploy --dir=docs/docs/docs ${NETLIFY_PRODUCTION:+"--prod"} --message ${NETLIFY_MESSAGE} --alias ${NETLIFY_ALIAS} + args: deploy --dir=doc/doc --message ${NETLIFY_MESSAGE} --alias ${NETLIFY_ALIAS} env: NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} - NETLIFY_PRODUCTION: ${{ github.ref == 'refs/heads/develop' }} - NETLIFY_MESSAGE: ${{ steps.source-run-info.outputs.pullRequestNumber }} - NETLIFY_ALIAS: preview-${{ steps.source-run-info.outputs.pullRequestNumber }} + NETLIFY_MESSAGE: doc-${{ steps.source-run-info.outputs.pullRequestNumber && format('pr-{0}', steps.source-run-info.outputs.pullRequestNumber) || 'develop' }} + NETLIFY_ALIAS: doc-${{ steps.source-run-info.outputs.pullRequestNumber && format('pr-{0}', steps.source-run-info.outputs.pullRequestNumber) || 'develop' }} + if: steps.download-doc.outcome == 'success' # Add deployment as status check, PR comment and annotation # we could use the nwtgck/actions-netlify action for that, except for that it is not (yet) working in workflow_run context: https://github.com/nwtgck/actions-netlify/issues/545 @@ -74,6 +64,7 @@ jobs: message: | [Documentation preview for this PR](${{ steps.deploy-netlify.outputs.NETLIFY_URL }}/html/en) (built with commit ${{ steps.source-run-info.outputs.sourceHeadSha }}; [changes](${{ steps.deploy-netlify.outputs.NETLIFY_URL }}/CHANGES.html)) is ready! :tada: This preview will update shortly after each push to this PR. + if: steps.download-doc.outcome == 'success' - name: Update deployment status PR check uses: myrotvorets/set-commit-status-action@v2.0.1 @@ -95,43 +86,44 @@ jobs: publish-live-doc: runs-on: ubuntu-latest - if: github.event.workflow_run.conclusion == 'success' && github.repository == 'sagemath/sage' && github.event.workflow_run.head_branch == 'develop' + if: github.event.workflow_run.conclusion == 'success' + env: + CAN_DEPLOY: ${{ secrets.NETLIFY_AUTH_TOKEN != '' && secrets.NETLIFY_SITE_ID != '' }} steps: + - name: Get information about workflow origin + uses: potiuk/get-workflow-origin@v1_5 + id: source-run-info + with: + token: ${{ secrets.GITHUB_TOKEN }} + sourceRunId: ${{ github.event.workflow_run.id }} + if: env.CAN_DEPLOY == 'true' + - name: Download live doc - uses: actions/github-script@v7.0.1 + id: download-doc + uses: actions/download-artifact@v4 with: - script: | - var artifacts = await github.rest.actions.listWorkflowRunArtifacts({ - owner: context.repo.owner, - repo: context.repo.repo, - run_id: ${{github.event.workflow_run.id }}, - }); - var matchArtifact = artifacts.data.artifacts.filter((artifact) => { - return artifact.name == "livedoc" - })[0]; - var download = await github.rest.actions.downloadArtifact({ - owner: context.repo.owner, - repo: context.repo.repo, - artifact_id: matchArtifact.id, - archive_format: 'zip', - }); - var fs = require('fs'); - fs.writeFileSync('${{github.workspace}}/livedoc.zip', Buffer.from(download.data)); + name: livedoc + github-token: ${{ secrets.GITHUB_TOKEN }} + repository: ${{ github.repository }} + run-id: ${{ github.event.workflow_run.id }} + if: steps.source-run-info.outputs.sourceEvent == 'push' && steps.source-run-info.outputs.targetBranch != 'develop' - name: Extract live doc - run: unzip livedoc.zip -d doc && unzip doc/livedoc.zip -d doc/doc + run: unzip livedoc.zip -d livedoc + if: steps.download-doc.outcome == 'success' - name: Deploy to Netlify - id: deploy-netlify uses: netlify/actions/cli@master with: - args: deploy --dir=doc/doc/livedoc --message ${NETLIFY_MESSAGE} --alias ${NETLIFY_ALIAS} + args: deploy --dir=livedoc/livedoc --message ${NETLIFY_MESSAGE} --alias ${NETLIFY_ALIAS} env: NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} - NETLIFY_MESSAGE: Deployed live doc - NETLIFY_ALIAS: livedoc + NETLIFY_MESSAGE: doc-${{ steps.source-run-info.outputs.targetBranch }} + NETLIFY_ALIAS: doc-${{ steps.source-run-info.outputs.targetBranch }} + if: steps.download-doc.outcome == 'success' - name: Report deployment url + if: steps.download-doc.outcome == 'success' run: | echo "::notice::The live documentation has been deployed - ${{ steps.deploy-netlify.outputs.NETLIFY_URL }}" diff --git a/src/sage_docbuild/conf.py b/src/sage_docbuild/conf.py index e0e14d8e785..9ff67bc9ca7 100644 --- a/src/sage_docbuild/conf.py +++ b/src/sage_docbuild/conf.py @@ -354,7 +354,7 @@ def set_intersphinx_mappings(app, config): for directory in os.listdir(os.path.join(invpath)): if directory == 'jupyter_execute': # This directory is created by jupyter-sphinx extension for - # internal use and should be ignored here. See trac #33507. + # internal use and should be ignored here. See Issue #33507. continue if os.path.isdir(os.path.join(invpath, directory)): src = os.path.join(refpath, directory) @@ -442,7 +442,9 @@ def linkcode_resolve(domain, info): } if not version.split('.')[-1].isnumeric(): # develop version - ver = f'{version}' + # This URL is hardcoded in the file .github/workflows/doc-publish.yml. + # See NETLIFY_ALIAS of the "Deploy to Netlify" step. + ver = f'{version}' github_ref = os.environ.get('GITHUB_REF', '') if github_ref: match = re.search(r'refs/pull/(\d+)/merge', github_ref) @@ -631,7 +633,7 @@ def linkcode_resolve(domain, info): \let\textLaTeX\LaTeX \AtBeginDocument{\renewcommand*{\LaTeX}{\hbox{\textLaTeX}}} -% Workaround for a LaTeX bug -- see trac #31397 and +% Workaround for a LaTeX bug -- see Issue #31397 and % https://tex.stackexchange.com/questions/583391/mactex-2020-error-with-report-hyperref-mathbf-in-chapter. \makeatletter \pdfstringdefDisableCommands{% From 748ff77ab3224dcc6324f34fa95d48f66b1f6de9 Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Sun, 23 Jun 2024 23:12:37 +0900 Subject: [PATCH 19/50] No master branch --- .github/workflows/doc-build.yml | 1 - .github/workflows/doc-publish.yml | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/doc-build.yml b/.github/workflows/doc-build.yml index 81e050df827..0bf2d8f8aac 100644 --- a/.github/workflows/doc-build.yml +++ b/.github/workflows/doc-build.yml @@ -13,7 +13,6 @@ on: - '[0-9]+.[0-9]+.rc[0-9]+' - '[0-9]+.[0-9]+.[0-9]+.rc[0-9]+' branches: - - master - develop workflow_dispatch: # Allow to run manually diff --git a/.github/workflows/doc-publish.yml b/.github/workflows/doc-publish.yml index ee9de3c8c1c..9d1527d7d31 100644 --- a/.github/workflows/doc-publish.yml +++ b/.github/workflows/doc-publish.yml @@ -43,6 +43,7 @@ jobs: if: steps.download-doc.outcome == 'success' - name: Deploy to Netlify + id: deploy-netlify uses: netlify/actions/cli@master with: args: deploy --dir=doc/doc --message ${NETLIFY_MESSAGE} --alias ${NETLIFY_ALIAS} @@ -113,6 +114,7 @@ jobs: if: steps.download-doc.outcome == 'success' - name: Deploy to Netlify + id: deploy-netlify uses: netlify/actions/cli@master with: args: deploy --dir=livedoc/livedoc --message ${NETLIFY_MESSAGE} --alias ${NETLIFY_ALIAS} From fd314530028b877e248ccccc843c851ed970693e Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Sun, 23 Jun 2024 23:53:06 +0900 Subject: [PATCH 20/50] Add more if --- .github/workflows/doc-publish.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/doc-publish.yml b/.github/workflows/doc-publish.yml index 9d1527d7d31..71ea64f2754 100644 --- a/.github/workflows/doc-publish.yml +++ b/.github/workflows/doc-publish.yml @@ -69,7 +69,6 @@ jobs: - name: Update deployment status PR check uses: myrotvorets/set-commit-status-action@v2.0.1 - if: ${{ always() }} env: DEPLOY_SUCCESS: Successfully deployed preview. DEPLOY_FAILURE: Failed to deploy preview. @@ -80,10 +79,12 @@ jobs: context: Deploy Documentation targetUrl: ${{ steps.deploy-netlify.outputs.NETLIFY_URL }} description: ${{ job.status == 'success' && env.DEPLOY_SUCCESS || env.DEPLOY_FAILURE }} + if: steps.download-doc.outcome == 'success' - name: Report deployment url run: | echo "::notice::The documentation has been deployed - ${{ steps.deploy-netlify.outputs.NETLIFY_URL }}" + if: steps.download-doc.outcome == 'success' publish-live-doc: runs-on: ubuntu-latest @@ -126,6 +127,6 @@ jobs: if: steps.download-doc.outcome == 'success' - name: Report deployment url - if: steps.download-doc.outcome == 'success' run: | echo "::notice::The live documentation has been deployed - ${{ steps.deploy-netlify.outputs.NETLIFY_URL }}" + if: steps.download-doc.outcome == 'success' From e7a64ff00e435259ce1a297582d1f85ec9ba4b31 Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Mon, 24 Jun 2024 01:10:33 +0900 Subject: [PATCH 21/50] Fix doc-pdf --- .github/workflows/doc-build-pdf.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/doc-build-pdf.yml b/.github/workflows/doc-build-pdf.yml index b2de526ca94..0c1085138b1 100644 --- a/.github/workflows/doc-build-pdf.yml +++ b/.github/workflows/doc-build-pdf.yml @@ -136,13 +136,11 @@ jobs: id: copy if: (success() || failure()) && steps.docbuild.outcome == 'success' run: | - # For some reason the deploy step below cannot find /sage/... - # So copy everything from there to local folder mkdir -p ./doc - cp -r -L /sage/local/share/doc/sage/pdf ./doc + # We copy everything to a local folder + docker cp BUILD:/sage/local/share/doc/sage/pdf doc # Zip everything for increased performance zip -r doc-pdf.zip doc - shell: sh .ci/docker-exec-script.sh BUILD /sage {0} - name: Upload doc if: (success() || failure()) && steps.copy.outcome == 'success' From 7fa8c480491c6e77dc00099a803f4a57a3428d44 Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Mon, 24 Jun 2024 01:34:13 +0900 Subject: [PATCH 22/50] Only pushes to develop --- .github/workflows/doc-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/doc-build.yml b/.github/workflows/doc-build.yml index 0bf2d8f8aac..ff0d20bdba2 100644 --- a/.github/workflows/doc-build.yml +++ b/.github/workflows/doc-build.yml @@ -122,7 +122,7 @@ jobs: ${{ env.BUILD_IMAGE }} /bin/sh # - # On PRs and pushes to master or develop + # On PRs and pushes to develop # - name: Store old doc From 6e64826a7aa1da91bbb5361314d624891dd65f02 Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Mon, 24 Jun 2024 01:43:06 +0900 Subject: [PATCH 23/50] Add a comment --- .github/workflows/doc-publish.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/doc-publish.yml b/.github/workflows/doc-publish.yml index 71ea64f2754..1f2d0f67d40 100644 --- a/.github/workflows/doc-publish.yml +++ b/.github/workflows/doc-publish.yml @@ -108,6 +108,7 @@ jobs: github-token: ${{ secrets.GITHUB_TOKEN }} repository: ${{ github.repository }} run-id: ${{ github.event.workflow_run.id }} + # if the doc was built for tag push (targetBranch contains the tag) if: steps.source-run-info.outputs.sourceEvent == 'push' && steps.source-run-info.outputs.targetBranch != 'develop' - name: Extract live doc From 10f0fa6cf2002aefc483769b98eb4a02247424ac Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Mon, 24 Jun 2024 08:53:52 +0900 Subject: [PATCH 24/50] Add more comments --- .github/workflows/doc-publish.yml | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/.github/workflows/doc-publish.yml b/.github/workflows/doc-publish.yml index 1f2d0f67d40..0618f2e27b4 100644 --- a/.github/workflows/doc-publish.yml +++ b/.github/workflows/doc-publish.yml @@ -1,5 +1,3 @@ -# Triggers after the documentation build has finished, -# taking the artifact and uploading it to netlify name: Publish documentation on: @@ -13,6 +11,20 @@ permissions: checks: write pull-requests: write + +# This workflow runs after doc-build workflow, taking the artifact +# (doc/livedoc) and deploying it to a netlify site. +# +# event (triggered doc-build) URL (of the doc deployed to NETLIFY_SITE) +# --------------------------- --------------------------------- +# on pull request https://doc-pr-12345--NETLIFY_SITE +# on push branch develop https://doc-develop--NETLIFY_SITE +# on push tag https://doc-10-4-beta2--NETLIFY_SITE +# +# where NETLIFY_SITE is presently sagemath.netlify.app for repo sagemath/sage. +# +# This workflow runs only if secrets NETLIFY_AUTH_TOKEN and NETLIFY_SITE_ID are set. + jobs: publish-doc: runs-on: ubuntu-latest @@ -54,8 +66,9 @@ jobs: NETLIFY_ALIAS: doc-${{ steps.source-run-info.outputs.pullRequestNumber && format('pr-{0}', steps.source-run-info.outputs.pullRequestNumber) || 'develop' }} if: steps.download-doc.outcome == 'success' - # Add deployment as status check, PR comment and annotation - # we could use the nwtgck/actions-netlify action for that, except for that it is not (yet) working in workflow_run context: https://github.com/nwtgck/actions-netlify/issues/545 + # Add deployment as status check, PR comment and annotation we could use + # the nwtgck/actions-netlify action for that, except for that it is not + # (yet) working in workflow_run context: https://github.com/nwtgck/actions-netlify/issues/545 - name: Add/Update deployment status PR comment uses: marocchino/sticky-pull-request-comment@v2 with: From 13740649671847210eaf912d8f3db025c84e1366 Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Mon, 24 Jun 2024 09:39:07 +0900 Subject: [PATCH 25/50] Fix random error by replacing rm by mv --- .github/workflows/doc-build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/doc-build.yml b/.github/workflows/doc-build.yml index ff0d20bdba2..2b75d84c97c 100644 --- a/.github/workflows/doc-build.yml +++ b/.github/workflows/doc-build.yml @@ -183,7 +183,8 @@ jobs: # Restore the new doc from changes by "wipe out" (cd doc && git checkout -f) # Sometimes rm -rf .git errors out because of some diehard hidden files - (cd doc && rm -rf .git 2>/dev/null && rm .gitattributes 2>/dev/null) + # So we simply move it out of the doc directory + (cd doc && mv .git ../git && mv .gitattributes ../gitattributes) mv CHANGES.html doc # Zip everything for increased performance zip -r doc.zip doc From 11ce8cc387fae71762e81185ac675cd154bb82f8 Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Mon, 24 Jun 2024 15:05:10 +0900 Subject: [PATCH 26/50] Deploy twice to have a way to refer to doc latest --- .github/workflows/doc-publish.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/doc-publish.yml b/.github/workflows/doc-publish.yml index 0618f2e27b4..d5eafc953e1 100644 --- a/.github/workflows/doc-publish.yml +++ b/.github/workflows/doc-publish.yml @@ -20,6 +20,7 @@ permissions: # on pull request https://doc-pr-12345--NETLIFY_SITE # on push branch develop https://doc-develop--NETLIFY_SITE # on push tag https://doc-10-4-beta2--NETLIFY_SITE +# on push tag https://doc-release--NETLIFY_SITE # # where NETLIFY_SITE is presently sagemath.netlify.app for repo sagemath/sage. # @@ -128,7 +129,7 @@ jobs: run: unzip livedoc.zip -d livedoc if: steps.download-doc.outcome == 'success' - - name: Deploy to Netlify + - name: Deploy to netlify with doc-TAG alias id: deploy-netlify uses: netlify/actions/cli@master with: @@ -140,6 +141,15 @@ jobs: NETLIFY_ALIAS: doc-${{ steps.source-run-info.outputs.targetBranch }} if: steps.download-doc.outcome == 'success' + - name: Deploy to netlify with doc-release alias + uses: netlify/actions/cli@master + with: + args: deploy --dir=livedoc/livedoc --message doc-release --alias doc-release + env: + NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} + NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} + if: steps.download-doc.outcome == 'success' + - name: Report deployment url run: | echo "::notice::The live documentation has been deployed - ${{ steps.deploy-netlify.outputs.NETLIFY_URL }}" From c2eb28c09e3f96ffdd24da833b859eac561c527e Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Tue, 25 Jun 2024 16:28:20 +0900 Subject: [PATCH 27/50] Fix broken changes.html --- .ci/create-changes-html.sh | 2 -- .github/workflows/doc-build.yml | 15 +++++++++------ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.ci/create-changes-html.sh b/.ci/create-changes-html.sh index d061c725a68..80335ea1613 100755 --- a/.ci/create-changes-html.sh +++ b/.ci/create-changes-html.sh @@ -8,8 +8,6 @@ fi BASE_DOC_COMMIT="$1" DOC_REPOSITORY="$2" -# Wipe out chronic diffs between old doc and new doc -(cd $DOC_REPOSITORY && find . -name "*.html" | xargs sed -i -e '\;; d') # Create CHANGES.html echo '' > CHANGES.html echo '' >> CHANGES.html diff --git a/.github/workflows/doc-build.yml b/.github/workflows/doc-build.yml index 2b75d84c97c..0e35de3ce09 100644 --- a/.github/workflows/doc-build.yml +++ b/.github/workflows/doc-build.yml @@ -150,7 +150,7 @@ jobs: git init && \ (echo "*.svg binary"; echo "*.pdf binary") >> .gitattributes && \ (echo ".buildinfo"; echo '*.inv'; echo '.git*'; echo '*.svg'; echo '*.pdf'; echo '*.png'; echo 'searchindex.js') > .gitignore; \ - git add -A && git commit --quiet -m "old") + git add -A && git commit --quiet -m 'old') - name: Build doc id: docbuild @@ -175,13 +175,16 @@ jobs: docker cp --follow-link BUILD:/sage/local/share/doc/sage/html doc docker cp --follow-link BUILD:/sage/local/share/doc/sage/index.html doc (cd doc && git commit -a -m 'new') - # Wipe out chronic diffs of new doc against old doc + # Wipe out chronic diffs of new doc against old doc before creating CHANGES.html (cd doc && \ find . -name "*.html" | xargs sed -i -e '/This is documentation for/ s/ built with GitHub PR .*. Doc/. Doc/' \ - -e '/;,\;; d' \ + && 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) # 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 990ac7d785b59bfb265ee45d65b07f205935749c Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Thu, 27 Jun 2024 17:24:49 +0900 Subject: [PATCH 28/50] Add version selector --- .github/workflows/doc-build.yml | 2 +- src/bin/sage-update-version | 20 +++++ src/doc/common/static/custom-furo.css | 43 ++++++++++- .../common/static/custom-jupyter-sphinx.css | 72 +++++++++--------- src/doc/common/static/jupyter-sphinx-furo.js | 73 +++++++++++++++++++ .../sidebar/version-selector.html | 3 + src/doc/versions.txt | 17 +++++ src/sage_docbuild/conf.py | 1 + 8 files changed, 191 insertions(+), 40 deletions(-) create mode 100644 src/doc/common/templates-furo/sidebar/version-selector.html create mode 100644 src/doc/versions.txt diff --git a/.github/workflows/doc-build.yml b/.github/workflows/doc-build.yml index 0e35de3ce09..3305fad3cc7 100644 --- a/.github/workflows/doc-build.yml +++ b/.github/workflows/doc-build.yml @@ -228,7 +228,7 @@ jobs: # We copy everything to a local folder docker cp --follow-link BUILD:/sage/local/share/doc/sage/html livedoc docker cp --follow-link BUILD:/sage/local/share/doc/sage/pdf livedoc - docker cp BUILD:/sage/local/share/doc/sage/index.html livedoc + docker cp --follow-link BUILD:/sage/local/share/doc/sage/index.html livedoc zip -r livedoc.zip livedoc - name: Upload live doc diff --git a/src/bin/sage-update-version b/src/bin/sage-update-version index c6680918a36..d4ae6ae3742 100755 --- a/src/bin/sage-update-version +++ b/src/bin/sage-update-version @@ -112,6 +112,25 @@ export SAGE_VERSION export SAGE_RELEASE_DATE envsubst <"$SAGE_ROOT/CITATION.cff.in" >"$SAGE_ROOT/CITATION.cff" +# Update src/doc/versions.txt file storing the URLs of the docs for the recent stable releases +if [[ $SAGE_VERSION =~ ^[0-9]+(\.[0-9]+)*$ ]]; then + file_path="$SAGE_ROOT/src/doc/versions.txt" + # Extract the most recent version line from versions.txt; the first line is a comment + line_number=$(grep -n '^[0-9]' "$file_path" | head -n 1 | cut -d: -f1) + version_line=$(sed -n "${line_number}p" "$file_path") + domain=${version_line#*--} + version=${SAGE_VERSION//./-} + # For the origin of this format, see .github/workflows/doc-publish.yml + url="doc-$version--$domain" + # Add new line to versions.txt + sed -i "${line_number}i $SAGE_VERSION $url" "$file_path" + # If the number of version lines is more than 10, remove the last line + line_count=$(grep -c '^[0-9]' "$file_path") + if [ "$line_count" -gt 10 ]; then + sed -i '$ d' "$file_path" + fi +fi + # Commit auto-generated changes git commit -m "Updated SageMath version to $SAGE_VERSION" -- \ "$SAGE_ROOT/VERSION.txt" \ @@ -124,6 +143,7 @@ git commit -m "Updated SageMath version to $SAGE_VERSION" -- \ "$SAGE_ROOT/build/pkgs/*/version_requirements.txt" \ "$SAGE_ROOT"/pkgs/*/VERSION.txt \ "$SAGE_ROOT/.upstream.d/20-github.com-sagemath-sage-releases" \ + "$SAGE_ROOT/src/doc/versions.txt" \ || die "Error committing to the repository." git tag -a "$SAGE_VERSION" -m "$SAGE_VERSION_BANNER" \ diff --git a/src/doc/common/static/custom-furo.css b/src/doc/common/static/custom-furo.css index ae75c2b6383..0aff44252cf 100644 --- a/src/doc/common/static/custom-furo.css +++ b/src/doc/common/static/custom-furo.css @@ -24,14 +24,51 @@ a.pdf:hover { /* Style for announcement banner */ .announcement { - background: orange; + background: orange; } .announcement-content { - color: black; + color: black; } .announcement-content a { + color: white; + text-decoration: none; +} + +/* Style for the floating versions menu */ + +.sidebar-drawer { + z-index: 100; +} + +#versions-menu { + position: fixed; + bottom: 10px; + right: 10px; + padding: 5px; + font-size: small; + opacity: 1; + background-color: white; + color: blue; +} + +body[data-theme="dark"] { + #versions-menu { + background-color: black; color: white; - text-decoration: none; + } +} + +@media (prefers-color-scheme: dark) { + body[data-theme="auto"] { /* the same styles with body[data-theme="dark"] */ + #versions-menu { + background-color: black; + color: white; + } + } +} + +#versions-menu:hover { + opacity: 1 } diff --git a/src/doc/common/static/custom-jupyter-sphinx.css b/src/doc/common/static/custom-jupyter-sphinx.css index 7e090b5e08d..482a2ddaed2 100644 --- a/src/doc/common/static/custom-jupyter-sphinx.css +++ b/src/doc/common/static/custom-jupyter-sphinx.css @@ -96,41 +96,41 @@ body[data-theme="dark"] { } @media (prefers-color-scheme: dark) { - body[data-theme="auto"] { /* the same styles with body[data-theme="dark"] */ - .jupyter_container { - color: white; - background-color: black; - } - - .jupyter_container .highlight { - background-color: black; - } - - .thebelab-button { - color: #d0d0d0; - background-color: #383838; - } - - .thebelab-button:active { - color: #368ce2; - } - - #thebelab-activate-button { - background-color: #383838; - } - - #thebelab-activate-button:active { - color: #368ce2; - } - - .thebelab-cell .jp-OutputArea-output { - color: white; - background-color: black; - } - - .thebelab-cell .jp-OutputArea-output pre { - color: white; - background-color: black; + body[data-theme="auto"] { /* the same styles with body[data-theme="dark"] */ + .jupyter_container { + color: white; + background-color: black; + } + + .jupyter_container .highlight { + background-color: black; + } + + .thebelab-button { + color: #d0d0d0; + background-color: #383838; + } + + .thebelab-button:active { + color: #368ce2; + } + + #thebelab-activate-button { + background-color: #383838; + } + + #thebelab-activate-button:active { + color: #368ce2; + } + + .thebelab-cell .jp-OutputArea-output { + color: white; + background-color: black; + } + + .thebelab-cell .jp-OutputArea-output pre { + color: white; + background-color: black; + } } - } } diff --git a/src/doc/common/static/jupyter-sphinx-furo.js b/src/doc/common/static/jupyter-sphinx-furo.js index a43a7c8b122..3869c20a4d7 100644 --- a/src/doc/common/static/jupyter-sphinx-furo.js +++ b/src/doc/common/static/jupyter-sphinx-furo.js @@ -58,6 +58,79 @@ const observer2 = new MutationObserver(callback); observer2.observe(document.getElementsByClassName("content")[0], { childList: true, subtree: true }); +// +// Version selector +// + +var versionMap = {}; + +async function fetchVersions() { + try { + let versions_file = "https://raw.githubusercontent.com/sagemath/sage/develop/src/doc/versions.txt" + let response = await fetch(versions_file); + if (!response.ok) { + throw new Error('Network response was not ok'); + } + let text = await response.text(); + let lines = text.split('\n'); + + // Parse the versions.txt file + lines.forEach(line => { + if (!line.startsWith('#')) { // Ignore the comment line + let [ver, url] = line.split(' '); + if (ver && url) { + if (!url.startsWith("https://")) { + url = "https://" + url; + } + versionMap[ver] = url; + } + } + }); + } catch (error) { + console.error("Failed to fetch versions.txt file:", error); + } + + if (Object.keys(versionMap).length > 0) { + // Populate the versions menu + let dropdown = document.getElementById("versions-menu"); + Object.keys(versionMap).forEach(ver => { + let option = document.createElement("option"); + option.value = ver; + option.text = ver; + dropdown.add(option); + }); + } else { + document.getElementById('versions-menu').style.display = 'none'; + } + + let urlParams = new URLSearchParams(window.location.search); + let version = urlParams.get("ver"); + // Check if the version exists in the map and redirect + if (version in versionMap) { + let targetUrl = versionMap[version]; + window.location.href = targetUrl + window.location.pathname; + } else { + console.error("Version not found in versions.txt."); + } +} + +fetchVersions() + +// Function to change the version based on versions menu selection +function changeVersion() { + let selectedVersion = document.getElementById("versions-menu").value; + if (selectedVersion) { + // Check if the version exists in the map and redirect + if (selectedVersion in versionMap) { + let targetUrl = versionMap[selectedVersion]; + window.location.href = targetUrl + window.location.pathname; + } else { + console.error("Version not found in versions.txt."); + } + } +} + + // Listen to the kernel status changes // https://thebe.readthedocs.io/en/stable/events.html thebelab.on("status", function (evt, data) { diff --git a/src/doc/common/templates-furo/sidebar/version-selector.html b/src/doc/common/templates-furo/sidebar/version-selector.html new file mode 100644 index 00000000000..3d79a0cf0e9 --- /dev/null +++ b/src/doc/common/templates-furo/sidebar/version-selector.html @@ -0,0 +1,3 @@ + diff --git a/src/doc/versions.txt b/src/doc/versions.txt new file mode 100644 index 00000000000..582199e6a85 --- /dev/null +++ b/src/doc/versions.txt @@ -0,0 +1,17 @@ +# This file is used by the version selector of the sage doc +# and updated by the script src/bin/sage-update-version +# run by the release manager to prepare a new release +# +# The first line is reserved for develop version +# The other lines are for recent stable releases (at most 10 lines) +# A line consists of the version and the URL to the doc +# +# The sage-update-version script adds a new line for a new stable release +# +# Do not edit manually +dev doc-release--sagemath.netlify.app +10.4 doc-10-4--sagemath.netlify.app +10.3 doc-10-3--sagemath.netlify.app +10.2 doc-10-2--sagemath.netlify.app +10.1 doc-10-1--sagemath.netlify.app +10.0 doc-10-0--sagemath.netlify.app diff --git a/src/sage_docbuild/conf.py b/src/sage_docbuild/conf.py index 9ff67bc9ca7..603314ff1b4 100644 --- a/src/sage_docbuild/conf.py +++ b/src/sage_docbuild/conf.py @@ -474,6 +474,7 @@ def linkcode_resolve(domain, info): "sidebar/scroll-start.html", "sidebar/brand.html", "sidebar/search.html", + "sidebar/version-selector.html", "sidebar/home.html", "sidebar/navigation.html", "sidebar/ethical-ads.html", From e06401afb535cf6e194dacc3a3232a41a7be3f93 Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Sun, 30 Jun 2024 11:52:00 +0900 Subject: [PATCH 29/50] Add current version at top --- src/doc/common/static/jupyter-sphinx-furo.js | 18 ++++++++++++++++++ .../sidebar/version-selector.html | 1 - 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/src/doc/common/static/jupyter-sphinx-furo.js b/src/doc/common/static/jupyter-sphinx-furo.js index 3869c20a4d7..a2b8342005c 100644 --- a/src/doc/common/static/jupyter-sphinx-furo.js +++ b/src/doc/common/static/jupyter-sphinx-furo.js @@ -74,6 +74,24 @@ async function fetchVersions() { let text = await response.text(); let lines = text.split('\n'); + let url = window.location.origin; + let start_index = url.indexOf('doc-') + 4; + let end_index = url.indexOf('--'); + let version_string = url.substring(start_index, end_index); + let current_version + + // Consult the comment in .github/workflows/doc-publish.yml + if (/^pr-\d+$/.test(version_string)) { + current_version = version_string.replace(/-/g, ' '); + } else if (version_string === 'release') { + current_version = 'latest'; + } else if (version_string === 'develop') { + current_version = 'develop'; + } else { + current_version = version_string.replace(/-/g, '.'); + } + versionMap[current_version] = url + // Parse the versions.txt file lines.forEach(line => { if (!line.startsWith('#')) { // Ignore the comment line diff --git a/src/doc/common/templates-furo/sidebar/version-selector.html b/src/doc/common/templates-furo/sidebar/version-selector.html index 3d79a0cf0e9..14d248a5d37 100644 --- a/src/doc/common/templates-furo/sidebar/version-selector.html +++ b/src/doc/common/templates-furo/sidebar/version-selector.html @@ -1,3 +1,2 @@ From 4d75b1b730e4cfd74d9099bf689231fd8d1720ac Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Mon, 1 Jul 2024 01:12:50 +0900 Subject: [PATCH 30/50] Add more old docs --- src/doc/versions.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/doc/versions.txt b/src/doc/versions.txt index 582199e6a85..b963bcbd4ca 100644 --- a/src/doc/versions.txt +++ b/src/doc/versions.txt @@ -15,3 +15,6 @@ dev doc-release--sagemath.netlify.app 10.2 doc-10-2--sagemath.netlify.app 10.1 doc-10-1--sagemath.netlify.app 10.0 doc-10-0--sagemath.netlify.app +9.8 doc-9-8--sagemath.netlify.app +9.7 doc-9-7--sagemath.netlify.app +9.6 doc-9-6--sagemath.netlify.app From 99de93fd6151ad6c2b8f10192703a79a33f566ff Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Mon, 1 Jul 2024 10:15:57 +0900 Subject: [PATCH 31/50] Fetch versions.txt from doc-release--sagemath.netlify.app --- src/doc/common/static/jupyter-sphinx-furo.js | 3 ++- src/sage_docbuild/builders.py | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/doc/common/static/jupyter-sphinx-furo.js b/src/doc/common/static/jupyter-sphinx-furo.js index a2b8342005c..671679aaee9 100644 --- a/src/doc/common/static/jupyter-sphinx-furo.js +++ b/src/doc/common/static/jupyter-sphinx-furo.js @@ -66,7 +66,8 @@ var versionMap = {}; async function fetchVersions() { try { - let versions_file = "https://raw.githubusercontent.com/sagemath/sage/develop/src/doc/versions.txt" + // For the origin of this site, see .github/workflows/doc-publish.yml + let versions_file = "https://doc-release--sagemath.netlify.app/versions.txt" let response = await fetch(versions_file); if (!response.ok) { throw new Error('Network response was not ok'); diff --git a/src/sage_docbuild/builders.py b/src/sage_docbuild/builders.py index 967616e2e28..23155df0112 100644 --- a/src/sage_docbuild/builders.py +++ b/src/sage_docbuild/builders.py @@ -455,6 +455,11 @@ def html(self): shutil.copy2(os.path.join(SAGE_DOC_SRC, self.lang, 'website', 'root_index.html'), root_index_file) + # The file versions.txt is used by src/doc/common/static/jupyter-sphinx-furo.js + # for doc version selector + from sage.env import SAGE_DOC + shutil.copy2(os.path.join(SAGE_DOC_SRC, 'versions.txt'), SAGE_DOC) + def pdf(self): """ Build the website hosting pdf docs. From c8339a83023fbd9f98d5a6f28051e5dfcce670b7 Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Mon, 1 Jul 2024 13:13:28 +0900 Subject: [PATCH 32/50] Store versions.txt in src/doc/en/website --- src/bin/sage-update-version | 4 ++-- src/doc/common/static/jupyter-sphinx-furo.js | 2 +- src/doc/{ => en/website}/versions.txt | 1 + src/sage_docbuild/builders.py | 15 +++++++-------- 4 files changed, 11 insertions(+), 11 deletions(-) rename src/doc/{ => en/website}/versions.txt (95%) diff --git a/src/bin/sage-update-version b/src/bin/sage-update-version index d4ae6ae3742..7d735c12e6c 100755 --- a/src/bin/sage-update-version +++ b/src/bin/sage-update-version @@ -114,7 +114,7 @@ envsubst <"$SAGE_ROOT/CITATION.cff.in" >"$SAGE_ROOT/CITATION.cff" # Update src/doc/versions.txt file storing the URLs of the docs for the recent stable releases if [[ $SAGE_VERSION =~ ^[0-9]+(\.[0-9]+)*$ ]]; then - file_path="$SAGE_ROOT/src/doc/versions.txt" + file_path="$SAGE_ROOT/src/doc/en/website/versions.txt" # Extract the most recent version line from versions.txt; the first line is a comment line_number=$(grep -n '^[0-9]' "$file_path" | head -n 1 | cut -d: -f1) version_line=$(sed -n "${line_number}p" "$file_path") @@ -143,7 +143,7 @@ git commit -m "Updated SageMath version to $SAGE_VERSION" -- \ "$SAGE_ROOT/build/pkgs/*/version_requirements.txt" \ "$SAGE_ROOT"/pkgs/*/VERSION.txt \ "$SAGE_ROOT/.upstream.d/20-github.com-sagemath-sage-releases" \ - "$SAGE_ROOT/src/doc/versions.txt" \ + "$SAGE_ROOT/src/doc/en/website/versions.txt" \ || die "Error committing to the repository." git tag -a "$SAGE_VERSION" -m "$SAGE_VERSION_BANNER" \ diff --git a/src/doc/common/static/jupyter-sphinx-furo.js b/src/doc/common/static/jupyter-sphinx-furo.js index 671679aaee9..f513ec8be8d 100644 --- a/src/doc/common/static/jupyter-sphinx-furo.js +++ b/src/doc/common/static/jupyter-sphinx-furo.js @@ -67,7 +67,7 @@ var versionMap = {}; async function fetchVersions() { try { // For the origin of this site, see .github/workflows/doc-publish.yml - let versions_file = "https://doc-release--sagemath.netlify.app/versions.txt" + let versions_file = "https://doc-release--sagemath.netlify.app/html/en/versions.txt" let response = await fetch(versions_file); if (!response.ok) { throw new Error('Network response was not ok'); diff --git a/src/doc/versions.txt b/src/doc/en/website/versions.txt similarity index 95% rename from src/doc/versions.txt rename to src/doc/en/website/versions.txt index b963bcbd4ca..68897d2ad99 100644 --- a/src/doc/versions.txt +++ b/src/doc/en/website/versions.txt @@ -10,6 +10,7 @@ # # Do not edit manually dev doc-release--sagemath.netlify.app +10.5 doc-10-5--sagemath.netlify.app 10.4 doc-10-4--sagemath.netlify.app 10.3 doc-10-3--sagemath.netlify.app 10.2 doc-10-2--sagemath.netlify.app diff --git a/src/sage_docbuild/builders.py b/src/sage_docbuild/builders.py index 23155df0112..871cc4705a2 100644 --- a/src/sage_docbuild/builders.py +++ b/src/sage_docbuild/builders.py @@ -442,6 +442,11 @@ def html(self): """ super().html() html_output_dir = self._output_dir('html') + + # This file is used by src/doc/common/static/jupyter-sphinx-furo.js + # for doc version selector + shutil.copy2(os.path.join(self.dir, 'versions.txt'), html_output_dir) + for f in os.listdir(html_output_dir): src = os.path.join(html_output_dir, f) dst = os.path.join(html_output_dir, '..', f) @@ -451,14 +456,8 @@ def html(self): else: shutil.copy2(src, dst) - root_index_file = os.path.join(html_output_dir, '../../../index.html') - shutil.copy2(os.path.join(SAGE_DOC_SRC, self.lang, 'website', 'root_index.html'), - root_index_file) - - # The file versions.txt is used by src/doc/common/static/jupyter-sphinx-furo.js - # for doc version selector - from sage.env import SAGE_DOC - shutil.copy2(os.path.join(SAGE_DOC_SRC, 'versions.txt'), SAGE_DOC) + shutil.copy2(os.path.join(self.dir, 'root_index.html'), + os.path.join(html_output_dir, '../../../index.html')) def pdf(self): """ From a14b215bf399bda45cafac702f07ffefc8aace86 Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Mon, 1 Jul 2024 13:31:04 +0900 Subject: [PATCH 33/50] Initially do not display selector --- src/doc/common/static/custom-furo.css | 1 + src/doc/common/static/jupyter-sphinx-furo.js | 9 +++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/doc/common/static/custom-furo.css b/src/doc/common/static/custom-furo.css index 0aff44252cf..3ec5578be00 100644 --- a/src/doc/common/static/custom-furo.css +++ b/src/doc/common/static/custom-furo.css @@ -43,6 +43,7 @@ a.pdf:hover { } #versions-menu { + display: none; position: fixed; bottom: 10px; right: 10px; diff --git a/src/doc/common/static/jupyter-sphinx-furo.js b/src/doc/common/static/jupyter-sphinx-furo.js index f513ec8be8d..194f396e6a0 100644 --- a/src/doc/common/static/jupyter-sphinx-furo.js +++ b/src/doc/common/static/jupyter-sphinx-furo.js @@ -109,17 +109,18 @@ async function fetchVersions() { console.error("Failed to fetch versions.txt file:", error); } + let menu = document.getElementById("versions-menu"); + if (Object.keys(versionMap).length > 0) { - // Populate the versions menu - let dropdown = document.getElementById("versions-menu"); Object.keys(versionMap).forEach(ver => { let option = document.createElement("option"); option.value = ver; option.text = ver; - dropdown.add(option); + menu.add(option); }); + menu.style.display = 'block'; } else { - document.getElementById('versions-menu').style.display = 'none'; + menu.style.display = 'none'; } let urlParams = new URLSearchParams(window.location.search); From 0ef948c269570cc87832da6ca2c140835dc53961 Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Mon, 1 Jul 2024 15:02:49 +0900 Subject: [PATCH 34/50] Small fix --- src/doc/common/static/jupyter-sphinx-furo.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/doc/common/static/jupyter-sphinx-furo.js b/src/doc/common/static/jupyter-sphinx-furo.js index 194f396e6a0..3c55ce9e631 100644 --- a/src/doc/common/static/jupyter-sphinx-furo.js +++ b/src/doc/common/static/jupyter-sphinx-furo.js @@ -67,7 +67,7 @@ var versionMap = {}; async function fetchVersions() { try { // For the origin of this site, see .github/workflows/doc-publish.yml - let versions_file = "https://doc-release--sagemath.netlify.app/html/en/versions.txt" + let versions_file = "https://doc-release--sagemath.netlify.app/html/en/versions.txt"; let response = await fetch(versions_file); if (!response.ok) { throw new Error('Network response was not ok'); From 2350f16254ca4509f2a213caa90f557d05e6adcc Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Mon, 1 Jul 2024 16:57:06 +0900 Subject: [PATCH 35/50] Add _headers file to avoid CORS problem --- .github/workflows/doc-publish.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/doc-publish.yml b/.github/workflows/doc-publish.yml index d5eafc953e1..5454519a6fb 100644 --- a/.github/workflows/doc-publish.yml +++ b/.github/workflows/doc-publish.yml @@ -129,6 +129,16 @@ jobs: run: unzip livedoc.zip -d livedoc if: steps.download-doc.outcome == 'success' + - name: Create _headers file for permissive CORS + run: | + cat < livedoc/livedoc/_headers + /* + Access-Control-Allow-Origin: * + Access-Control-Allow-Methods: GET + Access-Control-Allow-Headers: Content-Type + EOF + if: steps.download-doc.outcome == 'success' + - name: Deploy to netlify with doc-TAG alias id: deploy-netlify uses: netlify/actions/cli@master From 2f509c2da84d115ff56cf8d80591582e11a026b1 Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Mon, 1 Jul 2024 22:01:30 +0900 Subject: [PATCH 36/50] Improve style --- src/doc/common/static/custom-furo.css | 5 +-- src/doc/common/static/jupyter-sphinx-furo.js | 38 ++++++++++---------- 2 files changed, 21 insertions(+), 22 deletions(-) diff --git a/src/doc/common/static/custom-furo.css b/src/doc/common/static/custom-furo.css index 3ec5578be00..449b577fe18 100644 --- a/src/doc/common/static/custom-furo.css +++ b/src/doc/common/static/custom-furo.css @@ -43,7 +43,7 @@ a.pdf:hover { } #versions-menu { - display: none; + display: block; position: fixed; bottom: 10px; right: 10px; @@ -70,6 +70,3 @@ body[data-theme="dark"] { } } -#versions-menu:hover { - opacity: 1 -} diff --git a/src/doc/common/static/jupyter-sphinx-furo.js b/src/doc/common/static/jupyter-sphinx-furo.js index 3c55ce9e631..8834c1dd328 100644 --- a/src/doc/common/static/jupyter-sphinx-furo.js +++ b/src/doc/common/static/jupyter-sphinx-furo.js @@ -75,21 +75,26 @@ async function fetchVersions() { let text = await response.text(); let lines = text.split('\n'); - let url = window.location.origin; - let start_index = url.indexOf('doc-') + 4; - let end_index = url.indexOf('--'); - let version_string = url.substring(start_index, end_index); - let current_version - - // Consult the comment in .github/workflows/doc-publish.yml - if (/^pr-\d+$/.test(version_string)) { - current_version = version_string.replace(/-/g, ' '); - } else if (version_string === 'release') { - current_version = 'latest'; - } else if (version_string === 'develop') { - current_version = 'develop'; + if (window.location.protocol == 'file:') { + current_version = 'local' + url = window.location.href } else { - current_version = version_string.replace(/-/g, '.'); + let url = window.location.origin; + let start_index = url.indexOf('doc-') + 4; + let end_index = url.indexOf('--'); + let version_string = url.substring(start_index, end_index); + let current_version + + // Consult the comment in .github/workflows/doc-publish.yml + if (/^pr-\d+$/.test(version_string)) { + current_version = version_string.replace(/-/g, ' '); + } else if (version_string === 'release') { + current_version = 'latest'; + } else if (version_string === 'develop') { + current_version = 'develop'; + } else { + current_version = version_string.replace(/-/g, '.'); + } } versionMap[current_version] = url @@ -118,7 +123,6 @@ async function fetchVersions() { option.text = ver; menu.add(option); }); - menu.style.display = 'block'; } else { menu.style.display = 'none'; } @@ -126,11 +130,9 @@ async function fetchVersions() { let urlParams = new URLSearchParams(window.location.search); let version = urlParams.get("ver"); // Check if the version exists in the map and redirect - if (version in versionMap) { + if (version && version in versionMap) { let targetUrl = versionMap[version]; window.location.href = targetUrl + window.location.pathname; - } else { - console.error("Version not found in versions.txt."); } } From bb228b38bdfd01a4df6f61e3b15fd840aa796b8a Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Mon, 1 Jul 2024 22:21:29 +0900 Subject: [PATCH 37/50] Fix versions.txt --- src/doc/en/website/versions.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/src/doc/en/website/versions.txt b/src/doc/en/website/versions.txt index 68897d2ad99..b963bcbd4ca 100644 --- a/src/doc/en/website/versions.txt +++ b/src/doc/en/website/versions.txt @@ -10,7 +10,6 @@ # # Do not edit manually dev doc-release--sagemath.netlify.app -10.5 doc-10-5--sagemath.netlify.app 10.4 doc-10-4--sagemath.netlify.app 10.3 doc-10-3--sagemath.netlify.app 10.2 doc-10-2--sagemath.netlify.app From c3dc3c1db98f457b002075c1d6d7f8d24e1ea9c4 Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Mon, 1 Jul 2024 23:35:05 +0900 Subject: [PATCH 38/50] Fix errors --- src/doc/common/static/jupyter-sphinx-furo.js | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/doc/common/static/jupyter-sphinx-furo.js b/src/doc/common/static/jupyter-sphinx-furo.js index 8834c1dd328..b086a5c27ea 100644 --- a/src/doc/common/static/jupyter-sphinx-furo.js +++ b/src/doc/common/static/jupyter-sphinx-furo.js @@ -75,15 +75,16 @@ async function fetchVersions() { let text = await response.text(); let lines = text.split('\n'); + let url = window.location.origin; + let current_version + if (window.location.protocol == 'file:') { - current_version = 'local' - url = window.location.href + current_version = 'local'; + url = window.location.href; } else { - let url = window.location.origin; let start_index = url.indexOf('doc-') + 4; let end_index = url.indexOf('--'); let version_string = url.substring(start_index, end_index); - let current_version // Consult the comment in .github/workflows/doc-publish.yml if (/^pr-\d+$/.test(version_string)) { @@ -140,11 +141,11 @@ fetchVersions() // Function to change the version based on versions menu selection function changeVersion() { - let selectedVersion = document.getElementById("versions-menu").value; - if (selectedVersion) { + let selected_version = document.getElementById("versions-menu").value; + if (selected_version) { // Check if the version exists in the map and redirect - if (selectedVersion in versionMap) { - let targetUrl = versionMap[selectedVersion]; + if (selected_version in versionMap) { + let targetUrl = versionMap[selected_version]; window.location.href = targetUrl + window.location.pathname; } else { console.error("Version not found in versions.txt."); From 687c4f06ed1e79ad3787e585736f3662c859c4a1 Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Tue, 2 Jul 2024 16:52:09 +0900 Subject: [PATCH 39/50] Put version selector in the left sidebar --- src/doc/common/static/custom-furo.css | 27 ++++++++++++------- .../sidebar/version-selector.html | 5 ++-- src/sage_docbuild/conf.py | 6 ++--- 3 files changed, 24 insertions(+), 14 deletions(-) diff --git a/src/doc/common/static/custom-furo.css b/src/doc/common/static/custom-furo.css index 449b577fe18..ba71d3d6b0f 100644 --- a/src/doc/common/static/custom-furo.css +++ b/src/doc/common/static/custom-furo.css @@ -43,21 +43,31 @@ a.pdf:hover { } #versions-menu { - display: block; - position: fixed; - bottom: 10px; - right: 10px; - padding: 5px; + display: inline-block; font-size: small; opacity: 1; - background-color: white; - color: blue; + border: none; + background-color: transparent; + color: var(--color-sidebar-link-text--top-level);; +} + +#versions-menu:focus { + outline: none; +} + +.select-wrapper { + display: block; + text-align: center; +} + +.select-wrapper::before { + content: "switch to"; + font-size: small; } body[data-theme="dark"] { #versions-menu { background-color: black; - color: white; } } @@ -65,7 +75,6 @@ body[data-theme="dark"] { body[data-theme="auto"] { /* the same styles with body[data-theme="dark"] */ #versions-menu { background-color: black; - color: white; } } } diff --git a/src/doc/common/templates-furo/sidebar/version-selector.html b/src/doc/common/templates-furo/sidebar/version-selector.html index 14d248a5d37..bd18e666d88 100644 --- a/src/doc/common/templates-furo/sidebar/version-selector.html +++ b/src/doc/common/templates-furo/sidebar/version-selector.html @@ -1,2 +1,3 @@ - +
+ +
diff --git a/src/sage_docbuild/conf.py b/src/sage_docbuild/conf.py index 603314ff1b4..fbea163ead3 100644 --- a/src/sage_docbuild/conf.py +++ b/src/sage_docbuild/conf.py @@ -473,8 +473,8 @@ def linkcode_resolve(domain, info): "**": [ "sidebar/scroll-start.html", "sidebar/brand.html", - "sidebar/search.html", "sidebar/version-selector.html", + "sidebar/search.html", "sidebar/home.html", "sidebar/navigation.html", "sidebar/ethical-ads.html", @@ -680,7 +680,7 @@ def add_page_context(app, pagename, templatename, context, doctree): path2 = os.path.join(SAGE_DOC, 'html', 'en') relpath = os.path.relpath(path2, path1) context['release'] = release - context['documentation_title'] = 'Sage {}'.format(release) + ' Documentation' + context['documentation_title'] = f'Version {release} Documentation ' context['documentation_root'] = os.path.join(relpath, 'index.html') if 'website' in path1: context['title'] = 'Documentation' @@ -689,7 +689,7 @@ def add_page_context(app, pagename, templatename, context, doctree): if 'reference' in path1 and not path1.endswith('reference'): path2 = os.path.join(SAGE_DOC, 'html', 'en', 'reference') relpath = os.path.relpath(path2, path1) - context['reference_title'] = 'Sage {}'.format(release) + ' Reference Manual' + context['reference_title'] = f'Version {release} Reference Manual' context['reference_root'] = os.path.join(relpath, 'index.html') context['refsub'] = True if pagename.startswith('sage/'): From 4087242d36ae300f9aae07c501e7231ead17fc1e Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Tue, 2 Jul 2024 18:38:03 +0900 Subject: [PATCH 40/50] Insert develop version on the fly --- src/bin/sage-update-version | 2 +- src/doc/common/static/jupyter-sphinx-furo.js | 4 ++++ src/doc/en/website/versions.txt | 9 +++------ 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/bin/sage-update-version b/src/bin/sage-update-version index 7d735c12e6c..179461a8340 100755 --- a/src/bin/sage-update-version +++ b/src/bin/sage-update-version @@ -115,7 +115,7 @@ envsubst <"$SAGE_ROOT/CITATION.cff.in" >"$SAGE_ROOT/CITATION.cff" # Update src/doc/versions.txt file storing the URLs of the docs for the recent stable releases if [[ $SAGE_VERSION =~ ^[0-9]+(\.[0-9]+)*$ ]]; then file_path="$SAGE_ROOT/src/doc/en/website/versions.txt" - # Extract the most recent version line from versions.txt; the first line is a comment + # Extract the most recent version line from versions.txt line_number=$(grep -n '^[0-9]' "$file_path" | head -n 1 | cut -d: -f1) version_line=$(sed -n "${line_number}p" "$file_path") domain=${version_line#*--} diff --git a/src/doc/common/static/jupyter-sphinx-furo.js b/src/doc/common/static/jupyter-sphinx-furo.js index b086a5c27ea..b95159d20bb 100644 --- a/src/doc/common/static/jupyter-sphinx-furo.js +++ b/src/doc/common/static/jupyter-sphinx-furo.js @@ -99,6 +99,10 @@ async function fetchVersions() { } versionMap[current_version] = url + if (current_version != 'develop') { + versionMap['develop'] = "https://doc-develop--sagemath.netlify.app"; + } + // Parse the versions.txt file lines.forEach(line => { if (!line.startsWith('#')) { // Ignore the comment line diff --git a/src/doc/en/website/versions.txt b/src/doc/en/website/versions.txt index b963bcbd4ca..12aed2b8cfe 100644 --- a/src/doc/en/website/versions.txt +++ b/src/doc/en/website/versions.txt @@ -1,15 +1,12 @@ -# This file is used by the version selector of the sage doc +# This file is used by the version selector of the Sage doc # and updated by the script src/bin/sage-update-version -# run by the release manager to prepare a new release # -# The first line is reserved for develop version -# The other lines are for recent stable releases (at most 10 lines) +# The lines are for recent stable releases (at most 10 lines) # A line consists of the version and the URL to the doc # # The sage-update-version script adds a new line for a new stable release +# when run by the Sage release manager to prepare a new release # -# Do not edit manually -dev doc-release--sagemath.netlify.app 10.4 doc-10-4--sagemath.netlify.app 10.3 doc-10-3--sagemath.netlify.app 10.2 doc-10-2--sagemath.netlify.app From 67729bef418587901c7e75d7f1596fc603699d16 Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Tue, 2 Jul 2024 22:31:46 +0900 Subject: [PATCH 41/50] Backing up --- src/doc/common/static/custom-furo.css | 5 - src/doc/common/static/jupyter-sphinx-furo.js | 111 ++++++------------ .../sidebar/version-selector.html | 5 +- 3 files changed, 37 insertions(+), 84 deletions(-) diff --git a/src/doc/common/static/custom-furo.css b/src/doc/common/static/custom-furo.css index ba71d3d6b0f..ae304d2a15d 100644 --- a/src/doc/common/static/custom-furo.css +++ b/src/doc/common/static/custom-furo.css @@ -60,11 +60,6 @@ a.pdf:hover { text-align: center; } -.select-wrapper::before { - content: "switch to"; - font-size: small; -} - body[data-theme="dark"] { #versions-menu { background-color: black; diff --git a/src/doc/common/static/jupyter-sphinx-furo.js b/src/doc/common/static/jupyter-sphinx-furo.js index b95159d20bb..6a700cc5cbf 100644 --- a/src/doc/common/static/jupyter-sphinx-furo.js +++ b/src/doc/common/static/jupyter-sphinx-furo.js @@ -62,97 +62,52 @@ observer2.observe(document.getElementsByClassName("content")[0], { childList: tr // Version selector // -var versionMap = {}; - -async function fetchVersions() { +function fetchVersions() { try { - // For the origin of this site, see .github/workflows/doc-publish.yml - let versions_file = "https://doc-release--sagemath.netlify.app/html/en/versions.txt"; - let response = await fetch(versions_file); - if (!response.ok) { - throw new Error('Network response was not ok'); - } - let text = await response.text(); - let lines = text.split('\n'); - - let url = window.location.origin; - let current_version - - if (window.location.protocol == 'file:') { - current_version = 'local'; - url = window.location.href; - } else { - let start_index = url.indexOf('doc-') + 4; - let end_index = url.indexOf('--'); - let version_string = url.substring(start_index, end_index); - - // Consult the comment in .github/workflows/doc-publish.yml - if (/^pr-\d+$/.test(version_string)) { - current_version = version_string.replace(/-/g, ' '); - } else if (version_string === 'release') { - current_version = 'latest'; - } else if (version_string === 'develop') { - current_version = 'develop'; - } else { - current_version = version_string.replace(/-/g, '.'); - } - } - versionMap[current_version] = url - - if (current_version != 'develop') { - versionMap['develop'] = "https://doc-develop--sagemath.netlify.app"; - } + let menu = document.getElementById('versions-menu'); - // Parse the versions.txt file - lines.forEach(line => { - if (!line.startsWith('#')) { // Ignore the comment line - let [ver, url] = line.split(' '); - if (ver && url) { - if (!url.startsWith("https://")) { - url = "https://" + url; - } - versionMap[ver] = url; + // For the origin of the this site, see .github/workflows/doc-publish.yml + fetch('https://doc-release--sagemath-test.netlify.app/html/en/versions.txt') + .then(response => { + if (!response.ok) { + throw new Error('Network response was not ok ' + response.statusText); } - } - }); + return response.text(); + }) + .then(text => { + const lines = text.split('\n'); + lines.forEach(line => { + if (!line.startsWith('#')) { // Ignore the comment line + let [ver, url] = line.split(' '); + if (ver && url) { + if (!url.startsWith('https://')) { + url = 'https://' + url; + } + let option = document.createElement('option'); + option.value = url; + option.text = ver; + menu.add(option); + } + } + }); + }); } catch (error) { console.error("Failed to fetch versions.txt file:", error); } - - let menu = document.getElementById("versions-menu"); - - if (Object.keys(versionMap).length > 0) { - Object.keys(versionMap).forEach(ver => { - let option = document.createElement("option"); - option.value = ver; - option.text = ver; - menu.add(option); - }); - } else { - menu.style.display = 'none'; - } - - let urlParams = new URLSearchParams(window.location.search); - let version = urlParams.get("ver"); - // Check if the version exists in the map and redirect - if (version && version in versionMap) { - let targetUrl = versionMap[version]; - window.location.href = targetUrl + window.location.pathname; - } } fetchVersions() // Function to change the version based on versions menu selection function changeVersion() { - let selected_version = document.getElementById("versions-menu").value; - if (selected_version) { - // Check if the version exists in the map and redirect - if (selected_version in versionMap) { - let targetUrl = versionMap[selected_version]; - window.location.href = targetUrl + window.location.pathname; + let select_element = document.getElementById("versions-menu"); + let selected_ver = select_element.options[select_element.selectedIndex].text; + let selected_url = select_element.value; + if (selected_url) { + if (window.location.protocol == 'file:') { + window.location.href = selected_url + 'html/en/index.html'; } else { - console.error("Version not found in versions.txt."); + window.location.href = selected_url + window.location.pathname; } } } diff --git a/src/doc/common/templates-furo/sidebar/version-selector.html b/src/doc/common/templates-furo/sidebar/version-selector.html index bd18e666d88..6807b131dcf 100644 --- a/src/doc/common/templates-furo/sidebar/version-selector.html +++ b/src/doc/common/templates-furo/sidebar/version-selector.html @@ -1,3 +1,6 @@
- +
From 02fcfe401251b346e9a1dfa014a323e530cfb1a1 Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Tue, 2 Jul 2024 23:39:34 +0900 Subject: [PATCH 42/50] Fix css --- src/doc/common/static/custom-furo.css | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/doc/common/static/custom-furo.css b/src/doc/common/static/custom-furo.css index ae304d2a15d..85d2a0776cf 100644 --- a/src/doc/common/static/custom-furo.css +++ b/src/doc/common/static/custom-furo.css @@ -42,6 +42,11 @@ a.pdf:hover { z-index: 100; } +.select-wrapper { + display: block; + text-align: center; +} + #versions-menu { display: inline-block; font-size: small; @@ -55,21 +60,16 @@ a.pdf:hover { outline: none; } -.select-wrapper { - display: block; - text-align: center; -} - body[data-theme="dark"] { #versions-menu { - background-color: black; + background-color: transparent; } } @media (prefers-color-scheme: dark) { body[data-theme="auto"] { /* the same styles with body[data-theme="dark"] */ #versions-menu { - background-color: black; + background-color: transparent; } } } From e9d58da9f5ad5214f8c311a3eccc99b3788c3594 Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Tue, 2 Jul 2024 23:48:43 +0900 Subject: [PATCH 43/50] Fix doc-release url --- src/doc/common/static/jupyter-sphinx-furo.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/doc/common/static/jupyter-sphinx-furo.js b/src/doc/common/static/jupyter-sphinx-furo.js index 6a700cc5cbf..95a568dacbb 100644 --- a/src/doc/common/static/jupyter-sphinx-furo.js +++ b/src/doc/common/static/jupyter-sphinx-furo.js @@ -67,7 +67,7 @@ function fetchVersions() { let menu = document.getElementById('versions-menu'); // For the origin of the this site, see .github/workflows/doc-publish.yml - fetch('https://doc-release--sagemath-test.netlify.app/html/en/versions.txt') + fetch('https://doc-release--sagemath.netlify.app/html/en/versions.txt') .then(response => { if (!response.ok) { throw new Error('Network response was not ok ' + response.statusText); From e01bc4e55da3c6c50d38d9be16d05cc57b69a40b Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Wed, 3 Jul 2024 00:21:21 +0900 Subject: [PATCH 44/50] Squeeze fetch-related error --- src/doc/common/static/jupyter-sphinx-furo.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/doc/common/static/jupyter-sphinx-furo.js b/src/doc/common/static/jupyter-sphinx-furo.js index 95a568dacbb..a11aa04f8a3 100644 --- a/src/doc/common/static/jupyter-sphinx-furo.js +++ b/src/doc/common/static/jupyter-sphinx-furo.js @@ -90,9 +90,12 @@ function fetchVersions() { } } }); + }) + .catch(error => { + console.log('Failed to fetch versions.txt file.'); }); } catch (error) { - console.error("Failed to fetch versions.txt file:", error); + console.log('Failed to fetch versions.txt file.'); } } From ed0c21ebdbc28968de2b2631c29c81fc623c87ad Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Wed, 3 Jul 2024 08:26:15 +0900 Subject: [PATCH 45/50] Improve version selector for local doc --- src/doc/common/static/jupyter-sphinx-furo.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/doc/common/static/jupyter-sphinx-furo.js b/src/doc/common/static/jupyter-sphinx-furo.js index a11aa04f8a3..b63de354db8 100644 --- a/src/doc/common/static/jupyter-sphinx-furo.js +++ b/src/doc/common/static/jupyter-sphinx-furo.js @@ -108,7 +108,14 @@ function changeVersion() { let selected_url = select_element.value; if (selected_url) { if (window.location.protocol == 'file:') { - window.location.href = selected_url + 'html/en/index.html'; + let pathname = window.location.pathname; + let cutoff_point = pathname.indexOf('doc/sage'); + if (cutoff_point !== -1) { + pathname = pathname.substring(cutoff_point + 8); + window.location.href = selected_url + pathname; + } else { + window.location.href = selected_url + 'html/en/index.html'; + } } else { window.location.href = selected_url + window.location.pathname; } From a9decf4a57a11c723e38ce0dd8cdc28485fac98d Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Wed, 3 Jul 2024 10:35:18 +0900 Subject: [PATCH 46/50] Announcement banner also for PRs over stable release --- .github/workflows/doc-build.yml | 88 ++++++++++++++++++++------------- src/sage_docbuild/conf.py | 35 ++++++------- 2 files changed, 72 insertions(+), 51 deletions(-) diff --git a/.github/workflows/doc-build.yml b/.github/workflows/doc-build.yml index 3305fad3cc7..8f749fed029 100644 --- a/.github/workflows/doc-build.yml +++ b/.github/workflows/doc-build.yml @@ -132,25 +132,35 @@ jobs: git config --global --add safe.directory $(pwd) git config --global user.email "ci-sage@example.com" git config --global user.name "Build documentation workflow" - # mathjax path in old doc (regex) - mathjax_path_from="[-./A-Za-z_]*/tex-chtml[.]js?v=[0-9a-f]*" - # mathjax path in new doc - mathjax_path_to=$(docker exec -e SAGE_USE_CDNS=yes BUILD /sage/sage -python -c "from sage_docbuild.conf import mathjax_path; print(mathjax_path)") - new_version=$(docker exec BUILD cat src/VERSION.txt) - mkdir -p doc/ - docker cp BUILD:/sage/local/share/doc/sage/html doc/ - # Wipe out chronic diffs between old doc and new doc - (cd doc && \ - find . -name "*.html" | xargs sed -i -e '/class="sidebar-brand-text"/ s/Sage [0-9a-z.]* /Sage '"$new_version"' /' \ - -e '/;,\;; d') - # Create git repo from old doc - (cd doc && \ - git init && \ - (echo "*.svg binary"; echo "*.pdf binary") >> .gitattributes && \ - (echo ".buildinfo"; echo '*.inv'; echo '.git*'; echo '*.svg'; echo '*.pdf'; echo '*.png'; echo 'searchindex.js') > .gitignore; \ - git add -A && git commit --quiet -m 'old') + # Check if we are on PR + PR_NUMBER="" + if [[ -n "$GITHUB_REF" ]]; then + if [[ "$GITHUB_REF" =~ refs/pull/([0-9]+)/merge ]]; then + PR_NUMBER="${BASH_REMATCH[1]}" + fi + fi + # If so, then prepare to create CHANGES.html + if [[ -n "$PR_NUMBER" ]]; then + # mathjax path in old doc (regex) + mathjax_path_from="[-./A-Za-z_]*/tex-chtml[.]js?v=[0-9a-f]*" + # mathjax path in new doc + mathjax_path_to=$(docker exec -e SAGE_USE_CDNS=yes BUILD /sage/sage -python -c "from sage_docbuild.conf import mathjax_path; print(mathjax_path)") + new_version=$(docker exec BUILD cat src/VERSION.txt) + mkdir -p doc/ + docker cp BUILD:/sage/local/share/doc/sage/html doc/ + # Wipe out chronic diffs between old doc and new doc + (cd doc && \ + find . -name "*.html" | xargs sed -i -e '/class="sidebar-brand-text"/ s/Sage [0-9a-z.]* /Sage '"$new_version"' /' \ + -e '/;,\;; d') + # Create git repo from old doc + (cd doc && \ + git init && \ + (echo "*.svg binary"; echo "*.pdf binary") >> .gitattributes && \ + (echo ".buildinfo"; echo '*.inv'; echo '.git*'; echo '*.svg'; echo '*.pdf'; echo '*.png'; echo 'searchindex.js') > .gitignore; \ + git add -A && git commit --quiet -m 'old') + fi - name: Build doc id: docbuild @@ -174,21 +184,31 @@ jobs: # We copy everything to a local folder docker cp --follow-link BUILD:/sage/local/share/doc/sage/html doc docker cp --follow-link BUILD:/sage/local/share/doc/sage/index.html doc - (cd doc && git commit -a -m 'new') - # Wipe out chronic diffs of new doc against old doc before creating CHANGES.html - (cd doc && \ - find . -name "*.html" | xargs sed -i -e '/This is documentation for/ s/ built with GitHub PR .*. Doc/. Doc/' \ - -e '/;,\;; d' \ - && 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) - # 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) - mv CHANGES.html doc + # Check if we are on PR + PR_NUMBER="" + if [[ -n "$GITHUB_REF" ]]; then + if [[ "$GITHUB_REF" =~ refs/pull/([0-9]+)/merge ]]; then + PR_NUMBER="${BASH_REMATCH[1]}" + fi + fi + # If so, then create CHANGES.html + if [[ -n "$PR_NUMBER" ]]; then + (cd doc && git commit -a -m 'new') + # Wipe out chronic diffs of new doc against old doc before creating CHANGES.html + (cd doc && \ + find . -name "*.html" | xargs sed -i -e '/This is documentation of/ s/ built with GitHub PR .* for development/ for development/' \ + -e '/;,\;; d' \ + && 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) + # 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) + mv CHANGES.html doc + fi # Zip everything for increased performance zip -r doc.zip doc diff --git a/src/sage_docbuild/conf.py b/src/sage_docbuild/conf.py index fbea163ead3..567140880a5 100644 --- a/src/sage_docbuild/conf.py +++ b/src/sage_docbuild/conf.py @@ -441,26 +441,27 @@ def linkcode_resolve(domain, info): # "source_directory" is defined in conf.py customized for the doc } -if not version.split('.')[-1].isnumeric(): # develop version +# Check the condition for announcement banner +github_ref = os.environ.get('GITHUB_REF', '') +if github_ref: + match = re.search(r'refs/pull/(\d+)/merge', github_ref) + if match: + pr_number = match.group(1) +is_develop_version = not version.split('.')[-1].isnumeric() +is_for_github_pr = github_ref and match and pr_number + +if is_develop_version or is_for_github_pr: # condition for announcement banner # This URL is hardcoded in the file .github/workflows/doc-publish.yml. # See NETLIFY_ALIAS of the "Deploy to Netlify" step. ver = f'{version}' - github_ref = os.environ.get('GITHUB_REF', '') - if github_ref: - match = re.search(r'refs/pull/(\d+)/merge', github_ref) - if match: - # As this doc is built for a GitHub PR, we plant links - # to the PR in the announcement banner. - pr_number = match.group(1) - pr_url = f'https://github.com/sagemath/sage/pull/{pr_number}' - pr_sha = os.environ.get('PR_SHA', '') - pr_commit = pr_url + f'/commits/{pr_sha}' - ver += f' built with GitHub PR #{pr_number}' \ - f' on {pr_sha[:7]}' \ - f' [changes]' - banner = f'This is documentation for Sage development version {ver}. ' \ - 'Documentation for the latest stable version is ' \ - 'here.' + if is_for_github_pr: + pr_url = f'https://github.com/sagemath/sage/pull/{pr_number}' + pr_sha = os.environ.get('PR_SHA', '') + pr_commit = pr_url + f'/commits/{pr_sha}' + ver += f' built with GitHub PR #{pr_number}' \ + f' on {pr_sha[:7]}' \ + f' [changes]' + banner = f'This is documentation of Sage version {ver} for development purpose.' html_theme_options.update({ "announcement": banner }) # The name of the Pygments (syntax highlighting) style to use. This From a51b5715642b0e98fcbbd52fe8882ed75e2d059f Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Wed, 3 Jul 2024 11:07:43 +0900 Subject: [PATCH 47/50] Change 'of' back to 'for' --- src/sage_docbuild/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage_docbuild/conf.py b/src/sage_docbuild/conf.py index 567140880a5..0273876b734 100644 --- a/src/sage_docbuild/conf.py +++ b/src/sage_docbuild/conf.py @@ -461,7 +461,7 @@ def linkcode_resolve(domain, info): ver += f' built with GitHub PR #{pr_number}' \ f' on {pr_sha[:7]}' \ f' [changes]' - banner = f'This is documentation of Sage version {ver} for development purpose.' + banner = f'This is documentation for Sage version {ver} for development purpose.' html_theme_options.update({ "announcement": banner }) # The name of the Pygments (syntax highlighting) style to use. This From 9b272c05c7ecc8698ed9ceb0259aead5b042e7b1 Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Wed, 3 Jul 2024 14:23:07 +0900 Subject: [PATCH 48/50] Provision for merge before 10.4 release --- src/doc/en/website/versions.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/src/doc/en/website/versions.txt b/src/doc/en/website/versions.txt index 12aed2b8cfe..0fcb63d686a 100644 --- a/src/doc/en/website/versions.txt +++ b/src/doc/en/website/versions.txt @@ -7,7 +7,6 @@ # The sage-update-version script adds a new line for a new stable release # when run by the Sage release manager to prepare a new release # -10.4 doc-10-4--sagemath.netlify.app 10.3 doc-10-3--sagemath.netlify.app 10.2 doc-10-2--sagemath.netlify.app 10.1 doc-10-1--sagemath.netlify.app From 30638a1c93b4fc2697b744879e0846533578f279 Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Fri, 5 Jul 2024 17:17:02 +0900 Subject: [PATCH 49/50] Delete a spurious space --- src/sage_docbuild/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage_docbuild/conf.py b/src/sage_docbuild/conf.py index 0273876b734..50d56ccfd05 100644 --- a/src/sage_docbuild/conf.py +++ b/src/sage_docbuild/conf.py @@ -681,7 +681,7 @@ def add_page_context(app, pagename, templatename, context, doctree): path2 = os.path.join(SAGE_DOC, 'html', 'en') relpath = os.path.relpath(path2, path1) context['release'] = release - context['documentation_title'] = f'Version {release} Documentation ' + context['documentation_title'] = f'Version {release} Documentation' context['documentation_root'] = os.path.join(relpath, 'index.html') if 'website' in path1: context['title'] = 'Documentation' From 2e5cb464381cd7c90d469eff0cdf9b6c7a1d7827 Mon Sep 17 00:00:00 2001 From: Release Manager Date: Fri, 12 Jul 2024 23:49:01 +0200 Subject: [PATCH 50/50] Updated SageMath version to 10.4.rc3 --- CITATION.cff | 4 ++-- VERSION.txt | 2 +- build/pkgs/configure/checksums.ini | 4 ++-- build/pkgs/configure/package-version.txt | 2 +- build/pkgs/sage_conf/version_requirements.txt | 2 +- build/pkgs/sage_docbuild/version_requirements.txt | 2 +- build/pkgs/sage_setup/version_requirements.txt | 2 +- build/pkgs/sage_sws2rst/version_requirements.txt | 2 +- build/pkgs/sagelib/version_requirements.txt | 2 +- build/pkgs/sagemath_bliss/version_requirements.txt | 2 +- build/pkgs/sagemath_categories/version_requirements.txt | 2 +- build/pkgs/sagemath_coxeter3/version_requirements.txt | 2 +- build/pkgs/sagemath_environment/version_requirements.txt | 2 +- build/pkgs/sagemath_mcqd/version_requirements.txt | 2 +- build/pkgs/sagemath_meataxe/version_requirements.txt | 2 +- build/pkgs/sagemath_objects/version_requirements.txt | 2 +- build/pkgs/sagemath_repl/version_requirements.txt | 2 +- build/pkgs/sagemath_sirocco/version_requirements.txt | 2 +- build/pkgs/sagemath_tdlib/version_requirements.txt | 2 +- pkgs/sage-conf/VERSION.txt | 2 +- pkgs/sage-conf_conda/VERSION.txt | 2 +- pkgs/sage-conf_pypi/VERSION.txt | 2 +- pkgs/sage-docbuild/VERSION.txt | 2 +- pkgs/sage-setup/VERSION.txt | 2 +- pkgs/sage-sws2rst/VERSION.txt | 2 +- pkgs/sagemath-bliss/VERSION.txt | 2 +- pkgs/sagemath-categories/VERSION.txt | 2 +- pkgs/sagemath-coxeter3/VERSION.txt | 2 +- pkgs/sagemath-environment/VERSION.txt | 2 +- pkgs/sagemath-mcqd/VERSION.txt | 2 +- pkgs/sagemath-meataxe/VERSION.txt | 2 +- pkgs/sagemath-objects/VERSION.txt | 2 +- pkgs/sagemath-repl/VERSION.txt | 2 +- pkgs/sagemath-sirocco/VERSION.txt | 2 +- pkgs/sagemath-tdlib/VERSION.txt | 2 +- src/VERSION.txt | 2 +- src/bin/sage-version.sh | 6 +++--- src/sage/version.py | 6 +++--- 38 files changed, 44 insertions(+), 44 deletions(-) diff --git a/CITATION.cff b/CITATION.cff index 0e9afaef5be..b53541cf32c 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -4,8 +4,8 @@ title: SageMath abstract: SageMath is a free open-source mathematics software system. authors: - name: "The SageMath Developers" -version: 10.4.rc2 +version: 10.4.rc3 doi: 10.5281/zenodo.8042260 -date-released: 2024-07-04 +date-released: 2024-07-12 repository-code: "https://github.com/sagemath/sage" url: "https://www.sagemath.org/" diff --git a/VERSION.txt b/VERSION.txt index 7ac68647d4c..46f68464285 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -SageMath version 10.4.rc2, Release Date: 2024-07-04 +SageMath version 10.4.rc3, Release Date: 2024-07-12 diff --git a/build/pkgs/configure/checksums.ini b/build/pkgs/configure/checksums.ini index d442015a1d7..63e08ba92ce 100644 --- a/build/pkgs/configure/checksums.ini +++ b/build/pkgs/configure/checksums.ini @@ -1,3 +1,3 @@ tarball=configure-VERSION.tar.gz -sha1=2fe177f49970106f210c9afca8668efad5b985df -sha256=9c6d24b778a4c805c91e58263265dbd4214e1215c6e90246a10637c83500d552 +sha1=a78a0025292f4831f84dc059734320de0e66e216 +sha256=c108de2bfbbf3f2543ada5742d5bc9a58df700d8b6125df92b1888f867b60174 diff --git a/build/pkgs/configure/package-version.txt b/build/pkgs/configure/package-version.txt index 86c8787b2f7..bfc9d17635e 100644 --- a/build/pkgs/configure/package-version.txt +++ b/build/pkgs/configure/package-version.txt @@ -1 +1 @@ -3243fc5218a7fb9f29493ce1fd35e6aa120c8c86 +74119807d7989c879f2eee167e4e29af7c4f588a diff --git a/build/pkgs/sage_conf/version_requirements.txt b/build/pkgs/sage_conf/version_requirements.txt index dbcd1044c25..811eed8d523 100644 --- a/build/pkgs/sage_conf/version_requirements.txt +++ b/build/pkgs/sage_conf/version_requirements.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sage-conf ~= 10.4rc2 +sage-conf ~= 10.4rc3 diff --git a/build/pkgs/sage_docbuild/version_requirements.txt b/build/pkgs/sage_docbuild/version_requirements.txt index d8c15101186..a18fb9a9ec3 100644 --- a/build/pkgs/sage_docbuild/version_requirements.txt +++ b/build/pkgs/sage_docbuild/version_requirements.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sage-docbuild ~= 10.4rc2 +sage-docbuild ~= 10.4rc3 diff --git a/build/pkgs/sage_setup/version_requirements.txt b/build/pkgs/sage_setup/version_requirements.txt index 82ad2cb4b6f..77676a0c3ad 100644 --- a/build/pkgs/sage_setup/version_requirements.txt +++ b/build/pkgs/sage_setup/version_requirements.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sage-setup ~= 10.4rc2 +sage-setup ~= 10.4rc3 diff --git a/build/pkgs/sage_sws2rst/version_requirements.txt b/build/pkgs/sage_sws2rst/version_requirements.txt index 4a46c21b6ef..59c6b8fc2aa 100644 --- a/build/pkgs/sage_sws2rst/version_requirements.txt +++ b/build/pkgs/sage_sws2rst/version_requirements.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sage-sws2rst ~= 10.4rc2 +sage-sws2rst ~= 10.4rc3 diff --git a/build/pkgs/sagelib/version_requirements.txt b/build/pkgs/sagelib/version_requirements.txt index bc61d4da915..dddfa7072d7 100644 --- a/build/pkgs/sagelib/version_requirements.txt +++ b/build/pkgs/sagelib/version_requirements.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sagemath-standard ~= 10.4rc2 +sagemath-standard ~= 10.4rc3 diff --git a/build/pkgs/sagemath_bliss/version_requirements.txt b/build/pkgs/sagemath_bliss/version_requirements.txt index c184449da9d..37543bcefd2 100644 --- a/build/pkgs/sagemath_bliss/version_requirements.txt +++ b/build/pkgs/sagemath_bliss/version_requirements.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sagemath-bliss ~= 10.4rc2 +sagemath-bliss ~= 10.4rc3 diff --git a/build/pkgs/sagemath_categories/version_requirements.txt b/build/pkgs/sagemath_categories/version_requirements.txt index a17593ff6ed..edf94bb961e 100644 --- a/build/pkgs/sagemath_categories/version_requirements.txt +++ b/build/pkgs/sagemath_categories/version_requirements.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sagemath-categories ~= 10.4rc2 +sagemath-categories ~= 10.4rc3 diff --git a/build/pkgs/sagemath_coxeter3/version_requirements.txt b/build/pkgs/sagemath_coxeter3/version_requirements.txt index 32b5f6dd880..cab69e16ea0 100644 --- a/build/pkgs/sagemath_coxeter3/version_requirements.txt +++ b/build/pkgs/sagemath_coxeter3/version_requirements.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sagemath-coxeter3 ~= 10.4rc2 +sagemath-coxeter3 ~= 10.4rc3 diff --git a/build/pkgs/sagemath_environment/version_requirements.txt b/build/pkgs/sagemath_environment/version_requirements.txt index 63587e89334..5ea8e57e814 100644 --- a/build/pkgs/sagemath_environment/version_requirements.txt +++ b/build/pkgs/sagemath_environment/version_requirements.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sagemath-environment ~= 10.4rc2 +sagemath-environment ~= 10.4rc3 diff --git a/build/pkgs/sagemath_mcqd/version_requirements.txt b/build/pkgs/sagemath_mcqd/version_requirements.txt index 47d2a87aa0c..0906cad2352 100644 --- a/build/pkgs/sagemath_mcqd/version_requirements.txt +++ b/build/pkgs/sagemath_mcqd/version_requirements.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sagemath-mcqd ~= 10.4rc2 +sagemath-mcqd ~= 10.4rc3 diff --git a/build/pkgs/sagemath_meataxe/version_requirements.txt b/build/pkgs/sagemath_meataxe/version_requirements.txt index 08236c2fa7d..5dec45287be 100644 --- a/build/pkgs/sagemath_meataxe/version_requirements.txt +++ b/build/pkgs/sagemath_meataxe/version_requirements.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sagemath-meataxe ~= 10.4rc2 +sagemath-meataxe ~= 10.4rc3 diff --git a/build/pkgs/sagemath_objects/version_requirements.txt b/build/pkgs/sagemath_objects/version_requirements.txt index d6483eabc32..1da6c05c483 100644 --- a/build/pkgs/sagemath_objects/version_requirements.txt +++ b/build/pkgs/sagemath_objects/version_requirements.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sagemath-objects ~= 10.4rc2 +sagemath-objects ~= 10.4rc3 diff --git a/build/pkgs/sagemath_repl/version_requirements.txt b/build/pkgs/sagemath_repl/version_requirements.txt index 2136ac318b4..d8025f97bc3 100644 --- a/build/pkgs/sagemath_repl/version_requirements.txt +++ b/build/pkgs/sagemath_repl/version_requirements.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sagemath-repl ~= 10.4rc2 +sagemath-repl ~= 10.4rc3 diff --git a/build/pkgs/sagemath_sirocco/version_requirements.txt b/build/pkgs/sagemath_sirocco/version_requirements.txt index ed80111041b..a8e234444b3 100644 --- a/build/pkgs/sagemath_sirocco/version_requirements.txt +++ b/build/pkgs/sagemath_sirocco/version_requirements.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sagemath-sirocco ~= 10.4rc2 +sagemath-sirocco ~= 10.4rc3 diff --git a/build/pkgs/sagemath_tdlib/version_requirements.txt b/build/pkgs/sagemath_tdlib/version_requirements.txt index ce27e4543de..3dcfc30b890 100644 --- a/build/pkgs/sagemath_tdlib/version_requirements.txt +++ b/build/pkgs/sagemath_tdlib/version_requirements.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sagemath-tdlib ~= 10.4rc2 +sagemath-tdlib ~= 10.4rc3 diff --git a/pkgs/sage-conf/VERSION.txt b/pkgs/sage-conf/VERSION.txt index ab2b6c0366e..7090b0bec63 100644 --- a/pkgs/sage-conf/VERSION.txt +++ b/pkgs/sage-conf/VERSION.txt @@ -1 +1 @@ -10.4.rc2 +10.4.rc3 diff --git a/pkgs/sage-conf_conda/VERSION.txt b/pkgs/sage-conf_conda/VERSION.txt index ab2b6c0366e..7090b0bec63 100644 --- a/pkgs/sage-conf_conda/VERSION.txt +++ b/pkgs/sage-conf_conda/VERSION.txt @@ -1 +1 @@ -10.4.rc2 +10.4.rc3 diff --git a/pkgs/sage-conf_pypi/VERSION.txt b/pkgs/sage-conf_pypi/VERSION.txt index ab2b6c0366e..7090b0bec63 100644 --- a/pkgs/sage-conf_pypi/VERSION.txt +++ b/pkgs/sage-conf_pypi/VERSION.txt @@ -1 +1 @@ -10.4.rc2 +10.4.rc3 diff --git a/pkgs/sage-docbuild/VERSION.txt b/pkgs/sage-docbuild/VERSION.txt index ab2b6c0366e..7090b0bec63 100644 --- a/pkgs/sage-docbuild/VERSION.txt +++ b/pkgs/sage-docbuild/VERSION.txt @@ -1 +1 @@ -10.4.rc2 +10.4.rc3 diff --git a/pkgs/sage-setup/VERSION.txt b/pkgs/sage-setup/VERSION.txt index ab2b6c0366e..7090b0bec63 100644 --- a/pkgs/sage-setup/VERSION.txt +++ b/pkgs/sage-setup/VERSION.txt @@ -1 +1 @@ -10.4.rc2 +10.4.rc3 diff --git a/pkgs/sage-sws2rst/VERSION.txt b/pkgs/sage-sws2rst/VERSION.txt index ab2b6c0366e..7090b0bec63 100644 --- a/pkgs/sage-sws2rst/VERSION.txt +++ b/pkgs/sage-sws2rst/VERSION.txt @@ -1 +1 @@ -10.4.rc2 +10.4.rc3 diff --git a/pkgs/sagemath-bliss/VERSION.txt b/pkgs/sagemath-bliss/VERSION.txt index ab2b6c0366e..7090b0bec63 100644 --- a/pkgs/sagemath-bliss/VERSION.txt +++ b/pkgs/sagemath-bliss/VERSION.txt @@ -1 +1 @@ -10.4.rc2 +10.4.rc3 diff --git a/pkgs/sagemath-categories/VERSION.txt b/pkgs/sagemath-categories/VERSION.txt index ab2b6c0366e..7090b0bec63 100644 --- a/pkgs/sagemath-categories/VERSION.txt +++ b/pkgs/sagemath-categories/VERSION.txt @@ -1 +1 @@ -10.4.rc2 +10.4.rc3 diff --git a/pkgs/sagemath-coxeter3/VERSION.txt b/pkgs/sagemath-coxeter3/VERSION.txt index ab2b6c0366e..7090b0bec63 100644 --- a/pkgs/sagemath-coxeter3/VERSION.txt +++ b/pkgs/sagemath-coxeter3/VERSION.txt @@ -1 +1 @@ -10.4.rc2 +10.4.rc3 diff --git a/pkgs/sagemath-environment/VERSION.txt b/pkgs/sagemath-environment/VERSION.txt index ab2b6c0366e..7090b0bec63 100644 --- a/pkgs/sagemath-environment/VERSION.txt +++ b/pkgs/sagemath-environment/VERSION.txt @@ -1 +1 @@ -10.4.rc2 +10.4.rc3 diff --git a/pkgs/sagemath-mcqd/VERSION.txt b/pkgs/sagemath-mcqd/VERSION.txt index ab2b6c0366e..7090b0bec63 100644 --- a/pkgs/sagemath-mcqd/VERSION.txt +++ b/pkgs/sagemath-mcqd/VERSION.txt @@ -1 +1 @@ -10.4.rc2 +10.4.rc3 diff --git a/pkgs/sagemath-meataxe/VERSION.txt b/pkgs/sagemath-meataxe/VERSION.txt index ab2b6c0366e..7090b0bec63 100644 --- a/pkgs/sagemath-meataxe/VERSION.txt +++ b/pkgs/sagemath-meataxe/VERSION.txt @@ -1 +1 @@ -10.4.rc2 +10.4.rc3 diff --git a/pkgs/sagemath-objects/VERSION.txt b/pkgs/sagemath-objects/VERSION.txt index ab2b6c0366e..7090b0bec63 100644 --- a/pkgs/sagemath-objects/VERSION.txt +++ b/pkgs/sagemath-objects/VERSION.txt @@ -1 +1 @@ -10.4.rc2 +10.4.rc3 diff --git a/pkgs/sagemath-repl/VERSION.txt b/pkgs/sagemath-repl/VERSION.txt index ab2b6c0366e..7090b0bec63 100644 --- a/pkgs/sagemath-repl/VERSION.txt +++ b/pkgs/sagemath-repl/VERSION.txt @@ -1 +1 @@ -10.4.rc2 +10.4.rc3 diff --git a/pkgs/sagemath-sirocco/VERSION.txt b/pkgs/sagemath-sirocco/VERSION.txt index ab2b6c0366e..7090b0bec63 100644 --- a/pkgs/sagemath-sirocco/VERSION.txt +++ b/pkgs/sagemath-sirocco/VERSION.txt @@ -1 +1 @@ -10.4.rc2 +10.4.rc3 diff --git a/pkgs/sagemath-tdlib/VERSION.txt b/pkgs/sagemath-tdlib/VERSION.txt index ab2b6c0366e..7090b0bec63 100644 --- a/pkgs/sagemath-tdlib/VERSION.txt +++ b/pkgs/sagemath-tdlib/VERSION.txt @@ -1 +1 @@ -10.4.rc2 +10.4.rc3 diff --git a/src/VERSION.txt b/src/VERSION.txt index ab2b6c0366e..7090b0bec63 100644 --- a/src/VERSION.txt +++ b/src/VERSION.txt @@ -1 +1 @@ -10.4.rc2 +10.4.rc3 diff --git a/src/bin/sage-version.sh b/src/bin/sage-version.sh index 8797015b79e..05b25462bec 100644 --- a/src/bin/sage-version.sh +++ b/src/bin/sage-version.sh @@ -4,6 +4,6 @@ # which stops "setup.py develop" from rewriting it as a Python file. : # This file is auto-generated by the sage-update-version script, do not edit! -SAGE_VERSION='10.4.rc2' -SAGE_RELEASE_DATE='2024-07-04' -SAGE_VERSION_BANNER='SageMath version 10.4.rc2, Release Date: 2024-07-04' +SAGE_VERSION='10.4.rc3' +SAGE_RELEASE_DATE='2024-07-12' +SAGE_VERSION_BANNER='SageMath version 10.4.rc3, Release Date: 2024-07-12' diff --git a/src/sage/version.py b/src/sage/version.py index f41ec973843..fabda63c68e 100644 --- a/src/sage/version.py +++ b/src/sage/version.py @@ -1,5 +1,5 @@ # Sage version information for Python scripts # This file is auto-generated by the sage-update-version script, do not edit! -version = '10.4.rc2' -date = '2024-07-04' -banner = 'SageMath version 10.4.rc2, Release Date: 2024-07-04' +version = '10.4.rc3' +date = '2024-07-12' +banner = 'SageMath version 10.4.rc3, Release Date: 2024-07-12'