fmu-sumo 2.3.6__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.
Files changed (82) hide show
  1. {fmu_sumo-2.3.6 → fmu_sumo-2.3.8}/.github/workflows/run_tests.yaml +0 -2
  2. {fmu_sumo-2.3.6 → fmu_sumo-2.3.8}/PKG-INFO +3 -2
  3. {fmu_sumo-2.3.6 → fmu_sumo-2.3.8}/src/fmu/sumo/explorer/_version.py +2 -2
  4. {fmu_sumo-2.3.6 → fmu_sumo-2.3.8}/src/fmu/sumo/explorer/explorer.py +6 -5
  5. {fmu_sumo-2.3.6 → fmu_sumo-2.3.8}/src/fmu/sumo/explorer/filters.py +5 -0
  6. fmu_sumo-2.3.8/src/fmu/sumo/explorer/objects/__init__.py +19 -0
  7. {fmu_sumo-2.3.6 → fmu_sumo-2.3.8}/src/fmu/sumo/explorer/objects/_child.py +5 -5
  8. {fmu_sumo-2.3.6 → fmu_sumo-2.3.8}/src/fmu/sumo/explorer/objects/_document.py +9 -1
  9. {fmu_sumo-2.3.6 → fmu_sumo-2.3.8}/src/fmu/sumo/explorer/objects/_search_context.py +202 -99
  10. {fmu_sumo-2.3.6 → fmu_sumo-2.3.8}/src/fmu/sumo/explorer/objects/case.py +4 -4
  11. {fmu_sumo-2.3.6 → fmu_sumo-2.3.8}/src/fmu/sumo/explorer/objects/cases.py +1 -1
  12. {fmu_sumo-2.3.6 → fmu_sumo-2.3.8}/src/fmu/sumo/explorer/objects/cpgrid.py +4 -4
  13. {fmu_sumo-2.3.6 → fmu_sumo-2.3.8}/src/fmu/sumo/explorer/objects/cpgrid_property.py +2 -2
  14. fmu_sumo-2.3.8/src/fmu/sumo/explorer/objects/cube.py +69 -0
  15. {fmu_sumo-2.3.6 → fmu_sumo-2.3.8}/src/fmu/sumo/explorer/objects/dictionary.py +17 -9
  16. {fmu_sumo-2.3.6 → fmu_sumo-2.3.8}/src/fmu/sumo/explorer/objects/iteration.py +17 -4
  17. {fmu_sumo-2.3.6 → fmu_sumo-2.3.8}/src/fmu/sumo/explorer/objects/iterations.py +4 -6
  18. {fmu_sumo-2.3.6 → fmu_sumo-2.3.8}/src/fmu/sumo/explorer/objects/polygons.py +1 -1
  19. {fmu_sumo-2.3.6 → fmu_sumo-2.3.8}/src/fmu/sumo/explorer/objects/realization.py +27 -4
  20. {fmu_sumo-2.3.6 → fmu_sumo-2.3.8}/src/fmu/sumo/explorer/objects/realizations.py +4 -6
  21. {fmu_sumo-2.3.6 → fmu_sumo-2.3.8}/src/fmu/sumo/explorer/objects/surface.py +1 -1
  22. {fmu_sumo-2.3.6 → fmu_sumo-2.3.8}/src/fmu/sumo/explorer/objects/table.py +1 -1
  23. {fmu_sumo-2.3.6 → fmu_sumo-2.3.8}/src/fmu/sumo/explorer/timefilter.py +3 -2
  24. {fmu_sumo-2.3.6 → fmu_sumo-2.3.8}/src/fmu_sumo.egg-info/PKG-INFO +3 -2
  25. {fmu_sumo-2.3.6 → fmu_sumo-2.3.8}/src/fmu_sumo.egg-info/SOURCES.txt +1 -16
  26. {fmu_sumo-2.3.6 → fmu_sumo-2.3.8}/tests/test_explorer.py +1 -1
  27. fmu_sumo-2.3.6/.github/workflows/run_tests_access_drogon_affiliate_login.yaml +0 -49
  28. fmu_sumo-2.3.6/.github/workflows/run_tests_access_drogon_manage_login.yaml +0 -49
  29. fmu_sumo-2.3.6/.github/workflows/run_tests_access_drogon_manage_sharedkey.yaml +0 -45
  30. fmu_sumo-2.3.6/.github/workflows/run_tests_access_drogon_read_login.yaml +0 -49
  31. fmu_sumo-2.3.6/.github/workflows/run_tests_access_drogon_read_sharedkey.yaml +0 -45
  32. fmu_sumo-2.3.6/.github/workflows/run_tests_access_drogon_write_login.yaml +0 -49
  33. fmu_sumo-2.3.6/.github/workflows/run_tests_access_drogon_write_sharedkey.yaml +0 -45
  34. fmu_sumo-2.3.6/.github/workflows/run_tests_access_no_access_login.yaml +0 -49
  35. fmu_sumo-2.3.6/src/fmu/sumo/explorer/objects/__init__.py +0 -18
  36. fmu_sumo-2.3.6/src/fmu/sumo/explorer/objects/cube.py +0 -115
  37. fmu_sumo-2.3.6/tests/data/test_case_080/case2.json +0 -64
  38. fmu_sumo-2.3.6/tests/test_access/README.md +0 -114
  39. fmu_sumo-2.3.6/tests/test_access/tst_access_drogon_affiliate_login.py +0 -310
  40. fmu_sumo-2.3.6/tests/test_access/tst_access_drogon_manage_login.py +0 -217
  41. fmu_sumo-2.3.6/tests/test_access/tst_access_drogon_read_login.py +0 -244
  42. fmu_sumo-2.3.6/tests/test_access/tst_access_drogon_write_login.py +0 -217
  43. fmu_sumo-2.3.6/tests/test_access/tst_access_no_access_login.py +0 -210
  44. {fmu_sumo-2.3.6 → fmu_sumo-2.3.8}/.github/pull_request_template.md +0 -0
  45. {fmu_sumo-2.3.6 → fmu_sumo-2.3.8}/.github/workflows/build_docs.yaml +0 -0
  46. {fmu_sumo-2.3.6 → fmu_sumo-2.3.8}/.github/workflows/check_formatting.yml +0 -0
  47. {fmu_sumo-2.3.6 → fmu_sumo-2.3.8}/.github/workflows/publish_release.yaml +0 -0
  48. {fmu_sumo-2.3.6 → fmu_sumo-2.3.8}/.gitignore +0 -0
  49. {fmu_sumo-2.3.6 → fmu_sumo-2.3.8}/.pre-commit-config.yaml +0 -0
  50. {fmu_sumo-2.3.6 → fmu_sumo-2.3.8}/.readthedocs.yml +0 -0
  51. {fmu_sumo-2.3.6 → fmu_sumo-2.3.8}/CONTRIBUTING.md +0 -0
  52. {fmu_sumo-2.3.6 → fmu_sumo-2.3.8}/LICENSE +0 -0
  53. {fmu_sumo-2.3.6 → fmu_sumo-2.3.8}/README.md +0 -0
  54. {fmu_sumo-2.3.6 → fmu_sumo-2.3.8}/SECURITY.md +0 -0
  55. {fmu_sumo-2.3.6 → fmu_sumo-2.3.8}/docs/_static/equinor-logo.png +0 -0
  56. {fmu_sumo-2.3.6 → fmu_sumo-2.3.8}/docs/_static/equinor-logo2.jpg +0 -0
  57. {fmu_sumo-2.3.6 → fmu_sumo-2.3.8}/docs/_static/equinor_logo.jpg +0 -0
  58. {fmu_sumo-2.3.6 → fmu_sumo-2.3.8}/docs/_static/equinor_logo_only.jpg +0 -0
  59. {fmu_sumo-2.3.6 → fmu_sumo-2.3.8}/docs/_templates/layout.html +0 -0
  60. {fmu_sumo-2.3.6 → fmu_sumo-2.3.8}/docs/conf.py +0 -0
  61. {fmu_sumo-2.3.6 → fmu_sumo-2.3.8}/docs/explorer.rst +0 -0
  62. {fmu_sumo-2.3.6 → fmu_sumo-2.3.8}/docs/index.rst +0 -0
  63. {fmu_sumo-2.3.6 → fmu_sumo-2.3.8}/examples/explorer.ipynb +0 -0
  64. {fmu_sumo-2.3.6 → fmu_sumo-2.3.8}/examples/explorer2.ipynb +0 -0
  65. {fmu_sumo-2.3.6 → fmu_sumo-2.3.8}/examples/grids-and-properties.ipynb +0 -0
  66. {fmu_sumo-2.3.6 → fmu_sumo-2.3.8}/examples/metrics.ipynb +0 -0
  67. {fmu_sumo-2.3.6 → fmu_sumo-2.3.8}/examples/table-aggregation.ipynb +0 -0
  68. {fmu_sumo-2.3.6 → fmu_sumo-2.3.8}/examples/tables.ipynb +0 -0
  69. {fmu_sumo-2.3.6 → fmu_sumo-2.3.8}/pyproject.toml +0 -0
  70. {fmu_sumo-2.3.6 → fmu_sumo-2.3.8}/setup.cfg +0 -0
  71. {fmu_sumo-2.3.6 → fmu_sumo-2.3.8}/src/fmu/__init__.py +0 -0
  72. {fmu_sumo-2.3.6 → fmu_sumo-2.3.8}/src/fmu/sumo/__init__.py +0 -0
  73. {fmu_sumo-2.3.6 → fmu_sumo-2.3.8}/src/fmu/sumo/explorer/__init__.py +0 -0
  74. {fmu_sumo-2.3.6 → fmu_sumo-2.3.8}/src/fmu/sumo/explorer/cache.py +0 -0
  75. {fmu_sumo-2.3.6 → fmu_sumo-2.3.8}/src/fmu/sumo/explorer/objects/_metrics.py +0 -0
  76. {fmu_sumo-2.3.6 → fmu_sumo-2.3.8}/src/fmu/sumo/explorer/objects/table_aggregated.py +0 -0
  77. {fmu_sumo-2.3.6 → fmu_sumo-2.3.8}/src/fmu_sumo.egg-info/dependency_links.txt +0 -0
  78. {fmu_sumo-2.3.6 → fmu_sumo-2.3.8}/src/fmu_sumo.egg-info/requires.txt +0 -0
  79. {fmu_sumo-2.3.6 → fmu_sumo-2.3.8}/src/fmu_sumo.egg-info/top_level.txt +0 -0
  80. {fmu_sumo-2.3.6 → fmu_sumo-2.3.8}/tests/conftest.py +0 -0
  81. {fmu_sumo-2.3.6 → fmu_sumo-2.3.8}/tests/context.py +0 -0
  82. {fmu_sumo-2.3.6 → fmu_sumo-2.3.8}/tests/test_objects_table.py +0 -0
