Opened 13 years ago

Closed 12 years ago

#7897 closed defect (fixed)

Macaulay2 interface update/improvement for version 1.3.1

Reported by: Andrey Novoseltsev Owned by: William Stein
Priority: major Milestone: sage-4.5.2
Component: interfaces Keywords: Macaulay2, interface
Cc: Merged in: sage-4.5.2.alpha0
Authors: Andrey Novoseltsev Reviewers: Mike Hansen
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description (last modified by Andrey Novoseltsev)

See also #5467 and #7915 (!).

These patches change the prompt detection/stripping and update doctests to cause no errors with Macaulay2 1.3.1.

Improvements/fixes achieved:

  • examples in Macaulay2 documentation (which include input prompts) do not break the interaction with Sage;
  • empty/whitespace/comment lines can be executed;
  • multiline commands can be executed;
  • stripping output prompts will not cut error messages if they occur (e.g. the first call "help Thing" currently shows some errors in Macaulay2);
  • "macaulay2.restart()" does not print a useless variable name.

This is done by:

  • changing input and input continuation prompts;
  • starting with a big line number to make all output labels of the same width;
  • making sure that only output labels and spaces are stripped from the output.

These patches make tickets #7882 and #7888 unnecessary.

Attachments (2)

trac_7897_improve_macaulay2_prompt_detection.patch (4.4 KB) - added by Andrey Novoseltsev 13 years ago.
trac_7897_macaulay2_doctests_update.patch (9.4 KB) - added by Andrey Novoseltsev 13 years ago.

Download all attachments as: .zip

Change History (12)

comment:1 Changed 13 years ago by Andrey Novoseltsev

Status: newneeds_review

comment:2 Changed 13 years ago by Andrey Novoseltsev

Description: modified (diff)

I changed my mind about importance of "restart" command in the middle of the code after seeing a talk today. So the patch is rewritten to allow it everywhere. All doctests still pass with both patches applied.

Changed 13 years ago by Andrey Novoseltsev

Changed 13 years ago by Andrey Novoseltsev

comment:3 Changed 13 years ago by Andrey Novoseltsev

Renamed patches and commit messages to follow conventions. Apply both patches starting with "trac_7897"

comment:4 Changed 13 years ago by William Stein

Description: modified (diff)

comment:5 Changed 13 years ago by Andrey Novoseltsev

Description: modified (diff)

comment:6 Changed 13 years ago by Andrey Novoseltsev

Milestone: sage-4.4

comment:7 Changed 12 years ago by Mike Hansen

Reviewers: Mike Hansen
Status: needs_reviewpositive_review

Looks good to me.

comment:8 Changed 12 years ago by Mike Hansen

Also apply #5467 and #7915.

comment:9 Changed 12 years ago by Mitesh Patel

Merged in: sage-4.5.2.alpha0

comment:10 Changed 12 years ago by Mitesh Patel

Resolution: fixed
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.