Skip to content

Commit c729e31

Browse files
johcartersambles
andauthored
Feature/ord output tests (#91)
* added ord_csv test to ci * new ORD and parquet tests * Fix latest platform tag fetch * Update Jenkins file to match new testcases * Test 2_case broken? * added default samples to model settings as example * removed default samples * Update expected, cases 5 6 7 & 8 * Add back parquet test conf, incase ref'ed in oasislmf branches * updated expected for modelpy and gulpy * use modelpy and gulpy explicit * add back parquet in test config in case of ref in other branches * Feature/ord output tests fix (#93) * try rm analysis_settings.json * Add diff output files * test * update case 7 * Workaround, comment out parquet report testing until scripts are fixed * Enable case_2 Co-authored-by: Sam Gamble <[email protected]> Co-authored-by: sambles <[email protected]>
1 parent 9ae45ee commit c729e31

File tree

363 files changed

+379942
-437964
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

363 files changed

+379942
-437964
lines changed

analysis_settings.json

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
"source_tag": "MDK",
44
"model_name_id": "PiWind",
55
"model_supplier_id": "OasisLMF",
6-
"number_of_samples": 10,
76
"gul_threshold": 0,
87
"gul_output": true,
98
"model_settings": {

analysis_settings_ord.json

+6-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
"source_tag": "MDK",
44
"model_name_id": "PiWind",
55
"model_supplier_id": "OasisLMF",
6-
"number_of_samples": 10,
76
"gul_threshold": 0,
87
"gul_output": true,
98
"model_settings": {
@@ -28,7 +27,8 @@
2827
"ept_per_sample_mean_aep": true,
2928
"ept_per_sample_mean_oep": true,
3029
"psept_aep": true,
31-
"psept_oep": true
30+
"psept_oep": true,
31+
"return_period_file": true
3232
}
3333
}
3434
],
@@ -52,7 +52,8 @@
5252
"ept_per_sample_mean_aep": true,
5353
"ept_per_sample_mean_oep": true,
5454
"psept_aep": true,
55-
"psept_oep": true
55+
"psept_oep": true,
56+
"return_period_file": true
5657
}
5758
}
5859
],
@@ -75,7 +76,8 @@
7576
"ept_per_sample_mean_aep": true,
7677
"ept_per_sample_mean_oep": true,
7778
"psept_aep": true,
78-
"psept_oep": true
79+
"psept_oep": true,
80+
"return_period_file": true
7981
}
8082
}
8183
]

jenkins/piwind.groovy

+3-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ node {
1414
[$class: 'StringParameterDefinition', name: 'KEYSERVER_VERSION', defaultValue: '0.0.0.1'],
1515
[$class: 'StringParameterDefinition', name: 'TAG_RELEASE', defaultValue: BRANCH_NAME.split('/').last() + "-${BUILD_NUMBER}"],
1616
[$class: 'StringParameterDefinition', name: 'TAG_OASIS', defaultValue: 'latest'],
17-
[$class: 'StringParameterDefinition', name: 'RUN_TESTS', defaultValue: '0_case 1_case 3_case 4_case control_set parquet'],
17+
//[$class: 'StringParameterDefinition', name: 'RUN_TESTS', defaultValue: 'control_set 0_case 1_case 3_case 4_case 5_case 6_case 7_case 8_case'],
18+
[$class: 'StringParameterDefinition', name: 'RUN_TESTS', defaultValue: 'control_set 0_case 1_case 2_case 3_case 4_case 5_case 7_case'],
1819
[$class: 'BooleanParameterDefinition', name: 'BUILD_WORKER', defaultValue: Boolean.valueOf(false)],
1920
[$class: 'BooleanParameterDefinition', name: 'PURGE', defaultValue: Boolean.valueOf(true)],
2021
[$class: 'BooleanParameterDefinition', name: 'PUBLISH', defaultValue: Boolean.valueOf(false)],
@@ -124,7 +125,7 @@ node {
124125
env.LAST_RELEASE_TAG = readFile('last_release_tag').trim()
125126
env.TAG_RUN_WORKER = env.LAST_RELEASE_TAG
126127
env.TAG_RUN_PLATFORM = env.LAST_RELEASE_TAG
127-
}
128+
}
128129
}
129130

