Skip to content

Commit

Permalink
Merge branch 'develop' into public/sparse_strategies_for_composite_el…
Browse files Browse the repository at this point in the history
…liptic_curve_isogenies
  • Loading branch information
yyyyx4 authored Feb 14, 2023
2 parents c84229e + 293dd72 commit b52a631
Show file tree
Hide file tree
Showing 179 changed files with 3,565 additions and 585 deletions.
8 changes: 7 additions & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
<!-- ^^^^^
Please provide a concise, informative and self-explanatory title.
Don't put issue numbers in there, do this in the PR body below.
For example, instead of "Fixes #1234" use "Introduce new method to calculate 1+1"
-->
### 📚 Description

<!-- Describe your changes in detail -->
<!-- Describe your changes here in detail -->
<!-- Why is this change required? What problem does it solve? -->
<!-- If it resolves an open issue, please link to the issue here. For example "Closes #1337" -->

Expand All @@ -10,6 +15,7 @@
<!-- If your change requires a documentation PR, please link it appropriately -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->

- [ ] I have made sure that the title is self-explanatory and the description concisely explains the PR.
- [ ] I have linked an issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation accordingly.
Expand Down
41 changes: 7 additions & 34 deletions .github/workflows/doc-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,13 @@ jobs:
build-docs:
runs-on: ubuntu-latest
container: ghcr.io/sagemath/sage/sage-docker-ubuntu-focal-standard-with-targets:dev
env:
CAN_DEPLOY: ${{ secrets.NETLIFY_AUTH_TOKEN != '' }}
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Prepare
run: |
apt-get update && apt-get install -y zip
# Reuse built SAGE_LOCAL contained in the Docker image
./bootstrap
./configure --enable-build-as-root --prefix=/sage/local --with-sage-venv --enable-download-from-upstream-url
Expand All @@ -34,43 +33,17 @@ jobs:
SAGE_NUM_THREADS: 2

