Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
b965c94
:arrow_up: Bump jakebailey/pyright-action from 2.3.2 to 2.3.3
dependabot[bot] Sep 14, 2025
b605d7d
Fix pytest collection
tobiasdiez Aug 24, 2025
ba6736f
Allow failures of pytest collect on Windows
tobiasdiez Aug 24, 2025
6a4edcd
Convert relative to absolute imports to fix pytest collection
tobiasdiez Aug 24, 2025
3b66cfa
Fix imports
tobiasdiez Sep 8, 2025
126bd3a
Print full relative path for sage-runtests
antonio-rojas Sep 1, 2025
e050b9b
Return sage -t to make sure all env variables are properly set
antonio-rojas Sep 20, 2025
5786efd
cli: print full backtrace if there is an exception when running a file
antonio-rojas Sep 2, 2025
e19496b
Do not trap exceptions in run_file_cmd and eval_cmd
antonio-rojas Sep 14, 2025
bd05a9a
Return 0 in run_file_cmd on success
antonio-rojas Sep 14, 2025
5780f84
Fix ruff
antonio-rojas Sep 14, 2025
398398e
Fixing a bug in permuted basement NS Macdonalds and some cleanup.
tscrim Sep 9, 2025
07f6909
Moving the fix for (co)inv into the _inv_aux() method.
tscrim Sep 10, 2025
4724a82
created initial documentation for function
DisneyHogg Sep 12, 2025
ac4054a
added body of function
DisneyHogg Sep 12, 2025
36b2e4c
fixed bugs in test
DisneyHogg Sep 12, 2025
7d7f354
added bib reference
DisneyHogg Sep 12, 2025
27afb30
documentation bug fixes
DisneyHogg Sep 12, 2025
15e0a6f
Update to doi appearance in index.rst
DisneyHogg Sep 12, 2025
3ec942b
shortened creation of monomials dict
DisneyHogg Sep 23, 2025
b61b737
Rerun plural and singular/function on failure
user202729 Sep 12, 2025
ea6eb1c
Refactor flaky file list to environment variable
user202729 Sep 13, 2025
99a0c81
sync_labels_merge_commit initial
soehms Sep 17, 2025
2a6ab98
40839: review changes
soehms Sep 19, 2025
6668efb
40839: ignore merge commits if there is no positive review
soehms Sep 22, 2025
6422945
40839: Apply suggestions from code review
soehms Sep 22, 2025
c31d725
Create release just once
kwankyu Sep 18, 2025
14ca3cf
add some -> tuple annotations
fchapoton Sep 19, 2025
f07cb48
clean and annotate _gap_init_ -> str
fchapoton Sep 19, 2025
91f3a49
adding a note on Coxeter polynomials
fchapoton Sep 19, 2025
1508fc7
Workaround for linbox charpoly/minpoly issues
user202729 Sep 20, 2025
733a216
Fix pdf docbuild failure if destination file exists
vbraun Sep 20, 2025
de25170
Fix const polynomial conversion to Singular interface
user202729 Sep 21, 2025
58a0561
some care for pbori
fchapoton Sep 21, 2025
f0d28c1
removed some deprecations in structure
fchapoton Sep 21, 2025
3a94e04
remove a deprecated trace of python2
fchapoton Sep 21, 2025
22f942a
remove deprecated aliases in real_set
fchapoton Sep 21, 2025
5ec9038
remove a deprecated alias in quadratic forms
fchapoton Sep 21, 2025
b91ea3e
remove deprecated function in plot3d/texture
fchapoton Sep 21, 2025
60d9761
some typing -> bool for is_* methods
fchapoton Sep 21, 2025
8162a2f
fix mistake
fchapoton Sep 22, 2025
19085d3
suggested details
fchapoton Sep 22, 2025
9937050
sage.rings.polynomial.polynomial_singular_interface: drop unused import
orlitzky Sep 24, 2025
46e20e5
update mypy config
fchapoton Sep 24, 2025
0d12ddf
sage.categories.finite_fields: don't import from integer_ring
orlitzky Sep 24, 2025
251efa8
Updated SageMath version to 10.8.beta5
Sep 27, 2025
fe053fb
modify env.py to remove sage_conf stuff
dimpase Sep 28, 2025
31694c4
remove pkgs/sage-conf* stuff (not '_', '-')
dimpase Sep 28, 2025
154008d
fix a rebase error (?)
dimpase Sep 28, 2025
9a65783
remove sage_conf option, and no constrains on sage_conf
dimpase Sep 28, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 48 additions & 4 deletions .github/sync_labels.py
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,17 @@ def get_commits(self):
return self._commits

