From 51f7e1aa7a218cf908973a44fc6a249590468112 Mon Sep 17 00:00:00 2001 From: Charlie Farrar Date: Wed, 19 Jul 2023 17:28:08 +0100 Subject: [PATCH] table updates for json schemas --- src/sections/analysis-settings.rst | 8 +- src/sections/model-settings.rst | 418 +++-------------------------- 2 files changed, 34 insertions(+), 392 deletions(-) diff --git a/src/sections/analysis-settings.rst b/src/sections/analysis-settings.rst index ae7d1d5..269872b 100644 --- a/src/sections/analysis-settings.rst +++ b/src/sections/analysis-settings.rst @@ -13,8 +13,8 @@ https://github.com/OasisLMF/ODS_Tools/blob/develop/ods_tools/data/analysis_setti ---- -Analysis Settings ------------------ +``analysis_settings`` +--------------------- ``analysis_settings`` requires ``model_supplier_id``, ``model_name_id``, ``model_settings``, ``gul_output``, and ``gul_summaries``. @@ -22,8 +22,8 @@ Analysis Settings :hide_key: /**/definitions | -Ouput Summaries ---------------- +``/output_summaries`` +********************* ``output_summaries`` only requires ``id``. diff --git a/src/sections/model-settings.rst b/src/sections/model-settings.rst index ffa28bc..803735a 100644 --- a/src/sections/model-settings.rst +++ b/src/sections/model-settings.rst @@ -20,421 +20,63 @@ The tables below contain the ``model_settings_schema``, that can be found in the Model settings ************** ----- - -+---------------------------------------------------------------------------+ -| version | -+=============+=============================================================+ -| type | string | -+-------------+-------------------------------------------------------------+ -| title | Model settings schema version | -+-------------+-------------------------------------------------------------+ -| description | The schema version for model settings validation (optional) | -+-------------+-------------------------------------------------------------+ -| minimum | 3 | -+-------------+-------------------------------------------------------------+ - ----- - -+-------------------------------------------------------------------------------+ -| name | -+=============+=================================================================+ -| type | string | -+-------------+-----------------------------------------------------------------+ -| title | Model name | -+-------------+-----------------------------------------------------------------+ -| description | Name of the model associated with this settings file (optional) | -+-------------+-----------------------------------------------------------------+ -| minLengt | 1 | -+-------------+-----------------------------------------------------------------+ - ----- - -+---------------------------------------------------------------------+ -| description | -+=============+=======================================================+ -| type | string | -+-------------+-------------------------------------------------------+ -| title | Model Description | -+-------------+-------------------------------------------------------+ -| description | Short Description of the catastrophe model (optional) | -+-------------+-------------------------------------------------------+ -| minLengt | 1 | -+-------------+-------------------------------------------------------+ +.. jsonschema:: https://raw.githubusercontent.com/OasisLMF/ODS_Tools/main/ods_tools/data/model_settings_schema.json + :hide_key: /**/model_settings, /**/lookup_settings, /**/data_settings ---- -+---------------------------------------------------------------------+ -| model_supplier_id | -+=============+=======================================================+ -| type | string | -+-------------+-------------------------------------------------------+ -| title | Model Supplier ID | -+-------------+-------------------------------------------------------+ -| description | The supplier ID for the model (optional) | -+-------------+-------------------------------------------------------+ -| minLengt | 1 | -+-------------+-------------------------------------------------------+ +``/model_settings`` +****************** ----- +.. jsonschema:: https://raw.githubusercontent.com/OasisLMF/ODS_Tools/main/ods_tools/data/model_settings_schema.json#/properties/model_settings + :hide_key: /**/event_set, /**/event_occurrence_id, /**/dropdown_parameters -+---------------------------------------------------------------------+ -| model_name_id | -+=============+=======================================================+ -| type | string | -+-------------+-------------------------------------------------------+ -| title | Model Name ID | -+-------------+-------------------------------------------------------+ -| description | The model ID for the model (optional) | -+-------------+-------------------------------------------------------+ -| minLengt | 1 | -+-------------+-------------------------------------------------------+ +| ----- +``/model_settings/event_set`` +############################ -+---------------------------------------------------------------------+ -| model_version_id | -+=============+=======================================================+ -| type | string | -+-------------+-------------------------------------------------------+ -| title | Model Version ID | -+-------------+-------------------------------------------------------+ -| description | The version ID for the model (optional) | -+-------------+-------------------------------------------------------+ -| minLengt | 1 | -+-------------+-------------------------------------------------------+ +.. jsonschema:: https://raw.githubusercontent.com/OasisLMF/ODS_Tools/main/ods_tools/data/model_settings_schema.json#/properties/model_settings/properties/event_set ----- +| -+-------------------------------------------------------------------------------------------------------------------------------+ -| model_configurable | -+=============+=================================================================================================================+ -| type | boolean | -+-------------+-----------------------------------------------------------------------------------------------------------------+ -| title | Model configurable | -+-------------+-----------------------------------------------------------------------------------------------------------------+ -| description | Marks this model as a 'complex model' with configuration options at the input file generation stage. (optional) | -+-------------+-----------------------------------------------------------------------------------------------------------------+ +``/model_settings/event_occurrence_id`` +###################################### ----- +.. jsonschema:: https://raw.githubusercontent.com/OasisLMF/ODS_Tools/main/ods_tools/data/model_settings_schema.json#/properties/model_settings/properties/event_occurrence_id -+----------------------------------------------------------------------------+ -| model_default_samples | -+=============+==============================================================+ -| type | integer | -+-------------+--------------------------------------------------------------+ -| title | Default number of samples | -+-------------+--------------------------------------------------------------+ -| description | The default number of samples generated per event (optional) | -+-------------+--------------------------------------------------------------+ -| minimum | 0 | -+-------------+--------------------------------------------------------------+ +| ----- +``/model_settings/dropdown_parameters`` +###################################### -+-------------------------------------------------------------------------------------+ -| model_settings | -+======================+==============================================================+ -| type | object | -+----------------------+--------------------------------------------------------------+ -| uniqueItems | false | -+----------------------+--------------------------------------------------------------+ -| title | Model setting options | -+----------------------+--------------------------------------------------------------+ -| description | The default number of samples generated per event (optional) | -+----------------------+--------------------------------------------------------------+ -| additionalProperties | false | -+----------------------+--------------------------------------------------------------+ +.. jsonschema:: https://raw.githubusercontent.com/OasisLMF/ODS_Tools/main/ods_tools/data/model_settings_schema.json#/properties/model_settings/properties/dropdown_parameters | -Model settings properties -************************* - ---- -``event_set`` requires: ``name``, ``desc``, ``default``, and ``options``. - -+------------------------------------------------------------------------------------------------------------------------------------+ -| event_set | -+=============+======================================================================================================================+ -| title | Event set selector | -+-------------+----------------------------------------------------------------------------------------------------------------------+ -| description | The 'id' field from options is used as a file suffix' events_.bin | -+-------------+----------------------------------------------------------------------------------------------------------------------+ -| type | object | -+-------------+----------------------------------------------------------------------------------------------------------------------+ -| uniqueItems | false | -+-------------+--------+-------------------------------------------------------------------------------------------------------------+ -| additionalProperties | false | -+----------------------+-------------+-------------+---------------------------------------------------------------------------------+ -| properties | name | type | string | -| | +-------------+---------------------------------------------------------------------------------+ -| | | title | UI Option | -| | +-------------+---------------------------------------------------------------------------------+ -| | | description | UI name for selection | -| | +-------------+---------------------------------------------------------------------------------+ -| | | minLength | 1 | -| +-------------+-------------+---------------------------------------------------------------------------------+ -| | desc | type | string | -| | +-------------+---------------------------------------------------------------------------------+ -| | | title | Short description | -| | +-------------+---------------------------------------------------------------------------------+ -| | | description | UI description for selection | -| +-------------+-------------+---------------------------------------------------------------------------------+ -| | used_for | type | string | -| | +-------------+---------------------------------------------------------------------------------+ -| | | title | Where the setting is applied | -| | +-------------+---------------------------------------------------------------------------------+ -| | | description | Set if this parameter is ONLY used at input 'generation' or for output 'losses' | -| | +-------------+---------------------------------------------------------------------------------+ -| | | enum | all, generation, losses | -| +-------------+-------------+---------------------------------------------------------------------------------+ -| | tooltip | type | string | -| | +-------------+---------------------------------------------------------------------------------+ -| | | title | UI tooltip | -| | +-------------+---------------------------------------------------------------------------------+ -| | | description | Long description (optional) | -| +-------------+-------------+---------------------------------------------------------------------------------+ -| | options | type | array | -| | +-------------+---------------------------------------------------------------------------------+ -| | | title | Selection options for events | -| | +-------------+---------------------------------------------------------------------------------+ -| | | description | Array of possible event sets | -| | +-------------+---------------------------------------------------------------------------------+ -| | | required | id, desc | -| | +-------------+---------------------------------------------------------------------------------+ -| | | items | LISTED BELOW | -+----------------------+-------------+-------------+---------------------------------------------------------------------------------+ -| required | name, desc, default, options | -+----------------------+-------------------------------------------------------------------------------------------------------------+ +``/lookup_settings`` +******************** + +.. jsonschema:: https://raw.githubusercontent.com/OasisLMF/ODS_Tools/main/ods_tools/data/model_settings_schema.json#/properties/lookup_settings | -**Options items** - -``options`` requires: ``id``, ``desc`` - -+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| options items | -+======================+============================================================================================================================================================+ -| type | object | -+----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| title | Selection option element | -+----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| description | Event sets option | -+----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| additionalProperties | false | -+----------------------+----------------------+-------------+-----------------------------------------------------------------------------------------------------------------------+ -| properties | id | type | string | -| | +-------------+-----------------------------------------------------------------------------------------------------------------------+ -| | | title | event set suffix | -| | +-------------+-----------------------------------------------------------------------------------------------------------------------+ -| | | description | String value used to select an event set | -| | +-------------+-----------------------------------------------------------------------------------------------------------------------+ -| | | minLength | 1 | -| +----------------------+-------------+-----------------------------------------------------------------------------------------------------------------------+ -| | desc | type | string | -| | +-------------+-----------------------------------------------------------------------------------------------------------------------+ -| | | title | Event set description | -| | +-------------+-----------------------------------------------------------------------------------------------------------------------+ -| | | description | UI description for selection | -| | +-------------+-----------------------------------------------------------------------------------------------------------------------+ -| | | minLength | 1 | -| +----------------------+-------------+-----------------------------------------------------------------------------------------------------------------------+ -| | number_of_events | type | integer | -| | +-------------+-----------------------------------------------------------------------------------------------------------------------+ -| | | title | The number of events | -| | +-------------+-----------------------------------------------------------------------------------------------------------------------+ -| | | description | The total number of events in the set (optional) | -| | +-------------+-----------------------------------------------------------------------------------------------------------------------+ -| | | minimum | 0 | -| +----------------------+-------------+-----------------------------------------------------------------------------------------------------------------------+ -| | valid_occurrence_ids | type | array | -| | +-------------+-----------------------------------------------------------------------------------------------------------------------+ -| | | title | Supported occurrence files | -| | +-------------+-----------------------------------------------------------------------------------------------------------------------+ -| | | description | An optional list of viable occurrence file ids to use with this event set | -| | +-------------+-----------+-----------------------------------------------------------------------------------------------------------+ -| | | items | type | string | -| | | +-----------+-----------------------------------------------------------------------------------------------------------+ -| | | | minLength | 1 | -| +----------------------+-------------+-----------+-----------------------------------------------------------------------------------------------------------+ -| | valid_perspectives | type | array | -| | +-------------+-----------------------------------------------------------------------------------------------------------------------+ -| | | title | Supported loss perspectives | -| | +-------------+-----------------------------------------------------------------------------------------------------------------------+ -| | | description | If set, this event set only supports the given output perspectives. 'gul': ground up losses, 'il': insured losses, | -| | | | 'ri': reinsurance losses | -| | +-------------+-----------+-----------------------------------------------------------------------------------------------------------+ -| | | items | type | string | -| | | +-----------+-----------------------------------------------------------------------------------------------------------+ -| | | | enum | gul, il, ri | -| +----------------------+-------------+-----------+-----------------------------------------------------------------------------------------------------------+ -| | valid_metrics | type | array | -| | +-------------+-----------------------------------------------------------------------------------------------------------------------+ -| | | title | Supported output metrics | -| | +-------------+-----------------------------------------------------------------------------------------------------------------------+ -| | | description | If set, this event set only supports the given output metrics, matches the output types set in the summaries section | -| | | | on an `analysis_settings.json` file. Example: 'valid_metrics':['ptl','elt'] means that only valid summary outputs are | -| | | | 'eltcalc' and 'pltcalc' | -| | +-------------+-----------+-----------------------------------------------------------------------------------------------------------+ -| | | items | type | string | -| | | +-----------+-----------------------------------------------------------------------------------------------------------+ -| | | | enum | aal, elt, plt, lec, aep, oep, summarycalc, full_uncertainty_aep, full_uncertainty_oep, sample_mean_aep, | -| | | | | sample_mean_oep, wheatsheaf_aep, wheatsheaf_mean_aep, wheatsheaf_mean_oep, wheatsheaf_oep, ord_output, | -| | | | | elt_sample, elt_quantile, elt_moment, plt_sample, plt_quantile, plt_moment, alt_period, alct_convergence, | -| | | | | ept, ept_full_uncertainty_aep, ept_full_uncertainty_oep, ept_mean_sample_aep, ept_mean_sample_oep, | -| | | | | ept_per_sample_mean_aep, ept_per_sample_mean_oep, psept, psept_aep, psept_oep | -| +----------------------+-------------+-----------+-----------------------------------------------------------------------------------------------------------+ -| | tooltip | type | string | -| | +-------------+-----------------------------------------------------------------------------------------------------------------------+ -| | | title | UI tooltip | -| | +-------------+-----------------------------------------------------------------------------------------------------------------------+ -| | | description | Long description (optional) | -+----------------------+----------------------+-------------+-----------------------------------------------------------------------------------------------------------------------+ +``/data_settings`` +****************** +.. jsonschema:: https://raw.githubusercontent.com/OasisLMF/ODS_Tools/main/ods_tools/data/model_settings_schema.json#/properties/data_settings + :hide_key: /**/datafile_selectors ----- +| -``event_occurrence_id`` requires: ``name``, ``desc``, ``default``, and ``options``. - -+------------------------------------------------------------------------------------------------------------------------------------+ -| event_occurrence_id | -+=============+======================================================================================================================+ -| title | Occurrence set selector | -+-------------+----------------------------------------------------------------------------------------------------------------------+ -| description | The 'id' from options is used as a file suffix' occurrence_.bin | -+-------------+----------------------------------------------------------------------------------------------------------------------+ -| type | object | -+-------------+----------------------------------------------------------------------------------------------------------------------+ -| uniqueItems | false | -+-------------+--------+-------------------------------------------------------------------------------------------------------------+ -| additionalProperties | false | -+----------------------+-------------+-------------+---------------------------------------------------------------------------------+ -| properties | name | type | string | -| | +-------------+---------------------------------------------------------------------------------+ -| | | title | UI Option | -| | +-------------+---------------------------------------------------------------------------------+ -| | | description | UI name for selection | -| | +-------------+---------------------------------------------------------------------------------+ -| | | minLength | 1 | -| +-------------+-------------+---------------------------------------------------------------------------------+ -| | desc | type | string | -| | +-------------+---------------------------------------------------------------------------------+ -| | | title | Short description | -| | +-------------+---------------------------------------------------------------------------------+ -| | | description | UI description for selection | -| +-------------+-------------+---------------------------------------------------------------------------------+ -| | used_for | type | string | -| | +-------------+---------------------------------------------------------------------------------+ -| | | title | Where the setting is applied | -| | +-------------+---------------------------------------------------------------------------------+ -| | | description | Set if this parameter is ONLY used at input 'generation' or for output 'losses' | -| | +-------------+---------------------------------------------------------------------------------+ -| | | enum | all, generation, losses | -| +-------------+-------------+---------------------------------------------------------------------------------+ -| | tooltip | type | string | -| | +-------------+---------------------------------------------------------------------------------+ -| | | title | UI tooltip | -| | +-------------+---------------------------------------------------------------------------------+ -| | | description | Long description (optional) | -| +-------------+-------------+---------------------------------------------------------------------------------+ -| | default | type | string | -| | +-------------+---------------------------------------------------------------------------------+ -| | | title | Default occurrence file | -| | +-------------+---------------------------------------------------------------------------------+ -| | | description | Initial setting for occurrence | -| +-------------+-------------+---------------------------------------------------------------------------------+ -| | options | type | array | -| | +-------------+---------------------------------------------------------------------------------+ -| | | title | Selection options for occurrence | -| | +-------------+---------------------------------------------------------------------------------+ -| | | description | Array of possible occurrence sets | -| | +-------------+---------------------------------------------------------------------------------+ -| | | required | id, desc | -| | +-------------+---------------------------------------------------------------------------------+ -| | | items | LISTED BELOW | -+----------------------+-------------+-------------+---------------------------------------------------------------------------------+ +``/data_settings/datafile_selectors`` +#################################### -| +.. jsonschema:: https://raw.githubusercontent.com/OasisLMF/ODS_Tools/main/ods_tools/data/model_settings_schema.json#/properties/data_settings/properties/datafile_selectors -**Options** - -``options`` requires: ``id``, ``desc`` - -+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| options items | -+======================+============================================================================================================================================================+ -| type | object | -+----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| title | Selection option element | -+----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| description | Occurrence set option | -+----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| additionalProperties | false | -+----------------------+----------------------+-------------+-----------------------------------------------------------------------------------------------------------------------+ -| properties | id | type | string | -| | +-------------+-----------------------------------------------------------------------------------------------------------------------+ -| | | title | occurrence set suffix | -| | +-------------+-----------------------------------------------------------------------------------------------------------------------+ -| | | description | String value used to select an occurrence set | -| | +-------------+-----------------------------------------------------------------------------------------------------------------------+ -| | | minLength | 1 | -| +----------------------+-------------+-----------------------------------------------------------------------------------------------------------------------+ -| | desc | type | string | -| | +-------------+-----------------------------------------------------------------------------------------------------------------------+ -| | | title | Occurrence set description | -| | +-------------+-----------------------------------------------------------------------------------------------------------------------+ -| | | description | UI description for selection | -| | +-------------+-----------------------------------------------------------------------------------------------------------------------+ -| | | minLength | 1 | -| +----------------------+-------------+-----------------------------------------------------------------------------------------------------------------------+ -| | tooltip | type | string | -| | +-------------+-----------------------------------------------------------------------------------------------------------------------+ -| | | title | UI tooltip | -| | +-------------+-----------------------------------------------------------------------------------------------------------------------+ -| | | description | Long description (optional) | -| +----------------------+-------------+-----------------------------------------------------------------------------------------------------------------------+ -| | max_periods | type | integer | -| | +-------------+-----------------------------------------------------------------------------------------------------------------------+ -| | | title | Max periods | -| | +-------------+-----------------------------------------------------------------------------------------------------------------------+ -| | | description | Maximum periods for this occurrence set | -| | +-------------+-----------------------------------------------------------------------------------------------------------------------+ -| | | minimum | 1 | -+----------------------+----------------------+-------------+-----------------------------------------------------------------------------------------------------------------------+ ----- -+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| valid_output_perspectives | -+======================+============================================================================================================================================================+ -| type | array | -+----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| title | Globally supported loss perspectives | -+----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| description | If set, the model only supports the given output perspectives. This can be overridden per event set using the 'valid_perspectives' field. 'gul': ground up | -| | losses, 'il': insured losses, 'ri': reinsurance losses | -+----------------------+------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ -| items | type | string | -| +------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ -| | enum | gul, il, ri | -+----------------------+------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ ----- -+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| valid_output_metrics | -+======================+============================================================================================================================================================+ -| type | array | -+----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| title | Globally supported output metrics | -+----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| description | If set, the model only supports the given output metrics. This can be overridden per event set using the 'valid_metrics' field. Values must match the | -| | output options in the summaries section from the `analysis_settings.json` file. Example: 'valid_output_metrics':['ptl','elt'] | -+----------------------+------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ -| items | type | string | -| +------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ -| | enum | gul, il, ri | -+----------------------+------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ \ No newline at end of file