Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Measure unit test fixes #134

Merged
merged 9 commits into from
Mar 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions resources/measures/ChangeBuildingLocation/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>change_building_location</name>
<uid>d4db4971-f5ba-11e3-a3ac-0800200c9a66</uid>
<version_id>b2127c2c-d32e-48c2-98e6-1974815395ca</version_id>
<version_modified>2024-01-26T03:26:16Z</version_modified>
<version_id>6fb0b369-c51c-4c06-ac43-db84efdd5632</version_id>
<version_modified>2024-03-06T20:56:01Z</version_modified>
<xml_checksum>057E8D9D</xml_checksum>
<class_name>ChangeBuildingLocation</class_name>
<display_name>ChangeBuildingLocation</display_name>
Expand All @@ -26,7 +26,6 @@
<type>String</type>
<required>true</required>
<model_dependent>false</model_dependent>
<default_value>2018</default_value>
</argument>
<argument>
<name>climate_zone</name>
Expand Down Expand Up @@ -335,7 +334,7 @@
<filename>measure.rb</filename>
<filetype>rb</filetype>
<usage_type>script</usage_type>
<checksum>680AE904</checksum>
<checksum>ED117F7E</checksum>
</file>
<file>
<filename>epw.rb</filename>
Expand Down Expand Up @@ -431,7 +430,7 @@
<filename>change_building_location_test.rb</filename>
<filetype>rb</filetype>
<usage_type>test</usage_type>
<checksum>290BBD22</checksum>
<checksum>2B466B1C</checksum>
</file>
<file>
<filename>multiyear.ddy</filename>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,38 +135,43 @@ def apply_measure_to_model(test_name, args, model_name = nil, result_value = 'Su

def test_weather_file
args = {}
args['year'] = '2018'
args['weather_file_name'] = 'USA_MA_Boston-Logan.Intl.AP.725090_TMY3.epw' # seems to search directory of OSW even with empty file_paths
args['climate_zone'] = 'ASHRAE 169-2013-5A'
apply_measure_to_model(__method__.to_s.gsub('test_', ''), args, 'test.osm', nil, nil, nil)
args['climate_zone'] = 'ASHRAE 169-2013-5A'
apply_measure_to_model(__method__.to_s.gsub('test_', ''), args, 'test.osm', nil, nil, nil, 3)
end

def test_weather_file_WA_Renton
args = {}
args['year'] = '2018'
args['weather_file_name'] = 'USA_WA_Renton.Muni.AP.727934_TMY3.epw' # seems to search directory of OSW even with empty file_paths
args['climate_zone'] = 'ASHRAE 169-2013-4C'
args['climate_zone'] = 'ASHRAE 169-2013-4C'
args['set_year'] = 2012
apply_measure_to_model(__method__.to_s.gsub('test_', ''), args, 'test.osm', nil, 2, nil, 0)
end

def test_multiyear_weather_file
args = {}
args['year'] = '2018'
args['weather_file_name'] = 'multiyear.epw' # seems to search directory of OSW even with empty file_paths
args['climate_zone'] = 'ASHRAE 169-2013-4C'
apply_measure_to_model(__method__.to_s.gsub('test_', ''), args, 'test.osm', nil, nil, nil)
args['climate_zone'] = 'ASHRAE 169-2013-4C'
apply_measure_to_model(__method__.to_s.gsub('test_', ''), args, 'test.osm', nil, nil, nil, 3)
end

def test_weather_file_bad
args = {}
args['year'] = '2018'
args['weather_file_name'] = 'BadFileName.epw' # seems to search directory of OSW even with empty file_paths
args['climate_zone'] = 'ASHRAE 169-2013-5A'
args['climate_zone'] = 'ASHRAE 169-2013-5A'
apply_measure_to_model(__method__.to_s.gsub('test_', ''), args, 'test.osm', 'Fail', nil, nil)
end

def test_weather_file_monthly_design_days
args = {}
args['year'] = '2018'
args['weather_file_name'] = 'CA_LOS-ANGELES-IAP_722950S_12.epw' # seems to search directory of OSW even with empty file_paths
args['climate_zone'] = 'T24-CEC8'
apply_measure_to_model(__method__.to_s.gsub('test_', ''), args, 'test.osm', nil, nil, nil, 14)
args['climate_zone'] = 'T24-CEC8'
apply_measure_to_model(__method__.to_s.gsub('test_', ''), args, 'test.osm', nil, nil, nil, 6)
end

def test_soil_conductivity
Expand All @@ -176,7 +181,7 @@ def test_soil_conductivity
args['year'] = '2018'
args['soil_conductivity'] = 1.8
test_name = __method__.to_s.gsub('test_', '')
apply_measure_to_model(test_name, args, 'test.osm', nil, nil, nil, 14)
apply_measure_to_model(test_name, args, 'test.osm', nil, nil, nil, 6)

# load the test model
model_path = File.dirname(__FILE__) + "/output/#{test_name}_test_output.osm"
Expand Down
10 changes: 2 additions & 8 deletions resources/measures/upgrade_env_new_aedg_windows/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>env_new_aedg_windows</name>
<uid>b0167804-5cb4-4641-b9de-961c640f02ea</uid>
<version_id>ef420e4f-52d6-44ea-a526-174efcc1712b</version_id>
<version_modified>2023-10-16T20:24:51Z</version_modified>
<version_id>593deab0-8a25-4700-aee7-818aec1b8214</version_id>
<version_modified>2024-03-06T21:00:41Z</version_modified>
<xml_checksum>4A8A93C6</xml_checksum>
<class_name>EnvNewAedgWindows</class_name>
<display_name>env_new_aedg_windows</display_name>
Expand Down Expand Up @@ -55,12 +55,6 @@
<usage_type>script</usage_type>
<checksum>55EF9A96</checksum>
</file>
<file>
<filename>env_new_aedg_windows_test.rb</filename>
<filetype>rb</filetype>
<usage_type>test</usage_type>
<checksum>DA1FD041</checksum>
</file>
<file>
<filename>measure_test.rb</filename>
<filetype>rb</filetype>
Expand Down

This file was deleted.

Loading