Skip to content

Add external measure manager for non-gem repos#2

Open
kflemin wants to merge 4 commits into
developfrom
non-gem-repos
Open

Add external measure manager for non-gem repos#2
kflemin wants to merge 4 commits into
developfrom
non-gem-repos

Conversation

@kflemin

@kflemin kflemin commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Adds support for managing and consuming external (non-gem) OpenStudio measure repositories via a manifest, including install/list rake tasks and updated OSW path ordering so local measures take precedence.

Changes:

  • Introduces BOSS::ExternalMeasureRepoManager + default manifest (config/external_measure_repos.yml) to resolve/install external measure roots.
  • Updates BOSS::Boss#write_baseline_osw to order measure_paths / file_paths as: local → gem-discovered → external repos.
  • Adds unit tests for the manager and for Boss measure path ordering; updates CI to run the full RSpec suite.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds support for managing and consuming external (non-gem) OpenStudio measure repositories via a manifest, including install/list rake tasks and updated OSW path ordering so local measures take precedence.

Changes:

  • Introduces BOSS::ExternalMeasureRepoManager + default manifest (config/external_measure_repos.yml) to resolve/install external measure roots.
  • Updates BOSS::Boss#write_baseline_osw to order measure_paths / file_paths as: local → gem-discovered → external repos.
  • Adds unit tests for the manager and for Boss measure path ordering; updates CI to run the full RSpec suite.

Reviewed changes

Copilot reviewed 10 out of 12 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
spec/tests/unit/external_measure_repo_manager_spec.rb Adds unit coverage for manifest parsing, validation, and resolved directories behavior.
spec/tests/unit/boss_spec.rb Tests ordering/deduping of measure_paths when combining local, gem, and external repo roots.
README.md Documents external measure installation/listing and precedence rules.
Rakefile Adds measures:install_external and measures:list_external tasks.
lib/measures/.gitkeep Ensures local measures directory exists in-repo.
lib/BOSS/external_measure_repo_manager.rb New manager to validate manifest, clone/fetch repos (sparse checkout), and resolve measure roots.
lib/BOSS/constants.rb Adds constants for local measures dir, external manifest path, and install directory.
lib/BOSS/boss.rb Integrates external/local/gem path ordering into OSW generation and derives file_paths.
lib/boss_cli.rb Updates CLI help text and changes run_osw argument handling.
Gemfile.lock Adds RuboCop performance/checkstyle formatter dev dependencies.
config/external_measure_repos.yml Ships default external measure manifest (local roots + comstock repo roots).
.github/workflows/ci.yml Simplifies CI test execution to bundle exec rspec.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lib/boss_cli.rb
Comment on lines +34 to 39
# option :standard_version, :aliases => "-v", :desc => "building standard to use (eg ASHRAE90.1 or CaliforniaTitle24). Defaults to ASHRAE90.1"
# todo: we don't really need standard_version at this point, but we need to keep it for now to avoid breaking the CLI interface. We can remove it later.
def run_osw(buildingsync_file)
standard_version = options[:standard_version] || ASHRAE90_1
boss = BOSS::Boss.new(buildingsync_file, options[:output_path], options[:epw_path], standard_version)
#standard_version = options[:standard_version] || ASHRAE90_1
boss = BOSS::Boss.new(buildingsync_file, options[:output_path], options[:epw_path], nil)
boss.run_baseline_osw

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@haneslinger, do you agree with this? I don't think we use the standard_version OR the epw_path variable during the run_osw call, only when we write the osw. Should we rework the initialize function of the BOSS function to not require it?

Comment thread lib/BOSS/external_measure_repo_manager.rb
Comment thread lib/BOSS/external_measure_repo_manager.rb
Comment thread lib/BOSS/external_measure_repo_manager.rb Outdated
kflemin and others added 3 commits July 1, 2026 11:18
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants