oslg 0.2.6 → 0.2.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5d9b0ecd08d5975a017a4133b83cd7deea1a21427d923651ff629347ee4b8e83
4
- data.tar.gz: 637c081134c0fc036048c62a17bf7e95087c807c34921bd80ebb3d53f0996346
3
+ metadata.gz: 6309b9c37cd0135fc85fd44a2903d7594ccf1b0d952f64cec3df1b7c9d5f32e9
4
+ data.tar.gz: 1d4b53beb732dd9d0680f59e79e1d078f5d4d0b2289bfe3ac8f224bae3bb0ff4
5
5
  SHA512:
6
- metadata.gz: cf5fddfd6703ac80fdcc94818db3f9c5d58c27a9f7617db8d04b92b78b9e442937551857fa4c7c9a1d470703f89499a484d55f49c1b8e30ebb72cd8266d63676
7
- data.tar.gz: 36411cd8958dd7e387e34ecd901c9cc12ff62cf37fb483e3c5d88954732857eaf796609cc358dea417ece8fe06f11f1e5526e2e1760a5444c3ffcdbdcd3d14a2
6
+ metadata.gz: 1edc4f411a77d1aaa0e2c6d48a9847ef3239af027d4699894519a8f1286b639c4a11dbd6bc96c2ef1cec43047d0601b5d01d38f178efde2e638786e890103b5a
7
+ data.tar.gz: 29899ed065067829900502b40ecd053c354a9255954bc18a1b735c30aaf1d6edab6a5c369a37af01b63e5330ef0b27cd8c4855dbecadfc352d1e5733b18f7ff0
@@ -3,7 +3,7 @@ name: Pull Request CI
3
3
  on:
4
4
  pull_request:
5
5
  branches:
6
- - main
6
+ - dev
7
7
 
8
8
  jobs:
9
9
  test_300x:
@@ -86,3 +86,19 @@ jobs:
86
86
  docker exec -t test bundle update
87
87
  docker exec -t test bundle exec rake
88
88
  docker kill test
89
+ test_361x:
90
+ runs-on: ubuntu-22.04
91
+ steps:
92
+ - name: Check out repository
93
+ uses: actions/checkout@v2
94
+ - name: Run Tests
95
+ run: |
96
+ echo $(pwd)
97
+ echo $(ls)
98
+ docker pull nrel/openstudio:3.6.1
99
+ docker run --name test --rm -d -t -v $(pwd):/work -w /work nrel/openstudio:3.6.1
100
+ docker exec -t test pwd
101
+ docker exec -t test ls
102
+ docker exec -t test bundle update
103
+ docker exec -t test bundle exec rake
104
+ docker kill test
data/README.md CHANGED
@@ -18,7 +18,7 @@ In most cases, critical (and many non-critical) OpenStudio anomalies will be cau
18
18
 
19
19
  ### Recommended use
20
20
 
21
- As a Ruby module, one can access __oslg__ by _extending_ a measure module or class:
21
+ As a Ruby module, one can access __oslg__ by _extending_ a Measure module or class:
22
22
 
23
23
  ```
24
24
  module M
@@ -39,7 +39,7 @@ FATAL
39
39
 
40
40
  DEBUG messages aren't benign at all, but are certainly less informative for the typical Measure user.
41
41
 
42
- Initially, __oslg__ sets 2x internal attributes: `level` (INFO) and `status` (< DEBUG). The `level` attribute is a user-set threshold below which less severe logs (e.g. DEBUG) are ignored. For instance, if `level` were _reset_ to DEBUG (e.g. `M.reset(M::DEBUG)`), then all DEBUG messages would also be logged. The `status` attribute is reset with each new log entry if the latter's log level is more severe than its predecessor (e.g. `status == M::FATAL` if there is a single log entry registered as FATAL). To check the curent __oslg__ `status` (true or false):
42
+ Initially, __oslg__ sets 2x internal attributes: `level` (INFO) and `status` (< DEBUG). The `level` attribute is a user-set threshold below which less severe logs (e.g. DEBUG) are ignored. For instance, if `level` were _reset_ to DEBUG (e.g. `M.reset(M::DEBUG)`), then all DEBUG messages would also be logged. The `status` attribute is reset with each new log entry when the latter's log level is more severe than its predecessors (e.g. `status == M::FATAL` if there is a single log entry registered as FATAL). To check the curent __oslg__ `status` (true or false):
43
43
 
44
44
  ```
45
45
  M.debug?
@@ -54,25 +54,25 @@ It's sometimes not a bad idea to rely on a _clean_ slate (e.g. within RSpecs). T
54
54
  M.clean!
55
55
  ```
56
56
 
57
- EnergyPlus will run, with e.g. out-of-range material or fluid properties, while logging ERROR messages in the process. It remains up to users to decide what to do with simulation results. We recommend something similar with __oslg__. For instance, we suggest logging as __FATAL__ any error that should halt measure processes and prevent OpenStudio from launching an EnergyPlus simulation. This could be missing or poorly-defined OpenStudio files.
57
+ EnergyPlus will run with e.g. out-of-range material or fluid properties, while logging ERROR messages in the process. It remains up to users to decide what to do with simulation results. We recommend something similar with __oslg__. For instance, we suggest logging as __FATAL__ any error that should halt Measure processes and prevent OpenStudio from launching an EnergyPlus simulation. This could be missing or poorly-defined OpenStudio files.
58
58
 
59
59
  ```
60
60
  M.log(M::FATAL, "Missing input JSON file")
