Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pyodide test to CI #23542

Merged
merged 2 commits into from May 31, 2022
Merged

Add pyodide test to CI #23542

merged 2 commits into from May 31, 2022

Conversation

eagleoflqj
Copy link
Member

@eagleoflqj eagleoflqj commented May 26, 2022

References to other Issues or PRs

Closes #23529

Brief description of what is fixed or changed

Ideally, testing pyodide using selenium is more close to real use case. However, selenium's doc is too hard to understand, and it involves many browser-specific things. Moreover, full coverage requires testing on Safari, Firefox and Chromium as they have different kernel. I believe that's not what we aim to.

As pyodide supports node recently, we can test sympy on it. That's a lot easier than testing on selenium (yes I tried and gave up because I failed to capture console log as testing on bash with CPython).

Other comments

Release Notes

NO ENTRY

@sympy-bot
Copy link

sympy-bot commented May 26, 2022

Hi, I am the SymPy bot (v167). I'm here to help you write a release notes entry. Please read the guide on how to write release notes.

  • No release notes entry will be added for this pull request.
Click here to see the pull request description that was parsed.
<!-- Your title above should be a short description of what
was changed. Do not include the issue number in the title. -->

#### References to other Issues or PRs
<!-- If this pull request fixes an issue, write "Fixes #NNNN" in that exact
format, e.g. "Fixes #1234" (see
https://tinyurl.com/auto-closing for more information). Also, please
write a comment on that issue linking back to this pull request once it is
open. -->

Closes #23529
#### Brief description of what is fixed or changed

Ideally, testing pyodide using selenium is more close to real use case. However, selenium's doc is too hard to understand, and it involves many browser-specific things. Moreover, full coverage requires testing on Safari, Firefox and Chromium as they have different kernel. I believe that's not what we aim to.

As pyodide supports node recently, we can test sympy on it. That's a lot easier than testing on selenium (yes I tried and gave up because I failed to capture console log as testing on bash with CPython).

#### Other comments

#### Release Notes

<!-- Write the release notes for this release below between the BEGIN and END
statements. The basic format is a bulleted list with the name of the subpackage
and the release note for this PR. For example:

* solvers
  * Added a new solver for logarithmic equations.

* functions
  * Fixed a bug with log of integers.

or if no release note(s) should be included use:

NO ENTRY

See https://github.com/sympy/sympy/wiki/Writing-Release-Notes for more
information on how to write release notes. The bot will check your release
notes automatically to see if they are formatted correctly. -->

<!-- BEGIN RELEASE NOTES -->
NO ENTRY
<!-- END RELEASE NOTES -->

@sympy-bot
Copy link

sympy-bot commented May 26, 2022

🟠

Hi, I am the SymPy bot (v167). I've noticed that some of your commits add or delete files. Since this is sometimes done unintentionally, I wanted to alert you about it.

This is an experimental feature of SymPy Bot. If you have any feedback on it, please comment at sympy/sympy-bot#75.

The following commits add new files:

If these files were added/deleted on purpose, you can ignore this message.

@eagleoflqj eagleoflqj force-pushed the test_pyodide branch 3 times, most recently from 47ba142 to bc17ecb Compare May 26, 2022 01:52
@eagleoflqj eagleoflqj marked this pull request as ready for review May 26, 2022 04:00
@github-actions
Copy link

github-actions bot commented May 26, 2022

Benchmark results from GitHub Actions

Lower numbers are good, higher numbers are bad. A ratio less than 1
means a speed up and greater than 1 means a slowdown. Green lines
beginning with + are slowdowns (the PR is slower then master or
master is slower than the previous release). Red lines beginning
with - are speedups.

Significantly changed benchmark results (PR vs master)

Significantly changed benchmark results (master vs previous release)

       before           after         ratio
     [77f1d79c]       [58727537]
     <sympy-1.10.1^0>                 
+         124±2ms          230±5ms     1.85  sum.TimeSum.time_doit

Full benchmark results can be found as artifacts in GitHub Actions
(click on checks at the top of the PR).

bin/test_pyodide.mjs Outdated Show resolved Hide resolved
@asmeurer
Copy link
Member

This looks good to me. If Oscar's concerns about the runtime were addressed we can merge.

@oscarbenjamin
Copy link
Contributor

The runtime is improved but this is still just about the last job to finish. Maybe it could be improved by updating the splits.

Is it possible to install gmpy2 in pyiodide? That might speed it up. In any case it is impressive how fast it runs.

If we can't use gmpy2 there than I think this is good to merge.

@eagleoflqj
Copy link
Member Author

Is it possible to install gmpy2 in pyiodide? That might speed it up. In any case it is impressive how fast it runs.

gmpy2 is not pure python package, so it should be explicitly built for wasm and added to https://github.com/pyodide/pyodide/tree/main/packages. I use pyodide a lot but haven't tried building a package. I can try in the future though I expect it non-trivial.

@oscarbenjamin
Copy link
Contributor

Okay, let's merge this. I am a bit concerned that our CI just seems to be getting bigger and more complicated though...

@oscarbenjamin oscarbenjamin merged commit 079e16f into sympy:master May 31, 2022
@eagleoflqj eagleoflqj deleted the test_pyodide branch May 31, 2022 01:37
@eagleoflqj
Copy link
Member Author

I built gmpy2 and opened pyodide/pyodide#2665.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Testing SymPy on pyodide
4 participants