self._commits = self.view('commits')
self._commit_date = max( com['committedDate'] for com in self._commits )

# ignore merge commits with the develop branch for _commit_date unless positive review is set
date_commits = list(self._commits)
if Status.positive_review.value not in self.get_labels():
for com in self._commits:
message = com['messageHeadline']
if message.startswith('Merge') and 'develop' in message:
debug('Ignore merge commit %s for commit_date' % com['oid'])
date_commits.remove(com)

self._commit_date = max(com['committedDate'] for com in date_commits)
info('Commits until %s for %s: %s' % (self._commit_date, self._issue, self._commits))
return self._commits

Expand Down Expand Up @@ -1034,6 +1044,35 @@ def run_tests(self):
elif self.is_pull_request():
self.run(action)

def test_method(self, method, *args, **kwds):
r"""
Run the given method for testing.

EXAMPLES::

sage$ python .github/sync_labels.py https://github.com/sagemath/sage/pull/40634 soehms is_auth_team_member "{'login': 'soehms'}" -t
INFO:root:cmdline_args (4) ['https://github.com/sagemath/sage/pull/40634', 'soehms', 'is_auth_team_member', "{'login': 'soehms'}"]
...
DEBUG:root:call is_auth_team_member with args () and kwds {'login': 'soehms'}
DEBUG:root:================================================================================
DEBUG:root:Execute command: gh api -X GET -H "Accept: application/vnd.github+json" /orgs/sagemath/teams/triage/memberships/soehms
INFO:root:User soehms is a member of triage
INFO:root:result of is_auth_team_member with args () and kwds {'login': 'soehms'} is True
INFO:root:================================================================================
...
"""
if hasattr(self, method):
meth = self.__getattribute__(method)
if callable(meth):
debug('call %s with args %s and kwds %s' % (method, args, kwds))
debug('='*80)
res = meth(*args, **kwds)
info('result of %s with args %s and kwds %s is %s' % (method, args, kwds, res))
info('='*80)
debug('state of self: %s' % self.__dict__)
return
raise ValueError('%s is not a method of %s' % (method, self))


###############################################################################
# Main
Expand Down Expand Up @@ -1068,8 +1107,10 @@ def run_tests(self):
num_args = len(cmdline_args)
info('cmdline_args (%s) %s' % (num_args, cmdline_args))

if run_tests and num_args in (1,2):
if num_args == 2:
if run_tests:
if num_args == 4:
url, actor, method, args = cmdline_args
elif num_args == 2:
url, actor = cmdline_args
else:
url, = cmdline_args
Expand All @@ -1079,7 +1120,10 @@ def run_tests(self):
info('actor: %s' % actor)

gh = GhLabelSynchronizer(url, actor)
gh.run_tests()
if num_args == 4:
gh.test_method(method, **eval(args))
else:
gh.run_tests()

elif num_args == 5:
action, url, actor, label, rev_state = cmdline_args
Expand Down
23 changes: 21 additions & 2 deletions .github/workflows/ci-meson.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ jobs:
test:
name: Conda (${{ matrix.os }}, Python ${{ matrix.python }}, ${{ matrix.tests }}${{ matrix.editable && ', editable' || '' }})
runs-on: ${{ matrix.os }}-latest
env:
SEPARATELY_TESTED_FLAKY_FILES: "src/sage/libs/singular/function.pyx src/sage/rings/polynomial/plural.pyx"

strategy:
fail-fast: false
Expand Down Expand Up @@ -168,9 +170,22 @@ jobs:
pytest --doctest-ignore-import-errors --doctest -rfEs -s src || true
else
pytest -rfEs -s src
./sage -t ${{ matrix.tests == 'all' && '--all' || '--new --long' }} -p4 --format github
./sage -t ${{
matrix.tests == 'all' &&
'--all-except="$SEPARATELY_TESTED_FLAKY_FILES"' ||
'--new --long' }} -p4 --format github
fi

- name: Test flaky files
# unknown issues with plural.pyx causes sporadic failure: https://github.com/sagemath/sage/issues/29528
# we rerun a few times, this step succeeds if any of the 5 runs succeed
if: runner.os != 'windows' && matrix.tests == 'all'
shell: bash -l {0}
run: |
for i in {1..5}; do
./sage -t -p4 --format github $SEPARATELY_TESTED_FLAKY_FILES && break
done

