hydroserverpy 1.3.0b2__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/services/sta/datastream.py +0 -2
- hydroserverpy/etl_csv/hydroserver_etl_csv.py +17 -23
- {hydroserverpy-1.3.0b2.dist-info → hydroserverpy-1.3.0b3.dist-info}/METADATA +1 -1
- {hydroserverpy-1.3.0b2.dist-info → hydroserverpy-1.3.0b3.dist-info}/RECORD +8 -8
- {hydroserverpy-1.3.0b2.dist-info → hydroserverpy-1.3.0b3.dist-info}/WHEEL +0 -0
- {hydroserverpy-1.3.0b2.dist-info → hydroserverpy-1.3.0b3.dist-info}/licenses/LICENSE +0 -0
- {hydroserverpy-1.3.0b2.dist-info → hydroserverpy-1.3.0b3.dist-info}/top_level.txt +0 -0
- {hydroserverpy-1.3.0b2.dist-info → hydroserverpy-1.3.0b3.dist-info}/zip-safe +0 -0
|
@@ -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
|
)
|
|
@@ -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
|