Skip to content

Commit

Permalink
Merge branch 'sagemath:develop' into chow_ring
Browse files Browse the repository at this point in the history
  • Loading branch information
25shriya authored Jun 26, 2024
2 parents ad4c43c + ab24dac commit 3f9d2a0
Show file tree
Hide file tree
Showing 457 changed files with 4,673 additions and 2,552 deletions.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion .github/workflows/ci-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ jobs:
"linuxmint-21.2",
"fedora-38",
"fedora-39",
"centos-stream-8-python3.9",
"centos-stream-9-python3.9",
"almalinux-8-python3.9",
"gentoo-python3.10",
Expand Down
30 changes: 23 additions & 7 deletions .github/workflows/doc-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,10 @@ jobs:
new_version=$(docker exec BUILD cat src/VERSION.txt)
mkdir -p docs/
docker cp BUILD:/sage/local/share/doc/sage/html docs/
# Wipe out chronic diffs between old doc and new doc
# Wipe out chronic diffs of old doc against new doc
(cd docs && \
find . -name "*.html" | xargs sed -i -e '/class="sidebar-brand-text"/ s/Sage [0-9a-z.]* /Sage '"$new_version"' /' \
-e '/This is documentation for/ s/ built with GitHub PR [^.]*././' \
-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
Expand Down Expand Up @@ -166,7 +166,13 @@ jobs:
docker cp BUILD:/sage/local/share/doc/sage/html docs
docker cp BUILD:/sage/local/share/doc/sage/index.html docs
(cd docs && git commit -a -m 'new')
# Wipe out chronic diffs of new doc against old doc
(cd docs && \
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]*"/"/')
.ci/create-changes-html.sh $(cd docs && git rev-parse HEAD^) docs
# Restore the new doc from changes by "wipe out"
(cd docs && git checkout -f)
(cd docs && rm -rf .git)
mv CHANGES.html docs
# We also need to replace the symlinks because netlify is not following them
Expand All @@ -176,15 +182,25 @@ jobs:
zip -r docs.zip docs
- name: Upload docs
id: upload
if: (success() || failure()) && steps.copy.outcome == 'success'
uses: actions/upload-artifact@v3
with:
name: docs
path: docs.zip

- name: Save space
id: savespace
if: (success() || failure()) && steps.upload.outcome == 'success' && github.repository == 'sagemath/sage' && github.ref == 'refs/heads/develop'
run: |
set -ex
# Save space on runner device before we start to build livedoc
rm -rf docs/
rm -f docs.zip
- name: Build live doc
id: buildlivedoc
if: (success() || failure()) && steps.copy.outcome == 'success' && github.repository == 'sagemath/sage' && github.ref == 'refs/heads/develop'
if: (success() || failure()) && steps.savespace.outcome == 'success'
run: |
export MAKE="make -j5 --output-sync=recurse" SAGE_NUM_THREADS=5
export PATH="build/bin:$PATH"
Expand All @@ -203,11 +219,11 @@ jobs:
if: (success() || failure()) && steps.buildlivedoc.outcome == 'success'
run: |
mkdir -p ./livedoc
cp -r -L /sage/local/share/doc/sage/html ./livedoc
cp -r -L /sage/local/share/doc/sage/pdf ./livedoc
cp /sage/local/share/doc/sage/index.html ./livedoc
# 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
zip -r livedoc.zip livedoc
shell: sh .ci/docker-exec-script.sh BUILD . {0}
- name: Upload live doc
if: (success() || failure()) && steps.copylivedoc.outcome == 'success'
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ on:
"fedora-39",
"fedora-40",
"centos-7-devtoolset-gcc_11",
"centos-stream-8-python3.9",
"centos-stream-9-python3.9",
"almalinux-8-python3.9",
"almalinux-9-python3.11",
Expand Down
12 changes: 5 additions & 7 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,12 @@ jobs:
GH_TOKEN: ${{ github.token }}
SAGE_CI_FIXES_FROM_REPOSITORIES: ${{ vars.SAGE_CI_FIXES_FROM_REPOSITORIES }}

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.9

- name: Install dependencies
- name: Install test prerequisites
id: deps
run: pip install tox
# From docker.yml
run: |
sudo DEBIAN_FRONTEND=noninteractive apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get install tox
- name: Code style check with ruff-minimal
if: (success() || failure()) && steps.deps.outcome == 'success'
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.beta9
version: 10.4.rc0
doi: 10.5281/zenodo.8042260
date-released: 2024-06-09
date-released: 2024-06-22
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.beta9, Release Date: 2024-06-09
SageMath version 10.4.rc0, Release Date: 2024-06-22
113 changes: 48 additions & 65 deletions bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ cd "$SAGE_ROOT"

export PATH="$SAGE_ROOT/build/bin:$PATH"

PKG=build/pkgs/configure
MAKE="${MAKE:-make}"
CONFVERSION=$(cat $PKG/package-version.txt)


bootstrap () {
Expand All @@ -54,6 +52,7 @@ bootstrap () {
for a in m4/sage_spkg_versions.m4 m4/sage_spkg_versions_toml.m4; do
echo 'changequote(`>>>'"'"', `<<<'"')dnl" >> $a
done
eval $(sage-package properties --format=shell :all:)
spkg_configures=""
# initialize SAGE_ENABLE... options for standard packages
for pkgname in $(sage-package list :standard:); do
Expand All @@ -62,75 +61,67 @@ AS_VAR_SET_IF([SAGE_ENABLE_$pkgname], [], [AS_VAR_SET([SAGE_ENABLE_$pkgname], [y
done
# --enable-SPKG options
for pkgname in $(sage-package list :optional: :experimental:); do
eval DIR=\$path_$pkgname pkgtype=\$type_$pkgname pkgsource=\$source_$pkgname
case "$pkgname:$pkgsource" in
*:pip)
# Issue #29629: Temporary solution for Sage 9.1: Do not provide
# --enable-SPKG options for installing pip packages
if [ ! -f build/pkgs/$pkgname/requirements.txt ]; then
pkgtype="$(cat build/pkgs/$pkgname/type)"
# Issue #29124: Do not provide --enable-_recommended and similar
case "$pkgname" in
_*) ;;
*) spkg_configures="$spkg_configures
;;
_*:*)
# Issue #29124: Do not provide --enable-_recommended and similar
;;
*:none)
# Issue #31163: Just an optional dummy package
spkg_configures="$spkg_configures
AC_SUBST(SAGE_ENABLE_$pkgname, [if_installed])"
if [ -f build/pkgs/$pkgname/spkg-install -o -f build/pkgs/$pkgname/spkg-install.in ]; then
# Issue #31163: Not just an optional dummy package
spkg_configures="$spkg_configures
SAGE_SPKG_ENABLE([$pkgname], [$pkgtype], [$(grep -v ^= build/pkgs/$pkgname/SPKG.rst | head -n1 2>/dev/null || echo $pkgname)])"
fi
;;
esac
fi
;;
*:*)
spkg_configures="$spkg_configures
AC_SUBST(SAGE_ENABLE_$pkgname, [if_installed])"
spkg_configures="$spkg_configures
SAGE_SPKG_ENABLE([$pkgname], [$pkgtype], [$(grep -v ^= "$DIR/SPKG.rst" | head -n1 2>/dev/null || echo $pkgname)])"
;;
esac
done
cat >> m4/sage_spkg_configures.m4 <<EOF
SAGE_SPKG_COLLECT_INIT([$(echo $(sage-package list))])
EOF
for pkgname in $(sage-package list --has-file spkg-configure.m4); do
echo "m4_sinclude([build/pkgs/$pkgname/spkg-configure.m4])"
eval DIR=\$path_$pkgname
echo "m4_sinclude([$DIR/spkg-configure.m4])"
config="SAGE_SPKG_CONFIGURE_$(echo ${pkgname} | tr '[a-z]' '[A-Z]')"
if grep -q SAGE_PYTHON_PACKAGE_CHECK build/pkgs/$pkgname/spkg-configure.m4; then
if grep -q SAGE_PYTHON_PACKAGE_CHECK "$DIR/spkg-configure.m4"; then
spkg_configures_python="$spkg_configures_python
$config"
else
spkg_configures="$spkg_configures
$config"
fi
done >> m4/sage_spkg_configures.m4
cat >> m4/sage_spkg_configures.m4 <<EOF
$spkg_configures
$spkg_configures_python
EOF
for pkgname in $(sage-package list); do
DIR=build/pkgs/$pkgname
pkgtype="$(cat $DIR/type)"
if test -f "$DIR/requirements.txt"; then
SPKG_SOURCE=pip
elif test ! -f "$DIR/checksums.ini"; then
if test -f "$DIR/spkg-install" -o -f "$DIR/spkg-install.in"; then
SPKG_SOURCE=script
else
# a dummy package
SPKG_SOURCE=none
fi
else
SPKG_SOURCE=normal
fi
if test -f "$DIR/trees.txt"; then
SPKG_TREE_VAR="$(sed "s/#.*//;" "$DIR/trees.txt")"
else
SPKG_TREE_VAR=SAGE_LOCAL
if test -f "$DIR/requirements.txt" -o -f "$DIR/version_requirements.txt"; then
# A Python package
SPKG_TREE_VAR=SAGE_VENV
echo "define(>>>SPKG_INSTALL_REQUIRES_${pkgname}<<<, >>>$(echo $(sage-get-system-packages install-requires ${pkgname}))<<<)dnl" >> m4/sage_spkg_versions.m4
echo "define(>>>SPKG_INSTALL_REQUIRES_${pkgname}<<<, >>>$(echo $(sage-get-system-packages install-requires-toml ${pkgname}))<<<)dnl" >> m4/sage_spkg_versions_toml.m4
fi
eval DIR=\$path_$pkgname pkgtype=\$type_$pkgname SPKG_SOURCE=\$source_$pkgname SPKG_TREE_VAR=\$trees_$pkgname
if test -f "$DIR/requirements.txt" -o -f "$DIR/version_requirements.txt"; then
# A Python package
echo "define(>>>SPKG_INSTALL_REQUIRES_${pkgname}<<<, >>>$(echo $(sage-get-system-packages install-requires ${pkgname}))<<<)dnl" >> m4/sage_spkg_versions.m4
INSTALL_REQUIRES_TOML=
echo "define(>>>SPKG_INSTALL_REQUIRES_${pkgname}<<<, >>>$(echo $(sage-get-system-packages install-requires-toml ${pkgname}))<<<)dnl" >> m4/sage_spkg_versions_toml.m4
echo "m4_define([SPKG_INSTALL_REQUIRES_${pkgname}], [[$(echo $(sage-get-system-packages install-requires-toml ${pkgname} | sed 's/"/\\"/g'))]])dnl" >> m4/sage_spkg_configures.m4
fi
spkg_finalizes="$spkg_finalizes
SAGE_SPKG_FINALIZE([$pkgname], [$pkgtype], [$SPKG_SOURCE], [$SPKG_TREE_VAR])"
done
echo "$spkg_finalizes" >> m4/sage_spkg_configures.m4
for a in m4/sage_spkg_versions.m4 m4/sage_spkg_versions_toml.m4; do
echo 'changequote(>>>`<<<, >>>'"'"'<<<)dnl' >> $a
done
cat >> m4/sage_spkg_configures.m4 <<EOF
$spkg_configures
$spkg_configures_python
$spkg_finalizes
EOF

for pkgname in $(sage-package list --has-file bootstrap "$@"); do
(cd build/pkgs/$pkgname && if [ -x bootstrap ]; then ./bootstrap; else echo >&2 "bootstrap:$LINENO: Nothing to do for $pkgname"; fi) || exit 1
eval DIR=\$path_$pkgname
(cd "$DIR" && if [ -x bootstrap ]; then ./bootstrap; else echo >&2 "bootstrap:$LINENO: Nothing to do for $pkgname"; fi) || exit 1
done

if [ $# != 0 ]; then
Expand Down Expand Up @@ -196,10 +187,10 @@ SAGE_SPKG_FINALIZE([$pkgname], [$pkgtype], [$SPKG_SOURCE], [$SPKG_TREE_VAR])"
bootstrap_download () {
SAGE_DL_LOGLEVEL=""
[ "${BOOTSTRAP_QUIET}" = "yes" ] && SAGE_DL_LOGLEVEL="--log=WARNING"
sage-download-file ${SAGE_DL_LOGLEVEL} configure-$CONFVERSION.tar.gz

CONFBALL=$(sage-package download $SAGE_DL_LOGLEVEL configure)
if [ $? -ne 0 ]; then
echo >&2 "Error: downloading configure-$CONFVERSION.tar.gz failed"
echo >&2 "Error: downloading configure tarball failed"
exit 1
fi

Expand Down Expand Up @@ -255,16 +246,8 @@ save () {
build/pkgs/setuptools/version_requirements.txt \
build/pkgs/wheel/version_requirements.txt

# Update version
echo "$NEWCONFVERSION" >$PKG/package-version.txt

# Compute checksum
if [ "${BOOTSTRAP_QUIET}" = "no" ]; then
sage-package fix-checksum configure
else
# Hide the "Updating checksum..." message
sage-package fix-checksum configure > /dev/null
fi
# Update version; this re-computes the checksum
sage-package update configure "$NEWCONFVERSION"
}


Expand Down Expand Up @@ -304,7 +287,6 @@ do
done
shift $(($OPTIND - 1))
export BOOTSTRAP_QUIET
CONFBALL="upstream/configure-$CONFVERSION.tar.gz"

if [ $DOWNLOAD$SAVE = yesyes ]; then
echo >&2 "$0: refusing to download and save."
Expand All @@ -331,15 +313,16 @@ mkdir -p config 2>/dev/null

if [ $ALWAYSDOWNLOAD = yes ]; then
if [ -n "$CONFTARBALL_URL" ]; then
URL="$CONFTARBALL_URL"/configure-$CONFVERSION.tar.gz
CONFTARBALL=$(sage-package tarball configure)
URL="$CONFTARBALL_URL"/"$CONFTARBALL"
SAGE_DL_LOGLEVEL=""
[ "${BOOTSTRAP_QUIET}" = "yes" ] && SAGE_DL_LOGLEVEL="--log=WARNING"
sage-download-file ${SAGE_DL_LOGLEVEL} "$URL" upstream/configure-$CONFVERSION.tar.gz
sage-download-file ${SAGE_DL_LOGLEVEL} "$URL" upstream/"$CONFTARBALL"
if [ $? -ne 0 ]; then
echo >&2 "Error: downloading configure-$CONFVERSION.tar.gz from $CONFTARBALL_URL failed"
echo >&2 "Error: downloading $CONFTARBALL from $CONFTARBALL_URL failed"
exit 1
fi
echo >&2 "Downloaded configure-$CONFVERSION.tar.gz from $CONFTARBALL_URL "
echo >&2 "Downloaded $CONFTARBALL from $CONFTARBALL_URL "
else
bootstrap_download || exit $?
fi
Expand Down
8 changes: 4 additions & 4 deletions bootstrap-conda
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@ SAGELIB_PACKAGES=
SAGELIB_OPTIONAL_PACKAGES=
DEVELOP_PACKAGES=

eval $(sage-package properties --format=shell :all:)

for PKG_BASE in $(sage-package list --has-file distros/conda.txt --exclude _sagemath); do
PKG_SCRIPTS=build/pkgs/$PKG_BASE
eval PKG_SCRIPTS=\$path_$PKG_BASE PKG_TYPE=\$type_$PKG_BASE
SYSTEM_PACKAGES_FILE=$PKG_SCRIPTS/distros/conda.txt
PKG_TYPE=$(cat $PKG_SCRIPTS/type)
PKG_SYSTEM_PACKAGES=$(echo $(${STRIP_COMMENTS} $SYSTEM_PACKAGES_FILE))
if [ -n "$PKG_SYSTEM_PACKAGES" ]; then
if [ -f $PKG_SCRIPTS/spkg-configure.m4 ]; then
Expand Down Expand Up @@ -133,12 +134,11 @@ echo >&2 $0:$LINENO: generate conda environment files
echo >&4 " - pip:"
echo >&5 " - pip:"
for PKG_BASE in $(sage-package list :standard: :optional: --has-file requirements.txt --no-file distros/conda.txt --no-file src; sage-package list :standard: :optional: --has-file version_requirements.txt --no-file requirements.txt --no-file distros/conda.txt --no-file src); do
PKG_SCRIPTS=build/pkgs/$PKG_BASE
eval PKG_SCRIPTS=\$path_$PKG_BASE PKG_TYPE=\$type_$PKG_BASE
SYSTEM_PACKAGES_FILE=$PKG_SCRIPTS/requirements.txt
if [ ! -f $SYSTEM_PACKAGES_FILE ]; then
SYSTEM_PACKAGES_FILE=$PKG_SCRIPTS/version_requirements.txt
fi
PKG_TYPE=$(cat $PKG_SCRIPTS/type)
if grep -q SAGERUNTIME $PKG_SCRIPTS/dependencies $PKG_SCRIPTS/dependencies_order_only 2>/dev/null; then
: # cannot install packages that depend on the Sage library
else
Expand Down
Loading

0 comments on commit 3f9d2a0

Please sign in to comment.