hydroserverpy 1.3.0b1__py3-none-any.whl → 1.3.0b3__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.
Potentially problematic release.
This version of hydroserverpy might be problematic. Click here for more details.
- hydroserverpy/api/models/etl/data_archive.py +1 -1
- hydroserverpy/api/models/etl/data_source.py +1 -1
- hydroserverpy/api/models/etl/orchestration_system.py +2 -2
- hydroserverpy/api/models/sta/datastream.py +1 -1
- hydroserverpy/api/models/sta/thing.py +1 -1
- hydroserverpy/api/services/sta/datastream.py +0 -2
- hydroserverpy/etl_csv/hydroserver_etl_csv.py +17 -23
- {hydroserverpy-1.3.0b1.dist-info → hydroserverpy-1.3.0b3.dist-info}/METADATA +1 -1
- {hydroserverpy-1.3.0b1.dist-info → hydroserverpy-1.3.0b3.dist-info}/RECORD +13 -13
- {hydroserverpy-1.3.0b1.dist-info → hydroserverpy-1.3.0b3.dist-info}/WHEEL +0 -0
- {hydroserverpy-1.3.0b1.dist-info → hydroserverpy-1.3.0b3.dist-info}/licenses/LICENSE +0 -0
- {hydroserverpy-1.3.0b1.dist-info → hydroserverpy-1.3.0b3.dist-info}/top_level.txt +0 -0
- {hydroserverpy-1.3.0b1.dist-info → hydroserverpy-1.3.0b3.dist-info}/zip-safe +0 -0
|
@@ -58,7 +58,7 @@ class DataArchive(
|
|
|
58
58
|
"""The datastreams this data archive provides data for."""
|
|
59
59
|
|
|
60
60
|
if self._datastreams is None:
|
|
61
|
-
self._datastreams = self.client.datastreams.list(data_archive=self.uid, fetch_all=True)
|
|
61
|
+
self._datastreams = self.client.datastreams.list(data_archive=self.uid, fetch_all=True).items
|
|
62
62
|
|
|
63
63
|
return self._datastreams
|
|
64
64
|
|
|
@@ -61,7 +61,7 @@ class DataSource(
|
|
|
61
61
|
"""The datastreams this data source provides data for."""
|
|
62
62
|
|
|
63
63
|
if self._datastreams is None:
|
|
64
|
-
self._datastreams = self.client.datastreams.list(data_source=self.uid, fetch_all=True)
|
|
64
|
+
self._datastreams = self.client.datastreams.list(data_source=self.uid, fetch_all=True).items
|
|
65
65
|
|
|
66
66
|
return self._datastreams
|
|
67
67
|
|
|
@@ -47,7 +47,7 @@ class OrchestrationSystem(HydroServerBaseModel):
|
|
|
47
47
|
if self._datasources is None:
|
|
48
48
|
self._datasources = self.client.datasources.list(
|
|
49
49
|
orchestration_system=self.uid, fetch_all=True
|
|
50
|
-
)
|
|
50
|
+
).items
|
|
51
51
|
|
|
52
52
|
return self._datasources
|
|
53
53
|
|
|
@@ -58,6 +58,6 @@ class OrchestrationSystem(HydroServerBaseModel):
|
|
|
58
58
|
if self._dataarchives is None:
|
|
59
59
|
self._dataarchives = self.client.dataarchives.list(
|
|
60
60
|
orchestration_system=self.uid, fetch_all=True
|
|
61
|
-
)
|
|
61
|
+
).items
|
|
62
62
|
|
|
63
63
|
return self._dataarchives
|
|
@@ -183,7 +183,7 @@ class Datastream(HydroServerBaseModel):
|
|
|
183
183
|
"""The data archives of this datastream."""
|
|
184
184
|
|
|
185
185
|
if self._data_archives is None:
|
|
186
|
-
self._data_archives = self.client.dataarchives.list(datastream=self.uid, fetch_all=True)
|
|
186
|
+
self._data_archives = self.client.dataarchives.list(datastream=self.uid, fetch_all=True).items
|
|
187
187
|
|
|
188
188
|
return self._data_archives
|
|
189
189
|
|
|
@@ -66,7 +66,7 @@ class Thing(HydroServerBaseModel):
|
|
|
66
66
|
"""The datastreams collected at this thing."""
|
|
67
67
|
|
|
68
68
|
if self._datastreams is None:
|
|
69
|
-
self._datastreams = self.client.datastreams.list(thing=self.uid, fetch_all=True)
|
|
69
|
+
self._datastreams = self.client.datastreams.list(thing=self.uid, fetch_all=True).items
|
|
70
70
|
|
|
71
71
|
return self._datastreams
|
|
72
72
|
|
|
@@ -267,8 +267,6 @@ class DatastreamService(HydroServerBaseService):
|
|
|
267
267
|
"data": observations.values.tolist()
|
|
268
268
|
}
|
|
269
269
|
|
|
270
|
-
print(body)
|
|
271
|
-
|
|
272
270
|
self.client.request(
|
|
273
271
|
"post", path, headers=headers, params=params, data=json.dumps(body, default=self.default_serializer)
|
|
274
272
|
)
|
|
@@ -179,12 +179,12 @@ class HydroServerETLCSV:
|
|
|
179
179
|
"""
|
|
180
180
|
|
|
181
181
|
try:
|
|
182
|
+
timestamp_key = (self._data_source.settings["transformer"].get("timestampKey") or
|
|
183
|
+
self._data_source.settings["transformer"]["timestamp"]["key"])
|
|
182
184
|
self._timestamp_column_index = (
|
|
183
|
-
row.index(
|
|
184
|
-
if isinstance(
|
|
185
|
-
|
|
186
|
-
)
|
|
187
|
-
else int(self._data_source.settings["transformer"]["timestampKey"]) - 1
|
|
185
|
+
row.index(timestamp_key)
|
|
186
|
+
if isinstance(timestamp_key, str)
|
|
187
|
+
else int(timestamp_key) - 1
|
|
188
188
|
)
|
|
189
189
|
if self._timestamp_column_index > len(row):
|
|
190
190
|
raise ValueError
|
|
@@ -216,26 +216,24 @@ class HydroServerETLCSV:
|
|
|
216
216
|
"""
|
|
217
217
|
|
|
218
218
|
try:
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
is None
|
|
223
|
-
):
|
|
224
|
-
timestamp = isoparse(row[self._timestamp_column_index])
|
|
225
|
-
else:
|
|
219
|
+
timestamp_format = (self._data_source.settings["transformer"].get("timestampFormat") or
|
|
220
|
+
self._data_source.settings["transformer"].get("timestamp", {}).get("format"))
|
|
221
|
+
if timestamp_format == "custom":
|
|
226
222
|
timestamp = datetime.strptime(
|
|
227
|
-
row[self._timestamp_column_index],
|
|
228
|
-
self._data_source.settings["transformer"].get("timestampFormat"),
|
|
223
|
+
row[self._timestamp_column_index], timestamp_format,
|
|
229
224
|
)
|
|
225
|
+
else:
|
|
226
|
+
timestamp = isoparse(row[self._timestamp_column_index])
|
|
230
227
|
except ValueError as e:
|
|
231
228
|
raise TimestampParsingError(str(e)) from e
|
|
232
229
|
|
|
233
230
|
if timestamp.tzinfo is None:
|
|
234
|
-
|
|
231
|
+
timestamp_offset = self._data_source.settings["transformer"].get(
|
|
235
232
|
"timestampOffset"
|
|
236
233
|
) or self._data_source.settings["transformer"].get(
|
|
237
|
-
"
|
|
238
|
-
).
|
|
234
|
+
"timestamp", {}
|
|
235
|
+
).get("offset")
|
|
236
|
+
if not timestamp_offset or timestamp_offset.endswith(
|
|
239
237
|
"0000"
|
|
240
238
|
):
|
|
241
239
|
timestamp = timestamp.replace(tzinfo=timezone.utc)
|
|
@@ -243,13 +241,9 @@ class HydroServerETLCSV:
|
|
|
243
241
|
try:
|
|
244
242
|
timestamp = timestamp.replace(
|
|
245
243
|
tzinfo=datetime.strptime(
|
|
246
|
-
|
|
247
|
-
"timestampOffset"
|
|
248
|
-
)[:-2]
|
|
244
|
+
timestamp_offset[:-2]
|
|
249
245
|
+ ":"
|
|
250
|
-
+
|
|
251
|
-
"timestampOffset"
|
|
252
|
-
)[3:],
|
|
246
|
+
+ timestamp_offset[3:],
|
|
253
247
|
"%z",
|
|
254
248
|
).tzinfo
|
|
255
249
|
)
|
|
@@ -5,10 +5,10 @@ hydroserverpy/api/utils.py,sha256=1RUglpvegBZOcu9BEExxsAzaGOyu4tdUk2JyiBEbzxI,49
|
|
|
5
5
|
hydroserverpy/api/models/__init__.py,sha256=NLq95t1oC2co5aqVYSw9Pq0RAsLHnLjNq1tsgbMepTg,773
|
|
6
6
|
hydroserverpy/api/models/base.py,sha256=mQZbanDg9t2GN9mOR_XOOtAfYF7AkY0fBZ6fHat6NRs,6944
|
|
7
7
|
hydroserverpy/api/models/etl/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
8
|
-
hydroserverpy/api/models/etl/data_archive.py,sha256=
|
|
9
|
-
hydroserverpy/api/models/etl/data_source.py,sha256=
|
|
8
|
+
hydroserverpy/api/models/etl/data_archive.py,sha256=rnmD_FQ1yjJ0KPBigylAQ3uQ6QBppJtBopJK4oCPLSo,2613
|
|
9
|
+
hydroserverpy/api/models/etl/data_source.py,sha256=4s5JfpF00Heir9T1oc_KAUdI3z5Jj8ce8R56KqQqm5A,3959
|
|
10
10
|
hydroserverpy/api/models/etl/orchestration_configuration.py,sha256=ElSrgi7ioFZJFJg6aGogW5ZZk7fA17y4p--yWwiOhZ0,1367
|
|
11
|
-
hydroserverpy/api/models/etl/orchestration_system.py,sha256=
|
|
11
|
+
hydroserverpy/api/models/etl/orchestration_system.py,sha256=5wdGsXCMqHfE3--zG-3WAPAVPNMPIx99y-7UUhdCink,2060
|
|
12
12
|
hydroserverpy/api/models/iam/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
13
13
|
hydroserverpy/api/models/iam/account.py,sha256=7COk_CPYFlthg1uFWTBlJESfnuqMW90TSjZoIcBb-_8,439
|
|
14
14
|
hydroserverpy/api/models/iam/apikey.py,sha256=Z4iXg_K056naT3ogwc5wzyNnRpxHkOCz0lk-Gim4eL8,3146
|
|
@@ -16,13 +16,13 @@ hydroserverpy/api/models/iam/collaborator.py,sha256=w1D72PsiwmdgFVNlkNV3TPjMR6lx
|
|
|
16
16
|
hydroserverpy/api/models/iam/role.py,sha256=zYTzMwnnpelZHP0uPg3vZqWqcpSROqrJ58bVkpFeTEQ,1092
|
|
17
17
|
hydroserverpy/api/models/iam/workspace.py,sha256=hB4W8b_cC9WhBmwGHX_VfDjqriniQgvc2BKz_j9Gh0U,8884
|
|
18
18
|
hydroserverpy/api/models/sta/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
19
|
-
hydroserverpy/api/models/sta/datastream.py,sha256=
|
|
19
|
+
hydroserverpy/api/models/sta/datastream.py,sha256=1JILQUZAipxGLHY8zVPRQzXZTq5ktTVWK7dPcvTjjZY,8736
|
|
20
20
|
hydroserverpy/api/models/sta/observation.py,sha256=oIqm4I98rnN7cAVL6tcWBXluC6qIfO1h4WhwP7R9LXs,3641
|
|
21
21
|
hydroserverpy/api/models/sta/observed_property.py,sha256=KpeU8mn0U-e6iBQh34YewSBEC4fY88sJr30B8O6kiXQ,1204
|
|
22
22
|
hydroserverpy/api/models/sta/processing_level.py,sha256=OQKc3pxi6ST36O7qEmLPA6ALXpuUXW2ADhR7XX-CaBk,1080
|
|
23
23
|
hydroserverpy/api/models/sta/result_qualifier.py,sha256=kenPF1B11Q5aa3c7mnHcmMmSQMziWNyiYxGK1Il4Df8,1012
|
|
24
24
|
hydroserverpy/api/models/sta/sensor.py,sha256=rOuMZAcqgSYr-ZHm66EbnoXx_6-UZLeeQXZv59AHIAY,1559
|
|
25
|
-
hydroserverpy/api/models/sta/thing.py,sha256=
|
|
25
|
+
hydroserverpy/api/models/sta/thing.py,sha256=c7nOvMcnNZ18pr9oOgArnUK4Ei8UgZjXORaaoeemTW8,4108
|
|
26
26
|
hydroserverpy/api/models/sta/unit.py,sha256=H_0HyE5-ni1lglaORSaaxF0c6ZreroeQgN4JcMynkTQ,1094
|
|
27
27
|
hydroserverpy/api/services/__init__.py,sha256=Nb7rc1Zt8kpRElgFdWPdcyUDrtm7XdJDgzes90EzNKQ,566
|
|
28
28
|
hydroserverpy/api/services/base.py,sha256=f7CoQ1m-pdgVwqJsdvE7vcannw-3i7yJgBMI4eHZxAQ,3725
|
|
@@ -34,7 +34,7 @@ hydroserverpy/api/services/iam/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5
|
|
|
34
34
|
hydroserverpy/api/services/iam/role.py,sha256=PV0odC_lL9kV3ggrTjAUEMTo0WNUzv4AeMHNAXlkbN8,1137
|
|
35
35
|
hydroserverpy/api/services/iam/workspace.py,sha256=V4ter_XJQocdXB-11IRdL5jzVmXdtOHlbAuqw42bEks,7995
|
|
36
36
|
hydroserverpy/api/services/sta/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
37
|
-
hydroserverpy/api/services/sta/datastream.py,sha256=
|
|
37
|
+
hydroserverpy/api/services/sta/datastream.py,sha256=Cnse8etWeWmRF3g5NG4Wmok0_11ZVq46p269QX2yhJ4,11450
|
|
38
38
|
hydroserverpy/api/services/sta/observed_property.py,sha256=hKoTXRhoJSveR7S9KuokUowadhS3b1VFE-VqCnMRbvU,2516
|
|
39
39
|
hydroserverpy/api/services/sta/processing_level.py,sha256=d5ReGxX193NsYW18k1RWPPIBoEsDPc6LVerDAD_UBvs,2175
|
|
40
40
|
hydroserverpy/api/services/sta/result_qualifier.py,sha256=gkgofUqzGXgdkyAvK9RW_dyTn1MPxpd99jdcn7zpWHM,1783
|
|
@@ -59,12 +59,12 @@ hydroserverpy/etl/transformers/csv_transformer.py,sha256=0kWfRKPwiGxCNZ87Q4SiBlf
|
|
|
59
59
|
hydroserverpy/etl/transformers/json_transformer.py,sha256=R7tSyDB4Wn1snP75ctbEDMaMCdjyhPnMzN_W2VV3Mv4,1506
|
|
60
60
|
hydroserverpy/etl_csv/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
61
61
|
hydroserverpy/etl_csv/exceptions.py,sha256=0UY8YUlNepG0y6FfH36hJyR1bOhwYHSZIdUSSMTg7GA,314
|
|
62
|
-
hydroserverpy/etl_csv/hydroserver_etl_csv.py,sha256=
|
|
62
|
+
hydroserverpy/etl_csv/hydroserver_etl_csv.py,sha256=uco-FFOPk8oA4R4iWLEtcdKUT6EWa7r5h1_BWPjANjo,14359
|
|
63
63
|
hydroserverpy/quality/__init__.py,sha256=GGBMkFSXciJLYrbV-NraFrj_mXWCy_GTcy9KKrKXU4c,84
|
|
64
64
|
hydroserverpy/quality/service.py,sha256=U02UfLKVmFvr5ySiH0n0JYzUIabq5uprrHIiwcqBlqY,13879
|
|
65
|
-
hydroserverpy-1.3.
|
|
66
|
-
hydroserverpy-1.3.
|
|
67
|
-
hydroserverpy-1.3.
|
|
68
|
-
hydroserverpy-1.3.
|
|
69
|
-
hydroserverpy-1.3.
|
|
70
|
-
hydroserverpy-1.3.
|
|
65
|
+
hydroserverpy-1.3.0b3.dist-info/licenses/LICENSE,sha256=xVqFxDw3QOEJukakL7gQCqIMTQ1dlSCTo6Oc1otNW80,1508
|
|
66
|
+
hydroserverpy-1.3.0b3.dist-info/METADATA,sha256=LfvAvRE5JhA_W9ePceuUCiYMuWsl44b_PdlR3woCe8E,532
|
|
67
|
+
hydroserverpy-1.3.0b3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
68
|
+
hydroserverpy-1.3.0b3.dist-info/top_level.txt,sha256=Zf37hrncXLOYvXhgCrf5mZdeq81G9fShdE2LfYbtb7w,14
|
|
69
|
+
hydroserverpy-1.3.0b3.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
70
|
+
hydroserverpy-1.3.0b3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|