Return Squiggle typeOf or Quest type.
Semantic versioning is used.
Quantity turns common inputs into a distribution that indicates how many of something.
It does not record, track, or manage the unit of measure of the quantity. This is expected to be managed by the name of the quantity.
For example: LaborHours, ServerCount, etc.
The estimator is expected to align the unit of measure of the quantity with the unit of measure of the price.
Assertion allows embedding of propositions in the estimate that have a certain likelihood of being true or false.
They are useful in combinatino with the asLongAs*
functions to toggle of sections of the estimate on or off.
It is merely a wrapper around the bernoulli
distribution that adds some Squiggle tags.
Aliases assumption1,
risk, and
scope` have been provided for semantic purposes.
Price turns common inputs into a distribution that indicates the monetary value of something.
It does not record, track, or manage the currency of the quantity. This is expected to be managed by the name of the price, or by the locale.
For example: HourlyRate, CostPerGbPerMonth, etc.
The estimator is expected to align the unit of measure of the price with the unit of measure of the quantity.
Assertions that do not (yet) warrant their impact be woven into the estimate, but are important to document. These tend to be assertions with wide ranging impacts and should be named as statements of truth. Their chance is commonly 100%.
For example:
portlandThornsFCWillWinAllTheirMatchesThisYear
,
ourCompanyWillBeBought
,
cascadiaFaultWillNotRip
.
Assertions that do have their impact reflected into the estimate. Their chance can be any percentage from 0% through 100%.
For example:
hasBill0001BeenSignedIntoLaw
,
canDeployOnAWS
,
wineSellsBetterThanBeer
.
Assertions that are meant to manage scope optionality.
While their chance can be any percentage from 0% through 100%,
they commonly start out as true
, or at 100%.
They are toggled to false
during what-if analysis,
where the estimate is adjusted to meet outside realities.
For example:
goScubaDiving
,
mustHaveAllWheelDrive
,
Tech team will increase their skill sets if they could read their reference books and literature on e-Ink readers.
Always asserts to true.
Always asserts to false.
Semantic versioning is used.
Flattens a list repeatedly until only non-list elements remain.
NOTE: List.flatten drops nested lists that are empty. listDeepFlatten is no different.
import 'hub:mlao-pdx/lib-common' as c l = [1,2,[3,[4],[]],5,[]]
Collect values for tags ["doc","numberFormat","hidden","name","startOpenState"] and return as dictionary.
Use in combination with tagMerge
to copy tag values from one object to another.
See this discord chat
import 'hub:mlao-pdx/lib-common' as c @name('FooName')
Flattens a list repeatedly until only non-list elements remain.
NOTE: List.flatten drops nested lists that are empty. listDeepFlatten is no different.
import 'hub:mlao-pdx/lib-common' as c l = [1,2,[3,[4],[]],5,[]]
Set values for tags ["doc","numberFormat","hidden","name","startOpenState"], that are not yet present on the object, from given dictionary of tags.
Use in combination with tagGet
to copy tag values from one object to another.
See this discord chat
import 'hub:mlao-pdx/lib-common' as c @name('FooName')
Convert a value into a list, unless it is already a list.
Create list of unique values by Name, or value if no name.
Set values for tags ["doc","numberFormat","hidden","name","startOpenState"] from given dictionary of tags.
Use in combination with tagGet
to copy tag values from one object to another.
See this discord chat
import 'hub:mlao-pdx/lib-common' as c @name('FooName')
Copy values for tags ["doc","numberFormat","hidden","name","startOpenState"] from tagSource
to tagTarget
.
import 'hub:mlao-pdx/lib-common' as c @name('FooName') @doc('FooDoc')
Return slice of a string, as if it was a list of single characters.
A list of all dictionary keys that start with an underscore.
import 'hub:mlao-pdx/lib-common' as c d = {_yes: 'Private Attribute', no: 'Common Attribute'} c.privateAttributes(d)
Return same dictionary with private attributes (_*) ommitted.
Check if a list is a unnested list of Numbers.
import 'hub:mlao-pdx/lib-common' as c { yes: c.isListOf([1n,2%,3,4T],'Number'), yes: c.isListOf(['a', '3'],'String'), no: c.isListOfNumbers([1n,2%,'3',4T],'Number'),
Cast values into a distribution, if reasonable.
import 'hub:mlao-pdx/lib-common' as c e = { number: c.toDistribution(10), list_of_numbers: c.toDistribution(List.upTo(1,20)), distribution: c.toDistribution(10 to 100),
Functions that help build a cost estimation model in a single currency. All functions are data-first, unless explicitly stated otherwise in its documentation. See the calculator of each function for documentation.
A wrapper around PERT to allow 2, 3, and 4 arguments to be provided
Semantic versioning is used.
Determine a distribution based on three data points: low, likely, and high. A fourth argument is provided to indicate the confidence of the likely value.
A confidence of 0
results in a hard bounded uniform distribution.
Confidences over 10
will become so squeezed that low and high bounds start losing meaning.
import 'hub:mlao-pdx/pert' as p
Semantic versioning is used.
Semantic versioning is used.
Adds required components to the given item.
Quantity turns common inputs into a distribution that indicates how many of something.
It does not record, track, or manage the unit of measure of the quantity. This is expected to be managed by the name of the quantity.
For example: LaborHours, ServerCount, etc.
The estimator is expected to align the unit of measure of the quantity with the unit of measure of the price.
Label returns the string passed, with its name tag set to that string.
Item collects components that make up a composite estimate if the prerequisites are met.
Price turns common inputs into a distribution that indicates the monetary value of something.
It does not record, track, or manage the currency of the quantity. This is expected to be managed by the name of the price, or by the locale.
For example: HourlyRate, CostPerGbPerMonth, etc.
The estimator is expected to align the unit of measure of the price with the unit of measure of the quantity.
Always asserts to true.
Assertion allows embedding of propositions in the estimate that have a certain likelihood of being true or false.
Aliases assumption1,
risk, and
scope` have been provided for semantic purposes.
Always asserts to false.
Assertions that do not (yet) warrant their impact be woven into the estimate, but are important to document. These tend to be assertions with wide ranging impacts and should be named as statements of truth. Their chance is commonly 100%.
Assertions that are meant to manage scope optionality.
While their chance can be any percentage from 0% through 100%,
they commonly start out as true
, or at 100%.
They are toggled to false
during what-if analysis,
where the estimate is adjusted to meet outside realities.
Resolve the four sets of assertions into a single True or False Bernoulli distribution.
every
requires that each passed assertion MUST be truenone
requires that each passed assertion MUST be falsesome
requires that any of the passed assertions could be truesomeNot
requires that any of the passed assertions could be falseAdds items that require the use the given item.
Adds desired components to the given item.
Adds items that desire to use the given item.
Assertions that do have their impact reflected into the estimate. Their chance can be any percentage from 0% through 100%.
Python string.printable.
Sort a list of strings.