-
Notifications
You must be signed in to change notification settings - Fork 28
Fill chunk refs #4434
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
base: main
Are you sure you want to change the base?
Fill chunk refs #4434
Changes from 17 commits
d3c5451
f930e6b
32f3c04
e9e0038
d28cafb
5719827
8875f1f
631eec3
fd37057
3cd0f38
b926a6a
fdd1c54
517ff62
97212b7
a56504d
f9eda18
9db8448
288381d
5ba7073
21e5fde
65cc135
d82f5c4
ea3a593
2d418fa
30a1152
9840d37
a3891b4
b860ab6
c2ce1aa
b4dea08
7128107
2330c83
f2186c5
7d410dc
40a86f6
ec610c9
e70066f
b8a2991
1b11b06
3028ab6
e3b3de0
647c79b
84e07b2
5e39b6b
2b0c445
f59b91a
4068616
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,6 +4,7 @@ module Drasil.GlassBR.Assumptions (assumpGT, assumpGC, assumpES, assumpSV, | |
|
|
||
| import Language.Drasil hiding (organization) | ||
| import qualified Drasil.DocLang.SRS as SRS (valsOfAuxCons) | ||
| import Control.Lens (view) | ||
| import Language.Drasil.Chunk.Concept.NamedCombinators | ||
| import qualified Language.Drasil.NounPhrase.Combinators as NP | ||
| import qualified Language.Drasil.Sentence.Combinators as S | ||
|
|
@@ -67,7 +68,7 @@ standardValuesDesc :: UnitalChunk -> Sentence | |
| standardValuesDesc mainIdea = foldlSent [atStartNP' (the value), S "provided in", | ||
| refS $ SRS.valsOfAuxCons ([]::[Contents]) ([]::[Section]), S "are assumed for the", phrase mainIdea, | ||
| sParen (ch mainIdea) `sC` S "and the", plural materialProprty `S.of_` | ||
| foldlList Comma List (map ch (take 3 assumptionConstants))] | ||
| foldlList Comma List (map (ch . view defLhs) assumptionConstants)] | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
|
||
| glassLiteDesc :: Sentence | ||
| glassLiteDesc = foldlSent [atStart glass, S "under consideration is assumed to be a single", | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,10 +6,12 @@ import Language.Drasil | |
| import Drasil.Metadata (dataDefn) | ||
| import Drasil.SRSDocument | ||
| import Drasil.Generator (cdb) | ||
| import qualified Drasil.DocLang.SRS as SRS (inModel) | ||
| import Drasil.DocLang (inReq, inReqDesc, mkInputPropsTable) | ||
| import qualified Drasil.DocLang.SRS as SRS (inModel, sectionReferences) | ||
| import qualified Language.Drasil.Sentence.Combinators as S | ||
| import Drasil.System (SystemKind(Specification), mkSystem, systemdb) | ||
|
|
||
| import Data.Drasil.Concepts.Documentation (input_, value) | ||
| import Data.Drasil.Concepts.Math (mathcon', ode) | ||
| import Data.Drasil.ExternalLibraries.ODELibraries | ||
| (apacheODESymbols, odeintSymbols, osloSymbols, | ||
|
|
@@ -90,7 +92,7 @@ mkSRS | |
| ShowDerivation, | ||
| Constraints EmptyS inputsUC]], | ||
|
|
||
| ReqrmntSec $ ReqsProg [FReqsSub EmptyS [], NonFReqsSub], LCsSec, | ||
| ReqrmntSec $ ReqsProg [FReqsSub inputValuesDescription [], NonFReqsSub], LCsSec, | ||
|
||
| TraceabilitySec $ TraceabilityProg $ traceMatStandard si, Bibliography] | ||
|
|
||
| si :: System | ||
|
|
@@ -146,13 +148,13 @@ symbMap = cdb (map dqdWr physicscon ++ symbolsAll ++ [dqdWr mass, dqdWr posInf, | |
| genDefns | ||
| theoreticalModels | ||
| conceptInstances | ||
| labelledContent | ||
| labelledContentWithInputs | ||
| allRefs | ||
| citations | ||
|
|
||
| -- | Holds all references and links used in the document. | ||
| allRefs :: [Reference] | ||
| allRefs = [externalLinkRef] | ||
| allRefs = externalLinkRef : SRS.sectionReferences ++ map ref labelledContentWithInputs | ||
|
||
|
|
||
| abbreviationsList :: [IdeaDict] | ||
| abbreviationsList = | ||
|
|
@@ -161,8 +163,23 @@ abbreviationsList = | |
| -- QuantityDicts | ||
| map nw symbolsAll | ||
|
|
||
| labelledContentWithInputs :: [LabelledContent] | ||
| labelledContentWithInputs = inputValuesTable : labelledContent | ||
|
|
||
| inputValuesTable :: LabelledContent | ||
| inputValuesTable = mkInputPropsTable inputs | ||
|
|
||
| inputValuesDescription :: Sentence | ||
| inputValuesDescription = S "the tunable controller parameters" | ||
|
|
||
| inputValuesSentence :: Sentence | ||
| inputValuesSentence = inReqDesc inputValuesTable inputValuesDescription | ||
|
|
||
| inputValuesRequirement :: ConceptInstance | ||
| inputValuesRequirement = inReq inputValuesSentence | ||
|
|
||
| conceptInstances :: [ConceptInstance] | ||
| conceptInstances = assumptions ++ goals ++ funcReqs ++ nonfuncReqs ++ likelyChgs | ||
| conceptInstances = inputValuesRequirement : (assumptions ++ goals ++ funcReqs ++ nonfuncReqs ++ likelyChgs) | ||
|
|
||
| stdFields :: Fields | ||
| stdFields | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why have these changed order? We should make such changes unless there is a good reason to. Previous were in strict alphabetical order.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because this change ensures every derived unit is inserted after the units it depends on.
For example,
pascalprecedeskilopascal,voltprecedesfarad/ohm, andweberprecedestesla/henry.Drasil/code/drasil-database/lib/Database/Drasil/ChunkDB.hs
Lines 175 to 178 in e36c1ec
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent reason, thank you! You should put in a comment to that effect. I would make sure that the base units are in alphabetical order, and then by dependency (+alphabetical) order after that.