130131
stage('Shell Env'){

meta-data/model_settings.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,6 @@
2727
},
2828
"data_settings": {
2929
"group_fields": ["PortNumber", "AccNumber", "LocNumber"]
30-
}
30+
},
31+
"model_default_samples" :10
3132
}

oasislmf.json

+2
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,7 @@
88
"oed_accounts_csv": "tests/inputs/SourceAccOEDPiWind.csv",
99
"oed_info_csv": "tests/inputs/SourceReinsInfoOEDPiWind.csv",
1010
"oed_scope_csv": "tests/inputs/SourceReinsScopeOEDPiWind.csv",
11+
"modelpy": true,
12+
"gulpy": true,
1113
"ktools_alloc_rule_gul": 1
1214
}

oasislmf_ord.json

+2
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,7 @@
88
"oed_accounts_csv": "tests/inputs/SourceAccOEDPiWind.csv",
99
"oed_info_csv": "tests/inputs/SourceReinsInfoOEDPiWind.csv",
1010
"oed_scope_csv": "tests/inputs/SourceReinsScopeOEDPiWind.csv",
11+
"modelpy": true,
12+
"gulpy": true,
1113
"ktools_alloc_rule_gul": 1
1214
}
+85
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
{
2+
"analysis_tag": "ORD_outputs_tests",
3+
"source_tag": "MDK",
4+
"model_name_id": "PiWind",
5+
"model_supplier_id": "OasisLMF",
6+
"number_of_samples": 10,
7+
"gul_threshold": 0,
8+
"gul_output": true,
9+
"model_settings": {
10+
"event_set": "p",
11+
"event_occurrence_id": "lt"
12+
},
13+
"gul_summaries": [
14+
{
15+
"id": 1,
16+
"ord_output": {
17+
"plt_sample": true,
18+
"plt_quantile": true,
19+
"plt_moment": true,
20+
"elt_sample": true,
21+
"elt_quantile": true,
22+
"elt_moment": true,
23+
"alt_period": true,
24+
"ept_full_uncertainty_aep": true,
25+
"ept_full_uncertainty_oep": true,
26+
"ept_mean_sample_aep": true,
27+
"ept_mean_sample_oep": true,
28+
"ept_per_sample_mean_aep": true,
29+
"ept_per_sample_mean_oep": true,
30+
"psept_aep": true,
31+
"psept_oep": true,
32+
"return_period_file": true
33+
}
34+
}
35+
],
36+
37+
"il_output": true,
38+
"il_summaries": [
39+
{
40+
"id": 1,
41+
"ord_output": {
42+
"plt_sample": true,
43+
"plt_quantile": true,
44+
"plt_moment": true,
45+
"elt_sample": true,
46+
"elt_quantile": true,
47+
"elt_moment": true,
48+
"alt_period": true,
49+
"ept_full_uncertainty_aep": true,
50+
"ept_full_uncertainty_oep": true,
51+
"ept_mean_sample_aep": true,
52+
"ept_mean_sample_oep": true,
53+
"ept_per_sample_mean_aep": true,
54+
"ept_per_sample_mean_oep": true,
55+
"psept_aep": true,
56+
"psept_oep": true,
57+
"return_period_file": true
58+
}
59+
}
60+
],
61+
"ri_output": true,
62+
"ri_summaries": [
63+
{
64+
"id": 1,
65+
"ord_output": {
66+
"plt_sample": true,
67+
"plt_quantile": true,
68+
"plt_moment": true,
69+
"elt_sample": true,
70+
"elt_quantile": true,
71+
"elt_moment": true,
72+
"alt_period": true,
73+
"ept_full_uncertainty_aep": true,
74+
"ept_full_uncertainty_oep": true,
75+
"ept_mean_sample_aep": true,
76+
"ept_mean_sample_oep": true,
77+
"ept_per_sample_mean_aep": true,
78+
"ept_per_sample_mean_oep": true,
79+
"psept_aep": true,
80+
"psept_oep": true,
81+
"return_period_file": true
82+
}
83+
}
84+
]
85+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
{
2+
"analysis_tag": "ORD_outputs_tests",
3+
"source_tag": "MDK",
4+
"model_name_id": "PiWind",
5+
"model_supplier_id": "OasisLMF",
6+
"number_of_samples": 10,
7+
"gul_threshold": 0,
8+
"gul_output": true,
9+
"model_settings": {
10+
"event_set": "p",
11+
"event_occurrence_id": "lt"
12+
},
13+
"gul_summaries": [
14+
{
15+
"id": 1,
16+
"ord_output": {
17+
"plt_sample": true,
18+
"plt_quantile": true,
19+
"plt_moment": true,
20+
"elt_sample": true,
21+
"elt_quantile": true,
22+
"elt_moment": true,
23+
"alt_period": true,
24+
"ept_full_uncertainty_aep": true,
25+
"ept_full_uncertainty_oep": true,
26+
"ept_mean_sample_aep": true,
27+
"ept_mean_sample_oep": true,
28+
"ept_per_sample_mean_aep": true,
29+
"ept_per_sample_mean_oep": true,
30+
"psept_aep": true,
31+
"psept_oep": true,
32+
"parquet_format": true,
33+
"return_period_file": true
34+
}
35+
}
36+
],
37+
38+
"il_output": true,
39+
"il_summaries": [
40+
{
41+
"id": 1,
42+
"ord_output": {
43+
"plt_sample": true,
44+
"plt_quantile": true,
45+
"plt_moment": true,
46+
"elt_sample": true,
47+
"elt_quantile": true,
48+
"elt_moment": true,
49+
"alt_period": true,
50+
"ept_full_uncertainty_aep": true,
51+
"ept_full_uncertainty_oep": true,
52+
"ept_mean_sample_aep": true,
53+
"ept_mean_sample_oep": true,
54+
"ept_per_sample_mean_aep": true,
55+
"ept_per_sample_mean_oep": true,
56+
"psept_aep": true,
57+
"psept_oep": true,
58+
"parquet_format": true,
59+
"return_period_file": true
60+
}
61+
}
62+
],
63+
"ri_output": true,
64+
"ri_summaries": [
65+
{
66+
"id": 1,
67+
"ord_output": {
68+
"plt_sample": true,
69+
"plt_quantile": true,
70+
"plt_moment": true,
71+
"elt_sample": true,
72+
"elt_quantile": true,
73+
"elt_moment": true,
74+
"alt_period": true,
75+
"ept_full_uncertainty_aep": true,
76+
"ept_full_uncertainty_oep": true,
77+
"ept_mean_sample_aep": true,
78+
"ept_mean_sample_oep": true,
79+
"ept_per_sample_mean_aep": true,
80+
"ept_per_sample_mean_oep": true,
81+
"psept_aep": true,
82+
"psept_oep": true,
83+
"parquet_format": true,
84+
"return_period_file": true
85+
}
86+
}
87+
]
88+
}

tests/ci/expected/0_case/input/exposure_summary_levels.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515
"locperilscovered": "Location perils covered",
1616
"longitude": "Longitude in degrees (-180.0 to +180.0)",
1717
"occupancycode": "OED occupancy code",
18-
"oedversion": "Not an OED field",
18+
"oedversion": "The OED schema version of the file",
1919
"peril_id": "OED peril code",
2020
"portnumber": "Portfolio number",
21-
"postalcode": "Postcode: the highest resolution postcode most often used.",
21+
"postalcode": "Postcode: the highest resolution postcode most often used. (e.g. 5 digit zip for the US).",
2222
"streetaddress": "Street address including house number "
2323
}
2424
},
@@ -40,11 +40,11 @@
4040
"locperilscovered": "Location perils covered",
4141
"longitude": "Longitude in degrees (-180.0 to +180.0)",
4242
"occupancycode": "OED occupancy code",
43-
"oedversion": "Not an OED field",
43+
"oedversion": "The OED schema version of the file",
4444
"othertiv": "Not an OED field",
4545
"peril_id": "OED peril code",
4646
"portnumber": "Portfolio number",
47-
"postalcode": "Postcode: the highest resolution postcode most often used.",
47+
"postalcode": "Postcode: the highest resolution postcode most often used. (e.g. 5 digit zip for the US).",
4848
"streetaddress": "Street address including house number "
4949
}
5050
}

0 commit comments

Comments
 (0)