From 228706a564d61b13879a633bdf7ba3de18aeeeca Mon Sep 17 00:00:00 2001 From: Mahrud Sayrafi Date: Thu, 14 Dec 2023 12:27:36 -0300 Subject: [PATCH] wip: don't document Syzygies --- M2/Macaulay2/packages/Macaulay2Doc/options.m2 | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/M2/Macaulay2/packages/Macaulay2Doc/options.m2 b/M2/Macaulay2/packages/Macaulay2Doc/options.m2 index d75e1232f95..b2be0f32c9e 100644 --- a/M2/Macaulay2/packages/Macaulay2Doc/options.m2 +++ b/M2/Macaulay2/packages/Macaulay2Doc/options.m2 @@ -12,16 +12,21 @@ opts := nonnull \\ options \ select(value \ values Core.Dictionary, f -> instanc opts = nonnull \\ options \ methods() | opts; -- e.g. catch DegreeLimit from [(minimalBetti, Ideal), DegreeLimit] opts = unique opts; -optionalNames := select(select(unique \\ flatten \\ keys \ opts, n -> instance(n, Symbol)), s -> +optionalNames := select(unique \\ flatten \\ keys \ opts, s -> instance(s, Symbol) and isGlobalSymbol toString s and not isUndocumented(d := makeDocumentTag s) and (isMissingDoc d or headline d === "an optional argument")) -optionalValues := toList unique({ Prune, Binomial, Test, Center, Right, Left } -- for manually added Symbols - | last \ last \ hooks methods() -- e.g. catch Iterate from [(saturate, Ideal, Ideal), Strategy -> Iterate] - | flatten \\ values \ opts) +optionalValues := unique(flatten \\ values \ opts + | { Prune, Binomial, Test, Center, Right, Left } -- for manually added Symbols + | last \ last \ hooks methods()) -- e.g. catch Iterate from [(saturate, Ideal, Ideal), Strategy -> Iterate] optionalValues = select(optionalValues, s -> instance(s, Symbol) and isGlobalSymbol toString s and not isUndocumented(d := makeDocumentTag s) and (isMissingDoc d or headline d === "value of an optional argument")) +-- TODO: document these +both := set optionalNames * set optionalValues +optionalNames = optionalNames - both +optionalValues = optionalValues - both + -- Create generic documentation nodes for undocumented optional arguments and values scan(optionalNames, o -> document { Key => o, Headline => "an optional argument", -- if the headline is changed, change it above as well