-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Have SymPy depend on SymPyCore; breaking change (#534)
* move SymPyPyCall -> SymPy; breaking change * rework to avoid extra allocations * a few more direct Sym calls * formatting; std lib compat * PyCall version bump * add benchmark code
- Loading branch information
Showing
59 changed files
with
286 additions
and
16,969 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
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,78 @@ | ||
name: Benchmark a pull request | ||
|
||
on: | ||
pull_request_target: | ||
branches: | ||
- master | ||
|
||
permissions: | ||
pull-requests: write | ||
|
||
jobs: | ||
generate_plots: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: julia-actions/setup-julia@v1 | ||
with: | ||
version: "1" | ||
- uses: julia-actions/cache@v1 | ||
- name: Extract Package Name from Project.toml | ||
id: extract-package-name | ||
run: | | ||
PACKAGE_NAME=$(grep "^name" Project.toml | sed 's/^name = "\(.*\)"$/\1/') | ||
echo "::set-output name=package_name::$PACKAGE_NAME" | ||
- name: Build SymPy | ||
env: | ||
JULIA_NUM_THREADS: 2 | ||
run: | | ||
# Lightweight build step, as sometimes the runner runs out of memory: | ||
julia -e 'ENV["JULIA_PKG_PRECOMPILE_AUTO"]=0; import Pkg; Pkg.add(;url="https://github.com/JuliaPy/SymPy.jl.git")' | ||
julia -e 'ENV["JULIA_PKG_PRECOMPILE_AUTO"]=0; import Pkg; Pkg.build("SymPy")' | ||
- name: Add ~/.julia/bin to PATH | ||
run: | | ||
echo "$HOME/.julia/bin" >> $GITHUB_PATH | ||
- name: Run benchmarks | ||
run: | | ||
echo $PATH | ||
ls -l ~/.julia/bin | ||
mkdir results | ||
benchpkg ${{ steps.extract-package-name.outputs.package_name }} --rev="${{github.event.repository.default_branch}},${{github.event.pull_request.head.sha}}" --url=${{ github.event.repository.clone_url }} --bench-on="${{github.event.pull_request.head.sha}}" --output-dir=results/ --exeflags="-O3 --threads=auto" | ||
- name: Create plots from benchmarks | ||
run: | | ||
mkdir -p plots | ||
benchpkgplot ${{ steps.extract-package-name.outputs.package_name }} --rev="${{github.event.repository.default_branch}},${{github.event.pull_request.head.sha}}" --npart=10 --format=png --input-dir=results/ --output-dir=plots/ | ||
- name: Upload plot as artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: plots | ||
path: plots | ||
- name: Create markdown table from benchmarks | ||
run: | | ||
benchpkgtable ${{ steps.extract-package-name.outputs.package_name }} --rev="${{github.event.repository.default_branch}},${{github.event.pull_request.head.sha}}" --input-dir=results/ --ratio > table.md | ||
echo '### Benchmark Results' > body.md | ||
echo '' >> body.md | ||
echo '' >> body.md | ||
cat table.md >> body.md | ||
echo '' >> body.md | ||
echo '' >> body.md | ||
echo '### Benchmark Plots' >> body.md | ||
echo 'A plot of the benchmark results have been uploaded as an artifact to the workflow run for this PR.' >> body.md | ||
echo 'Go to "Actions"->"Benchmark a pull request"->[the most recent run]->"Artifacts" (at the bottom).' >> body.md | ||
- name: Find Comment | ||
uses: peter-evans/find-comment@v2 | ||
id: fcbenchmark | ||
with: | ||
issue-number: ${{ github.event.pull_request.number }} | ||
comment-author: 'github-actions[bot]' | ||
body-includes: Benchmark Results | ||
|
||
- name: Comment on PR | ||
uses: peter-evans/create-or-update-comment@v3 | ||
with: | ||
comment-id: ${{ steps.fcbenchmark.outputs.comment-id }} | ||
issue-number: ${{ github.event.pull_request.number }} | ||
body-path: body.md | ||
edit-mode: replace |
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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,39 +1,30 @@ | ||
name = "SymPy" | ||
uuid = "24249f21-da20-56a4-8eb1-6a02cf4ae2e6" | ||
version = "1.2.1" | ||
|
||
version = "2.0.0" | ||
|
||
[deps] | ||
CommonEq = "3709ef60-1bee-4518-9f2f-acd86f176c50" | ||
CommonSolve = "38540f10-b2f7-11e9-35d8-d573e4eb0ff2" | ||
Latexify = "23fbe1c1-3f47-55db-b15f-69d7ec21a316" | ||
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" | ||
Markdown = "d6f4376e-aef5-505a-96c1-9c027394607a" | ||
PyCall = "438e738f-606a-5dbb-bf0a-cddfbfd45ab0" | ||
RecipesBase = "3cdcf5f2-1ef4-517c-9805-6587b60abb01" | ||
SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b" | ||
|
||
[weakdeps] | ||
SymbolicUtils = "d1185830-fcd6-423d-90d6-eec64667417b" | ||
|
||
[extensions] | ||
SymPySymbolicUtilsExt = "SymbolicUtils" | ||
SymPyCore = "458b697b-88f0-4a86-b56b-78b75cfb3531" | ||
|
||
[compat] | ||
CommonEq = "=0.2.0" | ||
CommonEq = "0.2.1" | ||
CommonSolve = "0.2" | ||
Latexify = "0.15, 0.16" | ||
LinearAlgebra = "<0.0.1, 1" | ||
Markdown = "<0.0.1, 1" | ||
PyCall = "1.91" | ||
RecipesBase = "0.7, 0.8, 1.0, 1.1" | ||
SpecialFunctions = "0.8, 0.9, 0.10, 1.0, 2" | ||
LinearAlgebra = "<0.0.1, 1.6" | ||
PyCall = "1.96.2" | ||
SpecialFunctions = "0.7, 0.8, 0.8, 0.10, 1, 2" | ||
SymbolicUtils = "1" | ||
julia = "1.0" | ||
SymPyCore = "0.1.6, 1" | ||
julia = "1.6" | ||
|
||
[extras] | ||
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" | ||
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" | ||
SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b" | ||
SymbolicUtils = "d1185830-fcd6-423d-90d6-eec64667417b" | ||
|
||
[targets] | ||
test = ["SymbolicUtils", "Test"] | ||
test = ["Test", "LinearAlgebra", "SpecialFunctions", "SymbolicUtils"] |
Oops, something went wrong.
df4067e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JuliaRegistrator register
df4067e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Registration pull request created: JuliaRegistries/General/95759
Tip: Release Notes
Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.
To add them here just re-invoke and the PR will be updated.
Tagging
After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.
This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via: