From 6657e2dd45e609723ffa3c7f8834d48a27ab1c0d Mon Sep 17 00:00:00 2001 From: Nathan Moore Date: Tue, 16 Jul 2024 11:43:26 -0600 Subject: [PATCH 01/14] bump to v0.11.0 --- lib/urbanopt/reporting/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/urbanopt/reporting/version.rb b/lib/urbanopt/reporting/version.rb index 6302de4..081da51 100644 --- a/lib/urbanopt/reporting/version.rb +++ b/lib/urbanopt/reporting/version.rb @@ -5,6 +5,6 @@ module URBANopt module Reporting - VERSION = '0.10.1'.freeze + VERSION = '0.11.0'.freeze end end From 83df414b8855c46d1d309146bd8642e81597cd82 Mon Sep 17 00:00:00 2001 From: Nathan Moore Date: Tue, 16 Jul 2024 11:51:33 -0600 Subject: [PATCH 02/14] upgrade to ruby 3.2.2 and bump dependency versions --- urbanopt-reporting-gem.gemspec | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/urbanopt-reporting-gem.gemspec b/urbanopt-reporting-gem.gemspec index 659af3a..59042a8 100644 --- a/urbanopt-reporting-gem.gemspec +++ b/urbanopt-reporting-gem.gemspec @@ -21,15 +21,15 @@ Gem::Specification.new do |spec| spec.bindir = 'exe' spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } spec.require_paths = ['lib'] - spec.required_ruby_version = '~> 2.7.0' + spec.required_ruby_version = '~> 3.2' - spec.add_development_dependency 'bundler', '~> 2.1' - spec.add_development_dependency 'rake', '~> 13.1' - spec.add_development_dependency 'rspec', '~> 3.12' - spec.add_development_dependency 'simplecov', '~> 0.18.2' - spec.add_development_dependency 'simplecov-lcov', '~> 0.8.0' + spec.add_development_dependency 'bundler', '~> 2.4.10' + spec.add_development_dependency 'rake', '~> 13.2' + spec.add_development_dependency 'rspec', '~> 3.13' + spec.add_development_dependency 'simplecov', '0.22.0' + spec.add_development_dependency 'simplecov-lcov', '0.8.0' spec.add_runtime_dependency 'json_pure', '~> 2.3' spec.add_runtime_dependency 'json-schema', '~> 2.7' - spec.add_dependency 'openstudio-extension', '~> 0.7.1' + spec.add_dependency 'openstudio-extension', '~> 0.8.0' end From 34bf21ebd941d91f7aeeeaa73a0fad2b62554f4a Mon Sep 17 00:00:00 2001 From: Nathan Moore Date: Tue, 16 Jul 2024 11:51:48 -0600 Subject: [PATCH 03/14] experiment with not pinning problem dependencies --- Gemfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index 0ae8b80..7d4f791 100644 --- a/Gemfile +++ b/Gemfile @@ -12,11 +12,11 @@ gemspec allow_local = ENV['FAVOR_LOCAL_GEMS'] # pin this dependency to avoid unicode_normalize error -gem 'addressable', '2.8.1' +# gem 'addressable', '2.8.1' # pin this dependency to avoid using racc dependency (which has native extensions) -gem 'parser', '3.2.2.2' +# gem 'parser', '3.2.2.2' # pin this dependency because 2.9.2 breaks OS tests (openstudio:test_with_openstudio) -gem 'regexp_parser', '2.9.0' +# gem 'regexp_parser', '2.9.0' # if allow_local && File.exist?('../openstudio-extension-gem') # gem 'openstudio-extension', path: '../openstudio-extension-gem' From 5c0e213e92a62fc2bdf41ac131c1733d16210bdd Mon Sep 17 00:00:00 2001 From: Nathan Moore Date: Tue, 16 Jul 2024 11:51:57 -0600 Subject: [PATCH 04/14] use OS3.8 in CI --- .github/workflows/nightly_ci_build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/nightly_ci_build.yml b/.github/workflows/nightly_ci_build.yml index af4ac75..ba0e9a6 100644 --- a/.github/workflows/nightly_ci_build.yml +++ b/.github/workflows/nightly_ci_build.yml @@ -21,7 +21,7 @@ jobs: weeknight-tests: runs-on: ubuntu-latest container: - image: docker://nrel/openstudio:3.7.0 + image: docker://nrel/openstudio:3.8.0 steps: - uses: actions/checkout@v4 - name: set git config options From 9ff584a500c7df6fe3a141a315aa00b9d4f6b79c Mon Sep 17 00:00:00 2001 From: Nathan Moore Date: Tue, 16 Jul 2024 11:52:28 -0600 Subject: [PATCH 05/14] update measures --- lib/measures/default_feature_reports/measure.xml | 6 +++--- lib/measures/export_time_series_modelica/measure.xml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/measures/default_feature_reports/measure.xml b/lib/measures/default_feature_reports/measure.xml index f99d23e..186a86a 100644 --- a/lib/measures/default_feature_reports/measure.xml +++ b/lib/measures/default_feature_reports/measure.xml @@ -3,8 +3,8 @@ 3.1 default_feature_reports 9ee3135a-8070-4408-bfa1-b75fecf9dd4f - 1f0dd70a-ddad-4bb8-a54b-0aeb696e80d0 - 2024-06-20T19:28:12Z + 43be79bc-ba24-44e0-923f-3f618951a054 + 2024-07-16T17:52:08Z FB304155 DefaultFeatureReports DefaultFeatureReports @@ -128,7 +128,7 @@ measure.rb rb script - 005CDD6D + 2B9D1AAE USA_CO_Golden-NREL.724666_TMY3.epw diff --git a/lib/measures/export_time_series_modelica/measure.xml b/lib/measures/export_time_series_modelica/measure.xml index 078896b..302a19f 100644 --- a/lib/measures/export_time_series_modelica/measure.xml +++ b/lib/measures/export_time_series_modelica/measure.xml @@ -3,8 +3,8 @@ 3.1 export_time_series_loads_csv 9fcf6116-c2eb-43d6-93f0-e1bdd822f768 - 0b134568-d3a8-4ede-bf22-2010a173ea97 - 2024-01-08T22:54:07Z + 8bd4bc8e-f597-47f9-82b9-044a06977bb1 + 2024-07-16T17:52:07Z 9BF1E6AC ExportTimeSeriesLoadsCSV ExportTimeSeriesLoadsCSV @@ -111,7 +111,7 @@ measure.rb rb script - EC8615DF + EB4FBA91 os_lib_helper_methods.rb From 56d5a55767ef24bbe4e20534b8a15d6cdc48357a Mon Sep 17 00:00:00 2001 From: Nathan Moore Date: Tue, 16 Jul 2024 11:53:01 -0600 Subject: [PATCH 06/14] add `.coverage` to gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 90224ba..3c3a261 100644 --- a/.gitignore +++ b/.gitignore @@ -14,6 +14,7 @@ /lib/measures/*/tests/output out.txt .rubocop*s3* +.coverage # rspec failure tracking .rspec_status From 2e5fd077861e309d7ee246f8398f0ddc77fd8117 Mon Sep 17 00:00:00 2001 From: Nathan Moore Date: Tue, 16 Jul 2024 11:55:24 -0600 Subject: [PATCH 07/14] changelog --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 31ad8f8..6ad8f07 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # URBANopt Reporting Gem +## Version 0.11.0 +* Upgrade to OpenStudio 3.8 & Ruby 3.2 by @vtnate in https://github.com/urbanopt/urbanopt-reporting-gem/pull/154 + +**Full Changelog**: https://github.com/urbanopt/urbanopt-reporting-gem/compare/v0.10.1...v0.11.0 + ## Version 0.10.1 * Other Fuel emission factors update by @rawadelkontar in https://github.com/urbanopt/urbanopt-reporting-gem/pull/153 From 341726b4e220e278ba74880719d28f87fdf760a4 Mon Sep 17 00:00:00 2001 From: Nathan Moore Date: Thu, 18 Jul 2024 10:26:55 -0600 Subject: [PATCH 08/14] clarify ruby version, remove duplicate dependencies --- urbanopt-reporting-gem.gemspec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/urbanopt-reporting-gem.gemspec b/urbanopt-reporting-gem.gemspec index 59042a8..bf82c64 100644 --- a/urbanopt-reporting-gem.gemspec +++ b/urbanopt-reporting-gem.gemspec @@ -21,10 +21,10 @@ Gem::Specification.new do |spec| spec.bindir = 'exe' spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } spec.require_paths = ['lib'] - spec.required_ruby_version = '~> 3.2' + # We support exactly Ruby v3.2.2 because os-extension requires bundler==2.4.10 and that requires Ruby 3.2.2: https://stdgems.org/bundler/ + # It would be nice to be able to use newer patches of Ruby 3.2, which would require os-extension to relax its dependency on bundler. + spec.required_ruby_version = '3.2.2' - spec.add_development_dependency 'bundler', '~> 2.4.10' - spec.add_development_dependency 'rake', '~> 13.2' spec.add_development_dependency 'rspec', '~> 3.13' spec.add_development_dependency 'simplecov', '0.22.0' spec.add_development_dependency 'simplecov-lcov', '0.8.0' From ff0121361284943768a70969ea99dbd01070e7aa Mon Sep 17 00:00:00 2001 From: Nathan Moore Date: Mon, 22 Jul 2024 10:07:26 -0600 Subject: [PATCH 09/14] WIP: use extension-gem branch. Might not be necessary in this gem --- Gemfile | 2 +- urbanopt-reporting-gem.gemspec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile b/Gemfile index 7d4f791..5647a04 100644 --- a/Gemfile +++ b/Gemfile @@ -21,5 +21,5 @@ allow_local = ENV['FAVOR_LOCAL_GEMS'] # if allow_local && File.exist?('../openstudio-extension-gem') # gem 'openstudio-extension', path: '../openstudio-extension-gem' # elsif allow_local -# gem 'openstudio-extension', github: 'NREL/openstudio-extension-gem', branch: 'develop' + gem 'openstudio-extension', github: 'NREL/openstudio-extension-gem', branch: 'dont_raise_when_mistmatch' # end diff --git a/urbanopt-reporting-gem.gemspec b/urbanopt-reporting-gem.gemspec index bf82c64..eab2966 100644 --- a/urbanopt-reporting-gem.gemspec +++ b/urbanopt-reporting-gem.gemspec @@ -31,5 +31,5 @@ Gem::Specification.new do |spec| spec.add_runtime_dependency 'json_pure', '~> 2.3' spec.add_runtime_dependency 'json-schema', '~> 2.7' - spec.add_dependency 'openstudio-extension', '~> 0.8.0' + # spec.add_dependency 'openstudio-extension', '~> 0.8.0' end From ed6e1df3f27b5bdd786cdc719ac96c15da622b1a Mon Sep 17 00:00:00 2001 From: Nathan Moore Date: Thu, 25 Jul 2024 14:59:25 -0600 Subject: [PATCH 10/14] bump json-schema to 4.3.1 & json_pure to 2.7 --- urbanopt-reporting-gem.gemspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/urbanopt-reporting-gem.gemspec b/urbanopt-reporting-gem.gemspec index eab2966..54d0c38 100644 --- a/urbanopt-reporting-gem.gemspec +++ b/urbanopt-reporting-gem.gemspec @@ -29,7 +29,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'simplecov', '0.22.0' spec.add_development_dependency 'simplecov-lcov', '0.8.0' - spec.add_runtime_dependency 'json_pure', '~> 2.3' - spec.add_runtime_dependency 'json-schema', '~> 2.7' + spec.add_runtime_dependency 'json_pure', '~> 2.7' + spec.add_runtime_dependency 'json-schema', '~> 4.3.1' # spec.add_dependency 'openstudio-extension', '~> 0.8.0' end From 1c815f8b1ec41951ca92fd8fa072c3184dd3804e Mon Sep 17 00:00:00 2001 From: Nathan Moore Date: Tue, 30 Jul 2024 13:23:17 -0400 Subject: [PATCH 11/14] use newly released patch version 0.8.1 of extension-gem --- Gemfile | 3 ++- urbanopt-reporting-gem.gemspec | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Gemfile b/Gemfile index 5647a04..7b6a84e 100644 --- a/Gemfile +++ b/Gemfile @@ -21,5 +21,6 @@ allow_local = ENV['FAVOR_LOCAL_GEMS'] # if allow_local && File.exist?('../openstudio-extension-gem') # gem 'openstudio-extension', path: '../openstudio-extension-gem' # elsif allow_local - gem 'openstudio-extension', github: 'NREL/openstudio-extension-gem', branch: 'dont_raise_when_mistmatch' + # gem 'openstudio-extension', github: 'NREL/openstudio-extension-gem', branch: 'develop' +# gem 'openstudio-extension', '~> 0.8.1' # end diff --git a/urbanopt-reporting-gem.gemspec b/urbanopt-reporting-gem.gemspec index 54d0c38..6f0de8f 100644 --- a/urbanopt-reporting-gem.gemspec +++ b/urbanopt-reporting-gem.gemspec @@ -31,5 +31,5 @@ Gem::Specification.new do |spec| spec.add_runtime_dependency 'json_pure', '~> 2.7' spec.add_runtime_dependency 'json-schema', '~> 4.3.1' - # spec.add_dependency 'openstudio-extension', '~> 0.8.0' + spec.add_dependency 'openstudio-extension', '~> 0.8.1' end From 155b1a3b19722dc17063104b4c165603991deefa Mon Sep 17 00:00:00 2001 From: Nathan Moore Date: Thu, 5 Sep 2024 10:08:37 -0600 Subject: [PATCH 12/14] restore pinned dependencies to make OS happy --- Gemfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Gemfile b/Gemfile index 7b6a84e..99b611f 100644 --- a/Gemfile +++ b/Gemfile @@ -11,16 +11,16 @@ gemspec # checkout the latest version (develop) from github. allow_local = ENV['FAVOR_LOCAL_GEMS'] -# pin this dependency to avoid unicode_normalize error -# gem 'addressable', '2.8.1' +# pin this dependency to avoid unicode_normalize error (openstudio:test_with_openstudio) +gem 'addressable', '2.8.1' # pin this dependency to avoid using racc dependency (which has native extensions) # gem 'parser', '3.2.2.2' # pin this dependency because 2.9.2 breaks OS tests (openstudio:test_with_openstudio) -# gem 'regexp_parser', '2.9.0' +gem 'regexp_parser', '2.9.0' # if allow_local && File.exist?('../openstudio-extension-gem') # gem 'openstudio-extension', path: '../openstudio-extension-gem' # elsif allow_local - # gem 'openstudio-extension', github: 'NREL/openstudio-extension-gem', branch: 'develop' +# gem 'openstudio-extension', github: 'NREL/openstudio-extension-gem', branch: 'develop' # gem 'openstudio-extension', '~> 0.8.1' # end From 1541142f8d0632316807ba10cf10a6db51fbe178 Mon Sep 17 00:00:00 2001 From: Nathan Moore Date: Thu, 5 Sep 2024 10:20:01 -0600 Subject: [PATCH 13/14] `bundle install` during CI instead of `bundle update` --- .github/workflows/nightly_ci_build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/nightly_ci_build.yml b/.github/workflows/nightly_ci_build.yml index ba0e9a6..bc2ea1b 100644 --- a/.github/workflows/nightly_ci_build.yml +++ b/.github/workflows/nightly_ci_build.yml @@ -31,7 +31,7 @@ jobs: - name: Update gems run: | ruby --version - bundle update + bundle install - name: List OpenStudio measures run: bundle exec rake openstudio:list_measures - name: Update OpenStudio measures From c1bf824b8c2b056c8c1323683f469027d705b6db Mon Sep 17 00:00:00 2001 From: Nathan Moore Date: Thu, 5 Sep 2024 10:25:31 -0600 Subject: [PATCH 14/14] add another `bundle install` to have the bundle actually install --- .github/workflows/nightly_ci_build.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/nightly_ci_build.yml b/.github/workflows/nightly_ci_build.yml index bc2ea1b..8ffe8dc 100644 --- a/.github/workflows/nightly_ci_build.yml +++ b/.github/workflows/nightly_ci_build.yml @@ -26,8 +26,7 @@ jobs: - uses: actions/checkout@v4 - name: set git config options shell: bash - run: | - git config --global --add safe.directory '*' + run: git config --global --add safe.directory '*' - name: Update gems run: | ruby --version @@ -35,7 +34,9 @@ jobs: - name: List OpenStudio measures run: bundle exec rake openstudio:list_measures - name: Update OpenStudio measures - run: bundle exec rake openstudio:update_measures + run: | + bundle install + bundle exec rake openstudio:update_measures - name: Test OpenStudio measures run: bundle exec rake openstudio:test_with_openstudio - name: Run Rspec