On Sun, 24 Sept 2023 at 22:43, Matthias Koeppe <matthiaskoe...@gmail.com> wrote:
>
> On Sunday, September 24, 2023 at 2:10:26 PM UTC-7 Oscar Benjamin wrote:
>
> > On Sunday, September 24, 2023 at 11:46:05 AM UTC-7 Oscar Benjamin wrote:
> >
> >> Where would I send the PR for the Sage doctests?
>
> On Sun, 24 Sept 2023 at 20:48, Matthias Koeppe <matthia...@gmail.com> wrote:
> >
> > I've added this to ci-sage.yml to explain what to do:
> >
> > # To test with a Sage PR, use this:
> > #sage_ref: refs/pull/PR_NUMBER/merge
>
> So currently the SymPy Sage CI job points at:
> https://github.com/sagemath/sage/pull/36276
>
> Yes, this PR contains a hotfix for the build system (which missed its way 
> into the currrent beta version 10.2.beta4).

That is a PR against the sagemath/sage develop branch.

Should any new PR with doctest updates be based off of that PR and set
to merge into develop?

There are some doctest failures:
https://github.com/sympy/sympy/actions/runs/6292982121/job/17082929352

Some are due to this printing change:
https://github.com/sympy/sympy/pull/25673#issuecomment-1719198065

I'm not sure yet that I like that printing change but also not sure
what Sage would want to do about it if SymPy keeps it. Would Sage just
want to accept that change in output?

An example failure is:

**********************************************************************
8567File "src/sage/doctest/forker.py", line 151, in
sage.doctest.forker.init_sage
8568Failed example:
8569 print(PrettyPrinter(settings={'wrap_line': True}).doprint(s))
8570Expected:
8571 29 28 27 26 25 24 23 22 21 20 19 18 17
8572 x + x + x + x + x + x + x + x + x + x + x + x + x +
8573 <BLANKLINE>
8574 16 15 14 13 12 11 10 9 8 7 6 5 4 3
8575 x + x + x + x + x + x + x + x + x + x + x + x + x + x + x
8576 <BLANKLINE>
8577 2
8578 + x
8579Got:
8580 29 28 27 26 25 24 23 22 21 20 19 18 17 ↪
8581 x + x + x + x + x + x + x + x + x + x + x + x + x + ↪
8582 <BLANKLINE>
8583 ↪ 16 15 14 13 12 11 10 9 8 7 6 5 4 3 ↪
8584 ↪ x + x + x + x + x + x + x + x + x + x + x + x + x + x + ↪
8585 <BLANKLINE>
8586 ↪ 2
8587 ↪ x + x

Basically some ↪ arrows are used when wrapping long output lines.

Another doctest failure is due to this change in hyper. The doctest
just needs updating:
https://github.com/sympy/sympy/pull/25641

Failed example:
8800 hypergeometric((5, 4), (4, 4), 3)._sympy_() # needs sage.symbolic
8801Expected:
8802 hyper((5, 4), (4, 4), 3)
8803Got:
8804 hyper((5,), (4,), 3)

There is another doctest failure that I don't understand:

File "src/sage/groups/finitely_presented.py", line 1771, in
sage.groups.finitely_presented.FinitelyPresentedGroup.characteristic_varieties
9400Failed example:
9401 G.characteristic_varieties(groebner=True)
9402Expected:
9403 [[(f1 - 1, f2 - 1, f3 - 1),
9404 (f1 + 1, f2 - 1, f3 - 1),
9405 (f1 - 1, f2 - 1, f3 + 1),
9406 (f3^2 + 1, f1 - f3, f2 - f3),
9407 (f1 - 1, f2 + 1, f3 - 1)],
9408 [(f1 - 1, f2 - 1, f3 - 1),
9409 (f1*f3 + 1, f2 - 1),
9410 (f1*f2 + 1, f3 - 1),
9411 (f2*f3 + 1, f1 - 1),
9412 (f2*f3 + 1, f1 - f2),
9413 (f2*f3 + 1, f1 - f3),
9414 (f1*f3 + 1, f2 - f3)]]
9415Got:
9416 [[(f1 - 1, f2 - 1, f3 - 1),
9417 (f1 + 1, f2 - 1, f3 - 1),
9418 (f1 - 1, f2 - 1, f3 + 1),
9419 (f3^2 + 1, f1 - f3, f2 - f3),
9420 (f1 - 1, f2 + 1, f3 - 1)],
9421 [(f2*f3 + 1, f1 - f2),
9422 (f2*f3 + 1, f1 - f3),
9423 (f2*f3 + 1, f1 - 1),
9424 (f1*f3 + 1, f2 - f3),
9425 (f1 - 1, f2 - 1, f3 - 1),
9426 (f1*f2 + 1, f3 - 1),
9427 (f1*f3 + 1, f2 - 1)]]

How exactly is Sage using SymPy in this calculation?

It looks like the order of the output has changed but I don't know
what caused that change or if that should be considered a bug (in
either SymPy or Sage). Does the order matter here?

Another doctest failure is just a change in the printing code:

File "src/sage/symbolic/expression.pyx", line 1196, in
sage.symbolic.expression.Expression._unicode_art_
14804Failed example:
14805 unicode_art(SR(1.3 - I))
14806Expected:
14807 1.3 - ⅈ
14808Got:
14809 1.3 - 1.0⋅ⅈ

The SymPy expression being printed here does have a 1.0 in it. I don't
know if it is intentional that Sage puts the 1.0 there but the
printing change is correct for SymPy. Either the docstring needs to be
updated or perhaps Sage should not be putting the 1.0 there (I don't
know what Sage intends to do in this context).

--
Oscar

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/CAHVvXxQ89s1e91RK1U88V78gOkqjMktPM2D%3DC26h-0eJf2gfJQ%40mail.gmail.com.

Reply via email to