- name: Copy docs
if: env.CAN_DEPLOY == 'true'
run: |
# 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
mkdir -p ./docs
cp -r -L /sage/local/share/doc/sage/html/en/* ./docs
# Zip everything for increased performance
zip -r docs.zip docs
- name: Deploy to Netlify preview
id: preview-netlify
if: env.CAN_DEPLOY == 'true' && github.ref != 'refs/heads/develop'
uses: netlify/actions/cli@master
- name: Upload docs
uses: actions/upload-artifact@v3
with:
args: deploy --dir=docs --alias="${NETLIFY_ALIAS}"
env:
# Set deployment url to commit hash to easily link from the trac.
# We could also set NETLIFY_ALIAS to the branch name.
# However, netlify currently doesn't support updates to a deployment with the same alias
# https://github.com/netlify/cli/issues/948
# https://github.com/netlify/cli/issues/1984
# Note that even if this feature is implemented, one would also need to first process the branch name
# to workaround the bug https://github.com/netlify/cli/issues/969.
NETLIFY_ALIAS: ${{ github.sha }}
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}

- name: Deploy to Netlify production
id: deploy-netlify
if: env.CAN_DEPLOY == 'true' && github.ref == 'refs/heads/develop'
uses: netlify/actions/cli@master
with:
args: deploy --dir=docs --prod
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}

- name: Report deployment url
if: env.CAN_DEPLOY == 'true'
run: |
echo "::notice::The documentation has being automatically deployed to Netlify. %0A ✅ Preview: ${{ steps.preview-netlify.outputs.NETLIFY_URL || steps.deploy-netlify.outputs.NETLIFY_URL }}"
name: docs
path: docs.zip
95 changes: 95 additions & 0 deletions .github/workflows/doc-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
# Triggers after the documentation build has finished,
# taking the artifact and uploading it to netlify
name: Publish documentation

on:
workflow_run:
workflows: ["Build documentation"]
types:
- completed

permissions:
statuses: write
checks: write
pull-requests: write

jobs:
upload-docs:
runs-on: ubuntu-latest
if: github.event.workflow_run.conclusion == 'success'
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 }}

# 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@v3.1.0
with:
script: |
var artifacts = await github.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.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: Extract docs
run: unzip docs.zip -d docs && unzip docs/docs.zip -d docs/docs

- 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}
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: deploy-preview-${{ steps.source-run-info.outputs.pullRequestNumber }}

# 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:
number: ${{ steps.source-run-info.outputs.pullRequestNumber }}
header: preview-comment
recreate: true
message: |
[Documentation preview for this PR](${{ steps.deploy-netlify.outputs.NETLIFY_URL }}) is ready! :tada:
Built with commit: ${{ steps.source-run-info.outputs.sourceHeadSha }}
- name: Update deployment status PR check
uses: myrotvorets/set-commit-status-action@1.1.6
if: ${{ always() }}
env:
DEPLOY_SUCCESS: Successfully deployed preview.
DEPLOY_FAILURE: Failed to deploy preview.
with:
token: ${{ secrets.GITHUB_TOKEN }}
status: ${{ job.status == 'success' && 'success' || 'failure' }}
sha: ${{ github.event.workflow_run.head_sha }}
context: Deploy Documentation
targetUrl: ${{ steps.deploy-netlify.outputs.NETLIFY_URL }}
description: ${{ job.status == 'success' && env.DEPLOY_SUCCESS || env.DEPLOY_FAILURE }}

- name: Report deployment url
run: |
echo "::notice::The documentation has being automatically deployed to Netlify. %0A ✅ Preview: ${{ steps.deploy-netlify.outputs.NETLIFY_URL }}"
8 changes: 4 additions & 4 deletions .zenodo.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"description": "Mirror of the Sage https://sagemath.org/ source tree",
"license": "other-open",
"title": "sagemath/sage: 9.8.rc1",
"version": "9.8.rc1",
"title": "sagemath/sage: 10.0.beta0",
"version": "10.0.beta0",
"upload_type": "software",
"publication_date": "2023-02-05",
"publication_date": "2023-02-12",
"creators": [
{
"affiliation": "SageMath.org",
Expand All @@ -15,7 +15,7 @@
"related_identifiers": [
{
"scheme": "url",
"identifier": "https://github.com/sagemath/sage/tree/9.8.rc1",
"identifier": "https://github.com/sagemath/sage/tree/10.0.beta0",
"relation": "isSupplementTo"
},
{
Expand Down
2 changes: 1 addition & 1 deletion VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
SageMath version 9.8.rc1, Release Date: 2023-02-05
SageMath version 10.0.beta0, Release Date: 2023-02-12
2 changes: 1 addition & 1 deletion build/bin/sage-bootstrap-python
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ if [ "$LC_ALL" = "C" -o "$LANG" = "C" -o "$LC_CTYPE" = "C" ]; then
export LANG
fi

PYTHONS="python python3 python3.10 python3.9 python3.8 python3.7 python2.7 python3.6 python2"
PYTHONS="python python3 python3.12 python3.11 python3.10 python3.9 python3.8 python3.7 python2.7 python3.6 python2"
# Trac #32405: Prefer a Python that provides ssl with SNI, which allows developers
# to download from upstream URLs (configure --enable-download-from-upstream-url),
# in particular from PyPI, which requires SNI.
Expand Down
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=6e536cb217dd823f547403263fc7d1b21578eaef
md5=83b833531d8bf1689f3368c47374f5e1
cksum=2145026758
sha1=fc9c71ad5be4e3197007ddb150cba47d15716d89
md5=0a707bcc4316b8c3e3faca6330fc5dc2
cksum=3972886119
2 changes: 1 addition & 1 deletion build/pkgs/configure/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2d3c71b03b2c11caceac69da380dab3ef4374519
785ddef6338073b27082bb675446e3ae111b3b5d
2 changes: 1 addition & 1 deletion build/pkgs/ore_algebra/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
git+https://github.com/mkauers/ore_algebra@cfcb386f2cc1d3e044c71dfb149444355b16d775#egg=ore_algebra
git+https://github.com/mkauers/ore_algebra@01c357f590685ff362c008229681ee08269457da#egg=ore_algebra
2 changes: 1 addition & 1 deletion build/pkgs/sage_conf/install-requires.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This file is updated on every release by the sage-update-version script
sage-conf ~= 9.8rc1
sage-conf ~= 10.0b0
2 changes: 1 addition & 1 deletion build/pkgs/sage_docbuild/install-requires.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This file is updated on every release by the sage-update-version script
sage-docbuild ~= 9.8rc1
sage-docbuild ~= 10.0b0
2 changes: 1 addition & 1 deletion build/pkgs/sage_setup/install-requires.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This file is updated on every release by the sage-update-version script
sage-setup ~= 9.8rc1
sage-setup ~= 10.0b0
2 changes: 1 addition & 1 deletion build/pkgs/sage_sws2rst/install-requires.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This file is updated on every release by the sage-update-version script
sage-sws2rst ~= 9.8rc1
sage-sws2rst ~= 10.0b0
2 changes: 1 addition & 1 deletion build/pkgs/sagelib/install-requires.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This file is updated on every release by the sage-update-version script
sagelib ~= 9.8rc1
sagelib ~= 10.0b0
2 changes: 1 addition & 1 deletion build/pkgs/sagemath_categories/install-requires.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This file is updated on every release by the sage-update-version script
sagemath-categories ~= 9.8rc1
sagemath-categories ~= 10.0b0
2 changes: 1 addition & 1 deletion build/pkgs/sagemath_environment/install-requires.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This file is updated on every release by the sage-update-version script
sagemath-environment ~= 9.8rc1
sagemath-environment ~= 10.0b0
2 changes: 1 addition & 1 deletion build/pkgs/sagemath_objects/install-requires.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This file is updated on every release by the sage-update-version script
sagemath-objects ~= 9.8rc1
sagemath-objects ~= 10.0b0
2 changes: 1 addition & 1 deletion build/pkgs/sagemath_repl/install-requires.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This file is updated on every release by the sage-update-version script
sagemath-repl ~= 9.8rc1
sagemath-repl ~= 10.0b0
6 changes: 3 additions & 3 deletions build/pkgs/singular/checksums.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
tarball=singular-VERSION.tar.gz
sha1=6c2b622d3681e2de3d58d30c654d43d3e32b720c
md5=abb1e37c794472e7760655358ab66054
cksum=17455733
sha1=28bb3ee97ef48d04dfa96de182fd93eebe08426c
md5=fc0a4f5720dadba45a52ee94324ce00c
cksum=1573851737
upstream_url=ftp://jim.mathematik.uni-kl.de/pub/Math/Singular/SOURCES/4-3-1/singular-VERSION.tar.gz
2 changes: 1 addition & 1 deletion build/pkgs/singular/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.3.1p1
4.3.1p3
2 changes: 1 addition & 1 deletion pkgs/sage-conf/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
9.8.rc1
10.0.beta0
2 changes: 1 addition & 1 deletion pkgs/sage-conf_pypi/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
9.8.rc1
10.0.beta0
2 changes: 1 addition & 1 deletion pkgs/sage-docbuild/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
9.8.rc1
10.0.beta0
2 changes: 1 addition & 1 deletion pkgs/sage-setup/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
9.8.rc1
10.0.beta0
2 changes: 1 addition & 1 deletion pkgs/sage-sws2rst/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
9.8.rc1
10.0.beta0
2 changes: 1 addition & 1 deletion pkgs/sagemath-categories/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
9.8.rc1
10.0.beta0
2 changes: 1 addition & 1 deletion pkgs/sagemath-environment/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
9.8.rc1
10.0.beta0
2 changes: 1 addition & 1 deletion pkgs/sagemath-objects/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
9.8.rc1
10.0.beta0
2 changes: 1 addition & 1 deletion pkgs/sagemath-repl/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
9.8.rc1
10.0.beta0
4 changes: 3 additions & 1 deletion src/.relint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@
- name: 'namespace_pkg_all_import: import from .all of a namespace package'
hint: |
Sage library code should not import from sage.PAC.KAGE.all when sage.PAC.KAGE is an implicit
Hint: namespace package. Type import_statements("SOME_IDENTIFIER") to find a more specific import.
Hint: namespace package. Type import_statements("SOME_IDENTIFIER") to find a more specific import,
Hint: or use 'sage --fiximports' to fix automatically in the source file.
# Keep in sync with SAGE_ROOT/src/sage/misc/replace_dot_all.py
pattern: 'from\s+sage(|[.](arith|categories|combinat|ext|graphs(|[.]decompositions)|interfaces|libs|matrix|misc|numerical(|[.]backends)|rings|sets))[.]all\s+import'
filePattern: '.*[.](py|pyx|pxi)$'
error: false # Make this a warning instead of an error for now
2 changes: 1 addition & 1 deletion src/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
9.8.rc1
10.0.beta0
12 changes: 12 additions & 0 deletions src/bin/sage
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,13 @@ usage_advanced() {
echo " Sage documentation for \"string\"."
echo " --search_src ... -- same as --grep"
echo " --search_doc ... -- same as --grepdoc"
echo " --fixdoctests file.py"
echo " -- Run doctests and replace output of failing doctests"
echo " with actual output."
echo " --fiximports <files|dir>"
echo " -- Replace imports from sage.PAC.KAGE.all by specific"
echo " imports when sage.PAC.KAGE is an implicit namespace"
echo " package"
fi
echo " --sh [...] -- run a shell with Sage environment variables"
echo " as they are set in the runtime of Sage"
Expand Down Expand Up @@ -974,6 +981,11 @@ if [ "$1" = '-startuptime' -o "$1" = '--startuptime' ]; then
exec sage-startuptime.py "$@"
fi

if [ "$1" = '-fiximports' -o "$1" = '--fiximports' ]; then
shift
exec sage-python -m sage.misc.replace_dot_all "$@"
fi

if [ "$1" = '-tox' -o "$1" = '--tox' ]; then
shift
if [ -n "$SAGE_SRC" -a -f "$SAGE_SRC/tox.ini" ]; then
Expand Down
6 changes: 3 additions & 3 deletions src/bin/sage-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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='9.8.rc1'
SAGE_RELEASE_DATE='2023-02-05'
SAGE_VERSION_BANNER='SageMath version 9.8.rc1, Release Date: 2023-02-05'
SAGE_VERSION='10.0.beta0'
SAGE_RELEASE_DATE='2023-02-12'
SAGE_VERSION_BANNER='SageMath version 10.0.beta0, Release Date: 2023-02-12'
4 changes: 4 additions & 0 deletions src/doc/en/developer/packaging_sage_library.rst
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,10 @@ distribution -- which then must be declared as a run-time dependency.
the ``sage:`` prompt. In particular, no Sage library code should import from
:mod:`sage.rings.all`.

To audit the Sage library for such imports, use ``sage --tox -e relint``.
In most cases, the imports can be fixed automatically using the
tool ``sage --fiximports``.

- Replace module-level imports by method-level imports. Note that
this comes with a small runtime overhead, which can become
noticeable if the method is called in tight inner loops.
Expand Down
1 change: 1 addition & 0 deletions src/doc/en/reference/combinat/module_list.rst
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ Comprehensive Module List
sage/combinat/k_regular_sequence
sage/combinat/k_tableau
sage/combinat/kazhdan_lusztig
sage/combinat/key_polynomial
sage/combinat/knutson_tao_puzzles
sage/combinat/matrices/all
sage/combinat/matrices/dancing_links
Expand Down
2 changes: 2 additions & 0 deletions src/doc/en/reference/groups/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,13 @@ Groups
sage/groups/cubic_braid
sage/groups/indexed_free_group
sage/groups/raag
sage/groups/cactus_group
sage/groups/group_exp
sage/groups/group_semidirect_product
sage/groups/misc_gps/misc_groups
sage/groups/semimonomial_transformations/semimonomial_transformation_group
sage/groups/semimonomial_transformations/semimonomial_transformation
sage/groups/kernel_subgroup
sage/groups/class_function
sage/groups/conjugacy_classes

Expand Down
Loading

0 comments on commit b52a631

Please sign in to comment.