urbanopt-scenario 1.0.0 → 1.1.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.
- checksums.yaml +4 -4
- data/.github/workflows/nightly_ci_build.yml +1 -1
- data/CHANGELOG.md +4 -0
- data/Gemfile +29 -9
- data/README.md +2 -0
- data/lib/urbanopt/scenario/scenario_base.rb +4 -4
- data/lib/urbanopt/scenario/scenario_csv.rb +5 -5
- data/lib/urbanopt/scenario/scenario_datapoint_base.rb +2 -2
- data/lib/urbanopt/scenario/scenario_runner_osw.rb +0 -3
- data/lib/urbanopt/scenario/simulation_dir_base.rb +1 -1
- data/lib/urbanopt/scenario/version.rb +1 -1
- data/urbanopt-scenario-gem.gemspec +8 -5
- metadata +54 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fb8438d1b4ec917e0c998e5d8ada01d0040d8268012af476ca000cb7603055e0
|
4
|
+
data.tar.gz: d08b5de6d0dbf3a70ff391016de57a458cd5e91550d1ade6682f7894327043c6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f5dd1b7afbb5481eb03f3958c73ca154cf31dcf72794ea9f092b87a94691e3125891df3113a867d9b5f4655cb4bdf4f8342e9cdc2ad3683084cfd71c42cd0765
|
7
|
+
data.tar.gz: b7126c1a289768508f1537187a16695a23d8a21409fdabd6cce7dfc141f10833bf6162afa935cf09f47c2b27d2361eedba42d94acbb31696747fb5a25237c9d9
|
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
@@ -17,35 +17,55 @@ allow_local = ENV['FAVOR_LOCAL_GEMS']
|
|
17
17
|
# if allow_local && File.exist?('../OpenStudio-extension-gem')
|
18
18
|
# gem 'openstudio-extension', path: '../OpenStudio-extension-gem'
|
19
19
|
# elsif allow_local
|
20
|
-
#
|
20
|
+
# gem 'openstudio-extension', github: 'NREL/OpenStudio-extension-gem', branch: 'develop'
|
21
21
|
# end
|
22
22
|
|
23
23
|
# if allow_local && File.exist?('../urbanopt-core-gem')
|
24
|
-
#
|
24
|
+
# gem 'urbanopt-core', path: '../urbanopt-core-gem'
|
25
25
|
# elsif allow_local
|
26
|
-
#
|
26
|
+
# gem 'urbanopt-core', github: 'URBANopt/urbanopt-core-gem', branch: 'develop'
|
27
27
|
# end
|
28
28
|
|
29
29
|
# if allow_local && File.exist?('../openstudio-common-measures-gem')
|
30
|
-
#
|
30
|
+
# gem 'openstudio-common-measures', path: '../openstudio-common-measures-gem'
|
31
31
|
# elsif allow_local
|
32
|
-
#
|
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'
|
33
49
|
# end
|
34
50
|
|
35
51
|
# if allow_local && File.exist?('../openstudio-model-articulation-gem')
|
36
52
|
# gem 'openstudio-model-articulation', path: '../openstudio-model-articulation-gem'
|
37
53
|
# elsif allow_local
|
38
|
-
#
|
54
|
+
# gem 'openstudio-model-articulation', github: 'NREL/openstudio-model-articulation-gem', branch: 'develop'
|
55
|
+
# else
|
56
|
+
# gem 'openstudio-model-articulation', '~> 0.12.2'
|
39
57
|
# end
|
40
58
|
|
41
59
|
# if allow_local && File.exist?('../urbanopt-reporting-gem')
|
42
|
-
#
|
60
|
+
# gem 'urbanopt-reporting', path: '../urbanopt-reporting-gem'
|
43
61
|
# elsif allow_local
|
44
|
-
#
|
62
|
+
# gem 'urbanopt-reporting', github: 'URBANopt/urbanopt-reporting-gem', branch: 'develop'
|
45
63
|
# end
|
46
64
|
|
47
65
|
# if allow_local && File.exist?('../openstudio-load-flexibility-measures-gem')
|
48
66
|
# gem 'openstudio-load-flexibility-measures', path: '../openstudio-load-flexibility-measures-gem'
|
49
67
|
# elseif allow_local
|
50
|
-
#
|
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'
|
51
71
|
# end
|
data/README.md
CHANGED
@@ -24,19 +24,19 @@ module URBANopt
|
|
24
24
|
|
25
25
|
##
|
26
26
|
# Name of the Scenario.
|
27
|
-
attr_reader :name
|
27
|
+
attr_reader :name # :nodoc:
|
28
28
|
|
29
29
|
##
|
30
30
|
# Root directory containing Gemfile.
|
31
|
-
attr_reader :root_dir
|
31
|
+
attr_reader :root_dir # :nodoc:
|
32
32
|
|
33
33
|
##
|
34
34
|
# Directory to run this Scenario.
|
35
|
-
attr_reader :run_dir
|
35
|
+
attr_reader :run_dir # :nodoc:
|
36
36
|
|
37
37
|
##
|
38
38
|
# An instance of +URBANopt::Core::FeatureFile+ associated with this Scenario.
|
39
|
-
attr_reader :feature_file
|
39
|
+
attr_reader :feature_file # :nodoc:
|
40
40
|
|
41
41
|
# An array of SimulationDirBase objects.
|
42
42
|
def simulation_dirs
|
@@ -37,13 +37,13 @@ module URBANopt
|
|
37
37
|
end
|
38
38
|
|
39
39
|
# Path to CSV file
|
40
|
-
attr_reader :csv_file
|
40
|
+
attr_reader :csv_file # :nodoc:
|
41
41
|
|
42
42
|
# Number of header rows to skip in CSV file
|
43
|
-
attr_reader :num_header_rows
|
43
|
+
attr_reader :num_header_rows # :nodoc:
|
44
44
|
|
45
45
|
# Directory containing all mapper class files
|
46
|
-
attr_reader :mapper_files_dir
|
46
|
+
attr_reader :mapper_files_dir # :nodoc:
|
47
47
|
|
48
48
|
# Require all simulation mappers in mapper_files_dir
|
49
49
|
def load_mapper_files
|
@@ -54,7 +54,7 @@ module URBANopt
|
|
54
54
|
runner_config = OpenStudio::Extension::RunnerConfig.new(@root_dir)
|
55
55
|
# use the default values overridden with runner.conf values where not
|
56
56
|
# nil nor empty strings
|
57
|
-
@options = @options.merge(runner_config.options.reject{|k, v| v.nil? || (v.
|
57
|
+
@options = @options.merge(runner_config.options.reject { |k, v| v.nil? || (v.is_a?(String) && v === '') })
|
58
58
|
end
|
59
59
|
|
60
60
|
# bundle path is assigned from the runner.conf if it exists or is assigned in the root_dir
|
@@ -62,7 +62,7 @@ module URBANopt
|
|
62
62
|
if !@options.key?(:bundle_install_path) || @options[:bundle_install_path] === ''
|
63
63
|
@options[:bundle_install_path] = File.join(@root_dir, '.bundle/install/')
|
64
64
|
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
|
66
66
|
end
|
67
67
|
bundle_path = @options[:bundle_install_path]
|
68
68
|
|
@@ -6,7 +6,7 @@
|
|
6
6
|
module URBANopt
|
7
7
|
module Scenario
|
8
8
|
class ScenarioDatapoint
|
9
|
-
attr_reader :scenario, :feature_id, :feature_name, :mapper_class, :feature
|
9
|
+
attr_reader :scenario, :feature_id, :feature_name, :mapper_class, :feature # :nodoc:#
|
10
10
|
|
11
11
|
##
|
12
12
|
# ScenarioDatapoint is an agnostic description of the simulation of a Feature in a Scenario
|
@@ -23,7 +23,7 @@ module URBANopt
|
|
23
23
|
@feature_name = feature_name
|
24
24
|
@feature = scenario.feature_file.get_feature_by_id(feature_id)
|
25
25
|
@mapper_class = mapper_class
|
26
|
-
end
|
26
|
+
end # :nodoc:
|
27
27
|
|
28
28
|
##
|
29
29
|
# Gets the type of a feature
|
@@ -120,15 +120,12 @@ module URBANopt
|
|
120
120
|
# run building_osws
|
121
121
|
# building_failures = runner.run_osws(building_osws, num_parallel = Extension::NUM_PARALLEL, max_to_run = Extension::MAX_DATAPOINTS)
|
122
122
|
building_failures = runner.run_osws(building_osws)
|
123
|
-
failures + building_failures
|
124
123
|
# run district_system_osws
|
125
124
|
# district_system_failures = runner.run_osws(district_system_osws, num_parallel = Extension::NUM_PARALLEL, max_to_run = Extension::MAX_DATAPOINTS)
|
126
125
|
district_system_failures = runner.run_osws(district_system_osws)
|
127
|
-
failures + district_system_failures
|
128
126
|
# run transformer_osws
|
129
127
|
# transformer_failures = runner.run_osws(transformer_osws, num_parallel = Extension::NUM_PARALLEL, max_to_run = Extension::MAX_DATAPOINTS)
|
130
128
|
transformer_failures = runner.run_osws(transformer_osws)
|
131
|
-
failures + transformer_failures
|
132
129
|
|
133
130
|
puts 'Done Running Scenario'
|
134
131
|
|
@@ -19,7 +19,7 @@ module URBANopt
|
|
19
19
|
@feature_names = feature_names
|
20
20
|
end
|
21
21
|
|
22
|
-
attr_reader :scenario, :features, :feature_names
|
22
|
+
attr_reader :scenario, :features, :feature_names # :nodoc: #:nodoc: #:nodoc:
|
23
23
|
|
24
24
|
##
|
25
25
|
# Return the directory that this simulation will run in
|
@@ -25,10 +25,13 @@ Gem::Specification.new do |spec|
|
|
25
25
|
# It would be nice to be able to use newer patches of Ruby 3.2, which would require os-extension to relax its dependency on bundler.
|
26
26
|
spec.required_ruby_version = '3.2.2'
|
27
27
|
|
28
|
-
spec.add_development_dependency '
|
29
|
-
spec.add_development_dependency '
|
30
|
-
spec.add_development_dependency '
|
28
|
+
spec.add_development_dependency 'rake', '~> 13.0'
|
29
|
+
spec.add_development_dependency 'rspec', '~> 3.9'
|
30
|
+
spec.add_development_dependency 'rubocop', '~> 1.50'
|
31
|
+
spec.add_development_dependency 'rubocop-performance', '~> 1.20'
|
32
|
+
spec.add_development_dependency 'simplecov', '~> 0.22.0'
|
33
|
+
spec.add_development_dependency 'simplecov-lcov', '~> 0.8.0'
|
31
34
|
spec.add_runtime_dependency 'sqlite3', '~> 2.0.0'
|
32
|
-
spec.add_runtime_dependency 'urbanopt-core', '~> 1.
|
33
|
-
spec.add_runtime_dependency 'urbanopt-reporting', '~> 1.
|
35
|
+
spec.add_runtime_dependency 'urbanopt-core', '~> 1.1.0'
|
36
|
+
spec.add_runtime_dependency 'urbanopt-reporting', '~> 1.1.0'
|
34
37
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: urbanopt-scenario
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rawad El Kontar
|
@@ -9,48 +9,90 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2025-
|
12
|
+
date: 2025-10-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: rake
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
requirements:
|
18
|
+
- - "~>"
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: '13.0'
|
21
|
+
type: :development
|
22
|
+
prerelease: false
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - "~>"
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: '13.0'
|
14
28
|
- !ruby/object:Gem::Dependency
|
15
29
|
name: rspec
|
16
30
|
requirement: !ruby/object:Gem::Requirement
|
17
31
|
requirements:
|
18
32
|
- - "~>"
|
19
33
|
- !ruby/object:Gem::Version
|
20
|
-
version: '3.
|
34
|
+
version: '3.9'
|
21
35
|
type: :development
|
22
36
|
prerelease: false
|
23
37
|
version_requirements: !ruby/object:Gem::Requirement
|
24
38
|
requirements:
|
25
39
|
- - "~>"
|
26
40
|
- !ruby/object:Gem::Version
|
27
|
-
version: '3.
|
41
|
+
version: '3.9'
|
42
|
+
- !ruby/object:Gem::Dependency
|
43
|
+
name: rubocop
|
44
|
+
requirement: !ruby/object:Gem::Requirement
|
45
|
+
requirements:
|
46
|
+
- - "~>"
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: '1.50'
|
49
|
+
type: :development
|
50
|
+
prerelease: false
|
51
|
+
version_requirements: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - "~>"
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '1.50'
|
56
|
+
- !ruby/object:Gem::Dependency
|
57
|
+
name: rubocop-performance
|
58
|
+
requirement: !ruby/object:Gem::Requirement
|
59
|
+
requirements:
|
60
|
+
- - "~>"
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '1.20'
|
63
|
+
type: :development
|
64
|
+
prerelease: false
|
65
|
+
version_requirements: !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - "~>"
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '1.20'
|
28
70
|
- !ruby/object:Gem::Dependency
|
29
71
|
name: simplecov
|
30
72
|
requirement: !ruby/object:Gem::Requirement
|
31
73
|
requirements:
|
32
|
-
- -
|
74
|
+
- - "~>"
|
33
75
|
- !ruby/object:Gem::Version
|
34
76
|
version: 0.22.0
|
35
77
|
type: :development
|
36
78
|
prerelease: false
|
37
79
|
version_requirements: !ruby/object:Gem::Requirement
|
38
80
|
requirements:
|
39
|
-
- -
|
81
|
+
- - "~>"
|
40
82
|
- !ruby/object:Gem::Version
|
41
83
|
version: 0.22.0
|
42
84
|
- !ruby/object:Gem::Dependency
|
43
85
|
name: simplecov-lcov
|
44
86
|
requirement: !ruby/object:Gem::Requirement
|
45
87
|
requirements:
|
46
|
-
- -
|
88
|
+
- - "~>"
|
47
89
|
- !ruby/object:Gem::Version
|
48
90
|
version: 0.8.0
|
49
91
|
type: :development
|
50
92
|
prerelease: false
|
51
93
|
version_requirements: !ruby/object:Gem::Requirement
|
52
94
|
requirements:
|
53
|
-
- -
|
95
|
+
- - "~>"
|
54
96
|
- !ruby/object:Gem::Version
|
55
97
|
version: 0.8.0
|
56
98
|
- !ruby/object:Gem::Dependency
|
@@ -73,28 +115,28 @@ dependencies:
|
|
73
115
|
requirements:
|
74
116
|
- - "~>"
|
75
117
|
- !ruby/object:Gem::Version
|
76
|
-
version: 1.
|
118
|
+
version: 1.1.0
|
77
119
|
type: :runtime
|
78
120
|
prerelease: false
|
79
121
|
version_requirements: !ruby/object:Gem::Requirement
|
80
122
|
requirements:
|
81
123
|
- - "~>"
|
82
124
|
- !ruby/object:Gem::Version
|
83
|
-
version: 1.
|
125
|
+
version: 1.1.0
|
84
126
|
- !ruby/object:Gem::Dependency
|
85
127
|
name: urbanopt-reporting
|
86
128
|
requirement: !ruby/object:Gem::Requirement
|
87
129
|
requirements:
|
88
130
|
- - "~>"
|
89
131
|
- !ruby/object:Gem::Version
|
90
|
-
version: 1.
|
132
|
+
version: 1.1.0
|
91
133
|
type: :runtime
|
92
134
|
prerelease: false
|
93
135
|
version_requirements: !ruby/object:Gem::Requirement
|
94
136
|
requirements:
|
95
137
|
- - "~>"
|
96
138
|
- !ruby/object:Gem::Version
|
97
|
-
version: 1.
|
139
|
+
version: 1.1.0
|
98
140
|
description: Library to export data point OSW files from URBANopt Scenario CSV
|
99
141
|
email:
|
100
142
|
- rawad.elkontar@nrel.gov
|