Skip to content

Commit

Permalink
Merge pull request #1755 from NREL/nrcan_426
Browse files Browse the repository at this point in the history
Formatting, removing unnessecary require, adjusting print statement
  • Loading branch information
ckirney authored Jun 6, 2024
2 parents 28b64e6 + 4e8864e commit 021db71
Show file tree
Hide file tree
Showing 613 changed files with 14,099 additions and 10,421 deletions.
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
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
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
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
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
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
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
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
Loading

0 comments on commit 021db71

Please sign in to comment.