-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature/260 json_file_handlers (#273)
Add JSON endpoints for settings * Create JOSN to File handlers * Add openapi setting schemas * Working - json to file * Add JSON `settings` endpoints to models and analyses + validation * Fix filewrite issue * Adjust unittest + add dependencies * generic model settings * Fix external schema ref's in swagger * Fix missing link re-names * Add unittests for new endpoints, show all validation errors * Keep default model_settings file for the moment * Rename ModelResource -> ModelSettings
- Loading branch information
Showing
25 changed files
with
1,118 additions
and
208 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,69 +1,13 @@ | ||
{ | ||
"model_settings":[ | ||
{"event_set":{ | ||
"name": "Event Set", | ||
"desc": "Either Probablistic or Historic", | ||
"type":"dictionary", | ||
"default": "P", | ||
|
||
"values":{ | ||
"P": "Proabilistic", | ||
"H": "Historic" | ||
} | ||
} | ||
}, | ||
{ | ||
"event_occurrence_id":{ | ||
"name": "Occurrence Set", | ||
"desc": "Tooltip for Occurrence selection", | ||
"type":"dictionary", | ||
"default": "1", | ||
"values":{ | ||
"1":"Long Term", | ||
"2":"Near Term WSST", | ||
"3":"Historic" | ||
} | ||
} | ||
|
||
}, | ||
{ | ||
"peril_wind":{ | ||
"name": "Wind Peril", | ||
"desc": "Run model with Wind Peril", | ||
"type":"boolean", | ||
"default": true | ||
|
||
} | ||
}, | ||
{ | ||
"peril_surge":{ | ||
"name": "Surge Peril", | ||
"desc": "Run model with Surge Peril", | ||
"type":"boolean", | ||
"default": false | ||
|
||
} | ||
}, | ||
{ | ||
"leakage_factor": { | ||
"name": "Leakage Factor", | ||
"desc": "Tooltip for Leakage option", | ||
"type": "float", | ||
"default": 0.5, | ||
"min": 0.0, | ||
"max":1.0 | ||
} | ||
} | ||
{} | ||
], | ||
"lookup_settings":[ | ||
{ | ||
"PerilCodes":{ | ||
"type":"dictionary", | ||
"values":{ | ||
"WW1": "Windstorm with storm surge", | ||
"WW2": "Windstorm w/o storm surge" | ||
"PerilCodes":{ | ||
"type":"dictionary", | ||
"values":{"AA1": "All perils"} | ||
} | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ oasislmf | |
celery | ||
pymysql | ||
jsonpickle | ||
jsonschema | ||
requests | ||
pyopenssl | ||
fasteners | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.