urbanopt-core 0.3.0.pre1 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +28 -4
- data/CONTRIBUTING.md +1 -1
- data/Gemfile +1 -1
- data/Jenkinsfile +10 -0
- data/LICENSE.md +1 -1
- data/README.md +2 -2
- data/Rakefile +2 -2
- data/doc_templates/LICENSE.md +1 -1
- data/doc_templates/copyright_erb.txt +1 -1
- data/doc_templates/copyright_js.txt +1 -1
- data/doc_templates/copyright_ruby.txt +1 -1
- data/lib/urbanopt/core.rb +1 -1
- data/lib/urbanopt/core/extension.rb +1 -1
- data/lib/urbanopt/core/feature.rb +1 -1
- data/lib/urbanopt/core/feature_file.rb +1 -1
- data/lib/urbanopt/core/version.rb +2 -2
- data/urbanopt-core-gem.gemspec +1 -1
- metadata +8 -8
- data/lib/change_log.rb +0 -147
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fc861451111a90b47fc25545be97908a9495cc1db9b01cb946bbcbb1f401b783
|
4
|
+
data.tar.gz: f97df481fb8045490388a9e5d0d82bfd5b8682e14c2a299f640388358e1da36c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b759fcaea543f6070e2ddb79d9bbfa1891fde47a64f30f9eb18539681449cfd29bb8f59162ee9e22f02f48520e9934c1c6d881cf3eb4cd859a365179758b73ff
|
7
|
+
data.tar.gz: 44c52dfbe7ef3ca45923a2310b5e7fecec2f0e81461f160875ad5e89605b149b71a792e5537db06c8a76393c0f5afdfc8a53129a9a75ac54f5a131046b40720a
|
data/CHANGELOG.md
CHANGED
@@ -1,8 +1,32 @@
|
|
1
1
|
# URBANopt Core Gem
|
2
|
-
|
3
|
-
## Version 0.
|
2
|
+
|
3
|
+
## Version 0.5.1
|
4
|
+
|
5
|
+
Date Range: 11/26/20 - 12/08/20
|
6
|
+
|
7
|
+
- Fixed [#15]( https://github.com/urbanopt/urbanopt-core-gem/issues/15 ), Updated urbanopt-reopt-example-project to simulate and generate results for multiple PVs
|
8
|
+
- Fixed [#30]( https://github.com/urbanopt/urbanopt-core-gem/issues/30 ), Update extension-gem dependency
|
9
|
+
|
10
|
+
## Version 0.5.0
|
11
|
+
|
12
|
+
Date Range: 09/18/20 - 11/25/20
|
13
|
+
|
14
|
+
Updated dependencies for OpenStudio 3.1.0
|
15
|
+
|
16
|
+
## Version 0.4.0
|
17
|
+
|
18
|
+
Date Range: 06/05/20 - 09/17/20
|
19
|
+
|
20
|
+
- Fixed [#7]( https://github.com/urbanopt/urbanopt-core-gem/issues/7 ), Remove travis in favor of Jenkins
|
21
|
+
- Fixed [#24]( https://github.com/urbanopt/urbanopt-core-gem/issues/24 ), Chore: Add TM to first mention URBANopt on LICENSE file and LICENSE section
|
22
|
+
|
23
|
+
|
24
|
+
## Version 0.3.0
|
25
|
+
|
26
|
+
Date Range: 03/31/20 - 06/04/20
|
4
27
|
|
5
28
|
- Updated dependencies for ruby 2.5.x and OpenStudio 3.x
|
29
|
+
- Remove old changelog script functionality in favor of new extension-gem functionality (can be run via rake task)
|
6
30
|
|
7
31
|
## Version 0.2.0
|
8
32
|
|
@@ -19,7 +43,7 @@ Closed Issues and Features
|
|
19
43
|
|
20
44
|
* Update travis tests to include openstudio related tests
|
21
45
|
|
22
|
-
## Version 0.1.0
|
46
|
+
## Version 0.1.0
|
23
47
|
|
24
48
|
* Initial release of the URBANopt Core Extension
|
25
|
-
* Define the feature and feature_file that will be inherited.
|
49
|
+
* Define the feature and feature_file that will be inherited.
|
data/CONTRIBUTING.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
## Version 1.0
|
4
4
|
|
5
|
-
The URBANopt team welcomes your contribution to the project. You can contribute to the URBANopt project in several ways: by using the software, reporting issues, contributing documentation, or contributing code back to the project. The GitHub [Contributing to Open Source](https://opensource.guide/how-to-contribute/) guide provides a good overview. If you contribute code, you agree that your contribution may be incorporated into the URBANopt Software Development Kit (SDK) and made available under the URBANopt SDK license.
|
5
|
+
The URBANopt<sup>™</sup> team welcomes your contribution to the project. You can contribute to the URBANopt project in several ways: by using the software, reporting issues, contributing documentation, or contributing code back to the project. The GitHub [Contributing to Open Source](https://opensource.guide/how-to-contribute/) guide provides a good overview. If you contribute code, you agree that your contribution may be incorporated into the URBANopt Software Development Kit (SDK) and made available under the URBANopt SDK license.
|
6
6
|
|
7
7
|
The contribution process for URBANopt is composed of three steps:
|
8
8
|
|
data/Gemfile
CHANGED
@@ -14,5 +14,5 @@ allow_local = ENV['FAVOR_LOCAL_GEMS']
|
|
14
14
|
if allow_local && File.exist?('../OpenStudio-extension-gem')
|
15
15
|
gem 'openstudio-extension', path: '../OpenStudio-extension-gem'
|
16
16
|
elsif allow_local
|
17
|
-
|
17
|
+
gem 'openstudio-extension', github: 'NREL/OpenStudio-extension-gem', branch: 'develop'
|
18
18
|
end
|
data/Jenkinsfile
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
//Jenkins pipelines are stored in shared libraries. Please see: https://github.com/NREL/cbci_jenkins_libs
|
2
|
+
|
3
|
+
@Library('cbci_shared_libs') _
|
4
|
+
|
5
|
+
// Build for PR to develop branch only.
|
6
|
+
if ((env.CHANGE_ID) && (env.CHANGE_TARGET) ) { // check if set
|
7
|
+
|
8
|
+
openstudio_urbanopt_extension_gems()
|
9
|
+
|
10
|
+
}
|
data/LICENSE.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
URBANopt
|
1
|
+
URBANopt<sup>™</sup>, Copyright (c) 2019-2020, 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/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# URBANopt Core
|
2
2
|
|
3
|
-
URBANopt core libraries and measures.
|
3
|
+
URBANopt<sup>TM</sup> core libraries and measures.
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
@@ -29,4 +29,4 @@ This Extension Gem stores the base information needed for all derivative URBANop
|
|
29
29
|
* Update version in `/lib/urbanopt/core/version.rb`
|
30
30
|
* Create PR to master, after tests and reviews complete, then merge
|
31
31
|
* Locally - from the master branch, run `rake release`
|
32
|
-
& On GitHub, go to the releases page and update the latest release tag. Name it “Version x.y.z” and copy the CHANGELOG entry into the description box.
|
32
|
+
& On GitHub, go to the releases page and update the latest release tag. Name it “Version x.y.z” and copy the CHANGELOG entry into the description box.
|
data/Rakefile
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# *********************************************************************************
|
2
|
-
# URBANopt
|
2
|
+
# URBANopt™, Copyright (c) 2019-2020, Alliance for Sustainable Energy, LLC, and other
|
3
3
|
# contributors. All rights reserved.
|
4
4
|
#
|
5
5
|
# Redistribution and use in source and binary forms, with or without modification,
|
@@ -37,7 +37,7 @@ RSpec::Core::RakeTask.new(:spec)
|
|
37
37
|
require 'openstudio/extension/rake_task'
|
38
38
|
require 'urbanopt/core'
|
39
39
|
rake_task = OpenStudio::Extension::RakeTask.new
|
40
|
-
rake_task.set_extension_class(URBANopt::Core::Extension)
|
40
|
+
rake_task.set_extension_class(URBANopt::Core::Extension, 'urbanopt/urbanopt-core-gem')
|
41
41
|
|
42
42
|
require 'rubocop/rake_task'
|
43
43
|
RuboCop::RakeTask.new
|
data/doc_templates/LICENSE.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
URBANopt
|
1
|
+
URBANopt™, Copyright (c) 2019-2020, 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
|
3
|
+
# URBANopt™, Copyright (c) 2019-2020, 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,
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/* @preserve
|
2
|
-
* URBANopt
|
2
|
+
* URBANopt™, Copyright (c) 2019-2020, Alliance for Sustainable Energy, LLC, and other contributors. All rights reserved.
|
3
3
|
* Use of this source code is governed by the BSD 3-Clause license.
|
4
4
|
*/
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# *********************************************************************************
|
2
|
-
# URBANopt
|
2
|
+
# URBANopt™, Copyright (c) 2019-2020, Alliance for Sustainable Energy, LLC, and other
|
3
3
|
# contributors. All rights reserved.
|
4
4
|
#
|
5
5
|
# Redistribution and use in source and binary forms, with or without modification,
|
data/lib/urbanopt/core.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# *********************************************************************************
|
2
|
-
# URBANopt
|
2
|
+
# URBANopt™, Copyright (c) 2019-2020, Alliance for Sustainable Energy, LLC, and other
|
3
3
|
# contributors. All rights reserved.
|
4
4
|
#
|
5
5
|
# Redistribution and use in source and binary forms, with or without modification,
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# *********************************************************************************
|
2
|
-
# URBANopt
|
2
|
+
# URBANopt™, Copyright (c) 2019-2020, Alliance for Sustainable Energy, LLC, and other
|
3
3
|
# contributors. All rights reserved.
|
4
4
|
#
|
5
5
|
# Redistribution and use in source and binary forms, with or without modification,
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# *********************************************************************************
|
2
|
-
# URBANopt
|
2
|
+
# URBANopt™, Copyright (c) 2019-2020, Alliance for Sustainable Energy, LLC, and other
|
3
3
|
# contributors. All rights reserved.
|
4
4
|
#
|
5
5
|
# Redistribution and use in source and binary forms, with or without modification,
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# *********************************************************************************
|
2
|
-
# URBANopt
|
2
|
+
# URBANopt™, Copyright (c) 2019-2020, Alliance for Sustainable Energy, LLC, and other
|
3
3
|
# contributors. All rights reserved.
|
4
4
|
#
|
5
5
|
# Redistribution and use in source and binary forms, with or without modification,
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# *********************************************************************************
|
2
|
-
# URBANopt
|
2
|
+
# URBANopt™, Copyright (c) 2019-2020, Alliance for Sustainable Energy, LLC, and other
|
3
3
|
# contributors. All rights reserved.
|
4
4
|
#
|
5
5
|
# Redistribution and use in source and binary forms, with or without modification,
|
@@ -30,6 +30,6 @@
|
|
30
30
|
|
31
31
|
module URBANopt
|
32
32
|
module Core
|
33
|
-
VERSION = '0.
|
33
|
+
VERSION = '0.5.1'.freeze
|
34
34
|
end
|
35
35
|
end
|
data/urbanopt-core-gem.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: urbanopt-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dan Macumber
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2020-
|
12
|
+
date: 2020-12-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -59,14 +59,14 @@ dependencies:
|
|
59
59
|
requirements:
|
60
60
|
- - "~>"
|
61
61
|
- !ruby/object:Gem::Version
|
62
|
-
version: 0.2
|
62
|
+
version: 0.3.2
|
63
63
|
type: :runtime
|
64
64
|
prerelease: false
|
65
65
|
version_requirements: !ruby/object:Gem::Requirement
|
66
66
|
requirements:
|
67
67
|
- - "~>"
|
68
68
|
- !ruby/object:Gem::Version
|
69
|
-
version: 0.2
|
69
|
+
version: 0.3.2
|
70
70
|
description: URBANopt core library and measures
|
71
71
|
email:
|
72
72
|
- nicholas.long@nrel.gov
|
@@ -81,6 +81,7 @@ files:
|
|
81
81
|
- CHANGELOG.md
|
82
82
|
- CONTRIBUTING.md
|
83
83
|
- Gemfile
|
84
|
+
- Jenkinsfile
|
84
85
|
- LICENSE.md
|
85
86
|
- README.md
|
86
87
|
- Rakefile
|
@@ -89,7 +90,6 @@ files:
|
|
89
90
|
- doc_templates/copyright_erb.txt
|
90
91
|
- doc_templates/copyright_js.txt
|
91
92
|
- doc_templates/copyright_ruby.txt
|
92
|
-
- lib/change_log.rb
|
93
93
|
- lib/measures/.gitkeep
|
94
94
|
- lib/urbanopt/core.rb
|
95
95
|
- lib/urbanopt/core/extension.rb
|
@@ -111,11 +111,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
111
111
|
version: 2.5.0
|
112
112
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
113
113
|
requirements:
|
114
|
-
- - "
|
114
|
+
- - ">="
|
115
115
|
- !ruby/object:Gem::Version
|
116
|
-
version:
|
116
|
+
version: '0'
|
117
117
|
requirements: []
|
118
|
-
rubygems_version: 3.1.
|
118
|
+
rubygems_version: 3.1.4
|
119
119
|
signing_key:
|
120
120
|
specification_version: 4
|
121
121
|
summary: URBANopt core library and measures
|
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-core-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(', ') + ')'
|