-
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
Creating a log file for examples #2759
Comments
Good idea. It feels like this ought to be an option inside generating the examples itself, as opposed to a separate target. Some kind of |
Okay, I like the idea of using the example itself (it will probably be much easier to work with). I'm not sure if we can use the existing choices type since that's meant for generated code, but I do have an idea for selecting options. In #2751 we said that users should have a list of options to feed into the generator function for the kinds of files we want to output. We could instead use a record type to do this, something like: data SRSChoices = SRSChc {
html :: Bool,
pdf :: Bool,
log :: Bool,
ntbook :: Bool } Maybe we shouldn't use booleans, but something like that. Or perhaps: data SRSChoices = SRSChc {
srsTypes :: [DocType]
showLog :: ShowLog} where main :: IO()
main = do
setLocaleEncoding utf8
gen (DocSpec SRS "Projectile_SRS") srs printSetting
gen (DocSpec Debug "Projectile_SRS") srs printSetting
gen (DocSpec Jupyter "Projectile_SRS") srs printSetting
gen (DocSpec Jupyter "Projectile Motion Lesson") PL.nb PL.printSetting
genCodeWithChoices choiceCombos
genDot fullSI Edit: See PR #2771 for the type setup, will probably change once I have a working copy of the log generators. |
Building off of #1541 and @balacij's suggestions from a few meetings ago, I think it would be good to make a log file that would tell the user the following:
The first one should be easy enough to just print the UIDs (maybe term and abbreviation too if they exist?), and the other UIDs can be obtained through the traceability matrix/graph functions, but I'm not sure of the best way to implement it.
It might be nice to have its own make target (something like
example_logs
), but I'm not sure how to get theSystemInformation
from that point. Maybe we could create a haskell file in thescripts
folder that depends on the examples, and just pull the system info from there.Or we could just make a function and add it to each example's
Main.hs
file, so that the logs generate every time the file is run (similar to how the traceability graphs always generate up-to-date dot files). But I don't think we would want the logs instable
, or for the logs to run every time.I was just thinking of making the three points into alphabetically ordered lists just to get the information down, but there's probably a better method of seeing the information.
The text was updated successfully, but these errors were encountered: