From 658b66ea9af85064180259aa8bbce9ceb86000e0 Mon Sep 17 00:00:00 2001 From: xjules Date: Wed, 1 Nov 2023 14:21:17 +0100 Subject: [PATCH] Update the error message in Queue config validator --- src/ert/config/queue_config.py | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/src/ert/config/queue_config.py b/src/ert/config/queue_config.py index cb5b7082fc9..6f26be0decb 100644 --- a/src/ert/config/queue_config.py +++ b/src/ert/config/queue_config.py @@ -149,7 +149,6 @@ def generate_dict(option_list: List[Tuple[str, str]]) -> Dict[str, List[str]]: "QDEL_CMD", "QSTAT_OPTIONS", "QUEUE", - "DEBUG_OUTPUT", "CLUSTER_LABEL", "JOB_PREFIX", ], @@ -187,7 +186,7 @@ def generate_dict(option_list: List[Tuple[str, str]]) -> Dict[str, List[str]]: } queue_bool_options: Mapping[str, List[str]] = { - "LSF": ["DEBUG_OUTPUT"], + "LSF": [], "SLURM": [], "TORQUE": ["KEEP_QSUB_OUTPUT"], "LOCAL": [], @@ -208,32 +207,28 @@ def _validate_queue_driver_settings( ): raise ConfigValidationError.with_context( f"'{option_value}' for {option_name} is not a valid format " - f"for {queue_type} QUEUE. It must be of " - "the format 'mb' or 'gb'.", + "It should be of the format 'mb' or 'gb'.", option_value, ) if option_name in queue_string_options[queue_type] and not isinstance( option_value, str ): raise ConfigValidationError.with_context( - f"'{option_value}' for {option_name} is not a valid string type " - f"for the {queue_type} QUEUE.", + f"'{option_value}' for {option_name} is not a valid string type.", option_value, ) if option_name in queue_positive_number_options[queue_type] and ( re.match(r"^\d+(\.\d+)?$", option_value) is None ): raise ConfigValidationError.with_context( - f"'{option_value}' for {option_name} is not a valid integer or float" - f" for the {queue_type} QUEUE.", + f"'{option_value}' for {option_name} is not a valid integer or float.", option_value, ) if option_name in queue_positive_int_options[queue_type] and ( re.match(r"^\d+$", option_value) is None ): raise ConfigValidationError.with_context( - f"'{option_value}' for {option_name} is not a valid positive integer" - f" for the {queue_type} QUEUE.", + f"'{option_value}' for {option_name} is not a valid positive integer.", option_value, ) if option_name in queue_bool_options[queue_type] and not option_value in [ @@ -245,7 +240,6 @@ def _validate_queue_driver_settings( "F", ]: raise ConfigValidationError.with_context( - f"The '{option_value}' for {option_name} must be one of TRUE, FALSE, T, F, 1, 0 " - f" for the {queue_type}.", + f"The '{option_value}' for {option_name} should be either TRUE or FALSE.", option_value, )