-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1755 from NREL/nrcan_426
Formatting, removing unnessecary require, adjusting print statement
- Loading branch information
Showing
613 changed files
with
14,099 additions
and
10,421 deletions.
There are no files selected for viewing
40 changes: 23 additions & 17 deletions
40
test/necb/building_regression_tests/resources/template_test_necb_bldg.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,29 @@ | ||
require_relative '../../../helpers/minitest_helper' | ||
require_relative '../../../helpers/create_doe_prototype_helper' | ||
require_relative '../../../helpers/compare_models_helper' | ||
require_relative '../resources/regression_helper' | ||
|
||
class Test_<%=building_type%>_<%=template%>_<%=primary_heating_fuel%> < NECBRegressionHelper | ||
def setup() | ||
super() | ||
end | ||
def test_<%=template%>_<%=building_type%>_regression_<%=primary_heating_fuel%>() | ||
result, diff = create_model_and_regression_test(building_type: '<%=building_type%>',primary_heating_fuel: '<%=primary_heating_fuel%>', epw_file: '<%=epw_file%>',template: '<%=template%>', run_simulation: <%=@run_simulation%>) | ||
if result == false | ||
puts "JSON terse listing of diff-errors." | ||
puts diff | ||
puts "Pretty listing of diff-errors for readability." | ||
puts JSON.pretty_generate( diff ) | ||
puts "You can find the saved json diff file here test/necb/regression_models/<%=building_type%>-<%=template%>-<%=primary_heating_fuel%>_<%=File.basename(epw_file, ".epw")%>_diffs.json" | ||
puts "outputing errors here. " | ||
puts diff["diffs-errors"] if result == false | ||
end | ||
assert(result, diff) | ||
end | ||
def setup() | ||
super() | ||
end | ||
def test_<%=template%>_<%=building_type%>_regression_<%=primary_heating_fuel%>() | ||
result, diff = create_model_and_regression_test( | ||
building_type: '<%=building_type%>', | ||
primary_heating_fuel: '<%=primary_heating_fuel%>', | ||
epw_file: '<%=epw_file%>', | ||
template: '<%=template%>', | ||
run_simulation: <%=@run_simulation%> | ||
) | ||
if result == false | ||
puts "JSON terse listing of diff-errors." | ||
puts diff | ||
puts "Pretty listing of diff-errors for readability." | ||
puts JSON.pretty_generate( diff ) | ||
puts "You can find the saved json diff file here test/necb/building_regression_tests/expected_results/<%=building_type%>-<%=template%>-<%=primary_heating_fuel%>_<%=File.basename(epw_file, ".epw")%>_diffs.json" | ||
puts "outputing errors here. " | ||
puts diff["diffs-errors"] if result == false | ||
end | ||
assert(result, diff) | ||
end | ||
end |
40 changes: 23 additions & 17 deletions
40
...regression_tests/tests/test_necb_bldg_FullServiceRestaurant_BTAP1980TO2010_Electricity.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,29 @@ | ||
require_relative '../../../helpers/minitest_helper' | ||
require_relative '../../../helpers/create_doe_prototype_helper' | ||
require_relative '../../../helpers/compare_models_helper' | ||
require_relative '../resources/regression_helper' | ||
|
||
class Test_FullServiceRestaurant_BTAP1980TO2010_Electricity < NECBRegressionHelper | ||
def setup() | ||
super() | ||
end | ||
def test_BTAP1980TO2010_FullServiceRestaurant_regression_Electricity() | ||
result, diff = create_model_and_regression_test(building_type: 'FullServiceRestaurant',primary_heating_fuel: 'Electricity', epw_file: 'CAN_AB_Calgary.Intl.AP.718770_CWEC2020.epw',template: 'BTAP1980TO2010', run_simulation: false) | ||
if result == false | ||
puts "JSON terse listing of diff-errors." | ||
puts diff | ||
puts "Pretty listing of diff-errors for readability." | ||
puts JSON.pretty_generate( diff ) | ||
puts "You can find the saved json diff file here test/necb/regression_models/FullServiceRestaurant-BTAP1980TO2010-Electricity_CAN_AB_Calgary.Intl.AP.718770_CWEC2020_diffs.json" | ||
puts "outputing errors here. " | ||
puts diff["diffs-errors"] if result == false | ||
end | ||
assert(result, diff) | ||
end | ||
def setup() | ||
super() | ||
end | ||
|
||
def test_BTAP1980TO2010_FullServiceRestaurant_regression_Electricity() | ||
result, diff = create_model_and_regression_test( | ||
building_type: 'FullServiceRestaurant', | ||
primary_heating_fuel: 'Electricity', | ||
epw_file: 'CAN_AB_Calgary.Intl.AP.718770_CWEC2020.epw', | ||
template: 'BTAP1980TO2010', | ||
run_simulation: false | ||
) | ||
if result == false | ||
puts "JSON terse listing of diff-errors." | ||
puts diff | ||
puts "Pretty listing of diff-errors for readability." | ||
puts JSON.pretty_generate( diff ) | ||
puts "You can find the saved json diff file here test/necb/building_regression_tests/expected_results/FullServiceRestaurant-BTAP1980TO2010-Electricity_CAN_AB_Calgary.Intl.AP.718770_CWEC2020_diffs.json" | ||
puts "outputing errors here. " | ||
puts diff["diffs-errors"] if result == false | ||
end | ||
assert(result, diff) | ||
end | ||
end |
40 changes: 23 additions & 17 deletions
40
...ests/tests/test_necb_bldg_FullServiceRestaurant_BTAP1980TO2010_ElectricityHPElecBackup.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,29 @@ | ||
require_relative '../../../helpers/minitest_helper' | ||
require_relative '../../../helpers/create_doe_prototype_helper' | ||
require_relative '../../../helpers/compare_models_helper' | ||
require_relative '../resources/regression_helper' | ||
|
||
class Test_FullServiceRestaurant_BTAP1980TO2010_ElectricityHPElecBackup < NECBRegressionHelper | ||
def setup() | ||
super() | ||
end | ||
def test_BTAP1980TO2010_FullServiceRestaurant_regression_ElectricityHPElecBackup() | ||
result, diff = create_model_and_regression_test(building_type: 'FullServiceRestaurant',primary_heating_fuel: 'ElectricityHPElecBackup', epw_file: 'CAN_AB_Calgary.Intl.AP.718770_CWEC2020.epw',template: 'BTAP1980TO2010', run_simulation: false) | ||
if result == false | ||
puts "JSON terse listing of diff-errors." | ||
puts diff | ||
puts "Pretty listing of diff-errors for readability." | ||
puts JSON.pretty_generate( diff ) | ||
puts "You can find the saved json diff file here test/necb/regression_models/FullServiceRestaurant-BTAP1980TO2010-ElectricityHPElecBackup_CAN_AB_Calgary.Intl.AP.718770_CWEC2020_diffs.json" | ||
puts "outputing errors here. " | ||
puts diff["diffs-errors"] if result == false | ||
end | ||
assert(result, diff) | ||
end | ||
def setup() | ||
super() | ||
end | ||
|
||
def test_BTAP1980TO2010_FullServiceRestaurant_regression_ElectricityHPElecBackup() | ||
result, diff = create_model_and_regression_test( | ||
building_type: 'FullServiceRestaurant', | ||
primary_heating_fuel: 'ElectricityHPElecBackup', | ||
epw_file: 'CAN_AB_Calgary.Intl.AP.718770_CWEC2020.epw', | ||
template: 'BTAP1980TO2010', | ||
run_simulation: false | ||
) | ||
if result == false | ||
puts "JSON terse listing of diff-errors." | ||
puts diff | ||
puts "Pretty listing of diff-errors for readability." | ||
puts JSON.pretty_generate( diff ) | ||
puts "You can find the saved json diff file here test/necb/building_regression_tests/expected_results/FullServiceRestaurant-BTAP1980TO2010-ElectricityHPElecBackup_CAN_AB_Calgary.Intl.AP.718770_CWEC2020_diffs.json" | ||
puts "outputing errors here. " | ||
puts diff["diffs-errors"] if result == false | ||
end | ||
assert(result, diff) | ||
end | ||
end |
40 changes: 23 additions & 17 deletions
40
.../tests/test_necb_bldg_FullServiceRestaurant_BTAP1980TO2010_ElectricityHPGasBackupMixed.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,29 @@ | ||
require_relative '../../../helpers/minitest_helper' | ||
require_relative '../../../helpers/create_doe_prototype_helper' | ||
require_relative '../../../helpers/compare_models_helper' | ||
require_relative '../resources/regression_helper' | ||
|
||
class Test_FullServiceRestaurant_BTAP1980TO2010_ElectricityHPGasBackupMixed < NECBRegressionHelper | ||
def setup() | ||
super() | ||
end | ||
def test_BTAP1980TO2010_FullServiceRestaurant_regression_ElectricityHPGasBackupMixed() | ||
result, diff = create_model_and_regression_test(building_type: 'FullServiceRestaurant',primary_heating_fuel: 'ElectricityHPGasBackupMixed', epw_file: 'CAN_AB_Calgary.Intl.AP.718770_CWEC2020.epw',template: 'BTAP1980TO2010', run_simulation: false) | ||
if result == false | ||
puts "JSON terse listing of diff-errors." | ||
puts diff | ||
puts "Pretty listing of diff-errors for readability." | ||
puts JSON.pretty_generate( diff ) | ||
puts "You can find the saved json diff file here test/necb/regression_models/FullServiceRestaurant-BTAP1980TO2010-ElectricityHPGasBackupMixed_CAN_AB_Calgary.Intl.AP.718770_CWEC2020_diffs.json" | ||
puts "outputing errors here. " | ||
puts diff["diffs-errors"] if result == false | ||
end | ||
assert(result, diff) | ||
end | ||
def setup() | ||
super() | ||
end | ||
|
||
def test_BTAP1980TO2010_FullServiceRestaurant_regression_ElectricityHPGasBackupMixed() | ||
result, diff = create_model_and_regression_test( | ||
building_type: 'FullServiceRestaurant', | ||
primary_heating_fuel: 'ElectricityHPGasBackupMixed', | ||
epw_file: 'CAN_AB_Calgary.Intl.AP.718770_CWEC2020.epw', | ||
template: 'BTAP1980TO2010', | ||
run_simulation: false | ||
) | ||
if result == false | ||
puts "JSON terse listing of diff-errors." | ||
puts diff | ||
puts "Pretty listing of diff-errors for readability." | ||
puts JSON.pretty_generate( diff ) | ||
puts "You can find the saved json diff file here test/necb/building_regression_tests/expected_results/FullServiceRestaurant-BTAP1980TO2010-ElectricityHPGasBackupMixed_CAN_AB_Calgary.Intl.AP.718770_CWEC2020_diffs.json" | ||
puts "outputing errors here. " | ||
puts diff["diffs-errors"] if result == false | ||
end | ||
assert(result, diff) | ||
end | ||
end |
40 changes: 23 additions & 17 deletions
40
..._regression_tests/tests/test_necb_bldg_FullServiceRestaurant_BTAP1980TO2010_NaturalGas.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,29 @@ | ||
require_relative '../../../helpers/minitest_helper' | ||
require_relative '../../../helpers/create_doe_prototype_helper' | ||
require_relative '../../../helpers/compare_models_helper' | ||
require_relative '../resources/regression_helper' | ||
|
||
class Test_FullServiceRestaurant_BTAP1980TO2010_NaturalGas < NECBRegressionHelper | ||
def setup() | ||
super() | ||
end | ||
def test_BTAP1980TO2010_FullServiceRestaurant_regression_NaturalGas() | ||
result, diff = create_model_and_regression_test(building_type: 'FullServiceRestaurant',primary_heating_fuel: 'NaturalGas', epw_file: 'CAN_AB_Calgary.Intl.AP.718770_CWEC2020.epw',template: 'BTAP1980TO2010', run_simulation: false) | ||
if result == false | ||
puts "JSON terse listing of diff-errors." | ||
puts diff | ||
puts "Pretty listing of diff-errors for readability." | ||
puts JSON.pretty_generate( diff ) | ||
puts "You can find the saved json diff file here test/necb/regression_models/FullServiceRestaurant-BTAP1980TO2010-NaturalGas_CAN_AB_Calgary.Intl.AP.718770_CWEC2020_diffs.json" | ||
puts "outputing errors here. " | ||
puts diff["diffs-errors"] if result == false | ||
end | ||
assert(result, diff) | ||
end | ||
def setup() | ||
super() | ||
end | ||
|
||
def test_BTAP1980TO2010_FullServiceRestaurant_regression_NaturalGas() | ||
result, diff = create_model_and_regression_test( | ||
building_type: 'FullServiceRestaurant', | ||
primary_heating_fuel: 'NaturalGas', | ||
epw_file: 'CAN_AB_Calgary.Intl.AP.718770_CWEC2020.epw', | ||
template: 'BTAP1980TO2010', | ||
run_simulation: false | ||
) | ||
if result == false | ||
puts "JSON terse listing of diff-errors." | ||
puts diff | ||
puts "Pretty listing of diff-errors for readability." | ||
puts JSON.pretty_generate( diff ) | ||
puts "You can find the saved json diff file here test/necb/building_regression_tests/expected_results/FullServiceRestaurant-BTAP1980TO2010-NaturalGas_CAN_AB_Calgary.Intl.AP.718770_CWEC2020_diffs.json" | ||
puts "outputing errors here. " | ||
puts diff["diffs-errors"] if result == false | ||
end | ||
assert(result, diff) | ||
end | ||
end |
40 changes: 23 additions & 17 deletions
40
.../tests/test_necb_bldg_FullServiceRestaurant_BTAP1980TO2010_NaturalGasHPElecBackupMixed.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,29 @@ | ||
require_relative '../../../helpers/minitest_helper' | ||
require_relative '../../../helpers/create_doe_prototype_helper' | ||
require_relative '../../../helpers/compare_models_helper' | ||
require_relative '../resources/regression_helper' | ||
|
||
class Test_FullServiceRestaurant_BTAP1980TO2010_NaturalGasHPElecBackupMixed < NECBRegressionHelper | ||
def setup() | ||
super() | ||
end | ||
def test_BTAP1980TO2010_FullServiceRestaurant_regression_NaturalGasHPElecBackupMixed() | ||
result, diff = create_model_and_regression_test(building_type: 'FullServiceRestaurant',primary_heating_fuel: 'NaturalGasHPElecBackupMixed', epw_file: 'CAN_AB_Calgary.Intl.AP.718770_CWEC2020.epw',template: 'BTAP1980TO2010', run_simulation: false) | ||
if result == false | ||
puts "JSON terse listing of diff-errors." | ||
puts diff | ||
puts "Pretty listing of diff-errors for readability." | ||
puts JSON.pretty_generate( diff ) | ||
puts "You can find the saved json diff file here test/necb/regression_models/FullServiceRestaurant-BTAP1980TO2010-NaturalGasHPElecBackupMixed_CAN_AB_Calgary.Intl.AP.718770_CWEC2020_diffs.json" | ||
puts "outputing errors here. " | ||
puts diff["diffs-errors"] if result == false | ||
end | ||
assert(result, diff) | ||
end | ||
def setup() | ||
super() | ||
end | ||
|
||
def test_BTAP1980TO2010_FullServiceRestaurant_regression_NaturalGasHPElecBackupMixed() | ||
result, diff = create_model_and_regression_test( | ||
building_type: 'FullServiceRestaurant', | ||
primary_heating_fuel: 'NaturalGasHPElecBackupMixed', | ||
epw_file: 'CAN_AB_Calgary.Intl.AP.718770_CWEC2020.epw', | ||
template: 'BTAP1980TO2010', | ||
run_simulation: false | ||
) | ||
if result == false | ||
puts "JSON terse listing of diff-errors." | ||
puts diff | ||
puts "Pretty listing of diff-errors for readability." | ||
puts JSON.pretty_generate( diff ) | ||
puts "You can find the saved json diff file here test/necb/building_regression_tests/expected_results/FullServiceRestaurant-BTAP1980TO2010-NaturalGasHPElecBackupMixed_CAN_AB_Calgary.Intl.AP.718770_CWEC2020_diffs.json" | ||
puts "outputing errors here. " | ||
puts diff["diffs-errors"] if result == false | ||
end | ||
assert(result, diff) | ||
end | ||
end |
40 changes: 23 additions & 17 deletions
40
..._tests/tests/test_necb_bldg_FullServiceRestaurant_BTAP1980TO2010_NaturalGasHPGasBackup.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,29 @@ | ||
require_relative '../../../helpers/minitest_helper' | ||
require_relative '../../../helpers/create_doe_prototype_helper' | ||
require_relative '../../../helpers/compare_models_helper' | ||
require_relative '../resources/regression_helper' | ||
|
||
class Test_FullServiceRestaurant_BTAP1980TO2010_NaturalGasHPGasBackup < NECBRegressionHelper | ||
def setup() | ||
super() | ||
end | ||
def test_BTAP1980TO2010_FullServiceRestaurant_regression_NaturalGasHPGasBackup() | ||
result, diff = create_model_and_regression_test(building_type: 'FullServiceRestaurant',primary_heating_fuel: 'NaturalGasHPGasBackup', epw_file: 'CAN_AB_Calgary.Intl.AP.718770_CWEC2020.epw',template: 'BTAP1980TO2010', run_simulation: false) | ||
if result == false | ||
puts "JSON terse listing of diff-errors." | ||
puts diff | ||
puts "Pretty listing of diff-errors for readability." | ||
puts JSON.pretty_generate( diff ) | ||
puts "You can find the saved json diff file here test/necb/regression_models/FullServiceRestaurant-BTAP1980TO2010-NaturalGasHPGasBackup_CAN_AB_Calgary.Intl.AP.718770_CWEC2020_diffs.json" | ||
puts "outputing errors here. " | ||
puts diff["diffs-errors"] if result == false | ||
end | ||
assert(result, diff) | ||
end | ||
def setup() | ||
super() | ||
end | ||
|
||
def test_BTAP1980TO2010_FullServiceRestaurant_regression_NaturalGasHPGasBackup() | ||
result, diff = create_model_and_regression_test( | ||
building_type: 'FullServiceRestaurant', | ||
primary_heating_fuel: 'NaturalGasHPGasBackup', | ||
epw_file: 'CAN_AB_Calgary.Intl.AP.718770_CWEC2020.epw', | ||
template: 'BTAP1980TO2010', | ||
run_simulation: false | ||
) | ||
if result == false | ||
puts "JSON terse listing of diff-errors." | ||
puts diff | ||
puts "Pretty listing of diff-errors for readability." | ||
puts JSON.pretty_generate( diff ) | ||
puts "You can find the saved json diff file here test/necb/building_regression_tests/expected_results/FullServiceRestaurant-BTAP1980TO2010-NaturalGasHPGasBackup_CAN_AB_Calgary.Intl.AP.718770_CWEC2020_diffs.json" | ||
puts "outputing errors here. " | ||
puts diff["diffs-errors"] if result == false | ||
end | ||
assert(result, diff) | ||
end | ||
end |
40 changes: 23 additions & 17 deletions
40
...ng_regression_tests/tests/test_necb_bldg_FullServiceRestaurant_BTAPPRE1980_Electricity.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,29 @@ | ||
require_relative '../../../helpers/minitest_helper' | ||
require_relative '../../../helpers/create_doe_prototype_helper' | ||
require_relative '../../../helpers/compare_models_helper' | ||
require_relative '../resources/regression_helper' | ||
|
||
class Test_FullServiceRestaurant_BTAPPRE1980_Electricity < NECBRegressionHelper | ||
def setup() | ||
super() | ||
end | ||
def test_BTAPPRE1980_FullServiceRestaurant_regression_Electricity() | ||
result, diff = create_model_and_regression_test(building_type: 'FullServiceRestaurant',primary_heating_fuel: 'Electricity', epw_file: 'CAN_AB_Calgary.Intl.AP.718770_CWEC2020.epw',template: 'BTAPPRE1980', run_simulation: false) | ||
if result == false | ||
puts "JSON terse listing of diff-errors." | ||
puts diff | ||
puts "Pretty listing of diff-errors for readability." | ||
puts JSON.pretty_generate( diff ) | ||
puts "You can find the saved json diff file here test/necb/regression_models/FullServiceRestaurant-BTAPPRE1980-Electricity_CAN_AB_Calgary.Intl.AP.718770_CWEC2020_diffs.json" | ||
puts "outputing errors here. " | ||
puts diff["diffs-errors"] if result == false | ||
end | ||
assert(result, diff) | ||
end | ||
def setup() | ||
super() | ||
end | ||
|
||
def test_BTAPPRE1980_FullServiceRestaurant_regression_Electricity() | ||
result, diff = create_model_and_regression_test( | ||
building_type: 'FullServiceRestaurant', | ||
primary_heating_fuel: 'Electricity', | ||
epw_file: 'CAN_AB_Calgary.Intl.AP.718770_CWEC2020.epw', | ||
template: 'BTAPPRE1980', | ||
run_simulation: false | ||
) | ||
if result == false | ||
puts "JSON terse listing of diff-errors." | ||
puts diff | ||
puts "Pretty listing of diff-errors for readability." | ||
puts JSON.pretty_generate( diff ) | ||
puts "You can find the saved json diff file here test/necb/building_regression_tests/expected_results/FullServiceRestaurant-BTAPPRE1980-Electricity_CAN_AB_Calgary.Intl.AP.718770_CWEC2020_diffs.json" | ||
puts "outputing errors here. " | ||
puts diff["diffs-errors"] if result == false | ||
end | ||
assert(result, diff) | ||
end | ||
end |
Oops, something went wrong.