forked from s_ranjbar/city_retrofit
Consistence improvements and name fixing
This commit is contained in:
parent
f39c1deff4
commit
408a32f781
|
@ -8,7 +8,7 @@ Project Coder Guille Gutierrez guillermo.gutierrezmorote@concordia.ca
|
|||
|
||||
class Catalog:
|
||||
"""
|
||||
Catalogs base class not implemented instance of the Catalog base class,
|
||||
Catalogs base class
|
||||
catalog_factories will inherit from this class.
|
||||
"""
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ from hub.catalog_factories.cost.montreal_custom_catalog import MontrealCustomCat
|
|||
Catalog = TypeVar('Catalog')
|
||||
|
||||
|
||||
class CostCatalogFactory:
|
||||
class CostsCatalogFactory:
|
||||
"""
|
||||
CostsCatalogFactory class
|
||||
"""
|
||||
|
|
|
@ -24,7 +24,7 @@ class OperationalCost:
|
|||
def fuels(self) -> List[Fuel]:
|
||||
"""
|
||||
Get fuels listed in capital costs
|
||||
:return: [FUEL]
|
||||
:return: [Fuel]
|
||||
"""
|
||||
return self._fuels
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ from typing import Union
|
|||
|
||||
from hub.catalog_factories.data_models.usages.appliances import Appliances
|
||||
from hub.catalog_factories.data_models.usages.lighting import Lighting
|
||||
from hub.catalog_factories.data_models.usages.ocupancy import Occupancy
|
||||
from hub.catalog_factories.data_models.usages.occupancy import Occupancy
|
||||
from hub.catalog_factories.data_models.usages.thermal_control import ThermalControl
|
||||
from hub.catalog_factories.data_models.usages.domestic_hot_water import DomesticHotWater
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ from hub.catalog_factories.catalog import Catalog
|
|||
from hub.catalog_factories.data_models.usages.appliances import Appliances
|
||||
from hub.catalog_factories.data_models.usages.content import Content
|
||||
from hub.catalog_factories.data_models.usages.lighting import Lighting
|
||||
from hub.catalog_factories.data_models.usages.ocupancy import Occupancy
|
||||
from hub.catalog_factories.data_models.usages.occupancy import Occupancy
|
||||
from hub.catalog_factories.data_models.usages.domestic_hot_water import DomesticHotWater
|
||||
from hub.catalog_factories.data_models.usages.schedule import Schedule
|
||||
from hub.catalog_factories.data_models.usages.thermal_control import ThermalControl
|
||||
|
|
|
@ -15,7 +15,7 @@ from hub.catalog_factories.catalog import Catalog
|
|||
from hub.catalog_factories.data_models.usages.appliances import Appliances
|
||||
from hub.catalog_factories.data_models.usages.content import Content
|
||||
from hub.catalog_factories.data_models.usages.lighting import Lighting
|
||||
from hub.catalog_factories.data_models.usages.ocupancy import Occupancy
|
||||
from hub.catalog_factories.data_models.usages.occupancy import Occupancy
|
||||
from hub.catalog_factories.data_models.usages.domestic_hot_water import DomesticHotWater
|
||||
from hub.catalog_factories.data_models.usages.schedule import Schedule
|
||||
from hub.catalog_factories.data_models.usages.thermal_control import ThermalControl
|
||||
|
|
|
@ -72,14 +72,14 @@ class TestCityMerge(TestCase):
|
|||
for surface in building.surfaces:
|
||||
if surface.global_irradiance:
|
||||
merged_city_building_total_radiation += surface.global_irradiance[cte.YEAR].iloc[0, 0]
|
||||
self.assertEqual(447383461, merged_city_building_total_radiation)
|
||||
self.assertEqual(438405954, merged_city_building_total_radiation)
|
||||
merged_city = par_city.merge(full_city)
|
||||
merged_city_building_total_radiation = 0
|
||||
for building in merged_city.buildings:
|
||||
for surface in building.surfaces:
|
||||
if surface.global_irradiance:
|
||||
merged_city_building_total_radiation += surface.global_irradiance[cte.YEAR].iloc[0, 0]
|
||||
self.assertEqual(447383461, merged_city_building_total_radiation)
|
||||
self.assertEqual(438405954, merged_city_building_total_radiation)
|
||||
|
||||
for building in par_city.buildings:
|
||||
for surface in building.surfaces:
|
||||
|
@ -91,12 +91,12 @@ class TestCityMerge(TestCase):
|
|||
for surface in building.surfaces:
|
||||
if surface.global_irradiance:
|
||||
merged_city_building_total_radiation += surface.global_irradiance[cte.YEAR].iloc[0, 0]
|
||||
self.assertEqual(202699159, merged_city_building_total_radiation)
|
||||
self.assertEqual(189336013, merged_city_building_total_radiation)
|
||||
merged_city = par_city.merge(full_city)
|
||||
merged_city_building_total_radiation = 0
|
||||
for building in merged_city.buildings:
|
||||
for surface in building.surfaces:
|
||||
if surface.global_irradiance:
|
||||
merged_city_building_total_radiation += surface.global_irradiance[cte.YEAR].iloc[0, 0]
|
||||
self.assertEqual(202699159, merged_city_building_total_radiation)
|
||||
self.assertEqual(189336013, merged_city_building_total_radiation)
|
||||
|
||||
|
|
|
@ -7,13 +7,13 @@ Code contributors: Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concord
|
|||
"""
|
||||
|
||||
from unittest import TestCase
|
||||
from hub.catalog_factories.costs_catalog_factory import CostCatalogFactory
|
||||
from hub.catalog_factories.costs_catalog_factory import CostsCatalogFactory
|
||||
|
||||
|
||||
class TestCostsCatalog(TestCase):
|
||||
|
||||
def test_costs_catalog(self):
|
||||
catalog = CostCatalogFactory('montreal_custom').catalog
|
||||
catalog = CostsCatalogFactory('montreal_custom').catalog
|
||||
catalog_categories = catalog.names()
|
||||
self.assertIsNotNone(catalog, 'catalog is none')
|
||||
content = catalog.entries()
|
||||
|
|
Loading…
Reference in New Issue
Block a user