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

Adapt Macaulay2 interface doctests to Macaulay2 1.19 #33278

Closed
sheerluck opened this issue Feb 2, 2022 · 13 comments
Closed

Adapt Macaulay2 interface doctests to Macaulay2 1.19 #33278

sheerluck opened this issue Feb 2, 2022 · 13 comments

Comments

@sheerluck
Copy link
Contributor

We adapt the Macaulay2 interface doctests
to Macaulay2 1.19.

CC: @sheerluck @slel

Component: interfaces: optional

Keywords: Macaulay2

Author: Andrey Belgorodski

Branch/Commit: 4b07b12

Reviewer: Markus Wageringel

Issue created by migration from https://trac.sagemath.org/ticket/33278

@slel
Copy link
Member

slel commented Feb 2, 2022

Commit: 81b14e9

@slel
Copy link
Member

slel commented Feb 2, 2022

New commits:

81b14e933278: Adapt doctests to Macaulay2 1.19.1.1

@slel
Copy link
Member

slel commented Feb 2, 2022

Author: Andrey Belgorodski

@slel
Copy link
Member

slel commented Feb 2, 2022

Changed keywords from none to Macaulay2

@slel
Copy link
Member

slel commented Feb 2, 2022

Branch: public/33278

@mwageringel
Copy link

comment:2

I am still on Macaulay2 1.18, but also see the following failure. Is it present on your version as well?

sage -t --long --warn-long 68.6 --random-seed=245635289622745159370984825397477042598 src/sage/rings/ideal.py
**********************************************************************
File "src/sage/rings/ideal.py", line 1185, in sage.rings.ideal.Ideal_generic._macaulay2_init_
Failed example:
    macaulay2(ideal(QQ(5)))                   # optional - macaulay2
Expected:
    ideal 1
Got:
    doctest:warning
    ...
    :
    UserWarning: Constructing an ideal in Rational Field, which is a field. Did you intend to take numerators first? This warning can be muted by passing the base ring to Ideal() explicitly.
    ideal 1

@sheerluck
Copy link
Contributor Author

comment:3

Replying to @mwageringel:

Is it present on your version as well?

yes

      File "<doctest sage.rings.ideal.Ideal_generic._macaulay2_init_[10]>", line 1, in <module>
        macaulay2(ideal(QQ(Integer(5))))                   # optional - macaulay2
      File "/usr/lib/python3.10/site-packages/sage/rings/ideal.py", line 197, in Ideal
        warnings.warn(f'Constructing an ideal in {R}, which is a field.'
      File "/usr/lib/python3.10/warnings.py", line 109, in _showwarnmsg
        sw(msg.message, msg.category, msg.filename, msg.lineno,
    :
    UserWarning: Constructing an ideal in Rational Field, which is a field. Did you intend to take numerators first? This warning can be muted by passing the base ring to Ideal() explicitly.
    ideal 1
**********************************************************************
1 item had failures:
   1 of  17 in sage.rings.ideal.Ideal_generic._macaulay2_init_
    0 tests not run because we ran out of time
    [373 tests, 1 failure, 2.79 s]

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Feb 5, 2022

Changed commit from 81b14e9 to 4b07b12

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Feb 5, 2022

Branch pushed to git repo; I updated commit sha1. New commits:

4b07b1233278: make tests compatible with Macaulay2 1.18/1.19

@mwageringel
Copy link

comment:5

Thank you for the doctest fixes. I have resolved the problem in ideal.py – the warning comes from Sage and was introduced by #32320, so can be ignored in this doctest.

Moreover, I have altered two tests in the interface to make them compatible with both 1.18 and 1.19. Then I can enable these tests on the patchbot again.

If you agree with these changes, we can set this ticket to positive.

@mwageringel
Copy link

Reviewer: Markus Wageringel

@sheerluck
Copy link
Contributor Author

comment:6
sage -t --long --random-seed=19 interfaces/macaulay2.py
    2 not tested tests not run
    0 tests not run because we ran out of time
    [296 tests, 19.94 s]
----------------------------------------------------------------------
All tests passed!

sage -t --long --random-seed=19 rings/ideal.py
    0 tests not run because we ran out of time
    [374 tests, 3.02 s]
----------------------------------------------------------------------
All tests passed!

Thank you, tests are compatible with both 1.18 and 1.19.

@vbraun
Copy link
Member

vbraun commented Feb 16, 2022

Changed branch from public/33278 to 4b07b12

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

No branches or pull requests

4 participants