From f5a9f480b01c0a284b7d1ade4c641c4253121e5d Mon Sep 17 00:00:00 2001 From: Zohar Malamant Date: Mon, 19 Feb 2024 15:15:34 +0100 Subject: [PATCH] Remove unnecessary checks for unimplemented driver We are going to implement all drivers that JobQueue, plus no user is going to `--enable-scheduler` unless we tell them. --- src/ert/cli/main.py | 11 ----------- src/ert/gui/main.py | 12 +----------- 2 files changed, 1 insertion(+), 22 deletions(-) diff --git a/src/ert/cli/main.py b/src/ert/cli/main.py index e7c523a2b5e..a43724a88dc 100644 --- a/src/ert/cli/main.py +++ b/src/ert/cli/main.py @@ -21,7 +21,6 @@ from ert.enkf_main import EnKFMain from ert.ensemble_evaluator import EvaluatorServerConfig, EvaluatorTracker from ert.namespace import Namespace -from ert.shared.feature_toggling import FeatureToggling from ert.storage import open_storage from ert.storage.local_storage import local_storage_set_ert_config @@ -41,16 +40,6 @@ def run_cli(args: Namespace, _: Any = None) -> None: # the config file to be the base name of the original config args.config = os.path.basename(args.config) ert_config = ErtConfig.from_file(args.config) - if FeatureToggling.is_enabled( - "scheduler" - ) and ert_config.queue_config.queue_system not in [ - QueueSystem.LOCAL, - QueueSystem.TORQUE, - QueueSystem.LSF, - ]: - raise ErtCliError( - "Scheduler only supports LOCAL, TORQUE and LSF queues at the moment!" - ) local_storage_set_ert_config(ert_config) # Create logger inside function to make sure all handlers have been added to diff --git a/src/ert/gui/main.py b/src/ert/gui/main.py index c614309e074..7d2c34c99b9 100755 --- a/src/ert/gui/main.py +++ b/src/ert/gui/main.py @@ -15,7 +15,7 @@ from qtpy.QtCore import QDir, QLocale, Qt from qtpy.QtWidgets import QApplication -from ert.config import ConfigValidationError, ConfigWarning, ErtConfig, QueueSystem +from ert.config import ConfigValidationError, ConfigWarning, ErtConfig from ert.enkf_main import EnKFMain from ert.gui.ertwidgets import SummaryPanel from ert.gui.main_window import ErtMainWindow @@ -35,7 +35,6 @@ from ert.libres_facade import LibresFacade from ert.namespace import Namespace from ert.services import StorageService -from ert.shared.feature_toggling import FeatureToggling from ert.shared.plugins.plugin_manager import ErtPluginManager from ert.storage import open_storage from ert.storage.local_storage import local_storage_set_ert_config @@ -103,15 +102,6 @@ def _start_initial_gui_window( # the config file to be the base name of the original config args.config = os.path.basename(args.config) ert_config = ErtConfig.from_file(args.config) - if FeatureToggling.is_enabled( - "scheduler" - ) and ert_config.queue_config.queue_system not in [ - QueueSystem.LOCAL, - QueueSystem.TORQUE, - ]: - raise ConfigValidationError( - "Scheduler only supports LOCAL and TORQUE queue at the moment!" - ) local_storage_set_ert_config(ert_config) ert = EnKFMain(ert_config) except ConfigValidationError as error: