From 33c773286c00dacdc3271a0c4ba14d8ac70e7074 Mon Sep 17 00:00:00 2001 From: Guille Date: Tue, 15 Dec 2020 09:59:07 -0500 Subject: [PATCH] Add inheritance to the facilities and improve the class naming --- .../{domestic_hot_water_facility.py => domestic_hot_water.py} | 3 ++- ...{electric_appliances_facility.py => electric_appliances.py} | 3 ++- city_model_structure/attributes/{hvac_facility.py => hvac.py} | 3 ++- .../attributes/{lighting_facility.py => lighting.py} | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) rename city_model_structure/attributes/{domestic_hot_water_facility.py => domestic_hot_water.py} (92%) rename city_model_structure/attributes/{electric_appliances_facility.py => electric_appliances.py} (83%) rename city_model_structure/attributes/{hvac_facility.py => hvac.py} (88%) rename city_model_structure/attributes/{lighting_facility.py => lighting.py} (84%) diff --git a/city_model_structure/attributes/domestic_hot_water_facility.py b/city_model_structure/attributes/domestic_hot_water.py similarity index 92% rename from city_model_structure/attributes/domestic_hot_water_facility.py rename to city_model_structure/attributes/domestic_hot_water.py index 300c803e..fc9a69fc 100644 --- a/city_model_structure/attributes/domestic_hot_water_facility.py +++ b/city_model_structure/attributes/domestic_hot_water.py @@ -3,9 +3,10 @@ Building module SPDX - License - Identifier: LGPL - 3.0 - or -later Copyright © 2020 Project Author Sanam Dabirian sanam.dabirian@mail.concordia.ca """ +from city_model_structure.attributes.facility import Facility -class DomesticHotWaterFacility: +class DomesticHotWater(Facility): """ Domestic Hot Water facilities class """ diff --git a/city_model_structure/attributes/electric_appliances_facility.py b/city_model_structure/attributes/electric_appliances.py similarity index 83% rename from city_model_structure/attributes/electric_appliances_facility.py rename to city_model_structure/attributes/electric_appliances.py index e23d689a..ed0dc2c3 100644 --- a/city_model_structure/attributes/electric_appliances_facility.py +++ b/city_model_structure/attributes/electric_appliances.py @@ -3,9 +3,10 @@ Building module SPDX - License - Identifier: LGPL - 3.0 - or -later Copyright © 2020 Project Author Sanam Dabirian sanam.dabirian@mail.concordia.ca """ +from city_model_structure.attributes.facility import Facility -class ElectricAppliancesFacility: +class ElectricAppliances(Facility): """ Electric appliance facilities class """ diff --git a/city_model_structure/attributes/hvac_facility.py b/city_model_structure/attributes/hvac.py similarity index 88% rename from city_model_structure/attributes/hvac_facility.py rename to city_model_structure/attributes/hvac.py index 3253dd7f..92826d39 100644 --- a/city_model_structure/attributes/hvac_facility.py +++ b/city_model_structure/attributes/hvac.py @@ -3,9 +3,10 @@ Building module SPDX - License - Identifier: LGPL - 3.0 - or -later Copyright © 2020 Project Author Sanam Dabirian sanam.dabirian@mail.concordia.ca """ +from city_model_structure.attributes.facility import Facility -class HvacFacility: +class Hvac(Facility): """ HVAC facilities class """ diff --git a/city_model_structure/attributes/lighting_facility.py b/city_model_structure/attributes/lighting.py similarity index 84% rename from city_model_structure/attributes/lighting_facility.py rename to city_model_structure/attributes/lighting.py index c70fa87d..9c91e7e5 100644 --- a/city_model_structure/attributes/lighting_facility.py +++ b/city_model_structure/attributes/lighting.py @@ -3,9 +3,10 @@ Building module SPDX - License - Identifier: LGPL - 3.0 - or -later Copyright © 2020 Project Author Sanam Dabirian sanam.dabirian@mail.concordia.ca """ +from city_model_structure.attributes.facility import Facility -class LightingFacility: +class Lighting(Facility): """ Lighting facilities class """