From 19fc822147d9b4f074e8270a7c40348aa52d825f Mon Sep 17 00:00:00 2001 From: guille Date: Mon, 6 Feb 2023 06:50:58 -0500 Subject: [PATCH] Small bug correction in the new dictionary structure --- .../data/alkis_function_to_hub_function.py | 2 +- .../data/hft_function_to_hub_function.py | 2 +- ...function_to_nrcan_construction_function.py | 2 +- ..._function_to_nrel_construction_function.py | 2 +- hub/helpers/data/hub_usage_to_comnet_usage.py | 2 +- hub/helpers/data/hub_usage_to_hft_usage.py | 2 +- hub/helpers/data/hub_usage_to_nrcan_usage.py | 2 +- .../data/montreal_function_to_hub_function.py | 2 +- .../data/pluto_function_to_hub_function.py | 2 +- hub/helpers/dictionaries.py | 36 +++++++++---------- setup.py | 1 + 11 files changed, 28 insertions(+), 27 deletions(-) diff --git a/hub/helpers/data/alkis_function_to_hub_function.py b/hub/helpers/data/alkis_function_to_hub_function.py index 04af61a2..37273db0 100644 --- a/hub/helpers/data/alkis_function_to_hub_function.py +++ b/hub/helpers/data/alkis_function_to_hub_function.py @@ -181,5 +181,5 @@ class AlkisFunctionToHubFunction: } @property - def dictionary(self): + def dictionary(self) -> dict: return self._dictionary diff --git a/hub/helpers/data/hft_function_to_hub_function.py b/hub/helpers/data/hft_function_to_hub_function.py index 3ea20071..00f63a53 100644 --- a/hub/helpers/data/hft_function_to_hub_function.py +++ b/hub/helpers/data/hft_function_to_hub_function.py @@ -28,5 +28,5 @@ class HftFunctionToHubFunction: } @property - def dictionary(self): + def dictionary(self) -> dict: return self._dictionary diff --git a/hub/helpers/data/hub_function_to_nrcan_construction_function.py b/hub/helpers/data/hub_function_to_nrcan_construction_function.py index 5c070c35..c54382c3 100644 --- a/hub/helpers/data/hub_function_to_nrcan_construction_function.py +++ b/hub/helpers/data/hub_function_to_nrcan_construction_function.py @@ -74,5 +74,5 @@ class HubFunctionToNrcanConstructionFunction: } @property - def dictionary(self): + def dictionary(self) -> dict: return self._dictionary diff --git a/hub/helpers/data/hub_function_to_nrel_construction_function.py b/hub/helpers/data/hub_function_to_nrel_construction_function.py index 507c4e59..e1f62aec 100644 --- a/hub/helpers/data/hub_function_to_nrel_construction_function.py +++ b/hub/helpers/data/hub_function_to_nrel_construction_function.py @@ -74,5 +74,5 @@ class HubFunctionToNrelConstructionFunction: } @property - def dictionary(self): + def dictionary(self) -> dict: return self._dictionary diff --git a/hub/helpers/data/hub_usage_to_comnet_usage.py b/hub/helpers/data/hub_usage_to_comnet_usage.py index dbdf6861..8a6cc2c3 100644 --- a/hub/helpers/data/hub_usage_to_comnet_usage.py +++ b/hub/helpers/data/hub_usage_to_comnet_usage.py @@ -74,5 +74,5 @@ class HubUsageToComnetUsage: } @property - def dictionary(self): + def dictionary(self) -> dict: return self._dictionary diff --git a/hub/helpers/data/hub_usage_to_hft_usage.py b/hub/helpers/data/hub_usage_to_hft_usage.py index bde32dc3..a05a2ba0 100644 --- a/hub/helpers/data/hub_usage_to_hft_usage.py +++ b/hub/helpers/data/hub_usage_to_hft_usage.py @@ -74,5 +74,5 @@ class HubUsageToHftUsage: } @property - def dictionary(self): + def dictionary(self) -> dict: return self._dictionary diff --git a/hub/helpers/data/hub_usage_to_nrcan_usage.py b/hub/helpers/data/hub_usage_to_nrcan_usage.py index f8594dc8..b792d0d2 100644 --- a/hub/helpers/data/hub_usage_to_nrcan_usage.py +++ b/hub/helpers/data/hub_usage_to_nrcan_usage.py @@ -74,5 +74,5 @@ class HubUsageToNrcanUsage: } @property - def dictionary(self): + def dictionary(self) -> dict: return self._dictionary diff --git a/hub/helpers/data/montreal_function_to_hub_function.py b/hub/helpers/data/montreal_function_to_hub_function.py index a89fb030..6658ec86 100644 --- a/hub/helpers/data/montreal_function_to_hub_function.py +++ b/hub/helpers/data/montreal_function_to_hub_function.py @@ -546,5 +546,5 @@ class MontrealFunctionToHubFunction: } @property - def dictionary(self): + def dictionary(self) -> dict: return self._dictionary diff --git a/hub/helpers/data/pluto_function_to_hub_function.py b/hub/helpers/data/pluto_function_to_hub_function.py index 131e6496..c7a640d8 100644 --- a/hub/helpers/data/pluto_function_to_hub_function.py +++ b/hub/helpers/data/pluto_function_to_hub_function.py @@ -213,5 +213,5 @@ class PlutoFunctionToHubFunction: } @property - def dictionary(self): + def dictionary(self) -> dict: return self._dictionary diff --git a/hub/helpers/dictionaries.py b/hub/helpers/dictionaries.py index 6fed7514..3561d682 100644 --- a/hub/helpers/dictionaries.py +++ b/hub/helpers/dictionaries.py @@ -21,72 +21,72 @@ class Dictionaries: """ @property - def hub_usage_to_hft_usage(self): + def hub_usage_to_hft_usage(self) -> dict: """ Hub usage to HfT usage, transformation dictionary :return: dict """ - return HubUsageToHftUsage.dictionary + return HubUsageToHftUsage().dictionary @property - def hub_usage_to_comnet_usage(self): + def hub_usage_to_comnet_usage(self) -> dict: """ Hub usage to Comnet usage, transformation dictionary :return: dict """ - return HubUsageToComnetUsage.dictionary + return HubUsageToComnetUsage().dictionary @property - def hub_usage_to_nrcan_usage(self): + def hub_usage_to_nrcan_usage(self) -> dict: """ Get hub usage to NRCAN usage, transformation dictionary :return: dict """ - return HubUsageToNrcanUsage.dictionary + return HubUsageToNrcanUsage().dictionary @property - def hub_function_to_nrcan_construction_function(self): + def hub_function_to_nrcan_construction_function(self) -> dict: """ Get hub function to NRCAN construction function, transformation dictionary :return: dict """ - return HubFunctionToNrcanConstructionFunction.dictionary + return HubFunctionToNrcanConstructionFunction().dictionary @property - def hub_function_to_nrel_construction_function(self): + def hub_function_to_nrel_construction_function(self) -> dict: """ Get hub function to NREL construction function, transformation dictionary :return: dict """ - return HubFunctionToNrelConstructionFunction.dictionary + return HubFunctionToNrelConstructionFunction().dictionary @property - def pluto_function_to_hub_function(self): + def pluto_function_to_hub_function(self) -> dict: """ Get Pluto function to hub function, transformation dictionary :return: dict """ - return PlutoFunctionToHubFunction.dictionary + return PlutoFunctionToHubFunction().dictionary @property - def hft_function_to_hub_function(self): + def hft_function_to_hub_function(self) -> dict: """ Get Hft function to hub function, transformation dictionary :return: dict """ - return HftFunctionToHubFunction.dictionary + return HftFunctionToHubFunction().dictionary @property - def montreal_function_to_hub_function(self): + def montreal_function_to_hub_function(self) -> dict: """ Get Montreal function to hub function, transformation dictionary """ - return MontrealFunctionToHubFunction.dictionary + return MontrealFunctionToHubFunction().dictionary @property - def alkis_function_to_hub_function(self): + def alkis_function_to_hub_function(self) -> dict: """ Get Alkis function to hub function, transformation dictionary """ - return AlkisFunctionToHubFunction.dictionary + return AlkisFunctionToHubFunction().dictionary diff --git a/setup.py b/setup.py index f1a5ca19..3df811c3 100644 --- a/setup.py +++ b/setup.py @@ -62,6 +62,7 @@ setup( 'hub.exports.energy_systems', 'hub.exports.formats', 'hub.helpers', + 'hub.helpers.data', 'hub.hub_logger', 'hub.imports', 'hub.imports.construction',