honeybee-core 1.61.35__tar.gz → 1.62.1__tar.gz

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.
Files changed (112) hide show
  1. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/.github/workflows/ci.yaml +1 -1
  2. {honeybee_core-1.61.35/honeybee_core.egg-info → honeybee_core-1.62.1}/PKG-INFO +18 -4
  3. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/deploy.sh +1 -1
  4. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/dev-requirements.txt +5 -4
  5. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/honeybee/model.py +98 -1
  6. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/honeybee/properties.py +19 -0
  7. {honeybee_core-1.61.35 → honeybee_core-1.62.1/honeybee_core.egg-info}/PKG-INFO +18 -4
  8. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/honeybee_core.egg-info/SOURCES.txt +0 -1
  9. honeybee_core-1.62.1/setup.cfg +4 -0
  10. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/setup.py +6 -2
  11. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/tests/model_test.py +29 -0
  12. honeybee_core-1.61.35/setup.cfg +0 -13
  13. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/.github/workflows/dependency-release.yaml +0 -0
  14. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/.gitignore +0 -0
  15. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/.releaserc.json +0 -0
  16. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/CODE_OF_CONDUCT.md +0 -0
  17. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/CONTRIBUTING.md +0 -0
  18. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/LICENSE +0 -0
  19. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/MANIFEST.in +0 -0
  20. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/README.md +0 -0
  21. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/docs/_build/.nojekyll +0 -0
  22. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/docs/_build/README.md +0 -0
  23. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/docs/_build/docs/README.md +0 -0
  24. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/docs/_static/custom.css +0 -0
  25. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/docs/_templates/layout.html +0 -0
  26. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/docs/cli/index.rst +0 -0
  27. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/docs/conf.py +0 -0
  28. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/docs/index.rst +0 -0
  29. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/honeybee/__init__.py +0 -0
  30. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/honeybee/__main__.py +0 -0
  31. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/honeybee/_base.py +0 -0
  32. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/honeybee/_basewithshade.py +0 -0
  33. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/honeybee/_lockable.py +0 -0
  34. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/honeybee/altnumber.py +0 -0
  35. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/honeybee/aperture.py +0 -0
  36. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/honeybee/boundarycondition.py +0 -0
  37. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/honeybee/checkdup.py +0 -0
  38. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/honeybee/cli/__init__.py +0 -0
  39. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/honeybee/cli/compare.py +0 -0
  40. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/honeybee/cli/create.py +0 -0
  41. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/honeybee/cli/edit.py +0 -0
  42. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/honeybee/cli/lib.py +0 -0
  43. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/honeybee/cli/setconfig.py +0 -0
  44. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/honeybee/cli/validate.py +0 -0
  45. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/honeybee/colorobj.py +0 -0
  46. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/honeybee/config.json +0 -0
  47. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/honeybee/config.py +0 -0
  48. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/honeybee/dictutil.py +0 -0
  49. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/honeybee/door.py +0 -0
  50. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/honeybee/extensionutil.py +0 -0
  51. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/honeybee/face.py +0 -0
  52. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/honeybee/facetype.py +0 -0
  53. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/honeybee/logutil.py +0 -0
  54. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/honeybee/orientation.py +0 -0
  55. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/honeybee/room.py +0 -0
  56. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/honeybee/search.py +0 -0
  57. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/honeybee/shade.py +0 -0
  58. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/honeybee/shademesh.py +0 -0
  59. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/honeybee/typing.py +0 -0
  60. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/honeybee/units.py +0 -0
  61. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/honeybee/writer/__init__.py +0 -0
  62. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/honeybee/writer/aperture.py +0 -0
  63. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/honeybee/writer/door.py +0 -0
  64. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/honeybee/writer/face.py +0 -0
  65. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/honeybee/writer/model.py +0 -0
  66. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/honeybee/writer/room.py +0 -0
  67. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/honeybee/writer/shade.py +0 -0
  68. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/honeybee/writer/shademesh.py +0 -0
  69. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/honeybee_core.egg-info/dependency_links.txt +0 -0
  70. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/honeybee_core.egg-info/entry_points.txt +0 -0
  71. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/honeybee_core.egg-info/requires.txt +0 -0
  72. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/honeybee_core.egg-info/top_level.txt +0 -0
  73. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/requirements.txt +0 -0
  74. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/tests/__init__.py +0 -0
  75. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/tests/aperture_test.py +0 -0
  76. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/tests/boundary_condition_test.py +0 -0
  77. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/tests/cli_compare_test.py +0 -0
  78. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/tests/cli_create_test.py +0 -0
  79. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/tests/cli_edit_test.py +0 -0
  80. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/tests/cli_validate_test.py +0 -0
  81. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/tests/colorobj_test.py +0 -0
  82. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/tests/config_test.py +0 -0
  83. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/tests/dictutil_test.py +0 -0
  84. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/tests/door_test.py +0 -0
  85. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/tests/face_test.py +0 -0
  86. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/tests/facetype_test.py +0 -0
  87. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/tests/json/ShoeBox.json +0 -0
  88. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/tests/json/bad_geometry_model.hbjson +0 -0
  89. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/tests/json/colliding_room_volumes.hbjson +0 -0
  90. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/tests/json/compare_model_1.hbjson +0 -0
  91. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/tests/json/compare_model_2.hbjson +0 -0
  92. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/tests/json/complex_polyfaces.json +0 -0
  93. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/tests/json/minor_geometry/existing_model.hbjson +0 -0
  94. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/tests/json/minor_geometry/updated_model.hbjson +0 -0
  95. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/tests/json/mismatched_area_adj.hbjson +0 -0
  96. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/tests/json/model_with_adiabatic.hbjson +0 -0
  97. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/tests/json/model_with_holes.hbjson +0 -0
  98. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/tests/json/model_without_adjacency.hbjson +0 -0
  99. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/tests/json/nonascii_face.json +0 -0
  100. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/tests/json/polygons_for_gap_boundary.json +0 -0
  101. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/tests/json/room_for_window_offset.hbjson +0 -0
  102. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/tests/json/single_family_home.hbjson +0 -0
  103. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/tests/lockable_test.py +0 -0
  104. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/tests/orientation_test.py +0 -0
  105. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/tests/room_test.py +0 -0
  106. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/tests/search_test.py +0 -0
  107. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/tests/shade_test.py +0 -0
  108. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/tests/shademesh_test.py +0 -0
  109. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/tests/stl/cube_ascii.stl +0 -0
  110. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/tests/stl/cube_binary.stl +0 -0
  111. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/tests/typing_test.py +0 -0
  112. {honeybee_core-1.61.35 → honeybee_core-1.62.1}/tests/units_test.py +0 -0
