From 4508c2b28c3da44dadc16abbf01d8e62194aed32 Mon Sep 17 00:00:00 2001 From: Nick Harder <56074305+nick-harder@users.noreply.github.com> Date: Wed, 20 Sep 2023 12:43:06 +0200 Subject: [PATCH] fixes cvs_path creating an empty folder when not defined (#193) --- assume/common/outputs.py | 2 +- examples/examples.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/assume/common/outputs.py b/assume/common/outputs.py index ef54e234..a50a9efc 100644 --- a/assume/common/outputs.py +++ b/assume/common/outputs.py @@ -48,7 +48,7 @@ def __init__( # store needed date self.simulation_id = simulation_id - self.save_frequency_hours = save_frequency_hours + self.save_frequency_hours = save_frequency_hours or (end - start).days * 24 # make directory if not already present self.export_csv_path = export_csv_path diff --git a/examples/examples.py b/examples/examples.py index bff70d6f..1c688cc3 100644 --- a/examples/examples.py +++ b/examples/examples.py @@ -6,8 +6,7 @@ log = logging.getLogger(__name__) -csv_path = "./examples/outputs" -os.makedirs(csv_path, exist_ok=True) +csv_path = "" os.makedirs("./examples/local_db", exist_ok=True)