Skip to content

Commit

Permalink
Merge branch 'develop' into pyproject-sagelib
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasdiez authored Apr 11, 2024
2 parents 46f89a6 + 8ea5214 commit 744da89
Show file tree
Hide file tree
Showing 2,376 changed files with 28,645 additions and 17,521 deletions.
2 changes: 1 addition & 1 deletion .ci/create-changes-html.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ echo '<script>hljs.highlightAll();</script>' >> CHANGES.html
cat >> CHANGES.html << EOF
<script>
document.addEventListener('DOMContentLoaded', () => {
const baseDocURL = 'https://sagemath.netlify.app'
const diffSite = 'https://pianomister.github.io/diffsite'
const baseDocURL = 'https://sagemath-tobias.netlify.app'
const diffParagraphs = document.querySelectorAll('p.diff');
diffParagraphs.forEach(paragraph => {
const rootURL = window.location.origin;
Expand Down
3 changes: 2 additions & 1 deletion .ci/merge-fixes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ for REPO in ${SAGE_CI_FIXES_FROM_REPOSITORIES:-sagemath/sage}; do
# Considered alternative: Use https://github.com/$REPO/pull/$a.diff,
# which squashes everything into one diff without commit metadata.
PULL_URL="https://github.com/$REPO/pull/$a"
PULL_SHORT="$REPO#$a"
PULL_FILE="$REPO_FILE-$a"
PATH=build/bin:$PATH build/bin/sage-download-file --quiet "$PULL_URL.patch" $PULL_FILE.patch
date -u +"%Y-%m-%dT%H:%M:%SZ" > $PULL_FILE.date # Record the date, for future reference
Expand All @@ -67,7 +68,7 @@ for REPO in ${SAGE_CI_FIXES_FROM_REPOSITORIES:-sagemath/sage}; do
git am --signoff --show-current-patch=diff
echo "--------------------------------------------------------------------8<-----------------------------"
echo "::endgroup::"
echo "Failure applying $PULL_URL as a patch, resetting"
echo "Failure applying $PULL_SHORT as a patch, resetting"
git am --signoff --abort
fi
done
Expand Down
5 changes: 2 additions & 3 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,12 @@
"vscode": {
"extensions": [
"guyskk.language-cython",
"ms-python.isort",
"ms-toolsai.jupyter",
"ms-python.vscode-pylance",
"ms-python.pylint",
"ms-python.python",
"lextudio.restructuredtext",
"trond-snekvik.simple-rst"
"trond-snekvik.simple-rst",
"charliermarsh.ruff"
]
}
}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ jobs:
uses: actions/checkout@v4
- name: Merge CI fixes from sagemath/sage
run: |
.ci/merge-fixes.sh
mkdir -p upstream
.ci/merge-fixes.sh 2>&1 | tee upstream/ci_fixes.log
env:
GH_TOKEN: ${{ github.token }}
SAGE_CI_FIXES_FROM_REPOSITORIES: ${{ vars.SAGE_CI_FIXES_FROM_REPOSITORIES }}
- name: Store CI fixes in upstream artifact
run: |
mkdir -p upstream
if git format-patch --stdout test_base > ci_fixes.patch; then
cp ci_fixes.patch upstream/
fi
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ jobs:
uses: ./.github/workflows/docker.yml
with:
# Build from scratch
free_disk_space: true
docker_targets: "with-system-packages configured with-targets-pre with-targets"
# FIXME: duplicated from env.TARGETS
targets_pre: all-sage-local
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/doc-build-pdf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ jobs:
uses: actions/checkout@v4
- name: Merge CI fixes from sagemath/sage
run: |
.ci/merge-fixes.sh
mkdir -p upstream
.ci/merge-fixes.sh 2>&1 | tee upstream/ci_fixes.log
env:
GH_TOKEN: ${{ github.token }}
SAGE_CI_FIXES_FROM_REPOSITORIES: ${{ vars.SAGE_CI_FIXES_FROM_REPOSITORIES }}
- name: Store CI fixes in upstream artifact
run: |
mkdir -p upstream
if git format-patch --stdout test_base > ci_fixes.patch; then
cp ci_fixes.patch upstream/
fi
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/doc-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ jobs:
uses: actions/checkout@v4
- name: Merge CI fixes from sagemath/sage
run: |
.ci/merge-fixes.sh
mkdir -p upstream
.ci/merge-fixes.sh 2>&1 | tee upstream/ci_fixes.log
env:
GH_TOKEN: ${{ github.token }}
SAGE_CI_FIXES_FROM_REPOSITORIES: ${{ vars.SAGE_CI_FIXES_FROM_REPOSITORIES }}
- name: Store CI fixes in upstream artifact
run: |
mkdir -p upstream
if git format-patch --stdout test_base > ci_fixes.patch; then
cp ci_fixes.patch upstream/
fi
Expand Down
50 changes: 43 additions & 7 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -248,9 +248,8 @@ jobs:
- name: Copy logs from the Docker image or build container
run: |
mkdir -p "artifacts/$LOGS_ARTIFACT_NAME"
cp -r .tox/$TOX_ENV/Dockerfile .tox/$TOX_ENV/log "artifacts/$LOGS_ARTIFACT_NAME"
if [ -f .tox/$TOX_ENV/Dockertags ]; then CONTAINERS=$(docker create $(tail -1 .tox/$TOX_ENV/Dockertags) /bin/bash || true); fi
if [ -n "$CONTAINERS" ]; then for CONTAINER in $CONTAINERS; do for ARTIFACT in /sage/logs; do docker cp $CONTAINER:$ARTIFACT artifacts/$LOGS_ARTIFACT_NAME && HAVE_LOG=1; done; if [ -n "$HAVE_LOG" ]; then break; fi; done; fi
cp -r .tox/$TOX_ENV/* "artifacts/$LOGS_ARTIFACT_NAME"
rm -rf "artifacts/$LOGS_ARTIFACT_NAME"/{bin,lib,pyvenv.cfg}
if: always()
- uses: actions/upload-artifact@v3
with:
Expand All @@ -262,9 +261,46 @@ jobs:
run: |
.github/workflows/scan-logs.sh "artifacts/$LOGS_ARTIFACT_NAME"
if: always()
- name: List docker images
- name: List Docker images
run: |
if [ -f .tox/$TOX_ENV/Dockertags ]; then
cat .tox/$TOX_ENV/Dockertags
if [ -n "$DOCKER_PUSH_REPOSITORY" -a -f .tox/$TOX_ENV/Dockertags.pushed ]; then
set -- $(cat .tox/$TOX_ENV/Dockertags.pushed)
case $# in
1) images="image"; one_image="the image";;
*) images="images"; one_image="one of the images";;
esac
echo "::notice title=Docker $images pushed::Pushed $images $*)"
echo
echo "To pull $one_image and enter the container, type:"
echo
for TAG in $*; do
echo " \$ docker run -it $TAG bash"
done
echo
echo "To use $one_image as the base for an incremental build, type:"
echo
TOX_ENV_SANS_INCREMENTAL=${TOX_ENV/-incremental/}
DOCKER_IMAGE=${TOX_ENV_SANS_INCREMENTAL#docker-}
for TAG in $*; do
echo -n " \$"
if [ "$DOCKER_PUSH_REPOSITORY" != "ghcr.io/sagemath/sage/" ]; then
echo -n " FROM_DOCKER_REPOSITORY=$DOCKER_PUSH_REPOSITORY"
fi
eval DOCKER_TARGET=\${TAG#*$DOCKER_IMAGE-}
DOCKER_TARGET=${DOCKER_TARGET%:*}
if [ "$DOCKER_TARGET" != "with-targets" ]; then
echo -n " FROM_DOCKER_TARGET=$DOCKER_TARGET"
fi
echo " FROM_DOCKER_TAG=${TAG#*:} tox -e $TOX_ENV_SANS_INCREMENTAL-incremental"
done
elif [ -n "$DOCKER_PUSH_REPOSITORY" -a -f .tox/$TOX_ENV/Dockertags ]; then
echo "Unable to push Docker images to $DOCKER_PUSH_REPOSITORY."
echo "This is normal in a pull request to sagemath/sage or to another user's repository."
echo
echo "If you need Docker images, "
echo " - either run this GitHub Actions workflow in your repository fork"
echo " - or use the method described in https://doc.sagemath.org/html/en/developer/portability_testing.html#automatic-docker-based-build-testing-using-tox"
else
echo "No Docker images created."
fi
if: always()
if: always() && ${{ inputs.docker_push_repository }}
2 changes: 1 addition & 1 deletion .upstream.d/20-github.com-sagemath-sage-releases
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Upstream packages as uploaded as GitHub release assets.
# This file is automatically updated by the sage-update-version script.
https://github.com/sagemath/sage/releases/download/10.4/
https://github.com/sagemath/sage/releases/download/10.3/
https://github.com/sagemath/sage/releases/download/10.2/
https://github.com/sagemath/sage/releases/download/10.1/
3 changes: 2 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// List of extensions which should be recommended for developers when a workspace is opened for the first time.
// See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.
"recommendations": [
"ms-python.python"
"ms-python.python",
"charliermarsh.ruff"
],
}
5 changes: 0 additions & 5 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,6 @@
"--doctest-modules"
],
"python.testing.unittestEnabled": false,
"python.linting.pycodestyleEnabled": true,
"python.linting.enabled": true,
// The following pycodestyle arguments are the same as the pycodestyle-minimal
// tox environnment, see the file SAGE_ROOT/src/tox.ini
"python.linting.pycodestyleArgs": ["--select= E111,E21,E222,E225,E227,E228,E25,E271,E303,E305,E306,E401,E502,E701,E702,E703,E71,E72,W291,W293,W391,W605"],
"cSpell.words": [
"furo",
"Conda",
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.3.rc2
version: 10.4.beta2
doi: 10.5281/zenodo.593563
date-released: 2024-03-04
date-released: 2024-04-08
repository-code: "https://github.com/sagemath/sage"
url: "https://www.sagemath.org/"
181 changes: 175 additions & 6 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
# Code of Conduct #

Approved by the Sage community by a vote which ended on November 24, 2014
This Code was approved by the Sage community by a vote which ended on
March 31, 2024.

## Introduction ##

The Sage community is comprised of an international mixture of mathematicians,
computer scientists, engineers, researchers, teachers, amateurs, and others
with varied backgrounds. This diversity is one of our strengths, but it can
also lead to communication problems and unhappiness. People who love working on
Sage can more effectively collaborate with others if they follow this code.
Sage can more effectively collaborate with others if they follow this Code.

This document is complemented by a second, [the Code of Conduct
Committee Manual](/CODE_OF_CONDUCT_COMMITTEE.md), which describes the
roles and procedures for the Sage Code of Conduct Committee.

## Guidelines ##

1. Be friendly and patient.

Expand Down Expand Up @@ -35,8 +44,168 @@ Sage can more effectively collaborate with others if they follow this code.
forget that it is human to err. Blame alone gets us nowhere, it is better to
help resolve issues so we can all learn from our mistakes.

If you believe someone is violating the code of conduct, we ask that you report
it to https://groups.google.com/g/sage-abuse. The group administrators will
consider the issue and explore resolutions. It is also possible to move heated
discussions to https://groups.google.com/g/sage-flame.
5. We will not accept harassment or other exclusionary behavior, such as:

1. Violent or intimidating threats or language directed against another person.
2. Sexist, racist, or otherwise discriminatory jokes and language.
3. Posting sexually explicit or violent material.
4. Posting (or threatening to post) other people’s personally identifying information (“doxing”).
5. Personal insults, especially those using racist or sexist terms.
6. Unwelcome sexual attention or comments.
7. Excessive profanity. Please avoid swear words; people differ greatly in their sensitivity to swearing.
8. Repeated harassment of others. In general, if someone asks you to stop, then stop.
9. Advocating for, or encouraging, any of the above behavior.

This Code of Conduct applies to all spaces managed by the Sage
project, including all public and private mailing lists, issue
trackers, wikis, and any other communication channel used by our
community. It also applies to Sage Days and any other in-person or
virtual events.

This Code of Conduct should be honored by everyone who participates in
the Sage community formally or informally, or claims any affiliation
with the project, in any project-related activities, and, especially,
when representing the project, in any role.

This Code is neither exhaustive nor complete. It serves to distill our
common understanding of a collaborative, shared environment and
goals. Please try to follow this Code in spirit as much as in letter,
to create a friendly and productive environment that enriches the
surrounding community.

## Diversity statement ##

Sage welcomes and encourages participation in our community by people
of all backgrounds and identities. We are committed to promoting and
sustaining a culture that values mutual respect, tolerance, and
learning, and we work together as a community to help each other live
out these values.

No matter how you identify yourself or how others perceive you: we
welcome you. Though no list can hope to be comprehensive, we
explicitly honor diversity in: age, culture, ethnicity, genotype,
gender identity or expression, language, national origin, neurotype,
phenotype, political beliefs, profession, race, religion, sexual
orientation, socioeconomic status, subculture, and technical ability,
to the extent that these do not conflict with this Code of Conduct.

Though we welcome people fluent in all languages, Sage development is
conducted in English.

Standards for behavior in the Sage community are detailed in the Code
of Conduct above. Participants in our community should uphold these
standards in all their interactions and help others to do so as well.

## Reporting guidelines ##

We know that it is painfully common for internet communication to
start at or devolve into obvious and flagrant abuse. We also recognize
that sometimes people may have a bad day, or be unaware of some of the
guidelines in this Code of Conduct. Please keep this in mind when
deciding on how to respond to a breach of this Code.

For clearly intentional breaches, report those to the Sage Code of
Conduct Committee (see below). For possibly unintentional breaches,
you may reply to the person and point out this Code of Conduct (either
in public or in private, whatever is most appropriate). If you would
prefer not to do that, please feel free to report to the Sage Code of
Conduct Committee directly, or ask the committee for advice, in
confidence.

You can report issues to the Sage Code of Conduct Committee at
[email protected]. Currently, the committee consists of:

- Nils Bruin
- J-P Labbé
- John Palmieri
- Viviane Pons
- David Roe
- Julian Rüth

If your report involves any members of the committee, or if they feel
they have a conflict of interest in handling it, then they will recuse
themselves from considering your report. Alternatively, if, for any
reason, you feel uncomfortable making a report to the whole committee,
then you can also contact individual committee members.

## Incident reporting resolution & Code of Conduct enforcement ##

This section summarizes the most important points; more details can be
found in the Code of Conduct enforcement guide.

The Sage Code of Conduct Committee will investigate and respond to all
complaints. The committee will protect the identity of the reporter,
and treat the content of complaints as confidential (unless the
reporter agrees otherwise).

In case of severe and obvious breaches, e.g., personal threat or
violent, sexist or racist language, the committee will immediately
disconnect the originator from Sage communication channels; please see
the manual for details.

In cases not involving clear severe and obvious breaches of this Code
of Conduct, the process for acting on any received Code of Conduct
violation report will be:

- acknowledgement that the report has been received
- discussion within the committee
- discussion with and/or feedback provided to the reportee
- mediation (if feedback didn’t help, and only if both reporter and
reportee agree to this)
- enforcement via transparent decision by the Sage Code of Conduct Committee

The committee will respond to any report as soon as possible, and our
goal will be to respond within 72 hours.

Potential consequences for violating the Sage Code of Conduct include:

- Nothing (for example if the matter has been resolved publicly while
the committee was considering responses)
- Private feedback or reprimand to the individual(s) involved
- Warning the person to cease their behavior and that any further
reports will result in sanctions
- A public announcement that an incident occurred
- Mediation (only if both reporter and reportee agree)
- An imposed vacation (e.g. asking someone to "take a week off" from a mailing list)
- A permanent or temporary ban from some or all Sage spaces (mailing
lists, GitHub repos, in-person events, etc.)
- Assistance to the reporter with a report to other bodies, for
example, institutional offices or appropriate law enforcement
agencies
- Publishing an account of the harassment and calling for the
resignation of the alleged harasser from their responsibilities
(usually pursued by people without formal authority: may be called
for if the person is the event leader, or refuses to stand aside
from the conflict of interest, or similar)
- Any other response that the Sage Code of Conduct Committee deems necessary and
appropriate to the situation

## Policies and procedures of common project platforms ##

[GitHub Community Guidelines](https://docs.github.com/en/site-policy/github-terms/github-community-guidelines) apply:
- [Report abuse to GitHub](https://github.com/contact/report-abuse),
[Block a user from your personal account](https://docs.github.com/en/communities/maintaining-your-safety-on-github/blocking-a-user-from-your-personal-account)
- [Manage disruptive comments](https://docs.github.com/en/communities/moderating-comments-and-conversations/managing-disruptive-comments),
- [Lock conversations](https://docs.github.com/en/communities/moderating-comments-and-conversations/locking-conversations)
(requires Maintainer role or [Organization Moderator role](https://docs.github.com/en/organizations/managing-peoples-access-to-your-organization-with-roles/managing-moderators-in-your-organization))

Google groups:
- [Content policy](https://support.google.com/groups/answer/4561696)
- [Reporting procedures](https://support.google.com/groups/answer/81275)

## Amending the Code of Conduct ##

This document may be amended by a vote of the Sage
community in the sage-devel Google group, with the exception of facts
like the membership of the Sage Code of Conduct Committee, changes to
URLs, or changes to email addresses: changes like that can be done via
a normal pull request. Any pull requests involving this document
should list the committee members as reviewers.

## Credits ##

Portions of this are adapted from the
[SciPy code of
conduct](https://docs.scipy.org/doc/scipy/dev/conduct/code_of_conduct.html)
and the [NumFOCUS code of
conduct](https://numfocus.org/code-of-conduct).
Loading

0 comments on commit 744da89

Please sign in to comment.