Skip to content

Fix error if NumberofBedrooms=0 and NumberofBathrooms is omitted#2242

Open
shorowit wants to merge 4 commits into
masterfrom
prevent_nbaths_error
Open

Fix error if NumberofBedrooms=0 and NumberofBathrooms is omitted#2242
shorowit wants to merge 4 commits into
masterfrom
prevent_nbaths_error

Conversation

@shorowit

@shorowit shorowit commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Pull Request Description

NumberofBathrooms was being defaulted to zero, but the HPXML schema does not allow zero. We now set it to 1.

I also proposed allowing zero in the schema here.

Checklist

Not all may apply:

  • Schematron validator (EPvalidator.sch) has been updated
  • Sample files have been added/updated (openstudio tasks.rb update_hpxmls)
  • Tests have been added/updated (e.g., HPXMLtoOpenStudio/tests/test*.rb and/or workflow/tests/test*.rb)
  • Documentation has been updated
  • Changelog has been updated
  • openstudio tasks.rb update_measures has been run
  • No unexpected changes to simulation results of sample files

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

Updates bathroom defaulting to ensure zero-bedroom homes remain schema-valid.

Changes:

  • Enforces a minimum of one default bathroom.
  • Adds zero-bedroom sample and regression coverage.
  • Updates workflow documentation and changelog.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
Changelog.md Records the bug fix.
HPXMLtoOpenStudio/measure.xml Refreshes measure metadata and checksums.
HPXMLtoOpenStudio/resources/defaults.rb Applies the minimum bathroom default.
HPXMLtoOpenStudio/tests/test_defaults.rb Tests zero-bedroom defaulting.
docs/source/workflow_inputs.rst Documents rounding and minimum behavior.
workflow/hpxml_inputs.json Registers the regression sample.
workflow/sample_files/base-enclosure-beds-0.xml Adds a zero-bedroom sample.

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

Comment thread docs/source/workflow_inputs.rst
@shorowit
shorowit marked this pull request as ready for review July 17, 2026 22:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

2 participants