From 37c5ddc530695f2a1686589cb0fe88ac18d7eb3d Mon Sep 17 00:00:00 2001 From: mostaphaRoudsari Date: Mon, 4 Jul 2022 14:26:58 -0400 Subject: [PATCH] fix: rename all static_apertures to \_\_static_apertures\_\_ This is currently becoming and issue for postprocessing the results. --- honeybee_radiance_folder/folder.cfg | 2 +- honeybee_radiance_folder/folder.py | 4 ++-- tests/assets/grids_sample_model/_info.json | 22 +++++++++---------- .../model_folders/simple/model/folder.cfg | 2 +- .../simple/model/grid/_info.json | 4 ++-- .../model_folders/static/model/folder.cfg | 2 +- .../static/model/grid/_info.json | 6 ++--- tests/assets/project_folder/model/folder.cfg | 2 +- .../project_folder/model/grid/cubical.json | 2 +- .../project_folder/model/grid/hallway.json | 2 +- 10 files changed, 24 insertions(+), 24 deletions(-) diff --git a/honeybee_radiance_folder/folder.cfg b/honeybee_radiance_folder/folder.cfg index 2d46720..fd0b679 100644 --- a/honeybee_radiance_folder/folder.cfg +++ b/honeybee_radiance_folder/folder.cfg @@ -1,5 +1,5 @@ [GLOBAL] -static_apertures = static_apertures # aperture group name for static apertures +static_apertures = __static_apertures__ # aperture group name for static apertures [APERTURE] path = aperture diff --git a/honeybee_radiance_folder/folder.py b/honeybee_radiance_folder/folder.py index cdcd5f4..1f49023 100644 --- a/honeybee_radiance_folder/folder.py +++ b/honeybee_radiance_folder/folder.py @@ -91,7 +91,7 @@ def _find_files(self, subfolder, pattern, rel_path=True): @staticmethod def _get_file_name(path): - """Get file name with no extention.""" + """Get file name with no extension.""" base = os.path.basename(path) return os.path.splitext(base)[0] @@ -828,7 +828,7 @@ def _update_dict(dict, key, value): _update_dict(two_phase_dict, '__static_apertures__', grid) if not light_paths: # no light path, put grid in static, might be an exterior grid - _update_dict(two_phase_dict, '__static_apertures__', grid) + _update_dict(two_phase_dict, '__static_apertures__', grid) for light_path, grids in two_phase_dict.items(): two_phase.append( diff --git a/tests/assets/grids_sample_model/_info.json b/tests/assets/grids_sample_model/_info.json index d8573c7..53c39e2 100644 --- a/tests/assets/grids_sample_model/_info.json +++ b/tests/assets/grids_sample_model/_info.json @@ -7,7 +7,7 @@ "full_id": "Room_e6ac360b-aaed-4c3b-a130-36b4c2ac9d13-000d14bf", "light_path": [ [ - "static_apertures" + "__static_apertures__" ] ] }, @@ -35,7 +35,7 @@ "full_id": "Room_e6ac360b-aaed-4c3b-a130-36b4c2ac9d13-000d15c9", "light_path": [ [ - "static_apertures" + "__static_apertures__" ] ] }, @@ -47,7 +47,7 @@ "full_id": "Room_e6ac360b-aaed-4c3b-a130-36b4c2ac9d13-000d15d0", "light_path": [ [ - "static_apertures" + "__static_apertures__" ] ] }, @@ -67,7 +67,7 @@ "full_id": "Room_e6ac360b-aaed-4c3b-a130-36b4c2ac9d13-000d1467", "light_path": [ [ - "static_apertures" + "__static_apertures__" ] ] }, @@ -79,7 +79,7 @@ "full_id": "Room_e6ac360b-aaed-4c3b-a130-36b4c2ac9d13-000d146a", "light_path": [ [ - "static_apertures" + "__static_apertures__" ] ] }, @@ -91,7 +91,7 @@ "full_id": "Room_e6ac360b-aaed-4c3b-a130-36b4c2ac9d13-000d146d", "light_path": [ [ - "static_apertures" + "__static_apertures__" ] ] }, @@ -103,7 +103,7 @@ "full_id": "Room_e6ac360b-aaed-4c3b-a130-36b4c2ac9d13-000d1470", "light_path": [ [ - "static_apertures" + "__static_apertures__" ] ] }, @@ -115,7 +115,7 @@ "full_id": "Room_e6ac360b-aaed-4c3b-a130-36b4c2ac9d13-000d1473", "light_path": [ [ - "static_apertures" + "__static_apertures__" ] ] }, @@ -127,7 +127,7 @@ "full_id": "Room_e6ac360b-aaed-4c3b-a130-36b4c2ac9d13-000d1476", "light_path": [ [ - "static_apertures" + "__static_apertures__" ] ] }, @@ -139,7 +139,7 @@ "full_id": "Room_e6ac360b-aaed-4c3b-a130-36b4c2ac9d13-000d1479", "light_path": [ [ - "static_apertures" + "__static_apertures__" ] ] }, @@ -159,4 +159,4 @@ "full_id": "Room_ae4e6261-f1ae-40d7-8032-737f3b639dd8-00111315", "light_path": [] } -] \ No newline at end of file +] diff --git a/tests/assets/model_folders/simple/model/folder.cfg b/tests/assets/model_folders/simple/model/folder.cfg index 2d46720..fd0b679 100644 --- a/tests/assets/model_folders/simple/model/folder.cfg +++ b/tests/assets/model_folders/simple/model/folder.cfg @@ -1,5 +1,5 @@ [GLOBAL] -static_apertures = static_apertures # aperture group name for static apertures +static_apertures = __static_apertures__ # aperture group name for static apertures [APERTURE] path = aperture diff --git a/tests/assets/model_folders/simple/model/grid/_info.json b/tests/assets/model_folders/simple/model/grid/_info.json index 87098b9..f0cf7cc 100644 --- a/tests/assets/model_folders/simple/model/grid/_info.json +++ b/tests/assets/model_folders/simple/model/grid/_info.json @@ -13,7 +13,7 @@ "east_window_classroom" ], [ - "static_apertures" + "__static_apertures__" ], [ "skylight_1" @@ -35,4 +35,4 @@ ] ] } -] \ No newline at end of file +] diff --git a/tests/assets/model_folders/static/model/folder.cfg b/tests/assets/model_folders/static/model/folder.cfg index 2d46720..fd0b679 100644 --- a/tests/assets/model_folders/static/model/folder.cfg +++ b/tests/assets/model_folders/static/model/folder.cfg @@ -1,5 +1,5 @@ [GLOBAL] -static_apertures = static_apertures # aperture group name for static apertures +static_apertures = __static_apertures__ # aperture group name for static apertures [APERTURE] path = aperture diff --git a/tests/assets/model_folders/static/model/grid/_info.json b/tests/assets/model_folders/static/model/grid/_info.json index f760823..23e16be 100644 --- a/tests/assets/model_folders/static/model/grid/_info.json +++ b/tests/assets/model_folders/static/model/grid/_info.json @@ -7,7 +7,7 @@ "full_id": "class_room", "light_path": [ [ - "static_apertures" + "__static_apertures__" ] ] }, @@ -19,8 +19,8 @@ "full_id": "office", "light_path": [ [ - "static_apertures" + "__static_apertures__" ] ] } -] \ No newline at end of file +] diff --git a/tests/assets/project_folder/model/folder.cfg b/tests/assets/project_folder/model/folder.cfg index 9f2b860..407491a 100644 --- a/tests/assets/project_folder/model/folder.cfg +++ b/tests/assets/project_folder/model/folder.cfg @@ -1,6 +1,6 @@ [GLOBAL] root = model # folder name for the root folder -static_apertures = static_apertures # aperture group name for static apertures +static_apertures = __static_apertures__ # aperture group name for static apertures [APERTURE] path = aperture diff --git a/tests/assets/project_folder/model/grid/cubical.json b/tests/assets/project_folder/model/grid/cubical.json index 4160809..5673ffb 100644 --- a/tests/assets/project_folder/model/grid/cubical.json +++ b/tests/assets/project_folder/model/grid/cubical.json @@ -1,7 +1,7 @@ { "count": 131, "aperture_groups": [ - ["static_apertures"], + ["__static_apertures__"], ["south_window"] ] } diff --git a/tests/assets/project_folder/model/grid/hallway.json b/tests/assets/project_folder/model/grid/hallway.json index 7face03..6eb091e 100644 --- a/tests/assets/project_folder/model/grid/hallway.json +++ b/tests/assets/project_folder/model/grid/hallway.json @@ -1,7 +1,7 @@ { "count": 40, "aperture_groups": [ - ["static_apertures"], + ["__static_apertures__"], ["south_window"] ] }