lib/openstudio/analysis.rb in openstudio-analysis-1.0.0.rc9 vs lib/openstudio/analysis.rb in openstudio-analysis-1.0.0.rc10

- old
+ new

@@ -30,11 +30,11 @@ end # Process an OSA with a set of OSDs into OSWs def self.make_osws(osa_filename, osd_array) translator = OpenStudio::Analysis::Translator::Workflow.new(osa_filename) - osd_array.each {|osd| translator.process_datapoints osd} + osd_array.each { |osd| translator.process_datapoints osd } end # Retrieve aws instance options from a project. This will return a hash def self.aws_instance_options(filename) if File.extname(filename) == '.xlsx' @@ -53,18 +53,18 @@ elsif File.extname(filename) == '.csv' csv = OpenStudio::Analysis::Translator::Datapoints.new(filename) csv.process options = csv.settings else - fail 'Invalid file extension' + raise 'Invalid file extension' end return options end # Generate a DEnCity complient hash for uploading from the analysis hash - #TODO make this work off of the analysis object, not the hash. + # TODO make this work off of the analysis object, not the hash. def self.to_dencity_analysis(analysis_hash, analysis_uuid) dencity_hash = {} a = analysis_hash[:analysis] provenance = {} provenance[:user_defined_id] = analysis_uuid @@ -76,11 +76,11 @@ measure_metadata = [] if a[:problem] if a[:problem][:algorithm] provenance[:analysis_information] = a[:problem][:algorithm] else - fail 'No algorithm found in the analysis.json.' + raise 'No algorithm found in the analysis.json.' end if a[:problem][:workflow] a[:problem][:workflow].each do |wf| new_wfi = {} @@ -127,16 +127,16 @@ end measure_metadata << new_wfi end else - fail 'No workflow found in the analysis.json' + raise 'No workflow found in the analysis.json' end dencity_hash[:analysis] = provenance dencity_hash[:measure_definitions] = measure_metadata else - fail 'No problem found in the analysis.json' + raise 'No problem found in the analysis.json' end return dencity_hash end end end