diff --git a/src/ert/analysis/_es_update.py b/src/ert/analysis/_es_update.py index 3904f53756b..88da76a1f2e 100644 --- a/src/ert/analysis/_es_update.py +++ b/src/ert/analysis/_es_update.py @@ -27,7 +27,7 @@ ) from ert.config import Field, GenKwConfig, SurfaceConfig -from ert.realization_state import RealizationStorageState +from ert.realization_storage_state import RealizationStorageState from ..config.analysis_module import ESSettings, IESSettings from . import misfit_preprocessor diff --git a/src/ert/callbacks.py b/src/ert/callbacks.py index 2af59d32e30..971d0213243 100644 --- a/src/ert/callbacks.py +++ b/src/ert/callbacks.py @@ -9,7 +9,7 @@ from ert.run_arg import RunArg from .load_status import LoadResult, LoadStatus -from .realization_state import RealizationStorageState +from .realization_storage_state import RealizationStorageState logger = logging.getLogger(__name__) diff --git a/src/ert/data/_measured_data.py b/src/ert/data/_measured_data.py index 6fcb258eb0a..b5d7c6a710a 100644 --- a/src/ert/data/_measured_data.py +++ b/src/ert/data/_measured_data.py @@ -13,7 +13,7 @@ import numpy as np import pandas as pd -from ert.realization_state import RealizationStorageState +from ert.realization_storage_state import RealizationStorageState if TYPE_CHECKING: import numpy.typing as npt diff --git a/src/ert/enkf_main.py b/src/ert/enkf_main.py index d67c48363ef..091793aa99f 100644 --- a/src/ert/enkf_main.py +++ b/src/ert/enkf_main.py @@ -15,7 +15,7 @@ from .analysis.configuration import UpdateConfiguration, UpdateStep from .config import ParameterConfig from .job_queue import WorkflowRunner -from .realization_state import RealizationStorageState +from .realization_storage_state import RealizationStorageState from .run_context import RunContext from .runpaths import Runpaths from .substitution_list import SubstitutionList @@ -202,7 +202,7 @@ def sample_prior( ) ensemble.save_parameters(parameter, realization_nr, ds) for realization_nr in active_realizations: - ensemble.update_realization_state( + ensemble.update_realization_storage_state( realization_nr, [ RealizationStorageState.UNDEFINED, diff --git a/src/ert/gui/ertwidgets/models/ertmodel.py b/src/ert/gui/ertwidgets/models/ertmodel.py index 24c3e38d041..a55a1f5f677 100644 --- a/src/ert/gui/ertwidgets/models/ertmodel.py +++ b/src/ert/gui/ertwidgets/models/ertmodel.py @@ -1,4 +1,4 @@ -from ert.realization_state import RealizationStorageState +from ert.realization_storage_state import RealizationStorageState from ert.storage import StorageReader diff --git a/src/ert/job_queue/job_queue_node.py b/src/ert/job_queue/job_queue_node.py index 70f5bf001cc..f7e9fdbdc89 100644 --- a/src/ert/job_queue/job_queue_node.py +++ b/src/ert/job_queue/job_queue_node.py @@ -13,7 +13,7 @@ from ert._clib.queue import _get_submit_attempt, _kill, _refresh_status, _submit from ert.callbacks import forward_model_ok from ert.load_status import LoadStatus -from ert.realization_state import RealizationStorageState +from ert.realization_storage_state import RealizationStorageState from . import ResPrototype from .job_status import JobStatus diff --git a/src/ert/libres_facade.py b/src/ert/libres_facade.py index d1587c46756..cc2603f3212 100644 --- a/src/ert/libres_facade.py +++ b/src/ert/libres_facade.py @@ -23,7 +23,7 @@ ) from ert.data import MeasuredData from ert.data._measured_data import ObservationError, ResponseError -from ert.realization_state import RealizationStorageState +from ert.realization_storage_state import RealizationStorageState from ert.shared.version import __version__ from ert.storage import EnsembleReader diff --git a/src/ert/realization_state.py b/src/ert/realization_state.py deleted file mode 100644 index 068af91fe84..00000000000 --- a/src/ert/realization_state.py +++ /dev/null @@ -1,9 +0,0 @@ -from enum import Enum - - -class RealizationStorageState(Enum): - UNDEFINED = 1 - INITIALIZED = 2 - HAS_DATA = 4 - LOAD_FAILURE = 8 - PARENT_FAILURE = 16 diff --git a/src/ert/run_models/ensemble_experiment.py b/src/ert/run_models/ensemble_experiment.py index 03a6f951c50..3ed04f776f1 100644 --- a/src/ert/run_models/ensemble_experiment.py +++ b/src/ert/run_models/ensemble_experiment.py @@ -8,7 +8,7 @@ from ert.enkf_main import sample_prior from ert.ensemble_evaluator import EvaluatorServerConfig -from ert.realization_state import RealizationStorageState +from ert.realization_storage_state import RealizationStorageState from ert.run_context import RunContext from ert.storage import EnsembleAccessor, StorageAccessor diff --git a/src/ert/run_models/ensemble_smoother.py b/src/ert/run_models/ensemble_smoother.py index a5b737c7d74..3f245776161 100644 --- a/src/ert/run_models/ensemble_smoother.py +++ b/src/ert/run_models/ensemble_smoother.py @@ -11,7 +11,7 @@ from ert.config import ErtConfig, HookRuntime from ert.enkf_main import sample_prior from ert.ensemble_evaluator import EvaluatorServerConfig -from ert.realization_state import RealizationStorageState +from ert.realization_storage_state import RealizationStorageState from ert.run_context import RunContext from ert.run_models.run_arguments import ESRunArguments from ert.storage import StorageAccessor diff --git a/src/ert/run_models/iterated_ensemble_smoother.py b/src/ert/run_models/iterated_ensemble_smoother.py index f63fb4711e8..8427ae3dcd1 100644 --- a/src/ert/run_models/iterated_ensemble_smoother.py +++ b/src/ert/run_models/iterated_ensemble_smoother.py @@ -12,7 +12,7 @@ from ert.config import ErtConfig, HookRuntime from ert.enkf_main import sample_prior from ert.ensemble_evaluator import EvaluatorServerConfig -from ert.realization_state import RealizationStorageState +from ert.realization_storage_state import RealizationStorageState from ert.run_context import RunContext from ert.run_models.run_arguments import SIESRunArguments from ert.storage import EnsembleAccessor, StorageAccessor diff --git a/src/ert/run_models/multiple_data_assimilation.py b/src/ert/run_models/multiple_data_assimilation.py index 0782f4ffd8e..538d561fc87 100644 --- a/src/ert/run_models/multiple_data_assimilation.py +++ b/src/ert/run_models/multiple_data_assimilation.py @@ -11,7 +11,7 @@ from ert.config import ErtConfig, HookRuntime from ert.enkf_main import sample_prior from ert.ensemble_evaluator import EvaluatorServerConfig -from ert.realization_state import RealizationStorageState +from ert.realization_storage_state import RealizationStorageState from ert.run_context import RunContext from ert.run_models.run_arguments import ESMDARunArguments from ert.storage import EnsembleAccessor, StorageAccessor diff --git a/src/ert/shared/hook_implementations/workflows/export_misfit_data.py b/src/ert/shared/hook_implementations/workflows/export_misfit_data.py index 93a12fdf46c..61e060d20d3 100644 --- a/src/ert/shared/hook_implementations/workflows/export_misfit_data.py +++ b/src/ert/shared/hook_implementations/workflows/export_misfit_data.py @@ -2,7 +2,7 @@ from ert import ErtScript from ert.exceptions import StorageError -from ert.realization_state import RealizationStorageState +from ert.realization_storage_state import RealizationStorageState class ExportMisfitDataJob(ErtScript): diff --git a/src/ert/shared/share/ert/workflows/jobs/internal-gui/scripts/gen_data_rft_export.py b/src/ert/shared/share/ert/workflows/jobs/internal-gui/scripts/gen_data_rft_export.py index 650d627cbfc..fbe4b1221f1 100644 --- a/src/ert/shared/share/ert/workflows/jobs/internal-gui/scripts/gen_data_rft_export.py +++ b/src/ert/shared/share/ert/workflows/jobs/internal-gui/scripts/gen_data_rft_export.py @@ -12,7 +12,7 @@ from ert.gui.ertwidgets.listeditbox import ListEditBox from ert.gui.ertwidgets.models.path_model import PathModel from ert.gui.ertwidgets.pathchooser import PathChooser -from ert.realization_state import RealizationStorageState +from ert.realization_storage_state import RealizationStorageState def load_args(filename, column_names=None): diff --git a/src/ert/simulator/simulation_context.py b/src/ert/simulator/simulation_context.py index 7660248a488..5f18459e91f 100644 --- a/src/ert/simulator/simulation_context.py +++ b/src/ert/simulator/simulation_context.py @@ -11,7 +11,7 @@ from ert.config import HookRuntime from ert.enkf_main import create_run_path from ert.job_queue import JobQueue, JobStatus -from ert.realization_state import RealizationStorageState +from ert.realization_storage_state import RealizationStorageState from ert.run_context import RunContext from ert.runpaths import Runpaths diff --git a/src/ert/storage/local_ensemble.py b/src/ert/storage/local_ensemble.py index 0941ec92402..6f57293516a 100644 --- a/src/ert/storage/local_ensemble.py +++ b/src/ert/storage/local_ensemble.py @@ -15,7 +15,7 @@ from ert.callbacks import forward_model_ok from ert.load_status import LoadResult, LoadStatus -from ert.realization_state import RealizationStorageState +from ert.realization_storage_state import RealizationStorageState if TYPE_CHECKING: import numpy.typing as npt @@ -35,7 +35,7 @@ def _load_realization( realisation: int, run_args: List[RunArg], ) -> Tuple[LoadResult, int]: - sim_fs.update_realization_state( + sim_fs.update_realization_storage_state( realisation, [RealizationStorageState.UNDEFINED], RealizationStorageState.INITIALIZED, @@ -270,7 +270,7 @@ def _save_state_map(self) -> None: data = {"state_map": [v.value for v in self._state_map]} f.write(json.dumps(data)) - def update_realization_state( + def update_realization_storage_state( self, realization: int, old_states: List[RealizationStorageState], @@ -339,7 +339,7 @@ def save_parameters( path.parent.mkdir(exist_ok=True) dataset.expand_dims(realizations=[realization]).to_netcdf(path, engine="scipy") - self.update_realization_state( + self.update_realization_storage_state( realization, [ RealizationStorageState.UNDEFINED, diff --git a/src/ert/storage/local_storage.py b/src/ert/storage/local_storage.py index 44f261afd00..3982858ce87 100644 --- a/src/ert/storage/local_storage.py +++ b/src/ert/storage/local_storage.py @@ -28,7 +28,7 @@ from pydantic import BaseModel, Field from ert.config import ErtConfig -from ert.realization_state import RealizationStorageState +from ert.realization_storage_state import RealizationStorageState from ert.shared import __version__ from ert.storage.local_ensemble import LocalEnsembleAccessor, LocalEnsembleReader from ert.storage.local_experiment import LocalExperimentAccessor, LocalExperimentReader diff --git a/src/ert/storage/migration/block_fs.py b/src/ert/storage/migration/block_fs.py index 158e4c2aaf6..edf55f7e2b1 100644 --- a/src/ert/storage/migration/block_fs.py +++ b/src/ert/storage/migration/block_fs.py @@ -24,7 +24,7 @@ SurfaceConfig, field_transform, ) -from ert.realization_state import RealizationStorageState +from ert.realization_storage_state import RealizationStorageState from ert.storage import EnsembleAccessor, StorageAccessor from ert.storage.local_storage import LocalStorageAccessor, local_storage_get_ert_config from ert.storage.migration._block_fs_native import DataFile, Kind diff --git a/tests/performance_tests/test_memory_usage.py b/tests/performance_tests/test_memory_usage.py index 00abeb7f762..28afc08215b 100644 --- a/tests/performance_tests/test_memory_usage.py +++ b/tests/performance_tests/test_memory_usage.py @@ -12,7 +12,7 @@ from ert.analysis import UpdateConfiguration, smoother_update from ert.config import ErtConfig, SummaryConfig from ert.enkf_main import sample_prior -from ert.realization_state import RealizationStorageState +from ert.realization_storage_state import RealizationStorageState from ert.storage import open_storage from tests.performance_tests.performance_utils import make_poly_example diff --git a/tests/unit_tests/analysis/test_es_update.py b/tests/unit_tests/analysis/test_es_update.py index 26fab265186..7663da239e9 100644 --- a/tests/unit_tests/analysis/test_es_update.py +++ b/tests/unit_tests/analysis/test_es_update.py @@ -26,7 +26,7 @@ from ert.cli.main import run_cli from ert.config import AnalysisConfig, ErtConfig, GenDataConfig, GenKwConfig from ert.config.analysis_module import ESSettings, IESSettings -from ert.realization_state import RealizationStorageState +from ert.realization_storage_state import RealizationStorageState from ert.storage import open_storage diff --git a/tests/unit_tests/gui/tools/test_case_tool.py b/tests/unit_tests/gui/tools/test_case_tool.py index 07fc99d75e3..7bd5df7e80b 100644 --- a/tests/unit_tests/gui/tools/test_case_tool.py +++ b/tests/unit_tests/gui/tools/test_case_tool.py @@ -7,7 +7,7 @@ from ert.gui.tools.manage_cases.case_init_configuration import ( CaseInitializationConfigurationPanel, ) -from ert.realization_state import RealizationStorageState +from ert.realization_storage_state import RealizationStorageState @pytest.mark.usefixtures("copy_poly_case") diff --git a/tests/unit_tests/simulator/test_simulation_context.py b/tests/unit_tests/simulator/test_simulation_context.py index 0b1effadfb4..846a23399a1 100644 --- a/tests/unit_tests/simulator/test_simulation_context.py +++ b/tests/unit_tests/simulator/test_simulation_context.py @@ -1,5 +1,5 @@ from ert.enkf_main import EnKFMain -from ert.realization_state import RealizationStorageState +from ert.realization_storage_state import RealizationStorageState from ert.simulator import SimulationContext from tests.utils import wait_until diff --git a/tests/unit_tests/status/test_tracking_integration.py b/tests/unit_tests/status/test_tracking_integration.py index b744f3f6644..9adf1fb8cf7 100644 --- a/tests/unit_tests/status/test_tracking_integration.py +++ b/tests/unit_tests/status/test_tracking_integration.py @@ -30,7 +30,7 @@ JOB_STATE_START, REALIZATION_STATE_FINISHED, ) -from ert.realization_state import RealizationStorageState +from ert.realization_storage_state import RealizationStorageState from ert.shared.feature_toggling import FeatureToggling diff --git a/tests/unit_tests/test_load_forward_model.py b/tests/unit_tests/test_load_forward_model.py index c39a1d3e9b8..0eb23f0b93d 100644 --- a/tests/unit_tests/test_load_forward_model.py +++ b/tests/unit_tests/test_load_forward_model.py @@ -12,7 +12,7 @@ from ert.config import ErtConfig from ert.enkf_main import create_run_path, ensemble_context from ert.libres_facade import LibresFacade -from ert.realization_state import RealizationStorageState +from ert.realization_storage_state import RealizationStorageState from ert.storage import open_storage