openstudio-extension 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -1
- data/README.md +1 -12
- data/lib/openstudio/extension/runner.rb +4 -3
- data/lib/openstudio/extension/runner_config.rb +13 -0
- data/lib/openstudio/extension/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5d7389d56992364d7223efc9cf7e62c9e826253a
|
4
|
+
data.tar.gz: 5e2e0ab5c076f75d0fa6fa3b651f81cbc74fac1b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 69b29c4717bae6fd524d2d8980a8efd3cc231264baa22c8b0ce92261dff208644da25906d8a5810079b66af69ac317abfa0e8dc1b19d4cadce59f47ce6028d00
|
7
|
+
data.tar.gz: 547d1a2b58207f8dc17389bbfe27d88693c86ce4ff7466b031948eddcffe7be0191308f47a99793d4f23de5b14cd9377c5566767deb4d5dfed870287be9bc46c
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,10 @@
|
|
1
1
|
# OpenStudio Extension Gem
|
2
2
|
|
3
|
-
## Version 0.1.
|
3
|
+
## Version 0.1.5
|
4
|
+
|
5
|
+
* Fix bug to respect the runner.conf file when using Extension::Runner with no options
|
6
|
+
|
7
|
+
## Version 0.1.4
|
4
8
|
|
5
9
|
* Update license copyright dates
|
6
10
|
* Update template for Gemfile to include FAVOR_LOCAL_GEMS env variable
|
data/README.md
CHANGED
@@ -150,7 +150,7 @@ Common Rake Tasks that are available to derivative extension gems include:
|
|
150
150
|
| openstudio:measures:add_readme | Add README.md.erb file if it and the README markdown file do not already exist for a measure |
|
151
151
|
| openstudio:measures:copy_resources | Copy the resources files to individual measures in the calling gem |
|
152
152
|
| openstudio:measures:update_copyright | Update copyright on measure files in the calling gem |
|
153
|
-
| openstudio`:runner:`init
|
153
|
+
| openstudio`:runner:`init | Create a runner.conf file running simulations |
|
154
154
|
| openstudio:stage_bcl | Copy the measures to a location that can be uploaded to BCL |
|
155
155
|
| openstudio:push_bcl | Upload measures from the specified location to the BCL |
|
156
156
|
| openstudio:test_with_docker | Use openstudio docker image to run tests |
|
@@ -235,22 +235,11 @@ Or install it yourself as:
|
|
235
235
|
|
236
236
|
# TODO
|
237
237
|
|
238
|
-
- [X] Finalize documentation on naming conventions, etc
|
239
|
-
- [X] Add test measure
|
240
|
-
- [X] Rake task ```openstudio:update_measures```
|
241
|
-
- [X] Rake task ```openstudio:test_with_openstudio```
|
242
238
|
- [ ] Rake task ```stage_bcl``` _DLM: BCL gem should be a development dependency only until we can reduce its dependencies and remove native dependencies? should probably put it into a special group so we can bundle without it in openstudio-gems._
|
243
239
|
- [ ] Rake task ```push_bcl``` _DLM: how do we want to test this?
|
244
|
-
- [X] Get all rake tasks working on Travis
|
245
240
|
- [ ] Capture useful output from Travis (measure dashboard results, log files, zip of build products, etc) and put it somewhere (s3? naming convention?)
|
246
|
-
- [X] ```Extension::openstudio_extension_version``` _DLM: should we rename? should people overwrite this in their class?_
|
247
|
-
- [X] ```Extension::measures_dir``` _DLM: I think this can have a default implementation, right? If something does not need to be overridden should it be a module method rather than a class one? KAF: this is in rake task for now
|
248
|
-
- [X] ```Extension::list_measures``` _DLM: I think this can have a default implementation, right?_KAF: In Rake task for now
|
249
241
|
- [ ] ```Extension::files_dir``` _DLM: I think this can have a default implementation, right?_
|
250
242
|
- [ ] ```Extension::minimum_openstudio_version``` _DLM: should we rename? should people overwrite this in their class?_
|
251
|
-
- [X] ```Runner::initialize``` _DLM: should say that the path argument should be for a dir with a Gemfile right?_
|
252
|
-
- [X] ```Runner::configure_osw``` _DLM: should take in an OSW, add paths to all measure and file dirs for loaded OpenStudio Extensions, write out configured OSW_
|
253
243
|
- [ ] Run rubocop on all of the core files and remove exclusion from .rubocop.yml file.
|
254
244
|
- [ ] Cleanup task after running tests (may need to be in the OpenStudio Measure Tester)
|
255
|
-
- [X] Add a `rake init new_ext_gem` to Rakefile
|
256
245
|
- [ ] Add tests to the extension/core
|
@@ -56,17 +56,18 @@ module OpenStudio
|
|
56
56
|
##
|
57
57
|
# @param [String] dirname Directory to run commands in, defaults to Dir.pwd. If directory includes a Gemfile then create a local bundle.
|
58
58
|
# @param bundle_without [Hash] Hash describing the distribution of the variable.
|
59
|
-
# @param options [Hash] Hash describing options for running the simulation. These are the defaults for all runs unless overriden within the run_* methods.
|
59
|
+
# @param options [Hash] Hash describing options for running the simulation. These are the defaults for all runs unless overriden within the run_* methods. Note if options is used, then a local runner.conf file will not be loaded.
|
60
60
|
# @option options [String] :max_datapoints Max number of datapoints to run
|
61
61
|
# @option options [String] :num_parallel Number of simulations to run in parallel at a time
|
62
62
|
# @option options [String] :run_simulations Set to true to run the simulations
|
63
63
|
# @option options [String] :verbose Set to true to receive extra information while running simulations
|
64
64
|
def initialize(dirname = Dir.pwd, bundle_without = [], options = {})
|
65
65
|
# DLM: I am not sure if we want to use the main root directory to create these bundles
|
66
|
-
# had the idea of passing in a Gemfile name/alias and path to Gemfile, then doing the bundle
|
66
|
+
# had the idea of passing in a Gemfile name/alias and path to Gemfile, then doing the bundle
|
67
|
+
# in ~/OpenStudio/#{alias} or something like that?
|
67
68
|
|
68
69
|
# if the dirname contains a runner.conf file, then use the config file to specify the parameters
|
69
|
-
if File.exist?(File.join(dirname, OpenStudio::Extension::RunnerConfig::FILENAME)) &&
|
70
|
+
if File.exist?(File.join(dirname, OpenStudio::Extension::RunnerConfig::FILENAME)) && options.empty?
|
70
71
|
puts 'Using runner options from runner.conf file'
|
71
72
|
runner_config = OpenStudio::Extension::RunnerConfig.new(dirname)
|
72
73
|
@options = runner_config.options
|
@@ -104,6 +104,19 @@ module OpenStudio
|
|
104
104
|
end
|
105
105
|
end
|
106
106
|
|
107
|
+
##
|
108
|
+
# Update a runner config value
|
109
|
+
#
|
110
|
+
# @param [String] key, The name of the key to update
|
111
|
+
# @param [Variant] new_value, The new value to set the `key` to.
|
112
|
+
def update_config(key, new_value)
|
113
|
+
if @data.key? key.to_sym
|
114
|
+
@data[key.to_sym] = new_value
|
115
|
+
else
|
116
|
+
raise "Could not find key '#{key}' to update in RunnerConfig."
|
117
|
+
end
|
118
|
+
end
|
119
|
+
|
107
120
|
##
|
108
121
|
# Return the options as hash
|
109
122
|
def options
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: openstudio-extension
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Katherine Fleming
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: exe
|
12
12
|
cert_chain: []
|
13
|
-
date: 2020-02-
|
13
|
+
date: 2020-02-19 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: bundler
|