-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Rubi progress and tests #14756
Rubi progress and tests #14756
Conversation
ashishkg0022
commented
May 30, 2018
•
edited by asmeurer
edited by asmeurer
- integrals
- Made rubi stable.
- Added missing utility functions
- Added large test set
I pulled out the common functionality to be evaluated once, and used array() instead of asarray() (they are equivalent, but array() is faster). This is a partial fix to sympy#14671. It isn't as fast as it used to be yet. I don't know how to make the decorator faster, other than code generating the array wrapping directly, which would require improvements to lambdify to work (lambdify would need to be able to code generation full Python functions).
In original test suite for trinomial products there are 5 files. In sympy format I have kept it here. https://github.com/ashishkg0022/rubi-structure/tree/master/test/trinomial . This contains all trinomial tests from the rubi test-suite.
|
ping @Upabjojr @parsoyaarihant |
Also In [1]: from sympy.abc import a,b,c,x, e, d
In [2]: b*e - c*d
Out[2]: b*e - c*d but in mathematica
This results in difference because there is a function |
This should be reported to MatchPy developers. Can you share a sample case where this fails? |
Regadring difference in output of SymPy and Mathematica, Mathematica sorts the expression canonically. See: http://reference.wolfram.com/language/ref/Orderless.html http://reference.wolfram.com/language/ref/Sort.html You can use |
It handles rest of the cases . But specifically the case |
You can create this as a SymPy issue. We might have to improve the |
@ashishkg0022 for those utility functions which you've recently modified have you added relevant tests for all (which probably was failing before)? Although I've seen your work before looks good to me, but if you are missing anywhere just recheck. |
Yes, I think I have added test cases for them. |
There are some more things that need to be done to improve utility functions. |
I apologise, I have not run pyflakes on it. I was not aware of it (pyflakes). I will run it today and fixed if something is undefined. I will fix it today. Then this can be merged. |
✅ Hi, I am the SymPy bot (v119). I'm here to make sure this pull request has a release notes entry. Please read the guide on how to write release notes. Click here to see the pull request description that was parsed.
Your release notes are in good order. Here is what the release notes will look like:
This will be added to https://github.com/sympy/sympy/wiki/Release-Notes-for-1.2.1. Note: This comment will be updated with the latest check if you edit the pull request. You need to reload the page to see it. Update The release notes on the wiki have been updated. |
Fixed few undefined error using pyflakes. |
@Upabjojr would you mind reviewing this PR please and give it a final +1? |
@ashishkg0022 did you add the instructions on how to run the tests? |
sympy/integrals/rubi/__init__.py
Outdated
Parsing Rules and Tests | ||
======================= | ||
Code for parsing rule and tests are included in sympy. | ||
They have been properly explained with steps in `rubi_parsing_guide.md` in parsetools. |
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.
full path of rubi_parsing_guide.md
is better
sympy/utilities/runtests.py
Outdated
@@ -671,6 +671,7 @@ def _doctest(*paths, **kwargs): | |||
"sympy/physics/unitsystems.py", # raises deprecation warning | |||
"sympy/parsing/latex/_antlr/latexlexer.py", # generated code | |||
"sympy/parsing/latex/_antlr/latexparser.py", # generated code | |||
"sympy/integrals/rubi/rubi.py" |
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.
are we blacklisting the doctests as well?
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.
only for rubi.py
, not for utility_functions.
Actually, the loading time is around 10 - 11 minutes. So, travis fails. If nothing happens in 10 minutes, travis fails. So I have blacklisted it.
I guess the master branch should be merged into this PR. |
I have merged the master branch |
The travis failed due to some network error. |
Some of the rubi tests keep failing. For example, |
|
I didn't test them all so far. |
Can you please run them all? I have tested them in part. I have not run them all together. Like, when I tested exponentials they passed. But after a week I made some changes in trigo rules and utility functions. So it might be possible very few might fail because of some changes done later. For any new change, it's not possible to run all tests again. |
Regarding the release notes, I accidentally added |
For the rubi_test results: |
I saw it. Tests which I have run recently like hyperbolic are passing but a few of trinomials and miscellaneous algebra might be failing. Is there some way I can get a list of all expressions in the test set which are failing? |
You have the line numbers. Some tests are actually still running. |
Shall we merge this PR? I have still two tests of |
@parsoyaarihant @Abdullahjavednesar ok with merging? |