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
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2408b4efcec3352931f0121fabf1459e66cdfff4
|
4
|
+
data.tar.gz: 6a2b3d67fdeacdedf0ffaa2d5bd36410ce72beeb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bd54c28dc9e62e070e8074ef1cef135b9ed6241d8412e5c21764042b1ebe51f27d14e068eba4cc798f63a334b30466c4cf7d08f38a84ecb960053c5e29b7d129
|
7
|
+
data.tar.gz: 40bdf1d80b2d484c56659b9ebe63fa297979eb5b205ddea65b446e81e6df6e25fda65f00e2868d787b0a517664bcfafae9a556cacef3482947b680e2b9e3db32
|
@@ -7,7 +7,6 @@
|
|
7
7
|
### Checklist (Delete lines that don't apply)
|
8
8
|
|
9
9
|
- [ ] Unit tests have been added or updated
|
10
|
-
- [ ] Documentation has been modified appropriately
|
11
10
|
- [ ] All ci tests pass (green)
|
12
11
|
- [ ] An [ISSUE](https://github.com/urbanopt/urbanopt-cli/issues) has been created that this is addressing. Issues will get added to the Change Log when the change_log.rb script is run
|
13
12
|
- [ ] This branch is up-to-date with develop
|
data/.rubocop.yml
ADDED
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,34 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## Version 0.2.0
|
4
|
+
|
5
|
+
Date Range: 02/14/20 - 03/31/20
|
6
|
+
|
7
|
+
- Fixed [#2]( https://github.com/urbanopt/urbanopt-cli/issues/2 ), Feature Request: Have this gem get pre-installed
|
8
|
+
- Fixed [#4]( https://github.com/urbanopt/urbanopt-cli/issues/4 ), Remove example-geojson-project repo
|
9
|
+
- Fixed [#9]( https://github.com/urbanopt/urbanopt-cli/issues/9 ), Update copyrights
|
10
|
+
- Fixed [#10]( https://github.com/urbanopt/urbanopt-cli/issues/10 ), Add --version flag
|
11
|
+
- Fixed [#12]( https://github.com/urbanopt/urbanopt-cli/issues/12 ), Support ReOpt workflow
|
12
|
+
- Fixed [#16]( https://github.com/urbanopt/urbanopt-cli/issues/16 ), Remove travis file
|
13
|
+
- Fixed [#19]( https://github.com/urbanopt/urbanopt-cli/issues/19 ), Rack version must be <2.2
|
14
|
+
- Fixed [#20]( https://github.com/urbanopt/urbanopt-cli/issues/20 ), Simplecov is an unnecessary dependency
|
15
|
+
- Fixed [#22]( https://github.com/urbanopt/urbanopt-cli/issues/22 ), Run a single datapoint
|
16
|
+
- Fixed [#25]( https://github.com/urbanopt/urbanopt-cli/issues/25 ), Add ability for CLI to generate config file
|
17
|
+
- Fixed [#26]( https://github.com/urbanopt/urbanopt-cli/issues/26 ), Using weekday start time in example mapper
|
18
|
+
- Fixed [#39]( https://github.com/urbanopt/urbanopt-cli/issues/39 ), PR template shouldn't ask for Changelog updates
|
19
|
+
- Fixed [#40]( https://github.com/urbanopt/urbanopt-cli/issues/40 ), Windows users are requiring Rack during Run command
|
20
|
+
- Fixed [#42]( https://github.com/urbanopt/urbanopt-cli/issues/42 ), We still need to require the NREL fork of Simplecov
|
21
|
+
- Fixed [#43]( https://github.com/urbanopt/urbanopt-cli/issues/43 ), rake install is hanging
|
22
|
+
- Fixed [#44]( https://github.com/urbanopt/urbanopt-cli/issues/44 ), Add detailed OSM workflow to example project
|
23
|
+
- Fixed [#45]( https://github.com/urbanopt/urbanopt-cli/issues/45 ), Remove single-family and multi-family buildings from example project
|
24
|
+
- Fixed [#46]( https://github.com/urbanopt/urbanopt-cli/issues/46 ), Remove os-standard dependency from example project gemfile
|
25
|
+
- Fixed [#55]( https://github.com/urbanopt/urbanopt-cli/issues/55 ), SegFault running CLI on windows
|
26
|
+
- Fixed [#56]( https://github.com/urbanopt/urbanopt-cli/issues/56 ), Ruby version is not specified
|
27
|
+
- Fixed [#59]( https://github.com/urbanopt/urbanopt-cli/issues/59 ), Add save individual report functionality to CLI
|
28
|
+
- Fixed [#63]( https://github.com/urbanopt/urbanopt-cli/issues/63 ), Add a way to create an "empty" project
|
29
|
+
- Fixed [#67]( https://github.com/urbanopt/urbanopt-cli/issues/67 ), Add an option to the -p command to overwrite an existing directory
|
30
|
+
- Fixed [#68]( https://github.com/urbanopt/urbanopt-cli/issues/68 ), Add OpenDSS postprocess command
|
31
|
+
|
3
32
|
## Version 0.1.0
|
4
33
|
|
5
|
-
|
34
|
+
Initial commit
|
data/Gemfile
CHANGED
@@ -1,10 +1,12 @@
|
|
1
|
-
source
|
1
|
+
source 'http://rubygems.org'
|
2
2
|
|
3
3
|
# Specify your gem's dependencies in uo_cli.gemspec
|
4
4
|
gemspec
|
5
5
|
|
6
6
|
# simplecov has a dependency on native json gem, use fork that does not require this
|
7
|
+
gem 'certified'
|
7
8
|
gem 'simplecov', github: 'NREL/simplecov'
|
9
|
+
gem 'urbanopt-reopt', '0.2.0'
|
8
10
|
|
9
11
|
# Local gems are useful when developing and integrating the various dependencies.
|
10
12
|
# To favor the use of local gems, set the following environment variable:
|
@@ -15,7 +17,7 @@ gem 'simplecov', github: 'NREL/simplecov'
|
|
15
17
|
allow_local = ENV['FAVOR_LOCAL_GEMS']
|
16
18
|
|
17
19
|
# Uncomment (and modify path/branch) if you need to test local development versions. Otherwise
|
18
|
-
# these are included in the gemspec file
|
20
|
+
# these are included in the gemspec file
|
19
21
|
#
|
20
22
|
# if allow_local && File.exist?('../OpenStudio-extension-gem')
|
21
23
|
# gem 'openstudio-extension', path: '../OpenStudio-extension-gem'
|
@@ -41,18 +43,18 @@ if allow_local && File.exist?('../urbanopt-scenario-gem')
|
|
41
43
|
elsif allow_local
|
42
44
|
gem 'urbanopt-scenario', github: 'URBANopt/urbanopt-scenario-gem', branch: 'develop'
|
43
45
|
else
|
44
|
-
gem 'urbanopt-scenario', '0.2.0
|
46
|
+
gem 'urbanopt-scenario', '0.2.0'
|
45
47
|
# temporary
|
46
48
|
# gem 'urbanopt-scenario', github: 'URBANopt/urbanopt-scenario-gem', branch: 'develop'
|
47
49
|
end
|
48
50
|
|
49
|
-
if allow_local && File.
|
51
|
+
if allow_local && File.exist?('../urbanopt-geojson-gem')
|
50
52
|
# gem 'openstudio-extension', github: 'NREL/OpenStudio-extension-gem', branch: 'develop'
|
51
53
|
gem 'urbanopt-geojson', path: '../urbanopt-geojson-gem'
|
52
54
|
elsif allow_local
|
53
55
|
gem 'urbanopt-geojson', github: 'URBANopt/urbanopt-geojson-gem', branch: 'develop'
|
54
56
|
else
|
55
|
-
gem 'urbanopt-geojson', '0.2.0
|
57
|
+
gem 'urbanopt-geojson', '0.2.0'
|
56
58
|
# temporary
|
57
59
|
# gem 'urbanopt-scenario', github: 'URBANopt/urbanopt-scenario-gem', branch: 'develop'
|
58
|
-
end
|
60
|
+
end
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
#
|
1
|
+
# URBANopt Cli
|
2
2
|
|
3
3
|
This is the command line interface (CLI) for URBANopt.
|
4
4
|
|
@@ -36,25 +36,44 @@ Create a project folder:
|
|
36
36
|
uo -p <FOLDERNAME>
|
37
37
|
```
|
38
38
|
|
39
|
+
Overwrite an existing project folder:
|
40
|
+
|
41
|
+
```terminal
|
42
|
+
uo -o -p <FOLDERNAME>
|
43
|
+
```
|
44
|
+
|
45
|
+
Create an empty project folder without the example files:
|
46
|
+
|
47
|
+
```terminal
|
48
|
+
uo -e -p <FOLDERNAME>
|
49
|
+
|
39
50
|
Make ScenarioFiles from a FeatureFile using MapperFiles:
|
40
51
|
|
41
52
|
```terminal
|
42
53
|
uo -m -f <FEATUREFILE>
|
43
54
|
```
|
44
55
|
|
56
|
+
Make a ScenarioFile using only a specific FEATURE_ID from a FEATUREFILE:
|
57
|
+
|
58
|
+
```terminal
|
59
|
+
uo -m -f <FEATUREFILE> -i <FEATURE_ID>
|
60
|
+
```
|
61
|
+
|
45
62
|
Run URBANopt energy simulations for each feature in your scenario:
|
46
63
|
|
47
64
|
```terminal
|
48
65
|
uo -r -s <SCENARIOFILE> -f <FEATUREFILE>
|
49
66
|
```
|
50
67
|
|
51
|
-
|
68
|
+
Gather simulations for a full scenario:
|
52
69
|
|
53
70
|
```terminal
|
54
|
-
uo -
|
71
|
+
uo -g -t <TYPE> -s <SCENARIOFILE> -f <FEATUREFILE>
|
55
72
|
```
|
56
73
|
|
57
|
-
|
74
|
+
- Valid `TYPE`s are: `default`, `opendss`, `reopt-scenario`, `reopt-feature`
|
75
|
+
|
76
|
+
Delete a scenario you have already run:
|
58
77
|
|
59
78
|
```terminal
|
60
79
|
uo -d -s <SCENARIOFILE>
|
data/Rakefile
CHANGED
data/bin/console
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
-
require
|
4
|
-
require
|
3
|
+
require 'bundler/setup'
|
4
|
+
require 'uo_cli'
|
5
5
|
|
6
6
|
# You can add fixtures and/or initialization code here to make experimenting
|
7
7
|
# with your gem easier. You can also use a different console, if you like.
|
@@ -10,5 +10,5 @@ require "uo_cli"
|
|
10
10
|
# require "pry"
|
11
11
|
# Pry.start
|
12
12
|
|
13
|
-
require
|
13
|
+
require 'irb'
|
14
14
|
IRB.start(__FILE__)
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# *********************************************************************************
|
2
|
+
# URBANopt, Copyright (c) 2019-2020, Alliance for Sustainable Energy, LLC, and other
|
3
|
+
# contributors. All rights reserved.
|
4
|
+
#
|
5
|
+
# Redistribution and use in source and binary forms, with or without modification,
|
6
|
+
# are permitted provided that the following conditions are met:
|
7
|
+
#
|
8
|
+
# Redistributions of source code must retain the above copyright notice, this list
|
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
|
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
|
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
|
28
|
+
# OF THE POSSIBILITY OF SUCH DAMAGE.
|
29
|
+
# *********************************************************************************
|
30
|
+
|
31
|
+
DEVELOPER_NREL_KEY = (ENV['GEM_DEVELOPER_KEY'] || '<your key here https://developer.nrel.gov/signup/>')
|
data/example_files/Gemfile
CHANGED
@@ -39,7 +39,6 @@ allow_local = ENV['FAVOR_LOCAL_GEMS']
|
|
39
39
|
# end
|
40
40
|
|
41
41
|
# if allow_local && File.exist?('../openstudio-model-articulation-gem')
|
42
|
-
# # gem 'openstudio-model-articulation', github: 'NREL/openstudio-model-articulation-gem', branch: 'develop'
|
43
42
|
# gem 'openstudio-model-articulation', path: '../openstudio-model-articulation-gem'
|
44
43
|
# elsif allow_local
|
45
44
|
# gem 'openstudio-model-articulation', github: 'NREL/openstudio-model-articulation-gem', branch: 'develop'
|
@@ -47,23 +46,24 @@ allow_local = ENV['FAVOR_LOCAL_GEMS']
|
|
47
46
|
# gem 'openstudio-model-articulation', '0.1.0'
|
48
47
|
# end
|
49
48
|
|
49
|
+
gem 'urbanopt-reopt', '0.2.0'
|
50
50
|
|
51
51
|
if allow_local && File.exist?('../urbanopt-scenario-gem')
|
52
52
|
gem 'urbanopt-scenario', path: '../urbanopt-scenario-gem'
|
53
53
|
elsif allow_local
|
54
54
|
gem 'urbanopt-scenario', github: 'URBANopt/urbanopt-scenario-gem', branch: 'develop'
|
55
55
|
else
|
56
|
-
gem 'urbanopt-scenario', '0.2.0
|
56
|
+
gem 'urbanopt-scenario', '0.2.0'
|
57
57
|
# gem 'urbanopt-scenario', github: 'URBANopt/urbanopt-scenario-gem', branch: 'develop'
|
58
58
|
end
|
59
59
|
|
60
|
-
if allow_local && File.
|
60
|
+
if allow_local && File.exist?('../urbanopt-geojson-gem')
|
61
61
|
# gem 'openstudio-extension', github: 'NREL/OpenStudio-extension-gem', branch: 'develop'
|
62
62
|
gem 'urbanopt-geojson', path: '../urbanopt-geojson-gem'
|
63
63
|
elsif allow_local
|
64
64
|
gem 'urbanopt-geojson', github: 'URBANopt/urbanopt-geojson-gem', branch: 'develop'
|
65
65
|
else
|
66
|
-
gem 'urbanopt-geojson', '0.2.0
|
66
|
+
gem 'urbanopt-geojson', '0.2.0'
|
67
67
|
# gem 'urbanopt-geojson', github: 'URBANopt/urbanopt-geojson-gem', branch: 'develop'
|
68
68
|
end
|
69
69
|
|