Skip to content

Commit

Permalink
Merge pull request #108 from BuildingSync/prep/0.2.0
Browse files Browse the repository at this point in the history
Release 0.2.0
  • Loading branch information
nllong authored Jan 28, 2021
2 parents 5f5f8b0 + 33307a8 commit 107c9e7
Show file tree
Hide file tree
Showing 132 changed files with 78,727 additions and 11,548 deletions.
146 changes: 146 additions & 0 deletions .github/workflows/continuous_integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
name: Continuous Integration

on:
pull_request:
push:

jobs:
model_articulation_tests:
name: Model Articulation Tests
container: nrel/openstudio:3.0.1
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Setup
run: |
gem install bundler
bundle install
- name: Building Section Spec
run: bundle exec rspec spec/tests/model_articulation_test/building_section_spec.rb
if: always()
- name: Building Spec
run: bundle exec rspec spec/tests/model_articulation_test/building_spec.rb
if: always()
- name: Envelope System Spec
run: bundle exec rspec spec/tests/model_articulation_test/envelope_system_spec.rb
if: always()
- name: Facility Spec
run: bundle exec rspec spec/tests/model_articulation_test/facility_spec.rb
if: always()
- name: HVAC System Spec
run: bundle exec rspec spec/tests/model_articulation_test/hvac_system_spec.rb
if: always()
- name: Loads System Spec
run: bundle exec rspec spec/tests/model_articulation_test/loads_system_spec.rb
if: always()
- name: Lighting System Spec
run: bundle exec rspec spec/tests/model_articulation_test/lighting_system_type_spec.rb
if: always()
- name: SHW System Spec
run: bundle exec rspec spec/tests/model_articulation_test/service_hot_water_system_spec.rb
if: always()
- name: Site Spec
run: bundle exec rspec spec/tests/model_articulation_test/site_spec.rb
if: always()
- name: Hospital Occupancy Type Spec
run: bundle exec rspec spec/tests/model_articulation_test/hospital_occupancy_type_spec.rb
if: always()
- name: Occupancy Types Spec
run: bundle exec rspec spec/tests/model_articulation_test/occupancy_types_spec.rb
if: always()
# Fails sometimes due to connection issues, so we exclude it here
# - name: Weather File Download
# run: bundle exec rspec spec/tests/model_articulation_test/weather_file_download_spec.rb
# if: always()

translator_tests:
name: Translator Tests
container: nrel/openstudio:3.0.1
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Setup
run: |
gem install bundler
bundle install
- name: Translator Example Spec
run: bundle exec rspec spec/tests/translator_spec.rb
if: always()
- name: Translator Sizing Run Spec
run: bundle exec rspec spec/tests/translator_sizing_run_spec.rb
if: always()
- name: Translator Scenario Generation Specs
run: bundle exec rspec spec/tests/translator_scenario_generation_spec.rb
if: always()
- name: Translator Scenario Simulation Spec
run: bundle exec rspec spec/tests/translator_scenario_simulations_spec.rb
if: always()

report_and_scenario_tests:
name: Report and Scenario Tests
container: nrel/openstudio:3.0.1
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Setup
run: |
gem install bundler
bundle install
- name: Report Spec
run: bundle exec rspec spec/tests/report_spec.rb
if: always()
- name: Utility Spec
run: bundle exec rspec spec/tests/utility_spec.rb
if: always()
- name: Scenario Spec
run: bundle exec rspec spec/tests/scenario_spec.rb
if: always()
- name: TimeSeries Spec
run: bundle exec rspec spec/tests/time_series_spec.rb
if: always()
- name: ResourceUse Spec
run: bundle exec rspec spec/tests/resource_use_spec.rb
if: always()
- name: AllResourceTotal Spec
run: bundle exec rspec spec/tests/all_resource_total_spec.rb
if: always()
- name: WorkflowMaker Spec
run: bundle exec rspec spec/tests/workflow_maker_spec.rb
if: always()

other_specs:
name: Other Tests
container: nrel/openstudio:3.0.1
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Setup
run: |
gem install bundler
bundle install
- name: BuildingSync Spec
run: bundle exec rspec spec/tests/building_sync_spec.rb
if: always()
- name: EPW Test Spec
run: bundle exec rspec spec/tests/epw_test_spec.rb
if: always()
- name: Constants Spec
run: bundle exec rspec spec/tests/constants_spec.rb
if: always()
- name: Generator Spec
run: bundle exec rspec spec/tests/generator_spec.rb
if: always()
- name: Helper Spec
run: bundle exec rspec spec/tests/helper_spec.rb
if: always()
- name: XMLGetSet Spec
run: bundle exec rspec spec/tests/xml_get_set_spec.rb
if: always()
# selection tool is not working with ASHRAE level 1.5 yet
# - name: Selection Tool Spec
# run: bundle exec rspec spec/tests/selection_tool_spec.rb
# if: always()
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/.bundle/
/.yardoc
/.ruby-version
/.python-version
/Gemfile.lock
/gems
/_yardoc/
Expand All @@ -9,6 +10,10 @@
/pkg/
/spec/reports/
/tmp/
/spec/output/
/SR1
/SRvt
.DS_Store

