Skip to content

Commit bb67610

Browse files
authored
Merge pull request #279 from urbanopt/develop
Version 1.1.0
2 parents 2ab88fe + c9b50de commit bb67610

14 files changed

Lines changed: 72 additions & 47 deletions

.github/workflows/nightly_ci_build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
weeknight-tests:
1919
runs-on: ubuntu-latest
2020
container:
21-
image: docker://nrel/openstudio:3.9.0
21+
image: docker://nrel/openstudio:3.10.0
2222
steps:
2323
- uses: actions/checkout@v4
2424
- name: Update gems

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# URBANopt Scenario Gem
22

3+
## Version 1.1.0
4+
5+
* Upgrade to OpenStudio 3.10 by @vtnate in <https://github.com/urbanopt/urbanopt-scenario-gem/pull/278>
6+
37
## Version 1.0.0
48

59
Date Range: 05/06/24 - 01/23/25

Gemfile

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,35 +17,55 @@ allow_local = ENV['FAVOR_LOCAL_GEMS']
1717
# if allow_local && File.exist?('../OpenStudio-extension-gem')
1818
# gem 'openstudio-extension', path: '../OpenStudio-extension-gem'
1919
# elsif allow_local
20-
# gem 'openstudio-extension', github: 'NREL/OpenStudio-extension-gem', branch: 'develop'
20+
# gem 'openstudio-extension', github: 'NREL/OpenStudio-extension-gem', branch: 'develop'
2121
# end
2222

2323
# if allow_local && File.exist?('../urbanopt-core-gem')
24-
# gem 'urbanopt-core', path: '../urbanopt-core-gem'
24+
# gem 'urbanopt-core', path: '../urbanopt-core-gem'
2525
# elsif allow_local
26-
# gem 'urbanopt-core', github: 'URBANopt/urbanopt-core-gem', branch: 'os39'
26+
# gem 'urbanopt-core', github: 'URBANopt/urbanopt-core-gem', branch: 'develop'
2727
# end
2828

2929
# if allow_local && File.exist?('../openstudio-common-measures-gem')
30-
# gem 'openstudio-common-measures', path: '../openstudio-common-measures-gem'
30+
# gem 'openstudio-common-measures', path: '../openstudio-common-measures-gem'
3131
# elsif allow_local
32-
# gem 'openstudio-common-measures', github: 'NREL/openstudio-common-measures-gem', branch: 'develop'
32+
# gem 'openstudio-common-measures', github: 'NREL/openstudio-common-measures-gem', branch: 'develop'
33+
# else
34+
# gem 'openstudio-common-measures', '~> 0.12.3'
35+
# end
36+
37+
# if allow_local && File.exist?('../urbanopt-geojson-gem')
38+
# gem 'urbanopt-geojson', path: '../urbanopt-geojson-gem'
39+
# elsif allow_local
40+
# gem 'urbanopt-geojson', github: 'URBANopt/urbanopt-geojson-gem', branch: 'develop'
41+
# end
42+
43+
# if allow_local && File.exist?('../openstudio-standards-gem')
44+
# gem 'openstudio-standards', path: '../openstudio-standards-gem'
45+
# elsif allow_local
46+
# gem 'openstudio-standards', github: 'NREL/openstudio-standards-gem', branch: 'develop'
47+
# else
48+
# gem 'openstudio-standards', '~> 0.8.2'
3349
# end
3450

3551
# if allow_local && File.exist?('../openstudio-model-articulation-gem')
3652
# gem 'openstudio-model-articulation', path: '../openstudio-model-articulation-gem'
3753
# elsif allow_local
38-
# gem 'openstudio-model-articulation', github: 'NREL/openstudio-model-articulation-gem', branch: 'develop'
54+
# gem 'openstudio-model-articulation', github: 'NREL/openstudio-model-articulation-gem', branch: 'develop'
55+
# else
56+
# gem 'openstudio-model-articulation', '~> 0.12.2'
3957
# end
4058

4159
# if allow_local && File.exist?('../urbanopt-reporting-gem')
42-
# gem 'urbanopt-reporting', path: '../urbanopt-reporting-gem'
60+
# gem 'urbanopt-reporting', path: '../urbanopt-reporting-gem'
4361
# elsif allow_local
44-
# gem 'urbanopt-reporting', github: 'URBANopt/urbanopt-reporting-gem', branch: 'develop'
62+
# gem 'urbanopt-reporting', github: 'URBANopt/urbanopt-reporting-gem', branch: 'develop'
4563
# end
4664

4765
# if allow_local && File.exist?('../openstudio-load-flexibility-measures-gem')
4866
# gem 'openstudio-load-flexibility-measures', path: '../openstudio-load-flexibility-measures-gem'
4967
# elseif allow_local
50-
# gem 'openstudio-load-flexibility-measures', github: 'NREL/openstudio-load-flexibility-measures-gem', branch: 'develop'
68+
# gem 'openstudio-load-flexibility-measures', github: 'NREL/openstudio-load-flexibility-measures-gem', branch: 'develop'
69+
# else
70+
# gem 'openstudio-load-flexibility-measures', '~> 0.11.1'
5171
# end

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,10 @@ gem 'urbanopt-scenario'
1717

1818
And then execute:
1919

20+
```bash
2021
$ bundle install
2122
$ bundle update
23+
```
2224

2325
Or install it yourself as:
2426

