honeybee-openstudio 2.23.5 → 2.23.6

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5ced01eda1ef2637e0f07892dc5498c63c7e7e424965ef9d458e0ce16daba7c2
4
- data.tar.gz: b98a359da6cfbef7010b3b77b0a3513937015c571c0c27602d3c7e4c4de35ed3
3
+ metadata.gz: 779f0f0085d9d4651f48c715cb6c70813d687dce61a540c90766b2efa5d42e88
4
+ data.tar.gz: 8c71a2c98b1e041ee9589115e6e3cc88380b7a670ccca558a010d6059835f0dc
5
5
  SHA512:
6
- metadata.gz: bbc8d2fde85273d8bed150e222671fee710f2c450591cf1dbf3b1f26e40c5b11ae1006f6ae865f2ae6250076a34518f120da7593e27f278d75aded811cae5957
7
- data.tar.gz: 78cd389a850c7b326a6e461126e969bec2c8f14a673c8aa4058216a5c67156f070e41d72360aa68f198e36590c83c011357a6f7bf6fc632528ba3713d3307afb
6
+ metadata.gz: 6bb6241027111bfcd79562bb0e2cb489c6bb0ae4883191572938bc94015c46b1c81c9a1037db2a4886263f55a0a001e934dbb17e537eaa8669bdd1266d7da65c
7
+ data.tar.gz: '059d0b94c4f7ec99ec9f8c9ae6ce8c524e46be2a00ea5edf8d461dacb446d5e15592c5ab1427885a6bb6b89592e41dddfc98e24073711bd45575427cea2bf102'
@@ -33,7 +33,7 @@ jobs:
33
33
  - name: set up node # we need node for for semantic release
34
34
  uses: actions/setup-node@v2.1.2
35
35
  with:
36
- node-version: 14.2.0
36
+ node-version: 14.17.0
37
37
  - name: install semantic-release
38
38
  run:
39
39
  npm install @semantic-release/exec
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = 'honeybee-openstudio'
7
- spec.version = '2.23.5'
7
+ spec.version = '2.23.6'
8
8
  spec.authors = ['Tanushree Charan', 'Dan Macumber', 'Chris Mackey', 'Mostapha Sadeghipour Roudsari']
9
9
  spec.email = ['tanushree.charan@nrel.gov', 'chris@ladybug.tools']
10
10
 
@@ -72,7 +72,7 @@ module Honeybee
72
72
  unless sub_surface.isConstructionDefaulted
73
73
  construction = sub_surface.construction
74
74
  if !construction.empty?
75
- constr_id = construction.get.nameString
75
+ constr_id = clean_identifier(construction.get.nameString)
76
76
  unless $window_constructions[constr_id].nil?
77
77
  hash[:construction] = constr_id
78
78
  end
@@ -72,7 +72,7 @@ module Honeybee
72
72
  unless sub_surface.isConstructionDefaulted
73
73
  construction = sub_surface.construction
74
74
  if !construction.empty?
75
- constr_id = construction.get.nameString
75
+ constr_id = clean_identifier(construction.get.nameString)
76
76
  if hash[:is_glass] && !$window_constructions[constr_id].nil?
77
77
  hash[:construction] = constr_id
78
78
  elsif !hash[:is_glass] && !$opaque_constructions[constr_id].nil?
@@ -74,7 +74,7 @@ module Honeybee
74
74
  unless surface.isConstructionDefaulted
75
75
  construction = surface.construction
76
76
  if !construction.empty?
77
- constr_id = construction.get.nameString
77
+ constr_id = clean_identifier(construction.get.nameString)
78
78
  unless $opaque_constructions[constr_id].nil?
79
79
  hash[:construction] = constr_id
80
80
  end
@@ -112,7 +112,7 @@ module Honeybee
112
112
  def self.story_from_space(space)
113
113
  story = space.buildingStory
114
114
  if !story.empty?
115
- return story.get.nameString
115
+ return clean_identifier(story.get.nameString)
116
116
  end
117
117
  nil
118
118
  end
@@ -62,7 +62,7 @@ module Honeybee
62
62
  unless shading_surface.isConstructionDefaulted
63
63
  construction = shading_surface.construction
64
64
  if !construction.empty?
65
- const_name = construction.get.nameString
65
+ const_name = clean_identifier(construction.get.nameString)
66
66
  hash[:construction] = const_name
67
67
  unless $shade_constructions.has_key?(const_name)
68
68
  const_obj = construction.get
@@ -74,7 +74,10 @@ module Honeybee
74
74
 
75
75
  transmittance_schedule = shading_surface.transmittanceSchedule
76
76
  if !transmittance_schedule.empty?
77
- hash[:transmittance_schedule] = transmittance_schedule.get.nameString
77
+ trans_sch_name = clean_identifier(transmittance_schedule.get.nameString)
78
+ unless $schedules[trans_sch_name].nil?
79
+ hash[:transmittance_schedule] = trans_sch_name
80
+ end
78
81
  end
79
82
 
80
83
  hash
@@ -64,7 +64,8 @@ module Honeybee
64
64
  hash[:tolerance] = 0.01
65
65
  hash[:angle_tolerance] = 1.0
66
66
 
67
- # Hashes for all constructions in the model
67
+ # Hashes for all shcedules and constructions in the model
68
+ $schedules = {}
68
69
  $opaque_constructions = {}
69
70
  $window_constructions = {}
70
71
  $shade_constructions = {}
@@ -282,7 +283,9 @@ module Honeybee
282
283
  def self.scheduleruleset_from_model(openstudio_model)
283
284
  result = []
284
285
  openstudio_model.getScheduleRulesets.each do |sch_ruleset|
285
- result << ScheduleRulesetAbridged.from_schedule_ruleset(sch_ruleset)
286
+ sched_hash = ScheduleRulesetAbridged.from_schedule_ruleset(sch_ruleset)
287
+ $schedules[sched_hash[:identifier]] = sched_hash
288
+ result << sched_hash
286
289
  end
287
290
  result
288
291
  end
@@ -37,7 +37,7 @@ module Honeybee
37
37
  def self.from_design_day(design_day)
38
38
  hash = {}
39
39
  hash[:type] = 'DesignDay'
40
- hash[:name] = design_day.nameString
40
+ hash[:name] = clean_identifier(design_day.nameString)
41
41
  hash[:day_type] = day_type_from_design_day(design_day)
42
42
  hash[:dry_bulb_condition] = dry_bulb_condition_from_design_day(design_day)
43
43
  hash[:humidity_condition] = humidity_condition_from_design_day(design_day)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: honeybee-openstudio
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.23.5
4
+ version: 2.23.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tanushree Charan
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: exe
13
13
  cert_chain: []
14
- date: 2021-09-20 00:00:00.000000000 Z
14
+ date: 2021-09-21 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: bundler