@@ -55,7 +55,7 @@ jobs:
55
55
  run: |
56
56
  nextRelease="`npx semantic-release@^23.1.1 --dryRun | grep -oP 'Published release \K.*? ' || true`"
57
57
  npx semantic-release@^23.1.1
58
- echo "::set-output name=tag::$nextRelease"
58
+ echo "tag=$nextRelease" >> $GITHUB_OUTPUT
59
59
  env:
60
60
  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
61
61
  PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
@@ -1,22 +1,36 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: honeybee-core
3
- Version: 1.61.35
3
+ Version: 1.62.1
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
7
7
  Author-email: info@ladybug.tools
8
8
  License: AGPL-3.0
9
9
  Classifier: Programming Language :: Python :: 2.7
10
- Classifier: Programming Language :: Python :: 3.6
11
10
  Classifier: Programming Language :: Python :: 3.7
11
+ Classifier: Programming Language :: Python :: 3.8
12
+ Classifier: Programming Language :: Python :: 3.9
13
+ Classifier: Programming Language :: Python :: 3.10
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
12
16
  Classifier: Programming Language :: Python :: Implementation :: CPython
13
- Classifier: License :: OSI Approved :: GNU Affero General Public License v3
17
+ Classifier: Programming Language :: Python :: Implementation :: IronPython
14
18
  Classifier: Operating System :: OS Independent
15
19
  Description-Content-Type: text/markdown
