From 987428ebcf90388ce84aabbd04d8bd90fe1a7376 Mon Sep 17 00:00:00 2001
From: lb584 <lb584@cam.ac.uk>
Date: Mon, 29 Jul 2024 14:00:06 +0100
Subject: [PATCH] adding regional forecast images to the advisory

---
 ews/coordinator/processor_base.py | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/ews/coordinator/processor_base.py b/ews/coordinator/processor_base.py
index d44079c..fe883ab 100755
--- a/ews/coordinator/processor_base.py
+++ b/ews/coordinator/processor_base.py
@@ -46,8 +46,8 @@ class ProcessorBase:
     def __init__(self) -> None:
         super().__init__()
         time_now = datetime.datetime.today()
-        self.todayString = time_now.strftime('%Y%m%d')
-        self.nowString = time_now.strftime('%Y%m%d-%H%M-%S')
+        self.today_string = time_now.strftime('%Y%m%d')
+        self.now_string = time_now.strftime('%Y%m%d-%H%M-%S')
 
     def parse_and_check_args(self) -> dict:
 
@@ -99,7 +99,7 @@ class ProcessorBase:
                 '-d', '--run-date',
                 metavar = 'YYYYMMDD',
                 action = 'store',
-                default = self.todayString,
+                default = self.today_string,
                 help = 'Initial day of calculation, starting at 00 UTC (Default is today)',
                 dest = 'start_date',
         )
@@ -129,11 +129,11 @@ class ProcessorBase:
             raise RuntimeError
 
         # check the startstring
-        if args.start_date is not self.todayString:
+        if args.start_date is not self.today_string:
             try:
                 # check date string is formatted correctly
                 provided_start_date = datetime.datetime.strptime(args.start_date, '%Y%m%d')
-                today_date = datetime.datetime.strptime(self.todayString, '%Y%m%d')
+                today_date = datetime.datetime.strptime(self.today_string, '%Y%m%d')
 
                 # early limit is quite arbitrary, but this is earliest year of available survey data for Ethiopia
                 date_limit_early = datetime.datetime.strptime('20070101', '%Y%m%d')
@@ -198,7 +198,7 @@ class ProcessorBase:
         :return:
         """
         if os.path.exists(job_path):
-            archived_dir_path = f"{job_path}-ARCHIVE_{self.nowString}"
+            archived_dir_path = f"{job_path}-ARCHIVE_{self.now_string}"
             message = f"Job path {job_path} already exists, so moving it to {archived_dir_path}"
             print(message)
             os.rename(job_path, archived_dir_path)
-- 
GitLab