dragonfly-doe2 0.12.3__py2.py3-none-any.whl → 0.12.4__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -74,6 +74,37 @@ class ModelDoe2Properties(object):
74
74
  raise ValueError(full_msg)
75
75
  return full_msg
76
76
 
77
+ def check_generic(self, raise_exception=True, detailed=False):
78
+ """Check generic of the aspects of the Model DOE-2 properties.
79
+
80
+ This includes checks for everything except holes in floor plates and
81
+ courtyard stories.
82
+
83
+ Args:
84
+ raise_exception: Boolean to note whether a ValueError should be raised
85
+ if any errors are found. If False, this method will simply
86
+ return a text string with all errors that were found.
87
+ detailed: Boolean for whether the returned object is a detailed list of
88
+ dicts with error info or a string with a message. (Default: False).
89
+
90
+ Returns:
91
+ A text string with all errors that were found or a list if detailed is True.
92
+ This string (or list) will be empty if no errors were found.
93
+ """
94
+ # set up defaults to ensure the method runs correctly
95
+ detailed = False if raise_exception else detailed
96
+ msgs = []
97
+ # perform checks for specific energy simulation rules
98
+ msgs.append(self.check_room_2d_floor_plate_vertex_count(False, detailed))
99
+ # output a final report of errors or raise an exception
100
+ full_msgs = [msg for msg in msgs if msg]
101
+ if detailed:
102
+ return [m for msg in full_msgs for m in msg]
103
+ full_msg = '\n'.join(full_msgs)
104
+ if raise_exception and len(full_msgs) != 0:
105
+ raise ValueError(full_msg)
106
+ return full_msg
107
+
77
108
  def check_all(self, raise_exception=True, detailed=False):
78
109
  """Check all of the aspects of the Model DOE-2 properties.
79
110
 
@@ -91,8 +122,11 @@ class ModelDoe2Properties(object):
91
122
  # set up defaults to ensure the method runs correctly
92
123
  detailed = False if raise_exception else detailed
93
124
  msgs = []
125
+ tol = self.host.tolerance
94
126
  # perform checks for specific energy simulation rules
95
127
  msgs.append(self.check_room_2d_floor_plate_vertex_count(False, detailed))
128
+ msgs.append(self.check_no_room_2d_floor_plate_holes(False, detailed))
129
+ msgs.append(self.check_no_story_courtyards(tol, False, detailed))
96
130
  # output a final report of errors or raise an exception
97
131
  full_msgs = [msg for msg in msgs if msg]
98
132
  if detailed:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dragonfly-doe2
3
- Version: 0.12.3
3
+ Version: 0.12.4
4
4
  Summary: Dragonfly extension for the DOE-2 energy simulation engine.
5
5
  Home-page: https://github.com/ladybug-tools/dragonfly-doe2
6
6
  Author: Ladybug Tools
@@ -5,11 +5,11 @@ dragonfly_doe2/writer.py,sha256=Yfs9fEEhX8WrDqhy4nIxeOwMPDKHvu3RoeInz94pGO8,6224
5
5
  dragonfly_doe2/cli/__init__.py,sha256=OwTHSsOOEoJjbw5CqPig8Yo7jk1f6m53OFnhuZgPthE,391
6
6
  dragonfly_doe2/cli/translate.py,sha256=gVpMSL074B6YPOe26cD0njGL_durS9lugrenbLoZiUw,7989
7
7
  dragonfly_doe2/properties/__init__.py,sha256=0JiyMYGeRlPLcxh1PSr6eJzDGgfrbMivcO9dS1h7wEU,33
8
- dragonfly_doe2/properties/model.py,sha256=D1fQGW9h7N031GzuSCpYJ0wIR2sG8YayoHnF_n0doaw,11695
8
+ dragonfly_doe2/properties/model.py,sha256=a1pQnTDHs1H_beR2J_rfHCP22EltBAJGpQrpWe_LH9E,13356
9
9
  dragonfly_doe2/properties/room2d.py,sha256=ghKKhcX2TSgPUAdcQk-PPHo_5AilSmTiLElxb8--dkE,12773
10
- dragonfly_doe2-0.12.3.dist-info/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
11
- dragonfly_doe2-0.12.3.dist-info/METADATA,sha256=GkhjeeCBvn7Bnq5LsoaFdTkVVau4OjL-thbR67GcVbo,2690
12
- dragonfly_doe2-0.12.3.dist-info/WHEEL,sha256=AHX6tWk3qWuce7vKLrj7lnulVHEdWoltgauo8bgCXgU,109
13
- dragonfly_doe2-0.12.3.dist-info/entry_points.txt,sha256=oBzZOsc8Bs40iHKtuyWGrz_nfLZu1-6cHrBej05ZqrY,59
14
- dragonfly_doe2-0.12.3.dist-info/top_level.txt,sha256=6CLCvUyl1H2vrbXmeA0ND_znFz4a2oOclc7NMBZxR6c,15
15
- dragonfly_doe2-0.12.3.dist-info/RECORD,,
10
+ dragonfly_doe2-0.12.4.dist-info/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
11
+ dragonfly_doe2-0.12.4.dist-info/METADATA,sha256=foAtoNF0YjCcjZBhiMvs1_dFDdNkNDSlVwaKvE6p2yE,2690
12
+ dragonfly_doe2-0.12.4.dist-info/WHEEL,sha256=AHX6tWk3qWuce7vKLrj7lnulVHEdWoltgauo8bgCXgU,109
13
+ dragonfly_doe2-0.12.4.dist-info/entry_points.txt,sha256=oBzZOsc8Bs40iHKtuyWGrz_nfLZu1-6cHrBej05ZqrY,59
14
+ dragonfly_doe2-0.12.4.dist-info/top_level.txt,sha256=6CLCvUyl1H2vrbXmeA0ND_znFz4a2oOclc7NMBZxR6c,15
15
+ dragonfly_doe2-0.12.4.dist-info/RECORD,,