urbanopt-cli 0.11.0 → 0.12.0

Sign up to get free protection for your applications and to get access to all the features.
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,20 +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
383
+
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'
379
386
  end
380
387
  end
381
388
 
@@ -383,18 +390,17 @@ module URBANopt
383
390
  @subopts = Optimist.options do
384
391
  banner "\nURBANopt #{@command}:\n"
385
392
 
386
- 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" \
387
394
  "Example: uo des_create --sys-param system_parameters.json\n", type: String, required: true, short: :y
388
395
 
389
- opt :feature, "Path to the feature JSON file\n" \
396
+ opt :feature, "\nPath to the feature JSON file\n" \
390
397
  'Example: uo des_create --feature path/to/example_project.json', type: String, required: true, short: :f
391
398
 
392
399
  opt :des_name, "\nPath to Modelica project dir to be created\n" \
393
- 'Example: uo des_create --des-name path/to/example_modelica_project', type: String, required: true
394
-
395
- opt :model_type, "\nSelection for which kind of DES simulation to perform\n" \
396
- "Valid choices: 'time_series'", type: String, default: 'time_series'
400
+ 'Example: uo des_create --des-name path/to/example_modelica_project', type: String, required: true, short: :n
397
401
 
402
+ opt :overwrite, "\nDelete and rebuild existing model directory\n", short: :o
403
+ 'Example: uo des_create --des-name path/to/example_modelica_project --overwrite'
398
404
  end
399
405
  end
400
406
 
@@ -436,6 +442,8 @@ module URBANopt
436
442
  end
437
443
  rescue NoMethodError
438
444
  abort('Invalid command, please run uo --help for a list of available commands')
445
+ rescue StandardError => e
446
+ puts "\nERROR: #{e.message}"
439
447
  end
440
448
 
441
449
  # FIXME: Can this be combined with the above block? This isn't very DRY
@@ -466,9 +474,11 @@ module URBANopt
466
474
 
467
475
  feature_file = URBANopt::GeoJSON::GeoFile.from_file(featurefile)
468
476
  if @opthash.subopts[:reopt] == true || @opthash.subopts[:reopt_scenario] == true || @opthash.subopts[:reopt_feature] == true
469
- # TODO: Better way of grabbing assumptions file than the first file in the folder
470
- reopt_files_dir_contents_list = Dir.children(reopt_files_dir.to_s)
471
- 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]
472
482
  scenario_output = URBANopt::Scenario::REoptScenarioCSV.new(
473
483
  @scenario_name.downcase,
474
484
  @root_dir,
@@ -507,6 +517,8 @@ module URBANopt
507
517
  # Rescue if file isn't json
508
518
  rescue JSON::ParserError => e
509
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}"
510
522
  end
511
523
  Dir["#{@feature_path}/mappers/*.rb"].each do |mapper_file|
512
524
  mapper_name = File.basename(mapper_file, File.extname(mapper_file))
@@ -534,6 +546,8 @@ module URBANopt
534
546
  # Rescue if json isn't a geojson feature_file
535
547
  rescue NoMethodError
536
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}"
537
551
  end
538
552
  end
539
553
  end
@@ -934,7 +948,7 @@ module URBANopt
934
948
 
935
949
  # Check Python
936
950
  def self.check_python(python_only: false)
937
- results = { python: false, pvars: [], message: '', python_deps: false, result: false }
951
+ results = { python: false, pvars: [], message: [], python_deps: false, result: false }
938
952
  puts 'Checking system.....'
939
953
  pvars = setup_python_variables
940
954
  results[:pvars] = pvars
@@ -942,7 +956,7 @@ module URBANopt
942
956
  # check vars
943
957
  if pvars[:python_path].nil? || pvars[:pip_path].nil?
944
958
  # need to install
945
- results[:message] = 'Python paths have not yet been initialized with URBANopt.'
959
+ results[:message] << 'Python paths have not yet been initialized with URBANopt.'
946
960
  puts results[:message]
947
961
  return results
948
962
  end
@@ -952,7 +966,7 @@ module URBANopt
952
966
  if stderr.empty?
953
967
  puts "...python found at #{pvars[:python_path]}"
954
968
  else
955
- results[:message] = "ERROR installing python: #{stderr}"
969
+ results[:message] << "ERROR installing python: #{stderr}"
956
970
  puts results[:message]
957
971
  return results
958
972
  end
@@ -962,7 +976,7 @@ module URBANopt
962
976
  if stderr.empty?
963
977
  puts "...pip found at #{pvars[:pip_path]}"
964
978
  else
965
- results[:message] = "ERROR finding pip: #{stderr}"
979
+ results[:message] << "ERROR finding pip: #{stderr}"
966
980
  puts results[:message]
967
981
  return results
968
982
  end
