Skip to content

Commit

Permalink
Merge pull request #1110 from NREL/catch-warnings2
Browse files Browse the repository at this point in the history
 Create CI tests for catching warnings thrown by run_analysis.rb, follow-up
  • Loading branch information
joseph-robertson committed Aug 10, 2023
2 parents 8b7cf22 + 7e98ca3 commit 3085093
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions test/test_run_analysis.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ def _verify_outputs(cli_output_log, testing = false)
next if _expected_warning_message(message, 'No dishwasher specified, the model will not include dishwasher energy use. [context: /HPXML/Building/BuildingDetails]')
next if _expected_warning_message(message, 'No refrigerator specified, the model will not include refrigerator energy use. [context: /HPXML/Building/BuildingDetails]')
next if _expected_warning_message(message, 'No cooking range specified, the model will not include cooking range/oven energy use. [context: /HPXML/Building/BuildingDetails]')
next if _expected_warning_message(message, 'Home with unconditioned basement/crawlspace foundation type has both foundation wall insulation and floor insulation.')
next if _expected_warning_message(message, "Foundation type of 'AboveApartment' cannot have a non-zero height. Assuming height is zero.")
next if _expected_warning_message(message, "Both 'occupants' schedule file and weekday fractions provided; the latter will be ignored.")
next if _expected_warning_message(message, "Both 'occupants' schedule file and weekend fractions provided; the latter will be ignored.")
Expand Down Expand Up @@ -102,22 +101,21 @@ def _verify_outputs(cli_output_log, testing = false)
next if _expected_warning_message(message, 'Could not find state average fuel oil rate based on')
next if _expected_warning_message(message, "Specified incompatible corridor; setting corridor position to 'Single Exterior (Front)'.")
next if _expected_warning_message(message, 'DistanceToTopOfWindow is greater than 12 feet; this may indicate incorrect units. [context: /HPXML/Building/BuildingDetails/Enclosure/Windows/Window/Overhangs[number(Depth) > 0]')
next if _expected_warning_message(message, 'Home with conditioned basement has floor insulation.')

if !testing
next if _expected_warning_message(message, 'Unable to find sql file at')
next if _expected_warning_message(message, 'No design condition info found; calculating design conditions from EPW weather data.')
next if _expected_warning_message(message, 'Not calculating emissions because an electricity filepath for at least one emissions scenario could not be located.')
next if _expected_warning_message(message, 'Not calculating emissions because an electricity filepath for at least one emissions scenario could not be located.') # these are AK/HI samples
next if _expected_warning_message(message, 'The garage pitch was changed to accommodate garage ridge >= house ridge')
end
if testing
next if _expected_warning_message(message, 'Could not find County=')
next if _expected_warning_message(message, 'Could not find County=') # we intentionally leave some fields blank in resources/data/simple_rates/County.tsv
next if _expected_warning_message(message, 'Battery without PV specified, and no charging/discharging schedule provided; battery is assumed to operate as backup and will not be modeled.')
next if _expected_warning_message(message, "Request for output variable 'Zone People Occupant Count' returned no key values.")
next if _expected_warning_message(message, 'The fraction of heat load served by the second heating system is greater than or equal to 50%.')
next if _expected_warning_message(message, 'No windows specified, the model will not include window heat transfer. [context: /HPXML/Building/BuildingDetails]')
next if _expected_warning_message(message, 'No interior lighting specified, the model will not include interior lighting energy use. [context: /HPXML/Building/BuildingDetails]')
next if _expected_warning_message(message, 'No exterior lighting specified, the model will not include exterior lighting energy use. [context: /HPXML/Building/BuildingDetails]')
next if _expected_warning_message(message, 'Home with unconditioned basement/crawlspace foundation type has both foundation wall insulation and floor insulation.')
end

flunk "Unexpected cli_output.log message found: #{message}"
Expand Down

0 comments on commit 3085093

Please sign in to comment.