sumo-wrapper-python 1.1.0__tar.gz → 1.1.2__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.

Potentially problematic release.


This version of sumo-wrapper-python might be problematic. Click here for more details.

Files changed (47) hide show
  1. {sumo_wrapper_python-1.1.0 → sumo_wrapper_python-1.1.2}/.github/workflows/build_docs.yaml +2 -0
  2. {sumo_wrapper_python-1.1.0 → sumo_wrapper_python-1.1.2}/.github/workflows/linting.yml +2 -0
  3. sumo_wrapper_python-1.1.2/.readthedocs.yaml +16 -0
  4. {sumo_wrapper_python-1.1.0 → sumo_wrapper_python-1.1.2}/CONTRIBUTING.md +6 -6
  5. {sumo_wrapper_python-1.1.0 → sumo_wrapper_python-1.1.2}/PKG-INFO +1 -1
  6. {sumo_wrapper_python-1.1.0 → sumo_wrapper_python-1.1.2}/src/sumo/wrapper/_version.py +2 -2
  7. {sumo_wrapper_python-1.1.0 → sumo_wrapper_python-1.1.2}/src/sumo/wrapper/sumo_client.py +10 -0
  8. {sumo_wrapper_python-1.1.0 → sumo_wrapper_python-1.1.2}/src/sumo_wrapper_python.egg-info/PKG-INFO +1 -1
  9. {sumo_wrapper_python-1.1.0 → sumo_wrapper_python-1.1.2}/tests/test_sumo_thin_client.py +1 -19
  10. {sumo_wrapper_python-1.1.0 → sumo_wrapper_python-1.1.2}/tests/testdata/case.yml +8 -8
  11. {sumo_wrapper_python-1.1.0 → sumo_wrapper_python-1.1.2}/tests/testdata/surface.yml +24 -23
  12. sumo_wrapper_python-1.1.0/.readthedocs.yaml +0 -16
  13. {sumo_wrapper_python-1.1.0 → sumo_wrapper_python-1.1.2}/.github/workflows/publish_release.yml +0 -0
  14. {sumo_wrapper_python-1.1.0 → sumo_wrapper_python-1.1.2}/.github/workflows/pytest.yml +0 -0
  15. {sumo_wrapper_python-1.1.0 → sumo_wrapper_python-1.1.2}/.gitignore +0 -0
  16. {sumo_wrapper_python-1.1.0 → sumo_wrapper_python-1.1.2}/.pre-commit-config.yaml +0 -0
  17. {sumo_wrapper_python-1.1.0 → sumo_wrapper_python-1.1.2}/LICENSE +0 -0
  18. {sumo_wrapper_python-1.1.0 → sumo_wrapper_python-1.1.2}/README.md +0 -0
  19. {sumo_wrapper_python-1.1.0 → sumo_wrapper_python-1.1.2}/SECURITY.md +0 -0
  20. {sumo_wrapper_python-1.1.0 → sumo_wrapper_python-1.1.2}/docs/Makefile +0 -0
  21. {sumo_wrapper_python-1.1.0 → sumo_wrapper_python-1.1.2}/docs/_static/equinor-logo.png +0 -0
  22. {sumo_wrapper_python-1.1.0 → sumo_wrapper_python-1.1.2}/docs/_static/equinor-logo2.jpg +0 -0
  23. {sumo_wrapper_python-1.1.0 → sumo_wrapper_python-1.1.2}/docs/_static/equinor_logo.jpg +0 -0
  24. {sumo_wrapper_python-1.1.0 → sumo_wrapper_python-1.1.2}/docs/_static/equinor_logo_only.jpg +0 -0
  25. {sumo_wrapper_python-1.1.0 → sumo_wrapper_python-1.1.2}/docs/_templates/layout.html +0 -0
  26. {sumo_wrapper_python-1.1.0 → sumo_wrapper_python-1.1.2}/docs/api.rst +0 -0
  27. {sumo_wrapper_python-1.1.0 → sumo_wrapper_python-1.1.2}/docs/conf.py +0 -0
  28. {sumo_wrapper_python-1.1.0 → sumo_wrapper_python-1.1.2}/docs/index.rst +0 -0
  29. {sumo_wrapper_python-1.1.0 → sumo_wrapper_python-1.1.2}/docs/make.bat +0 -0
  30. {sumo_wrapper_python-1.1.0 → sumo_wrapper_python-1.1.2}/docs/sumo-wrapper-python.rst +0 -0
  31. {sumo_wrapper_python-1.1.0 → sumo_wrapper_python-1.1.2}/pyproject.toml +0 -0
  32. {sumo_wrapper_python-1.1.0 → sumo_wrapper_python-1.1.2}/setup.cfg +0 -0
  33. {sumo_wrapper_python-1.1.0 → sumo_wrapper_python-1.1.2}/src/sumo/__init__.py +0 -0
  34. {sumo_wrapper_python-1.1.0 → sumo_wrapper_python-1.1.2}/src/sumo/wrapper/__init__.py +0 -0
  35. {sumo_wrapper_python-1.1.0 → sumo_wrapper_python-1.1.2}/src/sumo/wrapper/_auth_provider.py +0 -0
  36. {sumo_wrapper_python-1.1.0 → sumo_wrapper_python-1.1.2}/src/sumo/wrapper/_blob_client.py +0 -0
  37. {sumo_wrapper_python-1.1.0 → sumo_wrapper_python-1.1.2}/src/sumo/wrapper/_decorators.py +0 -0
  38. {sumo_wrapper_python-1.1.0 → sumo_wrapper_python-1.1.2}/src/sumo/wrapper/_logging.py +0 -0
  39. {sumo_wrapper_python-1.1.0 → sumo_wrapper_python-1.1.2}/src/sumo/wrapper/_retry_strategy.py +0 -0
  40. {sumo_wrapper_python-1.1.0 → sumo_wrapper_python-1.1.2}/src/sumo/wrapper/config.py +0 -0
  41. {sumo_wrapper_python-1.1.0 → sumo_wrapper_python-1.1.2}/src/sumo/wrapper/login.py +0 -0
  42. {sumo_wrapper_python-1.1.0 → sumo_wrapper_python-1.1.2}/src/sumo_wrapper_python.egg-info/SOURCES.txt +0 -0
  43. {sumo_wrapper_python-1.1.0 → sumo_wrapper_python-1.1.2}/src/sumo_wrapper_python.egg-info/dependency_links.txt +0 -0
  44. {sumo_wrapper_python-1.1.0 → sumo_wrapper_python-1.1.2}/src/sumo_wrapper_python.egg-info/entry_points.txt +0 -0
  45. {sumo_wrapper_python-1.1.0 → sumo_wrapper_python-1.1.2}/src/sumo_wrapper_python.egg-info/requires.txt +0 -0
  46. {sumo_wrapper_python-1.1.0 → sumo_wrapper_python-1.1.2}/src/sumo_wrapper_python.egg-info/top_level.txt +0 -0
  47. {sumo_wrapper_python-1.1.0 → sumo_wrapper_python-1.1.2}/tests/conftest.py +0 -0
