Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
kflemin committed Oct 5, 2022
2 parents 6bf15eb + 0f2a381 commit a419580
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 21 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## Version 0.8.3
Date Range: 07/07/22 - 09/30/22:

- Updated RNM-US gem dependency to 0.4.0 (API v2)
- Fixed [#368]( https://github.com/urbanopt/urbanopt-cli/issues/368 ), Num-parallel flag leads to crash
- Fixed [#375]( https://github.com/urbanopt/urbanopt-cli/issues/375 ), Windows Installer setup script doesn't work for usernames with spaces

## Version 0.8.2
Date Range: 06/28/22 - 07/06/22:

Expand Down
14 changes: 7 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.10.2)
cmake_policy(SET CMP0048 NEW)

project(URBANoptCLI VERSION 0.8.0)
project(URBANoptCLI VERSION 0.8.2)

include(FindOpenStudioSDK.cmake)

Expand Down Expand Up @@ -89,16 +89,16 @@ option(BUILD_PACKAGE "Build package" OFF)
# need to update the MD5sum for each platform and url below
if(UNIX)
if(APPLE)
set(URBANOPT_CLI_GEMS_ZIP_FILENAME "urbanopt-cli-gems-20220520-darwin.tar.gz")
set(URBANOPT_CLI_GEMS_ZIP_EXPECTED_MD5 "9dea01c3a9664818a15ad34a5d37a155")
set(URBANOPT_CLI_GEMS_ZIP_FILENAME "urbanopt-cli-gems-20220711-darwin.tar.gz")
set(URBANOPT_CLI_GEMS_ZIP_EXPECTED_MD5 "bcc9c16f0736838727050564a55b3806")
else()
set(URBANOPT_CLI_GEMS_ZIP_FILENAME "urbanopt-cli-gems-20220520-linux.tar.gz")
set(URBANOPT_CLI_GEMS_ZIP_EXPECTED_MD5 "84678cac20979c63913c8e4f99f30e0e")
set(URBANOPT_CLI_GEMS_ZIP_FILENAME "urbanopt-cli-gems-20220711-linux.tar.gz")
set(URBANOPT_CLI_GEMS_ZIP_EXPECTED_MD5 "6b6054e9d9bf6efecfc4054158f685b6")
endif()
elseif(WIN32)
if(CMAKE_CL_64)
set(URBANOPT_CLI_GEMS_ZIP_FILENAME "urbanopt-cli-gems-20220520-windows.tar.gz")
set(URBANOPT_CLI_GEMS_ZIP_EXPECTED_MD5 "e31a7f7c12bde79046e18f9d2a23f105")
set(URBANOPT_CLI_GEMS_ZIP_FILENAME "urbanopt-cli-gems-20220711-windows.tar.gz")
set(URBANOPT_CLI_GEMS_ZIP_EXPECTED_MD5 "7d1b2cd1d97c177885d41ef07c856e1d")
endif()
endif()

Expand Down
10 changes: 5 additions & 5 deletions lib/uo_cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ def opt_run

opt :num_parallel, "\nOPTIONAL: Run URBANopt simulations in parallel using <num_parallel> cores\n" \
"Adjusts value of 'num_parallel' in the 'runner.conf' file\n" \
"Example: uo run --num-parallel 2\n", short: :n
"Example: uo run --num-parallel 2\n", type: Integer, short: :n
end
end

Expand Down Expand Up @@ -821,13 +821,13 @@ def self.check_reader
if ENV['UO_NUM_PARALLEL'] || @opthash.subopts[:num_parallel]
runner_file_path = File.join(@root_dir, 'runner.conf')
runner_conf_hash = JSON.parse(File.read(runner_file_path))
if ENV['UO_NUM_PARALLEL']
runner_conf_hash['num_parallel'] = ENV['UO_NUM_PARALLEL'].to_i
if @opthash.subopts[:num_parallel]
runner_conf_hash['num_parallel'] = @opthash.subopts[:num_parallel]
File.open(runner_file_path, 'w+') do |f|
f << runner_conf_hash.to_json
end
elsif @opthash.subopts[:num_parallel]
runner_conf_hash['num_parallel'] = @opthash.subopts[:num_parallel].to_i
elsif ENV['UO_NUM_PARALLEL']
runner_conf_hash['num_parallel'] = ENV['UO_NUM_PARALLEL'].to_i
File.open(runner_file_path, 'w+') do |f|
f << runner_conf_hash.to_json
end
Expand Down
2 changes: 1 addition & 1 deletion lib/uo_cli/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,6 @@

module URBANopt
module CLI
VERSION = '0.8.2'.freeze
VERSION = '0.8.3'.freeze
end
end
13 changes: 6 additions & 7 deletions scripts/setup-env.bat
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,12 @@ SET RUBYLIB=%BASE_DIR_NAME%\OpenStudio\Ruby
SET RUBY_DLL_PATH=%BASE_DIR_NAME%\OpenStudio\Ruby

IF EXIST %HOMEPATH%\.env_uo.bat (
del %HOMEPATH%\.env_uo.bat
del "%HOMEPATH%\.env_uo.bat"
)

echo SET GEM_HOME=%GEM_HOME%>> %HOMEPATH%\.env_uo.bat
echo SET GEM_PATH=%GEM_PATH%>> %HOMEPATH%\.env_uo.bat
echo SET PATH=%PATH%>> %HOMEPATH%\.env_uo.bat
echo SET RUBYLIB=%RUBYLIB%>> %HOMEPATH%\.env_uo.bat
echo SET RUBY_DLL_PATH=%RUBY_DLL_PATH%>> %HOMEPATH%\.env_uo.bat

echo SET "GEM_HOME=%GEM_HOME%">> "%HOMEPATH%\.env_uo.bat"
echo SET "GEM_PATH=%GEM_PATH%">> "%HOMEPATH%\.env_uo.bat"
echo SET "PATH=%PATH%">> "%HOMEPATH%\.env_uo.bat"
echo SET "RUBYLIB=%RUBYLIB%">> "%HOMEPATH%\.env_uo.bat"
echo SET "RUBY_DLL_PATH=%RUBY_DLL_PATH%">> "%HOMEPATH%\.env_uo.bat"

2 changes: 1 addition & 1 deletion uo_cli.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Gem::Specification.new do |spec|
spec.add_runtime_dependency 'urbanopt-geojson', '~> 0.8.1'
spec.add_runtime_dependency 'urbanopt-reopt', '~> 0.8.0'
spec.add_runtime_dependency 'urbanopt-reporting', '~> 0.6.1'
spec.add_runtime_dependency 'urbanopt-rnm-us', '~> 0.3.0'
spec.add_runtime_dependency 'urbanopt-rnm-us', '~> 0.4.0'
spec.add_runtime_dependency 'urbanopt-scenario', '~> 0.8.0'

spec.add_development_dependency 'bundler', '>= 2.1.0'
Expand Down

0 comments on commit a419580

Please sign in to comment.