61
61
  ```
62
62
 
63
- Consider logging non-fatal __ERROR__ messages when encountering invalid OpenStudio file entries, i.e. well-defined, yet invalid vis-à-vis EnergyPlus limitations. The invalid object could be simply ignored, while the measure pursues its (otherwise valid) calculations ... with OpenStudio ultimately launching an EnergyPlus simulation. If a simulation indeed ran (ultimately a go/no-go decision made by the EnergyPlus simulation engine), it would be up to users to decide if simulation results were valid or useful, given the context - maybe based on __oslg__ logged messages. In short, non-fatal ERROR logs should ideally point to bad input (that users can fix).
63
+ Consider logging non-fatal __ERROR__ messages when encountering invalid OpenStudio file entries, i.e. well-defined, yet invalid vis-à-vis EnergyPlus limitations. The invalid object could be simply ignored, while the Measure pursues its (otherwise valid) calculations ... with OpenStudio ultimately launching an EnergyPlus simulation. If a simulation indeed ran (ultimately a go/no-go decision made by the EnergyPlus simulation engine), it would be up to users to decide if simulation results were valid or useful, given the context - maybe based on __oslg__ logged messages. In short, non-fatal ERROR logs should ideally point to bad input (that users can fix).
64
64
 
65
65
  ```
66
66
  M.log(M::ERROR, "Measure won't process MASSLESS materials")
67
67
  ```
68
68
 
69
- A __WARNING__ could be triggered from inherit limitations of the underlying measure scope or methodology (something users may have little knowledge of beforehand). For instance, surfaces the size of dinner plates are often artifacts of poor 3D model design. It's usually not a good idea to have such small surfaces in an OpenStudio model, but neither OpenStudio nor EnergyPlus will necessarily warn users of such occurrences. It's up to users to decide on the suitable course of action.
69
+ A __WARNING__ could be triggered from inherit limitations of the underlying Measure scope or methodology (something users may have little knowledge of beforehand). For instance, surfaces the size of dinner plates are often artifacts of poor 3D model design. It's usually not a good idea to have such small surfaces in an OpenStudio model, but neither OpenStudio nor EnergyPlus will necessarily warn users of such occurrences. It's up to users to decide on the suitable course of action.
70
70
 
71
71
  ```
72
72
  M.log(M::WARN, "Surface area < 100cm2")
73
73
  ```
74
74
 
75
- There's also the possibility of logging __INFO__-rmative messages for users, e.g. the final state of a measure variable before exiting.
75
+ There's also the possibility of logging __INFO__-rmative messages for users, e.g. the final state of a Measure variable before exiting.
76
76
 
77
77
  ```
78
78
  M.log(M::INFO, "Envelope compliant to prescriptive code requirements")
@@ -131,7 +131,7 @@ def sum(areas, units)
131
131
  end
132
132
  ```
133
133
 
134
- ... would generate the following if both `areas` and `units` arguments were nilled:
134
+ ... would generate the following if both `areas` and `units` arguments were for instance _nilled_:
135
135
  ```
136
136
  "Invalid 'areas' arg #1 (sum)"
137
137
  "Invalid 'units' arg #2 (sum)"
@@ -147,7 +147,7 @@ __mismatch__: for logging incompatible instances vs classes:
147
147
  return M.mismatch("areas", areas, Array, "sum") unless areas.is_a?(Array)
148
148
  ```
149
149
 
150
- If 'areas' were a _String_, __mismatch__ would generate the following DEBUG log message (before returning _nil_):
150
+ If 'areas' were for example a _String_, __mismatch__ would generate the following DEBUG log message (before returning _nil_):
151
151
 
152
152
  ```
153
153
  "'areas' String? expecting Array (sum)"
data/lib/oslg/version.rb CHANGED
@@ -29,5 +29,5 @@
29
29
  # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30
30
 
31
31
  module OSlg
32
- VERSION = "0.2.6".freeze
32
+ VERSION = "0.2.7".freeze
33
33
  end
data/oslg.gemspec CHANGED
@@ -24,7 +24,7 @@ Gem::Specification.new do |s|
24
24
  s.bindir = "exe"
25
25
  s.require_paths = ["lib"]
26
26
  s.executables = s.files.grep(%r{^exe/}) { |f| File.basename(f) }
27
- s.required_ruby_version = [">= 2.5.0", "< 2.7.3"]
27
+ s.required_ruby_version = [">= 2.5.0", "< 3"]
28
28
  s.metadata = {}
29
29
 
30
30
  s.add_development_dependency "bundler", "~> 2.1"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oslg
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.6
4
+ version: 0.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Denis Bourgeois
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-01-01 00:00:00.000000000 Z
11
+ date: 2023-06-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -76,7 +76,7 @@ licenses:
76
76
  - BSD-3-Clause
77
77
  metadata:
78
78
  homepage_uri: https://github.com/rd2/oslg
79
- source_code_uri: https://github.com/rd2/oslg/tree/v0.2.6
79
+ source_code_uri: https://github.com/rd2/oslg/tree/v0.2.7
80
80
  bug_tracker_uri: https://github.com/rd2/oslg/issues
81
81
  post_install_message:
82
82
  rdoc_options: []
@@ -89,7 +89,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
89
89
  version: 2.5.0
90
90
  - - "<"
91
91
  - !ruby/object:Gem::Version
92
- version: 2.7.3
92
+ version: '3'
93
93
  required_rubygems_version: !ruby/object:Gem::Requirement
94
94
  requirements:
95
95
  - - ">="