Skip to content

Commit

Permalink
Merge branch 'develop' into rel_import_categories
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasdiez committed Nov 5, 2023
2 parents 08ab87a + ebef87a commit bafc803
Show file tree
Hide file tree
Showing 809 changed files with 10,641 additions and 8,378 deletions.
2 changes: 1 addition & 1 deletion .ci/merge-fixes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ else
git tag -f test_base
git commit -q -m "Uncommitted changes" --no-allow-empty -a
for a in $PRs; do
git fetch --unshallow --all > /dev/null 2>&1 && echo "Unshallowed."
echo "::group::Merging PR https://github.com/$REPO/pull/$a"
git tag -f test_head
$GH pr checkout -b pr-$a $a
git fetch --unshallow --all
git checkout -q test_head
if git merge --no-edit --squash -q pr-$a; then
echo "::endgroup::"
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -193,11 +193,12 @@ jobs:
run: |
./venv/bin/python3 -m coverage combine src/.coverage/
./venv/bin/python3 -m coverage xml
find . -name *coverage*
mkdir -p coverage-report
mv coverage.xml coverage-report/
working-directory: ./worktree-image

- name: Upload coverage to codecov
if: always() && steps.build.outcome == 'success'
uses: codecov/codecov-action@v3
with:
files: ./worktree-image/coverage.xml
directory: ./worktree-image/coverage-report
37 changes: 12 additions & 25 deletions .github/workflows/ci-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,39 +34,20 @@ permissions:

jobs:

# standard-pre for the default platform (used by build.yml etc.)
default-pre:
# standard-pre and standard (without ptest) for the default platform (used by build.yml etc.)
default:
uses: ./.github/workflows/docker.yml
with:
# Build from scratch
docker_targets: "with-system-packages configured with-targets-pre"
docker_targets: "with-system-packages configured with-targets-pre with-targets"
# FIXME: duplicated from env.TARGETS
targets_pre: all-sage-local
tox_system_factors: >-
["ubuntu-focal"]
tox_packages_factors: >-
["standard"]
docker_push_repository: ghcr.io/${{ github.repository }}/

# standard for the default platform (used by build.yml etc.)
default:
if: ${{ success() || failure() }}
needs: [default-pre]
uses: ./.github/workflows/docker.yml
with:
# Build incrementally from previous stage (pre)
incremental: true
free_disk_space: true
from_docker_repository: ghcr.io/${{ github.repository }}/
from_docker_target: "with-targets-pre"
docker_targets: "with-targets with-targets-optional"
# FIXME: duplicated from env.TARGETS
targets: build doc-html
targets_optional: ptest
tox_system_factors: >-
["ubuntu-focal"]
tox_packages_factors: >-
["standard"]
["standard"]
docker_push_repository: ghcr.io/${{ github.repository }}/

# All platforms. This duplicates the default platform, but why not,
Expand All @@ -83,6 +64,9 @@ jobs:
tox_packages_factors: >-
["standard"]
docker_push_repository: ghcr.io/${{ github.repository }}/
# Make sure that all "standard-pre" jobs can start simultaneously,
# so that runners are available by the time that "default" starts.
max_parallel: 50

standard:
if: ${{ success() || failure() }}
Expand All @@ -101,6 +85,8 @@ jobs:
tox_packages_factors: >-
["standard"]
docker_push_repository: ghcr.io/${{ github.repository }}/
# Reduce from 30 to 25 because it runs in parallel with 'standard-sitepackages' below
max_parallel: 25

standard-sitepackages:
if: ${{ success() || failure() }}
Expand Down Expand Up @@ -153,8 +139,6 @@ jobs:

minimal-pre:
if: ${{ success() || failure() }}
# It does not really "need" it.
needs: [standard]
uses: ./.github/workflows/docker.yml
with:
# Build from scratch
Expand All @@ -164,6 +148,9 @@ jobs:
tox_packages_factors: >-
["minimal"]
docker_push_repository: ghcr.io/${{ github.repository }}/
# Reduced from 30 because it may run in parallel with 'standard-sitepackages' above.
# Calibrated for clogging the job pipeline until the "default" job has finished.
max_parallel: 20

minimal:
if: ${{ success() || failure() }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ jobs:
with:
user: __token__
password: ${{ secrets.SAGEMATH_PYPI_API_TOKEN }}
skip_existing: true
skip-existing: true
verbose: true
if: env.CAN_DEPLOY == 'true'

Expand Down Expand Up @@ -180,7 +180,7 @@ jobs:
with:
user: __token__
password: ${{ secrets.SAGEMATH_PYPI_API_TOKEN }}
packages_dir: wheelhouse/
skip_existing: true
packages-dir: wheelhouse/
skip-existing: true
verbose: true
if: env.CAN_DEPLOY == 'true'
7 changes: 3 additions & 4 deletions .github/workflows/doc-build-pdf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,6 @@ jobs:
git config --global user.email "ci-sage@example.com"
git config --global user.name "Build & Test workflow"
.ci/retrofit-worktree.sh worktree-image /sage
# Keep track of changes to built HTML
new_version=$(cat src/VERSION.txt); (cd /sage/local/share/doc/sage/html/en && find . -name "*.html" | xargs sed -i '/class="sidebar-brand-text"/s/Sage [0-9a-z.]* /Sage '$new_version' /'; 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: Download upstream artifact
uses: actions/download-artifact@v3
Expand Down Expand Up @@ -107,19 +105,20 @@ jobs:
id: docbuild
if: always() && (steps.incremental.outcome == 'success' || steps.build.outcome == 'success')
run: |
make doc-clean doc-uninstall; make doc-pdf
make doc-clean doc-uninstall; make sagemath_doc_html-build-deps sagemath_doc_pdf-no-deps
working-directory: ./worktree-image
env:
MAKE: make -j2 --output-sync=recurse
SAGE_NUM_THREADS: 2

- name: Copy docs
id: copy
if: always() && 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 ./docs
cp -r -L /sage/local/share/doc/sage/pdf/en/* ./docs
cp -r -L /sage/local/share/doc/sage/pdf ./docs
# Zip everything for increased performance
zip -r docs-pdf.zip docs
Expand Down
54 changes: 44 additions & 10 deletions .github/workflows/doc-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,12 @@ jobs:
mathjax_path_to=$(SAGE_USE_CDNS=yes /sage/sage -python -c "from sage_docbuild.conf import mathjax_path; print(mathjax_path)")
new_version=$(cat src/VERSION.txt)
# Wipe out chronic diffs between old doc and new doc
(cd /sage/local/share/doc/sage/html/en && \
(cd /sage/local/share/doc/sage/html && \
find . -name "*.html" | xargs sed -i -e '/class="sidebar-brand-text"/ s/Sage [0-9a-z.]* /Sage '"$new_version"' /' \
-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 /sage/local/share/doc/sage/html/en && \
(cd /sage/local/share/doc/sage/html && \
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; \
Expand Down Expand Up @@ -116,9 +116,9 @@ jobs:
run: |
set -ex
export SAGE_USE_CDNS=yes
mv /sage/local/share/doc/sage/html/en/.git /sage/.git-doc
mv /sage/local/share/doc/sage/html/.git /sage/.git-doc
make doc-clean doc-uninstall
mkdir -p /sage/local/share/doc/sage/html/en/ && mv /sage/.git-doc /sage/local/share/doc/sage/html/en/.git
mkdir -p /sage/local/share/doc/sage/html/ && mv /sage/.git-doc /sage/local/share/doc/sage/html/.git
./config.status && make sagemath_doc_html-no-deps
working-directory: ./worktree-image
env:
Expand All @@ -131,9 +131,9 @@ jobs:
run: |
set -ex
mkdir -p ./docs
(cd /sage/local/share/doc/sage/html/en && git commit -a -m 'new')
(cd /sage/local/share/doc/sage/html && git commit -a -m 'new')
# Wipe out chronic diffs between old doc and new doc
(cd /sage/local/share/doc/sage/html/en && \
(cd /sage/local/share/doc/sage/html && \
find . -name "*.html" | xargs sed -i -e '\;<script type="application/vnd\.jupyter\.widget-state+json">;,\;</script>; d')
# Create CHANGES.html
echo '<html>' > ./docs/CHANGES.html
Expand Down Expand Up @@ -162,7 +162,7 @@ jobs:
EOF
echo '</head>' >> ./docs/CHANGES.html
echo '<body>' >> ./docs/CHANGES.html
(cd /sage/local/share/doc/sage/html/en && git diff HEAD^; rm -rf .git) > ./docs/diff.txt
(cd /sage/local/share/doc/sage/html && git diff HEAD^ -- *.html; rm -rf .git) > ./docs/diff.txt
/sage/sage -python - << EOF
import re, html
with open('./docs/diff.txt', 'r') as f:
Expand All @@ -172,7 +172,7 @@ jobs:
for block in diff_blocks:
match = re.search(r'^diff --git a/(.*) b/\1', block, flags=re.MULTILINE)
if match:
path = match.group(1)
path = 'html/' + match.group(1)
out_blocks.append(f'<p class="diff"><a href="{path}">{path}</a>&emsp;</p>\n<pre><code class="language-diff">' + html.escape(block).strip() + '</code></pre>')
output_text = '\n'.join(out_blocks)
with open('./docs/diff.html', 'w') as f:
Expand All @@ -182,11 +182,12 @@ jobs:
echo '</body>' >> ./docs/CHANGES.html
echo '</html>' >>./docs/CHANGES.html
rm ./docs/diff.txt ./docs/diff.html
(cd /sage/local/share/doc/sage/html/en && git reset --hard HEAD)
(cd /sage/local/share/doc/sage/html && git reset --hard HEAD)
# For some reason the deploy step below cannot find /sage/...
# So copy everything from there to local folder
# We also need to replace the symlinks because netlify is not following them
cp -r -L /sage/local/share/doc/sage/html/en/* ./docs
cp -r -L /sage/local/share/doc/sage/html ./docs
cp /sage/local/share/doc/sage/index.html ./docs
# Zip everything for increased performance
zip -r docs.zip docs
Expand All @@ -196,3 +197,36 @@ jobs:
with:
name: docs
path: docs.zip

- name: Build live doc
id: buildlivedoc
if: (success() || failure()) && steps.copy.outcome == 'success' && github.repository == 'sagemath/sage' && github.ref == 'refs/heads/develop'
run: |
set -ex
export SAGE_USE_CDNS=yes
export SAGE_LIVE_DOC=yes
export SAGE_JUPYTER_SERVER=binder:sagemath/sage-binder-env/dev
make doc-clean doc-uninstall
./config.status && make sagemath_doc_html-no-deps
working-directory: ./worktree-image
env:
MAKE: make -j2 --output-sync=recurse
SAGE_NUM_THREADS: 2

- name: Copy live doc
id: copylivedoc
if: (success() || failure()) && steps.buildlivedoc.outcome == 'success'
run: |
set -ex
mkdir -p ./livedoc
cp -r -L /sage/local/share/doc/sage/html ./livedoc
cp /sage/local/share/doc/sage/index.html ./livedoc
zip -r livedoc.zip livedoc
- name: Upload live doc
if: (success() || failure()) && steps.copylivedoc.outcome == 'success'
uses: actions/upload-artifact@v3
with:
name: livedoc
path: livedoc.zip

47 changes: 45 additions & 2 deletions .github/workflows/doc-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
header: preview-comment
recreate: true
message: |
[Documentation preview for this PR](${{ steps.deploy-netlify.outputs.NETLIFY_URL }}) (built with commit ${{ steps.source-run-info.outputs.sourceHeadSha }}; [changes](${{ steps.deploy-netlify.outputs.NETLIFY_URL }}/CHANGES.html)) is ready! :tada:
[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:
- name: Update deployment status PR check
uses: myrotvorets/set-commit-status-action@v2.0.0
Expand All @@ -90,5 +90,48 @@ jobs:

- name: Report deployment url
run: |
echo "::notice::The documentation has being automatically deployed to Netlify. %0A ✅ Preview: ${{ steps.deploy-netlify.outputs.NETLIFY_URL }}"
echo "::notice::The documentation has been deployed - ${{ steps.deploy-netlify.outputs.NETLIFY_URL }}"
publish-live-doc:
runs-on: ubuntu-latest
if: github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_branch == 'develop'
steps:
- name: Download live doc
uses: actions/github-script@v6.4.1
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: Extract live doc
run: unzip livedoc.zip -d doc && unzip doc/livedoc.zip -d doc/doc

- 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}
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
NETLIFY_MESSAGE: Deployed live doc
NETLIFY_ALIAS: deploy-livedoc

- name: Report deployment url
run: |
echo "::notice::The live documentation has been deployed - ${{ steps.deploy-netlify.outputs.NETLIFY_URL }}"
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.2.beta9
version: 10.2.rc0
doi: 10.5281/zenodo.593563
date-released: 2023-10-30
date-released: 2023-11-05
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.2.beta9, Release Date: 2023-10-30
SageMath version 10.2.rc0, Release Date: 2023-11-05
6 changes: 3 additions & 3 deletions build/pkgs/configure/checksums.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
tarball=configure-VERSION.tar.gz
sha1=0f90c993748bfc21ae382ac3ce6c19b434edb36c
md5=b8d9355c732997566f68b60c8a8eb9cc
cksum=2280021929
sha1=41ec9a0bdf6e5982204b26ce2593e4b5a1863c96
md5=8ea80ef7438ed62345de677dc921af2e
cksum=2979893163
2 changes: 1 addition & 1 deletion build/pkgs/configure/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
c0221f90a86e4b4bea4b45ff8de54727313bd755
be0b5cf887fefcdf31df70be0a62b10b7929f28c
1 change: 1 addition & 0 deletions build/pkgs/cypari/distros/gentoo.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dev-python/cypari2
5 changes: 5 additions & 0 deletions build/pkgs/cypari/spkg-configure.m4
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
SAGE_SPKG_CONFIGURE([cypari], [
SAGE_SPKG_DEPCHECK([cysignals pari], [
SAGE_PYTHON_PACKAGE_CHECK([cypari])
])
])
1 change: 1 addition & 0 deletions build/pkgs/cysignals/distros/gentoo.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dev-python/cysignals
3 changes: 3 additions & 0 deletions build/pkgs/cysignals/spkg-configure.m4
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SAGE_SPKG_CONFIGURE([cysignals], [
SAGE_PYTHON_PACKAGE_CHECK([cysignals])
])
4 changes: 3 additions & 1 deletion build/pkgs/cython/distros/conda.txt
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
cython
cython>=3.0,!=3.0.3,<4.0

# Exclude 3.0.3 because of https://github.com/cython/cython/issues/5748
4 changes: 3 additions & 1 deletion build/pkgs/cython/install-requires.txt
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
cython >=3.0, <4.0
cython >=3.0, != 3.0.3, <4.0

# Exclude 3.0.3 because of https://github.com/cython/cython/issues/5748
6 changes: 3 additions & 3 deletions build/pkgs/fplll/checksums.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
tarball=fplll-VERSION.tar.gz
sha1=8353a0db588d891951aa9760fbe490f4e308de8d
md5=7e333d7d0e535d27c591271340e28865
cksum=2543682321
sha1=607f5922109d93ddd5a05419682511e26579f9d6
md5=fa4e1f24994c0345a9530397a3369b27
cksum=4174005926
upstream_url=https://github.com/fplll/fplll/releases/download/VERSION/fplll-VERSION.tar.gz
2 changes: 1 addition & 1 deletion build/pkgs/fplll/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.4.4
5.4.5
2 changes: 1 addition & 1 deletion build/pkgs/fplll/spkg-configure.m4
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ SAGE_SPKG_CONFIGURE([fplll], [
dnl Trac #31025: FPLLL/FPyLLL make no guarantee regarding compatibility
dnl other than "whatever versions were released at the same time should work together"
PKG_CHECK_MODULES([FPLLL],
[fplll >= 5.4.4 fplll <= 5.4.4],
[fplll >= 5.4.5 fplll <= 5.4.5],
[
AC_MSG_CHECKING([whether BKZ default strategy JSON is installed])
AC_LANG_PUSH([C++])
Expand Down
Loading

0 comments on commit bafc803

Please sign in to comment.