bcl 0.7.1 → 0.8.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/CHANGELOG.md +9 -0
- data/LICENSE.md +1 -1
- data/Rakefile +37 -264
- data/bcl.gemspec +3 -3
- data/lib/bcl/base_xml.rb +2 -32
- data/lib/bcl/component.rb +2 -32
- data/lib/bcl/component_from_spreadsheet.rb +2 -32
- data/lib/bcl/component_methods.rb +61 -441
- data/lib/bcl/core_ext.rb +2 -32
- data/lib/bcl/tar_ball.rb +2 -66
- data/lib/bcl/version.rb +3 -33
- data/lib/bcl.rb +2 -32
- data/schemas/v3/measure_v3.xsd +1 -6
- metadata +24 -10
data/lib/bcl/tar_ball.rb
CHANGED
@@ -1,81 +1,17 @@
|
|
1
1
|
# *******************************************************************************
|
2
|
-
# OpenStudio(R), Copyright (c)
|
3
|
-
#
|
4
|
-
# Redistribution and use in source and binary forms, with or without
|
5
|
-
# modification, are permitted provided that the following conditions are met:
|
6
|
-
#
|
7
|
-
# (1) Redistributions of source code must retain the above copyright notice,
|
8
|
-
# this list of conditions and the following disclaimer.
|
9
|
-
#
|
10
|
-
# (2) Redistributions in binary form must reproduce the above copyright notice,
|
11
|
-
# this list of conditions and the following disclaimer in the documentation
|
12
|
-
# and/or other materials provided with the distribution.
|
13
|
-
#
|
14
|
-
# (3) Neither the name of the copyright holder nor the names of any contributors
|
15
|
-
# may be used to endorse or promote products derived from this software without
|
16
|
-
# specific prior written permission from the respective party.
|
17
|
-
#
|
18
|
-
# (4) Other than as required in clauses (1) and (2), distributions in any form
|
19
|
-
# of modifications or other derivative works may not use the "OpenStudio"
|
20
|
-
# trademark, "OS", "os", or any other confusingly similar designation without
|
21
|
-
# specific prior written permission from Alliance for Sustainable Energy, LLC.
|
22
|
-
#
|
23
|
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND ANY CONTRIBUTORS
|
24
|
-
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
25
|
-
# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
26
|
-
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER(S), ANY CONTRIBUTORS, THE
|
27
|
-
# UNITED STATES GOVERNMENT, OR THE UNITED STATES DEPARTMENT OF ENERGY, NOR ANY OF
|
28
|
-
# THEIR EMPLOYEES, BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
29
|
-
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
30
|
-
# OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
31
|
-
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
32
|
-
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
33
|
-
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
2
|
+
# OpenStudio(R), Copyright (c) Alliance for Sustainable Energy, LLC.
|
3
|
+
# See also https://openstudio.net/license
|
34
4
|
# *******************************************************************************
|
35
5
|
|
36
6
|
module BCL
|
37
7
|
module_function
|
38
8
|
|
39
|
-
# tarball multiple paths recursively to destination
|
40
|
-
def tarball(destination, paths)
|
41
|
-
# check for filepath length limit
|
42
|
-
full_destination = File.expand_path(destination)
|
43
|
-
if full_destination.length > 259 # 256 chars max; "C:\" doesn't count
|
44
|
-
puts "[TarBall] ERROR cannot generate #{destination} because path exceeds 256 char limit. shorten component name by at least by #{full_destination.length - 259} chars"
|
45
|
-
return
|
46
|
-
end
|
47
|
-
|
48
|
-
Zlib::GzipWriter.open(destination) do |gzip|
|
49
|
-
out = Archive::Tar::Minitar::Output.new(gzip)
|
50
|
-
|
51
|
-
paths.each do |fi|
|
52
|
-
if File.exist?(fi)
|
53
|
-
Archive::Tar::Minitar.pack_file(fi, out)
|
54
|
-
else
|
55
|
-
puts "[TarBall] ERROR Could not file file: #{fi}"
|
56
|
-
end
|
57
|
-
end
|
58
|
-
out.close
|
59
|
-
end
|
60
|
-
end
|
61
|
-
|
62
9
|
def extract_tarball(filename, destination)
|
63
10
|
Zlib::GzipReader.open(filename) do |gz|
|
64
11
|
Archive::Tar::Minitar.unpack(gz, destination)
|
65
12
|
end
|
66
13
|
end
|
67
14
|
|
68
|
-
def create_zip(_destination, paths)
|
69
|
-
Zip::File.open(zipfile_name, Zip::File::CREATE) do |zipfile|
|
70
|
-
paths.each do |fi|
|
71
|
-
# Two arguments:
|
72
|
-
# - The name of the file as it will appear in the archive
|
73
|
-
# - The original file, including the path to find it
|
74
|
-
zipfile.add(fi.basename, fi)
|
75
|
-
end
|
76
|
-
end
|
77
|
-
end
|
78
|
-
|
79
15
|
def extract_zip(filename, destination, delete_zip = false)
|
80
16
|
Zip::File.open(filename) do |zip_file|
|
81
17
|
zip_file.each do |f|
|
data/lib/bcl/version.rb
CHANGED
@@ -1,38 +1,8 @@
|
|
1
1
|
# *******************************************************************************
|
2
|
-
# OpenStudio(R), Copyright (c)
|
3
|
-
#
|
4
|
-
# Redistribution and use in source and binary forms, with or without
|
5
|
-
# modification, are permitted provided that the following conditions are met:
|
6
|
-
#
|
7
|
-
# (1) Redistributions of source code must retain the above copyright notice,
|
8
|
-
# this list of conditions and the following disclaimer.
|
9
|
-
#
|
10
|
-
# (2) Redistributions in binary form must reproduce the above copyright notice,
|
11
|
-
# this list of conditions and the following disclaimer in the documentation
|
12
|
-
# and/or other materials provided with the distribution.
|
13
|
-
#
|
14
|
-
# (3) Neither the name of the copyright holder nor the names of any contributors
|
15
|
-
# may be used to endorse or promote products derived from this software without
|
16
|
-
# specific prior written permission from the respective party.
|
17
|
-
#
|
18
|
-
# (4) Other than as required in clauses (1) and (2), distributions in any form
|
19
|
-
# of modifications or other derivative works may not use the "OpenStudio"
|
20
|
-
# trademark, "OS", "os", or any other confusingly similar designation without
|
21
|
-
# specific prior written permission from Alliance for Sustainable Energy, LLC.
|
22
|
-
#
|
23
|
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND ANY CONTRIBUTORS
|
24
|
-
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
25
|
-
# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
26
|
-
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER(S), ANY CONTRIBUTORS, THE
|
27
|
-
# UNITED STATES GOVERNMENT, OR THE UNITED STATES DEPARTMENT OF ENERGY, NOR ANY OF
|
28
|
-
# THEIR EMPLOYEES, BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
29
|
-
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
30
|
-
# OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
31
|
-
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
32
|
-
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
33
|
-
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
2
|
+
# OpenStudio(R), Copyright (c) Alliance for Sustainable Energy, LLC.
|
3
|
+
# See also https://openstudio.net/license
|
34
4
|
# *******************************************************************************
|
35
5
|
|
36
6
|
module BCL
|
37
|
-
VERSION = '0.
|
7
|
+
VERSION = '0.8.0'.freeze
|
38
8
|
end
|
data/lib/bcl.rb
CHANGED
@@ -1,36 +1,6 @@
|
|
1
1
|
# *******************************************************************************
|
2
|
-
# OpenStudio(R), Copyright (c)
|
3
|
-
#
|
4
|
-
# Redistribution and use in source and binary forms, with or without
|
5
|
-
# modification, are permitted provided that the following conditions are met:
|
6
|
-
#
|
7
|
-
# (1) Redistributions of source code must retain the above copyright notice,
|
8
|
-
# this list of conditions and the following disclaimer.
|
9
|
-
#
|
10
|
-
# (2) Redistributions in binary form must reproduce the above copyright notice,
|
11
|
-
# this list of conditions and the following disclaimer in the documentation
|
12
|
-
# and/or other materials provided with the distribution.
|
13
|
-
#
|
14
|
-
# (3) Neither the name of the copyright holder nor the names of any contributors
|
15
|
-
# may be used to endorse or promote products derived from this software without
|
16
|
-
# specific prior written permission from the respective party.
|
17
|
-
#
|
18
|
-
# (4) Other than as required in clauses (1) and (2), distributions in any form
|
19
|
-
# of modifications or other derivative works may not use the "OpenStudio"
|
20
|
-
# trademark, "OS", "os", or any other confusingly similar designation without
|
21
|
-
# specific prior written permission from Alliance for Sustainable Energy, LLC.
|
22
|
-
#
|
23
|
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND ANY CONTRIBUTORS
|
24
|
-
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
25
|
-
# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
26
|
-
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER(S), ANY CONTRIBUTORS, THE
|
27
|
-
# UNITED STATES GOVERNMENT, OR THE UNITED STATES DEPARTMENT OF ENERGY, NOR ANY OF
|
28
|
-
# THEIR EMPLOYEES, BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
29
|
-
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
30
|
-
# OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
31
|
-
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
32
|
-
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
33
|
-
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
2
|
+
# OpenStudio(R), Copyright (c) Alliance for Sustainable Energy, LLC.
|
3
|
+
# See also https://openstudio.net/license
|
34
4
|
# *******************************************************************************
|
35
5
|
|
36
6
|
require 'pathname'
|
data/schemas/v3/measure_v3.xsd
CHANGED
@@ -145,11 +145,6 @@
|
|
145
145
|
<xs:documentation>maximum value</xs:documentation>
|
146
146
|
</xs:annotation>
|
147
147
|
</xs:element>
|
148
|
-
<xs:element name="model_dependent" type="xs:boolean" default="false">
|
149
|
-
<xs:annotation>
|
150
|
-
<xs:documentation>true if any of this argument's properties depend on the specific model used. default_value, choice_values, min_value, and max_value will not be populated for dynamic arguments</xs:documentation>
|
151
|
-
</xs:annotation>
|
152
|
-
</xs:element>
|
153
148
|
</xs:sequence>
|
154
149
|
</xs:complexType>
|
155
150
|
</xs:element>
|
@@ -444,11 +439,11 @@
|
|
444
439
|
<xs:element ref="description"/>
|
445
440
|
<xs:element ref="modeler_description"/>
|
446
441
|
<xs:element ref="arguments"/>
|
442
|
+
<xs:element ref="outputs"/>
|
447
443
|
<xs:element ref="provenances"/>
|
448
444
|
<xs:element ref="tags"/>
|
449
445
|
<xs:element ref="attributes"/>
|
450
446
|
<xs:element ref="files"/>
|
451
|
-
<xs:element ref="outputs"/>
|
452
447
|
</xs:sequence>
|
453
448
|
</xs:complexType>
|
454
449
|
</xs:element>
|
metadata
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bcl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Macumber
|
8
8
|
- Nicholas Long
|
9
9
|
- Andrew Parker
|
10
10
|
- Katherine Fleming
|
11
|
-
autorequire:
|
11
|
+
autorequire:
|
12
12
|
bindir: exe
|
13
13
|
cert_chain: []
|
14
|
-
date:
|
14
|
+
date: 2024-05-03 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: builder
|
@@ -61,14 +61,14 @@ dependencies:
|
|
61
61
|
requirements:
|
62
62
|
- - "~>"
|
63
63
|
- !ruby/object:Gem::Version
|
64
|
-
version: 0.
|
64
|
+
version: 0.4.0
|
65
65
|
type: :runtime
|
66
66
|
prerelease: false
|
67
67
|
version_requirements: !ruby/object:Gem::Requirement
|
68
68
|
requirements:
|
69
69
|
- - "~>"
|
70
70
|
- !ruby/object:Gem::Version
|
71
|
-
version: 0.
|
71
|
+
version: 0.4.0
|
72
72
|
- !ruby/object:Gem::Dependency
|
73
73
|
name: rexml
|
74
74
|
requirement: !ruby/object:Gem::Requirement
|
@@ -153,6 +153,20 @@ dependencies:
|
|
153
153
|
- - '='
|
154
154
|
- !ruby/object:Gem::Version
|
155
155
|
version: 0.0.5
|
156
|
+
- !ruby/object:Gem::Dependency
|
157
|
+
name: bundler
|
158
|
+
requirement: !ruby/object:Gem::Requirement
|
159
|
+
requirements:
|
160
|
+
- - '='
|
161
|
+
- !ruby/object:Gem::Version
|
162
|
+
version: 2.4.10
|
163
|
+
type: :development
|
164
|
+
prerelease: false
|
165
|
+
version_requirements: !ruby/object:Gem::Requirement
|
166
|
+
requirements:
|
167
|
+
- - '='
|
168
|
+
- !ruby/object:Gem::Version
|
169
|
+
version: 2.4.10
|
156
170
|
- !ruby/object:Gem::Dependency
|
157
171
|
name: rake
|
158
172
|
requirement: !ruby/object:Gem::Requirement
|
@@ -219,8 +233,8 @@ licenses:
|
|
219
233
|
metadata:
|
220
234
|
bug_tracker_uri: https://github.com/NREL/bcl-gem/issues
|
221
235
|
changelog_uri: https://github.com/NREL/bcl-gem/blob/develop/CHANGELOG.md
|
222
|
-
source_code_uri: https://github.com/NREL/bcl-gem/tree/v0.
|
223
|
-
post_install_message:
|
236
|
+
source_code_uri: https://github.com/NREL/bcl-gem/tree/v0.8.0
|
237
|
+
post_install_message:
|
224
238
|
rdoc_options: []
|
225
239
|
require_paths:
|
226
240
|
- lib
|
@@ -228,15 +242,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
228
242
|
requirements:
|
229
243
|
- - "~>"
|
230
244
|
- !ruby/object:Gem::Version
|
231
|
-
version: 2.
|
245
|
+
version: 3.2.2
|
232
246
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
233
247
|
requirements:
|
234
248
|
- - ">="
|
235
249
|
- !ruby/object:Gem::Version
|
236
250
|
version: '0'
|
237
251
|
requirements: []
|
238
|
-
rubygems_version: 3.
|
239
|
-
signing_key:
|
252
|
+
rubygems_version: 3.4.10
|
253
|
+
signing_key:
|
240
254
|
specification_version: 4
|
241
255
|
summary: Classes for creating component XML files and manageing measures for the BCL
|
242
256
|
test_files: []
|