Skip to content

Commit

Permalink
INITIALIZED -> PARAMETERS_LOADED
Browse files Browse the repository at this point in the history
  • Loading branch information
yngve-sk committed Nov 25, 2024
1 parent ea8dfb3 commit 22513bf
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/ert/storage/local_ensemble.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ def get_realization_mask_with_parameters(self) -> npt.NDArray[np.bool_]:
[
bool(
{
RealizationStorageState.INITIALIZED,
RealizationStorageState.PARAMETERS_LOADED,
RealizationStorageState.HAS_DATA,
}.intersection(state)
)
Expand Down Expand Up @@ -514,7 +514,7 @@ def _find_state(realization: int) -> Set[RealizationStorageState]:
if _responses_exist_for_realization(realization):
_state.add(RealizationStorageState.HAS_DATA)
if _parameters_exist_for_realization(realization):
_state.add(RealizationStorageState.INITIALIZED)
_state.add(RealizationStorageState.PARAMETERS_LOADED)

if len(_state) == 0:
_state.add(RealizationStorageState.UNDEFINED)
Expand Down Expand Up @@ -895,7 +895,7 @@ def get_parameter_state(
) -> Dict[str, RealizationStorageState]:
path = self._realization_dir(realization)
return {
e: RealizationStorageState.INITIALIZED
e: RealizationStorageState.PARAMETERS_LOADED
if (path / (_escape_filename(e) + ".nc")).exists()
else RealizationStorageState.UNDEFINED
for e in self.experiment.parameter_configuration
Expand Down
2 changes: 1 addition & 1 deletion src/ert/storage/realization_storage_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

class RealizationStorageState(Enum):
UNDEFINED = 1
INITIALIZED = 2
PARAMETERS_LOADED = 2
HAS_DATA = 4
LOAD_FAILURE = 8
PARENT_FAILURE = 16
3 changes: 2 additions & 1 deletion tests/ert/ui_tests/gui/test_manage_experiments_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ def test_init_prior(qtbot, storage):
Qt.MouseButton.LeftButton,
)
assert (
RealizationStorageState.INITIALIZED in s for s in ensemble.get_ensemble_state()
RealizationStorageState.PARAMETERS_LOADED in s
for s in ensemble.get_ensemble_state()
)
assert ensemble.load_parameters("COEFFS")[
"transformed_values"
Expand Down

0 comments on commit 22513bf

Please sign in to comment.