Here are the notable changes. Will be adding more as I work on this PR.
[x] Add a field in Dimension. The new field is the computed field which is a boolean. true if it is an objective dimension and false if it is a subjective dimension
[x] Ranges have been removed at the root level of the config object. Will be readding it once we have the CRUD functions for Range.
[x] add the config in the DNA property and implement format checks
[x] Sample Config file has been largely modified to adhere to the format of the config expected by the DNA property. Add more comments to make sure the format is understood by future applet developers
[x] init function for creating entries that are specified in the config file has been added
[x] Test for creating SM DNA with config has been added
Config Format Check
Note: This assumes that all dimensions used in the ResourceTypes, Methods, and CulturalContext are to be found in the dimensions defined at the root level of the config file.
ResourceTypes
check that all dimensions in the resource type exist in the root dimensions
Methods
check that the dimensions in input_dimensions are all subjective (We may want to allow objective dimensions in the input dimensions in the future as per discussed with Damien on Code Review 12/09/2022)
check that the dimension in output_dimension is objective
check that Dimension in the output dimension exists in the root dimensions of the config
check that all dimensions in input dimensions exist in the root dimensions of the config
CuluturalContexts
check that Dimension in all thresholds exists in the root dimensions of the config
check that Dimension in order_by exist in the root dimensions of the config
check that Dimension in order_by is objective
Remaining Question before we can merge this PR
The tryorama test @weswalla wrote for the cultural context uses a dimension in thresholds and order_by that are not found in the ResourceDef like here. This seems to make sense for me so Im only checking that the dimension used in ResourceType and Threshold exist in the dimensions defined at the root level of the config file. If that makes sense, then I think this PR is already mergeable. If not, then please let me know but that also means that the test test context result creation Wes created needs editing.
Here are the notable changes. Will be adding more as I work on this PR.
computed
field which is a boolean.true
if it is an objective dimension andfalse
if it is a subjective dimensionConfig Format Check Note: This assumes that all dimensions used in the
ResourceTypes
,Methods
, andCulturalContext
are to be found in the dimensions defined at the root level of the config file.ResourceTypes
Methods
Dimension
in the output dimension exists in the root dimensions of the configCuluturalContexts
Dimension
in all thresholds exists in the root dimensions of the configDimension
inorder_by
exist in the root dimensions of the configDimension
inorder_by
is objectiveRemaining Question before we can merge this PR
thresholds
andorder_by
that are not found in the ResourceDef like here. This seems to make sense for me so Im only checking that the dimension used inResourceType
andThreshold
exist in the dimensions defined at the root level of the config file. If that makes sense, then I think this PR is already mergeable. If not, then please let me know but that also means that the testtest context result creation
Wes created needs editing.