Skip to content

Commit 017b7ad

Browse files
committed
Merge remote-tracking branch 'origin/master' into level1gui
2 parents 4bb33bf + a281cfb commit 017b7ad

File tree

4 files changed

+5
-6
lines changed

4 files changed

+5
-6
lines changed

openquake/calculators/export/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
'mag_dst_eps_sig': "Deterministic Earthquake Scenarios",
2828
'job': 'job.zip',
2929
'asset_risk': 'Exposure + Risk',
30-
'assetcol': 'Exposure',
30+
'exposure': 'Exposure',
3131
'gmf_data': 'Ground Motion Fields',
3232
'damages-rlzs': 'Asset Risk Distributions',
3333
'damages-stats': 'Asset Risk Statistics',

openquake/calculators/export/risk.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -753,7 +753,6 @@ def export_vulnerability_xml(dstore):
753753
return dic
754754

755755

756-
@export.add(('assetcol', 'csv'))
757756
def export_assetcol_csv(ekey, dstore):
758757
assetcol = dstore['assetcol']
759758
writer = writers.CsvWriter(fmt=writers.FIVEDIGITS)
@@ -778,7 +777,7 @@ def export_exposure(ekey, dstore):
778777
"""
779778
:param dstore: datastore object
780779
"""
781-
[assetcol_csv] = export(('assetcol', 'csv'), dstore)
780+
[assetcol_csv] = export_assetcol_csv(('assetcol', 'csv'), dstore)
782781
tagnames = dstore['assetcol/tagcol'].tagnames
783782
cost_types = dstore.getitem('exposure') # cost_type, area_type, unit
784783
N = node.Node

openquake/calculators/tests/scenario_risk_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ def test_case_9(self):
232232
self.run_calc(case_9.__file__, 'job.ini')
233233
[fname] = export(('aggrisk', 'csv'), self.calc.datastore)
234234
self.assertEqualFiles('expected/aggrisk.csv', fname)
235-
[fname] = export(('assetcol', 'csv'), self.calc.datastore)
235+
[_, fname] = export(('exposure', 'zip'), self.calc.datastore)
236236
self.assertEqualFiles('expected/assetcol.csv', fname)
237237

238238
def test_case_10(self):
@@ -248,7 +248,7 @@ def test_case_11(self):
248248
[fname] = out[('avg_losses-rlzs', 'csv')]
249249
self.assertEqualFiles(
250250
'expected/avg_losses-rlz-000_443.csv', fname)
251-
[fname] = export(('assetcol', 'csv'), self.calc.datastore)
251+
[_, fname] = export(('exposure', 'zip'), self.calc.datastore)
252252
self.assertEqualFiles('expected/assetcol.csv', fname)
253253

254254
def test_case_12(self):

openquake/server/static/js/engine.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -659,6 +659,7 @@ function capitalizeFirstLetter(val) {
659659
);
660660
} else if (asce_version === 'ASCE7-22') {
661661
const items = [
662+
{value: 260, text: 'Unknown (default: class D)' },
662663
{value: 1500, text: 'A: Vs30 >= 1500 m/s'},
663664
{value: 1080, text: 'B: 914 m/s <= Vs30 < 1500 m/s' },
664665
{value: 760, text: 'BC: 640 m/s <= Vs30 < 914 m/s' },
@@ -667,7 +668,6 @@ function capitalizeFirstLetter(val) {
667668
{value: 260, text: 'D: 213 m/s <= Vs30 >= 305 m/s' },
668669
{value: 185, text: 'DE: 152 m/s <= Vs30 >= 213 m/s' },
669670
{value: 150, text: 'E: vs30 m/s < 152 m/s' },
670-
{value: 260, text: 'Unknown (default: class D)' },
671671
{value: 'custom', text: 'Custom'},
672672
];
673673
items.forEach(item => {

0 commit comments

Comments
 (0)