Skip to content

Commit fb86e36

Browse files
committed
fix output
1 parent 7c284f8 commit fb86e36

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

openquake/hme/model_test_frameworks/gem/unit_tests/test_gem_tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,7 @@ def test_evaluate_gmc_runs(self):
626626
self.assertGreater(
627627
len(png_files), 0, f"No plot files in {trt_dir}"
628628
)
629-
629+
630630
def tearDown(self):
631631
output_dir = os.path.join(TEST_DATA_DIR, "_test_gm_residual_plots")
632632
if os.path.isdir(output_dir):

openquake/hme/utils/gmm_utils.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,9 @@ def generate_residual_plots(residuals, imts, output_dir):
268268
os.makedirs(output_dir, exist_ok=True)
269269

270270
for gmpe in residuals.gmpe_list:
271-
gmpe_str = re.sub(r'[^\w\-.]', '_', str(gmpe))
271+
# Straight from GSIM XML so they are full toml representations
272+
gmpe_str = re.sub(
273+
r'[^\w\-.]', '_', str(gmpe)).split("___toml")[0]
272274
gmpe_dir = os.path.join(output_dir, gmpe_str)
273275
os.makedirs(gmpe_dir, exist_ok=True)
274276
for imtx in imts:

0 commit comments

Comments
 (0)