From 18d829b38af7ea326de8aca58e13121aa8b07b8b Mon Sep 17 00:00:00 2001 From: Koa Wells Date: Fri, 28 Jul 2023 13:16:45 -0400 Subject: [PATCH] Convert instances of cost to co2 emission --- README.md | 19 +++++++++++++ cerc_co2_emission.egg-info/PKG-INFO | 6 ++-- cerc_co2_emission.egg-info/SOURCES.txt | 26 ++++++------------ cerc_co2_emission.egg-info/requires.txt | 2 -- cerc_co2_emission.egg-info/top_level.txt | 2 +- co2_emission/__init__.py | 8 ++---- .../__pycache__/__init__.cpython-39.pyc | Bin 0 -> 531 bytes .../__pycache__/co2_emission.cpython-39.pyc | Bin 0 -> 2375 bytes co2_emission/co2_emission.py | 4 +-- co2_emission/version.py | 8 ++++++ dist/cerc-co2-emission-0.1.0.0.tar.gz | Bin 0 -> 2828 bytes ...cerc_co2_emission-0.1.0.0-py3-none-any.whl | Bin 0 -> 3282 bytes pyproject.toml | 2 +- requirements.txt | 4 +-- setup.py | 12 ++++---- tests/__pycache__/unit_tests.cpython-39.pyc | Bin 0 -> 2971 bytes tests/unit_tests.py | 26 +----------------- 17 files changed, 53 insertions(+), 66 deletions(-) create mode 100644 co2_emission/__pycache__/__init__.cpython-39.pyc create mode 100644 co2_emission/__pycache__/co2_emission.cpython-39.pyc create mode 100644 co2_emission/version.py create mode 100644 dist/cerc-co2-emission-0.1.0.0.tar.gz create mode 100644 dist/cerc_co2_emission-0.1.0.0-py3-none-any.whl create mode 100644 tests/__pycache__/unit_tests.cpython-39.pyc diff --git a/README.md b/README.md index e69de29..1dfecaa 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,19 @@ +# Cerc co2 emission + +Uses the cerc-hub as a base for co2_emission calculation, it's intended to be used after executing the complete monthly energy +balance workflow called building by building + +This module processes the object-oriented generalization to be used the co2 emission workflow + +# installation + +> $ pip install cerc-co2_emission + +# usage + +> from costs.co2_emission import Co2Emission +> +> Co2Emission(building, emissions_factor).co2_emission +> + +The available scenarios are defined in the constant class as an enum \ No newline at end of file diff --git a/cerc_co2_emission.egg-info/PKG-INFO b/cerc_co2_emission.egg-info/PKG-INFO index cbfe54b..270f600 100644 --- a/cerc_co2_emission.egg-info/PKG-INFO +++ b/cerc_co2_emission.egg-info/PKG-INFO @@ -1,9 +1,9 @@ Metadata-Version: 2.1 -Name: cerc-costs +Name: cerc-co2-emission Version: 0.1.0.0 -Summary: CERC costs contains the basic cost calculation per CERC-Hub building +Summary: CERC co2 emission contains the basic co2 emission calculation per CERC-Hub building Classifier: License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL) Classifier: Programming Language :: Python Classifier: Programming Language :: Python :: 3 -CERC costs contains the basic cost calculation per CERC-Hub building +CERC co2 emission contains the basic co2 emission calculation per CERC-Hub building diff --git a/cerc_co2_emission.egg-info/SOURCES.txt b/cerc_co2_emission.egg-info/SOURCES.txt index 9cc7c29..48c5e54 100644 --- a/cerc_co2_emission.egg-info/SOURCES.txt +++ b/cerc_co2_emission.egg-info/SOURCES.txt @@ -1,20 +1,12 @@ +README.md pyproject.toml requirements.txt setup.py -cerc_costs.egg-info/PKG-INFO -cerc_costs.egg-info/SOURCES.txt -cerc_costs.egg-info/dependency_links.txt -cerc_costs.egg-info/requires.txt -cerc_costs.egg-info/top_level.txt -costs/__init__.py -costs/__main__.py -costs/capital_costs.py -costs/configuration.py -costs/constants.py -costs/cost.py -costs/cost_base.py -costs/end_of_life_costs.py -costs/total_maintenance_costs.py -costs/total_operational_costs.py -costs/total_operational_incomes.py -costs/version.py \ No newline at end of file +cerc_co2_emission.egg-info/PKG-INFO +cerc_co2_emission.egg-info/SOURCES.txt +cerc_co2_emission.egg-info/dependency_links.txt +cerc_co2_emission.egg-info/requires.txt +cerc_co2_emission.egg-info/top_level.txt +co2_emission/__init__.py +co2_emission/co2_emission.py +co2_emission/version.py \ No newline at end of file diff --git a/cerc_co2_emission.egg-info/requires.txt b/cerc_co2_emission.egg-info/requires.txt index 94cd4eb..b765df7 100644 --- a/cerc_co2_emission.egg-info/requires.txt +++ b/cerc_co2_emission.egg-info/requires.txt @@ -1,4 +1,2 @@ -numpy_financial cerc_hub -pandas setuptools diff --git a/cerc_co2_emission.egg-info/top_level.txt b/cerc_co2_emission.egg-info/top_level.txt index 73bd54b..f1c6404 100644 --- a/cerc_co2_emission.egg-info/top_level.txt +++ b/cerc_co2_emission.egg-info/top_level.txt @@ -1 +1 @@ -costs +co2_emission diff --git a/co2_emission/__init__.py b/co2_emission/__init__.py index 26cf04b..3eca432 100644 --- a/co2_emission/__init__.py +++ b/co2_emission/__init__.py @@ -1,12 +1,8 @@ """ -Cost workflow initialization +Co2 emission workflow initialization SPDX - License - Identifier: LGPL - 3.0 - or -later Copyright © 2023 Project Coder Guille Gutierrez guillermo.gutierrezmorote@concordia.ca Code contributor Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca Code contributor Oriol Gavalda Torrellas oriol.gavalda@concordia.ca """ -from .capital_costs import CapitalCosts -from .end_of_life_costs import EndOfLifeCosts -from .total_maintenance_costs import TotalMaintenanceCosts -from .total_operational_costs import TotalOperationalCosts -from .total_operational_incomes import TotalOperationalIncomes + diff --git a/co2_emission/__pycache__/__init__.cpython-39.pyc b/co2_emission/__pycache__/__init__.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0c46378f1e5047fb3223aa18d2ed2fe7fc54d37a GIT binary patch literal 531 zcmaixK~7si42CCciXw3bZ&~n!!VXmxB}frf3Xy2k3O#A$zA+EOym922Bnn61CS0Sv z1=}8hU03x3QI%CkvS<8__0QPGot>exb^r7;d>T0Ss}KHN#@vxv-ZmH9r3-@#x4X4G zwu|9da)Gtz?NyXDaN@!k`3?(98eYs!zQG<$xuKNFPN#uV;VULRgz029HFQwzn-_(> zh=tSy7aQgFy1z>% literal 0 HcmV?d00001 diff --git a/co2_emission/__pycache__/co2_emission.cpython-39.pyc b/co2_emission/__pycache__/co2_emission.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..cdb1995e5427c9a4bc1472ee048784e0f0f97c92 GI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6;cPT%$+{t9X;I<$TEbddX{ej5ZG^+%^cR^!8N#1aekE?91e>x8Og% zqMTPFRTn|!W^2;$chdTzb|L;+xdZ)t@2l%Gp&!r4_ln&ccS@G5T0LXIn~p{WMi^b5 z@!?(0Dtc)kd6c52qaC474?k+3e2Y1yw=6S4=r(7maeZjzr`ijV{MC5u4F5Q*tT1|g zQ#{UiB~qU=km_jO?+4Cfr`%s}P!_H~8Kax0TochR^zE>Ci6$}8V3G>fWshCb0P8-|ZZ6pi`JT`2Lg;M&s^R~+?tb!q6WS#!vmcE7&64(G_dCZfw&#G@ pzxl|1{C?~BFTN^Fnd4xy{>w-#k!*){zU5%F5{3;O+4*$={0AM2H0A&R literal 0 HcmV?d00001 diff --git a/pyproject.toml b/pyproject.toml index 9b933e7..dccf9c0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,4 +5,4 @@ requires = ["setuptools>=61.0.0", "wheel"] build-backend = "setuptools.build_meta" [options.packages.find_namespace] -where = "costs" \ No newline at end of file +where = "co2_emission" \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index add886c..b74d309 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1 @@ -numpy_financial -cerc_hub -pandas \ No newline at end of file +cerc_hub \ No newline at end of file diff --git a/setup.py b/setup.py index 93e5514..6e951e1 100644 --- a/setup.py +++ b/setup.py @@ -12,25 +12,25 @@ with pathlib.Path('requirements.txt').open() as r: install_requires.append('setuptools') main_ns = {} -version = convert_path('costs/version.py') +version = convert_path('co2_emission/version.py') with open(version) as f: exec(f.read(), main_ns) setup( - name='cerc-costs', + name='cerc-co2-emission', version=main_ns['__version__'], - description="CERC costs contains the basic cost calculation per CERC-Hub building", - long_description="CERC costs contains the basic cost calculation per CERC-Hub building", + description="CERC co2 emission contains the basic co2 emission calculation per CERC-Hub building", + long_description="CERC co2 emission contains the basic co2 emission calculation per CERC-Hub building", classifiers=[ "License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)", "Programming Language :: Python", "Programming Language :: Python :: 3", ], include_package_data=True, - packages=['costs'], + packages=['co2_emission'], setup_requires=install_requires, install_requires=install_requires, data_files=[ - ('costs', glob.glob('requirements.txt')) + ('co2_emission', glob.glob('requirements.txt')) ] ) diff --git a/tests/__pycache__/unit_tests.cpython-39.pyc b/tests/__pycache__/unit_tests.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c2aa4fd161990d2f06c02f5868506ef589eba8f4 GIT binary patch literal 2971 zcmZ`*%WoUU8K2n~mn**Xup?PY%Opr!IVg>~x1cRtOKM=ipo=<6feC}fiZh~?-UmH1 zj3Z)oqE7_^=Q~!j$_SAE4?WNy0OH!26?qX)YnfZ3U_irX@HUk3BU;g!1 z{uro#;9&i6VDJc<`WtkdaGDTSeJP`6Y%$AxZDyOV!yNcpiJN-NqsVI~wbW<6p`E0j z1}reNn{1>F)-be}G}9Jq8M>CV(+=wx+D|sqEw*Loda|AFupL7O$({5ryKCr;E?;d8V|S4t1PoH;g;gPR}ou7U|js?axG>3N0^h zSet(mYMSVqiN>jlMq+Jz9Gl%E84CqUY#ikePtsT^kT^sW)*l-NkD#e8bb?@LAS{$y zuL-k-!)@-oCUeSM?t%-vGI)~3I*yWfCWaJ#Sw2Wx(2k%f%nVKn5<>r+{6NuXZa9oJ z`ovKpIsbvk4lw=u?C8_MsS;8RUc3@XGI*AWV;O%fy1(p#qlUTUanwD{U`8tV9jBu# z;?dyGxqLA=%DET}^M|2Wm^aWuX*HOFj-erYlgrW%!x$&RyQmu~N$70*#*W@{{gy#> zVDq6Fg9cz;LB?Rtlzd0!7n+Xgwe^-lxAaOT!^^DTkBTDL}R9u!Vt&+Y4uS=}t`!WnOUPx!{0 zg|s=na`pCj2RPl41=Jnh_|}4*?ymkdJHvnP9h0wuD~~q|FWi0kcfH43Ym)Er_AOca z*ZYMHk~(j!xAdx3)Zp)*T=_=Urrs?4IbE0c9ewG8%;g>nnV1ORr>&*e3c5?aCvPnD z8+sKIYr8)SFi2e!wb>?*bo2n}-bmzQm1m`wPxWM~S#2@F0?emTnuMuf!SDP1laui1 zS^qf;j-DN#gr}cBdHUqgVT}tBk1lk09*cytdzT`TVSXMC*Q#)_);gbNrfwGF_G+y2 z@M3z#+)NImthAMkW_}2L@0&D%g!Yu?pxmsjO!anu)g48uJNcTm(>&8sL`gWDDxIh7 zAkHB9L!7=yE<<6^BRq?eC>x5I|KNVlFfiAAW^Ln^ACWa)!*sMI!m#uvkrbIOYf`8@f%>Vzy2Q$4AFT9x$HZ_sE**5PbdlQ= znT&@Q5(`2is>6)IIq-y*rISUVNT8-?6PXW%Ql%}YSy?+i`J#XN^r^%eD(h!Uh-B|C ztgf7;!blD;gua}J5I2$@NhQ)U1wb84KA)l@H+rpjaLN5Az`; zX07y>;#dPpA6<@4Q4CUSIWX{3b(<&>ci4lbK82204H{6NZo%tNYw>#j@x2yp(GK0E zJG5gV2aY=MJ%HYW`B{4nS5VnLU?v0wZG)f$Aq1aKO@JC<_;MO0)r#B#sihAtoCpb? zM|IXzM68rX&jwI;peb~ePkq~>66c1{ZatU|kD#d!p<4pGu;&C$*$Up>3f!5ufc84z zto|GU^cE0eFfi-}2!88`7v;p9wafGd21d)XOx?W5cv1% z0QfCT8`lsBO+aV+E1P;h;{E?tqMDjq!=(j4j}{axZ2_PI^Xdj<3YqQS`lGrctvC#zbde)Y&E=_g8=4mz z86^5}o$VbMSxUsRU literal 0 HcmV?d00001 diff --git a/tests/unit_tests.py b/tests/unit_tests.py index 2ee80a5..e4fbcb7 100644 --- a/tests/unit_tests.py +++ b/tests/unit_tests.py @@ -15,9 +15,7 @@ from hub.imports.results_factory import ResultFactory from hub.imports.usage_factory import UsageFactory from hub.helpers.dictionaries import Dictionaries -from costs.cost import Cost -from costs.constants import SKIN_RETROFIT, SKIN_RETROFIT_AND_SYSTEM_RETROFIT_AND_PV, SYSTEM_RETROFIT_AND_PV -from costs.co2_emission import Co2Emission +from co2_emission.co2_emission import Co2Emission class Initialize: @@ -60,28 +58,6 @@ class Initialize: class UnitTests(unittest.TestCase): init = Initialize() - def test_current_status(self): - for building in self.init.city.buildings: - result = Cost(building).life_cycle - self.assertIsNotNone(result) - self.assertEqual(0, result.values[0]) - - def test_scenario_1(self): - for building in self.init.city.buildings: - result = Cost(building, retrofit_scenario=SKIN_RETROFIT).life_cycle - self.assertIsNotNone(result) - - def test_scenario_2(self): - for building in self.init.city.buildings: - result = Cost(building, retrofit_scenario=SYSTEM_RETROFIT_AND_PV).life_cycle - self.assertIsNotNone(result) - self.assertEqual(0, result.values[0]) - - def test_scenario_3(self): - for building in self.init.city.buildings: - result = Cost(building, retrofit_scenario=SKIN_RETROFIT_AND_SYSTEM_RETROFIT_AND_PV).life_cycle - self.assertIsNotNone(result) - def test_co2_emission(self): for building in self.init.city.buildings: result = Co2Emission(building).operational_co2