Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
kflemin committed Aug 18, 2022
2 parents bc39412 + 529d5f9 commit feac673
Show file tree
Hide file tree
Showing 7 changed files with 68 additions and 6 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/nightly_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: nightly_build

on:
# push:
schedule:
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule
# 5 am UTC (11pm MDT the day before) every weekday night in MDT
- cron: '22 5 * * 2-6'

# Cancels an existing job (of the same workflow) if it is still running
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-only-cancel-in-progress-jobs-or-runs-for-the-current-workflow
# concurrency:
# group: ${{ github.workflow }}-${{ github.ref }}
# cancel-in-progress: true

env:
# This env var should enforce develop branch of all dependencies
FAVOR_LOCAL_GEMS: true
GEM_DEVELOPER_KEY: ${{ secrets.GEM_DEVELOPER_KEY }}

jobs:
weeknight-tests:
# Pinned to `ubuntu-20.04`. When ubuntu-latest adopts 22.04 it would break for us since 22 only supports Ruby 3.1
# https://github.com/ruby/setup-ruby#supported-platforms
runs-on: ubuntu-20.04
container:
image: docker://nrel/openstudio:3.4.0
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Update gems
run: |
bundle update
- name: Run Rspec
run: bundle exec rspec
# coveralls action docs: https://github.com/marketplace/actions/coveralls-github-action
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: "./coverage/lcov/urbanopt-reporting-gem.lcov"
10 changes: 8 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
# URBANopt Reporting Gem

## Version 0.6.2
Date Range: 06/28/22 - 08/17/22

- Fixed [#118]( https://github.com/urbanopt/urbanopt-reporting-gem/pull/118 ), set up actions with coveralls
- Fixed [#119]( https://github.com/urbanopt/urbanopt-reporting-gem/pull/119 ), emissions bug fix

## Version 0.6.1
Date Range: 05/10-22 - 06/27/22:
Date Range: 05/10-22 - 06/27/22

- Fixed [#114]( https://github.com/urbanopt/urbanopt-reporting-gem/pull/114 ), added natural gas, propane and fuel oil emissions reporting

## Version 0.6.0
Date Range: 11/22/21 - 05/09/22:
Date Range: 11/22/21 - 05/09/22

- Fixed [#95]( https://github.com/urbanopt/urbanopt-reporting-gem/pull/95 ), adding additional PV fields to UO output reports
- Fixed [#98]( https://github.com/urbanopt/urbanopt-reporting-gem/issues/98 ), add RNM results fields to schema
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# URBANopt Reporting Gem

[![Coverage Status](https://coveralls.io/repos/github/urbanopt/urbanopt-reporting-gem/badge.svg?branch=develop)](https://coveralls.io/github/urbanopt/urbanopt-reporting-gem?branch=develop)

The URBANopt<sup>&trade;</sup> Reporting Gem defines the URABNopt reports (Scenario and Feature reports). It also includes the default reporting measure which query results from the energyplus sql database and reports it in the Feature reports.


Expand Down Expand Up @@ -27,9 +29,9 @@ Or install it yourself as:
Check out the repository and then execute:

$ bundle install
$ bundle update
$ bundle update
$ bundle exec rake

## Releasing

* Update CHANGELOG.md
Expand Down
2 changes: 1 addition & 1 deletion lib/urbanopt/reporting/default_reports/reporting_period.rb
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ def to_hash
result[:comfort_result] = comfort_result_hash if @comfort_result

emissions_hash = @emissions if @emissions
#emissions_hash.delete_if { |k, v| v.nil? }
emissions_hash.delete_if { |k, v| v.nil? }
result[:emissions] = emissions_hash if @emissions

# validates +reporting_period+ properties against schema for reporting period.
Expand Down
2 changes: 1 addition & 1 deletion lib/urbanopt/reporting/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,6 @@

module URBANopt
module Reporting
VERSION = '0.6.1'.freeze
VERSION = '0.6.2'.freeze
end
end
10 changes: 10 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,16 @@
# OF THE POSSIBILITY OF SUCH DAMAGE.
# *********************************************************************************

require 'simplecov'
require 'simplecov-lcov'

SimpleCov::Formatter::LcovFormatter.config.report_with_single_file = true
SimpleCov.formatter = SimpleCov::Formatter::LcovFormatter
# Don't consider the spec folder for test coverage reporting (inside the do/end loop)
SimpleCov.start do
add_filter '/spec/'
end

require 'bundler/setup'
require 'urbanopt/reporting'

Expand Down
3 changes: 3 additions & 0 deletions urbanopt-reporting-gem.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ Gem::Specification.new do |spec|
spec.add_development_dependency 'bundler', '>= 2.1.0'
spec.add_development_dependency 'rake', '~> 13.0'
spec.add_development_dependency 'rspec', '~> 3.9'
spec.add_development_dependency 'simplecov', '~> 0.18.2'
spec.add_development_dependency 'simplecov-lcov', '~> 0.8.0'

spec.add_runtime_dependency 'json_pure', '~> 2.3'
spec.add_runtime_dependency 'json-schema', '~> 2.8'
spec.add_runtime_dependency 'openstudio-extension', '~> 0.5.1'
Expand Down

0 comments on commit feac673

Please sign in to comment.