Ticket #7897 (closed defect: fixed)

Opened 8 months ago

Last modified 6 weeks ago

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: Author(s): Andrey Novoseltsev
Report Upstream: N/A Reviewer(s): Mike Hansen
Merged in: sage-4.5.2.alpha0 Work issues:

Description (last modified by novoselt) (diff)

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

trac_7897_improve_macaulay2_prompt_detection.patch Download (4.4 KB) - added by novoselt 7 months ago.
trac_7897_macaulay2_doctests_update.patch Download (9.4 KB) - added by novoselt 7 months ago.

Change History

Changed 8 months ago by novoselt

  • status changed from new to needs_review

Changed 8 months 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 7 months ago by novoselt

Changed 7 months ago by novoselt

Changed 7 months ago by novoselt

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

Changed 7 months ago by was

  • description modified (diff)

Changed 7 months ago by novoselt

  • description modified (diff)

Changed 5 months ago by novoselt

  • milestone set to sage-4.4

Changed 8 weeks ago by mhansen

  • status changed from needs_review to positive_review
  • reviewer set to Mike Hansen

Looks good to me.

Changed 8 weeks ago by mhansen

Also apply #5467 and #7915.

Changed 6 weeks ago by mpatel

  • merged set to sage-4.5.2.alpha0

Changed 6 weeks ago by mpatel

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