Add itest to gitignore
This commit is contained in:
parent
df235ad6dc
commit
14291a8789
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -7,4 +7,4 @@ __pycache__/
|
|||
input_files/*.geojson
|
||||
!input_files/.gitkeep
|
||||
|
||||
test_*.py
|
||||
itest_*.py
|
|
@ -1,6 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="PYTHON_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$/../hub_new/hub" />
|
||||
<content url="file://$MODULE_DIR$" />
|
||||
<orderEntry type="jdk" jdkName="Python 3.10 (conda-hub)" jdkType="Python SDK" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
|
|
|
@ -12,6 +12,10 @@ from pathlib import Path
|
|||
from hub.imports.geometry_factory import GeometryFactory
|
||||
from hub.imports.construction_factory import ConstructionFactory
|
||||
from hub.helpers.dictionaries import Dictionaries
|
||||
# from hub.city_model_structure.life_cycle_assessment.access_nrcan_catalogue \
|
||||
# import AccessNrcanCatalog
|
||||
# from hub.city_model_structure.life_cycle_assessment.building_component \
|
||||
# import BuildingComponent
|
||||
|
||||
|
||||
class LCACarbonWorkflow:
|
||||
|
@ -44,18 +48,23 @@ class LCACarbonWorkflow:
|
|||
def calculate_opening_emission(building):
|
||||
surface_emission = []
|
||||
for surface in building.surfaces:
|
||||
if surface.window_ratio == 0:
|
||||
opening_surface = 0
|
||||
opening_material_emission = 0
|
||||
else:
|
||||
opening_surface = 0
|
||||
opening_material_emission = 0
|
||||
for opening in surface.associated_thermal_boundaries.thermal_openings:
|
||||
opening_surface += opening.area
|
||||
# test migration to gittea
|
||||
# opening_material_emission =
|
||||
for boundary in surface.associated_thermal_boundaries:
|
||||
if boundary.window_ratio == 0:
|
||||
opening_surface = 0
|
||||
opening_material_emission = 0
|
||||
print('window = 0')
|
||||
else:
|
||||
opening_surface = 0
|
||||
opening_material_emission = 0
|
||||
print('window != 0')
|
||||
# for opening in surface.associated_thermal_boundaries.thermal_openings:
|
||||
# opening_surface += opening.area
|
||||
# opening_material_emission =
|
||||
|
||||
def calculate_emission(self):
|
||||
emitted_carbon = []
|
||||
for building in self.city.buildings:
|
||||
return len(building.surfaces)
|
||||
emitted_carbon = []
|
||||
for building in self.city.buildings:
|
||||
# self.calculate_opening_emission(building)
|
||||
for surface in building.surfaces:
|
||||
for boundary in surface.associated_thermal_boundaries:
|
||||
print(boundary.window_ratio)
|
Loading…
Reference in New Issue
Block a user