From 551cff50bb4ef75be61d0a72795ba7914524c032 Mon Sep 17 00:00:00 2001 From: Hannah Eslinger Date: Mon, 22 Jan 2024 14:20:28 -0700 Subject: [PATCH 1/3] Set bundler version in ci --- .github/workflows/continuous_integration.yml | 8 ++++---- .github/workflows/deploy.yml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/continuous_integration.yml b/.github/workflows/continuous_integration.yml index eab1a5db..2abd91df 100644 --- a/.github/workflows/continuous_integration.yml +++ b/.github/workflows/continuous_integration.yml @@ -14,7 +14,7 @@ jobs: uses: actions/checkout@v2 - name: Setup run: | - gem install bundler + gem install bundler -v 2.4.22 bundle install - name: Building Section Spec run: bundle exec rspec spec/tests/model_articulation_test/building_section_spec.rb @@ -63,7 +63,7 @@ jobs: uses: actions/checkout@v2 - name: Setup run: | - gem install bundler + gem install bundler -v 2.4.22 bundle install - name: Translator Example Spec run: bundle exec rspec spec/tests/translator_spec.rb @@ -87,7 +87,7 @@ jobs: uses: actions/checkout@v2 - name: Setup run: | - gem install bundler + gem install bundler -v 2.4.22 bundle install - name: Report Spec run: bundle exec rspec spec/tests/report_spec.rb @@ -120,7 +120,7 @@ jobs: uses: actions/checkout@v2 - name: Setup run: | - gem install bundler + gem install bundler -v 2.4.22 bundle install - name: BuildingSync Spec run: bundle exec rspec spec/tests/building_sync_spec.rb diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 6f3e1085..c152608f 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -18,7 +18,7 @@ jobs: - name: Install and Build run: | - gem install bundler + gem install bundler -v 2.4.22 bundle install bundle exec yard - README.md SITEMAP_BASEURL=https://buildingsync-gem.buildingsync.net bundle exec yard doc --plugin sitemap From 040df355a85bccd9c6a74c02347e1469cdfbbf3b Mon Sep 17 00:00:00 2001 From: Hannah Eslinger Date: Mon, 22 Jan 2024 12:48:50 -0700 Subject: [PATCH 2/3] Fix Should write the same IDF file as previously generated --- spec/files/filecomparison/originalfiles/in.idf | 8 ++++---- spec/files/filecomparison/originalfiles/in.osm | 2 +- spec/tests/model_articulation_test/site_spec.rb | 9 +++++++-- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/spec/files/filecomparison/originalfiles/in.idf b/spec/files/filecomparison/originalfiles/in.idf index e4eee4b2..2bdc785a 100644 --- a/spec/files/filecomparison/originalfiles/in.idf +++ b/spec/files/filecomparison/originalfiles/in.idf @@ -1,6 +1,6 @@ Version, - 9.6; !- Version Identifier + 22.1; !- Version Identifier Timestep, 6; !- Number of Timesteps per Hour @@ -2603,11 +2603,11 @@ RunPeriod, Run Period 1, !- Name 1, !- Begin Month 1, !- Begin Day of Month - 2022, !- Begin Year + 2024, !- Begin Year 12, !- End Month 31, !- End Day of Month - 2022, !- End Year - Saturday, !- Day of Week for Start Day + 2024, !- End Year + Monday, !- Day of Week for Start Day No, !- Use Weather File Holidays and Special Days No, !- Use Weather File Daylight Saving Period No, !- Apply Weekend Holiday Rule diff --git a/spec/files/filecomparison/originalfiles/in.osm b/spec/files/filecomparison/originalfiles/in.osm index 9de696a1..b0dec8f0 100644 --- a/spec/files/filecomparison/originalfiles/in.osm +++ b/spec/files/filecomparison/originalfiles/in.osm @@ -122,7 +122,7 @@ OS:SizingPeriod:DesignDay, OS:YearDescription, {d0fcec5a-533c-4ae5-96ad-48cf821a3afd}, !- Handle - 2023, !- Calendar Year + 2024, !- Calendar Year , !- Day of Week for Start Day ; !- Is Leap Year diff --git a/spec/tests/model_articulation_test/site_spec.rb b/spec/tests/model_articulation_test/site_spec.rb index 2ea932ed..5f0a594b 100644 --- a/spec/tests/model_articulation_test/site_spec.rb +++ b/spec/tests/model_articulation_test/site_spec.rb @@ -102,19 +102,24 @@ it 'Should write the same IDF file as previously generated' do # We don't compare OSM files because the GUIDs change + # generate site g = BuildingSync::Generator.new - @osm_file_path = File.join(SPEC_FILES_DIR, 'filecomparison') @site = g.create_minimum_site('Retail', '1980', 'Gross', '20000') @site.determine_open_studio_standard(ASHRAE90_1) + + # generate osm on site epw_file_path = File.join(SPEC_WEATHER_DIR, 'CZ01RV2.epw') @site.generate_baseline_osm(epw_file_path, ASHRAE90_1) + + # write site osm and idf + @osm_file_path = File.join(SPEC_FILES_DIR, 'filecomparison') @site.write_osm(@osm_file_path) generate_idf_file(@site.get_model) + # ensure it equals ground truth new_idf = "#{@osm_file_path}/in.idf" original_idf = "#{@osm_file_path}/originalfiles/in.idf" - line_not_match_counter = compare_two_idf_files(original_idf, new_idf) expect(line_not_match_counter == 0).to be true From d7d55b4e71da736aa436dcf2ac4025d346b9face Mon Sep 17 00:00:00 2001 From: Hannah Eslinger Date: Tue, 6 Feb 2024 15:59:46 -0700 Subject: [PATCH 3/3] Edit test values --- spec/tests/model_articulation_test/loads_system_spec.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spec/tests/model_articulation_test/loads_system_spec.rb b/spec/tests/model_articulation_test/loads_system_spec.rb index ce5c1ece..4c526932 100644 --- a/spec/tests/model_articulation_test/loads_system_spec.rb +++ b/spec/tests/model_articulation_test/loads_system_spec.rb @@ -78,11 +78,11 @@ # 1. Before the schedule is adjusted # 2. After the schedule is adjusted # And why we expect the new values - expect(help_calculate_hours(default_schedule_set.numberofPeopleSchedule, cut_off_value).round(1)).to eql 33.3 + expect(help_calculate_hours(default_schedule_set.numberofPeopleSchedule, cut_off_value).round(1)).to eql 47.9 expect(help_calculate_hours(default_schedule_set.hoursofOperationSchedule, cut_off_value).round(1)). to eql 40.0 expect(help_calculate_hours(default_schedule_set.peopleActivityLevelSchedule, cut_off_value).round(1)). to eql 168.0 - expect(help_calculate_hours(default_schedule_set.lightingSchedule, cut_off_value).round(1)). to eql 41.2 - expect(help_calculate_hours(default_schedule_set.electricEquipmentSchedule, cut_off_value).round(1)).to eql 52.7 + expect(help_calculate_hours(default_schedule_set.lightingSchedule, cut_off_value).round(1)). to eql 67.4 + expect(help_calculate_hours(default_schedule_set.electricEquipmentSchedule, cut_off_value).round(1)).to eql 78.0 expect(help_calculate_hours(default_schedule_set.gasEquipmentSchedule, cut_off_value).round(1)).to eql 0.0 expect(help_calculate_hours(default_schedule_set.hotWaterEquipmentSchedule, cut_off_value).round(1)).to eql 0.0 expect(help_calculate_hours(default_schedule_set.infiltrationSchedule, cut_off_value).round(1)).to eql 168.0