@@ -12,6 +12,8 @@ on:
12
12
  jobs:
13
13
  build_pywheels:
14
14
  name: Build docs with Python ${{ matrix.python-version }} on ${{ matrix.os }}
15
+ permissions:
16
+ contents: read
15
17
  runs-on: ${{ matrix.os }}
16
18
  strategy:
17
19
  matrix:
@@ -7,6 +7,8 @@ on:
7
7
  jobs:
8
8
  ruff-check:
9
9
  name: Run ruff lint and format checks
10
+ permissions:
11
+ contents: read
10
12
  runs-on: ubuntu-latest
11
13
 
12
14
  steps:
@@ -0,0 +1,16 @@
1
+ version: 2
2
+
3
+ build:
4
+ os: ubuntu-22.04
5
+ tools:
6
+ python: "3.12"
7
+
8
+ python:
9
+ install:
10
+ - method: pip
11
+ path: .
12
+ extra_requirements:
13
+ - docs
14
+
15
+ sphinx:
16
+ configuration: docs/conf.py
@@ -11,18 +11,18 @@ This is how you should do it:
11
11
 
12
12
  Use our [issue list](../../issues) to report a **bug** or **propose a new feature**, including
13
13
 
14
- ### Reporting a **bug report**
14
+ ### Reporting a **bug report**
15
15
  - A quick summary and/or background
16
16
  - Steps to reproduce
17
17
  - What actually happens
18
18
 
