Opened 10 years ago

Closed 9 years ago

#7897 closed defect (fixed)

Macaulay2 interface update/improvement for version 1.3.1

Reported by: novoselt Owned by: was
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:

Description (last modified by novoselt)

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 novoselt 10 years ago.
trac_7897_macaulay2_doctests_update.patch (9.4 KB) - added by novoselt 10 years ago.

Download all attachments as: .zip

Change History (12)

comment:1 Changed 10 years ago by novoselt

  • Status changed from new to needs_review

comment:2 Changed 10 years ago by novoselt

  • 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 10 years ago by novoselt

comment:3 Changed 10 years ago by novoselt

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

comment:4 Changed 10 years ago by was

  • Description modified (diff)

comment:5 Changed 10 years ago by novoselt

  • Description modified (diff)

comment:6 Changed 10 years ago by novoselt

  • Milestone set to sage-4.4

comment:7 Changed 9 years ago by mhansen

  • Reviewers set to Mike Hansen
  • Status changed from needs_review to positive_review

Looks good to me.

comment:8 Changed 9 years ago by mhansen

Also apply #5467 and #7915.

comment:9 Changed 9 years ago by mpatel

  • Merged in set to sage-4.5.2.alpha0

comment:10 Changed 9 years ago by mpatel

  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.