Skip to content

Commit

Permalink
Merge branch 'develop' into graphs/longest_path_parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
dcoudert authored Dec 3, 2023
2 parents 6fca7e9 + 2a9a426 commit 5e6a0aa
Show file tree
Hide file tree
Showing 63 changed files with 153 additions and 73 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci-linux-incremental.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ jobs:
- name: Determine targets to build
id: build-targets
run: |
echo "uninstall_targets=$(echo $(for a in '' ${{ steps.changed-packages.outputs.configures_all_changed_files }}; do echo $a | sed -E 's,build/pkgs/([_.a-z0-9]*)/spkg-configure[.]m4 *,\1-uninstall,'; done | sort -u))" >> $GITHUB_OUTPUT
echo "build_targets=$(echo $(for a in '' ${{ steps.changed-packages.outputs.pkgs_all_changed_files }}; do echo $a | sed -E 's,-,_,g;s,(build/)?pkgs/([-_.a-z0-9]*)/[^ ]* *,\2-ensure,;'; done | sort -u))" >> $GITHUB_OUTPUT
echo "uninstall_targets=$(echo $(for a in '' ${{ steps.changed-packages.outputs.configures_all_changed_files }}; do echo $a | sed -E 's,build/pkgs/([a-z0-9][_.a-z0-9]*)/spkg-configure[.]m4 *,\1-uninstall,'; done | sort -u))" >> $GITHUB_OUTPUT
echo "build_targets=$(echo $(for a in '' ${{ steps.changed-packages.outputs.pkgs_all_changed_files }}; do SPKG=$(echo $a | sed -E 's,-,_,g;s,(build/)?pkgs/([a-z0-9][-_.a-z0-9]*)/[^ ]* *,\2,;'); if [ -f "build/pkgs/$SPKG/checksums.ini" -o -f "build/pkgs/$SPKG/requirements.txt" -o -f "build/pkgs/$SPKG/spkg-install" ]; then echo "$SPKG-ensure"; fi; done | sort -u))" >> $GITHUB_OUTPUT
cat $GITHUB_OUTPUT
test:
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.2.rc4
version: 10.2
doi: 10.5281/zenodo.593563
date-released: 2023-11-17
date-released: 2023-12-03
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.rc4, Release Date: 2023-11-17
SageMath version 10.2, Release Date: 2023-12-03
2 changes: 2 additions & 0 deletions build/bin/sage-build-env-config.in
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ export SAGE_SUITESPARSE_PREFIX="@SAGE_SUITESPARSE_PREFIX@"

export SAGE_CONFIGURE_FFLAS_FFPACK="@SAGE_CONFIGURE_FFLAS_FFPACK@"

export SAGE_HAVE_LIBJPEG="@SAGE_HAVE_LIBJPEG@"

export CONFIGURED_SAGE_EDITABLE="@SAGE_EDITABLE@"
export CONFIGURED_SAGE_WHEELS="@SAGE_WHEELS@"

Expand Down
2 changes: 1 addition & 1 deletion build/pkgs/_recommended/dependencies
Original file line number Diff line number Diff line change
@@ -1 +1 @@
pandoc ffmpeg imagemagick texlive git
pandoc ffmpeg imagemagick texlive git libjpeg
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=374eca6cdfb4bd3dd2d3173e300639f86407077c
md5=5810e2d5a26f7457239a576b022b0a19
cksum=409095104
sha1=c769dfca6414cc453b22e64863aee153c4041e6f
md5=b098e551614a15569894e0b99b4909ff
cksum=2514200459
2 changes: 1 addition & 1 deletion build/pkgs/configure/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
dcd23be6c05f8de220a8404175c6e4175842255e
b2813506039143e6f0abe859ab67a343abf72c2e
13 changes: 13 additions & 0 deletions build/pkgs/libjpeg/SPKG.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
libjpeg: JPEG image support
===========================

Description
-----------

This dummy package represents the image library ``libjpeg``.

We do not have an SPKG for it. The purpose of this dummy package is to
associate system package lists with it.

