Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle incomplete EPW design conditions header #5134

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from

Conversation

joseph-robertson
Copy link
Collaborator

@joseph-robertson joseph-robertson commented Apr 1, 2024

Pull request overview

  • Fixes EPWDesignCondition getters should return boost::optional #5132.
  • EpwDesignCondition has many API-breaking changes related to its getters. The previous behavior was to misleadingly return a value of 0 for any empty design condition header field. The types for the getters are now either boost::optional<double> or boost::optional<int>.

Notes:

  • Does stringToDouble return 0.0 if an empty string is passed in? Yes.
  • Should the following changes be made to EpwFile.hpp / EpwFile.cpp:
    • check for empty strings in setters; e.g., check heatingDryBulb99 is empty string in setHeatingDryBulb99? Yes.
    • change all getters to return boost::optional<double>; e..g, double EpwDesignCondition::heatingDryBulb99() const { to boost::optional<double> EpwDesignCondition::heatingDryBulb99() const {? Yes.
    • change, e.g., double m_heatingDryBulb99 to boost::optional<double> m_heatingDryBulb99 in EpwDesignCondition class? Yes.

Pull Request Author

  • Model API Changes / Additions
  • Any new or modified fields have been implemented in the EnergyPlus ForwardTranslator (and ReverseTranslator as appropriate)
  • Model API methods are tested (in src/model/test)
  • EnergyPlus ForwardTranslator Tests (in src/energyplus/Test)
  • If a new object or method, added a test in NREL/OpenStudio-resources: Add Link
  • If needed, added VersionTranslation rules for the objects (src/osversion/VersionTranslator.cpp)
  • Verified that C# bindings built fine on Windows, partial classes used as needed, etc.
  • All new and existing tests passes
  • If methods have been deprecated, update rest of code to use the new methods

Labels:

  • If change to an IDD file, add the label IDDChange
  • If breaking existing API, add the label APIChange
  • If deemed ready, add label Pull Request - Ready for CI so that CI builds your PR

Review Checklist

This will not be exhaustively relevant to every PR.

  • Perform a Code Review on GitHub
  • Code Style, strip trailing whitespace, etc.
  • All related changes have been implemented: model changes, model tests, FT changes, FT tests, VersionTranslation, OS App
  • Labeling is ok
  • If defect, verify by running develop branch and reproducing defect, then running PR and reproducing fix
  • If feature, test running new feature, try creative ways to break it
  • CI status: all green or justified

@joseph-robertson joseph-robertson added component - Utilities Other Pull Request - Ready for CI This pull request if finalized and is ready for continuous integration verification prior to merge. labels Apr 1, 2024
@joseph-robertson joseph-robertson self-assigned this Apr 1, 2024
@joseph-robertson joseph-robertson added severity - Normal Bug APIChange A motivated non-backward compatible change that breaks the existing API and needs to be communicated labels Jul 26, 2024
@joseph-robertson joseph-robertson marked this pull request as ready for review July 26, 2024 22:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
APIChange A motivated non-backward compatible change that breaks the existing API and needs to be communicated component - Utilities Other Pull Request - Ready for CI This pull request if finalized and is ready for continuous integration verification prior to merge. severity - Normal Bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

EPWDesignCondition getters should return boost::optional
2 participants