From f8c1ab535881a9a8b3a7678d51a64066983e3466 Mon Sep 17 00:00:00 2001 From: Tammie Yu Date: Fri, 8 Sep 2023 16:08:22 -0700 Subject: [PATCH 1/3] refactor(eprad):clean up run function --- frads/eprad.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/frads/eprad.py b/frads/eprad.py index 9d85641..bfddd84 100644 --- a/frads/eprad.py +++ b/frads/eprad.py @@ -763,7 +763,6 @@ def run( output_directory: Optional[str] = "./", output_prefix: Optional[str] = "eplus", output_suffix: Optional[str] = "L", - weather_file: Optional[str] = None, silent: bool = False, annual: bool = False, design_day: bool = False, @@ -787,8 +786,8 @@ def run( """ opt = ["-d", output_directory, "-p", output_prefix, "-s", output_suffix] - if weather_file is not None: - opt.extend(["-w", weather_file]) + if self.epw is not None: + opt.extend(["-w", self.epw]) elif design_day: if "SizingPeriod:DesignDay" in self.epjs: opt.append("-D") @@ -804,7 +803,7 @@ def run( ) if annual: - if weather_file is not None: + if self.epw is not None: opt.append("-a") else: raise ValueError( From f660353fc18e9681daec4656c8179c1337335085 Mon Sep 17 00:00:00 2001 From: Tammie Yu Date: Fri, 8 Sep 2023 16:09:19 -0700 Subject: [PATCH 2/3] breaking(eprad):rename EnergyPlusModel.lights --- frads/eprad.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frads/eprad.py b/frads/eprad.py index bfddd84..f5922c0 100644 --- a/frads/eprad.py +++ b/frads/eprad.py @@ -106,10 +106,10 @@ def floors(self): return floors @property - def lighting_zones(self): + def lights(self): """ Example: - >>> model.lighting_zones + >>> model.lights """ if "Lights" in self.epjs: return list(self.epjs["Lights"].keys()) From f9a500338db8d251bea70aa6bc889c8cc91d95b3 Mon Sep 17 00:00:00 2001 From: Tammie Yu Date: Fri, 8 Sep 2023 16:12:04 -0700 Subject: [PATCH 3/3] docts(test_eprad):update api renaming --- test/test_eprad.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_eprad.py b/test/test_eprad.py index 3fbee4a..0def69a 100644 --- a/test/test_eprad.py +++ b/test/test_eprad.py @@ -17,7 +17,7 @@ def test_energyplusmodel(): assert isinstance(epmodel.zones, list) assert isinstance(epmodel.window_walls, list) assert isinstance(epmodel.windows, list) - assert isinstance(epmodel.lighting_zones, list) + assert isinstance(epmodel.lights, list) assert isinstance(epmodel.complex_fenestration_states, list)