Skip to content

Commit

Permalink
Merge pull request #970 from NREL/run-analysis-debug
Browse files Browse the repository at this point in the history
run_analysis.rb option to preserve lib folder
  • Loading branch information
joseph-robertson committed Jul 21, 2022
2 parents 78768ee + 2f1d3e2 commit 91fbcef
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions workflow/run_analysis.rb
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ def run_workflow(yml, n_threads, measures_only, debug, building_ids, keep_run_fo
end
end

FileUtils.rm_rf(lib_dir)
FileUtils.rm_rf(lib_dir) if !debug

return true
end
Expand Down Expand Up @@ -371,7 +371,6 @@ def get_elapsed_time(t1, t0)

def samples_osw(results_dir, upgrade_name, workflow, building_id, job_id, folder_id, all_results_output, all_cli_output, measures, reporting_measures, measures_only, debug)
scenario_osw_dir = File.join(results_dir, 'osw', upgrade_name)

scenario_xml_dir = File.join(results_dir, 'xml', upgrade_name)

worker_folder = "run#{folder_id}"
Expand Down Expand Up @@ -512,7 +511,7 @@ def make_apply_logic_arg(logic)
end

options[:debug] = false
opts.on('-d', '--debug', 'Save both existing and upgraded xml/osw files') do |_t|
opts.on('-d', '--debug', 'Preserve lib folder and "existing" xml/osw files') do |_t|
options[:debug] = true
end

Expand Down

0 comments on commit 91fbcef

Please sign in to comment.