ert 18.0.9__py3-none-any.whl → 19.0.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (116) hide show
  1. _ert/forward_model_runner/client.py +6 -2
  2. ert/__main__.py +20 -6
  3. ert/cli/main.py +7 -3
  4. ert/config/__init__.py +3 -4
  5. ert/config/_create_observation_dataframes.py +85 -59
  6. ert/config/_get_num_cpu.py +1 -1
  7. ert/config/_observations.py +106 -31
  8. ert/config/distribution.py +1 -1
  9. ert/config/ensemble_config.py +3 -3
  10. ert/config/ert_config.py +50 -0
  11. ert/config/{ext_param_config.py → everest_control.py} +8 -12
  12. ert/config/everest_response.py +3 -5
  13. ert/config/field.py +76 -14
  14. ert/config/forward_model_step.py +12 -9
  15. ert/config/gen_data_config.py +3 -4
  16. ert/config/gen_kw_config.py +2 -12
  17. ert/config/parameter_config.py +1 -16
  18. ert/config/parsing/_option_dict.py +10 -2
  19. ert/config/parsing/config_keywords.py +1 -0
  20. ert/config/parsing/config_schema.py +8 -0
  21. ert/config/parsing/config_schema_deprecations.py +3 -3
  22. ert/config/parsing/config_schema_item.py +12 -3
  23. ert/config/parsing/context_values.py +3 -3
  24. ert/config/parsing/file_context_token.py +1 -1
  25. ert/config/parsing/observations_parser.py +12 -2
  26. ert/config/parsing/queue_system.py +9 -0
  27. ert/config/queue_config.py +0 -1
  28. ert/config/response_config.py +0 -1
  29. ert/config/rft_config.py +78 -33
  30. ert/config/summary_config.py +1 -2
  31. ert/config/surface_config.py +59 -16
  32. ert/dark_storage/common.py +1 -1
  33. ert/dark_storage/compute/misfits.py +4 -1
  34. ert/dark_storage/endpoints/compute/misfits.py +4 -2
  35. ert/dark_storage/endpoints/experiment_server.py +12 -9
  36. ert/dark_storage/endpoints/experiments.py +2 -2
  37. ert/dark_storage/endpoints/observations.py +14 -4
  38. ert/dark_storage/endpoints/parameters.py +2 -18
  39. ert/dark_storage/endpoints/responses.py +10 -5
  40. ert/dark_storage/json_schema/experiment.py +1 -1
  41. ert/data/_measured_data.py +6 -5
  42. ert/ensemble_evaluator/config.py +2 -1
  43. ert/field_utils/field_utils.py +1 -1
  44. ert/field_utils/roff_io.py +1 -1
  45. ert/gui/__init__.py +5 -2
  46. ert/gui/ertnotifier.py +1 -1
  47. ert/gui/ertwidgets/pathchooser.py +0 -3
  48. ert/gui/ertwidgets/suggestor/suggestor.py +63 -30
  49. ert/gui/main.py +27 -5
  50. ert/gui/main_window.py +0 -5
  51. ert/gui/simulation/experiment_panel.py +12 -3
  52. ert/gui/simulation/run_dialog.py +2 -16
  53. ert/gui/tools/manage_experiments/export_dialog.py +136 -0
  54. ert/gui/tools/manage_experiments/storage_info_widget.py +133 -28
  55. ert/gui/tools/plot/plot_api.py +24 -15
  56. ert/gui/tools/plot/plot_widget.py +19 -4
  57. ert/gui/tools/plot/plot_window.py +35 -18
  58. ert/gui/tools/plot/plottery/plots/__init__.py +2 -0
  59. ert/gui/tools/plot/plottery/plots/cesp.py +3 -1
  60. ert/gui/tools/plot/plottery/plots/distribution.py +6 -1
  61. ert/gui/tools/plot/plottery/plots/ensemble.py +3 -1
  62. ert/gui/tools/plot/plottery/plots/gaussian_kde.py +12 -2
  63. ert/gui/tools/plot/plottery/plots/histogram.py +3 -1
  64. ert/gui/tools/plot/plottery/plots/misfits.py +436 -0
  65. ert/gui/tools/plot/plottery/plots/observations.py +18 -4
  66. ert/gui/tools/plot/plottery/plots/statistics.py +3 -1
  67. ert/gui/tools/plot/plottery/plots/std_dev.py +3 -1
  68. ert/plugins/hook_implementations/workflows/csv_export.py +2 -3
  69. ert/plugins/plugin_manager.py +4 -0
  70. ert/resources/forward_models/run_reservoirsimulator.py +8 -3
  71. ert/run_models/_create_run_path.py +3 -3
  72. ert/run_models/everest_run_model.py +13 -11
  73. ert/run_models/initial_ensemble_run_model.py +2 -2
  74. ert/run_models/run_model.py +9 -0
  75. ert/services/_base_service.py +6 -5
  76. ert/services/ert_server.py +4 -4
  77. ert/shared/_doc_utils/__init__.py +4 -2
  78. ert/shared/net_utils.py +43 -18
  79. ert/shared/version.py +3 -3
  80. ert/storage/__init__.py +2 -0
  81. ert/storage/local_ensemble.py +25 -8
  82. ert/storage/local_experiment.py +2 -2
  83. ert/storage/local_storage.py +45 -25
  84. ert/storage/migration/to11.py +1 -1
  85. ert/storage/migration/to18.py +0 -1
  86. ert/storage/migration/to19.py +34 -0
  87. ert/storage/migration/to20.py +23 -0
  88. ert/storage/migration/to21.py +25 -0
  89. ert/storage/migration/to22.py +18 -0
  90. ert/storage/migration/to23.py +49 -0
  91. ert/workflow_runner.py +2 -1
  92. {ert-18.0.9.dist-info → ert-19.0.0.dist-info}/METADATA +1 -1
  93. {ert-18.0.9.dist-info → ert-19.0.0.dist-info}/RECORD +111 -109
  94. {ert-18.0.9.dist-info → ert-19.0.0.dist-info}/WHEEL +1 -1
  95. everest/bin/everlint_script.py +0 -2
  96. everest/bin/utils.py +2 -1
  97. everest/bin/visualization_script.py +4 -11
  98. everest/config/control_config.py +4 -4
  99. everest/config/control_variable_config.py +2 -2
  100. everest/config/everest_config.py +9 -0
  101. everest/config/utils.py +2 -2
  102. everest/config/validation_utils.py +7 -1
  103. everest/config_file_loader.py +0 -2
  104. everest/detached/client.py +3 -3
  105. everest/everest_storage.py +0 -2
  106. everest/gui/everest_client.py +2 -2
  107. everest/optimizer/everest2ropt.py +4 -4
  108. everest/optimizer/opt_model_transforms.py +2 -2
  109. ert/config/violations.py +0 -0
  110. ert/gui/tools/export/__init__.py +0 -3
  111. ert/gui/tools/export/export_panel.py +0 -83
  112. ert/gui/tools/export/export_tool.py +0 -69
  113. ert/gui/tools/export/exporter.py +0 -36
  114. {ert-18.0.9.dist-info → ert-19.0.0.dist-info}/entry_points.txt +0 -0
  115. {ert-18.0.9.dist-info → ert-19.0.0.dist-info}/licenses/COPYING +0 -0
  116. {ert-18.0.9.dist-info → ert-19.0.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,23 @@
1
+ import json
2
+ from pathlib import Path
3
+ from typing import Any
4
+
5
+ info = "Remove redundant .name attribute from responses."
6
+
7
+
8
+ def config_without_name_attr(config: dict[str, Any]) -> dict[str, Any]:
9
+ new_json = {**config}
10
+ new_json.pop("name", None)
11
+
12
+ return new_json
13
+
14
+
15
+ def migrate(path: Path) -> None:
16
+ for response_json_path in path.glob("experiments/*/responses.json"):
17
+ old_json = json.loads((response_json_path).read_text(encoding="utf-8"))
18
+ new_json = {
19
+ response_type: config_without_name_attr(config)
20
+ for response_type, config in old_json.items()
21
+ }
22
+
23
+ response_json_path.write_text(json.dumps(new_json, indent=2), encoding="utf-8")
@@ -0,0 +1,25 @@
1
+ import json
2
+ from pathlib import Path
3
+ from typing import Any
4
+
5
+ info = "Remove refcase from summary response configs"
6
+
7
+
8
+ def config_without_refcase(summary_config: dict[str, Any]) -> dict[str, Any]:
9
+ new_json = {**summary_config}
10
+ new_json.pop("refcase", None)
11
+
12
+ return new_json
13
+
14
+
15
+ def migrate(path: Path) -> None:
16
+ for response_json_path in path.glob("experiments/*/responses.json"):
17
+ old_json = json.loads((response_json_path).read_text(encoding="utf-8"))
18
+ new_json = {
19
+ response_type: config_without_refcase(response_config)
20
+ if response_config["type"] == "summary"
21
+ else response_config
22
+ for response_type, response_config in old_json.items()
23
+ }
24
+
25
+ response_json_path.write_text(json.dumps(new_json, indent=2), encoding="utf-8")
@@ -0,0 +1,18 @@
1
+ from pathlib import Path
2
+
3
+ import polars as pl
4
+
5
+ info = "Add default None values to summary observations LOCATION keywords"
6
+
7
+
8
+ def migrate(path: Path) -> None:
9
+ for summary_observation in path.glob("experiments/*/observations/summary"):
10
+ summary_df = pl.read_parquet(summary_observation)
11
+
12
+ for location_kw in ["location_x", "location_y", "location_range"]:
13
+ if location_kw not in summary_df.columns:
14
+ summary_df = summary_df.with_columns(
15
+ pl.lit(None, dtype=pl.Float32).alias(location_kw)
16
+ )
17
+
18
+ summary_df.write_parquet(summary_observation)
@@ -0,0 +1,49 @@
1
+ from pathlib import Path
2
+
3
+ import polars as pl
4
+
5
+ info = "Add default None values to summary observations LOCATION keywords"
6
+
7
+ old_localization_keywords = ["location_x", "location_y", "location_range"]
8
+ new_localization_keywords = ["east", "north", "radius"]
9
+
10
+
11
+ def migrate(path: Path) -> None:
12
+ for gen_obs in path.glob("experiments/*/observations/gen_data"):
13
+ gen_obs_df = pl.read_parquet(gen_obs)
14
+
15
+ for new_kw in new_localization_keywords:
16
+ if new_kw not in gen_obs_df.columns:
17
+ gen_obs_df = gen_obs_df.with_columns(
18
+ pl.lit(None, dtype=pl.Float32).alias(new_kw)
19
+ )
20
+
21
+ gen_obs_df.write_parquet(gen_obs)
22
+
23
+ for rft_obs in path.glob("experiments/*/observations/rft"):
24
+ rft_obs_df = pl.read_parquet(rft_obs)
25
+
26
+ for new_kw in new_localization_keywords:
27
+ if new_kw not in rft_obs_df.columns:
28
+ rft_obs_df = rft_obs_df.with_columns(
29
+ pl.lit(None, dtype=pl.Float32).alias(new_kw)
30
+ )
31
+
32
+ rft_obs_df.write_parquet(rft_obs)
33
+
34
+ for summary_obs in path.glob("experiments/*/observations/summary"):
35
+ summary_df = pl.read_parquet(summary_obs)
36
+
37
+ for old_kw, new_kw in zip(
38
+ old_localization_keywords, new_localization_keywords, strict=True
39
+ ):
40
+ if old_kw in summary_df.columns:
41
+ column = summary_df[old_kw]
42
+ summary_df = summary_df.with_columns(column.alias(new_kw))
43
+ summary_df = summary_df.drop(old_kw)
44
+ else:
45
+ summary_df = summary_df.with_columns(
46
+ pl.lit(None, dtype=pl.Float32).alias(new_kw)
47
+ )
48
+
49
+ summary_df.write_parquet(summary_obs)
ert/workflow_runner.py CHANGED
@@ -1,6 +1,7 @@
1
1
  from __future__ import annotations
2
2
 
3
3
  import logging
4
+ import types
4
5
  from concurrent import futures
5
6
  from concurrent.futures import Future
6
7
  from typing import Any, Self
@@ -127,7 +128,7 @@ class WorkflowRunner:
127
128
  self,
128
129
  exc_type: type[BaseException] | None,
129
130
  exc_value: BaseException | None,
130
- traceback: Any,
131
+ traceback: types.TracebackType | None,
131
132
  ) -> None:
132
133
  self.wait()
133
134
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ert
3
- Version: 18.0.9
3
+ Version: 19.0.0
4
4
  Summary: Ensemble based Reservoir Tool (ERT)
5
5
  Author-email: Equinor ASA <fg_sib-scout@equinor.com>
6
6
  License-Expression: GPL-3.0-only