@@ -982,6 +996,12 @@ module URBANopt
982
996
  else
983
997
  stdout, stderr, status = Open3.capture3("#{pvars[:pip_path]} show #{dep[:name]}")
984
998
  end
999
+ if @opthash.subopts[:verbose]
1000
+ puts dep[:name]
1001
+ puts "stdout: #{stdout}"
1002
+ puts "status: #{status}"
1003
+ end
1004
+
985
1005
  if stderr.empty?
986
1006
  # check versions
987
1007
  m = stdout.match(/^Version: (\S{3,}$)/)
@@ -996,14 +1016,17 @@ module URBANopt
996
1016
  end
997
1017
  end
998
1018
  if err
999
- 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]}"
1000
1020
  puts results[:message]
1001
1021
  errors << stderr
1002
1022
  end
1003
1023
  else
1004
- results[:message] = stderr
1005
- puts results[:message]
1006
- errors << stderr
1024
+ # ignore warnings
1025
+ unless stderr.include? 'WARNING:'
1026
+ results[:message] << stderr
1027
+ puts results[:message]
1028
+ errors << stderr
1029
+ end
1007
1030
  end
1008
1031
  end
1009
1032
  if errors.empty?
@@ -1011,8 +1034,11 @@ module URBANopt
1011
1034
  end
1012
1035
  end
1013
1036
 
1014
- # all is good
1015
- results[:result] = true
1037
+ # all is good if messages are empty
1038
+ if results[:message].empty?
1039
+ results[:result] = true
1040
+ end
1041
+
1016
1042
  return results
1017
1043
  end
1018
1044
 
@@ -1111,7 +1137,7 @@ module URBANopt
1111
1137
  if dep[:version].nil?
1112
1138
  the_command = "#{pvars[:pip_path]} install #{dep[:name]}"
1113
1139
  else
1114
- the_command = "#{pvars[:pip_path]} install #{dep[:name]}~=#{dep[:version]}"
1140
+ the_command = "#{pvars[:pip_path]} install #{dep[:name]}==#{dep[:version]}"
1115
1141
  end
1116
1142
 
1117
1143
  if @opthash.subopts[:verbose]
@@ -1122,7 +1148,7 @@ module URBANopt
1122
1148
  puts "status: #{status}"
1123
1149
  puts "stdout: #{stdout}"
1124
1150
  end
1125
- if stderr && !stderr == ''
1151
+ if !stderr.empty?
1126
1152
  puts "Error installing: #{stderr}"
1127
1153
  end
1128
1154
  end
@@ -1291,6 +1317,8 @@ module URBANopt
1291
1317
  end
1292
1318
  rescue Errno::ENOENT # Same abort message if there is no run_dir
1293
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}"
1294
1322
  end
1295
1323
 
1296
1324
  ditto_cli_root = "#{res[:pvars][:ditto_path]} run-opendss "
@@ -1334,6 +1362,8 @@ module URBANopt
1334
1362
  rescue FileNotFoundError
1335
1363
  abort("\nMust post-process results before running OpenDSS. We recommend 'process --default'." \
1336
1364
  "Once OpenDSS is run, you may then 'process --opendss'")
1365
+ rescue StandardError => e
1366
+ puts "\nERROR: #{e.message}"
1337
1367
  end
1338
1368
  end
1339
1369
 
@@ -1439,6 +1469,8 @@ module URBANopt
1439
1469
  runner.post_process
1440
1470
  rescue StandardError => e
1441
1471
  abort("\nError: #{e.message}")
1472
+ rescue StandardError => e
1473
+ puts "\nERROR: #{e.message}"
1442
1474
  end
1443
1475
 
1444
1476
  # TODO: aggregate back into scenario reports and geojson file
@@ -1508,6 +1540,12 @@ module URBANopt
1508
1540
  # Ensure reopt default files are prepared
1509
1541
  # create_reopt_files(@opthash.subopts[:scenario])
1510
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
+
1511
1549
  scenario_base = default_post_processor.scenario_base
1512
1550
 
1513
1551
  # see if reopt-scenario-assumptions-file was passed in, otherwise use the default
@@ -1524,7 +1562,8 @@ module URBANopt
1524
1562
  if feature[:properties][:district_system_type] && (feature[:properties][:district_system_type] == 'Community Photovoltaic')
1525
1563
  community_photovoltaic << feature
1526
1564
  end
1527
- rescue StandardError
1565
+ rescue StandardError => e
1566
+ puts "\nERROR: #{e.message}"
1528
1567
  end
