From 42643f664d288658796c16e8e1bbccdd980444eb Mon Sep 17 00:00:00 2001 From: Built Tools Date: Thu, 18 Nov 2021 14:45:53 +0100 Subject: [PATCH] feat(folder): Added grid parsing functionality to Folder class. Stylistic changes. Added whitespaces and changed the name of one variable to make it clearer. --- honeybee_radiance_folder/folder.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/honeybee_radiance_folder/folder.py b/honeybee_radiance_folder/folder.py index 9cfa51b..5e0b57c 100644 --- a/honeybee_radiance_folder/folder.py +++ b/honeybee_radiance_folder/folder.py @@ -501,20 +501,21 @@ def dynamic_scene(self, indoor=False, reload=False): return self._dynamic_scene_indoor if indoor \ else self._dynamic_scene - def grid_info(self, info_type_is_model=False): + def grid_info(self, is_model=False): """Parse the appropriate grids_info file to return high level information about the sensor grids contained in the model folder. Args: - info_type_is_model: If set to True, the _model_grids_info.json, which is - written out after simulations will be parsed. Else the _info.json will be - parsed. Defaults to False as the _info.json file is always expected to be - present. + is_model: If set to True, the _model_grids_info.json, which is + written out after simulations will be parsed. Else the _info.json will be + parsed. Defaults to False as the _info.json file is always expected to be + present. + Returns: The list containing information about sensor grids that are written to the - folder after model export. + folder after model export. """ - if info_type_is_model: + if is_model: info_json = os.path.join(self.grid_folder(full=True), '_model_grids_info.json') else: @@ -536,7 +537,7 @@ def grid_data_all(self, info_from_model=False): A dictionary containing consolidated grid data for the entire folder. """ - grid_info = self.grid_info(info_type_is_model=info_from_model) + grid_info = self.grid_info(is_model=info_from_model) grid_folder = self.grid_folder(full=True) grid_data_dict = {}