Skip to content

Add a sympy 1.5 run for CircleCI#164

Merged
utensil merged 1 commit intopygae:masterfrom
eric-wieser:sympy_latest
Dec 18, 2019
Merged

Add a sympy 1.5 run for CircleCI#164
utensil merged 1 commit intopygae:masterfrom
eric-wieser:sympy_latest

Conversation

@eric-wieser
Copy link
Member

@eric-wieser eric-wieser commented Dec 17, 2019

Relates to #94, although lets start with the last 2.7 release

@eric-wieser eric-wieser force-pushed the sympy_latest branch 2 times, most recently from dd4c8f6 to 97251a4 Compare December 17, 2019 13:17
@codecov
Copy link

codecov bot commented Dec 17, 2019

Codecov Report

Merging #164 into master will increase coverage by 0.08%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #164      +/-   ##
==========================================
+ Coverage   67.74%   67.83%   +0.08%     
==========================================
  Files           8        8              
  Lines        4682     4682              
==========================================
+ Hits         3172     3176       +4     
+ Misses       1510     1506       -4
Impacted Files Coverage Δ
galgebra/mv.py 64.65% <0%> (+0.25%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d8e533f...cce20f5. Read the comment docs.

@eric-wieser
Copy link
Member Author

eric-wieser commented Dec 17, 2019

One of the failures for examples/ipython/LaTeX.ipynb::Cell 10, after some extra whitespace additions

  \begin{equation*} W
-     = (1/B) \left( X\cdot Y\right)  C \sqrt{\left( X\cdot Y\right) ^{2} - 2 \left( X\cdot Y\right)  \left( X\cdot e\right)  \left( Y\cdot e\right) }
+     =       \left( X\cdot Y\right)  C
-     - (1/B) \left( X\cdot e\right)  \left( Y\cdot e\right)  C \sqrt{\left( X\cdot Y\right) ^{2} - 2 \left( X\cdot Y\right)  \left( X\cdot e\right)  \left( Y\cdot e\right) }
+     -       \left( X\cdot e\right)  \left( Y\cdot e\right)  C
-     + (1/B) \left( X\cdot e\right)  \left( Y\cdot e\right)  \sqrt{\left( X\cdot Y\right) ^{2} - 2 \left( X\cdot Y\right)  \left( X\cdot e\right)  \left( Y\cdot e\right) }
+     +       \left( X\cdot e\right)  \left( Y\cdot e\right)
      + S \sqrt{\left( X\cdot Y\right) ^{2} - 2 \left( X\cdot Y\right)  \left( X\cdot e\right)  \left( Y\cdot e\right) }
  \end{equation*}
  \begin{equation*} \text{Scalar Coefficient}
-     = (1/B) \left( X\cdot e\right)  \left( Y\cdot e\right)  \sqrt{\left( X\cdot Y\right) ^{2} - 2 \left( X\cdot Y\right)  \left( X\cdot e\right)  \left( Y\cdot e\right) }
+     =       \left( X\cdot e\right)  \left( Y\cdot e\right)
  \end{equation*}
  \begin{equation*} \text{Cosh Coefficient}
-     = (1/B) \left( X\cdot Y\right)                          \sqrt{\left( X\cdot Y\right) ^{2} - 2 \left( X\cdot Y\right)  \left( X\cdot e\right)  \left( Y\cdot e\right) }
+     =       \left( X\cdot Y\right)
-     - (1/B) \left( X\cdot e\right)  \left( Y\cdot e\right)  \sqrt{\left( X\cdot Y\right) ^{2} - 2 \left( X\cdot Y\right)  \left( X\cdot e\right)  \left( Y\cdot e\right) }
+     -       \left( X\cdot e\right)  \left( Y\cdot e\right)
  \end{equation*}

Edit: fixed in gh-169

@eric-wieser
Copy link
Member Author

Down to just two failures

@eric-wieser
Copy link
Member Author

One failure!

#x1B[91mNotebook cell execution failed#x1B[0m
#x1B[94mCell 2: Cell outputs differ

Input:
#x1B[0m!python eval_check.py

#x1B[94mTraceback:#x1B[0m
#x1B[94m mismatch 'stdout'#x1B[91m

 assert reference_output == test_output failed:

  'Frame = (\x1...ex))*eu)\n3\n' == 'Frame = (\x1...ex))*eu)\n3\n'
  Skipping 171 identical leading characters in diff, use -v to show
  - eu.ev_r = -1/2 + 1/2
  ?           -    ^
  + eu.ev_r = 1/2 - 1/2
  ?               ^
    ev.eu_r =  0 
    ev.ev_r = 1
    Frame = (#x1B[0;34mex#x1B[0m + #x1B[0;34mey#x1B[0m + #x1B[0;34mez#x1B[0m,#x1B[0;34mex#x1B[0m - #x1B[0;34mey#x1B[0m)
    Reciprocal Frame = (#x1B[0;34mex#x1B[0m/3 + #x1B[0;34mey#x1B[0m/3 + #x1B[0;34mez#x1B[0m/3,#x1B[0;34mex#x1B[0m/2 - #x1B[0;34mey#x1B[0m/2)
    eu.eu_r = 1
  - eu.ev_r = -1/2 + 1/2
  ?           -    ^
  + eu.ev_r = 1/2 - 1/2
  ?               ^
    ev.eu_r =  0 
    ev.ev_r = 1
    eu = #x1B[0;34mex#x1B[0m + #x1B[0;34mey#x1B[0m + #x1B[0;34mez#x1B[0m
    ev = #x1B[0;34mex#x1B[0m - #x1B[0;34mey#x1B[0m
    eu^ev|ex
    (eu^(ev|ex))
    #x1B[0;34mex#x1B[0m + #x1B[0;34mey#x1B[0m + #x1B[0;34mez#x1B[0m
    eu^ev|ex*eu
    ((eu^(ev|ex))*eu)
    3
#x1B[0m

@eric-wieser eric-wieser force-pushed the sympy_latest branch 2 times, most recently from ef2c145 to a64bd18 Compare December 17, 2019 17:41
This needs some extra sanitization rules in nbval
@eric-wieser eric-wieser added this to the 0.4.5 milestone Dec 17, 2019
@eric-wieser eric-wieser marked this pull request as ready for review December 17, 2019 17:52
@eric-wieser eric-wieser requested a review from utensil December 17, 2019 17:52
"python-3.7-sympy-1.5":
<<: *defaults
environment:
PIP_EXTRA_INSTALLATION: sympy==1.5
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll use it for symengine

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was my intent here, yeah

replace: {1 - \\left( e_{E}\\cdot e_{B}\\right) ^{2}}

regex: eu\.ev_r = -1/2 \+ 1/2(?=\n)
replace: eu.ev_r = 1/2 - 1/2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aha, you use this to make both version happy

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We better use the 1.5 output as the default, and replace the old one to the new one here?

Copy link
Member Author

@eric-wieser eric-wieser Dec 18, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can do that in a follow-up

The sanitizations apply both to the expected and actual result - so will keep working for 1.3.0 CI runs when we regenerate the notebook with 1.5.0

Copy link
Member

@utensil utensil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wonderful!

@utensil utensil merged commit e40c7b0 into pygae:master Dec 18, 2019
@utensil utensil mentioned this pull request Dec 18, 2019
7 tasks
@utensil utensil mentioned this pull request Dec 18, 2019
2 tasks
@eric-wieser eric-wieser deleted the sympy_latest branch April 20, 2020 13:12
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.

2 participants