forked from noi-techpark/bdp-elaborations
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch '31-connect-to-road-weather-data-on-odh' into 'main'
Resolve "Connect to road weather data on ODH" Closes noi-techpark#31 See merge request u-hopper/projects/industrial/open-data-hub-bz/bdp-elaborations!23
- Loading branch information
Showing
20 changed files
with
386 additions
and
110 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,21 @@ | ||
# SPDX-FileCopyrightText: NOI Techpark <[email protected]> | ||
# | ||
# SPDX-License-Identifier: AGPL-3.0-or-later | ||
|
||
from abc import ABC | ||
from typing import List, Optional | ||
from typing import List, Optional, Type | ||
|
||
from common.cache.computation_checkpoint import ComputationCheckpointCache | ||
from common.connector.collector import ConnectorCollector | ||
from common.connector.common import ODHBaseConnector | ||
from common.data_model import Station, Provenance | ||
|
||
|
||
class StationManager(ABC): | ||
""" | ||
Manager in charge of the retrieval of the stations. | ||
""" | ||
station_list_connector: ODHBaseConnector = None | ||
|
||
def __init__(self, connector_collector: ConnectorCollector, provenance: Provenance, | ||
checkpoint_cache: Optional[ComputationCheckpointCache] = None): | ||
|
@@ -19,5 +25,10 @@ def __init__(self, connector_collector: ConnectorCollector, provenance: Provenan | |
self._create_data_types = True | ||
|
||
def get_station_list(self) -> List[Station]: | ||
# TODO: implement the retrieval of the stations | ||
pass | ||
""" | ||
Retrieve the list of stations | ||
""" | ||
if self.station_list_connector is None: | ||
raise NotImplementedError("The station_list_connector must be defined") | ||
|
||
return self.station_list_connector.get_station_list() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,15 @@ | ||
# SPDX-FileCopyrightText: NOI Techpark <[email protected]> | ||
# | ||
# SPDX-License-Identifier: AGPL-3.0-or-later | ||
|
||
whitelist: | ||
- 2021 | ||
- 2022 | ||
- 1888 | ||
- 2023 | ||
|
||
mappings: | ||
2021: 01 | ||
2022: 02 | ||
1888: 03 | ||
2023: 04 | ||
2021: "101" | ||
2022: "102" | ||
1888: "103" | ||
2023: "104" |
Oops, something went wrong.