Skip to content

Commit

Permalink
Add a check to run all output reports
Browse files Browse the repository at this point in the history
  • Loading branch information
sambles committed May 18, 2023
1 parent d02efa4 commit 13dc0b0
Show file tree
Hide file tree
Showing 2 changed files with 158 additions and 0 deletions.
137 changes: 137 additions & 0 deletions tests/ci/ALL_output_analysis_settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
{
"version": "3",
"analysis_tag": "ALL_outputs_tests",
"source_tag": "MDK",
"model_name_id": "PiWind",
"model_supplier_id": "OasisLMF",
"number_of_samples": 1,
"gul_threshold": 0,
"gul_output": true,
"model_settings": {
"event_set": "p",
"event_occurrence_id": "lt"
},
"gul_summaries": [
{
"id": 1,
"ord_output": {
"plt_sample": true,
"plt_quantile": true,
"plt_moment": true,
"elt_sample": true,
"elt_quantile": true,
"elt_moment": true,
"alt_period": true,
"ept_full_uncertainty_aep": true,
"ept_full_uncertainty_oep": true,
"ept_mean_sample_aep": true,
"ept_mean_sample_oep": true,
"ept_per_sample_mean_aep": true,
"ept_per_sample_mean_oep": true,
"psept_aep": true,
"psept_oep": true,
"parquet_format": true,
"return_period_file": true
},
"summarycalc": true,
"eltcalc": true,
"aalcalc": true,
"pltcalc": true,
"lec_output": true,
"leccalc": {
"return_period_file": true,
"full_uncertainty_aep": true,
"full_uncertainty_oep": true,
"wheatsheaf_aep": true,
"wheatsheaf_oep": true,
"wheatsheaf_mean_aep": true,
"wheatsheaf_mean_oep": true,
"sample_mean_aep": true,
"sample_mean_oep": true
}
}
],

"il_output": true,
"il_summaries": [
{
"id": 1,
"ord_output": {
"plt_sample": true,
"plt_quantile": true,
"plt_moment": true,
"elt_sample": true,
"elt_quantile": true,
"elt_moment": true,
"alt_period": true,
"ept_full_uncertainty_aep": true,
"ept_full_uncertainty_oep": true,
"ept_mean_sample_aep": true,
"ept_mean_sample_oep": true,
"ept_per_sample_mean_aep": true,
"ept_per_sample_mean_oep": true,
"psept_aep": true,
"psept_oep": true,
"parquet_format": true,
"return_period_file": true
},
"summarycalc": true,
"eltcalc": true,
"aalcalc": true,
"pltcalc": true,
"lec_output": true,
"leccalc": {
"return_period_file": true,
"full_uncertainty_aep": true,
"full_uncertainty_oep": true,
"wheatsheaf_aep": true,
"wheatsheaf_oep": true,
"wheatsheaf_mean_aep": true,
"wheatsheaf_mean_oep": true,
"sample_mean_aep": true,
"sample_mean_oep": true
}
}
],
"ri_output": true,
"ri_summaries": [
{
"id": 1,
"ord_output": {
"plt_sample": true,
"plt_quantile": true,
"plt_moment": true,
"elt_sample": true,
"elt_quantile": true,
"elt_moment": true,
"alt_period": true,
"ept_full_uncertainty_aep": true,
"ept_full_uncertainty_oep": true,
"ept_mean_sample_aep": true,
"ept_mean_sample_oep": true,
"ept_per_sample_mean_aep": true,
"ept_per_sample_mean_oep": true,
"psept_aep": true,
"psept_oep": true,
"parquet_format": true,
"return_period_file": true
},
"summarycalc": true,
"eltcalc": true,
"aalcalc": true,
"pltcalc": true,
"lec_output": true,
"leccalc": {
"return_period_file": true,
"full_uncertainty_aep": true,
"full_uncertainty_oep": true,
"wheatsheaf_aep": true,
"wheatsheaf_oep": true,
"wheatsheaf_mean_aep": true,
"wheatsheaf_mean_oep": true,
"sample_mean_aep": true,
"sample_mean_oep": true
}
}
]
}
21 changes: 21 additions & 0 deletions tests/test_piwind_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,27 @@
RI = os.path.join(file_path, 'ci', 'RI_analysis_settings.json')
ORD_CSV = os.path.join(file_path, 'ci', 'ORD_csv_analysis_settings.json')
ORD_PQ = os.path.join(file_path, 'ci', 'ORD_parquet_analysis_settings.json')
ALL = os.path.join(file_path, 'ci', 'ALL_output_analysis_settings.json')



class all_outputs(TestOasisModel):
exp_dir = os.path.join(file_path, 'ci', 'expected', __qualname__)
exp_files = glob.glob(f"{exp_dir}/output/*")

@classmethod
def setUpClass(cls):
super().setUpClass(
params = {
"analysis_settings_json": ALL,
'oed_location_csv': os.path.join(file_path, 'inputs', 'SourceLocOEDPiWind10.csv'),
'oed_accounts_csv': os.path.join(file_path, 'inputs', 'SourceAccOEDPiWind.csv'),
'oed_info_csv': os.path.join(file_path, 'inputs', 'SourceReinsInfoOEDPiWind.csv'),
'oed_scope_csv': os.path.join(file_path, 'inputs', 'SourceReinsScopeOEDPiWind.csv')
})
@parametrize("filename", exp_files)
def test_output_file(self, filename):
self._check_output(filename)


class control_set(TestOasisModel):
Expand Down

0 comments on commit 13dc0b0

Please sign in to comment.