From 4da0a4253080784c316f70d249458146ce380141 Mon Sep 17 00:00:00 2001 From: Pilar Date: Fri, 8 Apr 2022 18:03:35 -0400 Subject: [PATCH] Modifications in readme and code of conduct --- CODE_OF_CONDUCT.md | 103 +++--------------- README.md | 18 +-- {catalogs => catalog_factories}/catalog.py | 2 +- .../construction/construction_helpers.py | 0 .../construction/nrcan_catalog.py | 0 .../construction/nrel_catalog.py | 16 +-- .../construction_catalog_factory.py | 4 +- .../data_models/construction/archetype.py | 0 .../data_models/construction/construction.py | 0 .../data_models/construction/content.py | 0 .../data_models/construction/layer.py | 0 .../data_models/construction/material.py | 0 .../data_models/construction/window.py | 0 .../data_models/greenery/content.py | 0 .../data_models/greenery/plant.py | 2 +- .../data_models/greenery/plant_percentage.py | 2 +- .../data_models/greenery/soil.py | 0 .../data_models/greenery/vegetation.py | 2 +- .../ecore_greenery/greenerycatalog.ecore | 0 .../ecore_greenery/greenerycatalog.py | 0 .../greenerycatalog_no_quantities.ecore | 0 .../greenery/greenery_catalog.py | 14 +-- .../greenery_catalog_factory.py | 2 +- .../{internal_gains.py => internal_gain.py} | 6 +- .../building_demand/thermal_zone.py | 20 ++-- .../building_demand/usage_zone.py | 8 +- imports/usage/ca_usage_parameters.py | 4 +- .../data_classes/usage_zone_archetype.py | 2 +- imports/usage/hft_usage_interface.py | 6 +- imports/usage/hft_usage_parameters.py | 2 +- unittests/test_greenery_catalog.py | 2 +- 31 files changed, 73 insertions(+), 142 deletions(-) rename {catalogs => catalog_factories}/catalog.py (93%) rename {catalogs => catalog_factories}/construction/construction_helpers.py (100%) rename {catalogs => catalog_factories}/construction/nrcan_catalog.py (100%) rename {catalogs => catalog_factories}/construction/nrel_catalog.py (93%) rename {catalogs => catalog_factories}/construction_catalog_factory.py (82%) rename {catalogs => catalog_factories}/data_models/construction/archetype.py (100%) rename {catalogs => catalog_factories}/data_models/construction/construction.py (100%) rename {catalogs => catalog_factories}/data_models/construction/content.py (100%) rename {catalogs => catalog_factories}/data_models/construction/layer.py (100%) rename {catalogs => catalog_factories}/data_models/construction/material.py (100%) rename {catalogs => catalog_factories}/data_models/construction/window.py (100%) rename {catalogs => catalog_factories}/data_models/greenery/content.py (100%) rename {catalogs => catalog_factories}/data_models/greenery/plant.py (96%) rename {catalogs => catalog_factories}/data_models/greenery/plant_percentage.py (85%) rename {catalogs => catalog_factories}/data_models/greenery/soil.py (100%) rename {catalogs => catalog_factories}/data_models/greenery/vegetation.py (97%) rename {catalogs => catalog_factories}/greenery/ecore_greenery/greenerycatalog.ecore (100%) rename {catalogs => catalog_factories}/greenery/ecore_greenery/greenerycatalog.py (100%) rename {catalogs => catalog_factories}/greenery/ecore_greenery/greenerycatalog_no_quantities.ecore (100%) rename {catalogs => catalog_factories}/greenery/greenery_catalog.py (87%) rename {catalogs => catalog_factories}/greenery_catalog_factory.py (93%) rename city_model_structure/building_demand/{internal_gains.py => internal_gain.py} (97%) diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index ee7dddfd..d9550370 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -4,115 +4,50 @@ ## Our Pledge We as members, contributors, and leaders pledge to make participation in our -community a harassment-free experience for everyone, regardless of age, body -size, visible or invisible disability, ethnicity, sex characteristics, gender -identity and expression, level of experience, education, socio-economic status, -nationality, personal appearance, race, religion, or sexual identity -and orientation. +community a harassment-free experience for everyone, rejecting any kind of discrimination. We pledge to act and interact in ways that contribute to an open, welcoming, -diverse, inclusive, and healthy community. + and healthy community. ## Our Standards Examples of behavior that contributes to a positive environment for our community include: -* Demonstrating empathy and kindness toward other people -* Being respectful of differing opinions, viewpoints, and experiences -* Giving and gracefully accepting constructive feedback +* Demonstrating empathy and kindness toward other people. +* Being respectful of differing opinions, viewpoints, and experiences. +* Giving and gracefully accepting constructive feedback. * Accepting responsibility and apologizing to those affected by our mistakes, - and learning from the experience + and learning from the experience. * Focusing on what is best not just for us as individuals, but for the - overall community + overall community. Examples of unacceptable behavior include: * The use of sexualized language or imagery, and sexual attention or - advances of any kind -* Trolling, insulting or derogatory comments, and personal or political attacks -* Public or private harassment + advances of any kind. +* Trolling, insulting or derogatory comments, and personal or political attacks. +* Public or private harassment. * Publishing others' private information, such as a physical or email - address, without their explicit permission + address, without their explicit permission. * Other conduct which could reasonably be considered inappropriate in a - professional setting - -## Enforcement Responsibilities - -Community leaders are responsible for clarifying and enforcing our standards of -acceptable behavior and will take appropriate and fair corrective action in -response to any behavior that they deem inappropriate, threatening, offensive, -or harmful. - -Community leaders have the right and responsibility to remove, edit, or reject -comments, commits, code, wiki edits, issues, and other contributions that are -not aligned to this Code of Conduct, and will communicate reasons for moderation -decisions when appropriate. + professional setting. ## Scope This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, -posting via an official social media account, or acting as an appointed -representative at an online or offline event. +posting via an official social media account, participating in a congress +or acting as an appointed representative at an online or offline event. ## Enforcement -Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported to the community leaders responsible for enforcement at -guillermo.gutierrezmorote@concordia.ca. +Instances of abusive, harassing, or otherwise unacceptable behavior might be +reported to guillermo.gutierrezmorote@concordia.ca or ursula.eicker@concordia.ca. + All complaints will be reviewed and investigated promptly and fairly. -All community leaders are obligated to respect the privacy and security of the -reporter of any incident. - -## Enforcement Guidelines - -Community leaders will follow these Community Impact Guidelines in determining -the consequences for any action they deem in violation of this Code of Conduct: - -### 1. Correction - -**Community Impact**: Use of inappropriate language or other behavior deemed -unprofessional or unwelcome in the community. - -**Consequence**: A private, written warning from community leaders, providing -clarity around the nature of the violation and an explanation of why the -behavior was inappropriate. A public apology may be requested. - -### 2. Warning - -**Community Impact**: A violation through a single incident or series -of actions. - -**Consequence**: A warning with consequences for continued behavior. No -interaction with the people involved, including unsolicited interaction with -those enforcing the Code of Conduct, for a specified period of time. This -includes avoiding interactions in community spaces as well as external channels -like social media. Violating these terms may lead to a temporary or -permanent ban. - -### 3. Temporary Ban - -**Community Impact**: A serious violation of community standards, including -sustained inappropriate behavior. - -**Consequence**: A temporary ban from any sort of interaction or public -communication with the community for a specified period of time. No public or -private interaction with the people involved, including unsolicited interaction -with those enforcing the Code of Conduct, is allowed during this period. -Violating these terms may lead to a permanent ban. - -### 4. Permanent Ban - -**Community Impact**: Demonstrating a pattern of violation of community -standards, including sustained inappropriate behavior, harassment of an -individual, or aggression toward or disparagement of classes of individuals. - -**Consequence**: A permanent ban from any sort of public interaction within -the community. - ## Attribution This Code of Conduct is adapted from the [Contributor Covenant][homepage], @@ -123,7 +58,3 @@ Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity). [homepage]: https://www.contributor-covenant.org - -For answers to common questions about this code of conduct, see the FAQ at -https://www.contributor-covenant.org/faq. Translations are available at -https://www.contributor-covenant.org/translations. diff --git a/README.md b/README.md index e34ae786..c0ffed09 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,20 @@ # Libs -Libs is part of Insel4D architecture for the urban simulations, created by the CERC group at Concordia University. +Libs is part of Insel4D architecture for urban simulations, created by the CERC group at Concordia University. -Libs repository contains a set of classes modeling the data for urban environments in the form of: - -* city_model_structure -* geometry -* physics -* usages +Libs repository contains: +* city_model_structure: a central data model specifically design to model urban environments. An instance of this is called City. +* catalog_factories: a set of classes to describe catalog structures used by the import and export factories. +* imports: factories to import data from different formats to feed the city model structure (and create a City) or the catalog structures depending on the purpose. +* exports: factories to export desired parts of the City to different formats depending on the purpose, or to export catalogs in a common format. +* data: contains offered data, either for geometry, weather or different types of catalogs. +* other folders to support manipulating data. Released under [LGPL license](LICENSE.md), will provide an object-oriented, modular approach to urban simulations. Our aims are: -* involve as many scientists and contributors as possible +* involve as many scientists and contributors as possible. * provide a complete set of classes that help scientists and students to model urban environments. Please check the [contributing information](CONTRIBUTING.md) and [code of conduct](CODE_OF_CONDUCT.md) if you want to contribute, and let us know any new feature you may be of interest for you or your team. - diff --git a/catalogs/catalog.py b/catalog_factories/catalog.py similarity index 93% rename from catalogs/catalog.py rename to catalog_factories/catalog.py index 2525177b..5e9b476d 100644 --- a/catalogs/catalog.py +++ b/catalog_factories/catalog.py @@ -7,7 +7,7 @@ Project Coder Guille Gutierrez guillermo.gutierrezmorote@concordia.ca class Catalog: """ - Catalogs base class not implemented instance of the Catalog base class, catalogs will inherit from this class. + Catalogs base class not implemented instance of the Catalog base class, catalog_factories will inherit from this class. """ @property diff --git a/catalogs/construction/construction_helpers.py b/catalog_factories/construction/construction_helpers.py similarity index 100% rename from catalogs/construction/construction_helpers.py rename to catalog_factories/construction/construction_helpers.py diff --git a/catalogs/construction/nrcan_catalog.py b/catalog_factories/construction/nrcan_catalog.py similarity index 100% rename from catalogs/construction/nrcan_catalog.py rename to catalog_factories/construction/nrcan_catalog.py diff --git a/catalogs/construction/nrel_catalog.py b/catalog_factories/construction/nrel_catalog.py similarity index 93% rename from catalogs/construction/nrel_catalog.py rename to catalog_factories/construction/nrel_catalog.py index 4b33cbd6..51e8a27b 100644 --- a/catalogs/construction/nrel_catalog.py +++ b/catalog_factories/construction/nrel_catalog.py @@ -7,14 +7,14 @@ Project Coder Guille Gutierrez guillermo.gutierrezmorote@concordia.ca import xmltodict from pathlib import Path -from catalogs.catalog import Catalog -from catalogs.data_models.construction.window import Window -from catalogs.data_models.construction.material import Material -from catalogs.data_models.construction.layer import Layer -from catalogs.data_models.construction.construction import Construction -from catalogs.data_models.construction.content import Content -from catalogs.data_models.construction.archetype import Archetype -from catalogs.construction.construction_helpers import nrel_to_function, reference_standard_to_construction_period +from catalog_factories.catalog import Catalog +from catalog_factories.data_models.construction.window import Window +from catalog_factories.data_models.construction.material import Material +from catalog_factories.data_models.construction.layer import Layer +from catalog_factories.data_models.construction.construction import Construction +from catalog_factories.data_models.construction.content import Content +from catalog_factories.data_models.construction.archetype import Archetype +from catalog_factories.construction.construction_helpers import nrel_to_function, reference_standard_to_construction_period class NrelCatalog(Catalog): diff --git a/catalogs/construction_catalog_factory.py b/catalog_factories/construction_catalog_factory.py similarity index 82% rename from catalogs/construction_catalog_factory.py rename to catalog_factories/construction_catalog_factory.py index 96d20858..6bbb59de 100644 --- a/catalogs/construction_catalog_factory.py +++ b/catalog_factories/construction_catalog_factory.py @@ -7,8 +7,8 @@ Project Coder Guille Gutierrez guillermo.gutierrezmorote@concordia.ca from pathlib import Path from typing import TypeVar -from catalogs.construction.nrel_catalog import NrelCatalog -from catalogs.construction.nrcan_catalog import NrcanCatalog +from catalog_factories.construction.nrel_catalog import NrelCatalog +from catalog_factories.construction.nrcan_catalog import NrcanCatalog Catalog = TypeVar('Catalog') class ConstructionCatalogFactory: diff --git a/catalogs/data_models/construction/archetype.py b/catalog_factories/data_models/construction/archetype.py similarity index 100% rename from catalogs/data_models/construction/archetype.py rename to catalog_factories/data_models/construction/archetype.py diff --git a/catalogs/data_models/construction/construction.py b/catalog_factories/data_models/construction/construction.py similarity index 100% rename from catalogs/data_models/construction/construction.py rename to catalog_factories/data_models/construction/construction.py diff --git a/catalogs/data_models/construction/content.py b/catalog_factories/data_models/construction/content.py similarity index 100% rename from catalogs/data_models/construction/content.py rename to catalog_factories/data_models/construction/content.py diff --git a/catalogs/data_models/construction/layer.py b/catalog_factories/data_models/construction/layer.py similarity index 100% rename from catalogs/data_models/construction/layer.py rename to catalog_factories/data_models/construction/layer.py diff --git a/catalogs/data_models/construction/material.py b/catalog_factories/data_models/construction/material.py similarity index 100% rename from catalogs/data_models/construction/material.py rename to catalog_factories/data_models/construction/material.py diff --git a/catalogs/data_models/construction/window.py b/catalog_factories/data_models/construction/window.py similarity index 100% rename from catalogs/data_models/construction/window.py rename to catalog_factories/data_models/construction/window.py diff --git a/catalogs/data_models/greenery/content.py b/catalog_factories/data_models/greenery/content.py similarity index 100% rename from catalogs/data_models/greenery/content.py rename to catalog_factories/data_models/greenery/content.py diff --git a/catalogs/data_models/greenery/plant.py b/catalog_factories/data_models/greenery/plant.py similarity index 96% rename from catalogs/data_models/greenery/plant.py rename to catalog_factories/data_models/greenery/plant.py index a9763392..c9102387 100644 --- a/catalogs/data_models/greenery/plant.py +++ b/catalog_factories/data_models/greenery/plant.py @@ -5,7 +5,7 @@ Copyright © 2022 Concordia CERC group Project Coder Guille Gutierrez guillermo.gutierrezmorote@concordia.ca """ -from catalogs.data_models.greenery.soil import Soil as libs_soil +from catalog_factories.data_models.greenery.soil import Soil as libs_soil class Plant: diff --git a/catalogs/data_models/greenery/plant_percentage.py b/catalog_factories/data_models/greenery/plant_percentage.py similarity index 85% rename from catalogs/data_models/greenery/plant_percentage.py rename to catalog_factories/data_models/greenery/plant_percentage.py index a26817c7..38819f53 100644 --- a/catalogs/data_models/greenery/plant_percentage.py +++ b/catalog_factories/data_models/greenery/plant_percentage.py @@ -5,7 +5,7 @@ Copyright © 2022 Concordia CERC group Project Coder Guille Gutierrez guillermo.gutierrezmorote@concordia.ca """ -from catalogs.data_models.greenery.plant import Plant as libs_plant +from catalog_factories.data_models.greenery.plant import Plant as libs_plant class PlantPercentage(libs_plant): diff --git a/catalogs/data_models/greenery/soil.py b/catalog_factories/data_models/greenery/soil.py similarity index 100% rename from catalogs/data_models/greenery/soil.py rename to catalog_factories/data_models/greenery/soil.py diff --git a/catalogs/data_models/greenery/vegetation.py b/catalog_factories/data_models/greenery/vegetation.py similarity index 97% rename from catalogs/data_models/greenery/vegetation.py rename to catalog_factories/data_models/greenery/vegetation.py index ae47ddf6..eb234b13 100644 --- a/catalogs/data_models/greenery/vegetation.py +++ b/catalog_factories/data_models/greenery/vegetation.py @@ -5,7 +5,7 @@ Copyright © 2022 Concordia CERC group Project Coder Guille Gutierrez guillermo.gutierrezmorote@concordia.ca """ -from catalogs.data_models.greenery.plant_percentage import PlantPercentage +from catalog_factories.data_models.greenery.plant_percentage import PlantPercentage class Vegetation: def __init__(self, category, vegetation, plant_percentages): diff --git a/catalogs/greenery/ecore_greenery/greenerycatalog.ecore b/catalog_factories/greenery/ecore_greenery/greenerycatalog.ecore similarity index 100% rename from catalogs/greenery/ecore_greenery/greenerycatalog.ecore rename to catalog_factories/greenery/ecore_greenery/greenerycatalog.ecore diff --git a/catalogs/greenery/ecore_greenery/greenerycatalog.py b/catalog_factories/greenery/ecore_greenery/greenerycatalog.py similarity index 100% rename from catalogs/greenery/ecore_greenery/greenerycatalog.py rename to catalog_factories/greenery/ecore_greenery/greenerycatalog.py diff --git a/catalogs/greenery/ecore_greenery/greenerycatalog_no_quantities.ecore b/catalog_factories/greenery/ecore_greenery/greenerycatalog_no_quantities.ecore similarity index 100% rename from catalogs/greenery/ecore_greenery/greenerycatalog_no_quantities.ecore rename to catalog_factories/greenery/ecore_greenery/greenerycatalog_no_quantities.ecore diff --git a/catalogs/greenery/greenery_catalog.py b/catalog_factories/greenery/greenery_catalog.py similarity index 87% rename from catalogs/greenery/greenery_catalog.py rename to catalog_factories/greenery/greenery_catalog.py index 434a4fb5..d5c604d8 100644 --- a/catalogs/greenery/greenery_catalog.py +++ b/catalog_factories/greenery/greenery_catalog.py @@ -6,14 +6,14 @@ Project Coder Guille Gutierrez guillermo.gutierrezmorote@concordia.ca """ from pyecore.resources import ResourceSet, URI -from catalogs.greenery.ecore_greenery.greenerycatalog import GreeneryCatalog as gc -from catalogs.catalog import Catalog +from catalog_factories.greenery.ecore_greenery.greenerycatalog import GreeneryCatalog as gc +from catalog_factories.catalog import Catalog from pathlib import Path -from catalogs.data_models.greenery.vegetation import Vegetation as libs_vegetation -from catalogs.data_models.greenery.plant import Plant as libs_plant -from catalogs.data_models.greenery.soil import Soil as libs_soil -from catalogs.data_models.greenery.plant_percentage import PlantPercentage as libs_pp -from catalogs.data_models.greenery.content import Content as GreeneryContent +from catalog_factories.data_models.greenery.vegetation import Vegetation as libs_vegetation +from catalog_factories.data_models.greenery.plant import Plant as libs_plant +from catalog_factories.data_models.greenery.soil import Soil as libs_soil +from catalog_factories.data_models.greenery.plant_percentage import PlantPercentage as libs_pp +from catalog_factories.data_models.greenery.content import Content as GreeneryContent class GreeneryCatalog(Catalog): diff --git a/catalogs/greenery_catalog_factory.py b/catalog_factories/greenery_catalog_factory.py similarity index 93% rename from catalogs/greenery_catalog_factory.py rename to catalog_factories/greenery_catalog_factory.py index 31c2a271..f9284750 100644 --- a/catalogs/greenery_catalog_factory.py +++ b/catalog_factories/greenery_catalog_factory.py @@ -7,7 +7,7 @@ Project Coder Guille Gutierrez guillermo.gutierrezmorote@concordia.ca from pathlib import Path from typing import TypeVar -from catalogs.greenery.greenery_catalog import GreeneryCatalog +from catalog_factories.greenery.greenery_catalog import GreeneryCatalog Catalog = TypeVar('Catalog') class GreeneryCatalogFactory: diff --git a/city_model_structure/building_demand/internal_gains.py b/city_model_structure/building_demand/internal_gain.py similarity index 97% rename from city_model_structure/building_demand/internal_gains.py rename to city_model_structure/building_demand/internal_gain.py index dfec83c4..8fa417eb 100644 --- a/city_model_structure/building_demand/internal_gains.py +++ b/city_model_structure/building_demand/internal_gain.py @@ -1,5 +1,5 @@ """ -InternalGains module +InternalGain module SPDX - License - Identifier: LGPL - 3.0 - or -later Copyright © 2022 Concordia CERC group Project Coder Guille Gutierrez guillermo.gutierrezmorote@concordia.ca @@ -9,9 +9,9 @@ from typing import Union, List from city_model_structure.attributes.schedule import Schedule -class InternalGains: +class InternalGain: """ - InternalGains class + InternalGain class """ def __init__(self): diff --git a/city_model_structure/building_demand/thermal_zone.py b/city_model_structure/building_demand/thermal_zone.py index 267c27a9..8aa4fb97 100644 --- a/city_model_structure/building_demand/thermal_zone.py +++ b/city_model_structure/building_demand/thermal_zone.py @@ -11,7 +11,7 @@ from typing import List, Union, TypeVar from city_model_structure.building_demand.occupancy import Occupancy from city_model_structure.building_demand.appliances import Appliances from city_model_structure.building_demand.lighting import Lighting -from city_model_structure.building_demand.internal_gains import InternalGains +from city_model_structure.building_demand.internal_gain import InternalGain from city_model_structure.attributes.schedule import Schedule from city_model_structure.building_demand.thermal_control import ThermalControl from city_model_structure.energy_systems.hvac_system import HvacSystem @@ -242,15 +242,15 @@ class ThermalZone: return None @property - def not_detailed_source_mean_annual_internal_gains(self) -> Union[None, List[InternalGains]]: + def not_detailed_source_mean_annual_internal_gains(self) -> Union[None, List[InternalGain]]: """ Get thermal zone internal gains with unknown energy source - :return: [InternalGains] + :return: [InternalGain] """ if self._parent_internal_zone.usage_zones is None: return None if self._not_detailed_source_mean_annual_internal_gains is None: - _grouped_internal_gain = InternalGains() + _grouped_internal_gain = InternalGain() _grouped_internal_gain.type = 'grouped internal gains for thermal zone' _average_internal_gain = 0 _convective_part = 0 @@ -311,7 +311,7 @@ class ThermalZone: def not_detailed_source_mean_annual_internal_gains(self, value): """ Set thermal zone internal gains with unknown energy source - :param value: [InternalGains] + :param value: [InternalGain] """ self._not_detailed_source_mean_annual_internal_gains = value @@ -563,10 +563,10 @@ class ThermalZone: _internal_gain.convective_fraction = internal_gain_type.convective_fraction _internal_gain.schedules = internal_gain_type.schedules - def get_internal_gains(self) -> [InternalGains]: + def get_internal_gains(self) -> [InternalGain]: """ Calculates and returns the list of all internal gains defined - :return: InternalGains + :return: [InternalGain] """ if self.not_detailed_source_mean_annual_internal_gains is not None: self._internal_gains = [] @@ -575,7 +575,7 @@ class ThermalZone: if self.occupancy is not None: if self.occupancy.latent_internal_gain is not None: - _internal_gain = InternalGains() + _internal_gain = InternalGain() _internal_gain.type = cte.OCCUPANCY _total_heat_gain = (self.occupancy.sensible_convective_internal_gain + self.occupancy.sensible_radiative_internal_gain @@ -596,7 +596,7 @@ class ThermalZone: self._internal_gains = [_internal_gain] if self.lighting is not None: - _internal_gain = InternalGains() + _internal_gain = InternalGain() _internal_gain.type = cte.LIGHTING self._add_internal_gain(self.lighting, _internal_gain) if self._internal_gains is not None: @@ -605,7 +605,7 @@ class ThermalZone: self._internal_gains = [_internal_gain] if self.appliances is not None: - _internal_gain = InternalGains() + _internal_gain = InternalGain() _internal_gain.type = cte.APPLIANCES self._add_internal_gain(self.appliances, _internal_gain) if self._internal_gains is not None: diff --git a/city_model_structure/building_demand/usage_zone.py b/city_model_structure/building_demand/usage_zone.py index 279589c1..eff1afe8 100644 --- a/city_model_structure/building_demand/usage_zone.py +++ b/city_model_structure/building_demand/usage_zone.py @@ -7,7 +7,7 @@ Code contributors: Guille Gutierrez guillermo.gutierrezmorote@concordia.ca """ import uuid from typing import List, Union -from city_model_structure.building_demand.internal_gains import InternalGains +from city_model_structure.building_demand.internal_gain import InternalGain from city_model_structure.building_demand.occupancy import Occupancy from city_model_structure.building_demand.lighting import Lighting from city_model_structure.building_demand.appliances import Appliances @@ -77,10 +77,10 @@ class UsageZone: self._percentage = float(value) @property - def not_detailed_source_mean_annual_internal_gains(self) -> List[InternalGains]: + def not_detailed_source_mean_annual_internal_gains(self) -> List[InternalGain]: """ Get usage zone internal gains with unknown energy source - :return: [InternalGains] + :return: [InternalGain] """ return self._not_detailed_source_mean_annual_internal_gains @@ -88,7 +88,7 @@ class UsageZone: def not_detailed_source_mean_annual_internal_gains(self, value): """ Set usage zone internal gains with unknown energy source - :param value: [InternalGains] + :param value: [InternalGain] """ self._not_detailed_source_mean_annual_internal_gains = value diff --git a/imports/usage/ca_usage_parameters.py b/imports/usage/ca_usage_parameters.py index 0866284e..56c006a0 100644 --- a/imports/usage/ca_usage_parameters.py +++ b/imports/usage/ca_usage_parameters.py @@ -10,7 +10,7 @@ from imports.geometry.helpers.geometry_helper import GeometryHelper from imports.usage.hft_usage_interface import HftUsageInterface from imports.usage.helpers.usage_helper import UsageHelper from city_model_structure.building_demand.usage_zone import UsageZone -from city_model_structure.building_demand.internal_gains import InternalGains +from city_model_structure.building_demand.internal_gain import InternalGain from city_model_structure.building_demand.occupancy import Occupancy from city_model_structure.building_demand.appliances import Appliances from city_model_structure.building_demand.thermal_control import ThermalControl @@ -74,7 +74,7 @@ class CaUsageParameters(HftUsageInterface): usage_zone.thermal_control = _control _internal_gains = [] for archetype_internal_gain in archetype.not_detailed_source_mean_annual_internal_gains: - _internal_gain = InternalGains() + _internal_gain = InternalGain() _internal_gain.average_internal_gain = archetype_internal_gain.average_internal_gain _internal_gain.convective_fraction = archetype_internal_gain.convective_fraction _internal_gain.radiative_fraction = archetype_internal_gain.radiative_fraction diff --git a/imports/usage/data_classes/usage_zone_archetype.py b/imports/usage/data_classes/usage_zone_archetype.py index 8ea43367..e4d7a9e6 100644 --- a/imports/usage/data_classes/usage_zone_archetype.py +++ b/imports/usage/data_classes/usage_zone_archetype.py @@ -30,7 +30,7 @@ class UsageZoneArchetype: def not_detailed_source_mean_annual_internal_gains(self) -> List[HftInternalGainsArchetype]: """ Get usage zone internal gains from not detailed heating source in W/m2 - :return: [InternalGains] + :return: [InternalGain] """ return self._not_detailed_source_mean_annual_internal_gains diff --git a/imports/usage/hft_usage_interface.py b/imports/usage/hft_usage_interface.py index ffd4d1d7..09593ba7 100644 --- a/imports/usage/hft_usage_interface.py +++ b/imports/usage/hft_usage_interface.py @@ -8,7 +8,7 @@ Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca import xmltodict import copy from city_model_structure.building_demand.usage_zone import UsageZone -from city_model_structure.building_demand.internal_gains import InternalGains +from city_model_structure.building_demand.internal_gain import InternalGain from city_model_structure.building_demand.occupancy import Occupancy from city_model_structure.building_demand.appliances import Appliances from city_model_structure.building_demand.thermal_control import ThermalControl @@ -49,7 +49,7 @@ class HftUsageInterface: usage_zone_archetype.occupancy = _occupancy if 'internGains' in zone_usage_type['occupancy']: - _internal_gain = InternalGains() + _internal_gain = InternalGain() _internal_gain.latent_fraction = zone_usage_type['occupancy']['internGains']['latentFraction'] _internal_gain.convective_fraction = zone_usage_type['occupancy']['internGains']['convectiveFraction'] _internal_gain.average_internal_gain = zone_usage_type['occupancy']['internGains']['averageInternGainPerSqm'] @@ -164,7 +164,7 @@ class HftUsageInterface: usage_zone_archetype.occupancy = _occupancy if 'internGains' in usage_zone_variant['occupancy']: - _internal_gain = InternalGains() + _internal_gain = InternalGain() if 'latentFraction' in usage_zone_variant['occupancy']['internGains']: _internal_gain.latent_fraction = usage_zone_variant['occupancy']['internGains']['latentFraction'] if 'convectiveFraction' in usage_zone_variant['occupancy']['internGains']: diff --git a/imports/usage/hft_usage_parameters.py b/imports/usage/hft_usage_parameters.py index c05e5658..c5faee4d 100644 --- a/imports/usage/hft_usage_parameters.py +++ b/imports/usage/hft_usage_parameters.py @@ -76,7 +76,7 @@ class HftUsageParameters(HftUsageInterface): usage_zone.thermal_control = _control _internal_gains = [] for archetype_internal_gain in archetype.not_detailed_source_mean_annual_internal_gains: - _internal_gain = InternalGains() + _internal_gain = InternalGain() _internal_gain.average_internal_gain = archetype_internal_gain.average_internal_gain _internal_gain.convective_fraction = archetype_internal_gain.convective_fraction _internal_gain.radiative_fraction = archetype_internal_gain.radiative_fraction diff --git a/unittests/test_greenery_catalog.py b/unittests/test_greenery_catalog.py index 9cf75a3d..efb94d6b 100644 --- a/unittests/test_greenery_catalog.py +++ b/unittests/test_greenery_catalog.py @@ -7,7 +7,7 @@ Project Coder Guille Gutierrez guillermo.gutierrezmorote@concordia.ca from unittest import TestCase -from catalogs.greenery_catalog_factory import GreeneryCatalogFactory +from catalog_factories.greenery_catalog_factory import GreeneryCatalogFactory class TestGreeneryCatalog(TestCase):