If the system package is installed, the package ``pillow`` will include
support for JPEG images.
1 change: 1 addition & 0 deletions build/pkgs/libjpeg/distros/alpine.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
libjpeg-turbo-dev
1 change: 1 addition & 0 deletions build/pkgs/libjpeg/distros/arch.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
libjpeg-turbo
1 change: 1 addition & 0 deletions build/pkgs/libjpeg/distros/debian.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
libjpeg-dev
1 change: 1 addition & 0 deletions build/pkgs/libjpeg/distros/fedora.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
libjpeg-turbo-devel
1 change: 1 addition & 0 deletions build/pkgs/libjpeg/distros/gentoo.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
media-libs/libjpeg-turbo
1 change: 1 addition & 0 deletions build/pkgs/libjpeg/distros/homebrew.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
jpeg-turbo
1 change: 1 addition & 0 deletions build/pkgs/libjpeg/distros/nix.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
libjpeg-turbo
1 change: 1 addition & 0 deletions build/pkgs/libjpeg/distros/opensuse.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
libjpeg-devel
1 change: 1 addition & 0 deletions build/pkgs/libjpeg/distros/slackware.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
libjpeg-turbo
1 change: 1 addition & 0 deletions build/pkgs/libjpeg/distros/void.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
libjpeg-turbo-devel
7 changes: 7 additions & 0 deletions build/pkgs/libjpeg/spkg-configure.m4
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
SAGE_SPKG_CONFIGURE([libjpeg], [
PKG_CHECK_MODULES([libjpeg], [libjpeg], [
AC_SUBST([SAGE_HAVE_LIBJPEG], [1])
], [
sage_spkg_install_libjpeg=yes
])
])
1 change: 1 addition & 0 deletions build/pkgs/libjpeg/type
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
optional
4 changes: 2 additions & 2 deletions build/pkgs/pandoc/SPKG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pandoc: A document converter
Description
-----------

This script package represents the document converter pandoc.
This dummy package represents the document converter pandoc.

We do not have an SPKG for it. The purpose of this script package is to
We do not have an SPKG for it. The purpose of this dummy package is to
associate system package lists with it.
6 changes: 3 additions & 3 deletions build/pkgs/pillow/checksums.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
tarball=Pillow-VERSION.tar.gz
sha1=47c1f2179bc7de5e3413feed08f7a859854030c3
md5=93a0585ab0ee9717a7576129bdabdf93
cksum=3176045361
sha1=be2dc6aeee145894f3ccbc2358a37f7849e710aa
md5=a55618c5d2fd64048dd3ea41bc39f7cd
cksum=3616378816
upstream_url=https://pypi.io/packages/source/p/pillow/Pillow-VERSION.tar.gz
2 changes: 1 addition & 1 deletion build/pkgs/pillow/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.0.1
10.1.0
8 changes: 5 additions & 3 deletions build/pkgs/pillow/spkg-install.in
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
cd src

if [ "$CONDA_PREFIX" != "" ]; then
# Quoted quotes so that whitespace in CONDA_PREFIX works correctly.
# Below we run the command line through eval.
PILLOW_CONFIG_SETTINGS="$PILLOW_CONFIG_SETTINGS -C platform-guessing=disable"
fi

PILLOW_CONFIG_SETTINGS="-C debug=true -C jpeg=disable $PILLOW_CONFIG_SETTINGS"
if [ "$SAGE_HAVE_LIBJPEG" != 1 ]; then
PILLOW_CONFIG_SETTINGS="-C jpeg=disable $PILLOW_CONFIG_SETTINGS"
fi

PILLOW_CONFIG_SETTINGS="-C debug=true $PILLOW_CONFIG_SETTINGS"

eval sdh_pip_install $PILLOW_CONFIG_SETTINGS .
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 ~= 10.2rc4
sage-conf ~= 10.2
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 ~= 10.2rc4
sage-docbuild ~= 10.2
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 ~= 10.2rc4
sage-setup ~= 10.2
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 ~= 10.2rc4
sage-sws2rst ~= 10.2
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
sagemath-standard ~= 10.2rc4
sagemath-standard ~= 10.2
2 changes: 1 addition & 1 deletion build/pkgs/sagemath_bliss/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-bliss ~= 10.2rc4
sagemath-bliss ~= 10.2
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 ~= 10.2rc4
sagemath-categories ~= 10.2
2 changes: 1 addition & 1 deletion build/pkgs/sagemath_coxeter3/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-coxeter3 ~= 10.2rc4
sagemath-coxeter3 ~= 10.2
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 ~= 10.2rc4
sagemath-environment ~= 10.2
2 changes: 1 addition & 1 deletion build/pkgs/sagemath_mcqd/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-mcqd ~= 10.2rc4
sagemath-mcqd ~= 10.2
2 changes: 1 addition & 1 deletion build/pkgs/sagemath_meataxe/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-meataxe ~= 10.2rc4
sagemath-meataxe ~= 10.2
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 ~= 10.2rc4
sagemath-objects ~= 10.2
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 ~= 10.2rc4
sagemath-repl ~= 10.2
2 changes: 1 addition & 1 deletion build/pkgs/sagemath_sirocco/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-sirocco ~= 10.2rc4
sagemath-sirocco ~= 10.2
2 changes: 1 addition & 1 deletion build/pkgs/sagemath_tdlib/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-tdlib ~= 10.2rc4
sagemath-tdlib ~= 10.2
20 changes: 11 additions & 9 deletions build/sage_bootstrap/uninstall.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,17 @@ def modern_uninstall(spkg_name, sage_local, files, verbose=False):
else:
sys.exit(1)