1529
1568
  reopt_post_processor = URBANopt::REopt::REoptPostProcessor.new(
1530
1569
  scenario_report,
@@ -1551,7 +1590,8 @@ module URBANopt
1551
1590
  if feature[:properties][:district_system_type] && (feature[:properties][:district_system_type] == 'Ground Mount Photovoltaic')
1552
1591
  groundmount_photovoltaic[feature[:properties][:associated_building_id]] = feature[:properties][:footprint_area]
1553
1592
  end
1554
- rescue StandardError
1593
+ rescue StandardError => e
1594
+ puts "\nERROR: #{e.message}"
1555
1595
  end
1556
1596
  scenario_report_features = reopt_post_processor.run_scenario_report_features(
1557
1597
  scenario_report: scenario_report,
@@ -1737,18 +1777,15 @@ module URBANopt
1737
1777
  end
1738
1778
 
1739
1779
  des_cli_root = "#{res[:pvars][:gmt_path]} build-sys-param"
1740
- if @opthash.subopts[:sys_param_file]
1741
- des_cli_addition = " #{@opthash.subopts[:sys_param_file]}"
1780
+ if @opthash.subopts[:sys_param]
1781
+ des_cli_addition = " #{@opthash.subopts[:sys_param]}"
1742
1782
  if @opthash.subopts[:scenario]
1743
1783
  des_cli_addition += " #{@opthash.subopts[:scenario]}"
1744
1784
  end
1745
1785
  if @opthash.subopts[:feature]
1746
1786
  des_cli_addition += " #{@opthash.subopts[:feature]}"
1747
1787
  end
1748
- if @opthash.subopts[:model_type]
1749
- des_cli_addition += " #{@opthash.subopts[:model_type]}"
1750
- end
1751
- if @opthash.subopts[:ghe]
1788
+ if @opthash.subopts[:district_type]
1752
1789
  run_dir = @root_dir / 'run' / @scenario_name.downcase
1753
1790
  ghe_run_dir = run_dir / 'ghe_dir'
1754
1791
  # make ghe run dir
@@ -1756,7 +1793,14 @@ module URBANopt
1756
1793
  Dir.mkdir ghe_run_dir
1757
1794
  puts "Creating GHE results folder #{ghe_run_dir}"
1758
1795
  end
1759
- 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]}"
1800
+ end
1801
+ if @opthash.subopts[:overwrite]
1802
+ puts "\nDeleting and rebuilding existing sys-param file"
1803
+ des_cli_addition += ' --overwrite'
1760
1804
  end
1761
1805
  else
1762
1806
  abort("\nCommand must include new system parameter file name, ScenarioFile, & FeatureFile. Please try again")
@@ -1765,6 +1809,8 @@ module URBANopt
1765
1809
  system(des_cli_root + des_cli_addition)
1766
1810
  rescue FileNotFoundError
1767
1811
  abort("\nMust simulate using 'uo run' before preparing Modelica models.")
1812
+ rescue StandardError => e
1813
+ puts "\nERROR: #{e.message}"
1768
1814
  end
1769
1815
  end
1770
1816
 
@@ -1786,8 +1832,9 @@ module URBANopt
1786
1832
  if @opthash.subopts[:des_name]
1787
1833
  des_cli_addition += " #{File.expand_path(@opthash.subopts[:des_name])}"
1788
1834
  end
1789
- if @opthash.subopts[:model_type]
1790
- des_cli_addition += " #{@opthash.subopts[:model_type]}"
1835
+ if @opthash.subopts[:overwrite]
1836
+ puts "\nDeleting and rebuilding existing Modelica dir"
1837
+ des_cli_addition += ' --overwrite'
1791
1838
  end
1792
1839
  else
1793
1840
  abort("\nCommand must include system parameter file name, FeatureFile, and model name. Please try again")
@@ -1796,6 +1843,8 @@ module URBANopt
1796
1843
  system(des_cli_root + des_cli_addition)
1797
1844
  rescue FileNotFoundError
1798
1845
  abort("\nMust simulate using 'uo run' before preparing Modelica models.")
1846
+ rescue StandardError => e
1847
+ puts "\nERROR: #{e.message}"
1799
1848
  end
1800
1849
  end
1801
1850
 
@@ -1818,6 +1867,8 @@ module URBANopt
1818
1867
  system(des_cli_root + des_cli_addition)
1819
1868
  rescue FileNotFoundError
1820
1869
  abort("\nMust simulate using 'uo run' before preparing Modelica models.")
1870
+ rescue StandardError => e
1871
+ puts "\nERROR: #{e.message}"
1821
1872
  end
1822
1873
  end
1823
1874
 
@@ -1865,6 +1916,8 @@ module URBANopt
1865
1916
  system(ghe_cli_root + ghe_cli_addition)
1866
1917
  rescue FileNotFoundError
1867
1918
  abort("\nFile Not Found Error Holder.")
1919
+ rescue StandardError => e
1920
+ puts "\nERROR: #{e.message}"
1868
1921
  end
1869
1922
 
1870
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.0
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-01-26 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