urbanopt-cli 0.11.1 → 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/lib/uo_cli.rb CHANGED
@@ -66,6 +66,8 @@ module URBANopt
66
66
  send("opt_#{@command}") ## dispatch to command handling method
67
67
  rescue NoMethodError
68
68
  abort('Invalid command, please run uo --help for a list of available commands')
69
+ rescue StandardError => e
70
+ puts "\nERROR: #{e.message}"
69
71
  end
70
72
  end
71
73
 
@@ -288,26 +290,26 @@ module URBANopt
288
290
  @subopts = Optimist.options do
289
291
  banner "\nURBANopt #{@command}:\n \n"
290
292
 
291
- opt :default, "\nStandard post-processing for your scenario"
293
+ opt :default, "\nStandard post-processing for your scenario", short: :d
292
294
 
293
- opt :opendss, "\nPost-process with OpenDSS"
295
+ opt :opendss, "\nPost-process with OpenDSS", short: :o
294
296
 
295
- opt :disco, "\nPost-process with DISCO"
297
+ opt :disco, "\nPost-process with DISCO", short: :i
296
298
 
297
299
  opt :reopt_scenario, "\nOptimize for entire scenario with REopt. Used with the --reopt-scenario-assumptions-file to specify the assumptions to use.\n" \
298
- 'Example: uo process --reopt-scenario'
300
+ 'Example: uo process --reopt-scenario', short: :r
299
301
 
300
302
  opt :reopt_feature, "\nOptimize for each building individually with REopt\n" \
301
- 'Example: uo process --reopt-feature'
303
+ 'Example: uo process --reopt-feature', short: :e
302
304
 
303
305
  opt :reopt_resilience, "\nInclude resilience reporting in REopt optimization\n" \
304
- 'Example: uo process --reopt-scenario --reopt-resilience'
306
+ 'Example: uo process --reopt-scenario --reopt-resilience', short: :p
305
307
 
306
308
  opt :reopt_keep_existing, "\nKeep existing reopt feature optimizations instead of rerunning them to avoid rate limit issues.\n" \
307
309
  'Example: uo process --reopt-feature --reopt-keep-existing', short: :k
308
310
 
309
311
  opt :with_database, "\nInclude a sql database output of post-processed results\n" \
310
- 'Example: uo process --default --with-database'
312
+ 'Example: uo process --default --with-database', short: :w
311
313
 
312
314
  opt :reopt_scenario_assumptions_file, "\nPath to the scenario REopt assumptions JSON file you want to use. Use with the --reopt-scenario post-processor.\n" \
313
315
  'If not specified, the reopt/base_assumptions.json file will be used', type: String, short: :a
@@ -362,23 +364,25 @@ module URBANopt
362
364
  @subopts = Optimist.options do
363
365
  banner "\nURBANopt #{@command}:\n \n"
364
366
 
365
- opt :sys_param_file, "\nBuild a system parameters JSON config file for Modelica District Energy System or Ground Heat Exchanger simulation using URBANopt SDK outputs\n" \
367
+ opt :sys_param, "\nBuild a system parameters JSON config file for Modelica District Energy System or Ground Heat Exchanger simulation using URBANopt SDK outputs\n" \
366
368
  "Provide path/name of json file to be created\n" \
367
- 'Example: uo des_params --sys-param-file path/to/sys_params.json', type: String, required: true, short: :y
369
+ 'Example: uo des_params --sys-param path/to/sys_params.json', type: String, required: true, short: :y
368
370
 
369
371
  opt :scenario, "\nPath to the scenario CSV file\n" \
370
- "Example: uo des_params --sys-param-file path/to/sys_params.json --scenario path/to/baseline_scenario.csv\n", type: String, required: true, short: :s
372
+ "Example: uo des_params --sys-param path/to/sys_params.json --scenario path/to/baseline_scenario.csv\n", type: String, required: true, short: :s
371
373
 
372
374
  opt :feature, "\nPath to the feature JSON file\n" \
373
- "Example: uo des_params --sys-param-file path/to/sys_params.json --feature path/to/example_project.json\n", type: String, required: true, short: :f
375
+ "Example: uo des_params --sys-param path/to/sys_params.json --feature path/to/example_project.json\n", type: String, required: true, short: :f
374
376
 
375
377
  opt :model_type, "\nSelection for which kind of DES simulation to perform\n" \
376
378
  "Valid choices: 'time_series'", type: String, default: 'time_series'
