Skip to content

Commit

Permalink
Merge pull request #732 from NREL/msgpack_windows
Browse files Browse the repository at this point in the history
Fix msgpack on Windows
  • Loading branch information
shorowit authored May 30, 2024
2 parents f648321 + a0570df commit 2bd2402
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
8 changes: 4 additions & 4 deletions hpxml-measures/HPXMLtoOpenStudio/measure.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<schema_version>3.1</schema_version>
<name>hpxm_lto_openstudio</name>
<uid>b1543b30-9465-45ff-ba04-1d1f85e763bc</uid>
<version_id>99f39280-a6e5-47aa-a0c8-9aefa26ea26c</version_id>
<version_modified>2024-05-29T02:38:03Z</version_modified>
<version_id>19f754cf-2165-45e2-9387-46f301d3d453</version_id>
<version_modified>2024-05-29T18:54:28Z</version_modified>
<xml_checksum>D8922A73</xml_checksum>
<class_name>HPXMLtoOpenStudio</class_name>
<display_name>HPXML to OpenStudio Translator</display_name>
Expand Down Expand Up @@ -387,7 +387,7 @@
<filename>hvac_sizing.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>E9C68804</checksum>
<checksum>258360CD</checksum>
</file>
<file>
<filename>lighting.rb</filename>
Expand Down Expand Up @@ -429,7 +429,7 @@
<filename>output.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>4E4BE5F9</checksum>
<checksum>CF115DD1</checksum>
</file>
<file>
<filename>psychrometrics.rb</filename>
Expand Down
2 changes: 1 addition & 1 deletion hpxml-measures/HPXMLtoOpenStudio/resources/hvac_sizing.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4110,7 +4110,7 @@ def self.floors(obj)
File.open(output_file_path, 'w') { |json| json.write(JSON.pretty_generate(h)) }
elsif output_format == 'msgpack'
require 'msgpack'
File.open(output_file_path, 'w') { |json| h.to_msgpack(json) }
File.open(output_file_path, 'wb') { |json| h.to_msgpack(json) }
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion hpxml-measures/HPXMLtoOpenStudio/resources/output.rb
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ def self.write_results_out_to_file(results_out, output_format, output_file_path,
require 'json'
File.open(output_file_path, mode) { |json| json.write(JSON.pretty_generate(h)) }
elsif output_format == 'msgpack'
File.open(output_file_path, mode) { |json| h.to_msgpack(json) }
File.open(output_file_path, "#{mode}b") { |json| h.to_msgpack(json) }
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion hpxml-measures/ReportSimulationOutput/measure.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1832,7 +1832,7 @@ def report_timeseries_output_results(runner, outputs, timeseries_output_path, ar
require 'json'
File.open(timeseries_output_path, 'w') { |json| json.write(JSON.pretty_generate(h)) }
elsif args[:output_format] == 'msgpack'
File.open(timeseries_output_path, 'w') { |json| h.to_msgpack(json) }
File.open(timeseries_output_path, 'wb') { |json| h.to_msgpack(json) }
end
end
runner.registerInfo("Wrote timeseries output results to #{timeseries_output_path}.")
Expand Down
6 changes: 3 additions & 3 deletions hpxml-measures/ReportSimulationOutput/measure.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<schema_version>3.1</schema_version>
<name>report_simulation_output</name>
<uid>df9d170c-c21a-4130-866d-0d46b06073fd</uid>
<version_id>ec111528-5b18-43ad-ae95-0a41f5aaec05</version_id>
<version_modified>2024-05-24T00:08:38Z</version_modified>
<version_id>e9577eb7-04dc-4d34-b4b2-81b86c0bdd15</version_id>
<version_modified>2024-05-29T18:54:30Z</version_modified>
<xml_checksum>9BF1E6AC</xml_checksum>
<class_name>ReportSimulationOutput</class_name>
<display_name>HPXML Simulation Output Report</display_name>
Expand Down Expand Up @@ -1929,7 +1929,7 @@
<filename>measure.rb</filename>
<filetype>rb</filetype>
<usage_type>script</usage_type>
<checksum>BA579923</checksum>
<checksum>D25984FD</checksum>
</file>
<file>
<filename>test_report_sim_output.rb</filename>
Expand Down
2 changes: 1 addition & 1 deletion hpxml-measures/ReportUtilityBills/measure.rb
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ def report_monthly_output_results(runner, args, timestamps, monthly_data, monthl
require 'json'
File.open(monthly_output_path, 'w') { |json| json.write(JSON.pretty_generate(h)) }
elsif args[:output_format] == 'msgpack'
File.open(monthly_output_path, 'w') { |json| h.to_msgpack(json) }
File.open(monthly_output_path, 'wb') { |json| h.to_msgpack(json) }
end
end
runner.registerInfo("Wrote monthly bills output to #{monthly_output_path}.")
Expand Down
6 changes: 3 additions & 3 deletions hpxml-measures/ReportUtilityBills/measure.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<schema_version>3.1</schema_version>
<name>report_utility_bills</name>
<uid>ca88a425-e59a-4bc4-af51-c7e7d1e960fe</uid>
<version_id>71567c67-85c0-4d09-8220-85cc8a1897d6</version_id>
<version_modified>2024-05-27T15:54:13Z</version_modified>
<version_id>2d6b4393-2fe5-429a-a130-da41a8cb36f0</version_id>
<version_modified>2024-05-29T18:54:32Z</version_modified>
<xml_checksum>15BF4E57</xml_checksum>
<class_name>ReportUtilityBills</class_name>
<display_name>Utility Bills Report</display_name>
Expand Down Expand Up @@ -180,7 +180,7 @@
<filename>measure.rb</filename>
<filetype>rb</filetype>
<usage_type>script</usage_type>
<checksum>4E7FF5BB</checksum>
<checksum>99961E51</checksum>
</file>
<file>
<filename>detailed_rates/Sample Flat Rate Min Annual Charge.json</filename>
Expand Down

0 comments on commit 2bd2402

Please sign in to comment.