Skip to content

Commit

Permalink
Merge pull request #1127 from NREL/dep-updates
Browse files Browse the repository at this point in the history
Less stringent run_analysis.rb dependencies
  • Loading branch information
joseph-robertson committed Aug 29, 2023
2 parents 45178e1 + b02f292 commit 1348def
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
13 changes: 3 additions & 10 deletions resources/buildstock.rb
Original file line number Diff line number Diff line change
@@ -1,17 +1,9 @@
# frozen_string_literal: true

require 'openstudio'
if File.exist? File.absolute_path(File.join(File.dirname(__FILE__), '../lib/resources/hpxml-measures/HPXMLtoOpenStudio/resources')) # Hack to run ResStock on AWS
resources_path = File.absolute_path(File.join(File.dirname(__FILE__), '../lib/resources/hpxml-measures/HPXMLtoOpenStudio/resources'))
elsif File.exist? File.absolute_path(File.join(File.dirname(__FILE__), 'hpxml-measures/HPXMLtoOpenStudio/resources')) # Hack to run ResStock unit tests locally
resources_path = File.absolute_path(File.join(File.dirname(__FILE__), 'hpxml-measures/HPXMLtoOpenStudio/resources'))
elsif File.exist? File.join(OpenStudio::BCLMeasure::userMeasuresDir.to_s, 'HPXMLtoOpenStudio/resources') # Hack to run measures in the OS App since applied measures are copied off into a temporary directory
resources_path = File.join(OpenStudio::BCLMeasure::userMeasuresDir.to_s, 'HPXMLtoOpenStudio/resources')
end
require File.join(resources_path, 'meta_measure')

require 'csv'

require_relative '../resources/hpxml-measures/HPXMLtoOpenStudio/resources/meta_measure'

class TsvFile
def initialize(full_path, runner)
@full_path = full_path
Expand Down Expand Up @@ -452,6 +444,7 @@ def get_data_for_sample(buildstock_csv_path, building_id, runner)
end

class RunOSWs
require 'openstudio'
require 'csv'
require 'json'

Expand Down
3 changes: 3 additions & 0 deletions workflow/run_analysis.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
require 'parallel'
require 'json'
require 'yaml'
require 'optparse'
require 'pathname'
require 'time'

require_relative '../resources/buildstock'
require_relative '../resources/run_sampling_lib'
Expand Down

0 comments on commit 1348def

Please sign in to comment.