Repository navigation
Scenario workflow: 11-12. scenario osw writer - #20
Open
JieXiong9119 wants to merge 1 commit into
Open
JieXiong9119 wants to merge 1 commit into
JieXiong9119 wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why do we need this PR
BOSS only writes
baseline/in.osw. This PR also writes one OSW per BuildingSyncPackageOfMeasuresscenario, which is the core of the scenario workflow roadmap. It combines roadmap PR 11 (writer API) and PR 12 (step assembly), because the writer can't be tested meaningfully without step assembly.Core change explanation
Boss.write_baseline_and_scenario_osws(xml, out, epw, std)writesbaseline/in.oswplusscenarios/<scenario_id>/in.oswfor each package scenario that has at least one mapped measure.:writtenor:skipped, with the OSW path, skipped measure IDs and warnings) and the parser warnings.write_baseline_osw,run_baseline_oswand the CLI are unchanged.openstudio_resultsas complete step hashes, so baseline steps are never changed. This includes the baselineSetLightingLoadsByLPDstep, which is also the LED mapping target.scenario_measure_map.jsonnow declaresworkflow_phases(envelope → internal_loads → hvac_equipment → controls_operations), and every step has aworkflow_phase. Mapped steps are stable-sorted by phase, then by package reference order. The mapper validates the phases. Map files without phases still load.measure.rbon the scenariomeasure_paths, the writer raises before writing anything and tells you to runbundle exec rake measures:install_external.config/external_measure_repos.ymlcan set an optionalscenario_onlyflag.buildingsync-measures-gemis added, pinned todevelop@c40c2ed. It providesmodify_envelope_insulation.scenario_only, it goes on scenario OSWmeasure_pathsonly, never the baseline.Which files are affected
lib/BOSS/boss.rblib/BOSS/scenario_measure_mapper.rblib/BOSS/scenario_measure_map.jsonlib/BOSS/external_measure_repo_manager.rbconfig/external_measure_repos.ymlspec/tests/unit/boss_spec.rb,scenario_measure_mapper_spec.rb,scenario_measure_map_spec.rb,external_measure_repo_manager_spec.rbspec/tests/integration/scenario_osw_generation_spec.rb(new; generates OSWs only and does not simulate)docs/scenario_workflow_translation_plan.md(PR 10 marked Done; PR 11/12 In Progress; handoff notes added)What kind of tests are done
bundle exec rspec spec/tests/unit spec/tests/integration/scenario_osw_generation_spec.rb: 128 examples, 0 failures (afterbundle exec rake measures:install_external).building_151.xmlwith the real installed repos: 12 scenario OSWs written; Scenario4, 5, 6 and 18 skipped (unmapped HVAC and daylighting measures).bundle exec rubocopon changed files: no new offenses beyond specMetrics/BlockLengthand the existingclass << selfindentation inboss.rb.Out of scope
Note for reviewers
CI already runs
rake measures:install_externalbeforerspec, so it will now also clonebuildingsync-measures-gem. The new integration spec depends on that install.