From b8826118991eefd9ed5e4a544abe341986a6828d Mon Sep 17 00:00:00 2001
From: lb584 <lb584@cam.ac.uk>
Date: Fri, 30 Aug 2024 11:39:45 +0100
Subject: [PATCH] minor tidying removing redundant clause

---
 ews/coordinator/processor_base.py         | 45 +----------------------
 ews/coordinator/processor_epidemiology.py |  6 +--
 2 files changed, 4 insertions(+), 47 deletions(-)

diff --git a/ews/coordinator/processor_base.py b/ews/coordinator/processor_base.py
index 3f1862f..a7de1fd 100755
--- a/ews/coordinator/processor_base.py
+++ b/ews/coordinator/processor_base.py
@@ -141,50 +141,7 @@ class ProcessorBase:
         dictionary: dict = vars(args)
         return dictionary
 
-
-    # def build_sys_config(self, sys_config_path: str) -> dict:
-    #     '''This config obtains aspects of each dict in configs that must be common to
-    #     them all. '''
-    #
-    #     # initialise universal config
-    #     # sys_config = {
-    #     #     "ProjectRoot":      set(),
-    #     #     'WorkspacePathout': set(),
-    #     #     "MetoFTP":          set(),
-    #     #     "WorkspacePath":    set(),
-    #     #     "ResourcesPath":    set()
-    #     # }
-    #
-    #     sys_config = {}
-    #     # keys = sys_config.keys()
-    #
-    #     # get value of each key from each config file
-    #     try:
-    #         sys_config = open_and_check_config(sys_config_path)
-    #         # for key in keys:
-    #         #     if key in config_i.keys():
-    #         #         sys_config[key].add(config_i[key])
-    #     except:
-    #         logger.exception(f"Failure in opening or checking config {sys_config_path}")
-    #         end_script(premature = True)
-    #
-    #     # Check for and keep only one value per key
-    #     # for key in keys:
-    #     #     if len(sys_config[key]) > 1:
-    #     #         logger.error(f"Config files point to multiple {key} but this script can only handle one.")
-    #     #         end_script(premature = True)
-    #     #
-    #     #     sys_config[key] = sys_config[key].pop()
-    #
-    #     # config_tokens = {'ProjectRoot':      sys_config['ProjectRoot'],
-    #     #                  'WorkspacePathout': sys_config['WorkspacePathout'],
-    #     #                  'MetoFTP':          sys_config['MetoFTP'],
-    #     #                  'WorkspacePath':    sys_config['WorkspacePath'],
-    #     #                  'ResourcesPath':    sys_config['ResourcesPath']}
-    #
-    #     return sys_config
-
-    def prepare_job_directory(self, job_path):
+    def prepare_job_directory(self, job_path: str):
         """
         create job directory or archive if already exists (due to a rerun)
 
diff --git a/ews/coordinator/processor_epidemiology.py b/ews/coordinator/processor_epidemiology.py
index 55305f7..f3024b7 100644
--- a/ews/coordinator/processor_epidemiology.py
+++ b/ews/coordinator/processor_epidemiology.py
@@ -617,11 +617,11 @@ class ProcessorEpidemiology(ProcessorBase):
     def process_EWS_plotting_epi(self, job_path, config):
 
         """
-        We infer whether to attemp plotting based on the presence or absence of the EWS-Plotting ket in the config.
+        We infer whether to attempt plotting based on the presence or absence of the EWS-Plotting key in the config.
         """
-        if 'EWS-Plotting' in config and config['EWS-Plotting'] is not None:
+        if 'EWS-Plotting' in config:
 
-            logger.info('started process_EWS_plotting_epi()')
+            logger.info('started process_EWS_plotting_epi() as the EWS-Plotting key is present in the config')
 
             # initalise necessary variables from config
 
-- 
GitLab