16
20
  License-File: LICENSE
17
21
  Requires-Dist: ladybug-core==0.44.20
18
22
  Requires-Dist: ladybug-geometry-polyskel==1.7.31
19
23
  Requires-Dist: honeybee-schema==1.59.1; python_version >= "3.7"
24
+ Dynamic: author
25
+ Dynamic: author-email
26
+ Dynamic: classifier
27
+ Dynamic: description
28
+ Dynamic: description-content-type
29
+ Dynamic: home-page
30
+ Dynamic: license
31
+ Dynamic: license-file
32
+ Dynamic: requires-dist
33
+ Dynamic: summary
20
34
 
21
35
  ![Honeybee](https://www.ladybug.tools/assets/img/honeybee.png)
22
36
 
@@ -1,6 +1,6 @@
1
1
  #!/bin/sh
2
2
 
3
3
  echo "Building distribution"
4
- python setup.py sdist bdist_wheel
4
+ python -m build
5
5
  echo "Pushing new version to PyPi"
6
6
  twine upload dist/* -u $PYPI_USERNAME -p $PYPI_PASSWORD
@@ -4,10 +4,10 @@ sphinx-bootstrap-theme==0.8.1
4
4
  sphinxcontrib-fulltoc==1.2.0
5
5
  sphinxcontrib-websupport==2.0.0;python_version>='3.6'
6
6
  sphinx-click==6.0.0;python_version>='3.6'
7
- twine==5.1.1;python_version>='3.6'
8
- wheel==0.44.0;python_version>='3.6'
9
- setuptools==75.1.0;python_version>='3.6'
10
- importlib-metadata==8.5.0;python_version>='3.6'
7
+ twine==6.1.0;python_version>='3.6'
8
+ wheel==0.45.1;python_version>='3.6'
9
+ setuptools==80.9.0;python_version>='3.6'
10
+ build==1.3.0;python_version>='3.6'
11
11
  pytest==4.6.9;python_version<'3.0'
12
12
  Sphinx==1.8.5;python_version<'3.0'
13
13
  sphinxcontrib-websupport==1.1.2;python_version<'3.0'
@@ -15,4 +15,5 @@ sphinx-click==4.4.0;python_version<'3.0'
15
15
  twine==1.13.0;python_version<'3.0'
16
16
  wheel==0.38.1;python_version<'3.0'
17
17
  setuptools==44.1.0;python_version<'3.0'
18
+ build==0.1.0;python_version<'3.0'
18
19
  importlib-metadata==2.0.0;python_version<'3.0'
@@ -13,7 +13,7 @@ try: # check if we are in IronPython
13
13
  except ImportError: # wea are in cPython
14
14
  import pickle
15
15
 
16
- from ladybug_geometry.geometry3d import Plane, Face3D, Mesh3D
16
+ from ladybug_geometry.geometry3d import Vector3D, Point3D, Plane, Face3D, Mesh3D
17
17
  from ladybug_geometry.interop.stl import STL
18
18
 
19
19
  from ._base import _Base
@@ -116,6 +116,28 @@ class Model(_Base):
116
116
  '_units', '_tolerance', '_angle_tolerance'
117
117
  )
118
118
 
119
+ # dictionary mapping validation error codes to a corresponding check function
120
+ ERROR_MAP = {
121
+ '000001': 'check_duplicate_shade_identifiers',
122
+ '000002': 'check_duplicate_sub_face_identifiers',
123
+ '000003': 'check_duplicate_face_identifiers',
124
+ '000004': 'check_duplicate_room_identifiers',
125
+ '000101': 'check_planar',
126
+ '000102': 'check_self_intersecting',
127
+ '000103': 'check_degenerate_rooms',
128
+ '000104': 'check_sub_faces_valid',
129
+ '000105': 'check_sub_faces_overlapping',
130
+ '000106': 'check_rooms_solid',
131
+ '000107': 'check_degenerate_rooms',
132
+ '000108': 'check_room_volume_collisions',
133
+ '000109': 'check_upside_down_faces',
134
+ '000201': 'check_missing_adjacencies',
135
+ '000202': 'check_missing_adjacencies',
136
+ '000203': 'check_missing_adjacencies',
137
+ '000204': 'check_missing_adjacencies',
138
+ '000205': 'check_matching_adjacent_areas',
139
+ '000206': 'check_all_air_boundaries_adjacent'
140
+ }
119
141
  UNITS = UNITS
120
142
  UNITS_TOLERANCES = UNITS_TOLERANCES
121
143
 
@@ -1979,6 +2001,38 @@ class Model(_Base):
1979
2001
  self.tolerance = self.tolerance * scale_fac
1980
2002
  self.units = units
1981
2003
 
2004
+ def reset_coordinate_system(self, new_origin=None):
2005
+ """Set the origin of the coordinate system in which the model exists.
2006
+
2007
+ This is useful for resolving cases where the model geometry lies so
2008
+ far from the origin in its current coordinate system that it creates
2009
+ problems. For example, the model geometry might be so high above the
2010
+ origin that EnergyPlus models it in the conditions of the stratosphere.
2011
+ Another possibility is that the float values of the coordinates are so
2012
+ high that floating point tolerance interferes with the proper
2013
+ representation of the model's details.
2014
+
2015
+ In addition to moving the model such that the new_origin sets the
2016
+ coordinate values of the geometry, this method will also set the
2017
+ reference_vector of this object such that any models added into this
2018
+ one from the original source coordinate system respect the new system.
2019
+
2020
+ Args:
2021
+ new_origin: A Point3D in the model's current coordinate system that
2022
+ will become the origin of the new coordinate system. If unspecified,
2023
+ the minimum of the bounding box around the model geometry will
2024
+ be used and the average_height_above_ground will be used to
2025
+ set the Z coordinate. (Default: None).
2026
+ """
2027
+ # compute the new_origin from the bounding box around the geometry
2028
+ if new_origin is None:
2029
+ min_2d = self.min
2030
+ z_val = self.average_height - self.average_height_above_ground
2031
+ new_origin = Point3D(min_2d.x, min_2d.y, z_val)
2032
+ # move the geometry using a vector that is the inverse of the origin
2033
+ ref_vec = Vector3D(-new_origin.x, -new_origin.y, -new_origin.z)
2034
+ self.move(ref_vec)
2035
+
1982
2036
  def rooms_to_orphaned(self):
1983
2037
  """Convert all Rooms in this Model to orphaned geometry objects.
1984
2038
 
@@ -2189,6 +2243,49 @@ class Model(_Base):
2189
2243
  raise ValueError(full_msg)
2190
2244
  return full_msg
2191
2245
 
2246
+ def check_for_error(self, error_code, raise_exception=True, detailed=False):
2247
+ """Check that the Model is valid for a specific validation error code.
2248
+
2249
+ Note that, in order for error codes from a given honeybee extension to
2250
+ run correctly with this method, the specified honeybee extension related
2251
+ to the error code must be installed.
2252
+
2253
+ Args:
2254
+ error_code: Text for the error code for which the check will be performed.
2255
+ This can be the value under the "code" key in the dictionary of
2256
+ the validation error whenever the detailed option is used.
2257
+ raise_exception: Boolean to note whether a ValueError should be raised
2258
+ if any errors are found. If False, this method will simply
2259
+ return a text string with all errors that were found. (Default: True).
2260
+ detailed: Boolean for whether the returned object is a detailed list of
2261
+ dicts with error info or a string with a message. (Default: False).
2262
+
2263
+ Returns:
2264
+ A text string with all errors that were found or a list if detailed is True.
2265
+ This string (or list) will be empty if no errors were found.
2266
+ """
2267
+ # set up defaults to ensure the method runs correctly
2268
+ detailed = False if raise_exception else detailed
2269
+ assert self.tolerance != 0, \
2270
+ 'Model must have a non-zero tolerance in order to perform geometry checks.'
2271
+ assert self.angle_tolerance != 0, \
2272
+ 'Model must have a non-zero angle_tolerance to perform geometry checks.'
2273
+ error_code = str(error_code) # catch the case someone passed an int
2274
+
2275
+ # get the check function to be run from the error code
2276
+ try: # fist see if the check function exists on the cor object
2277
+ check_func = self.ERROR_MAP[error_code]
2278
+ check_func = getattr(self, check_func)
2279
+ except KeyError: # next, see if the check function exists in an extension
2280
+ check_func = self._properties._check_func_from_code(error_code)
2281
+ if check_func is None:
2282
+ err_msg = 'No check function was found matching the error ' \
2283
+ 'code "{}".'.format(error_code)
2284
+ raise ValueError(err_msg)
2285
+
2286
+ # run the check function
2287
+ return check_func(raise_exception=raise_exception, detailed=detailed)
2288
+
2192
2289
  def check_all(self, raise_exception=True, detailed=False, all_ext_checks=False):
2193
2290
  """Check all of the aspects of the Model for validation errors.
2194
2291
 
@@ -486,6 +486,25 @@ class ModelProperties(_Properties):
486
486
  raise Exception('Failed to check_all for {}: {}'.format(var, e))
487
487
  return msgs
488
488
 
489
+ def _check_func_from_code(self, error_code):
490
+ """Get a check function for a specific error code that exists in an extension.
491
+
492
+ Args:
493
+ error_code: Text for the error code for which the check will be performed.
494
+ This can be the value under the "code" key in the dictionary of
495
+ the validation error whenever the detailed option is used.
496
+ """
497
+ for atr in self._extension_attributes:
498
+ var = getattr(self, atr)
499
+ if hasattr(var, 'ERROR_MAP'):
500
+ err_map = getattr(var, 'ERROR_MAP')
501
+ try:
502
+ check_func = err_map[error_code]
503
+ check_func = getattr(var, check_func)
504
+ return check_func
505
+ except KeyError: # not the correct extension for the code
506
+ pass
507
+
489
508
  def __repr__(self):
490
509
  """Properties representation."""
491
510
  return 'ModelProperties: {}'.format(self.host.display_name)
@@ -1,22 +1,36 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: honeybee-core
3
- Version: 1.61.35
3
+ Version: 1.62.1
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
7
7
  Author-email: info@ladybug.tools
8
8
  License: AGPL-3.0
9
9
  Classifier: Programming Language :: Python :: 2.7
10
- Classifier: Programming Language :: Python :: 3.6
11
10
  Classifier: Programming Language :: Python :: 3.7
11
+ Classifier: Programming Language :: Python :: 3.8
12
+ Classifier: Programming Language :: Python :: 3.9
13
+ Classifier: Programming Language :: Python :: 3.10
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
12
16
  Classifier: Programming Language :: Python :: Implementation :: CPython
13
- Classifier: License :: OSI Approved :: GNU Affero General Public License v3
17
+ Classifier: Programming Language :: Python :: Implementation :: IronPython
14
18
  Classifier: Operating System :: OS Independent
15
19
  Description-Content-Type: text/markdown
16
20
  License-File: LICENSE
17
21
  Requires-Dist: ladybug-core==0.44.20
18
22
  Requires-Dist: ladybug-geometry-polyskel==1.7.31
19
23
  Requires-Dist: honeybee-schema==1.59.1; python_version >= "3.7"
24
+ Dynamic: author
25
+ Dynamic: author-email
26
+ Dynamic: classifier
27
+ Dynamic: description
28
+ Dynamic: description-content-type
29
+ Dynamic: home-page
30
+ Dynamic: license
31
+ Dynamic: license-file
32
+ Dynamic: requires-dist
33
+ Dynamic: summary
20
34
 
21
35
  ![Honeybee](https://www.ladybug.tools/assets/img/honeybee.png)
22
36
 
@@ -8,7 +8,6 @@ README.md
8
8
  deploy.sh
9
9
  dev-requirements.txt
10
10
  requirements.txt
11
- setup.cfg
12
11
  setup.py
13
12
  .github/workflows/ci.yaml
14
13
  .github/workflows/dependency-release.yaml
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -24,10 +24,14 @@ setuptools.setup(
24
24
  },
25
25
  classifiers=[
26
26
  "Programming Language :: Python :: 2.7",
27
- "Programming Language :: Python :: 3.6",
28
27
  "Programming Language :: Python :: 3.7",
28
+ "Programming Language :: Python :: 3.8",
29
+ "Programming Language :: Python :: 3.9",
30
+ "Programming Language :: Python :: 3.10",
31
+ "Programming Language :: Python :: 3.11",
32
+ "Programming Language :: Python :: 3.12",
29
33
  "Programming Language :: Python :: Implementation :: CPython",
30
- "License :: OSI Approved :: GNU Affero General Public License v3",
34
+ "Programming Language :: Python :: Implementation :: IronPython",
31
35
  "Operating System :: OS Independent"
32
36
  ],
33
37
  license="AGPL-3.0"
@@ -985,6 +985,35 @@ def test_check_self_intersecting():
985
985
  model_2.check_self_intersecting(0.01, True)
986
986
 
987
987
 
988
+ def test_check_for_error():
989
+ """Test the check_for_error method."""
990
+ pts_1 = [Point3D(0, 0, 0), Point3D(0, 10, 0), Point3D(10, 10, 0), Point3D(10, 0, 0)]
991
+ pts_2 = [Point3D(0, 0, 0), Point3D(0, 0, 3), Point3D(0, 10, 3), Point3D(0, 10, 0)]
992
+ pts_3 = [Point3D(0, 0, 0), Point3D(10, 0, 0), Point3D(10, 0, 3), Point3D(0, 0, 3)]
993
+ pts_4 = [Point3D(10, 10, 0), Point3D(0, 10, 0), Point3D(0, 10, 3), Point3D(10, 10, 3)]
994
+ pts_5 = [Point3D(10, 10, 0), Point3D(10, 0, 0), Point3D(10, 0, 3), Point3D(10, 10, 3)]
995
+ pts_6 = [Point3D(10, 0, 3), Point3D(10, 10, 3), Point3D(0, 10, 3), Point3D(0, 0, 3)]
996
+ pts_7 = [Point3D(10, 0, 3), Point3D(10, 10, 3.1), Point3D(0, 10, 3), Point3D(0, 0, 3)]
997
+ face_1 = Face('Face1', Face3D(pts_1))
998
+ face_2 = Face('Face2', Face3D(pts_2))
999
+ face_3 = Face('Face3', Face3D(pts_3))
1000
+ face_4 = Face('Face4', Face3D(pts_4))
1001
+ face_5 = Face('Face5', Face3D(pts_5))
1002
+ face_6 = Face('Face6', Face3D(pts_6))
1003
+ face_7 = Face('Face7', Face3D(pts_7))
1004
+ room_1 = Room('ZoneSHOE_BOX920980',
1005
+ [face_1, face_2, face_3, face_4, face_5, face_6], 0.01, 1)
1006
+ room_2 = Room('ZoneSHOE_BOX920980',
1007
+ [face_1, face_2, face_3, face_4, face_5, face_7], 0.01, 1)
1008
+
1009
+ model_1 = Model('SouthHouse', [room_1], tolerance=0.01)
1010
+ model_2 = Model('NorthHouse', [room_2], tolerance=0.01)
1011
+ assert model_1.check_for_error('000101', False) == ''
1012
+ assert model_2.check_for_error('000101', False) != ''
1013
+ with pytest.raises(ValueError):
1014
+ model_2.check_for_error('000101', True)
1015
+
1016
+
988
1017
  def test_triangulated_apertures():
989
1018
  """Test the triangulated_apertures method."""
990
1019
  room = Room.from_box('TinyHouseZone', 5, 10, 3)
@@ -1,13 +0,0 @@
1
- [semantic_release]
2
- version_variable = honeybee/__init__.py:__version__
3
-
4
- [bdist_wheel]
5
- universal = 1
6
-
7
- [metadata]
8
- license_file = LICENSE
9
-
10
- [egg_info]
11
- tag_build =
12
- tag_date = 0
13
-
File without changes