diff --git a/.ci/create-changes-html.sh b/.ci/create-changes-html.sh
index 0e80d0d2814..0cc86f34b13 100755
--- a/.ci/create-changes-html.sh
+++ b/.ci/create-changes-html.sh
@@ -16,6 +16,12 @@ echo '' >> CHANGES.html
echo '' >> CHANGES.html
cat >> CHANGES.html << EOF
+
; d' \
-e 's;#L[0-9]*";";' \
+ -e 's;tab-set--[0-9]*-;tab-set-;' \
&& true)
# 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; \
+ (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
- if: (success() || failure()) && steps.worktree.outcome == 'success' && !startsWith(github.ref, 'refs/tags/')
+ if: steps.container.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: |
@@ -175,18 +193,22 @@ jobs:
export MAKE="make -j5 --output-sync=recurse" SAGE_NUM_THREADS=5
make doc-clean doc-uninstall
export SAGE_USE_CDNS=yes
+ export SAGE_DOCBUILD_OPTS="--include-tests-blocks"
./config.status && make sagemath_doc_html-no-deps
shell: sh .ci/docker-exec-script.sh BUILD /sage {0}
- name: Copy doc
id: copy
- if: (success() || failure()) && steps.docbuild.outcome == 'success'
+ if: steps.docbuild.outcome == 'success'
run: |
set -ex
- # 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
- # Check if we are on PR
+ # Simpler "docker cp --follow-link ... doc" does not work
+ mkdir -p doc
+ mkdir -p temp
+ docker cp --follow-link BUILD:/sage/local/share/doc/sage/html temp
+ docker cp --follow-link BUILD:/sage/local/share/doc/sage/index.html temp
+ cp -r -L temp/* doc/
+ # Check if we are on pull request event
PR_NUMBER=""
if [[ -n "$GITHUB_REF" ]]; then
if [[ "$GITHUB_REF" =~ refs/pull/([0-9]+)/merge ]]; then
@@ -199,9 +221,10 @@ jobs:
# 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/ s/ built with GitHub PR .* for development/ for development/' \
- -e '/;,\;; d' \
-e 's;#L[0-9]*";";' \
+ -e 's;tab-set--[0-9]*-;tab-set-;' \
&& 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)
(cd doc && git diff $(git rev-parse HEAD~2) -- "*.html") > diff.txt
@@ -221,20 +244,31 @@ jobs:
- name: Upload doc
id: upload
- if: (success() || failure()) && steps.copy.outcome == 'success'
+ if: steps.copy.outcome == 'success'
uses: actions/upload-artifact@v4
with:
name: doc
path: doc.zip
+ - name: Upload doc-develop
+ # artifact doc-develop is used for doc build on pull request event
+ id: upload-push
+ if: steps.copy.outcome == 'success' && github.event_name == 'push'
+ uses: actions/upload-artifact@v4
+ with:
+ name: doc-${{ github.ref_name }}
+ path: doc.zip
+
#
- # On release tags: live doc and wheels
+ # On release tag event
#
- name: Build live doc
id: buildlivedoc
- if: (success() || failure()) && startsWith(github.ref, 'refs/tags/')
+ if: startsWith(github.ref, 'refs/tags/')
run: |
+ # Avoid running out of disk space
+ rm -rf upstream
export MAKE="make -j5 --output-sync=recurse" SAGE_NUM_THREADS=5
export PATH="build/bin:$PATH"
eval $(sage-print-system-package-command auto update)
@@ -249,7 +283,7 @@ jobs:
- name: Copy live doc
id: copylivedoc
- if: (success() || failure()) && steps.buildlivedoc.outcome == 'success'
+ if: steps.buildlivedoc.outcome == 'success'
run: |
mkdir -p ./livedoc
# We copy everything to a local folder
@@ -259,7 +293,7 @@ jobs:
zip -r livedoc.zip livedoc
- name: Upload live doc
- if: (success() || failure()) && steps.copylivedoc.outcome == 'success'
+ if: steps.copylivedoc.outcome == 'success'
uses: actions/upload-artifact@v4
with:
name: livedoc
diff --git a/src/sage/crypto/sbox.pyx b/src/sage/crypto/sbox.pyx
index 30b7a3cd8c9..af8638ea8e3 100644
--- a/src/sage/crypto/sbox.pyx
+++ b/src/sage/crypto/sbox.pyx
@@ -645,7 +645,7 @@ cdef class SBox(SageObject):
[0 0 2 0 0 0 0 0 0 0 0 0 0 0 0 2]
[0 2 0 0 0 0 0 0 0 0 0 0 2 0 0 0]
- TESTS::
+ TESTS:
Testing square SBoxes::
diff --git a/src/sage/matrix/matrix2.pyx b/src/sage/matrix/matrix2.pyx
index 3682c2be14e..d2f0815e81e 100644
--- a/src/sage/matrix/matrix2.pyx
+++ b/src/sage/matrix/matrix2.pyx
@@ -7938,7 +7938,7 @@ cdef class Matrix(Matrix1):
sage: m == transformation_matrix * m_original
True
- TESTS::
+ TESTS:
Check that :issue:`34724` is fixed (indirect doctest)::
diff --git a/src/sage/rings/polynomial/polynomial_element.pyx b/src/sage/rings/polynomial/polynomial_element.pyx
index 7c1ca199ced..d60c0c752d6 100644
--- a/src/sage/rings/polynomial/polynomial_element.pyx
+++ b/src/sage/rings/polynomial/polynomial_element.pyx
@@ -4872,7 +4872,7 @@ cdef class Polynomial(CommutativePolynomial):
-1 * 3^15 * 23 * 887 * 12583 * 6335047 * 371692813
Factoring over a number field over which we cannot factor the
- discriminant and over which `nffactor()` fails::
+ discriminant and over which ``nffactor()`` fails::
sage: # needs sage.libs.pari sage.rings.number_field
sage: p = next_prime(10^50); q = next_prime(10^51); n = p*q
@@ -4920,7 +4920,7 @@ cdef class Polynomial(CommutativePolynomial):
sage: (x1 - x2).factor() # needs sage.libs.singular
-x + x
- Check that :issue:`26421' is fixed::
+ Check that :issue:`26421` is fixed::
sage: R. = LaurentPolynomialRing(ZZ)
sage: P. = R[]
diff --git a/src/sage/rings/ring_extension.pyx b/src/sage/rings/ring_extension.pyx
index 86ac9756351..9d8a626094a 100644
--- a/src/sage/rings/ring_extension.pyx
+++ b/src/sage/rings/ring_extension.pyx
@@ -1952,7 +1952,7 @@ cdef class RingExtension_generic(Parent):
TESTS:
- Ensure issue :issue:`34692` is fixed::
+ Ensure issue :issue:`34692` is fixed::
sage: Fq = GF(11)
sage: FqX. = Fq[]
diff --git a/src/sage/rings/ring_extension_element.pyx b/src/sage/rings/ring_extension_element.pyx
index e3184503d77..4e3c50ef09d 100644
--- a/src/sage/rings/ring_extension_element.pyx
+++ b/src/sage/rings/ring_extension_element.pyx
@@ -329,7 +329,7 @@ cdef class RingExtensionElement(CommutativeAlgebraElement):
sage: g.parent()
Finite Field in z2 of size 5^2
- TESTS::
+ TESTS:
We check the case of a tower of extensions::