Repository navigation
refresh macaulay2 interface a little bit - #36470
Merged
Merged
Conversation
Member
|
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? |
Member
|
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 |
Contributor
Author
|
I have fixed some of them. Now doctests pass for me with macaualay2 1.19.1 from ubuntu |
Contributor
Author
|
I have also used your suggestion for a better version method. |
Contributor
Author
|
The other failures seem to depend on M2 version in use. Yours is the latest 1.22 maybe ? |
Member
Yes, 1.22. |
Member
|
Thank you for the fixes! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📝 Checklist