hydroserverpy 0.5.0b4__tar.gz → 1.0.0__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 hydroserverpy might be problematic. Click here for more details.
- {hydroserverpy-0.5.0b4/src/hydroserverpy.egg-info → hydroserverpy-1.0.0}/PKG-INFO +1 -1
- {hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/setup.cfg +1 -1
- {hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy/api/models/sta/datastream.py +20 -0
- {hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy/etl_csv/hydroserver_etl_csv.py +6 -2
- {hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0/src/hydroserverpy.egg-info}/PKG-INFO +1 -1
- {hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/LICENSE +0 -0
- {hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/README.md +0 -0
- {hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/pyproject.toml +0 -0
- {hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/setup.py +0 -0
- {hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy/__init__.py +0 -0
- {hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy/api/__init__.py +0 -0
- {hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy/api/http.py +0 -0
- {hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy/api/main.py +0 -0
- {hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy/api/models/__init__.py +0 -0
- {hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy/api/models/base.py +0 -0
- {hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy/api/models/etl/__init__.py +0 -0
- {hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy/api/models/etl/data_archive.py +0 -0
- {hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy/api/models/etl/data_source.py +0 -0
- {hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy/api/models/etl/orchestration_configuration.py +0 -0
- {hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy/api/models/etl/orchestration_system.py +0 -0
- {hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy/api/models/iam/__init__.py +0 -0
- {hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy/api/models/iam/account.py +0 -0
- {hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy/api/models/iam/collaborator.py +0 -0
- {hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy/api/models/iam/role.py +0 -0
- {hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy/api/models/iam/workspace.py +0 -0
- {hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy/api/models/sta/__init__.py +0 -0
- {hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy/api/models/sta/observed_property.py +0 -0
- {hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy/api/models/sta/processing_level.py +0 -0
- {hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy/api/models/sta/result_qualifier.py +0 -0
- {hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy/api/models/sta/sensor.py +0 -0
- {hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy/api/models/sta/thing.py +0 -0
- {hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy/api/models/sta/unit.py +0 -0
- {hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy/api/services/__init__.py +0 -0
- {hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy/api/services/base.py +0 -0
- {hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy/api/services/etl/__init__.py +0 -0
- {hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy/api/services/etl/data_archive.py +0 -0
- {hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy/api/services/etl/data_source.py +0 -0
- {hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy/api/services/etl/orchestration_system.py +0 -0
- {hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy/api/services/iam/__init__.py +0 -0
- {hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy/api/services/iam/workspace.py +0 -0
- {hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy/api/services/sta/__init__.py +0 -0
- {hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy/api/services/sta/datastream.py +0 -0
- {hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy/api/services/sta/observed_property.py +0 -0
- {hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy/api/services/sta/processing_level.py +0 -0
- {hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy/api/services/sta/result_qualifier.py +0 -0
- {hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy/api/services/sta/sensor.py +0 -0
- {hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy/api/services/sta/thing.py +0 -0
- {hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy/api/services/sta/unit.py +0 -0
- {hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy/etl/__init__.py +0 -0
- {hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy/etl/extractors/__init__.py +0 -0
- {hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy/etl/extractors/base.py +0 -0
- {hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy/etl/extractors/ftp_extractor.py +0 -0
- {hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy/etl/extractors/http_extractor.py +0 -0
- {hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy/etl/extractors/local_file_extractor.py +0 -0
- {hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy/etl/hydroserver_etl.py +0 -0
- {hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy/etl/loaders/__init__.py +0 -0
- {hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy/etl/loaders/base.py +0 -0
- {hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy/etl/loaders/hydroserver_loader.py +0 -0
- {hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy/etl/transformers/__init__.py +0 -0
- {hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy/etl/transformers/base.py +0 -0
- {hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy/etl/transformers/csv_transformer.py +0 -0
- {hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy/etl/transformers/json_transformer.py +0 -0
- {hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy/etl/types.py +0 -0
- {hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy/etl_csv/__init__.py +0 -0
- {hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy/etl_csv/exceptions.py +0 -0
- {hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy/quality/__init__.py +0 -0
- {hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy/quality/service.py +0 -0
- {hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy.egg-info/SOURCES.txt +0 -0
- {hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy.egg-info/dependency_links.txt +0 -0
- {hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy.egg-info/requires.txt +0 -0
- {hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy.egg-info/top_level.txt +0 -0
- {hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy.egg-info/zip-safe +0 -0
{hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy/api/models/sta/datastream.py
RENAMED
|
@@ -320,3 +320,23 @@ class Datastream(HydroServerModel, DatastreamFields):
|
|
|
320
320
|
uid=self.uid,
|
|
321
321
|
observations=observations,
|
|
322
322
|
)
|
|
323
|
+
|
|
324
|
+
# TODO: Find a better long-term solution for this issue.
|
|
325
|
+
def sync_phenomenon_end_time(self):
|
|
326
|
+
"""Ensures the phenomenon_end_time field matches the actual end time of the observations."""
|
|
327
|
+
|
|
328
|
+
response = self._connection.request(
|
|
329
|
+
"get", f"/api/data/datastreams/{str(self.uid)}/observations",
|
|
330
|
+
params={
|
|
331
|
+
"order": "desc",
|
|
332
|
+
"page": 1,
|
|
333
|
+
"page_size": 1
|
|
334
|
+
}
|
|
335
|
+
).json()
|
|
336
|
+
|
|
337
|
+
if len(response["phenomenon_time"]) > 0:
|
|
338
|
+
self.phenomenon_end_time = datetime.fromisoformat(response["phenomenon_time"][0])
|
|
339
|
+
else:
|
|
340
|
+
self.phenomenon_end_time = None
|
|
341
|
+
|
|
342
|
+
self.save()
|
{hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy/etl_csv/hydroserver_etl_csv.py
RENAMED
|
@@ -52,7 +52,7 @@ class HydroServerETLCSV:
|
|
|
52
52
|
self._file_header_error = False
|
|
53
53
|
self._file_timestamp_error = False
|
|
54
54
|
|
|
55
|
-
self._chunk_size =
|
|
55
|
+
self._chunk_size = 1000
|
|
56
56
|
self._observations = {}
|
|
57
57
|
|
|
58
58
|
def run(self):
|
|
@@ -125,6 +125,9 @@ class HydroServerETLCSV:
|
|
|
125
125
|
timestamp = self._parse_row_timestamp(row)
|
|
126
126
|
|
|
127
127
|
for datastream in self._datastreams.values():
|
|
128
|
+
if index == self._data_source.settings["transformer"]["dataStartRow"]:
|
|
129
|
+
datastream.sync_phenomenon_end_time()
|
|
130
|
+
|
|
128
131
|
if str(datastream.uid) not in self._datastream_start_row_indexes.keys():
|
|
129
132
|
if (
|
|
130
133
|
not datastream.phenomenon_end_time
|
|
@@ -296,8 +299,9 @@ class HydroServerETLCSV:
|
|
|
296
299
|
uid=datastream_id,
|
|
297
300
|
observations=observations_df,
|
|
298
301
|
)
|
|
299
|
-
except HTTPError:
|
|
302
|
+
except HTTPError as e:
|
|
300
303
|
failed_datastreams.append(datastream_id)
|
|
304
|
+
logger.error(f"Failed to POST observations to datastream: {str(datastream_id)} - {e}")
|
|
301
305
|
|
|
302
306
|
elif datastream_id in self._failed_datastreams:
|
|
303
307
|
logger.info(
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy/api/models/etl/data_archive.py
RENAMED
|
File without changes
|
{hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy/api/models/etl/data_source.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy/api/models/iam/collaborator.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy/api/models/sta/observed_property.py
RENAMED
|
File without changes
|
{hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy/api/models/sta/processing_level.py
RENAMED
|
File without changes
|
{hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy/api/models/sta/result_qualifier.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy/api/services/etl/__init__.py
RENAMED
|
File without changes
|
{hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy/api/services/etl/data_archive.py
RENAMED
|
File without changes
|
{hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy/api/services/etl/data_source.py
RENAMED
|
File without changes
|
|
File without changes
|
{hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy/api/services/iam/__init__.py
RENAMED
|
File without changes
|
{hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy/api/services/iam/workspace.py
RENAMED
|
File without changes
|
{hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy/api/services/sta/__init__.py
RENAMED
|
File without changes
|
{hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy/api/services/sta/datastream.py
RENAMED
|
File without changes
|
|
File without changes
|
{hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy/api/services/sta/processing_level.py
RENAMED
|
File without changes
|
{hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy/api/services/sta/result_qualifier.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy/etl/extractors/ftp_extractor.py
RENAMED
|
File without changes
|
{hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy/etl/extractors/http_extractor.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy/etl/loaders/hydroserver_loader.py
RENAMED
|
File without changes
|
{hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy/etl/transformers/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy/etl/transformers/csv_transformer.py
RENAMED
|
File without changes
|
{hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy/etl/transformers/json_transformer.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{hydroserverpy-0.5.0b4 → hydroserverpy-1.0.0}/src/hydroserverpy.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|