377
379
 
378
- opt :ghe, "\nUse this argument to add Ground Heat Exchanger properties to the System Parameter File.\n", short: :g
380
+ opt :district_type, "\nSelection for which kind of district system parameters to generate\n" \
381
+ "Example: uo des_params --sys-param path/to/sys_params.json --feature path/to/example_project.json --district-type 5G_ghe\n" \
382
+ 'If not specified, the default 4G district type will be used', type: String, required: false, short: :t
379
383
 
380
- opt :overwrite, "\n Delete and rebuild existing sys-param file\n", short: :o
381
- 'Example: uo des_params --sys-param-file path/to/sys_params.json --feature path/to/example_project.json --overwrite'
384
+ opt :overwrite, "\nDelete and rebuild existing sys-param file\n", short: :o
385
+ 'Example: uo des_params --sys-param path/to/sys_params.json --feature path/to/example_project.json --overwrite'
382
386
  end
383
387
  end
384
388
 
@@ -386,17 +390,17 @@ module URBANopt
386
390
  @subopts = Optimist.options do
387
391
  banner "\nURBANopt #{@command}:\n"
388
392
 
389
- opt :sys_param, "Path to system parameters config file, possibly created with 'des_params' command in this CLI\n" \
393
+ opt :sys_param, "\nPath to system parameters config file, possibly created with 'des_params' command in this CLI\n" \
390
394
  "Example: uo des_create --sys-param system_parameters.json\n", type: String, required: true, short: :y
391
395
 
392
- opt :feature, "Path to the feature JSON file\n" \
396
+ opt :feature, "\nPath to the feature JSON file\n" \
393
397
  'Example: uo des_create --feature path/to/example_project.json', type: String, required: true, short: :f
394
398
 
395
399
  opt :des_name, "\nPath to Modelica project dir to be created\n" \
396
400
  'Example: uo des_create --des-name path/to/example_modelica_project', type: String, required: true, short: :n
397
401
 
398
402
  opt :overwrite, "\nDelete and rebuild existing model directory\n", short: :o
399
- 'Example: uo des_create --des-name path/to/example_modelica_project --overwrite'
403
+ 'Example: uo des_create --des-name path/to/example_modelica_project --overwrite'
400
404
  end
401
405
  end
402
406
 
@@ -438,6 +442,8 @@ module URBANopt
438
442
  end
439
443
  rescue NoMethodError
440
444
  abort('Invalid command, please run uo --help for a list of available commands')
445
+ rescue StandardError => e
446
+ puts "\nERROR: #{e.message}"
441
447
  end
442
448
 
443
449
  # FIXME: Can this be combined with the above block? This isn't very DRY
@@ -468,9 +474,11 @@ module URBANopt
468
474
 
469
475
  feature_file = URBANopt::GeoJSON::GeoFile.from_file(featurefile)
470
476
  if @opthash.subopts[:reopt] == true || @opthash.subopts[:reopt_scenario] == true || @opthash.subopts[:reopt_feature] == true
