forked from sympy/sympy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'sympy:master' into master
- Loading branch information
Showing
1,272 changed files
with
111,665 additions
and
122,344 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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: | ||
|
||
|
@@ -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 | ||
|
@@ -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() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.