Skip to content

Commit

Permalink
Add migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
Yngve S. Kristiansen committed Sep 17, 2024
1 parent 5d8fd2c commit 3e063f7
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 39 deletions.
2 changes: 1 addition & 1 deletion src/ert/config/ert_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def __post_init__(self) -> None:

def write_observations_to_folder(self, dest: Path) -> None:
for name, dataset in self.observations.items():
dataset.to_netcdf(dest / f"{name}", engine="scipy")
dataset.write_parquet(dest / name)

@staticmethod
def with_plugins(
Expand Down
4 changes: 4 additions & 0 deletions src/ert/storage/migration/to7.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,10 @@ def _migrate_observations_to_grouped_parquet(path: Path):
for experiment in path.glob("experiments/*"):
_obs_keys = os.listdir(os.path.join(experiment, "observations"))

if len(set(_obs_keys) - {"summary", "gen_data"}) == 0:
# Observations are already migrated, likely from .to4 migrations
continue

obs_ds_infos = [
ObservationDatasetInfo.from_path(experiment / "observations" / p)
for p in _obs_keys
Expand Down

This file was deleted.

This file was deleted.

68 changes: 34 additions & 34 deletions tests/unit_tests/storage/test_storage_migration.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,40 +30,40 @@ def copy_shared(tmp_path, block_storage_path):
@pytest.mark.parametrize(
"ert_version",
[
# "10.3.1",
# "10.2.8",
# "10.1.3",
# "10.0.3",
# "9.0.17",
# "8.4.9",
# "8.4.8",
# "8.4.7",
# "8.4.6",
# "8.4.5",
# "8.4.4",
# "8.4.3",
# "8.4.2",
# "8.4.1",
# "8.4.0",
# "8.3.1",
# "8.3.0",
# "8.2.1",
# "8.2.0",
# "8.1.1",
# "8.1.0",
# "8.0.13",
# "8.0.12",
# "8.0.11",
# "8.0.10",
# "8.0.9",
# "8.0.8",
# "8.0.7",
# "8.0.6",
# "8.0.4",
# "8.0.3",
# "8.0.2",
# "8.0.1",
# "8.0.0",
"10.3.1",
"10.2.8",
"10.1.3",
"10.0.3",
"9.0.17",
"8.4.9",
"8.4.8",
"8.4.7",
"8.4.6",
"8.4.5",
"8.4.4",
"8.4.3",
"8.4.2",
"8.4.1",
"8.4.0",
"8.3.1",
"8.3.0",
"8.2.1",
"8.2.0",
"8.1.1",
"8.1.0",
"8.0.13",
"8.0.12",
"8.0.11",
"8.0.10",
"8.0.9",
"8.0.8",
"8.0.7",
"8.0.6",
"8.0.4",
"8.0.3",
"8.0.2",
"8.0.1",
"8.0.0",
"7.0.4",
"7.0.3",
"7.0.2",
Expand Down

0 comments on commit 3e063f7

Please sign in to comment.