- name: Check that all modules can be imported
shell: bash -l {0}
run: |
Expand All @@ -179,7 +194,11 @@ jobs:
# The following command checks that all modules can be imported.
# The output also includes a long list of modules together with the number of tests in each module.
# This can be ignored.
pytest -qq --doctest --collect-only || true
if [[ "${{ matrix.os }}" == "windows" ]]; then
pytest -qq --doctest --collect-only || true
else
pytest -qq --doctest --collect-only
fi

- name: Upload log
uses: actions/upload-artifact@v4.5.0
Expand Down
22 changes: 20 additions & 2 deletions .github/workflows/dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,14 +133,32 @@ jobs:
name: dist
path: dist

- name: Create release assets
- name: Create release notes
env:
GITHUB_PAT: ${{ secrets.RELEASE_CREATION_TOKEN }}
run: |
latest_release_tag=$(curl -s https://api.github.com/repos/${{ github.repository }}/releases \
| jq -r 'sort_by(.created_at) | last(.[]).tag_name')
release_notes=$(curl -s \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer $GITHUB_PAT" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/${{ github.repository }}/releases/generate-notes \
-d "{
\"tag_name\": \"${{ github.ref_name }}\",
\"previous_tag_name\": \"$latest_release_tag\"
}" | jq -r '.body')
echo "$release_notes" > release_notes

- name: Create release
uses: softprops/action-gh-release@v2
with:
files: |
dist/*
upstream/*
token: ${{ secrets.RELEASE_CREATION_TOKEN }}
generate_release_notes: true
body_path: release_notes
prerelease: ${{ contains(github.ref_name, 'beta') || contains(github.ref_name, 'rc') }}

build_wheels:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pyright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
# No need to build sagelib; pyright only needs the libraries from which sagelib imports

- name: Static code check with pyright
uses: jakebailey/pyright-action@v2.3.2
uses: jakebailey/pyright-action@v2.3.3
with:
version: 1.1.332
annotate: "errors"
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.8.beta4
version: 10.8.beta5
doi: 10.5281/zenodo.8042260
date-released: 2025-09-21
date-released: 2025-09-27
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 @@
10.8.beta4
10.8.beta5
4 changes: 2 additions & 2 deletions build/pkgs/configure/checksums.ini
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
tarball=configure-VERSION.tar.gz
sha1=5d512119d3ad3e0a3fefa64f26674c25529d241d
sha256=42aa2aed7c199ada325f80a64ad4c3626378b84bb19519e68b024a617ca79ca6
sha1=b36924b2391937313f3b2037eb1ffa4e3a9b2d81
sha256=ec9a7a235593430352081443b1089403452ec349a202b2ca5cd73ceb63bbe26c
2 changes: 1 addition & 1 deletion build/pkgs/configure/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
9c1da99ac79711edccbad5590ed73d14495a0b43
0ef31d1493e6873bbdb7e14f91c57275ba3b20ee
2 changes: 1 addition & 1 deletion build/pkgs/sage_docbuild/version_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This file is updated on every release by the update-version script
sage-docbuild ~= 10.8b3
sage-docbuild ~= 10.8b4
2 changes: 1 addition & 1 deletion build/pkgs/sage_setup/version_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This file is updated on every release by the update-version script
sage-setup ~= 10.8b3
sage-setup ~= 10.8b4
2 changes: 1 addition & 1 deletion build/pkgs/sagemath_bliss/version_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This file is updated on every release by the update-version script
sagemath-bliss ~= 10.8b3
sagemath-bliss ~= 10.8b4
2 changes: 1 addition & 1 deletion build/pkgs/sagemath_categories/version_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This file is updated on every release by the update-version script
sagemath-categories ~= 10.8b3
sagemath-categories ~= 10.8b4
2 changes: 1 addition & 1 deletion build/pkgs/sagemath_coxeter3/version_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This file is updated on every release by the update-version script
sagemath-coxeter3 ~= 10.8b3
sagemath-coxeter3 ~= 10.8b4
2 changes: 1 addition & 1 deletion build/pkgs/sagemath_environment/version_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This file is updated on every release by the update-version script
sagemath-environment ~= 10.8b3
sagemath-environment ~= 10.8b4
2 changes: 1 addition & 1 deletion build/pkgs/sagemath_mcqd/version_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This file is updated on every release by the update-version script
sagemath-mcqd ~= 10.8b3
sagemath-mcqd ~= 10.8b4
2 changes: 1 addition & 1 deletion build/pkgs/sagemath_meataxe/version_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This file is updated on every release by the update-version script
sagemath-meataxe ~= 10.8b3
sagemath-meataxe ~= 10.8b4
2 changes: 1 addition & 1 deletion build/pkgs/sagemath_objects/version_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This file is updated on every release by the update-version script
sagemath-objects ~= 10.8b3
sagemath-objects ~= 10.8b4
2 changes: 1 addition & 1 deletion build/pkgs/sagemath_repl/version_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This file is updated on every release by the update-version script
sagemath-repl ~= 10.8b3
sagemath-repl ~= 10.8b4
2 changes: 1 addition & 1 deletion build/pkgs/sagemath_sirocco/version_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This file is updated on every release by the update-version script
sagemath-sirocco ~= 10.8b3
sagemath-sirocco ~= 10.8b4
2 changes: 1 addition & 1 deletion build/pkgs/sagemath_tdlib/version_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This file is updated on every release by the update-version script
sagemath-tdlib ~= 10.8b3
sagemath-tdlib ~= 10.8b4
8 changes: 0 additions & 8 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -490,14 +490,6 @@ AS_IF([test "x$enable_download_from_upstream_url" = "xyes"], [
])
AC_SUBST([SAGE_SPKG_OPTIONS])

AC_ARG_ENABLE([sage_conf],
AS_HELP_STRING([--disable-sage_conf],
[disable build of the sage_conf package]), [
for pkg in sage_conf; do
AS_VAR_SET([SAGE_ENABLE_$pkg], [$enableval])
done
])

AC_ARG_ENABLE([cvxopt],
AS_HELP_STRING([--disable-cvxopt],
[disable build of the cvxopt package and its prerequisite suitesparse]), [
Expand Down
40 changes: 37 additions & 3 deletions conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,17 @@
from pathlib import Path


def is_subpath(path: Path, parent: Path) -> bool:
# Check if the path is in a subdirectory, or a subsubdirectory, ... of the parent
path = path.resolve()
parent = parent.resolve()
try:
path.relative_to(parent)
return True
except ValueError:
return False


class SageDoctestModule(DoctestModule):
"""
This is essentially a copy of `DoctestModule` from
Expand Down Expand Up @@ -111,9 +122,10 @@ def _find(
"valgrind",
"rpy2",
"sage.libs.coxeter3.coxeter",
"sagemath_giac",
):
pytest.skip(
f"unable to import module { self.path } due to missing feature { exception.name }"
f"unable to import module {self.path} due to missing feature {exception.name}"
)
raise
# Uses internal doctest module parsing mechanism.
Expand All @@ -135,12 +147,12 @@ def _find(
)
except FeatureNotPresentError as exception:
pytest.skip(
f"unable to import module { self.path } due to missing feature { exception.feature.name }"
f"unable to import module {self.path} due to missing feature {exception.feature.name}"
)
except ModuleNotFoundError as exception:
# TODO: Remove this once all optional things are using Features
pytest.skip(
f"unable to import module { self.path } due to missing module { exception.name }"
f"unable to import module {self.path} due to missing module {exception.name}"
)


Expand Down Expand Up @@ -256,6 +268,28 @@ def pytest_collect_file(
return SageDoctestModule.from_parent(parent, path=file_path)


def pytest_ignore_collect(
collection_path: Path, path: str, config: pytest.Config
) -> None | bool:
"""
This hook is called when collecting test files, and can be used to
prevent considering this path for collection by returning ``True``.

See `pytest documentation <https://docs.pytest.org/en/latest/reference/reference.html#pytest.hookspec.pytest_ignore_collect>`_.
"""
root = config.rootpath
if (
is_subpath(collection_path, root / "src" / "sage_docbuild")
or is_subpath(collection_path, root / "src" / "sage_setup")
or collection_path == root / "src" / "build-docs.py"
):
# Fails to import with Meson
return True
if collection_path.name == "all.py":
# all.py do not contain tests and may fail when imported twice / in the wrong order
return True


def pytest_addoption(parser):
# Add a command line option to run doctests
# (we don't use the built-in --doctest-modules option because then doctests are collected twice)
Expand Down
1 change: 0 additions & 1 deletion constraints_pkgs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
# Reference on the format:
# https://pip.pypa.io/en/stable/user_guide/#constraints-files
#
sage_conf @ file://${SAGE_ROOT}/pkgs/sage-conf
sage_docbuild @ file://${SAGE_ROOT}/pkgs/sage-docbuild
sage_setup @ file://${SAGE_ROOT}/pkgs/sage-setup
sagemath-bliss @ file://${SAGE_ROOT}/pkgs/sagemath-bliss
Expand Down
5 changes: 0 additions & 5 deletions pkgs/sage-conf/.gitignore

This file was deleted.

1 change: 0 additions & 1 deletion pkgs/sage-conf/MANIFEST.in

This file was deleted.

Loading