19
- ### Adding a **feature request**
19
+ ### Adding a **feature request**
20
20
  - Brief description of the feature
21
21
  - What problem/issue will this solve
22
22
  - A sort of Definition of Done - "How should it look when finished"
23
23
 
24
- ### When submitting a fix using a Pull Request (PR)
25
- - Fork this repository from GitHub
26
- - After you have made the changes, create a pull request (PR)
24
+ ### When submitting a fix using a Pull Request (PR)
25
+ - Fork this repository from GitHub
26
+ - After you have made the changes, create a pull request (PR)
27
27
 
28
- We will review the pull request and if it is appropriate and there are no clashes or vulnerabilities, it will be merged to the main code.
28
+ We will review the pull request and if it is appropriate and there are no clashes or vulnerabilities, it will be merged to the main code.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sumo-wrapper-python
3
- Version: 1.1.0
3
+ Version: 1.1.2
4
4
  Summary: Python wrapper for the Sumo API
5
5
  Author: Equinor
6
6
  License: Apache License
@@ -17,5 +17,5 @@ __version__: str
17
17
  __version_tuple__: VERSION_TUPLE
18
18
  version_tuple: VERSION_TUPLE
19
19
 
20
- __version__ = version = '1.1.0'
21
- __version_tuple__ = version_tuple = (1, 1, 0)
20
+ __version__ = version = '1.1.2'
21
+ __version_tuple__ = version_tuple = (1, 1, 2)
@@ -227,6 +227,11 @@ class SumoClient:
227
227
  path,
228
228
  )
229
229
  is not None
230
+ or re.match(
231
+ r"^/tasks\('[0-9a-fA-F-]{8}-[0-9a-fA-F-]{4}-[0-9a-fA-F-]{4}-[0-9a-fA-F-]{4}-[0-9a-fA-F-]{12}'\)/result$", # noqa: E501
232
+ path,
233
+ )
234
+ is not None
230
235
  ):
231
236
  follow_redirects = True
232
237
 
@@ -542,6 +547,11 @@ class SumoClient:
542
547
  path,
543
548
  )
544
549
  is not None
550
+ or re.match(
551
+ r"^/tasks\('[0-9a-fA-F-]{8}-[0-9a-fA-F-]{4}-[0-9a-fA-F-]{4}-[0-9a-fA-F-]{4}-[0-9a-fA-F-]{12}'\)/result$", # noqa: E501
552
+ path,
553
+ )
554
+ is not None
545
555
  ):
546
556
  follow_redirects = True
547
557
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sumo-wrapper-python
3
- Version: 1.1.0
3
+ Version: 1.1.2
4
4
  Summary: Python wrapper for the Sumo API
5
5
  Author: Equinor
6
6
  License: Apache License
@@ -33,18 +33,6 @@ def _upload_blob(conn, blob, url=None, object_id=None):
33
33
  return response
34
34
 
35
35
 
36
- def _get_blob_uri(conn, object_id):
37
- response = conn.get(f"/objects('{object_id}')/blob/authuri")
38
-
39
- print("Blob save " + str(response.status_code), flush=True)
40
- if not 200 <= response.status_code < 202:
41
- raise Exception(
42
- f"get blob uri for {object_id}"
43
- f" returned {response.text} {response.status_code}"
44
- )
45
- return response
46
-
47
-
48
36
  def _download_object(conn, object_id):
49
37
  json = conn.get(f"/objects('{object_id}')").json()
50
38
 
@@ -67,12 +55,6 @@ def _delete_object(conn, object_id):
67
55
  return response
68
56
 
69
57
 
70
- class ValueKeeper:
71
- """Class for keeping/passing values between tests"""
72
-
73
- pass
74
-
75
-
76
58
  """ TESTS """
77
59
 
78
60
 
@@ -234,7 +216,7 @@ def test_upload_duplicate_ensemble(token):
234
216
  # time-to-live of 60 seconds. If there are multiple replicas
235
217
  # running, we might get the situation where we have just deleted
236
218
  # the case via one replica, then ask for the object from another
237
- # replica which still has it ins cache. Thus, the magic value 61,
219
+ # replica which still has it in cache. Thus, the magic value 61,
238
220
  # below.
239
221
  sleep(61)
240
222
 
@@ -1,19 +1,19 @@
1
1
  # example YAML file for ensembles (a parent object in Sumo)
