ert 18.0.4__py3-none-any.whl → 18.0.6__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.
@@ -315,6 +315,8 @@ class SchemaItem:
315
315
  self, line: Sequence[FileContextToken]
316
316
  ) -> Sequence[FileContextToken | dict[FileContextToken, FileContextToken]]:
317
317
  n = self.options_after
318
+ if not line:
319
+ return []
318
320
  if isinstance(n, Varies):
319
321
  args, kwargs = parse_variable_options(list(line), n.max_positionals)
320
322
  return [*args, kwargs] # type: ignore
@@ -60,15 +60,17 @@ def _value_export_txt(
60
60
  with path.open("w") as f:
61
61
  for key, param_map in values.items():
62
62
  for param, value in param_map.items():
63
- if isinstance(value, (int | float)):
64
- if key == DESIGN_MATRIX_GROUP:
65
- print(f"{param} {value:g}", file=f)
66
- else:
67
- print(f"{key}:{param} {value:g}", file=f)
68
- elif key == DESIGN_MATRIX_GROUP:
69
- print(f"{param} {value}", file=f)
63
+ if isinstance(value, int):
64
+ value_str = str(value)
65
+ elif isinstance(value, float):
66
+ value_str = f"{value:g}"
70
67
  else:
71
- print(f"{key}:{param} {value}", file=f)
68
+ value_str = str(value)
69
+
70
+ if key == DESIGN_MATRIX_GROUP:
71
+ print(f"{param} {value_str}", file=f)
72
+ else:
73
+ print(f"{key}:{param} {value_str}", file=f)
72
74
 
73
75
 
74
76
  def _value_export_json(
@@ -214,11 +216,15 @@ def _make_param_substituter(
214
216
  param_substituter = deepcopy(substituter)
215
217
  for values in param_data.values():
216
218
  for param_name, value in values.items():
217
- if isinstance(value, (int, float)):
218
- formatted_value = f"{value:.6g}"
219
+ if isinstance(value, int):
220
+ formatted_value = str(value)
221
+ elif isinstance(value, float):
222
+ formatted_value = f"{value:g}"
219
223
  else:
220
224
  formatted_value = str(value)
225
+
221
226
  param_substituter[f"<{param_name}>"] = formatted_value
227
+
222
228
  return param_substituter
223
229
 
224
230
 
ert/shared/version.py CHANGED
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
28
28
  commit_id: COMMIT_ID
29
29
  __commit_id__: COMMIT_ID
30
30
 
31
- __version__ = version = '18.0.4'
32
- __version_tuple__ = version_tuple = (18, 0, 4)
31
+ __version__ = version = '18.0.6'
32
+ __version_tuple__ = version_tuple = (18, 0, 6)
33
33
 
34
- __commit_id__ = commit_id = 'gbe2423cee'
34
+ __commit_id__ = commit_id = 'g11538d255'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ert
3
- Version: 18.0.4
3
+ Version: 18.0.6
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
@@ -52,7 +52,7 @@ Requires-Dist: progressbar2
52
52
  Requires-Dist: psutil
53
53
  Requires-Dist: pyarrow
54
54
  Requires-Dist: pydantic>2
55
- Requires-Dist: pyqt6!=6.10.0
55
+ Requires-Dist: pyqt6<6.10.0
56
56
  Requires-Dist: python-dateutil
57
57
  Requires-Dist: python-multipart
58
58
  Requires-Dist: pyyaml
@@ -90,7 +90,7 @@ ert/config/parsing/config_errors.py,sha256=p3lAcRPXTm4okupdVyLwRCVWJ_86a7rgCohkD
90
90
  ert/config/parsing/config_keywords.py,sha256=J8kgzDVhuM8jvCwzO1kfOxvOH_DnDASOZPaJZujcIgQ,1860
91
91
  ert/config/parsing/config_schema.py,sha256=9ws2C3Oc-eT5uB_Xy2IEvPWON7b9rZnIc2FpID7hhWc,9614
92
92
  ert/config/parsing/config_schema_deprecations.py,sha256=xUkbe-_UA8UawNcUF58YwHHpHTAfC6XO2ZBN97jchKc,8611
93
- ert/config/parsing/config_schema_item.py,sha256=jjHT1KqobQvpLxh9gZ0rR8x_YylV29pvvP7oUASFwtA,14448
93
+ ert/config/parsing/config_schema_item.py,sha256=3BsemNNXoFisT67iSxhGKTtRtflwnBw79_83l3X-uuU,14491
94
94
  ert/config/parsing/context_values.py,sha256=S_j_BKuwqSm8RZNnw6Ki2ZQ4jz0VFXXmh0MZA2OstmQ,2288
95
95
  ert/config/parsing/deprecation_info.py,sha256=E31LBTiG1qNeqACU8lTxp54bESIeuuVHgFim8j8uVjg,663
96
96
  ert/config/parsing/error_info.py,sha256=AMOS0v-_ECHESj4aoy0m2fUPPlw9SE1DN_8MsaHeilY,2906
@@ -369,7 +369,7 @@ ert/resources/workflows/jobs/shell/MOVE_DIRECTORY,sha256=Lh_u0-eCr5Usa8Xien44d6q
369
369
  ert/resources/workflows/jobs/shell/MOVE_FILE,sha256=MET6aPtDTVaoEDiTZqKqx_hRayJP3Gn-yubdwrJqpjw,48
370
370
  ert/resources/workflows/jobs/shell/SYMLINK,sha256=P6wYoLM6y7IqzJQE5ZWkKEj7ERfK9VTRJa6N1pKigeg,46
371
371
  ert/run_models/__init__.py,sha256=PzLAD_gFRm_oUq_zDByAlQ05zShrBRoCR8oCn2qg43I,1348
372
- ert/run_models/_create_run_path.py,sha256=fnHCRQaGtTYpQy2garIGF7qrTQsfXMZmcOCoFZoFVu4,12691
372
+ ert/run_models/_create_run_path.py,sha256=Cev5Cwprca3CbIIAqIHElcieOuBamX91gRdstkKR-As,12764
373
373
  ert/run_models/ensemble_experiment.py,sha256=bbwZtuQQy-3V5VKK8WpGnGe4rDd9A8A4B0skt70ds3Q,2968
374
374
  ert/run_models/ensemble_information_filter.py,sha256=WecqKB9XlN0Ktxu43jTftjSkw0Kp_GfxSUh-tPrT0_E,1297
375
375
  ert/run_models/ensemble_smoother.py,sha256=zGEG6DvASDaz_XsXrUT8Vbv7bxWIWw-wR4b1DGx6H3I,3802
@@ -400,7 +400,7 @@ ert/services/ert_server.py,sha256=geh5mkdAKqNKgG56DcwSnEpvf0wcUc7vuw4feG1ykEI,10
400
400
  ert/services/webviz_ert_service.py,sha256=J5vznqb_-DjlDMOze7tdvuBE4GWEPgJ5dIIXvRLKd0Y,650
401
401
  ert/shared/__init__.py,sha256=OwgL-31MxA0fabETJ5Svw0tqJpHi569CZDRFHdHiqA0,644
402
402
  ert/shared/net_utils.py,sha256=DDHIZLHdBnh7ZZ--1s-FUlsoNTSJJsfHmLQE44E2JqU,5324
403
- ert/shared/version.py,sha256=sHyQpOJPAhRw_LFevtB2d0hrVnwOgd9JQmCvacV5LwI,714
403
+ ert/shared/version.py,sha256=UbS5A3ggo0qvlCwZwDIDBHmSiajgVMJK6jCVrBMWqzc,714
404
404
  ert/shared/_doc_utils/__init__.py,sha256=zSl-NUpWLF167PVTvfjn0T50gExjvyWPw5OGq5Bt2Dc,983
405
405
  ert/shared/_doc_utils/ert_jobs.py,sha256=uHP8ozhKwCHG6BkyhAgCGoy59JEFb102pHKot-5ZEys,8054
406
406
  ert/shared/_doc_utils/everest_jobs.py,sha256=uBDN7tIwlBJIZVZ6ZFL1tkewEJJGDLoeVrFIIrJznvM,2081
@@ -453,7 +453,7 @@ ert/validation/validation_status.py,sha256=f47_B7aS-9DEh6uaVzKxD97pXienkyTVVCqTy
453
453
  ert/warnings/__init__.py,sha256=IBwQVkdD7Njaad9PAB-9K-kr15wnA4EBKboxyqgu9NA,214
454
454
  ert/warnings/_warnings.py,sha256=7qhNZ0W4nnljzoOx6AXX7VlMv5pa34Ek5M5n1Ep0Kak,189
455
455
  ert/warnings/specific_warning_handler.py,sha256=5dVXtOhzcMmtPBGx4AOddXNPfzTFOPA7RVtdH8hLv68,932
456
- ert-18.0.4.dist-info/licenses/COPYING,sha256=jOtLnuWt7d5Hsx6XXB2QxzrSe2sWWh3NgMfFRetluQM,35147
456
+ ert-18.0.6.dist-info/licenses/COPYING,sha256=jOtLnuWt7d5Hsx6XXB2QxzrSe2sWWh3NgMfFRetluQM,35147
457
457
  everest/__init__.py,sha256=8_f50f6H3-onqaiuNCwC0Eiotdl9JuTxhwyF_54MVvU,306
458
458
  everest/config_file_loader.py,sha256=q_rmxk778uDrNxdQQW0tBs9R3hU4az6yGCJwuY_5xww,5698
459
459
  everest/everest_storage.py,sha256=Xg2CuRdhZOqljm0i6H5o-pejcMeCwncSGw7Q6beZRgY,42173
@@ -472,11 +472,11 @@ everest/bin/monitor_script.py,sha256=4FOkLvGJXaBf84Pl97JxE_fGQXU5AiRVgLWEXmFrLHs
472
472
  everest/bin/utils.py,sha256=LKnwJIALpRj2H3tSHHONPQKFY3Si8wJZCew6529ou5I,18814
473
473
  everest/bin/visualization_script.py,sha256=QUzTKRt1JeCRF4U5jGataLd3GZwCkJOFi0mwnWOpQMk,2729
474
474
  everest/config/__init__.py,sha256=nYC7D8A0Lh8jFIbtCiLjRxSjufPCsQsdQ6HW5dZfHfc,1535
475
- everest/config/control_config.py,sha256=nCflBBkPxqvQiTqzpjAVFY9I2y-568g1WVXpnluWqe0,12983
475
+ everest/config/control_config.py,sha256=ERD4VBFGq6nkHMOrjtLS8rnXxoF-VHk9kP1_uZKtY7o,13581
476
476
  everest/config/control_variable_config.py,sha256=9MMRFtNgt_gRKOlwV7jE6QD6jiHFzcx-z6U6yq9jrww,7677
477
477
  everest/config/cvar_config.py,sha256=vIZZ3DUZpestNsC3ljY2I4PbANeDeh10fEy8KyB_58A,1593
478
478
  everest/config/environment_config.py,sha256=r5avqQFyaEpTIVXM9IqPVImvlsVK1qy1WxoPNgGDWLo,2645
479
- everest/config/everest_config.py,sha256=kbzgXvH_Ssef18obpE-21-SpfYqnsjZ5S4OrLZ4tcyw,39800
479
+ everest/config/everest_config.py,sha256=0X1vvuOpVz3OajFnx-xdoewNg_UWxcEru4zBiNP2lP8,39822
480
480
  everest/config/export_config.py,sha256=Uut70fMB7Zd_vOEebTCz9GvFv5DjS_f2CW0qT9GcBQ0,982
481
481
  everest/config/forward_model_config.py,sha256=kjQ6ASh9PaDU-rP0IX8u5JxQ6KjWiyv_pUN68yrori0,2784
482
482
  everest/config/input_constraint_config.py,sha256=czgkiPBiOd0VpIWZgRkgCpm0TkioNoDP13ao6VUDGW0,3011
@@ -517,8 +517,8 @@ everest/templates/well_drill.tmpl,sha256=9iLexmBHMsMQNXyyRK4GlmVuVpVIxRcCHpy1av5
517
517
  everest/templates/well_order.tmpl,sha256=XJ1eVRkeyTdLu5sLsltJSSK6BDLN7rFOAqLdM3ZZy3w,75
518
518
  everest/util/__init__.py,sha256=xEYLz6pUtgkH8VHer1RfoCwKiO70dBnuhHonsOPaOx0,1359
519
519
  everest/util/forward_models.py,sha256=JPxHhLI6TrmQJwW50wwGBmw57TfRd8SG2svYhXFHrc8,1617
520
- ert-18.0.4.dist-info/METADATA,sha256=eSyzD9hbt1j8gVmplb7QiqFVxBXbx9k_tivxwopG2E8,10013
521
- ert-18.0.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
522
- ert-18.0.4.dist-info/entry_points.txt,sha256=ChZ7vn8Qy9v9rT8GM2JtAvWDN3NVoy4BIcvVRtU73CM,189
523
- ert-18.0.4.dist-info/top_level.txt,sha256=LRh9GfdfyDWfAGmrQgp_XdoMHA4v6aotw8xgsy5YyHE,17
524
- ert-18.0.4.dist-info/RECORD,,
520
+ ert-18.0.6.dist-info/METADATA,sha256=a7oF4txAllq9AXi-4ulfjq1Fzr5j5gEQqMi0wNqQYbw,10012
521
+ ert-18.0.6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
522
+ ert-18.0.6.dist-info/entry_points.txt,sha256=ChZ7vn8Qy9v9rT8GM2JtAvWDN3NVoy4BIcvVRtU73CM,189
523
+ ert-18.0.6.dist-info/top_level.txt,sha256=LRh9GfdfyDWfAGmrQgp_XdoMHA4v6aotw8xgsy5YyHE,17
524
+ ert-18.0.6.dist-info/RECORD,,
@@ -166,7 +166,8 @@ class ControlConfig(BaseModel):
166
166
  """
167
167
  ),
168
168
  )
169
- perturbation_magnitude: float = Field(
169
+ perturbation_magnitude: float | None = Field(
170
+ default=None,
170
171
  description=dedent(
171
172
  """
172
173
  The magnitude of the perturbation of all control variables in the
@@ -185,6 +186,8 @@ class ControlConfig(BaseModel):
185
186
  and `min` fields.
186
187
 
187
188
  This default value can be overridden at the variable level.
189
+
190
+ This field is required unless it is explicitly set for all variables.
188
191
  """
189
192
  ),
190
193
  )
@@ -247,6 +250,19 @@ class ControlConfig(BaseModel):
247
250
  )
248
251
  return values
249
252
 
253
+ @model_validator(mode="after")
254
+ def validate_perturbation_magnitude(self) -> Self:
255
+ if self.perturbation_magnitude is None and any(
256
+ variable
257
+ for variable in self.variables
258
+ if variable.perturbation_magnitude is None
259
+ ):
260
+ raise ValueError(
261
+ "A default perturbation_magnitude for all variables must be set "
262
+ "when not all variables define it explicitly."
263
+ )
264
+ return self
265
+
250
266
  @model_validator(mode="after")
251
267
  def validate_variables(self) -> Self:
252
268
  if self.variables is None:
@@ -188,18 +188,18 @@ class EverestConfig(BaseModelWithContextSupport):
188
188
  ```yaml
189
189
  controls:
190
190
  - name: point
191
- type: generic_control
192
- min: -1.0
191
+ type: generic_control
192
+ min: -1.0
193
+ max: 1.0
194
+ initial_guess: 0.1
195
+ perturbation_magnitude: 0.001
196
+ variables:
197
+ - name: x
198
+ initial_guess: 0.5
199
+ - name: y
200
+ min: 0.0
193
201
  max: 1.0
194
- initial_guess: 0.1
195
- perturbation_magnitude: 0.001
196
- variables:
197
- - name: x
198
- initial_guess: 0.5
199
- - name: y
200
- min: 0.0
201
- max: 1.0
202
- - name: z
202
+ - name: z
203
203
  ```
204
204
 
205
205
  This defines a group of controls names `point`, with variables `x`,
@@ -221,17 +221,18 @@ class EverestConfig(BaseModelWithContextSupport):
221
221
  ```yaml
222
222
  controls:
223
223
  - name: point
224
- max: 1.0
225
- min: -1.0
226
- initial_guess: 0.25
227
- type: generic_control
228
- variables:
229
- - name: x
230
- index: 1
231
- - name: x
232
- index: 2
233
- - name: x
234
- index: 3
224
+ max: 1.0
225
+ min: -1.0
226
+ initial_guess: 0.25
227
+ perturbation_magnitude: 0.001
228
+ type: generic_control
229
+ variables:
230
+ - name: x
231
+ index: 1
232
+ - name: x
233
+ index: 2
234
+ - name: x
235
+ index: 3
235
236
  ```
236
237
 
237
238
  This defines three variables `point.x.1`, `point.x.2` and
@@ -247,12 +248,13 @@ class EverestConfig(BaseModelWithContextSupport):
247
248
  ```yaml
248
249
  controls:
249
250
  - name: point
250
- max: 1.0
251
- min: -1.0
252
- type: generic_control
253
- variables:
254
- - name: x
255
- initial_guess: [0.25, 0.25, 0.25]
251
+ max: 1.0
252
+ min: -1.0
253
+ perturbation_magnitude: 0.001
254
+ type: generic_control
255
+ variables:
256
+ - name: x
257
+ initial_guess: [0.25, 0.25, 0.25]
256
258
  ```
257
259
  """
258
260
  ),
File without changes