diff --git a/coordinator/Processor.py b/coordinator/Processor.py index 407dc7ccb5064fe0f540d55b85d2cdb275b20d24..644c3538d2d239b5f8a137f34379f9cc43df671d 100755 --- a/coordinator/Processor.py +++ b/coordinator/Processor.py @@ -33,7 +33,6 @@ import shutil import sys # gitlab projects -# TODO: Package these projects so they are robust for importing from flagdir import jobStatus # created by jws52 # submodules of this project @@ -43,7 +42,8 @@ from ProcessorUtils import ( endScript, endJob, open_and_check_config, - PasswordODKFilter + PasswordODKFilter, + short_name ) # initialise default values for configuration @@ -60,8 +60,6 @@ script_path = os.path.dirname(__file__)+'/' coordinator_path = script_path -short_name = ProcessorComponents.short_name - # log file for all jobs log_path_project = f"{coordinator_path}logs/log.txt" @@ -233,7 +231,7 @@ def parse_and_check_args(todayString) -> dict: my_parser.add_argument( '-p', '--component', type = str, - choices = list(ProcessorComponents.short_name.keys()), + choices = list(short_name.keys()), required = True, dest = 'component', help = '''Name of EWS component to process, which must be present diff --git a/coordinator/ProcessorComponents.py b/coordinator/ProcessorComponents.py index b0a6100bcc17099aed5f64f0fc3ad1df8bdba1b6..7c9d85a0757c68b7f66a0b1f4cd3e32b8d664ab9 100644 --- a/coordinator/ProcessorComponents.py +++ b/coordinator/ProcessorComponents.py @@ -10,7 +10,11 @@ from typing import List # submodules of this project # All of the process_* functions are callable from config files for the three # coordinator stages: pre, in (during) and plotting. -from ProcessorAdvisory import process_in_job_advisory + +from ProcessorAdvisory import ( + process_in_job_advisory +) + from ProcessorDeposition import ( process_in_job_dep, process_EWS_plotting_dep @@ -38,16 +42,7 @@ from ProcessorSurveys import ( process_EWS_plotting_survey ) from ProcessorUtils import ( - open_and_check_config, - get_only_existing_globs, - subprocess_and_log, - endScript, - endJob, - add_filters_to_sublogger, - remove_path_from_tar_members, - query_past_successes, - short_name, - disease_latin_name_dict + add_filters_to_sublogger ) # TODO: Replace subprocess scp and ssh commands with paramiko.SSHClient() instance diff --git a/tests/integration/integration_test_utils.py b/tests/integration/integration_test_utils.py index bf5e5e86f16eb4b0321968f3a4d0036fb9214f2d..1ecd042d0b9f460ed00531d146edfeb3bce6683a 100644 --- a/tests/integration/integration_test_utils.py +++ b/tests/integration/integration_test_utils.py @@ -92,6 +92,7 @@ class IntegrationTestUtils: args_dict['component'] = component args_dict['config_paths'] = [IntegrationTestUtils.TEMP_CONFIG_FILE_PATH] args_dict['log_level'] = 'info' + args_dict['clearup'] = False for key, value in kwargs.items(): args_dict[key] = value