pyetp 0.0.34__py3-none-any.whl → 0.0.36__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.
- pyetp/client.py +9 -10
- pyetp/config.py +2 -1
- pyetp/utils_xml.py +1 -1
- {pyetp-0.0.34.dist-info → pyetp-0.0.36.dist-info}/METADATA +1 -1
- {pyetp-0.0.34.dist-info → pyetp-0.0.36.dist-info}/RECORD +7 -7
- {pyetp-0.0.34.dist-info → pyetp-0.0.36.dist-info}/LICENSE.md +0 -0
- {pyetp-0.0.34.dist-info → pyetp-0.0.36.dist-info}/WHEEL +0 -0
pyetp/client.py
CHANGED
|
@@ -96,7 +96,7 @@ class ETPClient(ETPConnection):
|
|
|
96
96
|
self.timeout = timeout
|
|
97
97
|
self.client_info.endpoint_capabilities['MaxWebSocketMessagePayloadSize'] = SETTINGS.MaxWebSocketMessagePayloadSize
|
|
98
98
|
self.__recvtask = asyncio.create_task(self.__recv__())
|
|
99
|
-
self.max_concurrent_requests =
|
|
99
|
+
self.max_concurrent_requests = SETTINGS.max_concurrent_requests
|
|
100
100
|
|
|
101
101
|
#
|
|
102
102
|
# client
|
|
@@ -229,8 +229,7 @@ class ETPClient(ETPConnection):
|
|
|
229
229
|
currentDateTime=self.timestamp,
|
|
230
230
|
earliestRetainedChangeTime=0,
|
|
231
231
|
endpointCapabilities=dict(
|
|
232
|
-
MaxWebSocketMessagePayloadSize=DataValue(item=self.max_size)
|
|
233
|
-
MaxWebSocketFramePayloadSize=DataValue(item=10000)
|
|
232
|
+
MaxWebSocketMessagePayloadSize=DataValue(item=self.max_size)
|
|
234
233
|
)
|
|
235
234
|
)
|
|
236
235
|
)
|
|
@@ -262,7 +261,8 @@ class ETPClient(ETPConnection):
|
|
|
262
261
|
|
|
263
262
|
@property
|
|
264
263
|
def max_size(self):
|
|
265
|
-
return
|
|
264
|
+
return SETTINGS.MaxWebSocketMessagePayloadSize
|
|
265
|
+
#return self.client_info.getCapability("MaxWebSocketMessagePayloadSize")
|
|
266
266
|
|
|
267
267
|
@property
|
|
268
268
|
def max_array_size(self):
|
|
@@ -274,6 +274,8 @@ class ETPClient(ETPConnection):
|
|
|
274
274
|
|
|
275
275
|
|
|
276
276
|
def dataspace_uri(self, ds: str) -> DataspaceURI:
|
|
277
|
+
if ds.count("/") > 1:
|
|
278
|
+
raise Exception(f"Max one / in dataspace name")
|
|
277
279
|
return DataspaceURI.from_name(ds)
|
|
278
280
|
|
|
279
281
|
def list_objects(self, dataspace_uri: DataspaceURI, depth: int = 1) -> list:
|
|
@@ -291,10 +293,10 @@ class ETPClient(ETPConnection):
|
|
|
291
293
|
#
|
|
292
294
|
|
|
293
295
|
async def put_dataspaces(self, *dataspace_uris: DataspaceURI):
|
|
294
|
-
|
|
295
|
-
|
|
296
296
|
_uris = list(map(DataspaceURI.from_any, dataspace_uris))
|
|
297
|
-
|
|
297
|
+
for i in _uris:
|
|
298
|
+
if i.raw_uri.count("/") > 4: # includes the 3 eml
|
|
299
|
+
raise Exception(f"Max one / in dataspace name")
|
|
298
300
|
time = self.timestamp
|
|
299
301
|
response = await self.send(
|
|
300
302
|
PutDataspaces(dataspaces={
|
|
@@ -969,7 +971,6 @@ class ETPClient(ETPConnection):
|
|
|
969
971
|
|
|
970
972
|
all_ranges = [range(s // block_size + 1) for s in shape]
|
|
971
973
|
indexes = np.array(np.meshgrid(*all_ranges)).T.reshape(-1, len(shape))
|
|
972
|
-
|
|
973
974
|
for ijk in indexes:
|
|
974
975
|
starts = ijk * block_size
|
|
975
976
|
if offset != 0:
|
|
@@ -992,7 +993,6 @@ class ETPClient(ETPConnection):
|
|
|
992
993
|
buffer_shape = np.array([total_count], dtype=np.int64)
|
|
993
994
|
else:
|
|
994
995
|
buffer_shape = np.array(metadata.dimensions, dtype=np.int64)
|
|
995
|
-
|
|
996
996
|
dtype = utils_arrays.get_dtype(metadata.transport_array_type)
|
|
997
997
|
buffer = np.zeros(buffer_shape, dtype=dtype)
|
|
998
998
|
params = []
|
|
@@ -1016,7 +1016,6 @@ class ETPClient(ETPConnection):
|
|
|
1016
1016
|
return buffer
|
|
1017
1017
|
|
|
1018
1018
|
async def _put_array_chuncked(self, uid: DataArrayIdentifier, data: np.ndarray):
|
|
1019
|
-
|
|
1020
1019
|
transport_array_type = utils_arrays.get_transport(data.dtype)
|
|
1021
1020
|
await self._put_uninitialized_data_array(uid, data.shape, transport_array_type=transport_array_type)
|
|
1022
1021
|
params = []
|
pyetp/config.py
CHANGED
|
@@ -23,7 +23,8 @@ class Settings(BaseSettings):
|
|
|
23
23
|
etp_url: WebSocketUrl = Field(default='wss://host.com')
|
|
24
24
|
etp_timeout: float = Field(default=15., description="Timeout in seconds")
|
|
25
25
|
data_partition: Optional[str] = None
|
|
26
|
-
MaxWebSocketMessagePayloadSize: int = Field(default=
|
|
26
|
+
MaxWebSocketMessagePayloadSize: int = Field(default=30000)
|
|
27
|
+
max_concurrent_requests: int = Field(default = 5)
|
|
27
28
|
|
|
28
29
|
|
|
29
30
|
SETTINGS = Settings()
|
pyetp/utils_xml.py
CHANGED
|
@@ -437,7 +437,7 @@ def create_resqml_mesh(rmdi, rmdts, geotimes, projected_epsg: int): #(rddms_mes
|
|
|
437
437
|
node_count=node_count,
|
|
438
438
|
face_count=face_count,
|
|
439
439
|
cell_shape=cellshape,
|
|
440
|
-
points=ro.
|
|
440
|
+
points=ro.Point3dHdf5Array(
|
|
441
441
|
coordinates=ro.Hdf5Dataset(
|
|
442
442
|
path_in_hdf_file=f"/RESQML/{str(hexa_uuid)}/points",
|
|
443
443
|
hdf_proxy=ro.DataObjectReference(
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
pyetp/__init__.py,sha256=FSlPJ3AXoMe3vDQ0z8k417aKJWwt7sxbNPsLgdc21tI,123
|
|
2
|
-
pyetp/client.py,sha256=
|
|
3
|
-
pyetp/config.py,sha256=
|
|
2
|
+
pyetp/client.py,sha256=Krms7LO_TsC0bh3DAOeG-HUxpOHhSufePosfKgY97-Q,46771
|
|
3
|
+
pyetp/config.py,sha256=WCs9n5Cd2igSVQzSNKPjnYP_H-61BYSHEeQ5Jh1oQlc,918
|
|
4
4
|
pyetp/resqml_objects/__init__.py,sha256=Sr_1bktzS8JMmE9oi6pcW6BuERm7gH0u50rBs58zI7Q,50492
|
|
5
5
|
pyetp/resqml_objects/generated.py,sha256=P-hfL8btOE6uAmtaGXbSdWMl8Z9iJx-r6FRzSvmzHvU,783914
|
|
6
6
|
pyetp/types.py,sha256=HMNZ4_cJqhxqzXiYsNT-Ywvtfji9PARX4d6MixoQn1k,6397
|
|
7
7
|
pyetp/uri.py,sha256=6NE_-QvtaL_z5NCUbxehc28ul-70DgXpMiEGaIJPqNc,2996
|
|
8
8
|
pyetp/utils.py,sha256=4U_9ndZGzN3B0xMoeSglmxdg7jgfYP5v_mE6tF2Lqmc,518
|
|
9
9
|
pyetp/utils_arrays.py,sha256=HHhw23La4SG7UJyd5Q_OJ5WlMq98QpwHBk553YyyYOk,4331
|
|
10
|
-
pyetp/utils_xml.py,sha256=
|
|
11
|
-
pyetp-0.0.
|
|
12
|
-
pyetp-0.0.
|
|
13
|
-
pyetp-0.0.
|
|
14
|
-
pyetp-0.0.
|
|
10
|
+
pyetp/utils_xml.py,sha256=OLGKPxFsz2OzsJOEJDgQXIZ9wwvanlOr6jD3i3KHVZI,33861
|
|
11
|
+
pyetp-0.0.36.dist-info/LICENSE.md,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
12
|
+
pyetp-0.0.36.dist-info/METADATA,sha256=MZoIUh82mz6L90TIZADRJ_hUa5IVAWZ8rxFMItTuO7I,2344
|
|
13
|
+
pyetp-0.0.36.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
|
14
|
+
pyetp-0.0.36.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|