-
-
Notifications
You must be signed in to change notification settings - Fork 487
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
sage.rings
: Reformat doctests, add # optional
annotations
#35457
sage.rings
: Reformat doctests, add # optional
annotations
#35457
Conversation
sage.rings
: Add # optional
doctest annotationssage.rings
: Reformat doctests, add # optional
annotations
SageMath version 10.0.beta9, Release Date: 2023-04-13
025f9fe
to
d9fb7be
Compare
d9fb7be
to
7c692b9
Compare
This is fixed by #35552, I think. |
Fixed |
pdf docs stil fail. Please do not set back to positive review until you have tested it |
Now it builds |
conflicts with #35562 though |
Test fail. Which part of "please do not set back to positive review until you have tested it" was unclear? |
"it". |
Documentation preview for this PR is ready! 🎉 |
sage: P.<e,d,c,b,a> = PolynomialRing(QQ,5,order='lex') | ||
sage: P.<e,d,c,b,a> = PolynomialRing(QQ, 5, order='lex'); P.rename("P") |
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.
@mkoeppe I don't know what's going on here but this rename doesn't seem to be supported:
$ sage
┌────────────────────────────────────────────────────────────────────┐
│ SageMath version 10.0, Release Date: 2023-05-20 │
│ Using Python 3.11.4. Type "help()" for help. │
└────────────────────────────────────────────────────────────────────┘
sage: P.<e,d,c,b,a> = PolynomialRing(QQ, 5, order='lex')
sage: P.rename("P")
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
File /usr/lib/python3.11/site-packages/sage/structure/sage_object.pyx:121, in sage.structure.sage_object.SageObject.rename (build/cythonized/sage/structure/sage_object.c:2154)()
120 try:
--> 121 self.__custom_name = str(x)
122 except AttributeError:
AttributeError: 'sage.rings.polynomial.multi_polynomial_libsingular.MPolynomialRing_libsingular' object has no attribute '__custom_name'
During handling of the above exception, another exception occurred:
NotImplementedError Traceback (most recent call last)
Cell In[2], line 1
----> 1 P.rename("P")
File /usr/lib/python3.11/site-packages/sage/structure/sage_object.pyx:123, in sage.structure.sage_object.SageObject.rename (build/cythonized/sage/structure/sage_object.c:2203)()
121 self.__custom_name = str(x)
122 except AttributeError:
--> 123 raise NotImplementedError("object does not support renaming: %s" % self)
124
125 def reset_name(self):
NotImplementedError: object does not support renaming: Multivariate Polynomial Ring in e, d, c, b, a over Rational Field
sage:
It's not working for me in 10.1.beta7 either. I don't know what is going on, since I had not seen this error before and this was merged in 10.1.beta1.
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.
Fixed in #35749 already
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.
Fixed in #35749 already
Is that the right PR? That one is 157 commits and mentions nothing of the issue.
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.
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.
From the top of the description of #35749:
- Fixing the handling of file-level # optional tags.
- Some files were not being doctested; fixing the recently introduced errors in doctests.
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.
Ok, I thought I was getting crazy. I was trying to test #35977 and getting this error I never saw before but now I could reproduce with old branches.
Now there are two more regressions in singular 4.3.2p3.
📚 Description
Adding doctest tags
# optional - sage.rings.finite_rings
,...number_field
,...padics
etc.While going through the doctests line by line, I also made the following changes:
The doctest tags are preparation for being able to test parts of
sage.rings
in a modularized setting, in which not all rings are available. See https://doc.sagemath.org/html/en/developer/packaging_sage_library.html#doctest-only-dependenciesPart of:
📝 Checklist
⌛ Dependencies
The mass edits (adding
# optional
tags, breakingsage:
lines) were made using the following Emacs macros.