fmu-sumo 2.9.0__py3-none-any.whl → 2.11.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.
@@ -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 = '2.9.0'
32
- __version_tuple__ = version_tuple = (2, 9, 0)
31
+ __version__ = version = '2.11.0'
32
+ __version_tuple__ = version_tuple = (2, 11, 0)
33
33
 
34
34
  __commit_id__ = commit_id = None
@@ -22,7 +22,7 @@ class Filters:
22
22
  observations = {
23
23
  "bool": {
24
24
  "must_not": [
25
- {"exists": {"field": "fmu.iteration.name.keyword"}},
25
+ {"exists": {"field": "fmu.ensemble.name.keyword"}},
26
26
  {"exists": {"field": "fmu.realization.id"}},
27
27
  ]
28
28
  }
@@ -33,7 +33,7 @@ class Child(Document):
33
33
  return (
34
34
  f"<{self.__class__.__name__}: {self.name} {self.uuid}(uuid) "
35
35
  f"in realization {self.realization} "
36
- f"in iteration {self.iteration} "
36
+ f"in ensemble {self.ensemble} "
37
37
  f"in case {self.casename} "
38
38
  f"in asset {self.asset}>"
39
39
  )
@@ -41,7 +41,7 @@ class Child(Document):
41
41
  return (
42
42
  f"<{self.__class__.__name__}: {self.name} {self.uuid}(uuid) "
43
43
  f"in operation {self.operationname} "
44
- f"in iteration {self.iteration} "
44
+ f"in ensemble {self.ensemble} "
45
45
  f"in case {self.casename} "
46
46
  f"in asset {self.asset}>"
47
47
  )
@@ -94,8 +94,7 @@ class Child(Document):
94
94
  @property
95
95
  def template_path(self) -> str:
96
96
  return "/".join(
97
- ["{realization}", "{iteration}"]
98
- + self.relative_path.split("/")[2:]
97
+ ["{realization}", "{ensemble}"] + self.relative_path.split("/")[2:]
99
98
  )
100
99
 
101
100
  @property
@@ -138,11 +137,6 @@ class Child(Document):
138
137
  """Object realization"""
139
138
  return self.get_property("fmu.realization.id")
140
139
 
141
- @property
142
- def iteration(self) -> str:
143
- """Object iteration"""
144
- return self.get_property("fmu.iteration.name")
145
-
146
140
  @property
147
141
  def ensemble(self) -> str:
148
142
  """Object ensemble"""
@@ -64,19 +64,16 @@ def _gen_filter_gen(attr):
64
64
  def _gen_filter_stage(attr):
65
65
  """Match property against either single value or list of values.
66
66
  If the value given is a boolean, tests for existence or not of the property.
67
- In addition, if the value is or includes either "iteration" or "ensemble",
68
- expand to include both values.
67
+ In addition, if the value is or includes "ensemble" expand to include it.
69
68
  """
70
69
 
71
70
  _inner = _gen_filter_gen(attr)
72
71
 
73
72
  def _fn(value):
74
- if value == "iteration" or value == "ensemble":
75
- return _inner(["iteration", "ensemble"])
76
- elif isinstance(value, list) and set(value).intersection(
77
- {"iteration", "ensemble"}
78
- ):
79
- return _inner(list(set(value).union({"iteration", "ensemble"})))
73
+ if value == "ensemble":
74
+ return _inner(["ensemble"])
75
+ elif isinstance(value, list) and set(value).intersection({"ensemble"}):
76
+ return _inner(list(set(value).union({"ensemble"})))
80
77
  else:
81
78
  return _inner(value)
82
79
 
@@ -156,10 +153,6 @@ _filterspec = {
156
153
  "relative_path": [_gen_filter_gen, "file.relative_path.keyword"],
157
154
  "tagname": [_gen_filter_gen, "data.tagname.keyword"],
158
155
  "dataformat": [_gen_filter_gen, "data.format.keyword"],
159
- "iteration": [
160
- _gen_filter_gen,
161
- "fmu.iteration.name.keyword",
162
- ], # FIXME: to be removed
163
156
  "ensemble": [_gen_filter_gen, "fmu.ensemble.name.keyword"],
164
157
  "realization": [_gen_filter_gen, "fmu.realization.id"],
165
158
  "aggregation": [_gen_filter_gen, "fmu.aggregation.operation.keyword"],
@@ -1285,8 +1278,8 @@ class SearchContext:
1285
1278
  "must": [
1286
1279
  {"term": {"class.keyword": "dictionary"}},
1287
1280
  {
1288
- "exists": {
1289
- "field": "fmu.realization.id"
1281
+ "term": {
1282
+ "fmu.context.stage.keyword": "realization"
1290
1283
  }
1291
1284
  },
1292
1285
  ]
@@ -1297,8 +1290,11 @@ class SearchContext:
1297
1290
  "must": [
1298
1291
  {"term": {"class.keyword": "table"}},
1299
1292
  {
1300
- "exists": {
1301
- "field": "fmu.aggregation.operation"
1293
+ "terms": {
1294
+ "fmu.context.stage.keyword": [
1295
+ "ensemble",
1296
+ "iteration",
1297
+ ]
1302
1298
  }
1303
1299
  },
1304
1300
  ]
@@ -1550,7 +1546,6 @@ class SearchContext:
1550
1546
  "class": classname,
1551
1547
  "entity_uuid": entityuuid,
1552
1548
  "ensemble_name": ensemblename,
1553
- "iteration_name": ensemblename,
1554
1549
  "operations": [operation],
1555
1550
  }
1556
1551
  if columns is not None:
@@ -12,19 +12,19 @@ def _make_overview_query(id) -> Dict:
12
12
  return {
13
13
  "query": {"term": {"fmu.case.uuid.keyword": id}},
14
14
  "aggs": {
15
- "iteration_uuids": {
16
- "terms": {"field": "fmu.iteration.uuid.keyword", "size": 100}
15
+ "ensemble_uuids": {
16
+ "terms": {"field": "fmu.ensemble.uuid.keyword", "size": 100}
17
17
  },
18
- "iteration_names": {
19
- "terms": {"field": "fmu.iteration.name.keyword", "size": 100}
18
+ "ensemble_names": {
19
+ "terms": {"field": "fmu.ensemble.name.keyword", "size": 100}
20
20
  },
21
21
  "data_types": {"terms": {"field": "class.keyword", "size": 100}},
22
- "iterations": {
23
- "terms": {"field": "fmu.iteration.uuid.keyword", "size": 100},
22
+ "ensembles": {
23
+ "terms": {"field": "fmu.ensemble.uuid.keyword", "size": 100},
24
24
  "aggs": {
25
- "iteration_name": {
25
+ "ensemble_name": {
26
26
  "terms": {
27
- "field": "fmu.iteration.name.keyword",
27
+ "field": "fmu.ensemble.name.keyword",
28
28
  "size": 100,
29
29
  }
30
30
  },
@@ -49,7 +49,7 @@ class Case(Document, SearchContext):
49
49
  self, sumo, must=[{"term": {"fmu.case.uuid.keyword": self.uuid}}]
50
50
  )
51
51
  self._overview = None
52
- self._iterations = None
52
+ self._ensembles = None
53
53
 
54
54
  @property
55
55
  def overview(self) -> Dict:
@@ -63,27 +63,27 @@ class Case(Document, SearchContext):
63
63
  res = self._sumo.post("/search", json=query)
64
64
  data = res.json()
65
65
  aggs = data["aggregations"]
66
- iteration_names = extract_bucket_keys(aggs, "iteration_names")
67
- iteration_uuids = extract_bucket_keys(aggs, "iteration_uuids")
66
+ ensemble_names = extract_bucket_keys(aggs, "ensemble_names")
67
+ ensemble_uuids = extract_bucket_keys(aggs, "ensemble_uuids")
68
68
  data_types = extract_bucket_keys(aggs, "data_types")
69
- iterations = {}
70
- for bucket in aggs["iterations"]["buckets"]:
69
+ ensembles = {}
70
+ for bucket in aggs["ensembles"]["buckets"]:
71
71
  iterid = bucket["key"]
72
- itername = extract_bucket_keys(bucket, "iteration_name")
72
+ itername = extract_bucket_keys(bucket, "ensemble_name")
73
73
  minreal = bucket["minreal"]["value"]
74
74
  maxreal = bucket["maxreal"]["value"]
75
75
  numreal = bucket["numreal"]["value"]
76
- iterations[iterid] = {
76
+ ensembles[iterid] = {
77
77
  "name": itername,
78
78
  "minreal": minreal,
79
79
  "maxreal": maxreal,
80
80
  "numreal": numreal,
81
81
  }
82
82
  self._overview = {
83
- "iteration_names": iteration_names,
84
- "iteration_uuids": iteration_uuids,
83
+ "ensemble_names": ensemble_names,
84
+ "ensemble_uuids": ensemble_uuids,
85
85
  "data_types": data_types,
86
- "iterations": iterations,
86
+ "ensembles": ensembles,
87
87
  }
88
88
 
89
89
  return self._overview
@@ -61,7 +61,7 @@ class CPGrid(Child):
61
61
  """
62
62
  sc = SearchContext(self._sumo).grid_properties.filter(
63
63
  uuid=self.caseuuid,
64
- iteration=self.iteration,
64
+ ensemble=self.ensemble,
65
65
  realization=self.realization,
66
66
  )
67
67
  return sc.filter(
@@ -61,7 +61,7 @@ class CPGridProperty(Child):
61
61
  """
62
62
  sc = SearchContext(self._sumo).grids.filter(
63
63
  uuid=self.caseuuid,
64
- iteration=self.iteration,
64
+ ensemble=self.ensemble,
65
65
  realization=self.realization,
66
66
  )
67
67
  should = [
@@ -26,7 +26,7 @@ class Realization(Document, SearchContext):
26
26
  def __str__(self):
27
27
  return (
28
28
  f"<{self.__class__.__name__}: {self.realizationid} {self.uuid}(uuid) "
29
- f"in iteration {self.iterationname} "
29
+ f"in ensemble {self.ensemblename} "
30
30
  f"in case {self.casename} "
31
31
  f"in asset {self.asset}>"
32
32
  )
@@ -46,7 +46,7 @@ class Realization(Document, SearchContext):
46
46
 
47
47
  @property
48
48
  def user(self) -> str:
49
- """Name of user who uploaded iteration."""
49
+ """Name of user who uploaded ensemble."""
50
50
  return self.get_property("fmu.case.user.id")
51
51
 
52
52
  @property
@@ -60,14 +60,14 @@ class Realization(Document, SearchContext):
60
60
  return self.get_property("fmu.case.name")
61
61
 
62
62
  @property
63
- def iterationuuid(self) -> str:
64
- """FMU iteration uuid"""
65
- return self.get_property("fmu.iteration.uuid")
63
+ def ensembleuuid(self) -> str:
64
+ """FMU ensemble uuid"""
65
+ return self.get_property("fmu.ensemble.uuid")
66
66
 
67
67
  @property
68
- def iterationname(self) -> str:
69
- """FMU iteration name"""
70
- return self.get_property("fmu.iteration.name")
68
+ def ensemblename(self) -> str:
69
+ """FMU ensemble name"""
70
+ return self.get_property("fmu.ensemble.name")
71
71
 
72
72
  @property
73
73
  def realizationuuid(self) -> str:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fmu-sumo
3
- Version: 2.9.0
3
+ Version: 2.11.0
4
4
  Summary: Python package for interacting with Sumo in an FMU setting
5
5
  Author: Equinor
6
6
  License: Apache License
@@ -1,31 +1,31 @@
1
1
  fmu/__init__.py,sha256=ftS-xRPSH-vU7fIHlnZQaCTWbNvs4owJivNW65kzsIM,85
2
2
  fmu/sumo/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
3
  fmu/sumo/explorer/__init__.py,sha256=Bc1wd1lQO3HP3tsVyPbqaesf2boZwGdtookWp8lmG-k,317
4
- fmu/sumo/explorer/_version.py,sha256=24D27WSWcO2HaMUGCrVCG6Zbd76BrLDh2qQ1KbGX6Hc,704
4
+ fmu/sumo/explorer/_version.py,sha256=eqKbWb9LnxuZWE9-pafopBz45ugg0beSlKLIOIjeSzc,706
5
5
  fmu/sumo/explorer/cache.py,sha256=uvz8TciwBnDEwJIHa9wneC0WVWuzhUqyF3dzk4kvGNk,1037
6
6
  fmu/sumo/explorer/explorer.py,sha256=_3nUTO1E_nf6jqpivjgjKcX6rX1fx_mIG76YOM8xb-8,2931
7
- fmu/sumo/explorer/filters.py,sha256=_t2PmHeTY9XiBvQeEGM-BpudWUaxIfyUSdNyG70xfRU,875
7
+ fmu/sumo/explorer/filters.py,sha256=Es4JiSvHfCNiN5GXxfaBIBp-1BeFRgNzUeGOTXknK7s,874
8
8
  fmu/sumo/explorer/timefilter.py,sha256=AQHa18vkCz2BzH7X9GR1ypmNxfvI4gExh_jxAVYrDjc,6260
9
9
  fmu/sumo/explorer/objects/__init__.py,sha256=KoZ-Wo1YUIkWN1aGKu-xbQDkQlZQTP5oUwTRUyVoV9U,569
10
- fmu/sumo/explorer/objects/_child.py,sha256=7CJiBGfmtK7zNDUv6NLWphHMMtC8M386VyrGhuHq4dk,6222
10
+ fmu/sumo/explorer/objects/_child.py,sha256=gV4dtXSGqGSg5R1Xkh7el0SAsRzD-cdLvu8PtNYqi90,6072
11
11
  fmu/sumo/explorer/objects/_document.py,sha256=UR607n9N33vYaTSsYQoMmJUgnmS3To_uVyRSf7Vxulo,1797
12
12
  fmu/sumo/explorer/objects/_metrics.py,sha256=Z7iJ8qmvH3iY5dsSf6At_AFIzITyM0rDfum_oGmUFG8,9989
13
- fmu/sumo/explorer/objects/_search_context.py,sha256=CzypJ2cVcxiwN0yCrXLm2bEPNVbquc0dXxkYY4TQK54,65189
14
- fmu/sumo/explorer/objects/case.py,sha256=fKp7X43ETLE1RaH3rMYxZiIuduRmf0JSnJ5gRoUgNPE,3813
13
+ fmu/sumo/explorer/objects/_search_context.py,sha256=nqg41EnQpfyeIs6r66_gNwiUxEvCcgYAkYGUTJ7JFv4,65082
14
+ fmu/sumo/explorer/objects/case.py,sha256=9ptXE1XTkAGbw_R4Nh9KgCktoq2Ahu-YoLhc2wJAKOE,3790
15
15
  fmu/sumo/explorer/objects/cases.py,sha256=6Hj9ORj4Zta-C8Q9wpFYNsOqR8q-KCXrX-mlsc1hg0o,695
16
- fmu/sumo/explorer/objects/cpgrid.py,sha256=nuRgZ6FVEOPZT1ibd-rJhlbYYZ6BuUxXZPzovcH0kVc,2548
17
- fmu/sumo/explorer/objects/cpgrid_property.py,sha256=PqqR05oKKKiTTG0iDO9V6TADdHY7VUsLHjai6SqahVo,2694
16
+ fmu/sumo/explorer/objects/cpgrid.py,sha256=3dQBiKJCbjrwIc9-Fm3dcg_kCLPXst37NI5Sl_Hk1uQ,2546
17
+ fmu/sumo/explorer/objects/cpgrid_property.py,sha256=-URqq6I0UX4fvqi8LO2gQUF6zUoFCTvQBp_ukJR2Bdo,2692
18
18
  fmu/sumo/explorer/objects/cube.py,sha256=6pJLDajex-mblkt9YRZxtcK1XHcRZ8mlPPqJ-yDGEbA,1948
19
19
  fmu/sumo/explorer/objects/dictionary.py,sha256=9Nt8Br7H4TgXO6qc46HtV1vB40LsEQb6WjWYDT-Ve0g,1191
20
20
  fmu/sumo/explorer/objects/ensemble.py,sha256=MoGiXrtyVL8_cQt5vjh0rIA5bMMGRahPb284teQEqfs,2767
21
21
  fmu/sumo/explorer/objects/ensembles.py,sha256=ZTM74xMY8EjQjaSOgIcEMXhnJB7LDoqqdjIXXkmGZvQ,883
22
22
  fmu/sumo/explorer/objects/polygons.py,sha256=0N6sKTOGkYO6augIbBObzdovCAIF5VtA_XDzbWvd3YY,1523
23
- fmu/sumo/explorer/objects/realization.py,sha256=HK47WyX6kwe6ZoHaGHeTWEno86Wkh9THLOtEzOt1FGE,2483
23
+ fmu/sumo/explorer/objects/realization.py,sha256=1ZvPGjoCZ_xNEHJ5Lp6-TYLuq0UHG2IymHBo9BV6koI,2474
24
24
  fmu/sumo/explorer/objects/realizations.py,sha256=KIvr6gA-rDAUfcPmsLZQ7jN83-u3SQD0Jk2j9usH-So,883
25
25
  fmu/sumo/explorer/objects/surface.py,sha256=zHBtjLCIfkRHBv39OeJjA9lq3puLTfTII6TndZTtxVI,1627
26
26
  fmu/sumo/explorer/objects/table.py,sha256=vLor3YTddHkDWZSMyWPQsddFNQ2_VXE_O-stmPIWIaQ,4900
27
- fmu_sumo-2.9.0.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
28
- fmu_sumo-2.9.0.dist-info/METADATA,sha256=9A8Bav8cZU-sv8f2d_2Igh4V_PTtS8KNnRDkQjqb1oA,14781
29
- fmu_sumo-2.9.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
30
- fmu_sumo-2.9.0.dist-info/top_level.txt,sha256=Z-FIY3pxn0UK2Wxi9IJ7fKoLSraaxuNGi1eokiE0ShM,4
31
- fmu_sumo-2.9.0.dist-info/RECORD,,
27
+ fmu_sumo-2.11.0.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
28
+ fmu_sumo-2.11.0.dist-info/METADATA,sha256=X5xaqLFVtM5E_Wrt6hb6yovG1Ip-7evkSDJZDm5oZWI,14782
29
+ fmu_sumo-2.11.0.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
30
+ fmu_sumo-2.11.0.dist-info/top_level.txt,sha256=Z-FIY3pxn0UK2Wxi9IJ7fKoLSraaxuNGi1eokiE0ShM,4
31
+ fmu_sumo-2.11.0.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.9.0)
2
+ Generator: setuptools (80.10.2)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5