fmu-sumo 2.3.7__py3-none-any.whl → 2.3.9__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.
- fmu/sumo/explorer/_version.py +2 -2
- fmu/sumo/explorer/explorer.py +9 -6
- fmu/sumo/explorer/filters.py +5 -0
- fmu/sumo/explorer/objects/__init__.py +19 -16
- fmu/sumo/explorer/objects/_child.py +42 -5
- fmu/sumo/explorer/objects/_document.py +27 -1
- fmu/sumo/explorer/objects/_search_context.py +385 -105
- fmu/sumo/explorer/objects/case.py +4 -4
- fmu/sumo/explorer/objects/cases.py +6 -4
- fmu/sumo/explorer/objects/cpgrid.py +4 -4
- fmu/sumo/explorer/objects/cpgrid_property.py +2 -2
- fmu/sumo/explorer/objects/cube.py +24 -70
- fmu/sumo/explorer/objects/dictionary.py +17 -9
- fmu/sumo/explorer/objects/ensemble.py +76 -0
- fmu/sumo/explorer/objects/ensembles.py +81 -0
- fmu/sumo/explorer/objects/iteration.py +29 -4
- fmu/sumo/explorer/objects/iterations.py +17 -8
- fmu/sumo/explorer/objects/polygons.py +1 -1
- fmu/sumo/explorer/objects/realization.py +30 -4
- fmu/sumo/explorer/objects/realizations.py +9 -8
- fmu/sumo/explorer/objects/surface.py +1 -1
- fmu/sumo/explorer/objects/table.py +1 -1
- fmu/sumo/explorer/timefilter.py +3 -2
- {fmu_sumo-2.3.7.dist-info → fmu_sumo-2.3.9.dist-info}/METADATA +3 -2
- fmu_sumo-2.3.9.dist-info/RECORD +33 -0
- {fmu_sumo-2.3.7.dist-info → fmu_sumo-2.3.9.dist-info}/WHEEL +1 -1
- fmu/sumo/explorer/objects/table_aggregated.py +0 -123
- fmu_sumo-2.3.7.dist-info/RECORD +0 -32
- {fmu_sumo-2.3.7.dist-info → fmu_sumo-2.3.9.dist-info/licenses}/LICENSE +0 -0
- {fmu_sumo-2.3.7.dist-info → fmu_sumo-2.3.9.dist-info}/top_level.txt +0 -0
fmu/sumo/explorer/timefilter.py
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"""Module with classes handling time filtering"""
|
|
2
2
|
|
|
3
3
|
from enum import Enum
|
|
4
|
+
from typing import Optional
|
|
4
5
|
|
|
5
6
|
|
|
6
7
|
class TimeType(Enum):
|
|
@@ -24,8 +25,8 @@ class TimeFilter:
|
|
|
24
25
|
def __init__(
|
|
25
26
|
self,
|
|
26
27
|
time_type: TimeType,
|
|
27
|
-
start: str = None,
|
|
28
|
-
end: str = None,
|
|
28
|
+
start: Optional[str] = None,
|
|
29
|
+
end: Optional[str] = None,
|
|
29
30
|
overlap: bool = False,
|
|
30
31
|
exact: bool = False,
|
|
31
32
|
) -> None:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: fmu-sumo
|
|
3
|
-
Version: 2.3.
|
|
3
|
+
Version: 2.3.9
|
|
4
4
|
Summary: Python package for interacting with Sumo in an FMU setting
|
|
5
5
|
Author: Equinor
|
|
6
6
|
License: Apache License
|
|
@@ -235,6 +235,7 @@ Requires-Dist: sphinx-rtd-theme; extra == "docs"
|
|
|
235
235
|
Requires-Dist: autoapi; extra == "docs"
|
|
236
236
|
Requires-Dist: sphinx-autodoc-typehints; extra == "docs"
|
|
237
237
|
Requires-Dist: sphinxcontrib-apidoc; extra == "docs"
|
|
238
|
+
Dynamic: license-file
|
|
238
239
|
|
|
239
240
|
# fmu-sumo
|
|
240
241
|
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
fmu/__init__.py,sha256=ftS-xRPSH-vU7fIHlnZQaCTWbNvs4owJivNW65kzsIM,85
|
|
2
|
+
fmu/sumo/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
|
+
fmu/sumo/explorer/__init__.py,sha256=Bc1wd1lQO3HP3tsVyPbqaesf2boZwGdtookWp8lmG-k,317
|
|
4
|
+
fmu/sumo/explorer/_version.py,sha256=xD7sq7tXCC-QKVs2SPi2bsTgQhH6dVLkP6dvZaxMKcA,511
|
|
5
|
+
fmu/sumo/explorer/cache.py,sha256=uvz8TciwBnDEwJIHa9wneC0WVWuzhUqyF3dzk4kvGNk,1037
|
|
6
|
+
fmu/sumo/explorer/explorer.py,sha256=_3nUTO1E_nf6jqpivjgjKcX6rX1fx_mIG76YOM8xb-8,2931
|
|
7
|
+
fmu/sumo/explorer/filters.py,sha256=_t2PmHeTY9XiBvQeEGM-BpudWUaxIfyUSdNyG70xfRU,875
|
|
8
|
+
fmu/sumo/explorer/timefilter.py,sha256=AQHa18vkCz2BzH7X9GR1ypmNxfvI4gExh_jxAVYrDjc,6260
|
|
9
|
+
fmu/sumo/explorer/objects/__init__.py,sha256=72G0yfWWMTXA-oZw5GMRkrWvQqAYfadjerEwsyndCzc,637
|
|
10
|
+
fmu/sumo/explorer/objects/_child.py,sha256=Cq2jmjRjJDjh0hwy_lKWhPdvkuoMqx6UoHFIcmAJ7OA,5905
|
|
11
|
+
fmu/sumo/explorer/objects/_document.py,sha256=uPAkNzcOk8U4LCtXthWkm7kfU9W4HYHrrqV9HERDhe8,1835
|
|
12
|
+
fmu/sumo/explorer/objects/_metrics.py,sha256=q6CSeCjiN1SjNx4G32Lod7Slnflsu3aoJIpwm_VMIhQ,3954
|
|
13
|
+
fmu/sumo/explorer/objects/_search_context.py,sha256=qCejfIAnLNgGHhqvkhKK8T1JlK9GhV3rMqHpZXGz5z4,62554
|
|
14
|
+
fmu/sumo/explorer/objects/case.py,sha256=fKp7X43ETLE1RaH3rMYxZiIuduRmf0JSnJ5gRoUgNPE,3813
|
|
15
|
+
fmu/sumo/explorer/objects/cases.py,sha256=dxf3mEfx7mkgUyJaStbF2mWEwqEicfGvoi1MjD_t0As,658
|
|
16
|
+
fmu/sumo/explorer/objects/cpgrid.py,sha256=nuRgZ6FVEOPZT1ibd-rJhlbYYZ6BuUxXZPzovcH0kVc,2548
|
|
17
|
+
fmu/sumo/explorer/objects/cpgrid_property.py,sha256=PqqR05oKKKiTTG0iDO9V6TADdHY7VUsLHjai6SqahVo,2694
|
|
18
|
+
fmu/sumo/explorer/objects/cube.py,sha256=6pJLDajex-mblkt9YRZxtcK1XHcRZ8mlPPqJ-yDGEbA,1948
|
|
19
|
+
fmu/sumo/explorer/objects/dictionary.py,sha256=9Nt8Br7H4TgXO6qc46HtV1vB40LsEQb6WjWYDT-Ve0g,1191
|
|
20
|
+
fmu/sumo/explorer/objects/ensemble.py,sha256=PqHUKMxIyT8pMVtPjvgUNS5P3gTeDYI52CqFGB56HUA,2009
|
|
21
|
+
fmu/sumo/explorer/objects/ensembles.py,sha256=CKQ7i9LugXRC8nmmvj9WbbfwlNeixbsphi1oDGTtyPk,2230
|
|
22
|
+
fmu/sumo/explorer/objects/iteration.py,sha256=ASZXjsxASEoVgbS-ZNpBNm3qKr1pPG0v7CAlFyiYOk4,2024
|
|
23
|
+
fmu/sumo/explorer/objects/iterations.py,sha256=AdqNaJztbDiSYm4aL6Jrp0K8Pnmg_-tEz8Kw0RocRVY,1841
|
|
24
|
+
fmu/sumo/explorer/objects/polygons.py,sha256=k5BKuXHsLxzhMR5KId6Fly4FNygTOcShFCCMXvhjWg4,1187
|
|
25
|
+
fmu/sumo/explorer/objects/realization.py,sha256=Th3zr_nT2I1HYHkBojOAKnf_RSIPc-TiDtW0X39eMRw,2259
|
|
26
|
+
fmu/sumo/explorer/objects/realizations.py,sha256=t_4ACL-whAhaglIfh0m8vOsbluWSYO5I9bg0rt9erb0,1679
|
|
27
|
+
fmu/sumo/explorer/objects/surface.py,sha256=zHBtjLCIfkRHBv39OeJjA9lq3puLTfTII6TndZTtxVI,1627
|
|
28
|
+
fmu/sumo/explorer/objects/table.py,sha256=vLor3YTddHkDWZSMyWPQsddFNQ2_VXE_O-stmPIWIaQ,4900
|
|
29
|
+
fmu_sumo-2.3.9.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
30
|
+
fmu_sumo-2.3.9.dist-info/METADATA,sha256=4jJRAWxT1gJVIwUvZ60Cu633KU98N-I56Axtn6_zZdU,14780
|
|
31
|
+
fmu_sumo-2.3.9.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
|
32
|
+
fmu_sumo-2.3.9.dist-info/top_level.txt,sha256=Z-FIY3pxn0UK2Wxi9IJ7fKoLSraaxuNGi1eokiE0ShM,4
|
|
33
|
+
fmu_sumo-2.3.9.dist-info/RECORD,,
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
"""module containing class for table"""
|
|
2
|
-
|
|
3
|
-
from fmu.sumo.explorer._utils import Utils
|
|
4
|
-
from fmu.sumo.explorer.objects.case import Case
|
|
5
|
-
from fmu.sumo.explorer.objects.table import Table
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
class AggregatedTable:
|
|
9
|
-
"""Class for representing an aggregated table in Sumo"""
|
|
10
|
-
|
|
11
|
-
def __init__(
|
|
12
|
-
self,
|
|
13
|
-
case: Case,
|
|
14
|
-
name: str,
|
|
15
|
-
tag: str,
|
|
16
|
-
iteration: str,
|
|
17
|
-
aggregation: str = "collection",
|
|
18
|
-
) -> None:
|
|
19
|
-
"""Init of aggregated table
|
|
20
|
-
|
|
21
|
-
Args:
|
|
22
|
-
case (Sumo.Case): given case object
|
|
23
|
-
name (str): name of table
|
|
24
|
-
tag (str): name of tag
|
|
25
|
-
iteration (str): name of interation
|
|
26
|
-
aggregation (str, optional): aggregation type
|
|
27
|
-
"""
|
|
28
|
-
self._sumo = case._sumo
|
|
29
|
-
self._utils = Utils(self._sumo)
|
|
30
|
-
self._case = case
|
|
31
|
-
self._name = name
|
|
32
|
-
self._tag = tag
|
|
33
|
-
self._iteration = iteration
|
|
34
|
-
self._aggregation = aggregation
|
|
35
|
-
self._parameters = None
|
|
36
|
-
self._collection = case.tables.filter(
|
|
37
|
-
name=name,
|
|
38
|
-
tagname=tag,
|
|
39
|
-
iteration=iteration,
|
|
40
|
-
aggregation=aggregation,
|
|
41
|
-
)
|
|
42
|
-
|
|
43
|
-
@property
|
|
44
|
-
def columns(self):
|
|
45
|
-
"""Return column names
|
|
46
|
-
|
|
47
|
-
Returns:
|
|
48
|
-
list: the column names available
|
|
49
|
-
"""
|
|
50
|
-
return self._collection.columns
|
|
51
|
-
|
|
52
|
-
@property
|
|
53
|
-
def parameters(self):
|
|
54
|
-
"""Return parameter set for iteration
|
|
55
|
-
|
|
56
|
-
Returns:
|
|
57
|
-
dict: parameters connected to iteration
|
|
58
|
-
"""
|
|
59
|
-
if not self._parameters:
|
|
60
|
-
must = self._utils.build_terms(
|
|
61
|
-
{
|
|
62
|
-
"class.keyword": "table",
|
|
63
|
-
"_sumo.parent_object.keyword": self._case.uuid,
|
|
64
|
-
"data.name.keyword": self._name,
|
|
65
|
-
"data.tagname.keyword": self._tag,
|
|
66
|
-
"fmu.iteration.name.keyword": self._iteration,
|
|
67
|
-
"fmu.aggregation.operation.keyword": "collection",
|
|
68
|
-
}
|
|
69
|
-
)
|
|
70
|
-
|
|
71
|
-
query = {
|
|
72
|
-
"size": 1,
|
|
73
|
-
"_source": ["fmu.iteration.parameters"],
|
|
74
|
-
"query": {"bool": {"must": must}},
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
res = self._sumo.post("/search", json=query)
|
|
78
|
-
doc = res.json()["hits"]["hits"][0]
|
|
79
|
-
self._parameters = doc["_source"]["fmu"]["iteration"]["parameters"]
|
|
80
|
-
|
|
81
|
-
return self._parameters
|
|
82
|
-
|
|
83
|
-
@property
|
|
84
|
-
async def parameters_async(self):
|
|
85
|
-
"""Return parameter set for iteration
|
|
86
|
-
|
|
87
|
-
Returns:
|
|
88
|
-
dict: parameters connected to iteration
|
|
89
|
-
"""
|
|
90
|
-
if not self._parameters:
|
|
91
|
-
must = self._utils.build_terms(
|
|
92
|
-
{
|
|
93
|
-
"class.keyword": "table",
|
|
94
|
-
"_sumo.parent_object.keyword": self._case.uuid,
|
|
95
|
-
"data.name.keyword": self._name,
|
|
96
|
-
"data.tagname.keyword": self._tag,
|
|
97
|
-
"fmu.iteration.name.keyword": self._iteration,
|
|
98
|
-
"fmu.aggregation.operation.keyword": "collection",
|
|
99
|
-
}
|
|
100
|
-
)
|
|
101
|
-
|
|
102
|
-
query = {
|
|
103
|
-
"size": 1,
|
|
104
|
-
"_source": ["fmu.iteration.parameters"],
|
|
105
|
-
"query": {"bool": {"must": must}},
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
res = await self._sumo.post_async("/search", json=query)
|
|
109
|
-
doc = res.json()["hits"]["hits"][0]
|
|
110
|
-
self._parameters = doc["_source"]["fmu"]["iteration"]["parameters"]
|
|
111
|
-
|
|
112
|
-
return self._parameters
|
|
113
|
-
|
|
114
|
-
def __len__(self):
|
|
115
|
-
return len(self._collection)
|
|
116
|
-
|
|
117
|
-
def __getitem__(self, column) -> Table:
|
|
118
|
-
try:
|
|
119
|
-
return self._collection.filter(column=column)[0]
|
|
120
|
-
except IndexError as i_ex:
|
|
121
|
-
raise IndexError(
|
|
122
|
-
f"Column: '{column}' does not exist, try again"
|
|
123
|
-
) from i_ex
|
fmu_sumo-2.3.7.dist-info/RECORD
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
fmu/__init__.py,sha256=ftS-xRPSH-vU7fIHlnZQaCTWbNvs4owJivNW65kzsIM,85
|
|
2
|
-
fmu/sumo/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
|
-
fmu/sumo/explorer/__init__.py,sha256=Bc1wd1lQO3HP3tsVyPbqaesf2boZwGdtookWp8lmG-k,317
|
|
4
|
-
fmu/sumo/explorer/_version.py,sha256=UANYi9NwDKsEL0-DdBqhuR1fJMtRtyyEntWN_jeSZpo,511
|
|
5
|
-
fmu/sumo/explorer/cache.py,sha256=uvz8TciwBnDEwJIHa9wneC0WVWuzhUqyF3dzk4kvGNk,1037
|
|
6
|
-
fmu/sumo/explorer/explorer.py,sha256=0dSUGG2-4yOYGXRWC5Ubrdjd-hIEEgRxJlMvvIAYom0,2806
|
|
7
|
-
fmu/sumo/explorer/filters.py,sha256=NVTWbjL-dIHQZeWcR3Orgx6f0WHPpThSPxmxZo5tvfM,812
|
|
8
|
-
fmu/sumo/explorer/timefilter.py,sha256=GetbPm0VYVSts_G7F2BA2nvgvvKzWE26ZjhqRc1avIE,6212
|
|
9
|
-
fmu/sumo/explorer/objects/__init__.py,sha256=2XqF0abZI1T7I_Fjlhvs4_vjwid_3HUsqdxmA6nNcLo,941
|
|
10
|
-
fmu/sumo/explorer/objects/_child.py,sha256=ase6ZypK2KB-Zv6skHRFodkLC3vfm9x8EFgJfhsblLE,4477
|
|
11
|
-
fmu/sumo/explorer/objects/_document.py,sha256=JMhlCr1XlXi1lE1-44WhISTNHiDw9gYGOTl0LUboQKo,1249
|
|
12
|
-
fmu/sumo/explorer/objects/_metrics.py,sha256=q6CSeCjiN1SjNx4G32Lod7Slnflsu3aoJIpwm_VMIhQ,3954
|
|
13
|
-
fmu/sumo/explorer/objects/_search_context.py,sha256=crBRcIi8OocalZtLBJVrRXQvPeqlXS-VJlxTP6NftLc,52761
|
|
14
|
-
fmu/sumo/explorer/objects/case.py,sha256=D4MGn5lKNMdmaBvTJRYXu9xlGEOpuiMlZR_tsNs4AJU,3847
|
|
15
|
-
fmu/sumo/explorer/objects/cases.py,sha256=L2LQieRTCJeNXRvXceHz9088nRO9gvKuRpsNpLI7Gnw,552
|
|
16
|
-
fmu/sumo/explorer/objects/cpgrid.py,sha256=Va1M_rgHYdQfPFKFJvfDQhRcSZ_PnniCSI6uweaG3_s,2550
|
|
17
|
-
fmu/sumo/explorer/objects/cpgrid_property.py,sha256=DxiFn6QrQCjXbDrxuxPi95b9pvkGI6nxxd0VoFn3e6k,2744
|
|
18
|
-
fmu/sumo/explorer/objects/cube.py,sha256=UEFFx_qfS7o0cWNwVPxdO3Fee8Pst9J0GN1j6cXRd_o,3189
|
|
19
|
-
fmu/sumo/explorer/objects/dictionary.py,sha256=56ol3ohxVwuesYsrULBE1a4pXXqcUnMWi41EX6_Zn-s,918
|
|
20
|
-
fmu/sumo/explorer/objects/iteration.py,sha256=iSQiQ2Epa98ZrySu47GMtJh2dsPnJVo9JqwSlEMRml4,1380
|
|
21
|
-
fmu/sumo/explorer/objects/iterations.py,sha256=_d6fRmtVziy0qj-MucG_nPNTn6ffsTcIFGF0H2NqbTw,1606
|
|
22
|
-
fmu/sumo/explorer/objects/polygons.py,sha256=z4maL5WI3cdFol3WlTYxhUJzMLkskfb_8Lz7QD4uqIY,1212
|
|
23
|
-
fmu/sumo/explorer/objects/realization.py,sha256=s5uSHCt9yoghhJByYIJp8KuWnoO6LPF2f0AkzRME8XI,1535
|
|
24
|
-
fmu/sumo/explorer/objects/realizations.py,sha256=QnmrswpV34-AM05M6DP4BrD0vS3QKzPYaaCb18eeOEk,1616
|
|
25
|
-
fmu/sumo/explorer/objects/surface.py,sha256=8SVYvCtpKISGd3gY_jIkTgTd_yTWIU8xiW9lcyTiMKU,1652
|
|
26
|
-
fmu/sumo/explorer/objects/table.py,sha256=fRit1cWfCLqwZwLHK26D-qFT64uCYVjlVhDyXHWhO40,4925
|
|
27
|
-
fmu/sumo/explorer/objects/table_aggregated.py,sha256=vq2EcR36JTcQsyCeyiMgigJMDFDQfVrlTZe2LdXrDFo,3794
|
|
28
|
-
fmu_sumo-2.3.7.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
29
|
-
fmu_sumo-2.3.7.dist-info/METADATA,sha256=NxqmqErKTChOD3d94hXftwIfZ1GpFmXrPXQQyzv1nP4,14758
|
|
30
|
-
fmu_sumo-2.3.7.dist-info/WHEEL,sha256=beeZ86-EfXScwlR_HKu4SllMC9wUEj_8Z_4FJ3egI2w,91
|
|
31
|
-
fmu_sumo-2.3.7.dist-info/top_level.txt,sha256=Z-FIY3pxn0UK2Wxi9IJ7fKoLSraaxuNGi1eokiE0ShM,4
|
|
32
|
-
fmu_sumo-2.3.7.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|