Macaulay2 / Macaulay2/M2

Retiring Canned Examples?

Open
#1,924 12 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Documentation
Dominant language
Macaulay2
Stars
435
Forks
297
Avg merge
4d 20h
Merged PRs (30d)
11

Description

I don't quite know what the history of Canned Examples is, but by now, we have two ways of generating examples: either by outputtting them to a .out file, or by using `capture`. I think that should be enough to cover all cases. I philosophically dislike Canned Examples because they're hard-coded and because they're not mode-agnostic. About the latter point, what I mean is
(1) they look ugly in WebApp mode and
(2) they force us (well, me, really) to write ugly hacks in the handling of example output since `capture` produces examples in the current output mode (which I think is a good thing) whereas CannedExamples are always in standard mode. I will have to submit a PR anyway because https://github.com/Macaulay2/M2/commit/90960b09e1e841f8c643a91f1310b36edac90d46#commitcomment-46835042 broke `capture` in WebApp mode but I don't look forward to having to treat CannedExamples as well; originally when I rewrote `separateM2output` (the function that parses example output) I tried to make it as clean as possible and now it's kind of sloppy again.
So in conclusion I'm ready to go through the Core and check all CannedExamples and see if there's some way to replace them with normal examples. Suggestions of alternatives welcome.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting the Core's CannedExamples and the separateM2output function mentioned in the issue. Compare those paths with .out-file examples and capture, including their behavior in WebApp mode. Done means the CannedExamples cases have been reviewed and, where possible, replaced without breaking example output handling.

Written by the indexing model from the issue text.

Assessment

Domain
developer-experience, tooling
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.