From cee918d88d66271a8c240617a1e93090aa06a44f Mon Sep 17 00:00:00 2001 From: Austin Raney Date: Mon, 12 Aug 2024 17:31:31 -0400 Subject: [PATCH] style: code formatting --- .../src/ngen/cal/ngen_hooks/ngen_output.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/python/ngen_cal/src/ngen/cal/ngen_hooks/ngen_output.py b/python/ngen_cal/src/ngen/cal/ngen_hooks/ngen_output.py index 737860bf..609f4f44 100644 --- a/python/ngen_cal/src/ngen/cal/ngen_hooks/ngen_output.py +++ b/python/ngen_cal/src/ngen/cal/ngen_hooks/ngen_output.py @@ -98,20 +98,21 @@ class NgenSaveOutput: terminal_pattern = "tnx-*.csv" coastal_pattern = "cnx-*.csv" routing_output = "flowveldepth_Ngen.csv" + @hookimpl(trylast=True) def ngen_cal_model_iteration_finish(self, iteration: int, info: JobMeta) -> None: """ - After each iteration, copy the old outputs for possible future - evaluation and inspection. + After each iteration, copy the old outputs for possible future + evaluation and inspection. """ path = info.workdir - out_dir = path/f"output_{iteration}" + out_dir = path / f"output_{iteration}" Path.mkdir(out_dir) globs = [] - globs.append( path.glob(self.runoff_pattern) ) - globs.append( path.glob(self.lateral_pattern) ) - globs.append( path.glob(self.terminal_pattern) ) - globs.append( path.glob(self.coastal_pattern) ) + globs.append(path.glob(self.runoff_pattern)) + globs.append(path.glob(self.lateral_pattern)) + globs.append(path.glob(self.terminal_pattern)) + globs.append(path.glob(self.coastal_pattern)) for g in globs: for f in g: f.rename(out_dir / f.name)