Skip to content

Commit

Permalink
Merge branch 'develop' into sage_numerical_backends_coin-10.4
Browse files Browse the repository at this point in the history
  • Loading branch information
kwankyu authored Jul 14, 2024
2 parents 15a1ae3 + 2e5cb46 commit 9ff0a10
Show file tree
Hide file tree
Showing 116 changed files with 433 additions and 355 deletions.
90 changes: 55 additions & 35 deletions .github/workflows/doc-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,25 +132,35 @@ jobs:
git config --global --add safe.directory $(pwd)
git config --global user.email "[email protected]"
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 '/<link rel="stylesheet"/ s/?v=[0-9a-f]*"/"/' \
-e 's;'"$mathjax_path_from"';'"$mathjax_path_to"';' \
-e '\;<script type="application/vnd\.jupyter\.widget-state+json">;,\;</script>; 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 '/<link rel="stylesheet"/ s/?v=[0-9a-f]*"/"/' \
-e 's;'"$mathjax_path_from"';'"$mathjax_path_to"';' \
-e '\;<script type="application/vnd\.jupyter\.widget-state+json">;,\;</script>; 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
Expand All @@ -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 '/<link rel="stylesheet"/ s/?v=[0-9a-f]*"/"/' \
-e '\;<script type="application/vnd\.jupyter\.widget-state+json">;,\;</script>; 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 '/<link rel="stylesheet"/ s/?v=[0-9a-f]*"/"/' \
-e '\;<script type="application/vnd\.jupyter\.widget-state+json">;,\;</script>; 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
Expand Down Expand Up @@ -228,7 +248,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
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/doc-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 <<EOF > 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
Expand Down
4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -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/"
2 changes: 1 addition & 1 deletion VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
SageMath version 10.4.rc2, Release Date: 2024-07-04
SageMath version 10.4.rc3, Release Date: 2024-07-12
8 changes: 4 additions & 4 deletions build/pkgs/asttokens/checksums.ini
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion build/pkgs/asttokens/dependencies
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
| $(PYTHON_TOOLCHAIN) $(PYTHON)
six | pip $(PYTHON)

----------
All lines of this file are ignored except the first.
2 changes: 0 additions & 2 deletions build/pkgs/asttokens/spkg-install.in

This file was deleted.

4 changes: 2 additions & 2 deletions build/pkgs/configure/checksums.ini
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
tarball=configure-VERSION.tar.gz
sha1=1451031f1325bb7d31929b92415ee25795ed7022
sha256=a5c2064d5c792d32bbfa6c97a72aab395764ed7882f9bcadb8f04ca34c42c6b4
sha1=a78a0025292f4831f84dc059734320de0e66e216
sha256=c108de2bfbbf3f2543ada5742d5bc9a58df700d8b6125df92b1888f867b60174
2 changes: 1 addition & 1 deletion build/pkgs/configure/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
812a1160c06c055f74f9fcc86a7678c5a7a8788c
74119807d7989c879f2eee167e4e29af7c4f588a
8 changes: 4 additions & 4 deletions build/pkgs/cppy/checksums.ini
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion build/pkgs/cppy/dependencies
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
| $(PYTHON_TOOLCHAIN) $(PYTHON)
| pip $(PYTHON)

----------
All lines of this file are ignored except the first.
1 change: 0 additions & 1 deletion build/pkgs/cppy/spkg-install.in

This file was deleted.

8 changes: 4 additions & 4 deletions build/pkgs/dateutil/checksums.ini
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion build/pkgs/dateutil/dependencies
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
six | $(PYTHON_TOOLCHAIN) $(PYTHON)
six | pip $(PYTHON)

----------
All lines of this file are ignored except the first.
2 changes: 1 addition & 1 deletion build/pkgs/dateutil/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.8.2
2.9.0.post0
3 changes: 0 additions & 3 deletions build/pkgs/dateutil/spkg-install.in

This file was deleted.

8 changes: 4 additions & 4 deletions build/pkgs/executing/checksums.ini
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion build/pkgs/executing/dependencies
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
| $(PYTHON_TOOLCHAIN) $(PYTHON)
| pip $(PYTHON)

----------
All lines of this file are ignored except the first.
2 changes: 1 addition & 1 deletion build/pkgs/executing/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.2.0
2.0.1
2 changes: 0 additions & 2 deletions build/pkgs/executing/spkg-install.in

This file was deleted.

18 changes: 0 additions & 18 deletions build/pkgs/hatch_fancy_pypi_readme/SPKG.rst

This file was deleted.

4 changes: 0 additions & 4 deletions build/pkgs/hatch_fancy_pypi_readme/checksums.ini

This file was deleted.

