From 5c534c3a5f84de94fdf5209f4dbaf164f2363b02 Mon Sep 17 00:00:00 2001 From: lb584 <lb584@cam.ac.uk> Date: Mon, 3 Oct 2022 13:59:24 +0100 Subject: [PATCH] repackaging (phase 1) --- .../BufferingSMTPHandler.py | 0 .../ENVDataPostProcessor.py | 0 EnvSuitPipeline.py => coordinator/EnvSuitPipeline.py | 0 .../GatherScrapedMediaReports.py | 0 NAMEPreProcessor.py => coordinator/NAMEPreProcessor.py | 0 Processor.py => coordinator/Processor.py | 8 ++++---- ProcessorAdvisory.py => coordinator/ProcessorAdvisory.py | 0 .../ProcessorComponents.py | 0 .../ProcessorDeposition.py | 0 .../ProcessorEnvironment.py | 0 .../ProcessorEpidemiology.py | 0 ProcessorServer.py => coordinator/ProcessorServer.py | 0 ProcessorSurveys.py => coordinator/ProcessorSurveys.py | 0 ProcessorUtils.py => coordinator/ProcessorUtils.py | 0 coordinator/__init__.py | 0 {logs => coordinator/logs}/.gitignore | 2 +- run_Processor.sh | 2 +- tests/integration/__init__.py | 0 tests/unit/__init__.py | 0 19 files changed, 6 insertions(+), 6 deletions(-) rename BufferingSMTPHandler.py => coordinator/BufferingSMTPHandler.py (100%) rename ENVDataPostProcessor.py => coordinator/ENVDataPostProcessor.py (100%) rename EnvSuitPipeline.py => coordinator/EnvSuitPipeline.py (100%) rename GatherScrapedMediaReports.py => coordinator/GatherScrapedMediaReports.py (100%) rename NAMEPreProcessor.py => coordinator/NAMEPreProcessor.py (100%) rename Processor.py => coordinator/Processor.py (98%) rename ProcessorAdvisory.py => coordinator/ProcessorAdvisory.py (100%) rename ProcessorComponents.py => coordinator/ProcessorComponents.py (100%) rename ProcessorDeposition.py => coordinator/ProcessorDeposition.py (100%) rename ProcessorEnvironment.py => coordinator/ProcessorEnvironment.py (100%) rename ProcessorEpidemiology.py => coordinator/ProcessorEpidemiology.py (100%) rename ProcessorServer.py => coordinator/ProcessorServer.py (100%) rename ProcessorSurveys.py => coordinator/ProcessorSurveys.py (100%) rename ProcessorUtils.py => coordinator/ProcessorUtils.py (100%) create mode 100644 coordinator/__init__.py rename {logs => coordinator/logs}/.gitignore (86%) create mode 100644 tests/integration/__init__.py create mode 100644 tests/unit/__init__.py diff --git a/BufferingSMTPHandler.py b/coordinator/BufferingSMTPHandler.py similarity index 100% rename from BufferingSMTPHandler.py rename to coordinator/BufferingSMTPHandler.py diff --git a/ENVDataPostProcessor.py b/coordinator/ENVDataPostProcessor.py similarity index 100% rename from ENVDataPostProcessor.py rename to coordinator/ENVDataPostProcessor.py diff --git a/EnvSuitPipeline.py b/coordinator/EnvSuitPipeline.py similarity index 100% rename from EnvSuitPipeline.py rename to coordinator/EnvSuitPipeline.py diff --git a/GatherScrapedMediaReports.py b/coordinator/GatherScrapedMediaReports.py similarity index 100% rename from GatherScrapedMediaReports.py rename to coordinator/GatherScrapedMediaReports.py diff --git a/NAMEPreProcessor.py b/coordinator/NAMEPreProcessor.py similarity index 100% rename from NAMEPreProcessor.py rename to coordinator/NAMEPreProcessor.py diff --git a/Processor.py b/coordinator/Processor.py similarity index 98% rename from Processor.py rename to coordinator/Processor.py index 99268c1..e1845a6 100755 --- a/Processor.py +++ b/coordinator/Processor.py @@ -289,7 +289,7 @@ def parse_and_check_args(todayString): if not args.live: # remove the log handler that would send emails - logger.handlers = [h for h in logger.handlers if not isinstance(h,BufferingSMTPHandler.BufferingSMTPHandler)] + logger.handlers = [h for h in logger.handlers if not isinstance(h, BufferingSMTPHandler.BufferingSMTPHandler)] if not isinstance(args.config_paths,list): logger.error('Expecting a list of config paths') @@ -391,11 +391,11 @@ def run_Process(): workspacePath = universal_config['WorkspacePathout'] - process_pre_job = getattr(ProcessorComponents,universal_config['ProcessPreJob']) + process_pre_job = getattr(ProcessorComponents, universal_config['ProcessPreJob']) - process_in_job = getattr(ProcessorComponents,universal_config['ProcessInJob']) + process_in_job = getattr(ProcessorComponents, universal_config['ProcessInJob']) - process_EWS_plotting = getattr(ProcessorComponents,universal_config['ProcessEWSPlotting']) + process_EWS_plotting = getattr(ProcessorComponents, universal_config['ProcessEWSPlotting']) # determine job directory jobPath = f'{workspacePath}{short_name[args.component]}_{args.start_date}' diff --git a/ProcessorAdvisory.py b/coordinator/ProcessorAdvisory.py similarity index 100% rename from ProcessorAdvisory.py rename to coordinator/ProcessorAdvisory.py diff --git a/ProcessorComponents.py b/coordinator/ProcessorComponents.py similarity index 100% rename from ProcessorComponents.py rename to coordinator/ProcessorComponents.py diff --git a/ProcessorDeposition.py b/coordinator/ProcessorDeposition.py similarity index 100% rename from ProcessorDeposition.py rename to coordinator/ProcessorDeposition.py diff --git a/ProcessorEnvironment.py b/coordinator/ProcessorEnvironment.py similarity index 100% rename from ProcessorEnvironment.py rename to coordinator/ProcessorEnvironment.py diff --git a/ProcessorEpidemiology.py b/coordinator/ProcessorEpidemiology.py similarity index 100% rename from ProcessorEpidemiology.py rename to coordinator/ProcessorEpidemiology.py diff --git a/ProcessorServer.py b/coordinator/ProcessorServer.py similarity index 100% rename from ProcessorServer.py rename to coordinator/ProcessorServer.py diff --git a/ProcessorSurveys.py b/coordinator/ProcessorSurveys.py similarity index 100% rename from ProcessorSurveys.py rename to coordinator/ProcessorSurveys.py diff --git a/ProcessorUtils.py b/coordinator/ProcessorUtils.py similarity index 100% rename from ProcessorUtils.py rename to coordinator/ProcessorUtils.py diff --git a/coordinator/__init__.py b/coordinator/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/logs/.gitignore b/coordinator/logs/.gitignore similarity index 86% rename from logs/.gitignore rename to coordinator/logs/.gitignore index 5e7d273..28db78b 100644 --- a/logs/.gitignore +++ b/coordinator/logs/.gitignore @@ -1,4 +1,4 @@ # Ignore everything in this directory -* +.gitignore # Except this file !.gitignore diff --git a/run_Processor.sh b/run_Processor.sh index 9cf6064..63483bd 100755 --- a/run_Processor.sh +++ b/run_Processor.sh @@ -31,7 +31,7 @@ source /storage/app/miniconda3/bin/activate ${conda_env} proc_path="$( dirname "$(readlink -f "$0" )" )" # run the processor with all arguments -python ${proc_path}/Processor.py "$@" +python ${proc_path}/coordinator/Processor.py "$@" # deactivate conda environment source /storage/app/miniconda3/bin/deactivate ${conda_env} diff --git a/tests/integration/__init__.py b/tests/integration/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/unit/__init__.py b/tests/unit/__init__.py new file mode 100644 index 0000000..e69de29 -- GitLab