Skip to content

Commit 23497d0

Browse files
authored
Merge branch 'develop' into r-tests
2 parents ea502bf + 2e5cb46 commit 23497d0

File tree

116 files changed

+433
-355
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

116 files changed

+433
-355
lines changed

.github/workflows/doc-build.yml

Lines changed: 55 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -132,25 +132,35 @@ jobs:
132132
git config --global --add safe.directory $(pwd)
133133
git config --global user.email "[email protected]"
134134
git config --global user.name "Build documentation workflow"
135-
# mathjax path in old doc (regex)
136-
mathjax_path_from="[-./A-Za-z_]*/tex-chtml[.]js?v=[0-9a-f]*"
137-
# mathjax path in new doc
138-
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)")
139-
new_version=$(docker exec BUILD cat src/VERSION.txt)
140-
mkdir -p doc/
141-
docker cp BUILD:/sage/local/share/doc/sage/html doc/
142-
# Wipe out chronic diffs between old doc and new doc
143-
(cd doc && \
144-
find . -name "*.html" | xargs sed -i -e '/class="sidebar-brand-text"/ s/Sage [0-9a-z.]* /Sage '"$new_version"' /' \
145-
-e '/<link rel="stylesheet"/ s/?v=[0-9a-f]*"/"/' \
146-
-e 's;'"$mathjax_path_from"';'"$mathjax_path_to"';' \
147-
-e '\;<script type="application/vnd\.jupyter\.widget-state+json">;,\;</script>; d')
148-
# Create git repo from old doc
149-
(cd doc && \
150-
git init && \
151-
(echo "*.svg binary"; echo "*.pdf binary") >> .gitattributes && \
152-
(echo ".buildinfo"; echo '*.inv'; echo '.git*'; echo '*.svg'; echo '*.pdf'; echo '*.png'; echo 'searchindex.js') > .gitignore; \
153-
git add -A && git commit --quiet -m 'old')
135+
# Check if we are on PR
136+
PR_NUMBER=""
137+
if [[ -n "$GITHUB_REF" ]]; then
138+
if [[ "$GITHUB_REF" =~ refs/pull/([0-9]+)/merge ]]; then
139+
PR_NUMBER="${BASH_REMATCH[1]}"
140+
fi
141+
fi
142+
# If so, then prepare to create CHANGES.html
143+
if [[ -n "$PR_NUMBER" ]]; then
144+
# mathjax path in old doc (regex)
145+
mathjax_path_from="[-./A-Za-z_]*/tex-chtml[.]js?v=[0-9a-f]*"
146+
# mathjax path in new doc
147+
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)")
148+
new_version=$(docker exec BUILD cat src/VERSION.txt)
149+
mkdir -p doc/
150+
docker cp BUILD:/sage/local/share/doc/sage/html doc/
151+
# Wipe out chronic diffs between old doc and new doc
152+
(cd doc && \
153+
find . -name "*.html" | xargs sed -i -e '/class="sidebar-brand-text"/ s/Sage [0-9a-z.]* /Sage '"$new_version"' /' \
154+
-e '/<link rel="stylesheet"/ s/?v=[0-9a-f]*"/"/' \
155+
-e 's;'"$mathjax_path_from"';'"$mathjax_path_to"';' \
156+
-e '\;<script type="application/vnd\.jupyter\.widget-state+json">;,\;</script>; d')
157+
# Create git repo from old doc
158+
(cd doc && \
159+
git init && \
160+
(echo "*.svg binary"; echo "*.pdf binary") >> .gitattributes && \
161+
(echo ".buildinfo"; echo '*.inv'; echo '.git*'; echo '*.svg'; echo '*.pdf'; echo '*.png'; echo 'searchindex.js') > .gitignore; \
162+
git add -A && git commit --quiet -m 'old')
163+
fi
154164
155165
- name: Build doc
156166
id: docbuild
@@ -174,21 +184,31 @@ jobs:
174184
# We copy everything to a local folder
175185
docker cp --follow-link BUILD:/sage/local/share/doc/sage/html doc
176186
docker cp --follow-link BUILD:/sage/local/share/doc/sage/index.html doc
177-
(cd doc && git commit -a -m 'new')
178-
# Wipe out chronic diffs of new doc against old doc before creating CHANGES.html
179-
(cd doc && \
180-
find . -name "*.html" | xargs sed -i -e '/This is documentation for/ s/ built with GitHub PR .*. Doc/. Doc/' \
181-
-e '/<link rel="stylesheet"/ s/?v=[0-9a-f]*"/"/' \
182-
-e '\;<script type="application/vnd\.jupyter\.widget-state+json">;,\;</script>; d' \
183-
&& git commit -a -m 'wipe-out')
184-
# Since HEAD is at commit 'wipe-out', HEAD~1 is commit 'new' (new doc), HEAD~2 is commit 'old' (old doc)
185-
.ci/create-changes-html.sh $(cd doc && git rev-parse HEAD~2) doc
186-
# Restore the new doc with changes made in create-changes-html.sh but dropping changes by "wipe out"
187-
(cd doc && git stash -q && git checkout -q -f HEAD~1 && git stash pop -q)
188-
# Sometimes rm -rf .git errors out because of some diehard hidden files
189-
# So we simply move it out of the doc directory
190-
(cd doc && mv .git ../git && mv .gitattributes ../gitattributes)
191-
mv CHANGES.html doc
187+
# Check if we are on PR
188+
PR_NUMBER=""
189+
if [[ -n "$GITHUB_REF" ]]; then
190+
if [[ "$GITHUB_REF" =~ refs/pull/([0-9]+)/merge ]]; then
191+
PR_NUMBER="${BASH_REMATCH[1]}"
192+
fi
193+
fi
194+
# If so, then create CHANGES.html
195+
if [[ -n "$PR_NUMBER" ]]; then
196+
(cd doc && git commit -a -m 'new')
197+
# Wipe out chronic diffs of new doc against old doc before creating CHANGES.html
198+
(cd doc && \
199+
find . -name "*.html" | xargs sed -i -e '/This is documentation of/ s/ built with GitHub PR .* for development/ for development/' \
200+
-e '/<link rel="stylesheet"/ s/?v=[0-9a-f]*"/"/' \
201+
-e '\;<script type="application/vnd\.jupyter\.widget-state+json">;,\;</script>; d' \
202+
&& git commit -a -m 'wipe-out')
203+
# Since HEAD is at commit 'wipe-out', HEAD~1 is commit 'new' (new doc), HEAD~2 is commit 'old' (old doc)
204+
.ci/create-changes-html.sh $(cd doc && git rev-parse HEAD~2) doc
205+
# Restore the new doc with changes made in create-changes-html.sh but dropping changes by "wipe out"
206+
(cd doc && git stash -q && git checkout -q -f HEAD~1 && git stash pop -q)
207+
# Sometimes rm -rf .git errors out because of some diehard hidden files
208+
# So we simply move it out of the doc directory
209+
(cd doc && mv .git ../git && mv .gitattributes ../gitattributes)
210+
mv CHANGES.html doc
211+
fi
192212
# Zip everything for increased performance
193213
zip -r doc.zip doc
194214
@@ -228,7 +248,7 @@ jobs:
228248
# We copy everything to a local folder
229249
docker cp --follow-link BUILD:/sage/local/share/doc/sage/html livedoc
230250
docker cp --follow-link BUILD:/sage/local/share/doc/sage/pdf livedoc
231-
docker cp BUILD:/sage/local/share/doc/sage/index.html livedoc
251+
docker cp --follow-link BUILD:/sage/local/share/doc/sage/index.html livedoc
232252
zip -r livedoc.zip livedoc
233253
234254
- name: Upload live doc