# Run the package's piprm script, if it exists.
# Since #36452 the spkg-requirements.txt file appears in the installation
# manifest, so this step has to happen before removing the files.
try:
run_spkg_script(spkg_name, spkg_scripts, 'piprm',
'pip-uninstall')
except Exception:
print("Warning: Error running the pip-uninstall script for "
"'{0}'; uninstallation may have left behind some files".format(
spkg_name), file=sys.stderr)

def rmdir(dirname):
if pth.isdir(dirname):
if not os.listdir(dirname):
Expand Down Expand Up @@ -200,15 +211,6 @@ def rmdir(dirname):
# Remove file's directory if it is now empty
rmdir(dirname)

# Run the package's piprm script, if it exists.
try:
run_spkg_script(spkg_name, spkg_scripts, 'piprm',
'pip-uninstall')
except Exception:
print("Warning: Error running the pip-uninstall script for "
"'{0}'; uninstallation may have left behind some files".format(
spkg_name), file=sys.stderr)

# Run the package's postrm script, if it exists.
# If an error occurs here print a warning, but complete the
# uninstallation; otherwise we leave the package in a broken
Expand Down
2 changes: 1 addition & 1 deletion pkgs/sage-conf/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.2.rc4
10.2
2 changes: 1 addition & 1 deletion pkgs/sage-conf_conda/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.2.rc4
10.2
2 changes: 1 addition & 1 deletion pkgs/sage-conf_pypi/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.2.rc4
10.2
2 changes: 1 addition & 1 deletion pkgs/sage-docbuild/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.2.rc4
10.2
2 changes: 1 addition & 1 deletion pkgs/sage-setup/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.2.rc4
10.2
2 changes: 1 addition & 1 deletion pkgs/sage-sws2rst/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.2.rc4
10.2
2 changes: 1 addition & 1 deletion pkgs/sagemath-bliss/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.2.rc4
10.2
2 changes: 1 addition & 1 deletion pkgs/sagemath-categories/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.2.rc4
10.2
2 changes: 1 addition & 1 deletion pkgs/sagemath-coxeter3/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.2.rc4
10.2
2 changes: 1 addition & 1 deletion pkgs/sagemath-environment/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.2.rc4
10.2
2 changes: 1 addition & 1 deletion pkgs/sagemath-mcqd/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.2.rc4
10.2
2 changes: 1 addition & 1 deletion pkgs/sagemath-meataxe/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.2.rc4
10.2
2 changes: 1 addition & 1 deletion pkgs/sagemath-objects/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.2.rc4
10.2
2 changes: 1 addition & 1 deletion pkgs/sagemath-repl/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.2.rc4
10.2
2 changes: 1 addition & 1 deletion pkgs/sagemath-sirocco/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.2.rc4
10.2
2 changes: 1 addition & 1 deletion pkgs/sagemath-tdlib/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.2.rc4
10.2
2 changes: 1 addition & 1 deletion src/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.2.rc4
10.2
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='10.2.rc4'
SAGE_RELEASE_DATE='2023-11-17'
SAGE_VERSION_BANNER='SageMath version 10.2.rc4, Release Date: 2023-11-17'
SAGE_VERSION='10.2'
SAGE_RELEASE_DATE='2023-12-03'
SAGE_VERSION_BANNER='SageMath version 10.2, Release Date: 2023-12-03'
2 changes: 1 addition & 1 deletion src/sage/graphs/graph_generators.py
Original file line number Diff line number Diff line change
Expand Up @@ -1130,7 +1130,7 @@ def nauty_genbg(self, options="", debug=False):
sage: list(graphs.nauty_genbg("-c1 2", debug=True))
['>E Usage: ...genbg [-c -ugs -vq -lzF] [-Z#] [-D#] [-A] [-d#|-d#:#] [-D#|-D#:#] n1 n2...
sage: list(graphs.nauty_genbg("-c 1 2", debug=True))
['>A ...genbg n=1+2 e=2:2 d=1:1 D=2:1 c\n', Bipartite graph on 3 vertices]
['>A ...genbg n=1+2 e=2:2 d=1:1 D=2:1 c...\n', Bipartite graph on 3 vertices]
We must have n1=1..24, n2=0..32 and n1+n2=1..32 (:trac:`34179`)::
Expand Down
29 changes: 23 additions & 6 deletions src/sage/quadratic_forms/quadratic_form__neighbors.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ def find_primitive_p_divisible_vector__next(self, p, v=None):
sage: v = Q.find_primitive_p_divisible_vector__next(5, v); v
(1, 0)
sage: v = Q.find_primitive_p_divisible_vector__next(5, v); v
sage: v = Q.find_primitive_p_divisible_vector__next(2) ; v
(0, 1)
sage: v = Q.find_primitive_p_divisible_vector__next(2, v) ; v
(1, 0)
sage: Q = QuadraticForm(QQ, matrix.diagonal([1,1,1,1]))
sage: v = Q.find_primitive_p_divisible_vector__next(2)
sage: Q(v)
Expand All @@ -83,6 +87,9 @@ def find_primitive_p_divisible_vector__next(self, p, v=None):
n = self.dim()
if v is None:
w = vector(ZZ, [0] * (n - 1) + [1])
a = self(w)
if a in ZZ and (a % p == 0):
return w
else:
w = deepcopy(v)

Expand Down Expand Up @@ -132,7 +139,7 @@ def find_primitive_p_divisible_vector__next(self, p, v=None):
return w


def find_p_neighbor_from_vec(self, p, y):
def find_p_neighbor_from_vec(self, p, y, return_matrix=False):
r"""
Return the `p`-neighbor of ``self`` defined by ``y``.
Expand All @@ -147,25 +154,32 @@ def find_p_neighbor_from_vec(self, p, y):
- ``p`` -- a prime number
- ``y`` -- a vector with `q(y) \in p \ZZ`
- ``odd`` -- (default: ``False``) if `p=2`, return also odd neighbors
- ``return_matrix`` -- (boolean, default ``False``) return
the transformation matrix instead of the quadratic form
EXAMPLES::
sage: # needs sage.libs.pari
sage: Q = DiagonalQuadraticForm(ZZ, [1,1,1,1])
sage: v = vector([0,2,1,1])
sage: X = Q.find_p_neighbor_from_vec(3, v); X # needs sage.libs.pari
sage: X = Q.find_p_neighbor_from_vec(3, v); X
Quadratic form in 4 variables over Integer Ring with coefficients:
[ 1 0 0 0 ]
[ * 1 4 4 ]
[ * * 5 12 ]
[ * * * 9 ]
sage: B = Q.find_p_neighbor_from_vec(3, v, return_matrix=True)
sage: Q(B) == X
True
Since the base ring and the domain are not yet separate,
for rational, half integral forms we just pretend
the base ring is `\ZZ`::
sage: # needs sage.libs.pari
sage: Q = QuadraticForm(QQ, matrix.diagonal([1,1,1,1]))
sage: v = vector([1,1,1,1])
sage: Q.find_p_neighbor_from_vec(2, v) # needs sage.libs.pari
sage: Q.find_p_neighbor_from_vec(2, v)
Quadratic form in 4 variables over Rational Field with coefficients:
[ 1/2 1 1 1 ]
[ * 1 1 2 ]
Expand Down Expand Up @@ -227,9 +241,12 @@ def find_p_neighbor_from_vec(self, p, y):
# by definition this is the p-neighbor of L at y
# assert B.det().abs() == 1

QF = self.parent()
Gnew = (B*G*B.T).change_ring(R)
return QF(Gnew)
if return_matrix:
return B.T
else:
QF = self.parent()
Gnew = (B*G*B.T).change_ring(R)
return QF(Gnew)


def neighbor_iteration(seeds, p, mass=None, max_classes=ZZ(10)**3,
Expand Down
Loading

0 comments on commit 5e6a0aa

Please sign in to comment.