From 0d09e94596cb583d57d534ec9a69bdaa5f13175e Mon Sep 17 00:00:00 2001 From: Nathan Moore Date: Mon, 6 May 2024 13:51:16 -0600 Subject: [PATCH] Use new version of reporting-gem (#271) * point to reopt-v3 branch of reporting-gem * point to develop now that reporting has merged * use released version 0.10.0 of reporting-gem * bump to v0.12.0 * enable manually running CI (once merged to develop) * update changelog for v0.12.0 * rubocop clean up test expectation --- .github/workflows/nightly_ci_build.yml | 1 + CHANGELOG.md | 6 ++++++ Gemfile | 2 +- lib/urbanopt/scenario/version.rb | 2 +- spec/urbanopt/urbanopt_scenario_spec.rb | 2 +- urbanopt-scenario-gem.gemspec | 2 +- 6 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/nightly_ci_build.yml b/.github/workflows/nightly_ci_build.yml index c35b435..d847c05 100644 --- a/.github/workflows/nightly_ci_build.yml +++ b/.github/workflows/nightly_ci_build.yml @@ -2,6 +2,7 @@ name: Scenario-gem CI on: + workflow_dispatch: # push: schedule: # https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule diff --git a/CHANGELOG.md b/CHANGELOG.md index 26d0d41..e21fdd5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # URBANopt Scenario Gem +## Version 0.12.0 +Date Range: 01/10/24 - 05/06/24 +* Use new version of reporting-gem by @vtnate in https://github.com/urbanopt/urbanopt-scenario-gem/pull/271 + +**Full Changelog**: https://github.com/urbanopt/urbanopt-scenario-gem/compare/v0.11.0...v0.12.0 + ## Version 0.11.0 Date Range: 07/06/23 - 01/10/24 diff --git a/Gemfile b/Gemfile index d033b57..75353d5 100644 --- a/Gemfile +++ b/Gemfile @@ -41,7 +41,7 @@ allow_local = ENV['FAVOR_LOCAL_GEMS'] # if allow_local && File.exist?('../urbanopt-reporting-gem') # gem 'urbanopt-reporting', path: '../urbanopt-reporting-gem' # elsif allow_local -# gem 'urbanopt-reporting', github: 'URBANopt/urbanopt-reporting-gem', branch: 'dependency-patch' +# gem 'urbanopt-reporting', github: 'URBANopt/urbanopt-reporting-gem', branch: 'develop' # end # if allow_local && File.exist?('../openstudio-load-flexibility-measures-gem') diff --git a/lib/urbanopt/scenario/version.rb b/lib/urbanopt/scenario/version.rb index 92da332..e679646 100644 --- a/lib/urbanopt/scenario/version.rb +++ b/lib/urbanopt/scenario/version.rb @@ -5,6 +5,6 @@ module URBANopt module Scenario - VERSION = '0.11.0'.freeze + VERSION = '0.12.0'.freeze end end diff --git a/spec/urbanopt/urbanopt_scenario_spec.rb b/spec/urbanopt/urbanopt_scenario_spec.rb index 142b37c..7382864 100644 --- a/spec/urbanopt/urbanopt_scenario_spec.rb +++ b/spec/urbanopt/urbanopt_scenario_spec.rb @@ -146,7 +146,7 @@ expect(data['scenario_report']['program']['maximum_roof_height_ft']).to eq(data['feature_reports'].map { |h| h['program']['maximum_roof_height_ft'] }.max) if data['scenario_report']['program']['maximum_roof_height_ft'] expect(data['scenario_report']['program']['maximum_number_of_stories']).to eq(data['feature_reports'].map { |h| h['program']['maximum_number_of_stories'] }.max) if data['scenario_report']['program']['maximum_number_of_stories'] expect(data['scenario_report']['program']['maximum_number_of_stories_above_ground']).to eq(data['feature_reports'].map { |h| h['program']['maximum_number_of_stories_above_ground'] }.max) if data['scenario_report']['program']['maximum_number_of_stories_above_ground'] - expect(data['scenario_report']['program']['parking_area_sqft']).to eq(data['feature_reports'].map { |h| h['program']['parking_area_sqft'] }.reduce(:+)) if data['scenario_report']['program']['parking_area_sqft'] && data['scenario_report']['program']['parking_area_sqft'] + expect(data['scenario_report']['program']['parking_area_sqft']).to eq(data['feature_reports'].map { |h| h['program']['parking_area_sqft'] }.reduce(:+)) if data['scenario_report']['program']['parking_area_sqft'] expect(data['scenario_report']['program']['number_of_parking_spaces']).to eq(data['feature_reports'].map { |h| h['program']['number_of_parking_spaces'] }.reduce(:+)) if data['scenario_report']['program']['number_of_parking_spaces'] expect(data['scenario_report']['program']['number_of_parking_spaces_charging']).to eq(data['feature_reports'].map { |h| h['program']['number_of_parking_spaces_charging'] }.reduce(:+)) if data['scenario_report']['program']['number_of_parking_spaces_charging'] expect(data['scenario_report']['program']['parking_footprint_area_sqft']).to eq(data['feature_reports'].map { |h| h['program']['parking_footprint_area_sqft'] }.reduce(:+)) if data['scenario_report']['program']['parking_footprint_area_sqft'] diff --git a/urbanopt-scenario-gem.gemspec b/urbanopt-scenario-gem.gemspec index 39e183c..b0a71df 100644 --- a/urbanopt-scenario-gem.gemspec +++ b/urbanopt-scenario-gem.gemspec @@ -30,5 +30,5 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'simplecov-lcov', '~> 0.8.0' spec.add_runtime_dependency 'sqlite3', '~> 1.6.0' spec.add_runtime_dependency 'urbanopt-core', '~> 0.11.0' - spec.add_runtime_dependency 'urbanopt-reporting', '~> 0.9.1' + spec.add_runtime_dependency 'urbanopt-reporting', '~> 0.10.0' end