.github/workflows/doc-publish.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,16 @@ jobs:
129129
run: unzip livedoc.zip -d livedoc
130130
if: steps.download-doc.outcome == 'success'
131131

132+
- name: Create _headers file for permissive CORS
133+
run: |
134+
cat <<EOF > livedoc/livedoc/_headers
135+
/*
136+
Access-Control-Allow-Origin: *
137+
Access-Control-Allow-Methods: GET
138+
Access-Control-Allow-Headers: Content-Type
139+
EOF
140+
if: steps.download-doc.outcome == 'success'
141+
132142
- name: Deploy to netlify with doc-TAG alias
133143
id: deploy-netlify
134144
uses: netlify/actions/cli@master

CITATION.cff

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ title: SageMath
44
abstract: SageMath is a free open-source mathematics software system.
55
authors:
66
- name: "The SageMath Developers"
7-
version: 10.4.rc2
7+
version: 10.4.rc3
88
doi: 10.5281/zenodo.8042260
9-
date-released: 2024-07-04
9+
date-released: 2024-07-12
1010
repository-code: "https://github.com/sagemath/sage"
1111
url: "https://www.sagemath.org/"

VERSION.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
SageMath version 10.4.rc2, Release Date: 2024-07-04
1+
SageMath version 10.4.rc3, Release Date: 2024-07-12

build/pkgs/asttokens/checksums.ini

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
tarball=asttokens-VERSION.tar.gz
2-
sha1=d522a139240293953c99d32ca62c41542babb963
3-
sha256=b03869718ba9a6eb027e134bfdf69f38a236d681c83c160d510768af11254ba0
4-
upstream_url=https://pypi.io/packages/source/a/asttokens/asttokens-VERSION.tar.gz
1+
tarball=asttokens-VERSION-py2.py3-none-any.whl
2+
sha1=69a9448cd7fad3007a66f464f9daa35dd28183a6
3+
sha256=051ed49c3dcae8913ea7cd08e46a606dba30b79993209636c4875bc1d637bc24
4+
upstream_url=https://pypi.io/packages/py2.py3/a/asttokens/asttokens-VERSION-py2.py3-none-any.whl

build/pkgs/asttokens/dependencies

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
| $(PYTHON_TOOLCHAIN) $(PYTHON)
1+
six | pip $(PYTHON)
22

33
----------
44
All lines of this file are ignored except the first.

build/pkgs/asttokens/spkg-install.in

Lines changed: 0 additions & 2 deletions
This file was deleted.

build/pkgs/configure/checksums.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
tarball=configure-VERSION.tar.gz
2-
sha1=1451031f1325bb7d31929b92415ee25795ed7022
3-
sha256=a5c2064d5c792d32bbfa6c97a72aab395764ed7882f9bcadb8f04ca34c42c6b4
2+
sha1=a78a0025292f4831f84dc059734320de0e66e216
3+
sha256=c108de2bfbbf3f2543ada5742d5bc9a58df700d8b6125df92b1888f867b60174
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
812a1160c06c055f74f9fcc86a7678c5a7a8788c
1+
74119807d7989c879f2eee167e4e29af7c4f588a

build/pkgs/cppy/checksums.ini

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
tarball=cppy-VERSION.tar.gz
2-
sha1=c82ee7a4f38e302bfe4de2a695d2bdfefb69951f
3-
sha256=83b43bf17b1085ac15c5debdb42154f138b928234b21447358981f69d0d6fe1b
4-
upstream_url=https://files.pythonhosted.org/packages/source/c/cppy/cppy-VERSION.tar.gz
1+
tarball=cppy-VERSION-py3-none-any.whl
2+
sha1=57304a8ceaaf7cb34e4315aa9b8084b17fc0332c
3+
sha256=c5b5eac3d3f42593a07d35275b0bc27f447b76b9ad8f27c62e3cfa286dc1988a
4+
upstream_url=https://pypi.io/packages/py3/c/cppy/cppy-VERSION-py3-none-any.whl

0 commit comments

Comments
 (0)