honeybee-core 1.61.21__py2.py3-none-any.whl → 1.61.23__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.
- honeybee/cli/validate.py +14 -7
- honeybee/model.py +20 -9
- honeybee/properties.py +33 -16
- {honeybee_core-1.61.21.dist-info → honeybee_core-1.61.23.dist-info}/METADATA +3 -3
- {honeybee_core-1.61.21.dist-info → honeybee_core-1.61.23.dist-info}/RECORD +9 -9
- {honeybee_core-1.61.21.dist-info → honeybee_core-1.61.23.dist-info}/LICENSE +0 -0
- {honeybee_core-1.61.21.dist-info → honeybee_core-1.61.23.dist-info}/WHEEL +0 -0
- {honeybee_core-1.61.21.dist-info → honeybee_core-1.61.23.dist-info}/entry_points.txt +0 -0
- {honeybee_core-1.61.21.dist-info → honeybee_core-1.61.23.dist-info}/top_level.txt +0 -0
honeybee/cli/validate.py
CHANGED
|
@@ -21,10 +21,13 @@ def validate():
|
|
|
21
21
|
'--extension', '-e', help='Text for the name of the extension to be checked. '
|
|
22
22
|
'The value input is case-insensitive such that "radiance" and "Radiance" will '
|
|
23
23
|
'both result in the model being checked for validity with honeybee-radiance. '
|
|
24
|
-
'This value can also be set to "
|
|
25
|
-
'extensions.
|
|
26
|
-
'
|
|
27
|
-
|
|
24
|
+
'This value can also be set to "Generic" in order to run checks for all installed '
|
|
25
|
+
'extensions. Using "Generic" will run all except the most limiting of checks '
|
|
26
|
+
'(eg. the DOE2 lack of support for courtyards) with the goal of producing a model '
|
|
27
|
+
'that can be exported to multiple engines (albeit with a little extra '
|
|
28
|
+
'postprocessing for particularly limited engines). Some common honeybee extension '
|
|
29
|
+
'names that can be input here include: Radiance, EnergyPlus, DOE2, IES, IDAICE',
|
|
30
|
+
type=str, default='Generic', show_default=True)
|
|
28
31
|
@click.option(
|
|
29
32
|
'--plain-text/--json', ' /-j', help='Flag to note whether the output validation '
|
|
30
33
|
'report should be formatted as a JSON object instead of plain text. If set to JSON, '
|
|
@@ -82,7 +85,7 @@ def validate_model_cli(model_file, extension, plain_text, room_overlaps, output_
|
|
|
82
85
|
sys.exit(0)
|
|
83
86
|
|
|
84
87
|
|
|
85
|
-
def validate_model(model_file, extension='
|
|
88
|
+
def validate_model(model_file, extension='Generic', json=False, output_file=None,
|
|
86
89
|
plain_text=True):
|
|
87
90
|
"""Validate all properties of a Model file against the Honeybee schema.
|
|
88
91
|
|
|
@@ -95,8 +98,12 @@ def validate_model(model_file, extension='All', json=False, output_file=None,
|
|
|
95
98
|
The value input here is case-insensitive such that "radiance"
|
|
96
99
|
and "Radiance" will both result in the model being checked for
|
|
97
100
|
validity with honeybee-radiance. This value can also be set to
|
|
98
|
-
"
|
|
99
|
-
|
|
101
|
+
"Generic" in order to run checks for all installed extensions.
|
|
102
|
+
Using "Generic" will run all except the most limiting of checks
|
|
103
|
+
(eg. DOE2's lack of support for courtyards) with the goal of
|
|
104
|
+
producing a model that is export-able to multiple engines (albeit
|
|
105
|
+
with a little extra postprocessing for particularly limited engines).
|
|
106
|
+
Some common dragonfly extension names that can be input here if they
|
|
100
107
|
are installed include:
|
|
101
108
|
|
|
102
109
|
* Radiance
|
honeybee/model.py
CHANGED
|
@@ -2102,7 +2102,7 @@ class Model(_Base):
|
|
|
2102
2102
|
compare_dict['deleted_objects'] = deleted
|
|
2103
2103
|
return compare_dict
|
|
2104
2104
|
|
|
2105
|
-
def check_for_extension(self, extension_name='
|
|
2105
|
+
def check_for_extension(self, extension_name='Generic',
|
|
2106
2106
|
raise_exception=True, detailed=False):
|
|
2107
2107
|
"""Check that the Model is valid for a specific Honeybee extension.
|
|
2108
2108
|
|
|
@@ -2118,9 +2118,13 @@ class Model(_Base):
|
|
|
2118
2118
|
The value input here is case-insensitive such that "radiance"
|
|
2119
2119
|
and "Radiance" will both result in the model being checked for
|
|
2120
2120
|
validity with honeybee-radiance. This value can also be set to
|
|
2121
|
-
"
|
|
2122
|
-
|
|
2123
|
-
|
|
2121
|
+
"Generic" in order to run checks for all installed extensions.
|
|
2122
|
+
Using "Generic" will run all except the most limiting of
|
|
2123
|
+
checks (eg. DOE2's lack of support for courtyards) with the
|
|
2124
|
+
goal of producing a model that is export-able to multiple
|
|
2125
|
+
engines (albeit with a little extra postprocessing for
|
|
2126
|
+
particularly limited engines). Some common honeybee extension
|
|
2127
|
+
names that can be input here if they are installed include:
|
|
2124
2128
|
|
|
2125
2129
|
* Radiance
|
|
2126
2130
|
* EnergyPlus
|
|
@@ -2145,8 +2149,9 @@ class Model(_Base):
|
|
|
2145
2149
|
# set up defaults to ensure the method runs correctly
|
|
2146
2150
|
detailed = False if raise_exception else detailed
|
|
2147
2151
|
extension_name = extension_name.lower()
|
|
2148
|
-
if extension_name
|
|
2149
|
-
|
|
2152
|
+
if extension_name in ('all', 'generic'):
|
|
2153
|
+
all_ext_checks = extension_name == 'all'
|
|
2154
|
+
return self.check_all(raise_exception, detailed, all_ext_checks)
|
|
2150
2155
|
energy_extensions = ('energyplus', 'openstudio', 'designbuilder')
|
|
2151
2156
|
if extension_name in energy_extensions:
|
|
2152
2157
|
extension_name = 'energy'
|
|
@@ -2171,8 +2176,8 @@ class Model(_Base):
|
|
|
2171
2176
|
raise ValueError(full_msg)
|
|
2172
2177
|
return full_msg
|
|
2173
2178
|
|
|
2174
|
-
def check_all(self, raise_exception=True, detailed=False):
|
|
2175
|
-
"""Check all of the aspects of the Model for
|
|
2179
|
+
def check_all(self, raise_exception=True, detailed=False, all_ext_checks=False):
|
|
2180
|
+
"""Check all of the aspects of the Model for validation errors.
|
|
2176
2181
|
|
|
2177
2182
|
This includes basic properties like adjacency checks and all geometry checks.
|
|
2178
2183
|
Furthermore, all extension attributes will be checked assuming the extension
|
|
@@ -2186,6 +2191,12 @@ class Model(_Base):
|
|
|
2186
2191
|
return a text string with all errors that were found. (Default: True).
|
|
2187
2192
|
detailed: Boolean for whether the returned object is a detailed list of
|
|
2188
2193
|
dicts with error info or a string with a message. (Default: False).
|
|
2194
|
+
all_ext_checks: Boolean to note whether every single check that is
|
|
2195
|
+
available for all installed extensions should be run (True) or only
|
|
2196
|
+
generic checks that cover all except the most limiting of
|
|
2197
|
+
cases should be run (False). Examples of checks that are skipped
|
|
2198
|
+
include DOE2's lack of support for courtyards and floor plates
|
|
2199
|
+
with holes. (Default: False).
|
|
2189
2200
|
|
|
2190
2201
|
Returns:
|
|
2191
2202
|
A text string with all errors that were found or a list if detailed is True.
|
|
@@ -2224,7 +2235,7 @@ class Model(_Base):
|
|
|
2224
2235
|
msgs.append(self.check_all_air_boundaries_adjacent(False, detailed))
|
|
2225
2236
|
|
|
2226
2237
|
# check the extension attributes
|
|
2227
|
-
ext_msgs = self._properties._check_all_extension_attr(detailed)
|
|
2238
|
+
ext_msgs = self._properties._check_all_extension_attr(detailed, all_ext_checks)
|
|
2228
2239
|
if detailed:
|
|
2229
2240
|
ext_msgs = [m for m in ext_msgs if isinstance(m, list)]
|
|
2230
2241
|
msgs.extend(ext_msgs)
|
honeybee/properties.py
CHANGED
|
@@ -436,7 +436,7 @@ class ModelProperties(_Properties):
|
|
|
436
436
|
'for {}: {}'.format(var, e))
|
|
437
437
|
return msgs
|
|
438
438
|
|
|
439
|
-
def _check_all_extension_attr(self, detailed=False):
|
|
439
|
+
def _check_all_extension_attr(self, detailed=False, all_ext_checks=False):
|
|
440
440
|
"""Check the attributes of all extensions.
|
|
441
441
|
|
|
442
442
|
This method should be called within the check_all method of the Model object
|
|
@@ -449,24 +449,41 @@ class ModelProperties(_Properties):
|
|
|
449
449
|
"""
|
|
450
450
|
msgs = []
|
|
451
451
|
for atr in self._extension_attributes:
|
|
452
|
+
# get the extension attributes
|
|
452
453
|
check_msg = None
|
|
453
454
|
var = getattr(self, atr)
|
|
454
|
-
if
|
|
455
|
-
|
|
456
|
-
try:
|
|
455
|
+
# use the check_generic function if it is available
|
|
456
|
+
if not all_ext_checks and hasattr(var, 'check_generic'):
|
|
457
457
|
try:
|
|
458
|
-
check_msg = var.
|
|
459
|
-
|
|
460
|
-
check_msg
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
458
|
+
check_msg = var.check_generic(
|
|
459
|
+
raise_exception=False, detailed=detailed)
|
|
460
|
+
if detailed and check_msg is not None:
|
|
461
|
+
msgs.append(check_msg)
|
|
462
|
+
elif check_msg != '':
|
|
463
|
+
f_msg = \
|
|
464
|
+
'Attributes for {} are invalid.\n{}'.format(atr, check_msg)
|
|
465
|
+
msgs.append(f_msg)
|
|
466
|
+
except Exception as e:
|
|
467
|
+
import traceback
|
|
468
|
+
traceback.print_exc()
|
|
469
|
+
raise Exception('Failed to check_generic for {}: {}'.format(var, e))
|
|
470
|
+
elif hasattr(var, 'check_all'): # use the check_all function
|
|
471
|
+
try:
|
|
472
|
+
try:
|
|
473
|
+
check_msg = var.check_all(
|
|
474
|
+
raise_exception=False, detailed=detailed)
|
|
475
|
+
except TypeError: # no option available for detailed error message
|
|
476
|
+
check_msg = var.check_all(raise_exception=False)
|
|
477
|
+
if detailed and check_msg is not None:
|
|
478
|
+
msgs.append(check_msg)
|
|
479
|
+
elif check_msg != '':
|
|
480
|
+
f_msg = \
|
|
481
|
+
'Attributes for {} are invalid.\n{}'.format(atr, check_msg)
|
|
482
|
+
msgs.append(f_msg)
|
|
483
|
+
except Exception as e:
|
|
484
|
+
import traceback
|
|
485
|
+
traceback.print_exc()
|
|
486
|
+
raise Exception('Failed to check_all for {}: {}'.format(var, e))
|
|
470
487
|
return msgs
|
|
471
488
|
|
|
472
489
|
def __repr__(self):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: honeybee-core
|
|
3
|
-
Version: 1.61.
|
|
3
|
+
Version: 1.61.23
|
|
4
4
|
Summary: A library to create 3D building geometry for various types of environmental simulation.
|
|
5
5
|
Home-page: https://github.com/ladybug-tools/honeybee-core
|
|
6
6
|
Author: Ladybug Tools
|
|
@@ -14,8 +14,8 @@ Classifier: License :: OSI Approved :: GNU Affero General Public License v3
|
|
|
14
14
|
Classifier: Operating System :: OS Independent
|
|
15
15
|
Description-Content-Type: text/markdown
|
|
16
16
|
License-File: LICENSE
|
|
17
|
-
Requires-Dist: ladybug-core==0.44.
|
|
18
|
-
Requires-Dist: ladybug-geometry-polyskel==1.7.
|
|
17
|
+
Requires-Dist: ladybug-core==0.44.17
|
|
18
|
+
Requires-Dist: ladybug-geometry-polyskel==1.7.28
|
|
19
19
|
Requires-Dist: honeybee-schema==1.59.0; python_version >= "3.7"
|
|
20
20
|
|
|
21
21
|

|
|
@@ -16,9 +16,9 @@ honeybee/extensionutil.py,sha256=DDQYhM7tFD3avRSCOjwTzLqX9ldUxl5GzY79V3_sATE,964
|
|
|
16
16
|
honeybee/face.py,sha256=j_0YPI-dZGQQZ8CJNUtmO2LC-IfpVA_Fwp7ivOoBl6Y,107622
|
|
17
17
|
honeybee/facetype.py,sha256=vCtWZKHp21RH-Yzs8zsHJHuFhJvczNh0yFl8wDe_RWY,4489
|
|
18
18
|
honeybee/logutil.py,sha256=2gn-6RcWqFLvwdFzBHPqUwFqTj_R3iwHKALrl-2eL7M,2564
|
|
19
|
-
honeybee/model.py,sha256=
|
|
19
|
+
honeybee/model.py,sha256=RZhj195_Nr5jlUauEOo7H5ZdNZDdKyBb2kwhDxRB1oI,175099
|
|
20
20
|
honeybee/orientation.py,sha256=GogGblASW9OU-fobfDaQ7w5yRbEAFdJJuHwg2fadhKI,5046
|
|
21
|
-
honeybee/properties.py,sha256=
|
|
21
|
+
honeybee/properties.py,sha256=fnlT71in22HpFQGD8ta5kXNnSZVXwXq5cNgvD-hrMRg,33462
|
|
22
22
|
honeybee/room.py,sha256=Ga91VmqBTJqYyCY5bX5kHnf3zMe9reG-tHqFOTeWdSc,148639
|
|
23
23
|
honeybee/search.py,sha256=OiXibGGVb1ff4gTn_768i-sehB-zAYG12c0o3B0RjKE,4718
|
|
24
24
|
honeybee/shade.py,sha256=G_ujmsPQeKvcc0O1ICiFRhVkjypkKBbgY9wJKck-9uU,19393
|
|
@@ -31,7 +31,7 @@ honeybee/cli/create.py,sha256=6KmnetAzhwrCuAIDZnySbEKnEssPIxJ72JK-51fBCKU,13067
|
|
|
31
31
|
honeybee/cli/edit.py,sha256=Iost_FqgUGbTWQL0jhn5aPWCQnsX8QxxUUrClUWMjao,27579
|
|
32
32
|
honeybee/cli/lib.py,sha256=8udazsVycqMHfk5ZQIOvy4tKM3FuSzjMPCeMuFC2rck,4436
|
|
33
33
|
honeybee/cli/setconfig.py,sha256=S7DfatGyIPkHxImBDyT9JUhKGuflmd3h5nMfVbzcg9g,1428
|
|
34
|
-
honeybee/cli/validate.py,sha256=
|
|
34
|
+
honeybee/cli/validate.py,sha256=aPOShUwjw8CLeqU52IgVzupEbwl8wKWJtn3RIn-UEB0,10389
|
|
35
35
|
honeybee/writer/__init__.py,sha256=Gz05beUglVhr-v8H-WemfvGWsOFfQIgNmgp2upCeVmw,245
|
|
36
36
|
honeybee/writer/aperture.py,sha256=5TmuhehgSPiZiYuI94DR-xqG2kEOPv8uEZiHqoeUTfI,186
|
|
37
37
|
honeybee/writer/door.py,sha256=ja3r94CnloDB06xedXVB5_mS-8kKkTGl4_7JXPYxBtE,174
|
|
@@ -40,9 +40,9 @@ honeybee/writer/model.py,sha256=N7F_jksf-5TrdVecuxTaFWxnPVFLmQs7k8g27TsdB7Q,177
|
|
|
40
40
|
honeybee/writer/room.py,sha256=kFghgStTU1SEJSLigXB0VjOWhZtgs4uXuAqdwd4yRQo,174
|
|
41
41
|
honeybee/writer/shade.py,sha256=EpgX-vMc-s21TnMvNWvWTKyT8iAnxu1nFVXzjY1oyF8,177
|
|
42
42
|
honeybee/writer/shademesh.py,sha256=Y41bLogJ7dwpvMe5cAWVRDRVqJEwo9e5hFJQjlt6UX8,189
|
|
43
|
-
honeybee_core-1.61.
|
|
44
|
-
honeybee_core-1.61.
|
|
45
|
-
honeybee_core-1.61.
|
|
46
|
-
honeybee_core-1.61.
|
|
47
|
-
honeybee_core-1.61.
|
|
48
|
-
honeybee_core-1.61.
|
|
43
|
+
honeybee_core-1.61.23.dist-info/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
|
|
44
|
+
honeybee_core-1.61.23.dist-info/METADATA,sha256=MnlaLdDTrFY-uA7d5py2MiRRIFOJ7qNpdB8BAZ5Zv8I,3317
|
|
45
|
+
honeybee_core-1.61.23.dist-info/WHEEL,sha256=AHX6tWk3qWuce7vKLrj7lnulVHEdWoltgauo8bgCXgU,109
|
|
46
|
+
honeybee_core-1.61.23.dist-info/entry_points.txt,sha256=r3YqOm40goBroH3ccUhpwQjvTwu10JWLd0HIRHI1J8E,47
|
|
47
|
+
honeybee_core-1.61.23.dist-info/top_level.txt,sha256=8ve7puCRLUA9XDEGc1Mcs-UX9sFjpPV8MeTaIMwQ_Tg,9
|
|
48
|
+
honeybee_core-1.61.23.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|