2
2
 
3
- $schema: https://main-fmu-schemas-dev.radix.equinor.com/schemas/0.8.0/fmu_results.json
4
- version: "0.8.0" # including for REP and others to build logic on.
5
- source: fmu # always included, and always this value if FMU made it. For quick identification for external consumers.
3
+ $schema: https://main-fmu-schemas-dev.radix.equinor.com/schemas/0.12.0/fmu_results.json
4
+ version: "0.12.0" # including for REP and others to build logic on.
5
+ source: fmu # always included, and always this value if FMU made it. For quick identification for external consumers.
6
6
  class: case
7
7
  fmu:
8
8
  case:
9
9
  name: TestCase from fmu.sumo
10
- uuid: 8bb56d60-8758-481a-89a4-6bac8561d38e # (pseudo-)random valid uuid4xs
10
+ uuid: 8bb56d60-8758-481a-89a4-6bac8561d38e # (pseudo-)random valid uuid4xs, this is re-generated in tests.
11
11
  user:
12
12
  id: testuser # $USER from ERT
13
13
  description:
14
14
  - yet other detailed description
15
15
  - optional
16
- restart_from: 00000000-0000-0000-0000-000000000000 # fmu.iteration.uuid for another iteration/case
16
+ restart_from: 00000000-0000-0000-0000-000000000000 # fmu.ensemble.uuid for another ensemble/case
17
17
  model:
18
18
  name: ff
19
19
  revision: 21.0.0.dev
@@ -26,7 +26,7 @@ fmu:
26
26
 
27
27
  access:
28
28
  asset:
29
- name: Drogon # adding level to make room for unique ID in the future
29
+ name: Drogon # adding level to make room for unique ID in the future
30
30
 
31
31
  # ensemble objects have no ssdl details
32
32
 
@@ -54,11 +54,11 @@ masterdata:
54
54
  uuid: 12345678-1234-1234-1234-123456789012
55
55
 
56
56
  tracklog:
57
- - datetime: '2020-10-28T14:28:02'
57
+ - datetime: '2020-10-28T14:28:02Z'
58
58
  user:
59
59
  id: testuser
60
60
  event: created
61
- - datetime: '2020-10-28T14:46:14'
61
+ - datetime: '2020-10-28T14:46:14Z'
62
62
  user:
63
63
  id: testuser
64
64
  event: updated
@@ -1,13 +1,13 @@
1
- $schema: https://main-fmu-schemas-dev.radix.equinor.com/schemas/0.8.0/fmu_results.json
2
- version: "0.8.0" # including for REP and others to build logic on.
3
- source: fmu # always included, and always this value if FMU made it. For quick identification for external consumers.
1
+ $schema: https://main-fmu-schemas-dev.radix.equinor.com/schemas/0.12.0/fmu_results.json
2
+ version: "0.12.0" # including for REP and others to build logic on.
3
+ source: fmu # always included, and always this value if FMU made it. For quick identification for external consumers.
4
4
 
5
5
  tracklog:
6
- - datetime: '2020-10-28T14:28:02'
6
+ - datetime: '2020-10-28T14:28:02Z'
7
7
  user:
8
8
  id: testuser
9
9
  event: created
10
- - datetime: '2020-10-28T14:46:14'
10
+ - datetime: '2020-10-28T14:46:14Z'
11
11
  user:
12
12
  id: testuser
13
13
  event: updated
@@ -24,10 +24,10 @@ fmu:
24
24
  description:
25
25
  - detailed description
26
26
  - optional
27
-
27
+
28
28
  context:
29
29
  stage: "realization"
30
-
30
+
31
31
  workflow: # not sure, but a reference to the workflow / job that made this. Making it expandable.
32
32
  reference: rms/structural_model
33
33
 
@@ -39,16 +39,19 @@ fmu:
39
39
  description:
40
40
  - yet other detailed description
41
41
  - optional
42
- restart_from: 15ce3b84-766f-4c93-9050-b154861f9100 # fmu.iteration.uuid for another iteration/case
42
+ restart_from: 15ce3b84-766f-4c93-9050-b154861f9100 # fmu.ensemble.uuid for another ensemble/case
43
43
 
44
- iteration:
44
+ ensemble:
45
45
  id: 0 # always an int, will be 0 for e.g. "pred"
46
- uuid: 4b939310-34b1-4179-802c-49460bc0f799 # hash of case.uuid + iteration.id
46
+ uuid: 4b939310-34b1-4179-802c-49460bc0f799 # hash of case.uuid + ensemble.id
47
47
  name: "iter-0" # /"pred"
48
48
 
49
- realization: # could be expanded in the future?
49
+ entity:
50
+ uuid: dc2971e1-abae-4691-92fc-17fbd926461a
51
+
52
+ realization: # could be expanded in the future?
50
53
  id: 33
51
- uuid: 29a15b21-ce13-471b-9a4a-0f791552aa51 # hash of case.uuid + iteration.uuid + realization.id
54
+ uuid: 29a15b21-ce13-471b-9a4a-0f791552aa51 # hash of case.uuid + ensemble.uuid + realization.id
52
55
  name: "realization-33"
53
56
  parameters: # directly pass parameters.txt. This is potentially a lot of content, only a stub is included here.
54
57
  SENSNAME: faultseal
@@ -61,28 +64,27 @@ fmu:
61
64
  FAULT_SEAL_SCALING: 0.1
62
65
  FWL_CENTRAL: 1677
63
66
  jobs: # directly pass jobs.json. This is a lot of content, only a stub is included here.
64
- umask: '0002'
67
+ umask: "0002"
65
68
  DATA_ROOT: /some/path/20.4.0_20201106/ert/model
66
69
  anything: something
67
70
  something:
68
71
  anything: something
69
72
  global_update_path: {}
70
73
  jobList:
71
- - name: MAKE_DIRECTORY
72
- min_arg: 1
73
- anything: something
74
+ - name: MAKE_DIRECTORY
75
+ min_arg: 1
76
+ anything: something
74
77
 
75
78
  file:
76
79
  relative_path: realization-33/iter-0/share/results/maps/volantis_gp_base--amplitude.gri # case-relative
77
80
  absolute_path: /some/absolute/path//realization-33/iter-0/share/results/maps/volantis_gp_base--amplitude.gri
78
- checksum_md5: 0123456789abcdef0123456789abcdef # checksum of the file, not the data.
81
+ checksum_md5: 0123456789abcdef0123456789abcdef # checksum of the file, not the data.
79
82
 
80
83
  data: # The data block describes the actual data (e.g. surface). Only present in data objects
81
-
82
84
  # if stratigraphic, name must match the strat column. This is the official name of this surface.
83
85
  name: volantis_top-volantis_base
84
- stratigraphic: false # if true, this is a stratigraphic surface found in the strat column
85
- offset: 0.0 # to be used if a specific horizon is represented with an offset.
86
+ stratigraphic: false # if true, this is a stratigraphic surface found in the strat column
87
+ offset: 0.0 # to be used if a specific horizon is represented with an offset.
86
88
 
87
89
  top: # not required, but allowed
88
90
  name: volantis_gp_top
@@ -127,7 +129,7 @@ data: # The data block describes the actual data (e.g. surface). Only present in
127
129
  yinc: 25.0
128
130
  yflip: 1
129
131
  rotation: 30.000000834826057
130
- undef: 1.0e+33 # Allow both number and string
132
+ undef: 1.0e+33 # Allow both number and string
131
133
  bbox:
132
134
  xmin: 456012.5003497944
133
135
  xmax: 467540.52762886323
@@ -181,10 +183,9 @@ masterdata:
181
183
  field:
182
184
  - identifier: DROGON
183
185
  uuid: 00000000-0000-0000-0000-000000000000
184
- coordinate_system: # changing from "coordinates" to clarify this is not content
186
+ coordinate_system: # changing from "coordinates" to clarify this is not content
185
187
  identifier: ST_WGS84_UTM37N_P32637
186
188
  uuid: ad214d85-dac7-19da-e053-c918a4889309
187
189
  stratigraphic_column:
188
190
  identifier: DROGON_2020
189
191
  uuid: 12345678-1234-1234-1234-123456789012
190
-
@@ -1,16 +0,0 @@
1
- version: 2
2
-
3
- build:
4
- os: ubuntu-22.04
5
- tools:
6
- python: "3.10"
7
-
8
- python:
9
- install:
10
- - method: pip
11
- path: .
12
- extra_requirements:
13
- - docs
14
-
15
- sphinx:
16
- configuration: docs/conf.py