openstudio-recommendation-engine 0.1.3 → 0.1.4
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.
@@ -29,7 +29,7 @@ module OpenStudio
|
|
29
29
|
measure_checks = Dir.glob("#{@path_to_measures}/**/recommendation.rb")
|
30
30
|
|
31
31
|
applicable_measures = []
|
32
|
-
|
32
|
+
debug_outputs = []
|
33
33
|
|
34
34
|
measure_checks.each do |measure|
|
35
35
|
require "#{File.expand_path(measure)}"
|
@@ -40,22 +40,24 @@ module OpenStudio
|
|
40
40
|
measure = Object.const_get(measure_class_name).new
|
41
41
|
|
42
42
|
if @model
|
43
|
-
results_json,
|
43
|
+
results_json, debug_json = measure.check_applicability(@model)
|
44
44
|
if results_json
|
45
45
|
applicable_measures << results_json
|
46
46
|
else
|
47
47
|
puts "measure #{measure_class_name} not applicable"
|
48
48
|
end
|
49
|
-
|
49
|
+
debug_outputs << debug_json
|
50
50
|
else
|
51
51
|
raise "No model passed into the recommendation engine"
|
52
52
|
end
|
53
53
|
|
54
54
|
end
|
55
55
|
|
56
|
+
#convert the output to JSON
|
56
57
|
applicable_measures_json = JSON.pretty_generate(applicable_measures)
|
58
|
+
debug_output_json = JSON.pretty_generate(debug_outputs)
|
57
59
|
|
58
|
-
return [applicable_measures_json,
|
60
|
+
return [applicable_measures_json,debug_output_json]
|
59
61
|
|
60
62
|
end
|
61
63
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: openstudio-recommendation-engine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 19
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 4
|
10
|
+
version: 0.1.4
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Nicholas Long
|