Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
kflemin committed Jun 9, 2020
2 parents 8cfb314 + f849a22 commit f649ca8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## Version 0.3.1

Date Range: 06/05/20 - 06/10/20:

- Fixed [#113]( https://github.com/urbanopt/urbanopt-cli/issues/113 ), CLI crashes if reopt folder missing from project directory

## Version 0.3.0

Date Range: 04/23/20 - 06/05/20
Expand Down
7 changes: 3 additions & 4 deletions lib/uo_cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,6 @@ def self.run_func
mapper_files_dir = File.join(@root_dir, 'mappers')
reopt_files_dir = File.join(@root_dir, 'reopt/')
num_header_rows = 1
# FIXME: This can be cleaned up in Ruby 2.5 with Dir.children(<"foldername">)
# TODO: Better way of grabbing assumptions file than the first file in the folder
reopt_files_dir_contents_list = Dir["#{reopt_files_dir}/*"]
reopt_assumptions_filename = File.basename(reopt_files_dir_contents_list[0])

if @feature_id
feature_run_dir = File.join(run_dir, @feature_id)
Expand All @@ -203,6 +199,9 @@ def self.run_func

feature_file = URBANopt::GeoJSON::GeoFile.from_file(featurefile)
if @opthash.subopts[:reopt] == true || @opthash.subopts[:reopt_scenario] == true || @opthash.subopts[:reopt_feature] == true
# TODO: Better way of grabbing assumptions file than the first file in the folder
reopt_files_dir_contents_list = Dir.children(reopt_files_dir.to_s)
reopt_assumptions_filename = File.basename(reopt_files_dir_contents_list[0])
scenario_output = URBANopt::Scenario::REoptScenarioCSV.new(name, @root_dir, run_dir, feature_file, mapper_files_dir, csv_file, num_header_rows, reopt_files_dir, reopt_assumptions_filename)
else
scenario_output = URBANopt::Scenario::ScenarioCSV.new(name, @root_dir, run_dir, feature_file, mapper_files_dir, csv_file, num_header_rows)
Expand Down
2 changes: 1 addition & 1 deletion lib/uo_cli/version.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

module URBANopt
module CLI
VERSION = '0.3.0'.freeze
VERSION = '0.3.1'.freeze
end
end

0 comments on commit f649ca8

Please sign in to comment.