urbanopt-geojson 0.2.0 → 0.3.0.pre1
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 +5 -5
- data/.rubocop.yml +1 -1
- data/CHANGELOG.md +12 -0
- data/Gemfile +0 -3
- data/Rakefile +1 -1
- data/lib/urbanopt/geojson/building.rb +2 -0
- data/lib/urbanopt/geojson/schema/building_properties.json +4 -0
- data/lib/urbanopt/geojson/version.rb +1 -1
- data/urbanopt-geojson-gem.gemspec +6 -7
- metadata +15 -31
- data/lib/change_log.rb +0 -147
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: c39b696dfeba6148591053638dfd4c67b4106738acd2d34e6406cca33165901f
|
4
|
+
data.tar.gz: 310869f65715b4ed07ca3354f437f5adaaadf66dcf6badaf51c857d045d850a2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e77fce00f95547496fde539cde2188c6321de99a9d3995d431925f5a2d3f6f94d60394c0f3ce6dbf4b359255a50e46819c9c787d1d7d46a41db171fa85e2be8b
|
7
|
+
data.tar.gz: b22042f699522747efc14258ca56e4a45135f05ca7a700e8b78f6ffc02632839ee8c2159f87dd859f7320c1ac575f8e6feb0c6dcc895eabcd546f964ce85f6c7
|
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,17 @@
|
|
1
1
|
# URBANopt GeoJSON Gem
|
2
2
|
|
3
|
+
## Version 0.3.0.pre1
|
4
|
+
|
5
|
+
Date Range 3/25/20 - 05/15/20
|
6
|
+
|
7
|
+
Updating to use with OpenStudio 3.0 and Ruby 2.5
|
8
|
+
|
9
|
+
Accepted Pull Requests: 5
|
10
|
+
- Fixed [#60]( https://github.com/urbanopt/urbanopt-geojson-gem/pull/60 ), HPXML-based workflow for residential buildings
|
11
|
+
- Fixed [#83]( https://github.com/urbanopt/urbanopt-geojson-gem/pull/83 ), Add new system types to building properties schema
|
12
|
+
- Fixed [#84]( https://github.com/urbanopt/urbanopt-geojson-gem/pull/84 ), Updated system types with OpenStudio
|
13
|
+
- Fixed [#87]( https://github.com/urbanopt/urbanopt-geojson-gem/pull/87 ), Adds nominal height for stories, test for confirming nominal height
|
14
|
+
|
3
15
|
## Version 0.2.0
|
4
16
|
|
5
17
|
Date Range: 12/26/19 - 03/25/20
|
data/Gemfile
CHANGED
@@ -22,6 +22,3 @@ if allow_local && File.exist?('../urbanopt-core-gem')
|
|
22
22
|
elsif allow_local
|
23
23
|
gem 'urbanopt-core', github: 'URBANopt/urbanopt-core-gem', branch: 'develop'
|
24
24
|
end
|
25
|
-
|
26
|
-
# simplecov has an unnecessary dependency on native json gem, use fork that does not require this
|
27
|
-
gem 'simplecov', github: 'NREL/simplecov'
|
data/Rakefile
CHANGED
@@ -37,7 +37,7 @@ RSpec::Core::RakeTask.new(:spec)
|
|
37
37
|
require 'openstudio/extension/rake_task'
|
38
38
|
require 'urbanopt/geojson'
|
39
39
|
rake_task = OpenStudio::Extension::RakeTask.new
|
40
|
-
rake_task.set_extension_class(URBANopt::GeoJSON::Extension)
|
40
|
+
rake_task.set_extension_class(URBANopt::GeoJSON::Extension, 'urbanopt/urbanopt-geojson-gem')
|
41
41
|
|
42
42
|
require 'rubocop/rake_task'
|
43
43
|
RuboCop::RakeTask.new
|
@@ -402,6 +402,8 @@ module URBANopt
|
|
402
402
|
|
403
403
|
building_story = OpenStudio::Model::BuildingStory.new(model)
|
404
404
|
building_story.setName("Building Story #{story_number}")
|
405
|
+
building_story.setNominalZCoordinate(story_number * floor_to_floor_height)
|
406
|
+
building_story.setNominalFloortoFloorHeight(floor_to_floor_height)
|
405
407
|
spaces.each do |space|
|
406
408
|
space.setBuildingStory(building_story)
|
407
409
|
thermal_zone = OpenStudio::Model::ThermalZone.new(model)
|
@@ -266,6 +266,7 @@
|
|
266
266
|
"PTAC with hot water heat",
|
267
267
|
"PTAC with hot water heat with central air source heat pump",
|
268
268
|
"PTAC with gas coil heat",
|
269
|
+
"PTAC with gas boiler",
|
269
270
|
"PTAC with electric baseboard heat",
|
270
271
|
"PTAC with no heat",
|
271
272
|
"PTAC with district hot water heat",
|
@@ -304,6 +305,7 @@
|
|
304
305
|
"DOAS with fan coil air-cooled chiller and central air source heat pump",
|
305
306
|
"DOAS with fan coil chiller with no heat",
|
306
307
|
"VRF with DOAS",
|
308
|
+
"VRF",
|
307
309
|
"Ground Source Heat Pumps with DOAS",
|
308
310
|
"Baseboard district hot water heat",
|
309
311
|
"Baseboard district hot water heat with direct evap coolers",
|
@@ -329,6 +331,8 @@
|
|
329
331
|
"VAV with zone unit heaters",
|
330
332
|
"VAV with electric baseboard heat",
|
331
333
|
"VAV cool with zone heat pump heat",
|
334
|
+
"VAV district chilled water with district hot water reheat",
|
335
|
+
"VAV district chilled water with gas coil reheat",
|
332
336
|
"PVAV with reheat",
|
333
337
|
"PVAV with reheat with central air source heat pump",
|
334
338
|
"PVAV with PFP boxes",
|
@@ -25,18 +25,17 @@ Gem::Specification.new do |spec|
|
|
25
25
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
26
26
|
spec.require_paths = ['lib']
|
27
27
|
|
28
|
-
|
29
|
-
# spec.required_ruby_version = '~> 2.2.4'
|
28
|
+
spec.required_ruby_version = '~> 2.5.0'
|
30
29
|
|
31
|
-
spec.add_development_dependency 'bundler', '~> 1
|
32
|
-
spec.add_development_dependency 'rake', '~>
|
30
|
+
spec.add_development_dependency 'bundler', '~> 2.1'
|
31
|
+
spec.add_development_dependency 'rake', '~> 13.0'
|
33
32
|
spec.add_development_dependency 'rspec', '~> 3.7'
|
34
33
|
|
35
34
|
# lock the version of these dependencies due to using older version of Ruby.
|
36
|
-
spec.add_dependency 'public_suffix', '3.1.1'
|
35
|
+
# spec.add_dependency 'public_suffix', '3.1.1'
|
37
36
|
|
38
37
|
# other dependencies
|
39
38
|
spec.add_dependency 'json-schema'
|
40
|
-
spec.add_dependency 'openstudio-extension', '~> 0.
|
41
|
-
spec.add_dependency 'urbanopt-core', '~> 0.
|
39
|
+
spec.add_dependency 'openstudio-extension', '~> 0.2.3'
|
40
|
+
spec.add_dependency 'urbanopt-core', '~> 0.3.0.pre2'
|
42
41
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: urbanopt-geojson
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0.pre1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tanushree Charan
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: exe
|
12
12
|
cert_chain: []
|
13
|
-
date: 2020-
|
13
|
+
date: 2020-05-16 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: bundler
|
@@ -18,28 +18,28 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - "~>"
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: '1
|
21
|
+
version: '2.1'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
25
|
requirements:
|
26
26
|
- - "~>"
|
27
27
|
- !ruby/object:Gem::Version
|
28
|
-
version: '1
|
28
|
+
version: '2.1'
|
29
29
|
- !ruby/object:Gem::Dependency
|
30
30
|
name: rake
|
31
31
|
requirement: !ruby/object:Gem::Requirement
|
32
32
|
requirements:
|
33
33
|
- - "~>"
|
34
34
|
- !ruby/object:Gem::Version
|
35
|
-
version: '
|
35
|
+
version: '13.0'
|
36
36
|
type: :development
|
37
37
|
prerelease: false
|
38
38
|
version_requirements: !ruby/object:Gem::Requirement
|
39
39
|
requirements:
|
40
40
|
- - "~>"
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version: '
|
42
|
+
version: '13.0'
|
43
43
|
- !ruby/object:Gem::Dependency
|
44
44
|
name: rspec
|
45
45
|
requirement: !ruby/object:Gem::Requirement
|
@@ -54,20 +54,6 @@ dependencies:
|
|
54
54
|
- - "~>"
|
55
55
|
- !ruby/object:Gem::Version
|
56
56
|
version: '3.7'
|
57
|
-
- !ruby/object:Gem::Dependency
|
58
|
-
name: public_suffix
|
59
|
-
requirement: !ruby/object:Gem::Requirement
|
60
|
-
requirements:
|
61
|
-
- - '='
|
62
|
-
- !ruby/object:Gem::Version
|
63
|
-
version: 3.1.1
|
64
|
-
type: :runtime
|
65
|
-
prerelease: false
|
66
|
-
version_requirements: !ruby/object:Gem::Requirement
|
67
|
-
requirements:
|
68
|
-
- - '='
|
69
|
-
- !ruby/object:Gem::Version
|
70
|
-
version: 3.1.1
|
71
57
|
- !ruby/object:Gem::Dependency
|
72
58
|
name: json-schema
|
73
59
|
requirement: !ruby/object:Gem::Requirement
|
@@ -88,28 +74,28 @@ dependencies:
|
|
88
74
|
requirements:
|
89
75
|
- - "~>"
|
90
76
|
- !ruby/object:Gem::Version
|
91
|
-
version: 0.
|
77
|
+
version: 0.2.3
|
92
78
|
type: :runtime
|
93
79
|
prerelease: false
|
94
80
|
version_requirements: !ruby/object:Gem::Requirement
|
95
81
|
requirements:
|
96
82
|
- - "~>"
|
97
83
|
- !ruby/object:Gem::Version
|
98
|
-
version: 0.
|
84
|
+
version: 0.2.3
|
99
85
|
- !ruby/object:Gem::Dependency
|
100
86
|
name: urbanopt-core
|
101
87
|
requirement: !ruby/object:Gem::Requirement
|
102
88
|
requirements:
|
103
89
|
- - "~>"
|
104
90
|
- !ruby/object:Gem::Version
|
105
|
-
version: 0.
|
91
|
+
version: 0.3.0.pre2
|
106
92
|
type: :runtime
|
107
93
|
prerelease: false
|
108
94
|
version_requirements: !ruby/object:Gem::Requirement
|
109
95
|
requirements:
|
110
96
|
- - "~>"
|
111
97
|
- !ruby/object:Gem::Version
|
112
|
-
version: 0.
|
98
|
+
version: 0.3.0.pre2
|
113
99
|
description: Library and measures to translate URBANopt GeoJSON format to OpenStudio
|
114
100
|
email:
|
115
101
|
- tanushree.charan@nrel.gov
|
@@ -169,7 +155,6 @@ files:
|
|
169
155
|
- docs/schemas/site-properties.md
|
170
156
|
- docs/schemas/thermal-connector-properties.md
|
171
157
|
- docs/schemas/thermal-junction-properties.md
|
172
|
-
- lib/change_log.rb
|
173
158
|
- lib/measures/.rubocop.yml
|
174
159
|
- lib/measures/urban_geometry_creation/LICENSE.md
|
175
160
|
- lib/measures/urban_geometry_creation/README.md
|
@@ -227,17 +212,16 @@ require_paths:
|
|
227
212
|
- lib
|
228
213
|
required_ruby_version: !ruby/object:Gem::Requirement
|
229
214
|
requirements:
|
230
|
-
- - "
|
215
|
+
- - "~>"
|
231
216
|
- !ruby/object:Gem::Version
|
232
|
-
version:
|
217
|
+
version: 2.5.0
|
233
218
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
234
219
|
requirements:
|
235
|
-
- - "
|
220
|
+
- - ">"
|
236
221
|
- !ruby/object:Gem::Version
|
237
|
-
version:
|
222
|
+
version: 1.3.1
|
238
223
|
requirements: []
|
239
|
-
|
240
|
-
rubygems_version: 2.4.5.1
|
224
|
+
rubygems_version: 3.1.2
|
241
225
|
signing_key:
|
242
226
|
specification_version: 4
|
243
227
|
summary: Library and measures to translate URBANopt GeoJSON format to OpenStudio
|
data/lib/change_log.rb
DELETED
@@ -1,147 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require 'github_api'
|
4
|
-
require 'date'
|
5
|
-
require 'optparse'
|
6
|
-
require 'optparse/date'
|
7
|
-
|
8
|
-
# Instructions:
|
9
|
-
# Get a token from github's settings (https://github.com/settings/tokens)
|
10
|
-
#
|
11
|
-
# Example:
|
12
|
-
# ruby change_log.rb -t abcdefghijklmnopqrstuvwxyz -s 2017-09-06
|
13
|
-
#
|
14
|
-
|
15
|
-
options = {}
|
16
|
-
OptionParser.new do |opts|
|
17
|
-
opts.banner = "Usage: change_log.rb [options]\n" \
|
18
|
-
'Prints New, Open, Closed Issues, and number of accepted PRs'
|
19
|
-
opts.separator ''
|
20
|
-
|
21
|
-
# defaults, go back 90 days
|
22
|
-
options[:start_date] = Date.today - 90
|
23
|
-
options[:end_date] = Date.today
|
24
|
-
|
25
|
-
opts.on('-s', '--start-date [DATE]', Date, 'Start of data (e.g. 2017-09-06)') do |v|
|
26
|
-
options[:start_date] = v
|
27
|
-
end
|
28
|
-
opts.on('-e', '--end-date [DATE]', Date, 'End of data (e.g. 2017-09-13)') do |v|
|
29
|
-
options[:end_date] = v
|
30
|
-
end
|
31
|
-
opts.on('-t', '--token [String]', String, 'Github API Token') do |v|
|
32
|
-
options[:token] = v
|
33
|
-
end
|
34
|
-
end.parse!
|
35
|
-
|
36
|
-
# Convert dates to time objects
|
37
|
-
options[:start_date] = Time.parse(options[:start_date].to_s)
|
38
|
-
options[:end_date] = Time.parse(options[:end_date].to_s)
|
39
|
-
puts options
|
40
|
-
|
41
|
-
### Repository options
|
42
|
-
repo_owner = 'URBANopt'
|
43
|
-
repo = 'urbanopt-geojson-gem'
|
44
|
-
|
45
|
-
github = Github.new
|
46
|
-
if options[:token]
|
47
|
-
puts 'Using github token'
|
48
|
-
github = Github.new oauth_token: options[:token]
|
49
|
-
end
|
50
|
-
|
51
|
-
total_open_issues = []
|
52
|
-
total_open_pull_requests = []
|
53
|
-
new_issues = []
|
54
|
-
closed_issues = []
|
55
|
-
accepted_pull_requests = []
|
56
|
-
|
57
|
-
def get_num(issue)
|
58
|
-
issue.html_url.split('/')[-1].to_i
|
59
|
-
end
|
60
|
-
|
61
|
-
def get_issue_num(issue)
|
62
|
-
"\##{get_num(issue)}"
|
63
|
-
end
|
64
|
-
|
65
|
-
def get_html_url(issue)
|
66
|
-
issue.html_url
|
67
|
-
end
|
68
|
-
|
69
|
-
def get_title(issue)
|
70
|
-
issue.title
|
71
|
-
end
|
72
|
-
|
73
|
-
def print_issue(issue)
|
74
|
-
is_feature = false
|
75
|
-
issue.labels.each { |label| is_feature = true if label.name == 'Feature Request' }
|
76
|
-
|
77
|
-
if is_feature
|
78
|
-
"- Improved [#{get_issue_num(issue)}]( #{get_html_url(issue)} ), #{get_title(issue)}"
|
79
|
-
else
|
80
|
-
"- Fixed [#{get_issue_num(issue)}]( #{get_html_url(issue)} ), #{get_title(issue)}"
|
81
|
-
end
|
82
|
-
end
|
83
|
-
|
84
|
-
# Process Open Issues
|
85
|
-
results = -1
|
86
|
-
page = 1
|
87
|
-
while results != 0
|
88
|
-
resp = github.issues.list user: repo_owner, repo: repo, sort: 'created', direction: 'asc',
|
89
|
-
state: 'open', per_page: 100, page: page
|
90
|
-
results = resp.length
|
91
|
-
resp.env[:body].each do |issue, _index|
|
92
|
-
created = Time.parse(issue.created_at)
|
93
|
-
if !issue.key?(:pull_request)
|
94
|
-
total_open_issues << issue
|
95
|
-
if created >= options[:start_date] && created <= options[:end_date]
|
96
|
-
new_issues << issue
|
97
|
-
end
|
98
|
-
else
|
99
|
-
total_open_pull_requests << issue
|
100
|
-
end
|
101
|
-
end
|
102
|
-
|
103
|
-
page += 1
|
104
|
-
end
|
105
|
-
|
106
|
-
# Process Closed Issues
|
107
|
-
results = -1
|
108
|
-
page = 1
|
109
|
-
while results != 0
|
110
|
-
resp = github.issues.list user: repo_owner, repo: repo, sort: 'created', direction: 'asc',
|
111
|
-
state: 'closed', per_page: 100, page: page
|
112
|
-
results = resp.length
|
113
|
-
resp.env[:body].each do |issue, _index|
|
114
|
-
created = Time.parse(issue.created_at)
|
115
|
-
closed = Time.parse(issue.closed_at)
|
116
|
-
if !issue.key?(:pull_request)
|
117
|
-
if created >= options[:start_date] && created <= options[:end_date]
|
118
|
-
new_issues << issue
|
119
|
-
end
|
120
|
-
if closed >= options[:start_date] && closed <= options[:end_date]
|
121
|
-
closed_issues << issue
|
122
|
-
end
|
123
|
-
elsif closed >= options[:start_date] && closed <= options[:end_date]
|
124
|
-
accepted_pull_requests << issue
|
125
|
-
end
|
126
|
-
end
|
127
|
-
|
128
|
-
page += 1
|
129
|
-
end
|
130
|
-
|
131
|
-
closed_issues.sort! { |x, y| get_num(x) <=> get_num(y) }
|
132
|
-
new_issues.sort! { |x, y| get_num(x) <=> get_num(y) }
|
133
|
-
accepted_pull_requests.sort! { |x, y| get_num(x) <=> get_num(y) }
|
134
|
-
total_open_pull_requests.sort! { |x, y| get_num(x) <=> get_num(y) }
|
135
|
-
|
136
|
-
puts "Total Open Issues: #{total_open_issues.length}"
|
137
|
-
puts "Total Open Pull Requests: #{total_open_pull_requests.length}"
|
138
|
-
puts "\nDate Range: #{options[:start_date].strftime('%m/%d/%y')} - #{options[:end_date].strftime('%m/%d/%y')}:"
|
139
|
-
puts "\nNew Issues: #{new_issues.length} (" + new_issues.map { |issue| get_issue_num(issue) }.join(', ') + ')'
|
140
|
-
|
141
|
-
puts "\nClosed Issues: #{closed_issues.length}"
|
142
|
-
closed_issues.each { |issue| puts print_issue(issue) }
|
143
|
-
|
144
|
-
puts "\nAccepted Pull Requests: #{accepted_pull_requests.length}"
|
145
|
-
accepted_pull_requests.each { |issue| puts print_issue(issue) }
|
146
|
-
|
147
|
-
puts "\nAll Open Issues: #{total_open_issues.length} (" + total_open_issues.map { |issue| get_issue_num(issue) }.join(', ') + ')'
|