bcl 0.7.0 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +13 -0
- data/Gemfile +1 -9
- data/LICENSE.md +27 -0
- data/Rakefile +40 -232
- data/bcl.gemspec +26 -17
- data/lib/bcl/base_xml.rb +4 -18
- data/lib/bcl/component.rb +4 -18
- data/lib/bcl/component_from_spreadsheet.rb +4 -18
- data/lib/bcl/component_methods.rb +63 -427
- data/lib/bcl/core_ext.rb +4 -18
- data/lib/bcl/tar_ball.rb +4 -52
- data/lib/bcl/version.rb +5 -19
- data/lib/bcl.rb +4 -18
- data/schemas/v3/measure_v3.xsd +1 -6
- metadata +63 -18
- data/License.txt +0 -65
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1d846e29ef5a83888943eb997326d38e40cf6ba17288a17f610b722f2ebfcfe0
|
4
|
+
data.tar.gz: 570843a08e8a90c8ecf0d5c31120c274ad49a2279ac82132529451448a84781d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 45c82af0745dd00892220dd8b2af6606aa22619eac5790babccc3ed26d925b24166f22ce1863cce7d7a45c0358a324595ea960e1e7a8193d3f59d062bd9f1d2f
|
7
|
+
data.tar.gz: a4b11e62e52d29ff5fdf31cfd6272409631139a9fba906fb69bff4032b7095400055455b84a16f43a7faa2f5db91e027b59c6335c5325d72a68a621d15d2370c
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,18 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
## Version 0.8.0
|
4
|
+
* BCLXML validation: adjust schemas
|
5
|
+
* removed staging, pushing, updating of components
|
6
|
+
* removed login
|
7
|
+
* simplified config file to only contain server URL
|
8
|
+
* removed test to download component via POST (was that needed?)
|
9
|
+
* code clean-up and test clean-up
|
10
|
+
* updated dependencies to support Ruby 3.2.2 & OpenStudio 3.8.0
|
11
|
+
|
12
|
+
## Version 0.7.1
|
13
|
+
* Update license to standard OpenStudio 4-clause BSD license
|
14
|
+
* Upgrade dependencies for security
|
15
|
+
|
3
16
|
## Version 0.7.0
|
4
17
|
* Support Ruby > 2.7
|
5
18
|
* Minimum version of OpenStudio Measure Tester Gem to 0.3.0
|
data/Gemfile
CHANGED
data/LICENSE.md
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
OpenStudio(R), Copyright (c) 2008-2024, Alliance for Sustainable Energy, LLC. All rights reserved.
|
2
|
+
|
3
|
+
Redistribution and use in source and binary forms, with or without modification, are permitted
|
4
|
+
provided that the following conditions are met:
|
5
|
+
|
6
|
+
(1) Redistributions of source code must retain the above copyright notice, this list of conditions
|
7
|
+
and the following disclaimer.
|
8
|
+
|
9
|
+
(2) Redistributions in binary form must reproduce the above copyright notice, this list of conditions
|
10
|
+
and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
11
|
+
|
12
|
+
(3) Neither the name of the copyright holder nor the names of any contributors may be used to endorse
|
13
|
+
or promote products derived from this software without specific prior written permission from the
|
14
|
+
respective party.
|
15
|
+
|
16
|
+
(4) Other than as required in clauses (1) and (2), distributions in any form of modifications or other
|
17
|
+
derivative works may not use the "OpenStudio" trademark, "OS", "os", or any other confusingly similar
|
18
|
+
designation without specific prior written permission from Alliance for Sustainable Energy, LLC.
|
19
|
+
|
20
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
|
21
|
+
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
22
|
+
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER, THE UNITED STATES GOVERNMENT,
|
23
|
+
OR ANY CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
24
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
|
25
|
+
OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
26
|
+
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
27
|
+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
data/Rakefile
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
# *******************************************************************************
|
2
|
+
# OpenStudio(R), Copyright (c) Alliance for Sustainable Energy, LLC.
|
3
|
+
# See also https://openstudio.net/license
|
4
|
+
# *******************************************************************************
|
5
|
+
|
1
6
|
require 'bundler'
|
2
7
|
Bundler.setup
|
3
8
|
|
@@ -25,43 +30,36 @@ namespace :test do
|
|
25
30
|
# search with all=false
|
26
31
|
# ensure the same a) and b) as above
|
27
32
|
bcl = BCL::ComponentMethods.new
|
28
|
-
bcl.login
|
29
33
|
results = bcl.search('Add', 'show_rows=10', false)
|
30
|
-
puts "there are #{results[:result].count} results"
|
34
|
+
puts "there are #{results[:result].count} results returned in this response"
|
35
|
+
puts "there are #{results[:complete_results_count]} total results available for this query"
|
31
36
|
results[:result].each do |res|
|
32
37
|
puts (res[:measure][:name]).to_s
|
33
38
|
end
|
34
39
|
end
|
35
40
|
|
36
|
-
desc 'test
|
37
|
-
task :
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
end
|
43
|
-
|
44
|
-
desc 'test the BCL login credentials defined in .bcl/config.yml'
|
45
|
-
task :bcl_login do
|
41
|
+
desc 'test search and return ALL versions functionality'
|
42
|
+
task :search_all_versions do
|
43
|
+
# search with all=true
|
44
|
+
# ensure that a) results are returned (> 0) and b) [:measure][:name] is a string
|
45
|
+
# search with all=false
|
46
|
+
# ensure the same a) and b) as above
|
46
47
|
bcl = BCL::ComponentMethods.new
|
47
|
-
bcl.
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
bclcomponents.save(File.expand_path('lib/files/staged', __dir__))
|
48
|
+
results = bcl.search('Add', 'show_rows=10&all_content_versions=1', false)
|
49
|
+
puts "there are #{results[:result].count} results returned in this response"
|
50
|
+
puts "there are #{results[:complete_results_count]} total results available for this query"
|
51
|
+
results[:result].each do |res|
|
52
|
+
puts (res[:measure][:name]).to_s
|
53
|
+
end
|
54
54
|
end
|
55
55
|
|
56
56
|
desc 'test measure download'
|
57
57
|
task :measure_download do
|
58
58
|
# find a component with keyword 'Ashrae'
|
59
59
|
query = 'ashrae'
|
60
|
-
filter = 'fq
|
60
|
+
filter = 'fq=bundle:nrel_component&show_rows=3'
|
61
61
|
|
62
62
|
bcl = BCL::ComponentMethods.new
|
63
|
-
bcl.login
|
64
|
-
|
65
63
|
results = bcl.search(query, filter)
|
66
64
|
uids = []
|
67
65
|
results[:result].each do |result|
|
@@ -76,223 +74,33 @@ namespace :test do
|
|
76
74
|
f = File.open("#{download_path}/#{uids[0]}.tar.gz", 'wb')
|
77
75
|
f.write(content)
|
78
76
|
end
|
79
|
-
end
|
80
|
-
|
81
|
-
namespace :bcl do
|
82
|
-
STAGED_PATH = Pathname.new(Dir.pwd + '/staged')
|
83
|
-
|
84
|
-
# initialize BCL and login
|
85
|
-
bcl = BCL::ComponentMethods.new
|
86
|
-
bcl.login
|
87
|
-
|
88
|
-
# to call: rake "bcl:stage_and_upload[/path/to/your/content/directory, true]"
|
89
|
-
# content_path arg: path to components or measures to upload
|
90
|
-
# reset flag:
|
91
|
-
# If TRUE: content in the staged directory will be re-generated and receipt files will be deleted.
|
92
|
-
# If FALSE, content that already exists in the staged directory will remain and content with receipt files will not be re-uploaded.
|
93
|
-
desc 'stage and push/update all content in a repo'
|
94
|
-
task :stage_and_upload, [:content_path, :reset] do |t, args|
|
95
|
-
options = { reset: false }
|
96
|
-
options[:content_path] = Pathname.new args[:content_path]
|
97
|
-
if args[:reset].to_s == 'true'
|
98
|
-
options[:reset] = true
|
99
|
-
end
|
100
|
-
|
101
|
-
current_dir = Dir.pwd
|
102
|
-
|
103
|
-
# stage content
|
104
|
-
Rake.application.invoke_task("bcl:stage_content[#{options[:content_path]}, #{options[:reset]}]")
|
105
|
-
Dir.chdir(current_dir)
|
106
|
-
|
107
|
-
# upload (new and updated). pass in skip flag
|
108
|
-
Rake.application.invoke_task("bcl:upload_content[#{options[:reset]}]")
|
109
|
-
end
|
110
77
|
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
options = { reset: false }
|
117
|
-
if args[:reset].to_s == 'true'
|
118
|
-
options[:reset] = true
|
119
|
-
end
|
120
|
-
|
121
|
-
total_count = 0
|
122
|
-
successes = 0
|
123
|
-
errors = 0
|
124
|
-
skipped = 0
|
125
|
-
|
126
|
-
# grab all the new measure and component tar files and push to bcl
|
127
|
-
['measure', 'component'].each do |content_type|
|
128
|
-
items = []
|
129
|
-
paths = Pathname.glob(STAGED_PATH.to_s + "/push/#{content_type}/*.tar.gz")
|
130
|
-
paths.each do |path|
|
131
|
-
# puts path
|
132
|
-
items << path.to_s
|
133
|
-
end
|
134
|
-
|
135
|
-
items.each do |item|
|
136
|
-
puts item.split('/').last
|
137
|
-
total_count += 1
|
138
|
-
|
139
|
-
receipt_file = File.dirname(item) + '/' + File.basename(item, '.tar.gz') + '.receipt'
|
140
|
-
if !options[:reset] && File.exist?(receipt_file)
|
141
|
-
skipped += 1
|
142
|
-
puts 'SKIP: receipt file found'
|
143
|
-
next
|
144
|
-
end
|
145
|
-
|
146
|
-
valid, res = bcl.push_content(item, true, "nrel_#{content_type}")
|
147
|
-
if valid
|
148
|
-
successes += 1
|
149
|
-
else
|
150
|
-
errors += 1
|
151
|
-
if res.key?(:error)
|
152
|
-
puts " ERROR MESSAGE: #{res[:error]}"
|
153
|
-
else
|
154
|
-
puts "ERROR: #{res.inspect.chomp}"
|
155
|
-
end
|
156
|
-
end
|
157
|
-
puts '', '---'
|
158
|
-
end
|
159
|
-
end
|
78
|
+
desc 'test measure download - legacy syntax'
|
79
|
+
task :measure_download do
|
80
|
+
# find a component with keyword 'Ashrae'
|
81
|
+
query = 'ashrae'
|
82
|
+
filter = 'fq[]=bundle:nrel_component&show_rows=3'
|
160
83
|
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
items << path.to_s
|
84
|
+
bcl = BCL::ComponentMethods.new
|
85
|
+
results = bcl.search(query, filter)
|
86
|
+
uids = []
|
87
|
+
results[:result].each do |result|
|
88
|
+
uids << result[:component][:uuid]
|
167
89
|
end
|
168
|
-
items.each do |item|
|
169
|
-
puts item.split('/').last
|
170
|
-
total_count += 1
|
171
90
|
|
172
|
-
|
173
|
-
if !options[:reset] && File.exist?(receipt_file)
|
174
|
-
skipped += 1
|
175
|
-
puts 'SKIP: receipt file found'
|
176
|
-
next
|
177
|
-
end
|
178
|
-
|
179
|
-
valid, res = bcl.update_content(item, true)
|
180
|
-
if valid
|
181
|
-
successes += 1
|
182
|
-
else
|
183
|
-
errors += 1
|
184
|
-
if res.key?(:error)
|
185
|
-
puts " ERROR MESSAGE: #{res[:error]}"
|
186
|
-
else
|
187
|
-
puts "ERROR MESSAGE: #{res.inspect.chomp}"
|
188
|
-
end
|
189
|
-
end
|
190
|
-
puts '', '---'
|
191
|
-
end
|
91
|
+
content = bcl.download_component(uids[0])
|
192
92
|
|
193
|
-
|
93
|
+
# save as tar.gz
|
94
|
+
download_path = File.expand_path('lib/files/downloads', __dir__)
|
95
|
+
FileUtils.mkdir(download_path) if !File.exist? download_path
|
96
|
+
f = File.open("#{download_path}/#{uids[0]}.tar.gz", 'wb')
|
97
|
+
f.write(content)
|
194
98
|
end
|
195
99
|
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
options = { reset: false }
|
201
|
-
options[:content_path] = Pathname.new args[:content_path]
|
202
|
-
if args[:reset].to_s == 'true'
|
203
|
-
options[:reset] = true
|
204
|
-
end
|
205
|
-
puts "OPTIONS -- content_path: #{options[:content_path]}, reset: #{options[:reset]}"
|
206
|
-
|
207
|
-
FileUtils.mkdir_p(STAGED_PATH)
|
208
|
-
|
209
|
-
# delete existing tarballs if reset is true
|
210
|
-
if options[:reset]
|
211
|
-
FileUtils.rm_rf(Dir.glob("#{STAGED_PATH}/*"))
|
212
|
-
end
|
213
|
-
|
214
|
-
# create new and existing directories
|
215
|
-
FileUtils.mkdir_p(STAGED_PATH.to_s + '/update')
|
216
|
-
FileUtils.mkdir_p(STAGED_PATH.to_s + '/push/component')
|
217
|
-
FileUtils.mkdir_p(STAGED_PATH.to_s + '/push/measure')
|
218
|
-
|
219
|
-
# keep track of noop, update, push
|
220
|
-
noops = 0
|
221
|
-
new_ones = 0
|
222
|
-
updates = 0
|
223
|
-
|
224
|
-
# get all content directories to process
|
225
|
-
dirs = Dir.glob("#{options[:content_path]}/*")
|
226
|
-
|
227
|
-
dirs.each do |dir|
|
228
|
-
next if dir.include?('Rakefile')
|
229
|
-
|
230
|
-
current_d = Dir.pwd
|
231
|
-
content_name = File.basename(dir)
|
232
|
-
puts '', '---'
|
233
|
-
puts "Generating #{content_name}"
|
234
|
-
|
235
|
-
Dir.chdir(dir)
|
236
|
-
|
237
|
-
# figure out whether to upload new or update existing
|
238
|
-
files = Pathname.glob('**/*')
|
239
|
-
uuid = nil
|
240
|
-
vid = nil
|
241
|
-
content_type = 'measure'
|
242
|
-
|
243
|
-
paths = []
|
244
|
-
files.each do |file|
|
245
|
-
# don't tar tests/outputs directory
|
246
|
-
next if file.to_s.start_with?('tests/output') # From measure testing process
|
247
|
-
next if file.to_s.start_with?('tests/test') # From openstudio-measure-tester-gem
|
248
|
-
next if file.to_s.start_with?('tests/coverage') # From openstudio-measure-tester-gem
|
249
|
-
next if file.to_s.start_with?('test_results') # From openstudio-measure-tester-gem
|
250
|
-
|
251
|
-
paths << file.to_s
|
252
|
-
if file.to_s =~ /^.{0,2}component.xml$/ || file.to_s =~ /^.{0,2}measure.xml$/
|
253
|
-
if file.to_s.match?(/^.{0,2}component.xml$/)
|
254
|
-
content_type = 'component'
|
255
|
-
end
|
256
|
-
# extract uuid and vid
|
257
|
-
uuid, vid = bcl.uuid_vid_from_xml(file)
|
258
|
-
end
|
259
|
-
end
|
260
|
-
puts "UUID: #{uuid}, VID: #{vid}"
|
261
|
-
|
262
|
-
# note: if uuid is missing, will assume new content
|
263
|
-
action = bcl.search_by_uuid(uuid, vid)
|
264
|
-
puts "#{content_name} ACTION TO TAKE: #{action}"
|
265
|
-
# new content functionality needs to know if measure or component. update is agnostic.
|
266
|
-
if action == 'noop' # ignore up-to-date content
|
267
|
-
puts " - WARNING: local #{content_name} uuid and vid match BCL... no update will be performed"
|
268
|
-
noops += 1
|
269
|
-
next
|
270
|
-
elsif action == 'update'
|
271
|
-
# puts "#{content_name} labeled as update for BCL"
|
272
|
-
destination = STAGED_PATH.join(action, "#{content_name}.tar.gz")
|
273
|
-
updates += 1
|
274
|
-
elsif action == 'push'
|
275
|
-
# puts "#{content_name} labeled as new content for BCL"
|
276
|
-
destination = STAGED_PATH.join(action, content_type, "#{content_name}.tar.gz")
|
277
|
-
new_ones += 1
|
278
|
-
end
|
279
|
-
|
280
|
-
puts "destination: #{destination}"
|
281
|
-
|
282
|
-
# copy over only if 'reset_receipts' is set to TRUE. otherwise ignore if file exists already
|
283
|
-
if File.exist?(destination)
|
284
|
-
if options[:reset]
|
285
|
-
FileUtils.rm(destination)
|
286
|
-
BCL.tarball(destination, paths)
|
287
|
-
else
|
288
|
-
puts "*** WARNING: File #{content_name}.tar.gz already exists in staged directory... keeping existing file. To overwrite, set reset_receipts arg to true ***"
|
289
|
-
end
|
290
|
-
else
|
291
|
-
BCL.tarball(destination, paths)
|
292
|
-
end
|
293
|
-
Dir.chdir(current_d)
|
294
|
-
end
|
295
|
-
puts '', "****STAGING DONE**** #{new_ones} new content, #{updates} updates, #{noops} skipped (already up-to-date on BCL)", ''
|
100
|
+
desc 'test component spreadsheet'
|
101
|
+
task :spreadsheet do
|
102
|
+
bclcomponents = BCL::ComponentFromSpreadsheet.new(File.expand_path('lib/files/Components.xls', __dir__), ['Roofing'])
|
103
|
+
bclcomponents.save(File.expand_path('lib/files/staged', __dir__))
|
296
104
|
end
|
297
105
|
end
|
298
106
|
|
data/bcl.gemspec
CHANGED
@@ -1,19 +1,23 @@
|
|
1
1
|
lib = File.expand_path('lib', __dir__)
|
2
|
-
$LOAD_PATH.unshift
|
3
|
-
|
2
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
3
|
require 'bcl/version'
|
5
4
|
|
6
5
|
Gem::Specification.new do |spec|
|
7
|
-
spec.name
|
8
|
-
spec.version
|
9
|
-
spec.platform
|
10
|
-
spec.authors
|
11
|
-
spec.email
|
6
|
+
spec.name = 'bcl'
|
7
|
+
spec.version = BCL::VERSION
|
8
|
+
spec.platform = Gem::Platform::RUBY
|
9
|
+
spec.authors = ['Daniel Macumber', 'Nicholas Long', 'Andrew Parker', 'Katherine Fleming']
|
10
|
+
spec.email = 'Nicholas.Long@nrel.gov'
|
12
11
|
|
13
|
-
spec.homepage
|
14
|
-
spec.summary
|
15
|
-
spec.description
|
16
|
-
spec.license
|
12
|
+
spec.homepage = 'http://bcl.nrel.gov'
|
13
|
+
spec.summary = 'Classes for creating component XML files and manageing measures for the BCL'
|
14
|
+
spec.description = 'This gem contains helper methods for generating the Component XML file needed to upload files to the Building Component Library. It also contains the classes needed for logging in via the api and uploading generating components and measures.'
|
15
|
+
spec.license = 'BSD'
|
16
|
+
spec.metadata = {
|
17
|
+
'bug_tracker_uri' => 'https://github.com/NREL/bcl-gem/issues',
|
18
|
+
'changelog_uri' => 'https://github.com/NREL/bcl-gem/blob/develop/CHANGELOG.md',
|
19
|
+
'source_code_uri' => "https://github.com/NREL/bcl-gem/tree/v#{spec.version}"
|
20
|
+
}
|
17
21
|
|
18
22
|
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
19
23
|
f.match(%r{^(test|spec|features)/})
|
@@ -22,18 +26,23 @@ Gem::Specification.new do |spec|
|
|
22
26
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
23
27
|
spec.require_paths = ['lib']
|
24
28
|
|
25
|
-
spec.required_ruby_version = '~> 2.
|
29
|
+
spec.required_ruby_version = '~> 3.2.2'
|
26
30
|
|
27
31
|
spec.add_dependency 'builder', '3.2.4'
|
28
32
|
spec.add_dependency 'faraday', '~> 1.0.1'
|
29
33
|
spec.add_dependency 'minitar', '~> 0.9'
|
34
|
+
|
30
35
|
# Measure tester is not used in this project, but this will force dependencies to match versions
|
31
|
-
# requested by OpenStudio.
|
32
|
-
spec.add_dependency 'openstudio_measure_tester', '~> 0.
|
33
|
-
spec.add_dependency 'rexml', '3.2.
|
34
|
-
spec.add_dependency 'rubyzip', '~> 2.3.
|
35
|
-
spec.add_dependency 'spreadsheet', '1.2.
|
36
|
+
# requested by OpenStudio. This includes dependencies for running tests/CI
|
37
|
+
spec.add_dependency 'openstudio_measure_tester', '~> 0.4.0'
|
38
|
+
spec.add_dependency 'rexml', '3.2.5'
|
39
|
+
spec.add_dependency 'rubyzip', '~> 2.3.2'
|
40
|
+
spec.add_dependency 'spreadsheet', '1.2.9'
|
36
41
|
spec.add_dependency 'uuid', '~> 2.3.9'
|
37
42
|
spec.add_dependency 'yamler', '0.1.0'
|
38
43
|
spec.add_dependency 'zliby', '0.0.5'
|
44
|
+
|
45
|
+
spec.add_development_dependency 'bundler', '2.4.10'
|
46
|
+
spec.add_development_dependency 'rake', '~> 13.0'
|
47
|
+
spec.add_development_dependency 'rspec', '~> 3.9'
|
39
48
|
end
|
data/lib/bcl/base_xml.rb
CHANGED
@@ -1,21 +1,7 @@
|
|
1
|
-
|
2
|
-
#
|
3
|
-
#
|
4
|
-
#
|
5
|
-
# This library is free software; you can redistribute it and/or
|
6
|
-
# modify it under the terms of the GNU Lesser General Public
|
7
|
-
# License as published by the Free Software Foundation; either
|
8
|
-
# version 2.1 of the License, or (at your option) any later version.
|
9
|
-
#
|
10
|
-
# This library is distributed in the hope that it will be useful,
|
11
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
13
|
-
# Lesser General Public License for more details.
|
14
|
-
#
|
15
|
-
# You should have received a copy of the GNU Lesser General Public
|
16
|
-
# License along with this library; if not, write to the Free Software
|
17
|
-
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
18
|
-
######################################################################
|
1
|
+
# *******************************************************************************
|
2
|
+
# OpenStudio(R), Copyright (c) Alliance for Sustainable Energy, LLC.
|
3
|
+
# See also https://openstudio.net/license
|
4
|
+
# *******************************************************************************
|
19
5
|
|
20
6
|
# KAF 2/13/2018
|
21
7
|
# This functionality is being kept in case we need in to recreate weather files in the future
|
data/lib/bcl/component.rb
CHANGED
@@ -1,21 +1,7 @@
|
|
1
|
-
|
2
|
-
#
|
3
|
-
#
|
4
|
-
#
|
5
|
-
# This library is free software; you can redistribute it and/or
|
6
|
-
# modify it under the terms of the GNU Lesser General Public
|
7
|
-
# License as published by the Free Software Foundation; either
|
8
|
-
# version 2.1 of the License, or (at your option) any later version.
|
9
|
-
#
|
10
|
-
# This library is distributed in the hope that it will be useful,
|
11
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
13
|
-
# Lesser General Public License for more details.
|
14
|
-
#
|
15
|
-
# You should have received a copy of the GNU Lesser General Public
|
16
|
-
# License along with this library; if not, write to the Free Software
|
17
|
-
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
18
|
-
######################################################################
|
1
|
+
# *******************************************************************************
|
2
|
+
# OpenStudio(R), Copyright (c) Alliance for Sustainable Energy, LLC.
|
3
|
+
# See also https://openstudio.net/license
|
4
|
+
# *******************************************************************************
|
19
5
|
|
20
6
|
# Provides programmatic access to the component.xsd schema needed for
|
21
7
|
# generating the component information that will be uploaded to
|
@@ -1,21 +1,7 @@
|
|
1
|
-
|
2
|
-
#
|
3
|
-
#
|
4
|
-
#
|
5
|
-
# This library is free software; you can redistribute it and/or
|
6
|
-
# modify it under the terms of the GNU Lesser General Public
|
7
|
-
# License as published by the Free Software Foundation; either
|
8
|
-
# version 2.1 of the License, or (at your option) any later version.
|
9
|
-
#
|
10
|
-
# This library is distributed in the hope that it will be useful,
|
11
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
13
|
-
# Lesser General Public License for more details.
|
14
|
-
#
|
15
|
-
# You should have received a copy of the GNU Lesser General Public
|
16
|
-
# License along with this library; if not, write to the Free Software
|
17
|
-
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
18
|
-
######################################################################
|
1
|
+
# *******************************************************************************
|
2
|
+
# OpenStudio(R), Copyright (c) Alliance for Sustainable Energy, LLC.
|
3
|
+
# See also https://openstudio.net/license
|
4
|
+
# *******************************************************************************
|
19
5
|
|
20
6
|
# Converts a custom Excel spreadsheet format to BCL components for upload
|
21
7
|
|