urbanopt-scenario 0.11.0 → 1.0.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 +7 -8
- data/CHANGELOG.md +20 -1
- data/Gemfile +2 -2
- data/LICENSE.md +1 -1
- data/doc_templates/LICENSE.md +1 -1
- data/doc_templates/copyright_erb.txt +1 -1
- data/lib/urbanopt/scenario/logger.rb +1 -1
- data/lib/urbanopt/scenario/scenario_csv.rb +16 -6
- data/lib/urbanopt/scenario/scenario_datapoint_base.rb +1 -1
- data/lib/urbanopt/scenario/scenario_runner_osw.rb +3 -3
- data/lib/urbanopt/scenario/simulation_dir_base.rb +1 -1
- data/lib/urbanopt/scenario/simulation_dir_osw.rb +1 -1
- data/lib/urbanopt/scenario/version.rb +1 -1
- data/urbanopt-scenario-gem.gemspec +9 -9
- metadata +19 -47
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ac3b8620cce878dcc8a1053ba2a5341c65d7548ae5132fafe1239333cf819864
|
4
|
+
data.tar.gz: 392fd2ce49e3c470661b2e43c8e68ef6eb726587132ccb780aff11cd02877e61
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 27c005602ae92c2dfa18c74820d6986f1b600adba88880b9b34835950b71d2668478720c2ccdba1f3e1758002b72be07eefbd4910c24ca60a3ec8b8cdd16e8f6
|
7
|
+
data.tar.gz: a7f7b94a01bb2523dc5cbfa054a13974f00319125688e5b93b80a79f6490c9416fcd8b2885deb91bba3a7b38c40c376c73f9f7dabce2340251ecfe2dcbc49afc
|
@@ -2,30 +2,29 @@
|
|
2
2
|
name: Scenario-gem CI
|
3
3
|
|
4
4
|
on:
|
5
|
-
|
5
|
+
workflow_dispatch:
|
6
|
+
push:
|
6
7
|
schedule:
|
7
8
|
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule
|
8
9
|
# 5 am UTC (11pm MDT the day before) every weekday night in MDT
|
9
10
|
- cron: '21 5 * * 2-6'
|
10
|
-
pull_request:
|
11
|
-
types: [review_requested]
|
12
11
|
|
13
12
|
env:
|
14
|
-
# This env var
|
13
|
+
# This env var will enforce develop branch of all dependencies
|
15
14
|
FAVOR_LOCAL_GEMS: true
|
16
15
|
GEM_DEVELOPER_KEY: ${{ secrets.GEM_DEVELOPER_KEY }}
|
17
16
|
|
18
17
|
jobs:
|
19
18
|
weeknight-tests:
|
20
|
-
# ubuntu-latest works since https://github.com/rbenv/ruby-build/releases/tag/v20220710 (July 10, 2022)
|
21
|
-
# https://github.com/rbenv/ruby-build/discussions/1940
|
22
19
|
runs-on: ubuntu-latest
|
23
20
|
container:
|
24
|
-
image: docker://nrel/openstudio:3.
|
21
|
+
image: docker://nrel/openstudio:3.9.0
|
25
22
|
steps:
|
26
23
|
- uses: actions/checkout@v4
|
27
24
|
- name: Update gems
|
28
|
-
run:
|
25
|
+
run: |
|
26
|
+
bundle install
|
27
|
+
bundle update
|
29
28
|
- name: Run Rspec
|
30
29
|
run: bundle exec rspec
|
31
30
|
- name: Coveralls
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,24 @@
|
|
1
1
|
# URBANopt Scenario Gem
|
2
2
|
|
3
|
+
## Version 1.0.0
|
4
|
+
|
5
|
+
Date Range: 05/06/24 - 01/23/25
|
6
|
+
|
7
|
+
* Upgrade to OpenStudio 3.9 and Ruby 3.2.2 by @vtnate in https://github.com/urbanopt/urbanopt-scenario-gem/pull/276
|
8
|
+
* Fixup openstudio-extension-gem sub bundle errors by @jmarrec in https://github.com/urbanopt/urbanopt-scenario-gem/pull/275
|
9
|
+
|
10
|
+
### New Contributors
|
11
|
+
|
12
|
+
* @jmarrec made their first contribution in https://github.com/urbanopt/urbanopt-scenario-gem/pull/275
|
13
|
+
|
14
|
+
**Full Changelog**: https://github.com/urbanopt/urbanopt-scenario-gem/compare/v0.12.0...v1.0.0
|
15
|
+
|
16
|
+
## Version 0.12.0
|
17
|
+
Date Range: 01/10/24 - 05/06/24
|
18
|
+
* Use new version of reporting-gem by @vtnate in https://github.com/urbanopt/urbanopt-scenario-gem/pull/271
|
19
|
+
|
20
|
+
**Full Changelog**: https://github.com/urbanopt/urbanopt-scenario-gem/compare/v0.11.0...v0.12.0
|
21
|
+
|
3
22
|
## Version 0.11.0
|
4
23
|
Date Range: 07/06/23 - 01/10/24
|
5
24
|
|
@@ -188,7 +207,7 @@ Date Range: 01/15/20 - 03/30/20:
|
|
188
207
|
- Fixed [#83]( https://github.com/urbanopt/urbanopt-scenario-gem/pull/83 ), add multiple pV
|
189
208
|
- Fixed [#88]( https://github.com/urbanopt/urbanopt-scenario-gem/pull/88 ), add units to CSV reports
|
190
209
|
- Fixed [#89]( https://github.com/urbanopt/urbanopt-scenario-gem/pull/89 ), created Save feature report method
|
191
|
-
- Fixed [#91]( https://github.com/urbanopt/urbanopt-scenario-gem/pull/91 ), add
|
210
|
+
- Fixed [#91]( https://github.com/urbanopt/urbanopt-scenario-gem/pull/91 ), add total_construction_cost to reports
|
192
211
|
- Fixed [#95]( https://github.com/urbanopt/urbanopt-scenario-gem/issues/95 ), list datapoint failures
|
193
212
|
- Fixed [#98]( https://github.com/urbanopt/urbanopt-scenario-gem/pull/98 ), add power, net power, net energy and apparent power to timeseries results
|
194
213
|
- Fixed [#101]( https://github.com/urbanopt/urbanopt-scenario-gem/pull/101 ), fix for unit conversion when timeseries doe not exist
|
data/Gemfile
CHANGED
@@ -23,7 +23,7 @@ allow_local = ENV['FAVOR_LOCAL_GEMS']
|
|
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
|
-
# gem 'urbanopt-core', github: 'URBANopt/urbanopt-core-gem', branch: '
|
26
|
+
# gem 'urbanopt-core', github: 'URBANopt/urbanopt-core-gem', branch: 'os39'
|
27
27
|
# end
|
28
28
|
|
29
29
|
# if allow_local && File.exist?('../openstudio-common-measures-gem')
|
@@ -41,7 +41,7 @@ allow_local = ENV['FAVOR_LOCAL_GEMS']
|
|
41
41
|
# if allow_local && File.exist?('../urbanopt-reporting-gem')
|
42
42
|
# gem 'urbanopt-reporting', path: '../urbanopt-reporting-gem'
|
43
43
|
# elsif allow_local
|
44
|
-
# gem 'urbanopt-reporting', github: 'URBANopt/urbanopt-reporting-gem', branch: '
|
44
|
+
# gem 'urbanopt-reporting', github: 'URBANopt/urbanopt-reporting-gem', branch: 'develop'
|
45
45
|
# end
|
46
46
|
|
47
47
|
# if allow_local && File.exist?('../openstudio-load-flexibility-measures-gem')
|
data/LICENSE.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
URBANopt (tm), Copyright (c) 2019-
|
1
|
+
URBANopt (tm), Copyright (c) 2019-2025, Alliance for Sustainable Energy, LLC, and other
|
2
2
|
contributors. All rights reserved.
|
3
3
|
|
4
4
|
Redistribution and use in source and binary forms, with or without modification,
|
data/doc_templates/LICENSE.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
URBANopt (tm), Copyright (c) 2019-
|
1
|
+
URBANopt (tm), Copyright (c) 2019-2025, Alliance for Sustainable Energy, LLC, and other
|
2
2
|
contributors. All rights reserved.
|
3
3
|
|
4
4
|
Redistribution and use in source and binary forms, with or without modification,
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<%
|
2
2
|
# *********************************************************************************
|
3
|
-
# URBANopt (tm), Copyright (c) 2019-
|
3
|
+
# URBANopt (tm), Copyright (c) 2019-2025, Alliance for Sustainable Energy, LLC, and other
|
4
4
|
# contributors. All rights reserved.
|
5
5
|
|
6
6
|
# Redistribution and use in source and binary forms, with or without modification,
|
@@ -9,7 +9,7 @@ module URBANopt
|
|
9
9
|
module Scenario
|
10
10
|
@@logger = Logger.new($stdout)
|
11
11
|
|
12
|
-
#
|
12
|
+
# Defining class variable "@@logger" to log errors, info and warning messages.
|
13
13
|
def self.logger
|
14
14
|
@@logger
|
15
15
|
end
|
@@ -48,21 +48,31 @@ module URBANopt
|
|
48
48
|
# Require all simulation mappers in mapper_files_dir
|
49
49
|
def load_mapper_files
|
50
50
|
# loads default values from extension gem
|
51
|
-
options = OpenStudio::Extension::RunnerConfig.default_config
|
51
|
+
@options = OpenStudio::Extension::RunnerConfig.default_config(@root_dir)
|
52
52
|
# check if runner.conf file exists
|
53
53
|
if File.exist?(File.join(@root_dir, OpenStudio::Extension::RunnerConfig::FILENAME))
|
54
54
|
runner_config = OpenStudio::Extension::RunnerConfig.new(@root_dir)
|
55
|
-
# use the default values
|
56
|
-
|
55
|
+
# use the default values overridden with runner.conf values where not
|
56
|
+
# nil nor empty strings
|
57
|
+
@options = @options.merge(runner_config.options.reject{|k, v| v.nil? || (v.kind_of?(String) && v === '')})
|
57
58
|
end
|
58
59
|
|
59
60
|
# bundle path is assigned from the runner.conf if it exists or is assigned in the root_dir
|
60
|
-
|
61
|
+
# if bundle install path is not provided or is empty, it will be placed in root_dir/.bundle/install, otherwise use the provided path
|
62
|
+
if !@options.key?(:bundle_install_path) || @options[:bundle_install_path] === ''
|
63
|
+
@options[:bundle_install_path] = File.join(@root_dir, '.bundle/install/')
|
64
|
+
else
|
65
|
+
@options[:bundle_install_path]= Pathname.new(@options[:bundle_install_path]).cleanpath.to_s
|
66
|
+
end
|
67
|
+
bundle_path = @options[:bundle_install_path]
|
68
|
+
|
69
|
+
puts "Bundle final path is set to: #{bundle_path}"
|
61
70
|
|
62
71
|
# checks if bundle path doesn't exist or is empty
|
63
72
|
if !Dir.exist?(bundle_path) || Dir.empty?(bundle_path)
|
64
|
-
|
65
|
-
|
73
|
+
Bundler.with_unbundled_env do
|
74
|
+
OpenStudio::Extension::Runner.new(@root_dir, [], @options)
|
75
|
+
end
|
66
76
|
end
|
67
77
|
|
68
78
|
# find all lib dirs in the bundle path and add them to the path
|
@@ -89,7 +89,7 @@ module URBANopt
|
|
89
89
|
# rubocop: enable Style/EvalWithLocation #:nodoc:
|
90
90
|
|
91
91
|
##
|
92
|
-
# Return true if the datapoint is out of date, false otherwise. Non-
|
92
|
+
# Return true if the datapoint is out of date, false otherwise. Non-existent files are out of date.
|
93
93
|
##
|
94
94
|
# [return:] _Boolean_ - True if the datapoint is out of date, false otherwise.
|
95
95
|
def out_of_date?
|
@@ -46,11 +46,11 @@ module URBANopt
|
|
46
46
|
|
47
47
|
##
|
48
48
|
# Create and run all SimulationFileOSW for Scenario.
|
49
|
-
# A staged runner is
|
49
|
+
# A staged runner is implemented to run buildings, then transformers then district systems.
|
50
50
|
# - instantiate openstudio runner to run .osw files.
|
51
51
|
# - create simulation files for this scenario.
|
52
52
|
# - get feature_type value from in.osw files
|
53
|
-
# -
|
53
|
+
# - create 3 groups to store .osw files (+building_osws+ , +transformer_osws+ , +district_system_osws+)
|
54
54
|
# - add each osw file to its corresponding group id +simulation_dir+ is out_of_date
|
55
55
|
# - Run osw file groups in order and store simulation failure in a array.
|
56
56
|
##
|
@@ -78,7 +78,7 @@ module URBANopt
|
|
78
78
|
# end
|
79
79
|
# end
|
80
80
|
|
81
|
-
#
|
81
|
+
# create 3 groups to store .osw files (+building_osws+ , +transformer_osws+ , +district_system_osws+)
|
82
82
|
building_osws = []
|
83
83
|
transformer_osws = []
|
84
84
|
district_system_osws = []
|
@@ -30,7 +30,7 @@ module URBANopt
|
|
30
30
|
|
31
31
|
##
|
32
32
|
# Return true if the simulation is out of date (input files newer than results), false otherwise.
|
33
|
-
# Non-
|
33
|
+
# Non-existent simulation input files are out of date.
|
34
34
|
##
|
35
35
|
def out_of_date?
|
36
36
|
raise 'out_of_date? is not implemented for SimulationFileBase, override in your class'
|
@@ -110,7 +110,7 @@ module URBANopt
|
|
110
110
|
|
111
111
|
##
|
112
112
|
# Return true if the simulation is out of date (input files newer than results), false otherwise.
|
113
|
-
# Non-
|
113
|
+
# Non-existent simulation input files are out of date.
|
114
114
|
##
|
115
115
|
def out_of_date?
|
116
116
|
if !File.exist?(run_dir)
|
@@ -21,14 +21,14 @@ Gem::Specification.new do |spec|
|
|
21
21
|
spec.bindir = 'exe'
|
22
22
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
23
23
|
spec.require_paths = ['lib']
|
24
|
-
|
24
|
+
# We support exactly Ruby v3.2.2 because os-extension requires bundler==2.4.10 and that requires Ruby 3.2.2: https://stdgems.org/bundler/
|
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
|
+
spec.required_ruby_version = '3.2.2'
|
25
27
|
|
26
|
-
spec.add_development_dependency '
|
27
|
-
spec.add_development_dependency '
|
28
|
-
spec.add_development_dependency '
|
29
|
-
spec.
|
30
|
-
spec.
|
31
|
-
spec.add_runtime_dependency '
|
32
|
-
spec.add_runtime_dependency 'urbanopt-core', '~> 0.11.0'
|
33
|
-
spec.add_runtime_dependency 'urbanopt-reporting', '~> 0.9.1'
|
28
|
+
spec.add_development_dependency 'rspec', '~> 3.13'
|
29
|
+
spec.add_development_dependency 'simplecov', '0.22.0'
|
30
|
+
spec.add_development_dependency 'simplecov-lcov', '0.8.0'
|
31
|
+
spec.add_runtime_dependency 'sqlite3', '~> 2.0.0'
|
32
|
+
spec.add_runtime_dependency 'urbanopt-core', '~> 1.0.0'
|
33
|
+
spec.add_runtime_dependency 'urbanopt-reporting', '~> 1.0.0'
|
34
34
|
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: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rawad El Kontar
|
@@ -9,76 +9,48 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2025-01-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
|
-
- !ruby/object:Gem::Dependency
|
15
|
-
name: bundler
|
16
|
-
requirement: !ruby/object:Gem::Requirement
|
17
|
-
requirements:
|
18
|
-
- - "~>"
|
19
|
-
- !ruby/object:Gem::Version
|
20
|
-
version: '2.1'
|
21
|
-
type: :development
|
22
|
-
prerelease: false
|
23
|
-
version_requirements: !ruby/object:Gem::Requirement
|
24
|
-
requirements:
|
25
|
-
- - "~>"
|
26
|
-
- !ruby/object:Gem::Version
|
27
|
-
version: '2.1'
|
28
|
-
- !ruby/object:Gem::Dependency
|
29
|
-
name: rake
|
30
|
-
requirement: !ruby/object:Gem::Requirement
|
31
|
-
requirements:
|
32
|
-
- - "~>"
|
33
|
-
- !ruby/object:Gem::Version
|
34
|
-
version: '13.1'
|
35
|
-
type: :development
|
36
|
-
prerelease: false
|
37
|
-
version_requirements: !ruby/object:Gem::Requirement
|
38
|
-
requirements:
|
39
|
-
- - "~>"
|
40
|
-
- !ruby/object:Gem::Version
|
41
|
-
version: '13.1'
|
42
14
|
- !ruby/object:Gem::Dependency
|
43
15
|
name: rspec
|
44
16
|
requirement: !ruby/object:Gem::Requirement
|
45
17
|
requirements:
|
46
18
|
- - "~>"
|
47
19
|
- !ruby/object:Gem::Version
|
48
|
-
version: '3.
|
20
|
+
version: '3.13'
|
49
21
|
type: :development
|
50
22
|
prerelease: false
|
51
23
|
version_requirements: !ruby/object:Gem::Requirement
|
52
24
|
requirements:
|
53
25
|
- - "~>"
|
54
26
|
- !ruby/object:Gem::Version
|
55
|
-
version: '3.
|
27
|
+
version: '3.13'
|
56
28
|
- !ruby/object:Gem::Dependency
|
57
29
|
name: simplecov
|
58
30
|
requirement: !ruby/object:Gem::Requirement
|
59
31
|
requirements:
|
60
|
-
- -
|
32
|
+
- - '='
|
61
33
|
- !ruby/object:Gem::Version
|
62
|
-
version: 0.
|
34
|
+
version: 0.22.0
|
63
35
|
type: :development
|
64
36
|
prerelease: false
|
65
37
|
version_requirements: !ruby/object:Gem::Requirement
|
66
38
|
requirements:
|
67
|
-
- -
|
39
|
+
- - '='
|
68
40
|
- !ruby/object:Gem::Version
|
69
|
-
version: 0.
|
41
|
+
version: 0.22.0
|
70
42
|
- !ruby/object:Gem::Dependency
|
71
43
|
name: simplecov-lcov
|
72
44
|
requirement: !ruby/object:Gem::Requirement
|
73
45
|
requirements:
|
74
|
-
- -
|
46
|
+
- - '='
|
75
47
|
- !ruby/object:Gem::Version
|
76
48
|
version: 0.8.0
|
77
49
|
type: :development
|
78
50
|
prerelease: false
|
79
51
|
version_requirements: !ruby/object:Gem::Requirement
|
80
52
|
requirements:
|
81
|
-
- -
|
53
|
+
- - '='
|
82
54
|
- !ruby/object:Gem::Version
|
83
55
|
version: 0.8.0
|
84
56
|
- !ruby/object:Gem::Dependency
|
@@ -87,42 +59,42 @@ dependencies:
|
|
87
59
|
requirements:
|
88
60
|
- - "~>"
|
89
61
|
- !ruby/object:Gem::Version
|
90
|
-
version:
|
62
|
+
version: 2.0.0
|
91
63
|
type: :runtime
|
92
64
|
prerelease: false
|
93
65
|
version_requirements: !ruby/object:Gem::Requirement
|
94
66
|
requirements:
|
95
67
|
- - "~>"
|
96
68
|
- !ruby/object:Gem::Version
|
97
|
-
version:
|
69
|
+
version: 2.0.0
|
98
70
|
- !ruby/object:Gem::Dependency
|
99
71
|
name: urbanopt-core
|
100
72
|
requirement: !ruby/object:Gem::Requirement
|
101
73
|
requirements:
|
102
74
|
- - "~>"
|
103
75
|
- !ruby/object:Gem::Version
|
104
|
-
version: 0.
|
76
|
+
version: 1.0.0
|
105
77
|
type: :runtime
|
106
78
|
prerelease: false
|
107
79
|
version_requirements: !ruby/object:Gem::Requirement
|
108
80
|
requirements:
|
109
81
|
- - "~>"
|
110
82
|
- !ruby/object:Gem::Version
|
111
|
-
version: 0.
|
83
|
+
version: 1.0.0
|
112
84
|
- !ruby/object:Gem::Dependency
|
113
85
|
name: urbanopt-reporting
|
114
86
|
requirement: !ruby/object:Gem::Requirement
|
115
87
|
requirements:
|
116
88
|
- - "~>"
|
117
89
|
- !ruby/object:Gem::Version
|
118
|
-
version: 0.
|
90
|
+
version: 1.0.0
|
119
91
|
type: :runtime
|
120
92
|
prerelease: false
|
121
93
|
version_requirements: !ruby/object:Gem::Requirement
|
122
94
|
requirements:
|
123
95
|
- - "~>"
|
124
96
|
- !ruby/object:Gem::Version
|
125
|
-
version: 0.
|
97
|
+
version: 1.0.0
|
126
98
|
description: Library to export data point OSW files from URBANopt Scenario CSV
|
127
99
|
email:
|
128
100
|
- rawad.elkontar@nrel.gov
|
@@ -194,16 +166,16 @@ require_paths:
|
|
194
166
|
- lib
|
195
167
|
required_ruby_version: !ruby/object:Gem::Requirement
|
196
168
|
requirements:
|
197
|
-
- -
|
169
|
+
- - '='
|
198
170
|
- !ruby/object:Gem::Version
|
199
|
-
version: 2.
|
171
|
+
version: 3.2.2
|
200
172
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
201
173
|
requirements:
|
202
174
|
- - ">="
|
203
175
|
- !ruby/object:Gem::Version
|
204
176
|
version: '0'
|
205
177
|
requirements: []
|
206
|
-
rubygems_version: 3.
|
178
|
+
rubygems_version: 3.4.10
|
207
179
|
signing_key:
|
208
180
|
specification_version: 4
|
209
181
|
summary: Library to export data point OSW files from URBANopt Scenario CSV
|