lib/urbanopt/scenario/scenario_base.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,19 @@ def initialize(name, root_dir, run_dir, feature_file)
2424

2525
##
2626
# Name of the Scenario.
27-
attr_reader :name #:nodoc:
27+
attr_reader :name # :nodoc:
2828

2929
##
3030
# Root directory containing Gemfile.
31-
attr_reader :root_dir #:nodoc:
31+
attr_reader :root_dir # :nodoc:
3232

3333
##
3434
# Directory to run this Scenario.
35-
attr_reader :run_dir #:nodoc:
35+
attr_reader :run_dir # :nodoc:
3636

3737
##
3838
# An instance of +URBANopt::Core::FeatureFile+ associated with this Scenario.
39-
attr_reader :feature_file #:nodoc:
39+
attr_reader :feature_file # :nodoc:
4040

4141
# An array of SimulationDirBase objects.
4242
def simulation_dirs

lib/urbanopt/scenario/scenario_csv.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ def initialize(name, root_dir, run_dir, feature_file, mapper_files_dir, csv_file
3737
end
3838

3939
# Path to CSV file
40-
attr_reader :csv_file #:nodoc:
40+
attr_reader :csv_file # :nodoc:
4141

4242
# Number of header rows to skip in CSV file
43-
attr_reader :num_header_rows #:nodoc:
43+
attr_reader :num_header_rows # :nodoc:
4444

4545
# Directory containing all mapper class files
46-
attr_reader :mapper_files_dir #:nodoc:
46+
attr_reader :mapper_files_dir # :nodoc:
4747

4848
# Require all simulation mappers in mapper_files_dir
4949
def load_mapper_files
@@ -54,15 +54,15 @@ def load_mapper_files
5454
runner_config = OpenStudio::Extension::RunnerConfig.new(@root_dir)
5555
# use the default values overridden with runner.conf values where not
5656
# nil nor empty strings
57-
@options = @options.merge(runner_config.options.reject{|k, v| v.nil? || (v.kind_of?(String) && v === '')})
57+
@options = @options.merge(runner_config.options.reject { |k, v| v.nil? || (v.is_a?(String) && v === '') })
5858
end
5959

6060
# bundle path is assigned from the runner.conf if it exists or is assigned in the root_dir
6161
# if bundle install path is not provided or is empty, it will be placed in root_dir/.bundle/install, otherwise use the provided path
6262
if !@options.key?(:bundle_install_path) || @options[:bundle_install_path] === ''
6363
@options[:bundle_install_path] = File.join(@root_dir, '.bundle/install/')
6464
else
65-
@options[:bundle_install_path]= Pathname.new(@options[:bundle_install_path]).cleanpath.to_s
65+
@options[:bundle_install_path] = Pathname.new(@options[:bundle_install_path]).cleanpath.to_s
6666
end
6767
bundle_path = @options[:bundle_install_path]
6868

lib/urbanopt/scenario/scenario_datapoint_base.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
module URBANopt
77
module Scenario
88
class ScenarioDatapoint
9-
attr_reader :scenario, :feature_id, :feature_name, :mapper_class, :feature #:nodoc:#
9+
attr_reader :scenario, :feature_id, :feature_name, :mapper_class, :feature # :nodoc:#
1010

1111
##
1212
# ScenarioDatapoint is an agnostic description of the simulation of a Feature in a Scenario
@@ -23,7 +23,7 @@ def initialize(scenario, feature_id, feature_name, mapper_class)
2323
@feature_name = feature_name
2424
@feature = scenario.feature_file.get_feature_by_id(feature_id)
2525
@mapper_class = mapper_class
26-
end #:nodoc:
26+
end # :nodoc:
2727

2828
##
2929
# Gets the type of a feature

lib/urbanopt/scenario/scenario_runner_osw.rb

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,15 +120,12 @@ def run(scenario, force_clear = false, options = {})
120120
# run building_osws
121121
# building_failures = runner.run_osws(building_osws, num_parallel = Extension::NUM_PARALLEL, max_to_run = Extension::MAX_DATAPOINTS)
122122
building_failures = runner.run_osws(building_osws)
123-
failures + building_failures
124123
# run district_system_osws
125124
# district_system_failures = runner.run_osws(district_system_osws, num_parallel = Extension::NUM_PARALLEL, max_to_run = Extension::MAX_DATAPOINTS)
126125
district_system_failures = runner.run_osws(district_system_osws)
127-
failures + district_system_failures
128126
# run transformer_osws
129127
# transformer_failures = runner.run_osws(transformer_osws, num_parallel = Extension::NUM_PARALLEL, max_to_run = Extension::MAX_DATAPOINTS)
130128
transformer_failures = runner.run_osws(transformer_osws)
131-
failures + transformer_failures
132129

133130
puts 'Done Running Scenario'
134131

lib/urbanopt/scenario/simulation_dir_base.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def initialize(scenario, features, feature_names)
1919
@feature_names = feature_names
2020
end
2121

22-
attr_reader :scenario, :features, :feature_names #:nodoc: #:nodoc: #:nodoc:
22+
attr_reader :scenario, :features, :feature_names # :nodoc: #:nodoc: #:nodoc:
2323

2424
##
2525
# Return the directory that this simulation will run in

lib/urbanopt/scenario/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55

66
module URBANopt
77
module Scenario
8-
VERSION = '1.0.0'.freeze
8+
VERSION = '1.1.0'.freeze
99
end
1010
end

0 commit comments

Comments
 (0)