Replies: 1 comment
|
Hi Thomas, Thank you for your contributions and ideas. Groups inside :
Some thoughts: If I can group variables in Optional: a group whose content comes from a file Best regards |
|
Hi Thomas, Thank you for your contributions and ideas. Groups inside :
Some thoughts: If I can group variables in Optional: a group whose content comes from a file Best regards |
Uh oh!
There was an error while loading. Please reload this page.
Hi,
a suggestion for the global section of the config files, plus an optional extension at the end.
Groups inside
<global>In our project the global section of a single config file holds around twenty entries: directories, a few numbers, five
loopTypedefinitions and fiveplotMapLayerTypedefinitions. In the GUI they appear as one flat list, and nothing tells the reader which entries belong together. A<group>element with a label, collapsible in the tree, would help a lot, something like:This would also make the file itself easier to read. Nothing would change semantically — the entries end up in the same map as today, the grouping is purely for the reader. It would also make a group easy to copy from one config file to the next, which is how we would use it across our ten files.
Groups should be allowed to nest, so that a larger group can itself be structured. If the loop over the children is written recursively, that comes for free.
Implementation
Config::Configfillsstack.top().linksfrom the<global>children; the existing loop would become the tail of a recursive function:Since
getChildremoves the node from the tree, the group loop and the ordinary loop do not interfere — the current code already relies on that. And sincelinksstores whole subtrees, complex types need no special handling:loopType,plotMapLayerTypeandparametrizationGravityTypecan sit in a group like simple values, andlink="layerCoast"resolves as before.Optional: a group whose content comes from a file
A computing pipeline consists of a few config files whose global sections are identical in large parts: the same directories, the same maximum degree, the five plot layers character for character. Today every change has to be made ten times, and a typo in one of them is easy to miss. If a group could take its content from another config file, that would be solved:
where the referenced file is an ordinary GROOPS config containing only a
<global>section and no programs, so it can be opened and edited in the GUI like any other file. In the recursive function above this is one additional branch: read the file, take its<global>node, and recurse into it.The precedence would follow from the existing design without any extra rule:
linksis astd::mapand assignment overwrites, so entries defined locally after the group override the inherited ones, andcommandlineGlobalsstill overrides everything.Open questions
workingDirandgroopsConfigFileare set in the constructor. And a guard against a file including itself.One thing to add: Idea comes from me, suggestion of the change comes from KI (Claude Opus 5 max).
Thanks and best regards
Thomas
All reactions