Skip to content

Commit

Permalink
Apply patches after loading config file.
Browse files Browse the repository at this point in the history
  • Loading branch information
dalonsoa committed Sep 5, 2024
1 parent cf5a5ae commit 165d42a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions wsimod/orchestration/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ def load(self, address, config_name="config.yml", overrides={}):
config_name:
overrides:
"""
from ..extensions import apply_patches

with open(os.path.join(address, config_name), "r") as file:
data = yaml.safe_load(file)

Expand Down Expand Up @@ -191,6 +193,8 @@ def load(self, address, config_name="config.yml", overrides={}):
if "dates" in data.keys():
self.dates = [to_datetime(x) for x in data["dates"]]

apply_patches(self)

def save(self, address, config_name="config.yml", compress=False):
"""Save the model object to a yaml file and input data to csv.gz format in the
directory specified.
Expand Down

0 comments on commit 165d42a

Please sign in to comment.