-
-
Notifications
You must be signed in to change notification settings - Fork 517
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
refresh macaulay2 interface a little bit #36470
Conversation
Looks okay to me and does some good cleanup. Before and after this branch I get the same doctest failures. This is on OS X with the homebrew installation of
Is there a ticket to fix these? |
I don't know how to fix the problems with diff --git a/src/sage/interfaces/macaulay2.py b/src/sage/interfaces/macaulay2.py
index 1fd27a72bb3..b21dbd47910 100644
--- a/src/sage/interfaces/macaulay2.py
+++ b/src/sage/interfaces/macaulay2.py
@@ -656,16 +656,14 @@ class Macaulay2(ExtraTabCompletion, Expect):
def version(self):
"""
- Returns the version of Macaulay2.
+ Returns the version of Macaulay2 as a tuple: (major, minor)
EXAMPLES::
sage: macaulay2.version() # optional - macaulay2
- (1, 1...
+ (1, ...)
"""
- s = self.eval("version")
- r = re.compile("VERSION => (.*?)\n")
- s = r.search(s).groups()[0]
+ s = self.eval('version#"VERSION"')
return tuple(int(i) for i in s.split("."))
# Constructors |
I have fixed some of them. Now doctests pass for me with macaualay2 1.19.1 from ubuntu |
I have also used your suggestion for a better version method. |
The other failures seem to depend on M2 version in use. Yours is the latest 1.22 maybe ? |
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.
looks good
Yes, 1.22. |
Thank you for the fixes! |
📝 Checklist