M2 icon indicating copy to clipboard operation
M2 copied to clipboard

Move 3 newPackage options to beginDocumentation

Open mahrud opened this issue 1 year ago • 2 comments

This is a draft for now to see what breaks. Comments welcome.

  • fixed newPackage to permit terminal null entries
  • moved 3 newPackage options to beginDocumentation
  • adjusted existing packages with optional components
  • corrected package options in TropicalTorics
  • removed FirstPackage stuff from Polymake.m2
  • unexported two undefined gfanInterface symbols

Closes #3369.

mahrud avatar Aug 05 '24 17:08 mahrud

For now, I just wanted to make sure all tests passed, but I would like to simplify this further before moving it out of draft mode. Here are a few goals, but feel free to add more:

  • [ ] keep beginDocumentation() simple, ideally one option only.
  • [ ] maybe allow use of cached examples opportunistically, or even provide a function for generating a single cached example, so we can cache only the necessary examples (e.g. realrank is the only one from CoincidenceRootLoci that needs to be cached)
  • [ ] simplify the logic in the background, maybe debug mystery issue I described above with tests disappearing after beginDocumentation()
  • [ ] think about whether CacheExampleOutputs should be transitive.
  • [ ] think about whether readPackage should know whether optional dependencies are present, because with this PR it will not
  • [ ] maybe have one distinguished package for each optional dependency so we don't check for existence of the same software in multiple places
  • [ ] along the way, stop using type or command and use findProgram
  • [ ] bring back the newPackage options for backwards compatibility, but have them give a deprecation warning.

mahrud avatar Aug 06 '24 15:08 mahrud

or even provide a function for generating a single cached example, so we can cache only the necessary examples

This would be awesome. I have a pretty hacky function that does this for the Debian package, but a cleaner solution would be great.

d-torrance avatar Aug 06 '24 18:08 d-torrance