diff --git a/src/fmu/dataio/hook_implementations/jobs.py b/src/fmu/dataio/hook_implementations/jobs.py index 19098eab6..f4c3d22a6 100644 --- a/src/fmu/dataio/hook_implementations/jobs.py +++ b/src/fmu/dataio/hook_implementations/jobs.py @@ -1,14 +1,10 @@ from __future__ import annotations -try: - from ert.shared.plugins.plugin_manager import hook_implementation - from ert.shared.plugins.plugin_response import plugin_response -except ModuleNotFoundError: - from ert_shared.plugins.plugin_manager import hook_implementation - from ert_shared.plugins.plugin_response import plugin_response +from ert.plugins.plugin_manager import hook_implementation +from ert import plugin @hook_implementation -@plugin_response(plugin_name="fmu_dataio") +@plugin(name="fmu_dataio") def installable_workflow_jobs() -> dict: return {} diff --git a/src/fmu/dataio/scripts/copy_preprocessed.py b/src/fmu/dataio/scripts/copy_preprocessed.py index 14888249e..66264702a 100644 --- a/src/fmu/dataio/scripts/copy_preprocessed.py +++ b/src/fmu/dataio/scripts/copy_preprocessed.py @@ -16,10 +16,7 @@ from fmu.dataio import ExportPreprocessedData -try: - from ert.shared.plugins.plugin_manager import hook_implementation -except ModuleNotFoundError: - from ert_shared.plugins.plugin_manager import hook_implementation +from ert.plugins.plugin_manager import hook_implementation try: from ert.config import ErtScript @@ -27,7 +24,7 @@ from res.job_queue import ErtScript if TYPE_CHECKING: - from ert.shared.plugins.workflow_config import WorkflowConfigs + from ert.plugins.workflow_config import WorkflowConfigs logger: Final = logging.getLogger(__name__) diff --git a/src/fmu/dataio/scripts/create_case_metadata.py b/src/fmu/dataio/scripts/create_case_metadata.py index 1f2244c2c..d08bf1993 100644 --- a/src/fmu/dataio/scripts/create_case_metadata.py +++ b/src/fmu/dataio/scripts/create_case_metadata.py @@ -19,10 +19,7 @@ from fmu.dataio import CreateCaseMetadata -try: - from ert.shared.plugins.plugin_manager import hook_implementation -except ModuleNotFoundError: - from ert_shared.plugins.plugin_manager import hook_implementation +from ert.plugins.plugin_manager import hook_implementation try: from ert.config import ErtScript @@ -30,7 +27,7 @@ from res.job_queue import ErtScript if TYPE_CHECKING: - from ert.shared.plugins.workflow_config import WorkflowConfigs + from ert.plugins.workflow_config import WorkflowConfigs logger: Final = logging.getLogger(__name__) logger.setLevel(logging.CRITICAL) diff --git a/tests/test_integration/test_hook_implementations.py b/tests/test_integration/test_hook_implementations.py index 1c5283c5e..26bba8830 100644 --- a/tests/test_integration/test_hook_implementations.py +++ b/tests/test_integration/test_hook_implementations.py @@ -1,6 +1,6 @@ import os -from ert.shared.plugins.plugin_manager import ErtPluginManager +from ert.plugins.plugin_manager import ErtPluginManager import fmu.dataio.hook_implementations.jobs from fmu.dataio.scripts import copy_preprocessed, create_case_metadata