4 changes: 0 additions & 4 deletions build/pkgs/hatch_fancy_pypi_readme/dependencies

This file was deleted.

1 change: 0 additions & 1 deletion build/pkgs/hatch_fancy_pypi_readme/distros/alpine.txt

This file was deleted.

1 change: 0 additions & 1 deletion build/pkgs/hatch_fancy_pypi_readme/distros/arch.txt

This file was deleted.

1 change: 0 additions & 1 deletion build/pkgs/hatch_fancy_pypi_readme/distros/debian.txt

This file was deleted.

1 change: 0 additions & 1 deletion build/pkgs/hatch_fancy_pypi_readme/distros/fedora.txt

This file was deleted.

1 change: 0 additions & 1 deletion build/pkgs/hatch_fancy_pypi_readme/distros/freebsd.txt

This file was deleted.

1 change: 0 additions & 1 deletion build/pkgs/hatch_fancy_pypi_readme/distros/gentoo.txt

This file was deleted.

1 change: 0 additions & 1 deletion build/pkgs/hatch_fancy_pypi_readme/distros/macports.txt

This file was deleted.

1 change: 0 additions & 1 deletion build/pkgs/hatch_fancy_pypi_readme/distros/opensuse.txt

This file was deleted.

1 change: 0 additions & 1 deletion build/pkgs/hatch_fancy_pypi_readme/package-version.txt

This file was deleted.

3 changes: 0 additions & 3 deletions build/pkgs/hatch_fancy_pypi_readme/spkg-configure.m4

This file was deleted.

1 change: 0 additions & 1 deletion build/pkgs/hatch_fancy_pypi_readme/type

This file was deleted.

This file was deleted.

18 changes: 0 additions & 18 deletions build/pkgs/hatch_vcs/SPKG.rst

This file was deleted.

4 changes: 0 additions & 4 deletions build/pkgs/hatch_vcs/checksums.ini

This file was deleted.

4 changes: 0 additions & 4 deletions build/pkgs/hatch_vcs/dependencies

This file was deleted.

1 change: 0 additions & 1 deletion build/pkgs/hatch_vcs/distros/alpine.txt

This file was deleted.

1 change: 0 additions & 1 deletion build/pkgs/hatch_vcs/distros/arch.txt

This file was deleted.

1 change: 0 additions & 1 deletion build/pkgs/hatch_vcs/distros/debian.txt

This file was deleted.

1 change: 0 additions & 1 deletion build/pkgs/hatch_vcs/distros/fedora.txt

This file was deleted.

1 change: 0 additions & 1 deletion build/pkgs/hatch_vcs/distros/freebsd.txt

This file was deleted.

1 change: 0 additions & 1 deletion build/pkgs/hatch_vcs/distros/gentoo.txt

This file was deleted.

1 change: 0 additions & 1 deletion build/pkgs/hatch_vcs/distros/macports.txt

This file was deleted.

1 change: 0 additions & 1 deletion build/pkgs/hatch_vcs/distros/opensuse.txt

This file was deleted.

1 change: 0 additions & 1 deletion build/pkgs/hatch_vcs/distros/void.txt

This file was deleted.

1 change: 0 additions & 1 deletion build/pkgs/hatch_vcs/package-version.txt

This file was deleted.

3 changes: 0 additions & 3 deletions build/pkgs/hatch_vcs/spkg-configure.m4

This file was deleted.

1 change: 0 additions & 1 deletion build/pkgs/hatch_vcs/type

This file was deleted.

1 change: 0 additions & 1 deletion build/pkgs/hatch_vcs/version_requirements.txt

This file was deleted.

2 changes: 1 addition & 1 deletion build/pkgs/httpx/dependencies
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
httpcore | $(PYTHON_TOOLCHAIN) $(PYTHON)
httpcore anyio sniffio | $(PYTHON_TOOLCHAIN) $(PYTHON)

----------
All lines of this file are ignored except the first.
8 changes: 4 additions & 4 deletions build/pkgs/jsonschema/checksums.ini
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion build/pkgs/jsonschema/dependencies
Original file line number Diff line number Diff line change
@@ -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.
14 changes: 0 additions & 14 deletions build/pkgs/jsonschema/spkg-install.in

This file was deleted.

8 changes: 4 additions & 4 deletions build/pkgs/pure_eval/checksums.ini
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion build/pkgs/pure_eval/dependencies
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
| $(PYTHON_TOOLCHAIN) $(PYTHON)
| pip $(PYTHON)

----------
All lines of this file are ignored except the first.
2 changes: 0 additions & 2 deletions build/pkgs/pure_eval/spkg-install.in

This file was deleted.

Loading

0 comments on commit 9ff0a10

Please sign in to comment.