Skip to content

Commit

Permalink
Remove unnecessary checks for unimplemented driver
Browse files Browse the repository at this point in the history
We are going to implement all drivers that JobQueue, plus no user is
going to `--enable-scheduler` unless we tell them.
  • Loading branch information
pinkwah committed Feb 26, 2024
1 parent 43a5885 commit f5a9f48
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 22 deletions.
11 changes: 0 additions & 11 deletions src/ert/cli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down
12 changes: 1 addition & 11 deletions src/ert/gui/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit f5a9f48

Please sign in to comment.