urbanopt-reporting 0.3.0 → 0.3.1
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
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 29081aa7029141d2d9a0a8c5377cf2032933c84e2e9025636184c1cbc345c661
         | 
| 4 | 
            +
              data.tar.gz: 9a77ed54a8bf0a65e713cd0693e6eb1a3b0b6f26773c57ff2e234ac97d34ab4f
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: d8363915252d917051b1c7ed04001e8ec02e8087eb3ff8cfbc36dc6c7f1a10b9925e66e7a361a219ed76317e45f90fa2f857b7d8baadea243ce8913e62293d59
         | 
| 7 | 
            +
              data.tar.gz: 7275975a372494f5ec09ea29da191902c200aa449aab5f86cd04ab1487f0231c87a226f797e9003de6854f63c477b9c60336a344fb5eb43790760e035688055a
         | 
    
        data/CHANGELOG.md
    CHANGED
    
    | @@ -1,5 +1,13 @@ | |
| 1 1 | 
             
            # URBANopt Reporting Gem
         | 
| 2 2 |  | 
| 3 | 
            +
            ## Version 0.3.1
         | 
| 4 | 
            +
             | 
| 5 | 
            +
            Date Range: 11/26/2020 - 12/07/2020
         | 
| 6 | 
            +
             | 
| 7 | 
            +
            - Fixed [#19]( https://github.com/urbanopt/urbanopt-reporting-gem/pull/19 ), check for nil values to avoid crashing unit conversion
         | 
| 8 | 
            +
            - Fixed [#24]( https://github.com/urbanopt/urbanopt-reporting-gem/pull/24 ), Support reporting of other fuels
         | 
| 9 | 
            +
            - Fixed [#28]( https://github.com/urbanopt/urbanopt-reporting-gem/pull/28 ), fix for other_fuels being nil and restore save_feature_report function
         | 
| 10 | 
            +
             | 
| 3 11 | 
             
            ## Version 0.3.0
         | 
| 4 12 |  | 
| 5 13 | 
             
            Date Range: 11/12/2020 - 11/25/2020
         | 
| @@ -609,7 +609,9 @@ class DefaultFeatureReports < OpenStudio::Measure::ReportingMeasure | |
| 609 609 |  | 
| 610 610 | 
             
                # other_fuels
         | 
| 611 611 | 
             
                additional_fuel = sql_query(runner, sql_file, 'AnnualBuildingUtilityPerformanceSummary', "TableName='End Uses' AND RowName='Total End Uses' AND ColumnName='Additional Fuel'")
         | 
| 612 | 
            -
                 | 
| 612 | 
            +
                # ensure additional fuel is not nil
         | 
| 613 | 
            +
                feature_report.reporting_periods[0].other_fuels_kwh = 0.0
         | 
| 614 | 
            +
                feature_report.reporting_periods[0].other_fuels_kwh = convert_units(additional_fuel, 'GJ', 'kWh') unless additional_fuel.nil?
         | 
| 613 615 | 
             
                feature_report.reporting_periods[0].other_fuels_kwh -= feature_report.reporting_periods[0].propane_kwh
         | 
| 614 616 | 
             
                feature_report.reporting_periods[0].other_fuels_kwh -= feature_report.reporting_periods[0].fuel_oil_kwh
         | 
| 615 617 |  | 
| @@ -686,6 +688,10 @@ class DefaultFeatureReports < OpenStudio::Measure::ReportingMeasure | |
| 686 688 | 
             
                    m = feature_report.reporting_periods[0].end_uses.send(x_u)
         | 
| 687 689 |  | 
| 688 690 | 
             
                    y = eu.tr(' ', '_').downcase
         | 
| 691 | 
            +
                    # ensure not nil so the equations below don't error out
         | 
| 692 | 
            +
                    if sql_r.nil?
         | 
| 693 | 
            +
                      sql_r = 0.0
         | 
| 694 | 
            +
                    end
         | 
| 689 695 | 
             
                    sql_r = convert_units(sql_r, 'GJ', 'kWh')
         | 
| 690 696 | 
             
                    if x_u == 'other_fuels_kwh'
         | 
| 691 697 | 
             
                      sql_r -= feature_report.reporting_periods[0].end_uses.propane_kwh.send(y)
         | 
| @@ -223,6 +223,17 @@ module URBANopt | |
| 223 223 | 
             
                      return result
         | 
| 224 224 | 
             
                    end
         | 
| 225 225 |  | 
| 226 | 
            +
                    ## 
         | 
| 227 | 
            +
                    # Calls the individual functions to save 'default_feature_report.json' and 'default_feature_report.csv'
         | 
| 228 | 
            +
                    # For backward compatibility and ease of use
         | 
| 229 | 
            +
                    ##
         | 
| 230 | 
            +
                    # [parameters]:
         | 
| 231 | 
            +
                    # +file_name+ - _String_ - Assign a name to the saved feature report file without an extension
         | 
| 232 | 
            +
                    def save_feature_report(file_name = 'default_feature_report')
         | 
| 233 | 
            +
                      save_json_report(file_name)
         | 
| 234 | 
            +
                      save_csv_report(file_name)
         | 
| 235 | 
            +
                    end
         | 
| 236 | 
            +
             | 
| 226 237 | 
             
                    ##
         | 
| 227 238 | 
             
                    # Saves the 'default_feature_report.json' file to the results directory
         | 
| 228 239 | 
             
                    ##
         | 
| @@ -279,9 +290,7 @@ module URBANopt | |
| 279 290 | 
             
                        end
         | 
| 280 291 | 
             
                      end
         | 
| 281 292 | 
             
                    end
         | 
| 282 | 
            -
             | 
| 283 | 
            -
             | 
| 284 | 
            -
             | 
| 293 | 
            +
                    
         | 
| 285 294 | 
             
                  end
         | 
| 286 295 | 
             
                end
         | 
| 287 296 | 
             
              end
         | 
    
        metadata
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: urbanopt-reporting
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.3. | 
| 4 | 
            +
              version: 0.3.1
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Rawad El Kontar
         | 
| @@ -9,7 +9,7 @@ authors: | |
| 9 9 | 
             
            autorequire: 
         | 
| 10 10 | 
             
            bindir: exe
         | 
| 11 11 | 
             
            cert_chain: []
         | 
| 12 | 
            -
            date: 2020-12- | 
| 12 | 
            +
            date: 2020-12-07 00:00:00.000000000 Z
         | 
| 13 13 | 
             
            dependencies:
         | 
| 14 14 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 15 15 | 
             
              name: bundler
         |