fmu-sumo 2.3.7__tar.gz → 2.3.8__tar.gz
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-2.3.7 → fmu_sumo-2.3.8}/.github/workflows/run_tests.yaml +0 -2
- {fmu_sumo-2.3.7 → fmu_sumo-2.3.8}/PKG-INFO +3 -2
- {fmu_sumo-2.3.7 → fmu_sumo-2.3.8}/src/fmu/sumo/explorer/_version.py +2 -2
- {fmu_sumo-2.3.7 → fmu_sumo-2.3.8}/src/fmu/sumo/explorer/explorer.py +6 -5
- {fmu_sumo-2.3.7 → fmu_sumo-2.3.8}/src/fmu/sumo/explorer/filters.py +5 -0
- fmu_sumo-2.3.8/src/fmu/sumo/explorer/objects/__init__.py +19 -0
- {fmu_sumo-2.3.7 → fmu_sumo-2.3.8}/src/fmu/sumo/explorer/objects/_child.py +5 -5
- {fmu_sumo-2.3.7 → fmu_sumo-2.3.8}/src/fmu/sumo/explorer/objects/_document.py +9 -1
- {fmu_sumo-2.3.7 → fmu_sumo-2.3.8}/src/fmu/sumo/explorer/objects/_search_context.py +199 -96
- {fmu_sumo-2.3.7 → fmu_sumo-2.3.8}/src/fmu/sumo/explorer/objects/case.py +4 -4
- {fmu_sumo-2.3.7 → fmu_sumo-2.3.8}/src/fmu/sumo/explorer/objects/cases.py +1 -1
- {fmu_sumo-2.3.7 → fmu_sumo-2.3.8}/src/fmu/sumo/explorer/objects/cpgrid.py +4 -4
- {fmu_sumo-2.3.7 → fmu_sumo-2.3.8}/src/fmu/sumo/explorer/objects/cpgrid_property.py +2 -2
- fmu_sumo-2.3.8/src/fmu/sumo/explorer/objects/cube.py +69 -0
- {fmu_sumo-2.3.7 → fmu_sumo-2.3.8}/src/fmu/sumo/explorer/objects/dictionary.py +17 -9
- {fmu_sumo-2.3.7 → fmu_sumo-2.3.8}/src/fmu/sumo/explorer/objects/iteration.py +17 -4
- {fmu_sumo-2.3.7 → fmu_sumo-2.3.8}/src/fmu/sumo/explorer/objects/iterations.py +4 -6
- {fmu_sumo-2.3.7 → fmu_sumo-2.3.8}/src/fmu/sumo/explorer/objects/polygons.py +1 -1
- {fmu_sumo-2.3.7 → fmu_sumo-2.3.8}/src/fmu/sumo/explorer/objects/realization.py +27 -4
- {fmu_sumo-2.3.7 → fmu_sumo-2.3.8}/src/fmu/sumo/explorer/objects/realizations.py +4 -6
- {fmu_sumo-2.3.7 → fmu_sumo-2.3.8}/src/fmu/sumo/explorer/objects/surface.py +1 -1
- {fmu_sumo-2.3.7 → fmu_sumo-2.3.8}/src/fmu/sumo/explorer/objects/table.py +1 -1
- {fmu_sumo-2.3.7 → fmu_sumo-2.3.8}/src/fmu/sumo/explorer/timefilter.py +3 -2
- {fmu_sumo-2.3.7 → fmu_sumo-2.3.8}/src/fmu_sumo.egg-info/PKG-INFO +3 -2
- {fmu_sumo-2.3.7 → fmu_sumo-2.3.8}/src/fmu_sumo.egg-info/SOURCES.txt +1 -16
- {fmu_sumo-2.3.7 → fmu_sumo-2.3.8}/tests/test_explorer.py +1 -1
- fmu_sumo-2.3.7/.github/workflows/run_tests_access_drogon_affiliate_login.yaml +0 -49
- fmu_sumo-2.3.7/.github/workflows/run_tests_access_drogon_manage_login.yaml +0 -49
- fmu_sumo-2.3.7/.github/workflows/run_tests_access_drogon_manage_sharedkey.yaml +0 -45
- fmu_sumo-2.3.7/.github/workflows/run_tests_access_drogon_read_login.yaml +0 -49
- fmu_sumo-2.3.7/.github/workflows/run_tests_access_drogon_read_sharedkey.yaml +0 -45
- fmu_sumo-2.3.7/.github/workflows/run_tests_access_drogon_write_login.yaml +0 -49
- fmu_sumo-2.3.7/.github/workflows/run_tests_access_drogon_write_sharedkey.yaml +0 -45
- fmu_sumo-2.3.7/.github/workflows/run_tests_access_no_access_login.yaml +0 -49
- fmu_sumo-2.3.7/src/fmu/sumo/explorer/objects/__init__.py +0 -18
- fmu_sumo-2.3.7/src/fmu/sumo/explorer/objects/cube.py +0 -115
- fmu_sumo-2.3.7/tests/data/test_case_080/case2.json +0 -64
- fmu_sumo-2.3.7/tests/test_access/README.md +0 -114
- fmu_sumo-2.3.7/tests/test_access/tst_access_drogon_affiliate_login.py +0 -310
- fmu_sumo-2.3.7/tests/test_access/tst_access_drogon_manage_login.py +0 -217
- fmu_sumo-2.3.7/tests/test_access/tst_access_drogon_read_login.py +0 -244
- fmu_sumo-2.3.7/tests/test_access/tst_access_drogon_write_login.py +0 -217
- fmu_sumo-2.3.7/tests/test_access/tst_access_no_access_login.py +0 -210
- {fmu_sumo-2.3.7 → fmu_sumo-2.3.8}/.github/pull_request_template.md +0 -0
- {fmu_sumo-2.3.7 → fmu_sumo-2.3.8}/.github/workflows/build_docs.yaml +0 -0
- {fmu_sumo-2.3.7 → fmu_sumo-2.3.8}/.github/workflows/check_formatting.yml +0 -0
- {fmu_sumo-2.3.7 → fmu_sumo-2.3.8}/.github/workflows/publish_release.yaml +0 -0
- {fmu_sumo-2.3.7 → fmu_sumo-2.3.8}/.gitignore +0 -0
- {fmu_sumo-2.3.7 → fmu_sumo-2.3.8}/.pre-commit-config.yaml +0 -0
- {fmu_sumo-2.3.7 → fmu_sumo-2.3.8}/.readthedocs.yml +0 -0
- {fmu_sumo-2.3.7 → fmu_sumo-2.3.8}/CONTRIBUTING.md +0 -0
- {fmu_sumo-2.3.7 → fmu_sumo-2.3.8}/LICENSE +0 -0
- {fmu_sumo-2.3.7 → fmu_sumo-2.3.8}/README.md +0 -0
- {fmu_sumo-2.3.7 → fmu_sumo-2.3.8}/SECURITY.md +0 -0
- {fmu_sumo-2.3.7 → fmu_sumo-2.3.8}/docs/_static/equinor-logo.png +0 -0
- {fmu_sumo-2.3.7 → fmu_sumo-2.3.8}/docs/_static/equinor-logo2.jpg +0 -0
- {fmu_sumo-2.3.7 → fmu_sumo-2.3.8}/docs/_static/equinor_logo.jpg +0 -0
- {fmu_sumo-2.3.7 → fmu_sumo-2.3.8}/docs/_static/equinor_logo_only.jpg +0 -0
- {fmu_sumo-2.3.7 → fmu_sumo-2.3.8}/docs/_templates/layout.html +0 -0
- {fmu_sumo-2.3.7 → fmu_sumo-2.3.8}/docs/conf.py +0 -0
- {fmu_sumo-2.3.7 → fmu_sumo-2.3.8}/docs/explorer.rst +0 -0
- {fmu_sumo-2.3.7 → fmu_sumo-2.3.8}/docs/index.rst +0 -0
- {fmu_sumo-2.3.7 → fmu_sumo-2.3.8}/examples/explorer.ipynb +0 -0
- {fmu_sumo-2.3.7 → fmu_sumo-2.3.8}/examples/explorer2.ipynb +0 -0
- {fmu_sumo-2.3.7 → fmu_sumo-2.3.8}/examples/grids-and-properties.ipynb +0 -0
- {fmu_sumo-2.3.7 → fmu_sumo-2.3.8}/examples/metrics.ipynb +0 -0
- {fmu_sumo-2.3.7 → fmu_sumo-2.3.8}/examples/table-aggregation.ipynb +0 -0
- {fmu_sumo-2.3.7 → fmu_sumo-2.3.8}/examples/tables.ipynb +0 -0
- {fmu_sumo-2.3.7 → fmu_sumo-2.3.8}/pyproject.toml +0 -0
- {fmu_sumo-2.3.7 → fmu_sumo-2.3.8}/setup.cfg +0 -0
- {fmu_sumo-2.3.7 → fmu_sumo-2.3.8}/src/fmu/__init__.py +0 -0
- {fmu_sumo-2.3.7 → fmu_sumo-2.3.8}/src/fmu/sumo/__init__.py +0 -0
- {fmu_sumo-2.3.7 → fmu_sumo-2.3.8}/src/fmu/sumo/explorer/__init__.py +0 -0
- {fmu_sumo-2.3.7 → fmu_sumo-2.3.8}/src/fmu/sumo/explorer/cache.py +0 -0
- {fmu_sumo-2.3.7 → fmu_sumo-2.3.8}/src/fmu/sumo/explorer/objects/_metrics.py +0 -0
- {fmu_sumo-2.3.7 → fmu_sumo-2.3.8}/src/fmu/sumo/explorer/objects/table_aggregated.py +0 -0
- {fmu_sumo-2.3.7 → fmu_sumo-2.3.8}/src/fmu_sumo.egg-info/dependency_links.txt +0 -0
- {fmu_sumo-2.3.7 → fmu_sumo-2.3.8}/src/fmu_sumo.egg-info/requires.txt +0 -0
- {fmu_sumo-2.3.7 → fmu_sumo-2.3.8}/src/fmu_sumo.egg-info/top_level.txt +0 -0
- {fmu_sumo-2.3.7 → fmu_sumo-2.3.8}/tests/conftest.py +0 -0
- {fmu_sumo-2.3.7 → fmu_sumo-2.3.8}/tests/context.py +0 -0
- {fmu_sumo-2.3.7 → fmu_sumo-2.3.8}/tests/test_objects_table.py +0 -0
|
@@ -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.8
|
|
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
|
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"""Module containing class for exploring results from sumo"""
|
|
2
2
|
|
|
3
3
|
import warnings
|
|
4
|
+
from typing import Optional
|
|
4
5
|
|
|
5
6
|
import httpx
|
|
6
7
|
from sumo.wrapper import SumoClient
|
|
7
8
|
|
|
8
|
-
from
|
|
9
|
+
from .objects._search_context import SearchContext
|
|
9
10
|
|
|
10
11
|
|
|
11
12
|
class Explorer(SearchContext):
|
|
@@ -25,9 +26,9 @@ class Explorer(SearchContext):
|
|
|
25
26
|
def __init__(
|
|
26
27
|
self,
|
|
27
28
|
env: str = "prod",
|
|
28
|
-
token: str = None,
|
|
29
|
+
token: Optional[str] = None,
|
|
29
30
|
interactive: bool = True,
|
|
30
|
-
keep_alive: str = None,
|
|
31
|
+
keep_alive: Optional[str] = None,
|
|
31
32
|
http_client=None,
|
|
32
33
|
async_http_client=None,
|
|
33
34
|
):
|
|
@@ -58,7 +59,7 @@ class Explorer(SearchContext):
|
|
|
58
59
|
def cases(self):
|
|
59
60
|
return self._context_for_class("case")
|
|
60
61
|
|
|
61
|
-
def get_permissions(self, asset: str = None):
|
|
62
|
+
def get_permissions(self, asset: Optional[str] = None):
|
|
62
63
|
"""Get permissions
|
|
63
64
|
|
|
64
65
|
Args:
|
|
@@ -74,7 +75,7 @@ class Explorer(SearchContext):
|
|
|
74
75
|
|
|
75
76
|
return res
|
|
76
77
|
|
|
77
|
-
async def get_permissions_async(self, asset: str = None):
|
|
78
|
+
async def get_permissions_async(self, asset: Optional[str] = None):
|
|
78
79
|
"""Get permissions
|
|
79
80
|
|
|
80
81
|
Args:
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"""Sumo cases and child objects"""
|
|
2
|
+
|
|
3
|
+
from ._child import Child
|
|
4
|
+
from ._document import Document
|
|
5
|
+
from ._metrics import Metrics
|
|
6
|
+
from ._search_context import SearchContext
|
|
7
|
+
from .case import Case
|
|
8
|
+
from .cases import Cases
|
|
9
|
+
from .cpgrid import CPGrid
|
|
10
|
+
from .cpgrid_property import CPGridProperty
|
|
11
|
+
from .cube import Cube
|
|
12
|
+
from .dictionary import Dictionary
|
|
13
|
+
from .iteration import Iteration
|
|
14
|
+
from .iterations import Iterations
|
|
15
|
+
from .polygons import Polygons
|
|
16
|
+
from .realization import Realization
|
|
17
|
+
from .realizations import Realizations
|
|
18
|
+
from .surface import Surface
|
|
19
|
+
from .table import Table
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"""module containing class for child object"""
|
|
2
2
|
|
|
3
3
|
from io import BytesIO
|
|
4
|
-
from typing import Dict, List
|
|
4
|
+
from typing import Dict, List, Tuple, Union
|
|
5
5
|
|
|
6
6
|
from sumo.wrapper import SumoClient
|
|
7
7
|
|
|
8
|
-
from
|
|
8
|
+
from ._document import Document
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
class Child(Document):
|
|
@@ -40,7 +40,7 @@ class Child(Document):
|
|
|
40
40
|
return self._blob
|
|
41
41
|
|
|
42
42
|
@property
|
|
43
|
-
def timestamp(self) -> str:
|
|
43
|
+
def timestamp(self) -> Union[str, None]:
|
|
44
44
|
"""Object timestmap data"""
|
|
45
45
|
t0 = self._get_property(["data", "time", "t0", "value"])
|
|
46
46
|
t1 = self._get_property(["data", "time", "t1", "value"])
|
|
@@ -51,7 +51,7 @@ class Child(Document):
|
|
|
51
51
|
return None
|
|
52
52
|
|
|
53
53
|
@property
|
|
54
|
-
def interval(self) -> str:
|
|
54
|
+
def interval(self) -> Union[str, Tuple[str, str], None]:
|
|
55
55
|
"""Object interval data"""
|
|
56
56
|
t0 = self._get_property(["data", "time", "t0", "value"])
|
|
57
57
|
t1 = self._get_property(["data", "time", "t1", "value"])
|
|
@@ -62,7 +62,7 @@ class Child(Document):
|
|
|
62
62
|
return None
|
|
63
63
|
|
|
64
64
|
@property
|
|
65
|
-
def template_path(self):
|
|
65
|
+
def template_path(self) -> str:
|
|
66
66
|
return "/".join(
|
|
67
67
|
["{realization}", "{iteration}"]
|
|
68
68
|
+ self.relative_path.split("/")[2:]
|
|
@@ -40,7 +40,11 @@ class Document:
|
|
|
40
40
|
curr = self._metadata
|
|
41
41
|
|
|
42
42
|
for key in path:
|
|
43
|
-
if (
|
|
43
|
+
if (
|
|
44
|
+
isinstance(curr, list)
|
|
45
|
+
and isinstance(key, int)
|
|
46
|
+
and key < len(curr)
|
|
47
|
+
) or key in curr:
|
|
44
48
|
curr = curr[key]
|
|
45
49
|
else:
|
|
46
50
|
return None
|
|
@@ -52,3 +56,7 @@ class Document:
|
|
|
52
56
|
|
|
53
57
|
def __getitem__(self, key: str):
|
|
54
58
|
return self._metadata[key]
|
|
59
|
+
|
|
60
|
+
@property
|
|
61
|
+
def template_path(self) -> str:
|
|
62
|
+
return ""
|