oq-engine-server: Implement `calc info` views

Bug #1201777 reported by Lars Butler
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenQuake Engine
Fix Released
High
Lars Butler

Bug Description

When a client hits /calc/hazard|risk/:calc_id, return info about the calculation, including:

- id
- status
- description
- all calculation parameters

Hazard example:
{"status": "complete", "reference_depth_to_1pt0km_per_sec": 100.0, "mean_hazard_curves": true, "id": 1, "reference_vs30_type": "measured", "maximum_distance": 200.0, "sites": {"type": "MultiPoint", "coordinates": [[0.5, -0.5]]}, "width_of_mfd_bin": 0.1, "intensity_measure_types_and_levels": {"PGA": [0.005, 0.007, 0.0098, 0.0137, 0.0192, 0.0269, 0.0376, 0.0527, 0.0738, 0.103, 0.145, 0.203, 0.284, 0.397, 0.556, 0.778, 1.09, 1.52, 2.13]}, "area_source_discretization": 5.0, "investigation_time": 50.0, "poes": [0.1], "uniform_hazard_spectra": true, "random_seed": 23, "description": "Classical PSHA with non-trivial logic tree (2 source models and 2 GMPEs per tectonic region type)", "number_of_logic_tree_samples": 0, "truncation_level": 3.0, "quantile_hazard_curves": [0.05, 0.5, 0.95], "reference_depth_to_2pt5km_per_sec": 5.0, "reference_vs30_value": 600.0, "calculation_mode": "classical", "no_progress_timeout": 3600, "hazard_maps": true, "rupture_mesh_spacing": 2.0}

Risk example:
{"status": "executing", "hazard_output": 185, "quantile_loss_curves": [0.3, 0.5], "maximum_distance": 5.0, "description": "Classical PSHA Risk Demo", "insured_losses": false, "lrem_steps_per_interval": 5, "loss_curve_resolution": 50, "calculation_mode": "classical", "no_progress_timeout": 3600, "conditional_loss_poes": [0.1, 0.2, 0.3], "region_constraint": {"type": "Polygon", "coordinates": [[[-1.5, 1.5], [0.5, 1.5], [0.5, 0.5], [-1.5, 0.5], [-1.5, 1.5]]]}, "asset_correlation": 0.0, "id": 1}

Changed in oq-engine:
assignee: nobody → Lars Butler (lars-butler)
importance: Undecided → High
status: New → In Progress
description: updated
Revision history for this message
Lars Butler (lars-butler) wrote :
Changed in oq-engine:
status: In Progress → Fix Committed
Revision history for this message
Lars Butler (lars-butler) wrote :

We should probably also update this to include the lib/software version, per the changes here: https://github.com/gem/oq-engine/pull/1232

Changed in oq-engine:
status: Fix Committed → Fix Released
milestone: none → 1.2.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related blueprints

Remote bug watches

Bug watches keep track of this bug in other bug trackers.