urbanopt-cli 0.2.0.pre6 → 0.2.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/pull_request_template.md +0 -1
- data/.rubocop.yml +9 -0
- data/CHANGELOG.md +30 -1
- data/Gemfile +8 -6
- data/README.md +23 -4
- data/Rakefile +4 -2
- data/bin/console +3 -3
- data/developer_nrel_key.rb +31 -0
- data/example_files/Gemfile +4 -4
- data/example_files/mappers/Baseline.rb +360 -204
- data/example_files/mappers/HighEfficiency.rb +25 -29
- data/example_files/mappers/base_workflow.osw +2 -2
- data/example_files/reopt/base_assumptions.json +146 -0
- data/example_files/reopt/multiPV_assumptions.json +181 -0
- data/lib/change_log.rb +9 -4
- data/lib/uo_cli/version.rb +1 -1
- data/lib/uo_cli.rb +345 -295
- data/uo_cli.gemspec +26 -26
- metadata +31 -13
@@ -1,32 +1,32 @@
|
|
1
|
-
|
2
|
-
# URBANopt, Copyright (c) 2019-2020, Alliance for Sustainable Energy, LLC, and other
|
1
|
+
# *********************************************************************************
|
2
|
+
# URBANopt, Copyright (c) 2019-2020, Alliance for Sustainable Energy, LLC, and other
|
3
3
|
# contributors. All rights reserved.
|
4
|
-
#
|
5
|
-
# Redistribution and use in source and binary forms, with or without modification,
|
4
|
+
#
|
5
|
+
# Redistribution and use in source and binary forms, with or without modification,
|
6
6
|
# are permitted provided that the following conditions are met:
|
7
|
-
#
|
8
|
-
# Redistributions of source code must retain the above copyright notice, this list
|
7
|
+
#
|
8
|
+
# Redistributions of source code must retain the above copyright notice, this list
|
9
9
|
# of conditions and the following disclaimer.
|
10
|
-
#
|
11
|
-
# Redistributions in binary form must reproduce the above copyright notice, this
|
12
|
-
# list of conditions and the following disclaimer in the documentation and/or other
|
10
|
+
#
|
11
|
+
# Redistributions in binary form must reproduce the above copyright notice, this
|
12
|
+
# list of conditions and the following disclaimer in the documentation and/or other
|
13
13
|
# materials provided with the distribution.
|
14
|
-
#
|
15
|
-
# Neither the name of the copyright holder nor the names of its contributors may be
|
16
|
-
# used to endorse or promote products derived from this software without specific
|
14
|
+
#
|
15
|
+
# Neither the name of the copyright holder nor the names of its contributors may be
|
16
|
+
# used to endorse or promote products derived from this software without specific
|
17
17
|
# prior written permission.
|
18
|
-
#
|
19
|
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
20
|
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
21
|
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
22
|
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
23
|
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
24
|
-
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
25
|
-
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
26
|
-
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
27
|
-
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
18
|
+
#
|
19
|
+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
20
|
+
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
21
|
+
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
22
|
+
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
23
|
+
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
24
|
+
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
25
|
+
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
26
|
+
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
27
|
+
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
28
28
|
# OF THE POSSIBILITY OF SUCH DAMAGE.
|
29
|
-
|
29
|
+
# *********************************************************************************
|
30
30
|
|
31
31
|
require 'urbanopt/scenario'
|
32
32
|
require 'openstudio/common_measures'
|
@@ -39,9 +39,7 @@ require 'json'
|
|
39
39
|
module URBANopt
|
40
40
|
module Scenario
|
41
41
|
class HighEfficiencyMapper < BaselineMapper
|
42
|
-
|
43
42
|
def create_osw(scenario, features, feature_names)
|
44
|
-
|
45
43
|
osw = super(scenario, features, feature_names)
|
46
44
|
|
47
45
|
OpenStudio::Extension.set_measure_argument(osw, 'IncreaseInsulationRValueForExteriorWalls', '__SKIP__', false)
|
@@ -53,10 +51,8 @@ module URBANopt
|
|
53
51
|
OpenStudio::Extension.set_measure_argument(osw, 'ReduceLightingLoadsByPercentage', '__SKIP__', false)
|
54
52
|
OpenStudio::Extension.set_measure_argument(osw, 'ReduceLightingLoadsByPercentage', 'lighting_power_reduction_percent', 10)
|
55
53
|
|
56
|
-
|
57
|
-
return osw
|
54
|
+
osw
|
58
55
|
end
|
59
|
-
|
60
56
|
end
|
61
57
|
end
|
62
|
-
end
|
58
|
+
end
|
@@ -10,8 +10,8 @@
|
|
10
10
|
"measure_dir_name": "set_run_period",
|
11
11
|
"arguments": {
|
12
12
|
"timesteps_per_hour": 4,
|
13
|
-
"begin_date": "2019-
|
14
|
-
"end_date": "2019-
|
13
|
+
"begin_date": "2019-01-01",
|
14
|
+
"end_date": "2019-12-31"
|
15
15
|
}
|
16
16
|
},{
|
17
17
|
"measure_dir_name": "ChangeBuildingLocation",
|
@@ -0,0 +1,146 @@
|
|
1
|
+
{
|
2
|
+
"Scenario": {
|
3
|
+
"Site": {
|
4
|
+
"Financial": {
|
5
|
+
"om_cost_escalation_pct": 0.025,
|
6
|
+
"escalation_pct": 0.023,
|
7
|
+
"offtaker_tax_pct": 0.26,
|
8
|
+
"offtaker_discount_pct": 0.083,
|
9
|
+
"analysis_years": 25,
|
10
|
+
"value_of_lost_load_us_dollars_per_kwh": 100,
|
11
|
+
"microgrid_upgrade_cost_pct": 0.3
|
12
|
+
},
|
13
|
+
"LoadProfile": {
|
14
|
+
"year": 2018,
|
15
|
+
"loads_kw_is_net": true,
|
16
|
+
"critical_loads_kw_is_net": false,
|
17
|
+
"critical_load_pct": 0.5,
|
18
|
+
"outage_is_major_event": true
|
19
|
+
},
|
20
|
+
"ElectricTariff": {
|
21
|
+
"add_blended_rates_to_urdb_rate": false,
|
22
|
+
"net_metering_limit_kw": 0,
|
23
|
+
"interconnection_limit_kw": 100000000.0,
|
24
|
+
"urdb_label": "5e162e2a5457a3d50873e3af"
|
25
|
+
},
|
26
|
+
"Wind": {
|
27
|
+
"min_kw": 0,
|
28
|
+
"max_kw": 0,
|
29
|
+
"installed_cost_us_dollars_per_kw": 3013,
|
30
|
+
"om_cost_us_dollars_per_kw": 40,
|
31
|
+
"macrs_option_years": 5,
|
32
|
+
"macrs_bonus_pct": 1,
|
33
|
+
"macrs_itc_reduction": 0.5,
|
34
|
+
"federal_itc_pct": 0.26,
|
35
|
+
"state_ibi_pct": 0,
|
36
|
+
"state_ibi_max_us_dollars": 10000000000.0,
|
37
|
+
"utility_ibi_pct": 0,
|
38
|
+
"utility_ibi_max_us_dollars": 10000000000.0,
|
39
|
+
"federal_rebate_us_dollars_per_kw": 0,
|
40
|
+
"state_rebate_us_dollars_per_kw": 0,
|
41
|
+
"state_rebate_max_us_dollars": 10000000000.0,
|
42
|
+
"utility_rebate_us_dollars_per_kw": 0,
|
43
|
+
"utility_rebate_max_us_dollars": 10000000000.0,
|
44
|
+
"pbi_us_dollars_per_kwh": 0,
|
45
|
+
"pbi_max_us_dollars": 1000000000.0,
|
46
|
+
"pbi_years": 1,
|
47
|
+
"pbi_system_max_kw": 1000000000.0
|
48
|
+
},
|
49
|
+
"PV": {
|
50
|
+
"pv_name": "Roof - South Face",
|
51
|
+
"location":"roof",
|
52
|
+
"existing_kw": 0,
|
53
|
+
"existing_kw": 0,
|
54
|
+
"min_kw": 0,
|
55
|
+
"max_kw": 1000000000.0,
|
56
|
+
"installed_cost_us_dollars_per_kw": 1600,
|
57
|
+
"om_cost_us_dollars_per_kw": 16,
|
58
|
+
"macrs_option_years": 5,
|
59
|
+
"macrs_bonus_pct": 1,
|
60
|
+
"macrs_itc_reduction": 0.5,
|
61
|
+
"federal_itc_pct": 0.26,
|
62
|
+
"state_ibi_pct": 0,
|
63
|
+
"state_ibi_max_us_dollars": 10000000000.0,
|
64
|
+
"utility_ibi_pct": 0,
|
65
|
+
"utility_ibi_max_us_dollars": 10000000000.0,
|
66
|
+
"federal_rebate_us_dollars_per_kw": 0,
|
67
|
+
"state_rebate_us_dollars_per_kw": 0,
|
68
|
+
"state_rebate_max_us_dollars": 10000000000.0,
|
69
|
+
"utility_rebate_us_dollars_per_kw": 0,
|
70
|
+
"utility_rebate_max_us_dollars": 10000000000.0,
|
71
|
+
"pbi_us_dollars_per_kwh": 0,
|
72
|
+
"pbi_max_us_dollars": 1000000000.0,
|
73
|
+
"pbi_years": 1,
|
74
|
+
"pbi_system_max_kw": 1000000000.0,
|
75
|
+
"degradation_pct": 0.005,
|
76
|
+
"azimuth": 180,
|
77
|
+
"losses": 0.14,
|
78
|
+
"array_type": 1,
|
79
|
+
"module_type": 0,
|
80
|
+
"gcr": 0.4,
|
81
|
+
"dc_ac_ratio": 1.2,
|
82
|
+
"inv_eff": 0.96,
|
83
|
+
"radius": 0,
|
84
|
+
"tilt": 0.537
|
85
|
+
},
|
86
|
+
"Storage": {
|
87
|
+
"min_kw": 0,
|
88
|
+
"max_kw": 1000000,
|
89
|
+
"min_kwh": 0,
|
90
|
+
"max_kwh": 1000000,
|
91
|
+
"internal_efficiency_pct": 0.975,
|
92
|
+
"inverter_efficiency_pct": 0.96,
|
93
|
+
"rectifier_efficiency_pct": 0.96,
|
94
|
+
"soc_min_pct": 0.2,
|
95
|
+
"soc_init_pct": 0.5,
|
96
|
+
"canGridCharge": true,
|
97
|
+
"installed_cost_us_dollars_per_kw": 840,
|
98
|
+
"installed_cost_us_dollars_per_kwh": 420,
|
99
|
+
"replace_cost_us_dollars_per_kw": 410,
|
100
|
+
"replace_cost_us_dollars_per_kwh": 200,
|
101
|
+
"inverter_replacement_year": 10,
|
102
|
+
"battery_replacement_year": 10,
|
103
|
+
"macrs_option_years": 7,
|
104
|
+
"macrs_bonus_pct": 1,
|
105
|
+
"macrs_itc_reduction": 0.5,
|
106
|
+
"total_itc_pct": 0.0,
|
107
|
+
"total_rebate_us_dollars_per_kw": 0
|
108
|
+
},
|
109
|
+
"Generator": {
|
110
|
+
"existing_kw": 0,
|
111
|
+
"min_kw": 0,
|
112
|
+
"max_kw": 1000000000.0,
|
113
|
+
"installed_cost_us_dollars_per_kw": 500,
|
114
|
+
"om_cost_us_dollars_per_kw": 10,
|
115
|
+
"om_cost_us_dollars_per_kwh": 0.0,
|
116
|
+
"diesel_fuel_cost_us_dollars_per_gallon": 3,
|
117
|
+
"fuel_slope_gal_per_kwh": 0.076,
|
118
|
+
"fuel_intercept_gal_per_hr": 0,
|
119
|
+
"fuel_avail_gal": 660,
|
120
|
+
"min_turn_down_pct": 0,
|
121
|
+
"generator_only_runs_during_grid_outage": true,
|
122
|
+
"generator_sells_energy_back_to_grid": false,
|
123
|
+
"macrs_option_years": 0,
|
124
|
+
"macrs_bonus_pct": 1,
|
125
|
+
"macrs_itc_reduction": 0,
|
126
|
+
"federal_itc_pct": 0,
|
127
|
+
"state_ibi_pct": 0,
|
128
|
+
"state_ibi_max_us_dollars": 0,
|
129
|
+
"utility_ibi_pct": 0,
|
130
|
+
"utility_ibi_max_us_dollars": 0,
|
131
|
+
"federal_rebate_us_dollars_per_kw": 0,
|
132
|
+
"state_rebate_us_dollars_per_kw": 0,
|
133
|
+
"state_rebate_max_us_dollars": 0,
|
134
|
+
"utility_rebate_us_dollars_per_kw": 0,
|
135
|
+
"utility_rebate_max_us_dollars": 0,
|
136
|
+
"pbi_us_dollars_per_kwh": 0,
|
137
|
+
"pbi_max_us_dollars": 0,
|
138
|
+
"pbi_years": 0,
|
139
|
+
"pbi_system_max_kw": 0
|
140
|
+
}
|
141
|
+
},
|
142
|
+
"timeout_seconds": 295,
|
143
|
+
"time_steps_per_hour": 1
|
144
|
+
}
|
145
|
+
}
|
146
|
+
|
@@ -0,0 +1,181 @@
|
|
1
|
+
{
|
2
|
+
"Scenario": {
|
3
|
+
"Site": {
|
4
|
+
"Financial": {
|
5
|
+
"om_cost_escalation_pct": 0.025,
|
6
|
+
"escalation_pct": 0.023,
|
7
|
+
"offtaker_tax_pct": 0.26,
|
8
|
+
"offtaker_discount_pct": 0.083,
|
9
|
+
"analysis_years": 25,
|
10
|
+
"value_of_lost_load_us_dollars_per_kwh": 100,
|
11
|
+
"microgrid_upgrade_cost_pct": 0.3
|
12
|
+
},
|
13
|
+
"LoadProfile": {
|
14
|
+
"year": 2018,
|
15
|
+
"loads_kw_is_net": true,
|
16
|
+
"critical_loads_kw_is_net": false,
|
17
|
+
"critical_load_pct": 0.5,
|
18
|
+
"outage_is_major_event": true
|
19
|
+
},
|
20
|
+
"ElectricTariff": {
|
21
|
+
"add_blended_rates_to_urdb_rate": false,
|
22
|
+
"net_metering_limit_kw": 0,
|
23
|
+
"interconnection_limit_kw": 100000000.0,
|
24
|
+
"urdb_label": "5e162e2a5457a3d50873e3af"
|
25
|
+
},
|
26
|
+
"Wind": {
|
27
|
+
"min_kw": 0,
|
28
|
+
"max_kw": 0,
|
29
|
+
"installed_cost_us_dollars_per_kw": 3013,
|
30
|
+
"om_cost_us_dollars_per_kw": 40,
|
31
|
+
"macrs_option_years": 5,
|
32
|
+
"macrs_bonus_pct": 1,
|
33
|
+
"macrs_itc_reduction": 0.5,
|
34
|
+
"federal_itc_pct": 0.26,
|
35
|
+
"state_ibi_pct": 0,
|
36
|
+
"state_ibi_max_us_dollars": 10000000000.0,
|
37
|
+
"utility_ibi_pct": 0,
|
38
|
+
"utility_ibi_max_us_dollars": 10000000000.0,
|
39
|
+
"federal_rebate_us_dollars_per_kw": 0,
|
40
|
+
"state_rebate_us_dollars_per_kw": 0,
|
41
|
+
"state_rebate_max_us_dollars": 10000000000.0,
|
42
|
+
"utility_rebate_us_dollars_per_kw": 0,
|
43
|
+
"utility_rebate_max_us_dollars": 10000000000.0,
|
44
|
+
"pbi_us_dollars_per_kwh": 0,
|
45
|
+
"pbi_max_us_dollars": 1000000000.0,
|
46
|
+
"pbi_years": 1,
|
47
|
+
"pbi_system_max_kw": 1000000000.0
|
48
|
+
},
|
49
|
+
"PV": [{
|
50
|
+
"pv_name": "Roof - South Face",
|
51
|
+
"location":"roof",
|
52
|
+
"existing_kw": 0,
|
53
|
+
"min_kw": 1.6,
|
54
|
+
"max_kw": 1000000000.0,
|
55
|
+
"installed_cost_us_dollars_per_kw": 1600,
|
56
|
+
"om_cost_us_dollars_per_kw": 16,
|
57
|
+
"macrs_option_years": 5,
|
58
|
+
"macrs_bonus_pct": 1,
|
59
|
+
"macrs_itc_reduction": 0.5,
|
60
|
+
"federal_itc_pct": 0.26,
|
61
|
+
"state_ibi_pct": 0,
|
62
|
+
"state_ibi_max_us_dollars": 10000000000.0,
|
63
|
+
"utility_ibi_pct": 0,
|
64
|
+
"utility_ibi_max_us_dollars": 10000000000.0,
|
65
|
+
"federal_rebate_us_dollars_per_kw": 0,
|
66
|
+
"state_rebate_us_dollars_per_kw": 0,
|
67
|
+
"state_rebate_max_us_dollars": 10000000000.0,
|
68
|
+
"utility_rebate_us_dollars_per_kw": 0,
|
69
|
+
"utility_rebate_max_us_dollars": 10000000000.0,
|
70
|
+
"pbi_us_dollars_per_kwh": 0,
|
71
|
+
"pbi_max_us_dollars": 1000000000.0,
|
72
|
+
"pbi_years": 1,
|
73
|
+
"pbi_system_max_kw": 1000000000.0,
|
74
|
+
"degradation_pct": 0.005,
|
75
|
+
"azimuth": 180,
|
76
|
+
"losses": 0.14,
|
77
|
+
"array_type": 1,
|
78
|
+
"module_type": 0,
|
79
|
+
"gcr": 0.4,
|
80
|
+
"dc_ac_ratio": 1.2,
|
81
|
+
"inv_eff": 0.96,
|
82
|
+
"radius": 0,
|
83
|
+
"tilt": 0.537
|
84
|
+
},
|
85
|
+
{
|
86
|
+
"pv_name": "Groundmount",
|
87
|
+
"location":"ground",
|
88
|
+
"existing_kw": 5,
|
89
|
+
"min_kw": 0,
|
90
|
+
"max_kw": 1000000000.0,
|
91
|
+
"installed_cost_us_dollars_per_kw": 2200,
|
92
|
+
"om_cost_us_dollars_per_kw": 16,
|
93
|
+
"macrs_option_years": 5,
|
94
|
+
"macrs_bonus_pct": 1,
|
95
|
+
"macrs_itc_reduction": 0.5,
|
96
|
+
"federal_itc_pct": 0.26,
|
97
|
+
"state_ibi_pct": 0,
|
98
|
+
"state_ibi_max_us_dollars": 10000000000.0,
|
99
|
+
"utility_ibi_pct": 0,
|
100
|
+
"utility_ibi_max_us_dollars": 10000000000.0,
|
101
|
+
"federal_rebate_us_dollars_per_kw": 0,
|
102
|
+
"state_rebate_us_dollars_per_kw": 0,
|
103
|
+
"state_rebate_max_us_dollars": 10000000000.0,
|
104
|
+
"utility_rebate_us_dollars_per_kw": 0,
|
105
|
+
"utility_rebate_max_us_dollars": 10000000000.0,
|
106
|
+
"pbi_us_dollars_per_kwh": 0,
|
107
|
+
"pbi_max_us_dollars": 1000000000.0,
|
108
|
+
"pbi_years": 1,
|
109
|
+
"pbi_system_max_kw": 1000000000.0,
|
110
|
+
"degradation_pct": 0.005,
|
111
|
+
"azimuth": 180,
|
112
|
+
"losses": 0.14,
|
113
|
+
"array_type": 0,
|
114
|
+
"module_type": 0,
|
115
|
+
"gcr": 0.4,
|
116
|
+
"dc_ac_ratio": 1.2,
|
117
|
+
"inv_eff": 0.96,
|
118
|
+
"radius": 0,
|
119
|
+
"tilt": 0.537
|
120
|
+
}],
|
121
|
+
"Storage": {
|
122
|
+
"min_kw": 0,
|
123
|
+
"max_kw": 1000000,
|
124
|
+
"min_kwh": 0,
|
125
|
+
"max_kwh": 1000000,
|
126
|
+
"internal_efficiency_pct": 0.975,
|
127
|
+
"inverter_efficiency_pct": 0.96,
|
128
|
+
"rectifier_efficiency_pct": 0.96,
|
129
|
+
"soc_min_pct": 0.2,
|
130
|
+
"soc_init_pct": 0.5,
|
131
|
+
"canGridCharge": true,
|
132
|
+
"installed_cost_us_dollars_per_kw": 840,
|
133
|
+
"installed_cost_us_dollars_per_kwh": 420,
|
134
|
+
"replace_cost_us_dollars_per_kw": 410,
|
135
|
+
"replace_cost_us_dollars_per_kwh": 200,
|
136
|
+
"inverter_replacement_year": 10,
|
137
|
+
"battery_replacement_year": 10,
|
138
|
+
"macrs_option_years": 7,
|
139
|
+
"macrs_bonus_pct": 1,
|
140
|
+
"macrs_itc_reduction": 0.5,
|
141
|
+
"total_itc_pct": 0.0,
|
142
|
+
"total_rebate_us_dollars_per_kw": 0
|
143
|
+
},
|
144
|
+
"Generator": {
|
145
|
+
"existing_kw": 0,
|
146
|
+
"min_kw": 0,
|
147
|
+
"max_kw": 1000000000.0,
|
148
|
+
"installed_cost_us_dollars_per_kw": 500,
|
149
|
+
"om_cost_us_dollars_per_kw": 10,
|
150
|
+
"om_cost_us_dollars_per_kwh": 0.0,
|
151
|
+
"diesel_fuel_cost_us_dollars_per_gallon": 3,
|
152
|
+
"fuel_slope_gal_per_kwh": 0.076,
|
153
|
+
"fuel_intercept_gal_per_hr": 0,
|
154
|
+
"fuel_avail_gal": 660,
|
155
|
+
"min_turn_down_pct": 0,
|
156
|
+
"generator_only_runs_during_grid_outage": true,
|
157
|
+
"generator_sells_energy_back_to_grid": false,
|
158
|
+
"macrs_option_years": 0,
|
159
|
+
"macrs_bonus_pct": 1,
|
160
|
+
"macrs_itc_reduction": 0,
|
161
|
+
"federal_itc_pct": 0,
|
162
|
+
"state_ibi_pct": 0,
|
163
|
+
"state_ibi_max_us_dollars": 0,
|
164
|
+
"utility_ibi_pct": 0,
|
165
|
+
"utility_ibi_max_us_dollars": 0,
|
166
|
+
"federal_rebate_us_dollars_per_kw": 0,
|
167
|
+
"state_rebate_us_dollars_per_kw": 0,
|
168
|
+
"state_rebate_max_us_dollars": 0,
|
169
|
+
"utility_rebate_us_dollars_per_kw": 0,
|
170
|
+
"utility_rebate_max_us_dollars": 0,
|
171
|
+
"pbi_us_dollars_per_kwh": 0,
|
172
|
+
"pbi_max_us_dollars": 0,
|
173
|
+
"pbi_years": 0,
|
174
|
+
"pbi_system_max_kw": 0
|
175
|
+
}
|
176
|
+
},
|
177
|
+
"timeout_seconds": 295,
|
178
|
+
"time_steps_per_hour": 1
|
179
|
+
}
|
180
|
+
}
|
181
|
+
|
data/lib/change_log.rb
CHANGED
@@ -7,6 +7,7 @@ require 'optparse/date'
|
|
7
7
|
|
8
8
|
# Instructions:
|
9
9
|
# Get a token from github's settings (https://github.com/settings/tokens)
|
10
|
+
# For security, set your token as an env variable. This script is prepared for one called GITHUB_CHANGELOG_TOKEN
|
10
11
|
#
|
11
12
|
# Example:
|
12
13
|
# ruby change_log.rb -t abcdefghijklmnopqrstuvwxyz -s 2017-09-06
|
@@ -14,13 +15,14 @@ require 'optparse/date'
|
|
14
15
|
|
15
16
|
options = {}
|
16
17
|
OptionParser.new do |opts|
|
17
|
-
opts.banner = "Usage: change_log.rb [options]\n"
|
18
|
-
|
19
|
-
opts.separator
|
18
|
+
opts.banner = "Usage: change_log.rb [options]\n" \
|
19
|
+
'Prints New, Open, Closed Issues, and number of accepted PRs'
|
20
|
+
opts.separator ''
|
20
21
|
|
21
22
|
# defaults, go back 90 days
|
22
23
|
options[:start_date] = Date.today - 90
|
23
|
-
|
24
|
+
# Add one day to end date to make it inclusive of current day.
|
25
|
+
options[:end_date] = Date.today + 1
|
24
26
|
|
25
27
|
opts.on('-s', '--start-date [DATE]', Date, 'Start of data (e.g. 2017-09-06)') do |v|
|
26
28
|
options[:start_date] = v
|
@@ -46,6 +48,9 @@ github = Github.new
|
|
46
48
|
if options[:token]
|
47
49
|
puts 'Using github token'
|
48
50
|
github = Github.new oauth_token: options[:token]
|
51
|
+
elsif ENV['GITHUB_CHANGELOG_TOKEN']
|
52
|
+
puts 'Using Github token from user environment'
|
53
|
+
github = Github.new oauth_token: ENV['GITHUB_CHANGELOG_TOKEN']
|
49
54
|
end
|
50
55
|
|
51
56
|
total_open_issues = []
|
data/lib/uo_cli/version.rb
CHANGED