Skip to content

Commit

Permalink
Merge branch 'sympy:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
nopria authored Nov 5, 2023
2 parents 21781e7 + 1770afa commit f94a230
Show file tree
Hide file tree
Showing 1,272 changed files with 111,665 additions and 122,344 deletions.
3 changes: 0 additions & 3 deletions .ci/blacklisted.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
{
"sympy/physics/mechanics/tests/test_kane3.py": [
"test_bicycle"
],
"sympy/utilities/tests/test_wester.py": [
"test_W25"
]
Expand Down
3 changes: 0 additions & 3 deletions .ci/generate_durations_log.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
ABS_REPO_PATH=$(unset CDPATH && cd "$(dirname "$0")/.." && echo $PWD)
cat <<EOF >${ABS_REPO_PATH}/.ci/blacklisted.json
{
"sympy/physics/mechanics/tests/test_kane3.py": [
"test_bicycle"
],
"sympy/utilities/tests/test_wester.py": [
"test_W25"
]
Expand Down
44 changes: 44 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# This builds a preview of the docs which can be seen on pull requests. It
# also uses the .github/workflows/docs-preview.yml GitHub Actions workflow.

# This is separate from the GitHub Actions build that builds the docs, which
# also builds the docs PDF.
version: 2

# Aliases to reuse
_defaults: &defaults
docker:
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/2.0/circleci-images/
- image: cimg/python:3.10.2
working_directory: ~/repo

jobs:
Build Docs Preview:
<<: *defaults
steps:
- checkout
- attach_workspace:
at: ~/
- run:
name: Install dependencies
no_output_timeout: 25m
command: |
sudo apt update
sudo apt install imagemagick graphviz librsvg2-bin
cd doc
pip install -r requirements.txt
- run:
name: Build docs
no_output_timeout: 25m
command: |
cd doc
make html
- store_artifacts:
path: doc/_build/html

workflows:
version: 2
default:
jobs:
- Build Docs Preview
16 changes: 16 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[flake8]
doctests = True
ignore =
F403,
select =
C4,
E722,
F,
exclude =
sympy/assumptions/*generated.py,
sympy/core/*_generated.py,
sympy/parsing/autolev/_antlr/*,
sympy/parsing/autolev/test-examples/*,
sympy/parsing/latex/_antlr/*,
sympy/polys/numberfields/resolvent_lookup.py,
per-file-ignores = sympy/interactive/session.py:F821
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ and the release note for this PR. For example:
* Added a new solver for logarithmic equations.
* functions
* Fixed a bug with log of integers.
* Fixed a bug with log of integers. Formerly, `log(-x)` incorrectly gave `-log(x)`.
* physics.units
* Corrected a semantical error in the conversion between volt and statvolt which
reported the volt as being larger than the statvolt.
or if no release note(s) should be included use:
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/checkconflict.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: "Maintenance"
on:
# So that PRs touching the same files as the push are updated
push:
# So that the `dirtyLabel` is removed if conflicts are resolve
# We recommend `pull_request_target` so that Github secrets are available.
# In `pull_request` we wouldn't be able to change labels of fork PRs
pull_request_target:
types: [synchronize]

jobs:
main:
runs-on: ubuntu-latest
steps:
- name: Check if PRs have merge conflicts
uses: eps1lon/actions-label-merge-conflict@releases/2.x
with:
dirtyLabel: "Merge conflict"
repoToken: "${{ secrets.GITHUB_TOKEN }}"
131 changes: 35 additions & 96 deletions .github/workflows/ci-sage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,10 @@ env:
DIST_PREREQ: python3-setuptools
# Name of this project in the Sage distribution
SPKG: sympy
# Sage distribution packages to build
TARGETS_PRE: build/make/Makefile
TARGETS: SAGE_CHECK=no SAGE_CHECK_PACKAGES=sympy build ptest
TARGETS_OPTIONAL: build/make/Makefile
# Standard setting: Test the current beta release of Sage:
SAGE_REPO: sagemath/sage
SAGE_REF: develop
# Uncomment to temporarily test with the branch from a sage ticket
# (this is a no-op after that ticket is merged)
SAGE_TRAC_GIT: https://github.com/sagemath/sagetrac-mirror.git
SAGE_TICKET: 32420
# Remove all downstream patches
REMOVE_PATCHES: "*"
# Until https://github.com/sagemath/sage/issues/23712 is resolved
EXTRA_CONFIGURE_ARGS: "--without-system-tachyon"

jobs:

Expand All @@ -65,7 +57,7 @@ jobs:

steps:
- name: Check out ${{ env.SPKG }}
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
path: build/pkgs/${{ env.SPKG }}/src
- name: Install prerequisites
Expand All @@ -79,93 +71,40 @@ jobs:
&& echo "sage-package create ${{ env.SPKG }} --version git --tarball ${{ env.SPKG }}-git.tar.gz --type=standard" > upstream/update-pkgs.sh \
&& if [ -n "${{ env.REMOVE_PATCHES }}" ]; then echo "(cd ../build/pkgs/${{ env.SPKG }}/patches && rm -f ${{ env.REMOVE_PATCHES }}; :)" >> upstream/update-pkgs.sh; fi \
&& ls -l upstream/
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
path: upstream
name: upstream

docker:
runs-on: ubuntu-latest
uses: sagemath/sage/.github/workflows/docker.yml@develop
with:
# debian-bullseye uses system python 3.9
# archlinux-latest is at the cutting edge
#
# XXX: For now the archlinux job fails too often for reasons unrelated
# to SAGE's use of SymPy so we skip Arch and only test Ubuntu. The
# ubuntu-focal job also fails sometimes due to timeouts or network
# problems but it mostly succeeds and does correctly pick up where a
# change in SymPy affects SAGE. Mostly this is where there are printing
# changes in SymPy because SAGE does most of its testing in the form of
# doctests.
#
#tox_system_factors: >-
# ["debian-bullseye", "archlinux-latest"]
tox_system_factors: >-
["debian-bullseye"]
# "standard" installs lots of system packages, reducing the full build and test of the
# Sage distribution to 3-4 hours
tox_packages_factors: >-
["standard"]
# Sage distribution packages to build
targets: SAGE_CHECK=no SAGE_CHECK_PACKAGES=sympy build SAGE_DOCTEST_RANDOM_SEED=0 ptest
# Test against the Sage PR:
# https://github.com/sagemath/sage/pull/36641
sage_repo: sagemath/sage
sage_ref: refs/pull/36641/merge
# To test with a Sage PR, use this:
#sage_ref: refs/pull/PR_NUMBER/merge
upstream_artifact: upstream
needs: [dist]
strategy:
fail-fast: false
max-parallel: 32
matrix:
# debian-buster uses system python 3.7
# archlinux-latest is at the cutting edge
tox_system_factor: [debian-buster, archlinux-latest]
# "standard" installs lots of system packages, reducing the full build and test of the
# Sage distribution to 3-4 hours
tox_packages_factor: [standard]
env:
TOX_ENV: docker-${{ matrix.tox_system_factor }}-${{ matrix.tox_packages_factor }}
LOGS_ARTIFACT_NAME: logs-commit-${{ github.sha }}-tox-docker-${{ matrix.tox_system_factor }}-${{ matrix.tox_packages_factor }}
DOCKER_TARGETS: configured with-targets with-targets-optional
steps:
- name: Check out SageMath
uses: actions/checkout@v2
with:
repository: ${{ env.SAGE_REPO }}
ref: ${{ env.SAGE_REF }}
fetch-depth: 2000
if: env.SAGE_REPO != ''
- name: Check out git-trac-command
uses: actions/checkout@v2
with:
repository: sagemath/git-trac-command
path: git-trac-command
if: env.SAGE_TRAC_GIT != ''
- name: Check out SageMath from trac.sagemath.org
shell: bash {0}
run: |
git config --global user.email "[email protected]"
git config --global user.name "ci-sage workflow"
if [ ! -d .git ]; then git init; fi; git remote add trac ${{ env.SAGE_TRAC_GIT }} && x=1 && while [ $x -le 5 ]; do x=$(( $x + 1 )); sleep $(( $RANDOM % 60 + 1 )); if git-trac-command/git-trac fetch $SAGE_TICKET; then git merge FETCH_HEAD || echo "(ignored)"; exit 0; fi; sleep 40; done; exit 1
if: env.SAGE_TRAC_GIT != ''
- uses: actions/download-artifact@v2
with:
path: upstream
name: upstream
- name: Install test prerequisites
run: |
sudo DEBIAN_FRONTEND=noninteractive apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get install tox python3-setuptools
- name: Update Sage packages from upstream artifact
run: |
(export PATH=$(pwd)/build/bin:$PATH; (cd upstream && bash -x update-pkgs.sh) && sed -i.bak '/upstream/d' .dockerignore && echo "/:toolchain:/i ADD upstream upstream" | sed -i.bak -f - build/bin/write-dockerfile.sh && git diff)
- name: Configure and build Sage distribution within a Docker container
run: |
set -o pipefail; EXTRA_DOCKER_BUILD_ARGS="--build-arg USE_MAKEFLAGS=\"-k V=0 SAGE_NUM_THREADS=3\"" tox -e $TOX_ENV -- $TARGETS 2>&1 | sed "/^configure: notice:/s|^|::warning file=artifacts/$LOGS_ARTIFACT_NAME/config.log::|;/^configure: warning:/s|^|::warning file=artifacts/$LOGS_ARTIFACT_NAME/config.log::|;/^configure: error:/s|^|::error file=artifacts/$LOGS_ARTIFACT_NAME/config.log::|;"
- 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
if: always()
- uses: actions/upload-artifact@v2
with:
path: artifacts
name: ${{ env.LOGS_ARTIFACT_NAME }}
if: always()
- name: Print out logs for immediate inspection
# and markup the output with GitHub Actions logging commands
run: |
.github/workflows/scan-logs.sh "artifacts/$LOGS_ARTIFACT_NAME"
if: always()
- name: Push Docker images
run: |
if [ -f .tox/$TOX_ENV/Dockertags ]; then
TOKEN="${{ secrets.DOCKER_PKG_GITHUB_TOKEN }}"
if [ -z "$TOKEN" ]; then
TOKEN="${{ secrets.GITHUB_TOKEN }}"
fi
echo "$TOKEN" | docker login docker.pkg.github.com -u ${{ github.actor }} --password-stdin
for a in $(cat .tox/$TOX_ENV/Dockertags); do
FULL_TAG=docker.pkg.github.com/$(echo ${{ github.repository }}|tr 'A-Z' 'a-z')/$a
docker tag $a $FULL_TAG
echo Pushing $FULL_TAG
docker push $FULL_TAG
done || echo "(Ignoring errors)"
fi
if: always()
21 changes: 21 additions & 0 deletions .github/workflows/docs-preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Docs Preview
on: [status]
jobs:
circleci_artifacts_redirector_job:
if: "${{ github.event.context == 'ci/circleci: Build Docs Preview' }}"
runs-on: ubuntu-latest
name: Run CircleCI artifacts redirector
steps:
- name: GitHub Action step
id: step1
uses: larsoner/circleci-artifacts-redirector-action@master
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
artifact-path: 0/doc/_build/html/index.html
circleci-jobs: Build Docs Preview
job-title: Click here to see a preview of the documentation.
api-token: ${{ secrets.CIRCLECI_TOKEN }}
- name: Check the URL
if: github.event.status != 'pending'
run: |
curl --fail ${{ steps.step1.outputs.url }} | grep $GITHUB_SHA
22 changes: 11 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ name: release
on:
push:
branches:
- '1.10'
- '1.12'
pull_request:
branches:
- '1.10'
- '1.12'
env:
release_branch: '1.10'
release_version: '1.10rc1'
previous_version: '1.9'
release_branch: '1.12'
release_version: '1.12rc1'
previous_version: '1.11'

jobs:

Expand All @@ -28,20 +28,20 @@ jobs:
runs-on: ubuntu-20.04
steps:
# Check out with full git history for authors check:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup Python
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: '3.9'
python-version: '3.10'

- name: Build release files
run: release/ci_release_script.sh ${{ env.release_version }} ${{ env.previous_version }}

- name: Store release files
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: release_files
path: release-${{ env.release_version }}
Expand All @@ -54,12 +54,12 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', 'pypy-3.8']
python-version: ['3.8', '3.9', '3.10', '3.11', 'pypy-3.8']

name: Python ${{ matrix.python-version }} test install
steps:
- name: Setup python
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
architecture: x64
Expand Down
Loading

0 comments on commit f94a230

Please sign in to comment.