471
- # TODO: Better way of grabbing assumptions file than the first file in the folder
472
- reopt_files_dir_contents_list = Dir.children(reopt_files_dir.to_s)
473
- reopt_assumptions_filename = File.basename(reopt_files_dir_contents_list[0])
477
+ parsed_scenario_file = CSV.read(csv_file, headers: true, col_sep: ',')
478
+ # TODO: determine what to do if multiple assumptions are provided
479
+ # num_unique_reopt_assumptions = parsed_scenario_file['REopt Assumptions'].tally.size
480
+ # Use the first assumption as the default
481
+ reopt_assumptions_filename = parsed_scenario_file['REopt Assumptions'][0]
474
482
  scenario_output = URBANopt::Scenario::REoptScenarioCSV.new(
475
483
  @scenario_name.downcase,
476
484
  @root_dir,
@@ -509,6 +517,8 @@ module URBANopt
509
517
  # Rescue if file isn't json
510
518
  rescue JSON::ParserError => e
511
519
  abort("\nOops! You didn't provide a json file. Please provide path to the geojson feature_file")
520
+ rescue StandardError => e
521
+ puts "\nERROR: #{e.message}"
512
522
  end
513
523
  Dir["#{@feature_path}/mappers/*.rb"].each do |mapper_file|
514
524
  mapper_name = File.basename(mapper_file, File.extname(mapper_file))
@@ -536,6 +546,8 @@ module URBANopt
536
546
  # Rescue if json isn't a geojson feature_file
537
547
  rescue NoMethodError
538
548
  abort("\nOops! You didn't provde a valid feature_file. Please provide path to the geojson feature_file")
549
+ rescue StandardError => e
550
+ puts "\nERROR: #{e.message}"
539
551
  end
540
552
  end
541
553
  end
@@ -936,7 +948,7 @@ module URBANopt
936
948
 
937
949
  # Check Python
938
950
  def self.check_python(python_only: false)
939
- results = { python: false, pvars: [], message: '', python_deps: false, result: false }
951
+ results = { python: false, pvars: [], message: [], python_deps: false, result: false }
940
952
  puts 'Checking system.....'
941
953
  pvars = setup_python_variables
942
954
  results[:pvars] = pvars
@@ -944,7 +956,7 @@ module URBANopt
944
956
  # check vars
945
957
  if pvars[:python_path].nil? || pvars[:pip_path].nil?
946
958
  # need to install
947
- results[:message] = 'Python paths have not yet been initialized with URBANopt.'
959
+ results[:message] << 'Python paths have not yet been initialized with URBANopt.'
948
960
  puts results[:message]
949
961
  return results
950
962
  end
@@ -954,7 +966,7 @@ module URBANopt
954
966
  if stderr.empty?
955
967
  puts "...python found at #{pvars[:python_path]}"
956
968
  else
957
- results[:message] = "ERROR installing python: #{stderr}"
969
+ results[:message] << "ERROR installing python: #{stderr}"
958
970
  puts results[:message]
959
971
  return results
960
972
  end
@@ -964,7 +976,7 @@ module URBANopt
964
976
  if stderr.empty?
965
977
  puts "...pip found at #{pvars[:pip_path]}"
966
978
  else
967
- results[:message] = "ERROR finding pip: #{stderr}"
979
+ results[:message] << "ERROR finding pip: #{stderr}"
968
980
  puts results[:message]
969
981
  return results
970
982
  end
@@ -984,6 +996,12 @@ module URBANopt
984
996
  else
985
997
  stdout, stderr, status = Open3.capture3("#{pvars[:pip_path]} show #{dep[:name]}")
986
998
  end
999
+ if @opthash.subopts[:verbose]
1000
+ puts dep[:name]
1001
+ puts "stdout: #{stdout}"
1002
+ puts "status: #{status}"
1003
+ end
1004
+
987
1005
  if stderr.empty?
988
1006
  # check versions
989
1007
  m = stdout.match(/^Version: (\S{3,}$)/)
@@ -998,14 +1016,17 @@ module URBANopt
998
1016
  end
999
1017
  end
1000
1018
  if err
1001
- results[:message] = "incorrect version found for #{dep[:name]}...expecting version #{dep[:version]}"
1019
+ results[:message] << "incorrect version found for #{dep[:name]}...expecting version #{dep[:version]}"
1002
1020
  puts results[:message]
1003
1021
  errors << stderr
1004
1022
  end
1005
1023
  else
1006
- results[:message] = stderr
1007
- puts results[:message]
1008
- errors << stderr
1024
+ # ignore warnings
1025
+ unless stderr.include? 'WARNING:'
1026
+ results[:message] << stderr
1027
+ puts results[:message]
1028
+ errors << stderr
1029
+ end
1009
1030
  end
1010
1031
  end
1011
1032
  if errors.empty?
@@ -1013,8 +1034,11 @@ module URBANopt
1013
1034
  end
1014
1035
  end
1015
1036
 
1016
- # all is good
1017
- results[:result] = true
1037
+ # all is good if messages are empty
1038
+ if results[:message].empty?
1039
+ results[:result] = true
1040
+ end
1041
+
1018
1042
  return results
1019
1043
  end
1020
1044
 
@@ -1113,7 +1137,7 @@ module URBANopt
1113
1137
  if dep[:version].nil?
1114
1138
  the_command = "#{pvars[:pip_path]} install #{dep[:name]}"
1115
1139
  else
1116
- the_command = "#{pvars[:pip_path]} install #{dep[:name]}~=#{dep[:version]}"
1140
+ the_command = "#{pvars[:pip_path]} install #{dep[:name]}==#{dep[:version]}"
1117
1141
  end
1118
1142
 
1119
1143
  if @opthash.subopts[:verbose]
@@ -1124,7 +1148,7 @@ module URBANopt
1124
1148
  puts "status: #{status}"
1125
1149
  puts "stdout: #{stdout}"
1126
1150
  end
1127
- if stderr && !stderr == ''
1151
+ if !stderr.empty?
1128
1152
  puts "Error installing: #{stderr}"
1129
1153
  end
1130
1154
  end
@@ -1293,6 +1317,8 @@ module URBANopt
1293
1317
  end
1294
1318
  rescue Errno::ENOENT # Same abort message if there is no run_dir
1295
1319
  abort("ERROR: URBANopt simulations are required before using opendss. Please run and process simulations, then try again.\n")
1320
+ rescue StandardError => e
1321
+ puts "\nERROR: #{e.message}"
1296
1322
  end
1297
1323
 
1298
1324
  ditto_cli_root = "#{res[:pvars][:ditto_path]} run-opendss "
@@ -1336,6 +1362,8 @@ module URBANopt
1336
1362
  rescue FileNotFoundError
1337
1363
  abort("\nMust post-process results before running OpenDSS. We recommend 'process --default'." \
1338
1364
  "Once OpenDSS is run, you may then 'process --opendss'")
1365
+ rescue StandardError => e
1366
+ puts "\nERROR: #{e.message}"
1339
1367
  end
1340
1368
  end
1341
1369
 
@@ -1441,6 +1469,8 @@ module URBANopt
1441
1469
  runner.post_process
1442
1470
  rescue StandardError => e
1443
1471
  abort("\nError: #{e.message}")
1472
+ rescue StandardError => e
1473
+ puts "\nERROR: #{e.message}"
1444
1474
  end
1445
1475
 
1446
1476
  # TODO: aggregate back into scenario reports and geojson file
@@ -1510,6 +1540,12 @@ module URBANopt
1510
1540
  # Ensure reopt default files are prepared
1511
1541
  # create_reopt_files(@opthash.subopts[:scenario])
1512
1542
 
1543
+ if @opthash.subopts[:reopt_resilience] == true
1544
+ abort('The REopt API is now using open-source optimization solvers; you may experience longer solve times and' \
1545
+ ' timeout errors, especially for evaluations with net metering, resilience, and/or 3+ technologies. ' \
1546
+ 'We will support resilience calculations with the REopt API in a future release.')
1547
+ end
1548
+
1513
1549
  scenario_base = default_post_processor.scenario_base
1514
1550
 
1515
1551
  # see if reopt-scenario-assumptions-file was passed in, otherwise use the default
@@ -1526,7 +1562,8 @@ module URBANopt
1526
1562
  if feature[:properties][:district_system_type] && (feature[:properties][:district_system_type] == 'Community Photovoltaic')
1527
1563
  community_photovoltaic << feature
1528
1564
  end
1529
- rescue StandardError
1565
+ rescue StandardError => e
1566
+ puts "\nERROR: #{e.message}"
1530
1567
  end
1531
1568
  reopt_post_processor = URBANopt::REopt::REoptPostProcessor.new(
1532
1569
  scenario_report,
@@ -1553,7 +1590,8 @@ module URBANopt
1553
1590
  if feature[:properties][:district_system_type] && (feature[:properties][:district_system_type] == 'Ground Mount Photovoltaic')
1554
1591
  groundmount_photovoltaic[feature[:properties][:associated_building_id]] = feature[:properties][:footprint_area]
1555
1592
  end
1556
- rescue StandardError
1593
+ rescue StandardError => e
1594
+ puts "\nERROR: #{e.message}"
1557
1595
  end
1558
1596
  scenario_report_features = reopt_post_processor.run_scenario_report_features(
1559
1597
  scenario_report: scenario_report,
@@ -1739,18 +1777,15 @@ module URBANopt
1739
1777
  end
1740
1778
 
1741
1779
  des_cli_root = "#{res[:pvars][:gmt_path]} build-sys-param"
1742
- if @opthash.subopts[:sys_param_file]
1743
- des_cli_addition = " #{@opthash.subopts[:sys_param_file]}"
1780
+ if @opthash.subopts[:sys_param]
1781
+ des_cli_addition = " #{@opthash.subopts[:sys_param]}"
1744
1782
  if @opthash.subopts[:scenario]
1745
1783
  des_cli_addition += " #{@opthash.subopts[:scenario]}"
1746
1784
  end
1747
1785
  if @opthash.subopts[:feature]
1748
1786
  des_cli_addition += " #{@opthash.subopts[:feature]}"
1749
1787
  end
1750
- if @opthash.subopts[:model_type]
1751
- des_cli_addition += " #{@opthash.subopts[:model_type]}"
1752
- end
1753
- if @opthash.subopts[:ghe]
1788
+ if @opthash.subopts[:district_type]
1754
1789
  run_dir = @root_dir / 'run' / @scenario_name.downcase
1755
1790
  ghe_run_dir = run_dir / 'ghe_dir'
1756
1791
  # make ghe run dir
@@ -1758,11 +1793,14 @@ module URBANopt
1758
1793
  Dir.mkdir ghe_run_dir
1759
1794
  puts "Creating GHE results folder #{ghe_run_dir}"
1760
1795
  end
1761
- des_cli_addition += " --ghe"
1796
+ des_cli_addition += " #{@opthash.subopts[:district_type]}"
1797
+ end
1798
+ if @opthash.subopts[:model_type]
1799
+ des_cli_addition += " #{@opthash.subopts[:model_type]}"
1762
1800
  end
1763
1801
  if @opthash.subopts[:overwrite]
1764
1802
  puts "\nDeleting and rebuilding existing sys-param file"
1765
- des_cli_addition += " --overwrite"
1803
+ des_cli_addition += ' --overwrite'
1766
1804
  end
1767
1805
  else
1768
1806
  abort("\nCommand must include new system parameter file name, ScenarioFile, & FeatureFile. Please try again")
@@ -1771,6 +1809,8 @@ module URBANopt
1771
1809
  system(des_cli_root + des_cli_addition)
1772
1810
  rescue FileNotFoundError
1773
1811
  abort("\nMust simulate using 'uo run' before preparing Modelica models.")
1812
+ rescue StandardError => e
1813
+ puts "\nERROR: #{e.message}"
1774
1814
  end
1775
1815
  end
1776
1816
 
@@ -1794,7 +1834,7 @@ module URBANopt
1794
1834
  end
1795
1835
  if @opthash.subopts[:overwrite]
1796
1836
  puts "\nDeleting and rebuilding existing Modelica dir"
1797
- des_cli_addition += " --overwrite"
1837
+ des_cli_addition += ' --overwrite'
1798
1838
  end
1799
1839
  else
1800
1840
  abort("\nCommand must include system parameter file name, FeatureFile, and model name. Please try again")
@@ -1803,6 +1843,8 @@ module URBANopt
1803
1843
  system(des_cli_root + des_cli_addition)
1804
1844
  rescue FileNotFoundError
1805
1845
  abort("\nMust simulate using 'uo run' before preparing Modelica models.")
1846
+ rescue StandardError => e
1847
+ puts "\nERROR: #{e.message}"
1806
1848
  end
1807
1849
  end
1808
1850
 
@@ -1825,6 +1867,8 @@ module URBANopt
1825
1867
  system(des_cli_root + des_cli_addition)
1826
1868
  rescue FileNotFoundError
1827
1869
  abort("\nMust simulate using 'uo run' before preparing Modelica models.")
1870
+ rescue StandardError => e
1871
+ puts "\nERROR: #{e.message}"
1828
1872
  end
1829
1873
  end
1830
1874
 
@@ -1872,6 +1916,8 @@ module URBANopt
1872
1916
  system(ghe_cli_root + ghe_cli_addition)
1873
1917
  rescue FileNotFoundError
1874
1918
  abort("\nFile Not Found Error Holder.")
1919
+ rescue StandardError => e
1920
+ puts "\nERROR: #{e.message}"
1875
1921
  end
1876
1922
 
1877
1923
  end
@@ -10,7 +10,7 @@ BASE_DIR_NAME=$(dirname `which $0`)
10
10
 
11
11
  GEM_HOME=${BASE_DIR_NAME}/gems/ruby/2.7.0
12
12
  GEM_PATH=${BASE_DIR_NAME}/gems/ruby/2.7.0
13
- PATH=${BASE_DIR_NAME}/ruby/bin:${BASE_DIR_NAME}/gems/ruby/2.7.0/bin:$PATH
13
+ PATH=${BASE_DIR_NAME}/ruby/bin:${BASE_DIR_NAME}/gems/ruby/2.7.0/bin:${BASE_DIR_NAME}/gems/ruby/2.7.0/gems/urbanopt-cli-0.11.1/example_files/python_deps/Miniconda-4.12.0/bin:$PATH
14
14
  RUBYLIB=${BASE_DIR_NAME}/OpenStudio/Ruby
15
15
  RUBY_DLL_PATH=${BASE_DIR_NAME}/OpenStudio/Ruby
16
16
 
@@ -24,4 +24,3 @@ echo "export GEM_PATH=\"${GEM_PATH}\"" >> ~/.env_uo.sh
24
24
  echo "export PATH=\"${PATH}\"" >> ~/.env_uo.sh
25
25
  echo "export RUBYLIB=\"${RUBYLIB}\"" >> ~/.env_uo.sh
26
26
  echo "export RUBY_DLL_PATH=\"${RUBY_DLL_PATH}\"" >> ~/.env_uo.sh
27
-
@@ -9,7 +9,7 @@ BASE_DIR_NAME="$(cd "$(dirname "$0")" && pwd)"
9
9
 
10
10
  GEM_HOME=${BASE_DIR_NAME}/gems/ruby/2.7.0
11
11
  GEM_PATH=${BASE_DIR_NAME}/gems/ruby/2.7.0
12
- PATH=${BASE_DIR_NAME}/ruby/bin:${BASE_DIR_NAME}/gems/ruby/2.7.0/bin:$PATH
12
+ PATH=${BASE_DIR_NAME}/ruby/bin:${BASE_DIR_NAME}/gems/ruby/2.7.0/bin:${BASE_DIR_NAME}/gems/ruby/2.7.0/gems/urbanopt-cli-0.11.1/example_files/python_deps/Miniconda-4.12.0/bin:$PATH
13
13
  RUBYLIB=${BASE_DIR_NAME}/OpenStudio/Ruby
14
14
  RUBY_DLL_PATH=${BASE_DIR_NAME}/OpenStudio/Ruby
15
15
 
@@ -1,21 +1,20 @@
1
- IF "%HOMEPATH%"=="" ECHO HOMEPATH is NOT defined. Please set this env value to your home directory before running this script.
1
+ IF "%HOMEPATH%"=="" ECHO HOMEPATH is NOT defined. Please set this env value to your home directory before running this script.
2
2
  IF "%HOMEPATH%"=="" exit /B
3
3
 
4
4
  SET BASE_DIR_NAME=%~d0%~p0
5
5
 
6
6
  SET GEM_HOME=%BASE_DIR_NAME%\gems\ruby\2.7.0
7
7
  SET GEM_PATH=%BASE_DIR_NAME%\gems\ruby\2.7.0
8
- SET PATH=%BASE_DIR_NAME%\ruby\bin;%BASE_DIR_NAME%\gems\ruby\2.7.0\bin;%PATH%
8
+ SET PATH=%BASE_DIR_NAME%\ruby\bin;%BASE_DIR_NAME%\gems\ruby\2.7.0\bin;%BASE_DIR_NAME%\gems\ruby\2.7.0\gems\urbanopt-cli-0.11.1\example_files\python_deps\python-3.10;%PATH%
9
9
  SET RUBYLIB=%BASE_DIR_NAME%\OpenStudio\Ruby
10
10
  SET RUBY_DLL_PATH=%BASE_DIR_NAME%\OpenStudio\Ruby
11
11
 
12
12
  IF EXIST %HOMEPATH%\.env_uo.bat (
13
13
  del "%HOMEPATH%\.env_uo.bat"
14
- )
14
+ )
15
15
 
16
16
  echo SET "GEM_HOME=%GEM_HOME%">> "%HOMEPATH%\.env_uo.bat"
17
17
  echo SET "GEM_PATH=%GEM_PATH%">> "%HOMEPATH%\.env_uo.bat"
18
18
  echo SET "PATH=%PATH%">> "%HOMEPATH%\.env_uo.bat"
19
19
  echo SET "RUBYLIB=%RUBYLIB%">> "%HOMEPATH%\.env_uo.bat"
20
20
  echo SET "RUBY_DLL_PATH=%RUBY_DLL_PATH%">> "%HOMEPATH%\.env_uo.bat"
21
-
@@ -1,8 +1,8 @@
1
- # This is a simple setup script that generates an enviroment file that
2
- # is used to setup the ruby enviroment to run the urbanopt-cli tool.
3
- # To use just run this script in powershell (e.g. ./setup-env.ps1)
4
- # Then you can use this env.ps1 to setup the enviroment.
5
- # (e.g. . env.ps1)
1
+ # This is a simple setup script that generates an enviroment file that
2
+ # is used to setup the ruby enviroment to run the urbanopt-cli tool.
3
+ # To use just run this script in powershell (e.g. ./setup-env.ps1)
4
+ # Then you can use this env.ps1 to setup the enviroment.
5
+ # (e.g. . env.ps1)
6
6
 
7
7
  if (-not (Test-Path $HOME)) { echo "env HOME needs to be set before running this script" }
8
8
  if (-not (Test-Path $HOME)) { exit }
@@ -11,7 +11,7 @@ $BASE_DIR_NAME = $PSScriptRoot
11
11
 
12
12
  $env:GEM_HOME = "$BASE_DIR_NAME\gems\ruby\2.7.0"
13
13
  $env:GEM_PATH = "$BASE_DIR_NAME\gems\ruby\2.7.0"
14
- $env:PATH += ";$BASE_DIR_NAME\ruby\bin;$BASE_DIR_NAME\gems\ruby\2.7.0\bin"
14
+ $env:PATH += ";$BASE_DIR_NAME\ruby\bin;$BASE_DIR_NAME\gems\ruby\2.7.0\bin;$BASE_DIR_NAME\gems\ruby\2.7.0\gems\urbanopt-cli-0.11.1\example_files\python_deps\python-3.10"
15
15
  $env:RUBYLIB = "$BASE_DIR_NAME\OpenStudio\Ruby"
16
16
  $env:RUBY_DLL_PATH = "$BASE_DIR_NAME\OpenStudio\Ruby"
17
17
 
@@ -23,4 +23,3 @@ Remove-Item $HOME/.env_uo.ps1 -ErrorAction Ignore
23
23
  '$env:PATH = "' + $env:PATH + '"' >> $HOME/.env_uo.ps1
24
24
  '$env:RUBYLIB = "' + $env:RUBYLIB + '"' >> $HOME/.env_uo.ps1
25
25
  '$env:RUBY_DLL_PATH = "' + $env:RUBY_DLL_PATH + '"' >> $HOME/.env_uo.ps1
26
-
data/uo_cli.gemspec CHANGED
@@ -35,10 +35,10 @@ Gem::Specification.new do |spec|
35
35
  # use specific versions of urbanopt and openstudio dependencies while under heavy development
36
36
  spec.add_runtime_dependency 'optimist', '~> 3'
37
37
  spec.add_runtime_dependency 'urbanopt-geojson', '~> 0.11.1'
38
- spec.add_runtime_dependency 'urbanopt-reopt', '~> 0.11.0'
39
- spec.add_runtime_dependency 'urbanopt-reporting', '~> 0.9.1'
38
+ spec.add_runtime_dependency 'urbanopt-reopt', '~> 0.12.0'
39
+ spec.add_runtime_dependency 'urbanopt-reporting', '~> 0.10.0'
40
40
  spec.add_runtime_dependency 'urbanopt-rnm-us', '~> 0.7.0'
41
- spec.add_runtime_dependency 'urbanopt-scenario', '~> 0.11.0'
41
+ spec.add_runtime_dependency 'urbanopt-scenario', '~> 0.12.0'
42
42
 
43
43
  spec.add_development_dependency 'bundler', '~> 2.1'
44
44
  spec.add_development_dependency 'rake', '~> 13.0'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: urbanopt-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.1
4
+ version: 0.12.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - NREL URBANopt team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-02-08 00:00:00.000000000 Z
11
+ date: 2024-05-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: optimist
@@ -44,28 +44,28 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 0.11.0
47
+ version: 0.12.0
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 0.11.0
54
+ version: 0.12.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: urbanopt-reporting
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 0.9.1
61
+ version: 0.10.0
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: 0.9.1
68
+ version: 0.10.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: urbanopt-rnm-us
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -86,14 +86,14 @@ dependencies:
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: 0.11.0
89
+ version: 0.12.0
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: 0.11.0
96
+ version: 0.12.0
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: bundler
99
99
  requirement: !ruby/object:Gem::Requirement
@@ -206,7 +206,6 @@ files:
206
206
  - bin/setup
207
207
  - bin/uo
208
208
  - example_files/Gemfile
209
- - example_files/Gemfile.lock
210
209
  - example_files/class_project_coincident.json
211
210
  - example_files/class_project_diverse.json
212
211
  - example_files/disco/config.json