Skip to content

Commit

Permalink
Some cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
shorowit committed Apr 23, 2019
1 parent 0124b3c commit 10afb17
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 24 deletions.
9 changes: 0 additions & 9 deletions resources/hotwater_appliances.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,6 @@ def self.apply(model, runner, weather, living_space,
dwhr_facilities_connected, dwhr_is_equal_flow,
dwhr_efficiency, dhw_loop_fracs, eri_version)

# Table 4.6.1.1(1): Hourly Hot Water Draw Fraction for Hot Water Tests
daily_fraction = [0.0085, 0.0085, 0.0085, 0.0085, 0.0085, 0.0100, 0.0750, 0.0750,
0.0650, 0.0650, 0.0650, 0.0460, 0.0460, 0.0370, 0.0370, 0.0370,
0.0370, 0.0630, 0.0630, 0.0630, 0.0630, 0.0510, 0.0510, 0.0085]
norm_daily_fraction = []
daily_fraction.each do |frac|
norm_daily_fraction << (frac / daily_fraction.max)
end

# Schedules init
timestep_minutes = (60.0 / model.getTimestep.numberOfTimestepsPerHour).to_i
start_datetime = OpenStudio::DateTime.new(model.getYearDescription.makeDate(1, 1), OpenStudio::Time.new(0, 0))
Expand Down
39 changes: 24 additions & 15 deletions tests/minitest_helper.rb
Original file line number Diff line number Diff line change
@@ -1,19 +1,28 @@
require 'simplecov'
require 'codecov'
called_from_cli = true
begin
OpenStudio.getOpenStudioCLI
rescue
called_from_cli = false
end

if not called_from_cli # cli can't load codecov gem
require 'simplecov'
require 'codecov'

# save to CircleCI's artifacts directory if we're on CircleCI
if ENV['CI']
if ENV['CIRCLE_ARTIFACTS']
dir = File.join(ENV['CIRCLE_ARTIFACTS'], "coverage")
SimpleCov.coverage_dir(dir)
# save to CircleCI's artifacts directory if we're on CircleCI
if ENV['CI']
if ENV['CIRCLE_ARTIFACTS']
dir = File.join(ENV['CIRCLE_ARTIFACTS'], "coverage")
SimpleCov.coverage_dir(dir)
end
SimpleCov.formatter = SimpleCov::Formatter::Codecov
else
SimpleCov.coverage_dir("coverage")
end
SimpleCov.formatter = SimpleCov::Formatter::Codecov
SimpleCov.start
else
SimpleCov.coverage_dir("coverage")
SimpleCov.start
end
require 'minitest/autorun'
require 'minitest/reporters'

Minitest::Reporters.use! Minitest::Reporters::SpecReporter.new # spec-like progress
require 'minitest/autorun'
require 'minitest/reporters'

Minitest::Reporters.use! Minitest::Reporters::SpecReporter.new # spec-like progress
end

0 comments on commit 10afb17

Please sign in to comment.