-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add to the design log the set of Choices used #2173
Comments
Very well worded issue. Thank you @bmaclach. Given that you have mapped out a path to a solution, is this issue feasible for one of the summer students, or is it better to postpone it for a while? |
@smiths I think it's feasible for a summer student. |
@JacquesCarette To convert the choices to Doc's, do you mind if I derive show for a couple datatypes in Choices.hs |
I would actually rather you didn't. We want to make explicit choices (pun intended) when we design our output 'syntax', and we don't want these to be impacted by changes in Haskell versions or code refactorings under the hood. So I prefer that we not use |
@JacquesCarette Do you mind if I make all the datatypes an instance of a class that implements show, for example class ChsShow a where
chsShow :: a -> String |
designLog.txt |
I like where you are going with these design log examples @muhammadaliog3. This is useful information to have summarized, without a need to delve through the code to figure it out. (If you are generating these files somehow, there is a typo in how Behaviour is spelled for Physical Constraint.) |
You should seriously think whether Also, I would prefer |
I think @bmaclach would agree with me that declaring sentences, chunks, or a new drasil-printers module would not be helpful here. Instead we should stick to strings (or docs). Firstly this is drasil-code, so declaring new sentences does not seem to be correct (Drasil code takes ALREADY made chunks and converts them to code chunks). |
Note that though I started the design log by using In response to the four points you raise:
|
@smiths Shoul I add the design log to stable? |
Yes, go ahead and add the design log to stable. This is a good idea. If someone makes a change that "breaks" the design log, we want to know about that. I think the design log will continue to evolve, but it would be nice to have the infrastructure in place for the CI now. |
As of #2172, the generated design log documents any cases where a user's first choice cannot be used, but it does not document the actual choices used by the generator, meaning a user would have to decipher that information themselves by looking at their choices specification and the default choices.
We should expand the design log by having it document which choice was used for every design variability. Ideas for how to do this are given in: #2172 (comment)
In more detail, we should implement a pass on
Choices
that defines a design log message for every field in the structure except for any fields specified with a preferentially-ordered list of options. This portion of the design log should be passed togenerator
and included in the initialization of the_designLog
field.For the three choices represented with preferentially-ordered lists, the
chooseConcept
,chooseSpace
, andchooseODELib
functions already have the infrastructure for defining design log messages. They currently define messages in the cases where a conflict is discovered. We just need to update them to also define a message in the "successful" case where there is no conflict. The message should say whichUID
was matched to whichCodeConcept
(forchooseConcept
), whichSpace
was matched with whichCodeType
(forchooseSpace
), and which ODE library was used (forchooseODELib
).The text was updated successfully, but these errors were encountered: