Skip to content

Commit

Permalink
feat(folder): Added grid parsing functionality to Folder class. Styli…
Browse files Browse the repository at this point in the history
…stic changes.

Added whitespaces and changed the name of one variable to make it clearer.
  • Loading branch information
built-test authored and built-tools committed Nov 18, 2021
1 parent 733c2ff commit 42643f6
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions honeybee_radiance_folder/folder.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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 = {}
Expand Down

0 comments on commit 42643f6

Please sign in to comment.