# Some tests are broken for SymPy 1.4 #31

Open
opened this issue Apr 12, 2019 · 5 comments
Labels
Milestone

### utensil commented Apr 12, 2019 • edited

 SymPy 1.4 has just released and some tests are broken for SymPy 1.4, see build https://circleci.com/workflow-run/dcbd3c98-45c3-4c89-abd6-2ea97fa07b2c . Freeze SymPy version to 1.3 to keep CI green for now. Tasks: Fix broken collect() calls The fix for order change issue also needs to be delayed until the explicitly change to use SymPy 1.4 in CI after the collect() issue is addressed adding a CI build for SymPy master so these issues can be detected sooner

### utensil commented Apr 12, 2019 • edited

 Errors are due to: \quad replaced by \  for lists, tuples, and dicts, see better (smaller) spacing when generating LaTeX for lists, tuples, and dicts. (sympy/sympy#15970 by @asmeurer and @oscargus) \left ( replaced by left(, also for \right and [{, see: LaTeX printing now consistently does not use a space after \left and \right (sympy/sympy#15779 by @oscargus) some ordering has changed: eu.ev_r = -1/2 + 1/2 changed to eu.ev_r = 1/2 - 1/2, see: changed the print order of additions of form k - expr (used to print as -expr + k) (sympy/sympy#15985 by @nickovs) all collect() call are broken, see: Raise exception when collecting a noncommutative symbol (sympy/sympy#15447 by @JMSS-Unknown)
added the label Apr 12, 2019
added this to the 0.4.4 milestone Apr 12, 2019

### oscargus commented Apr 12, 2019

 I'll see if I can update the printing tests for Galgebra correspondingly. (I did not find any instances of \quad in the tests files I found though.)

### utensil commented Apr 12, 2019 • edited

 I did not find any instances of \quad in the tests files I found though. That's because we are using nbval to verify LaTeX or enhanced console output for galgebra by the Jupyter Notebooks in examples/ipython. It's an effective way to write tests for a symbolic library that has multiple output formats, but it's also sensitive to subtle changes between versions. I'll see if I can update the printing tests for Galgebra correspondingly. Thanks! The \quad and \left issue can be fixed by modifying https://github.com/pygae/galgebra/blob/15-print-pow/test/.nbval_sanitize.cfg to ignore this kind of differences. The real difficulty is the collect() issue. Currently galgebra use collect() in quite some places to collect the bases of multivectors, probably should do it in another way, like manually collect the bases. It's correct for SymPy to raise exceptions if the symbols to be collected has no certain order in the expression, but in the case of the bases, they are always at the rightmost position so there's no confusion here. The collect() issue must be fixed before we can change SymPy version in CI to 1.4. And It's non-trivial, so I'll not fix it in #17 but will fix it before 0.4.4 release. The fix for order change issue also needs to be delayed until the explicitly change to use SymPy 1.4 in CI after the collect() issue is addressed.
mentioned this issue Apr 12, 2019
mentioned this issue Apr 23, 2019
mentioned this issue May 2, 2019
Merged
modified the milestones: 0.4.4, 0.4.5 Jul 7, 2019
mentioned this issue Sep 27, 2019

### asmeurer commented Sep 27, 2019

 Once you get this fixed I would suggest adding a CI build for SymPy master so these issues can be detected sooner. We also plan to do a 1.5 release soon, so if you can test SymPy master now that would help.

### utensil commented Sep 27, 2019

 Good idea, this was also brought up in sympy/sympy#8365 (comment) and I forgot it. Added to the task list in the main thread of this issue.
mentioned this issue Oct 17, 2019
This was referenced Nov 29, 2019