@@ -3,8 +3,6 @@ name: Build and test fmu-sumo
3
3
  on:
4
4
  pull_request:
5
5
  branches: [main]
6
- schedule:
7
- - cron: "4 4 * * *"
8
6
  workflow_dispatch:
9
7
 
10
8
  jobs:
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: fmu-sumo
3
- Version: 2.3.6
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
 
@@ -17,5 +17,5 @@ __version__: str
17
17
  __version_tuple__: VERSION_TUPLE
18
18
  version_tuple: VERSION_TUPLE
19
19
 
20
- __version__ = version = '2.3.6'
21
- __version_tuple__ = version_tuple = (2, 3, 6)
20
+ __version__ = version = '2.3.8'
21
+ __version_tuple__ = version_tuple = (2, 3, 8)
@@ -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 fmu.sumo.explorer.objects._search_context import SearchContext
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:
@@ -1,3 +1,8 @@
1
+ """
2
+ Complex(ish) filters for use with fmu-sumo Explorer.
3
+ """
4
+
5
+
1
6
  class Filters:
2
7
  # Filter that matches 4d-seismic objects.
3
8
  seismic4d = {
@@ -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 fmu.sumo.explorer.objects._document import Document
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 (isinstance(curr, list) and key < len(curr)) or key in curr:
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 ""