# rspec failure tracking
.rspec_status
Expand All @@ -20,3 +25,9 @@
# measures tests
lib/measures/.rubocop.yml
lib/measures/test_results/*

spec/files/filecomparison/in.idf
spec/files/filecomparison/in.osm
spec/weather/weather_file.json

.DS_Store
16 changes: 0 additions & 16 deletions .travis.yml

This file was deleted.

52 changes: 52 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# BuildingSync Gem

## Version 0.2.0

This is released as a minor version since we are so early stage, even though it has many breaking changes. Most of the 'high-level API' (translator) remains.

- Added many BuildingSync specific classes:
- AllResourceTotal
- AuditDate
- Contact
- Report
- ResourceUse
- Scenario
- TimeSeries
- Utility

- Major modifications to:
- WorkflowMaker
- Building
- BuildingSection
- Facility
- HVACSystem
- LightingSystem
- LoadsSystem
- Site
- SpatialElement
- Translator

- Added / modified modules / classes:
- Generator
- Helper
- XmlGetSet: many useful functions to get / set XML data given a base_xml
- LocationElement

- Removed Classes:
- ModelMakerBase
- ModelMaker
- MeteredEnergy

- Added `constants.rb`
- Renamed `bldg_and_system_types.json1` -> `building_and_system_types.json`
- Removed redundant / unused XML files
- Updated files to comply with specific BSync versions (v2.1.0, v2.2.0)
- Significantly more testing



## Version 0.1.0

* Initial release
* Support Level 0 (walkthrough), Level 1, and simplified Level 2 energy audits specified by ASHRAE Standard 211-2018.
* Support Office, Retail, and Hotel Building Types
33 changes: 20 additions & 13 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,24 +1,31 @@
# frozen_string_literal: true

source 'http://rubygems.org'

# Specify your gem's dependencies in buildingsync.gemspec
gemspec

if File.exist?('../OpenStudio-extension-gem')
# gem 'openstudio-extension', github: 'NREL/OpenStudio-extension-gem', branch: 'develop'
gem 'openstudio-extension', path: '../OpenStudio-extension-gem'
# Local gems are useful when developing and integrating the various dependencies.
# To favor the use of local gems, set the following environment variable:
# Mac: export FAVOR_LOCAL_GEMS=1
# Windows: set FAVOR_LOCAL_GEMS=1
# Note that if allow_local is true, but the gem is not found locally, then it will
# checkout the latest version (develop) from github.
allow_local = ENV['FAVOR_LOCAL_GEMS']

if allow_local && File.exist?('../openstudio-common-measures-gem')
gem 'openstudio-common-measures', path: '../openstudio-common-measures-gem'
else
gem 'openstudio-extension', github: 'NREL/OpenStudio-extension-gem', branch: 'develop'
gem 'openstudio-common-measures', github: 'NREL/openstudio-common-measures-gem', tag: 'v0.2.1'
end

if File.exist?('../openstudio-model-articulation-gem')
# gem 'openstudio-model-articulation', github: 'NREL/openstudio-model-articulation-gem', branch: 'develop'
if allow_local && File.exist?('../openstudio-model-articulation-gem')
gem 'openstudio-model-articulation', path: '../openstudio-model-articulation-gem'
else
gem 'openstudio-model-articulation', github: 'NREL/openstudio-model-articulation-gem', branch: 'develop'
gem 'openstudio-model-articulation', github: 'NREL/openstudio-model-articulation-gem', tag: 'v0.2.1'
end

gem 'openstudio_measure_tester', '= 0.1.7' # This includes the dependencies for running unit tests, coverage, and rubocop
# gem 'openstudio_measure_tester', :github => 'NREL/OpenStudio-measure-tester-gem', :ref => '273d1f1a5c739312688ea605ef4a5b6e7325332c'

# simplecov has an unneccesary dependency on native json gem, use fork that does not require this
gem 'simplecov', github: 'NREL/simplecov'
if allow_local && File.exist?('../openstudio-ee-gem')
gem 'openstudio-ee', path: '../openstudio-ee-gem'
else
gem 'openstudio-ee', github: 'NREL/openstudio-ee-gem', tag: 'v0.2.1'
end
10 changes: 10 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
//Jenkins pipelines are stored in shared libaries. Please see: https://github.com/tijcolem/nrel_cbci_jenkins_libs

@Library('cbci_shared_libs') _

// Build for PR to develop branch only.
if ((env.CHANGE_ID) && (env.CHANGE_TARGET) ) { // check if set

building_sync_gems()

}
8 changes: 5 additions & 3 deletions lib/measures/Rotate Building/LICENSE.md → LICENSE.md
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
OpenStudio(R), Copyright (c) 2008-2018, Alliance for Sustainable Energy, LLC. All rights reserved.
OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC. All rights reserved.
BuildingSync(R), Copyright (c) 2015-2020, Alliance for Sustainable Energy, LLC. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted
provided that the following conditions are met:
Expand All @@ -14,8 +15,9 @@ or promote products derived from this software without specific prior written pe
respective party.

(4) Other than as required in clauses (1) and (2), distributions in any form of modifications or other
derivative works may not use the "OpenStudio" trademark, "OS", "os", or any other confusingly similar
designation without specific prior written permission from Alliance for Sustainable Energy, LLC.
derivative works may not use the "OpenStudio" or "BuildingSync" trademarks, "OS", "os", "BSync" or any
other confusingly similar designation without specific prior written permission from Alliance for
Sustainable Energy, LLC.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
Expand Down
Loading

0 comments on commit 107c9e7

Please sign in to comment.