pyetp 0.0.46__py3-none-any.whl → 0.0.47__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.
- energistics/__init__.py +0 -0
- energistics/etp/__init__.py +0 -0
- energistics/etp/v12/__init__.py +0 -0
- energistics/etp/v12/datatypes/__init__.py +25 -0
- energistics/etp/v12/datatypes/data_array_types/__init__.py +27 -0
- energistics/etp/v12/datatypes/object/__init__.py +22 -0
- energistics/etp/v12/protocol/__init__.py +0 -0
- energistics/etp/v12/protocol/core/__init__.py +19 -0
- energistics/etp/v12/protocol/data_array/__init__.py +51 -0
- energistics/etp/v12/protocol/dataspace/__init__.py +23 -0
- energistics/etp/v12/protocol/discovery/__init__.py +21 -0
- energistics/etp/v12/protocol/store/__init__.py +27 -0
- energistics/etp/v12/protocol/transaction/__init__.py +27 -0
- pyetp/_version.py +2 -2
- pyetp/client.py +218 -172
- pyetp/errors.py +39 -0
- {pyetp-0.0.46.dist-info → pyetp-0.0.47.dist-info}/METADATA +1 -1
- pyetp-0.0.47.dist-info/RECORD +39 -0
- {pyetp-0.0.46.dist-info → pyetp-0.0.47.dist-info}/WHEEL +1 -1
- {pyetp-0.0.46.dist-info → pyetp-0.0.47.dist-info}/top_level.txt +2 -0
- rddms_io/__init__.py +0 -0
- rddms_io/client.py +1234 -0
- rddms_io/data_types.py +11 -0
- resqml_objects/v201/generated.py +44 -2
- resqml_objects/v201/utils.py +38 -0
- pyetp-0.0.46.dist-info/RECORD +0 -22
- {pyetp-0.0.46.dist-info → pyetp-0.0.47.dist-info}/licenses/LICENSE.md +0 -0
pyetp/errors.py
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import typing
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class ETPTransactionFailure(Exception):
|
|
5
|
+
pass
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
T = typing.TypeVar("T")
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def parse_response_errors(
|
|
12
|
+
responses: list[T], expected: typing.Type[T]
|
|
13
|
+
) -> list[TypeError]:
|
|
14
|
+
errors = []
|
|
15
|
+
for response in responses:
|
|
16
|
+
if not isinstance(response, expected):
|
|
17
|
+
errors.append(
|
|
18
|
+
TypeError(
|
|
19
|
+
f"Expected {expected.__name__}, got "
|
|
20
|
+
f"{response.__class__.__name__} with content: {response}",
|
|
21
|
+
)
|
|
22
|
+
)
|
|
23
|
+
|
|
24
|
+
return errors
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def raise_response_errors(errors: list[TypeError], location: str) -> None:
|
|
28
|
+
if len(errors) > 0:
|
|
29
|
+
raise ExceptionGroup(
|
|
30
|
+
f"There were {len(errors)} errors in {location}",
|
|
31
|
+
errors,
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def parse_and_raise_response_errors(
|
|
36
|
+
responses: list[T], expected: typing.Type[T], location: str
|
|
37
|
+
) -> None:
|
|
38
|
+
errors = parse_response_errors(responses, expected)
|
|
39
|
+
raise_response_errors(errors, location)
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
energistics/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
+
energistics/etp/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
|
+
energistics/etp/v12/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
|
+
energistics/etp/v12/datatypes/__init__.py,sha256=D2cMhZmI0dgzmf3so-cwWrZgfHxqE-lSmiZUbHlqNKo,921
|
|
5
|
+
energistics/etp/v12/datatypes/data_array_types/__init__.py,sha256=WlAZxhgV1rSz01z3HTl28hdjyztohVBI7HAvntnCH4M,920
|
|
6
|
+
energistics/etp/v12/datatypes/object/__init__.py,sha256=jo3OmKenD6VkKiXV-gMuwzEcJl4pj2PYJRqYsi8jp6Y,752
|
|
7
|
+
energistics/etp/v12/protocol/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
8
|
+
energistics/etp/v12/protocol/core/__init__.py,sha256=e7QpxLdKNezGtfSOX_KuiIQJ9hgDGBPqqioq34KXHJA,668
|
|
9
|
+
energistics/etp/v12/protocol/data_array/__init__.py,sha256=db42SuhwsGYnsLxSzGBJhNv0dbTnXIt8hLIuCy0104o,1777
|
|
10
|
+
energistics/etp/v12/protocol/dataspace/__init__.py,sha256=CaprHZZgA5JzMbV_BHTyFwHBL8r0sIW_qa9lqBzCwCM,804
|
|
11
|
+
energistics/etp/v12/protocol/discovery/__init__.py,sha256=lu_IsAZP5886OeZuihtNLnREsIim4Tenpnv52G5wcag,721
|
|
12
|
+
energistics/etp/v12/protocol/store/__init__.py,sha256=2wvK_cN_Dc3cl4pDHuWhQW6QcCResV9rPNMtESQSIa8,894
|
|
13
|
+
energistics/etp/v12/protocol/transaction/__init__.py,sha256=1_dv1c8ahKJH2kM9PuMiSZ5FwwWjghmkc397YK5ming,894
|
|
14
|
+
pyetp/__init__.py,sha256=nh-eVYEWMMxqx4YZLzN7fV7NXwbutr1soD_ot48860U,283
|
|
15
|
+
pyetp/_version.py,sha256=ToAw384WWguTEmRR8YKQKk9ZB9M3thyPsfPaIkOPqog,706
|
|
16
|
+
pyetp/client.py,sha256=CP_cNxW0PROnXMnCUkr00UAKHZCccb3bCn1cZqgO_94,56598
|
|
17
|
+
pyetp/config.py,sha256=uGEx6n-YF7Rtgwckf0ovRKNOKgCUsiQx4IA0Tyiqafk,870
|
|
18
|
+
pyetp/errors.py,sha256=J8137kpSJb4mjTNR9EOmPVvyYSptGeBMmwDQzC7I1NU,964
|
|
19
|
+
pyetp/resqml_objects.py,sha256=j00e8scSh-yYv4Lpp9WjzLiaKqJWd5Cs7ROcJcxxFVw,50721
|
|
20
|
+
pyetp/types.py,sha256=zOfUzEQcgBvveWJyM6dD7U3xJ4SCkWElewNL0Ml-PPY,6761
|
|
21
|
+
pyetp/uri.py,sha256=zbwAeyqLgRqgN-xAbOYmiTtHtVJwfveaMbjl7yc2ifU,3143
|
|
22
|
+
pyetp/utils_arrays.py,sha256=P9F_FWxf9IkqMI1CDdoRjKqD1bWB5DCOJWdHrT7UHfQ,13251
|
|
23
|
+
pyetp/utils_xml.py,sha256=qETAMooFWXBvV_SIMGv1TEG2tLWCbgPraARkftqblKw,6444
|
|
24
|
+
pyetp-0.0.47.dist-info/licenses/LICENSE.md,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
25
|
+
rddms_io/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
26
|
+
rddms_io/client.py,sha256=IQR5Xas45RO1BGzjelxhljDbvhWEGSf36NBBcmuc5BQ,45543
|
|
27
|
+
rddms_io/data_types.py,sha256=jLZSuAA9Ds-4_K2N5JS9K92sVUfaOjgx3ToANwW-VaI,272
|
|
28
|
+
resqml_objects/__init__.py,sha256=ilimTrQScFryxHrfZwZURVpW0li19bVnayUcHR7S_Fs,183
|
|
29
|
+
resqml_objects/epc_readers.py,sha256=-k2GGK8VgVoqX3-ThyLjs_5OlgNHu1Sd4LZAq6YSF18,3306
|
|
30
|
+
resqml_objects/parsers.py,sha256=aX7W4sP68NlEp8bFB88A8mXWpBHmr79ahpvgD04vCdY,724
|
|
31
|
+
resqml_objects/serializers.py,sha256=wgWhO7ynn51cWRvt5BKdLvxZRqWuopoHFQn0tX8d2NA,1155
|
|
32
|
+
resqml_objects/surface_helpers.py,sha256=-x9DqCliI0dUP4ierTypVFWx7eOH_0j6iDdLxzpGPtk,11207
|
|
33
|
+
resqml_objects/v201/__init__.py,sha256=yL3jWgkyGAzr-wt_WJDV_eARE75NoA6SPEKBrKM4Crk,51630
|
|
34
|
+
resqml_objects/v201/generated.py,sha256=tjOgaa05rfutRUensPp7K1xBkmbZrPAprKVDRNLtvNw,790733
|
|
35
|
+
resqml_objects/v201/utils.py,sha256=ENihJet58GUd91pkOeX70IgFV11S7oha1440LaHpamY,2476
|
|
36
|
+
pyetp-0.0.47.dist-info/METADATA,sha256=-8EKZFgS3tJRXnFpxU6fjPITIjrZ93hDZbv_TazpvvA,3096
|
|
37
|
+
pyetp-0.0.47.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
38
|
+
pyetp-0.0.47.dist-info/top_level.txt,sha256=NSSMMgk5xHeouCZ2cyBoq4KxcHKN60pejJFCCW-QL4s,42
|
|
39
|
+
pyetp-0.0.47.dist-info/RECORD,,
|
rddms_io/__init__.py
ADDED
|
File without changes
|