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

OutputControl:Files #4059

Merged
merged 12 commits into from
Aug 28, 2020
Merged

OutputControl:Files #4059

merged 12 commits into from
Aug 28, 2020

Conversation

joseph-robertson
Copy link
Collaborator

Pull request overview

  • Add new OutputControl:Files object to SDK

Please read OpenStudio Pull Requests to better understand the OpenStudio Pull Request protocol.

Pull Request Author

Add to this list or remove from it as applicable. This is a simple templated set of guidelines.

  • 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)
  • Checked behavior in OpenStudioApplication, adjusted policies as needed (src/openstudio_lib/library/OpenStudioPolicy.xml)
  • 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 self-assigned this Aug 26, 2020
@joseph-robertson joseph-robertson marked this pull request as ready for review August 26, 2020 21:58
@joseph-robertson joseph-robertson added Pull Request - Ready for CI This pull request if finalized and is ready for continuous integration verification prior to merge. IDDChange Enhancement Request component - Model labels Aug 26, 2020
@tijcolem
Copy link
Collaborator

Nice work on this @joseph-robertson. Just a note that CI is only set up to run on PRs to develop branch so it won't automatically run on this PR. I kicked off a full build for this branch instead. https://ci.commercialbuildings.dev/blue/organizations/jenkins/openstudio-develop-nightly/detail/openstudio-develop-nightly/685/pipeline

@joseph-robertson joseph-robertson mentioned this pull request Aug 27, 2020
21 tasks
Copy link
Collaborator

@jmarrec jmarrec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice & polished PR, great work @joseph-robertson

I'll modify the FT/RT tests quickly

The cache-enabled getter in Model is something we should consider, I'm not sure it's really needed or not.

resources/model/OpenStudio.idd Show resolved Hide resolved
src/energyplus/ForwardTranslator.cpp Show resolved Hide resolved
src/energyplus/ForwardTranslator.hpp Show resolved Hide resolved
src/energyplus/CMakeLists.txt Show resolved Hide resolved
src/energyplus/ReverseTranslator.hpp Show resolved Hide resolved
src/model/OutputControlFiles.cpp Show resolved Hide resolved
Comment on lines 64 to 70
WorkspaceObjectVector idfObjs = w.getObjectsByType(IddObjectType::OutputControl_Files);
ASSERT_EQ(1u, idfObjs.size());

WorkspaceObject idf_outputControlFiles(idfObjs[0]);

EXPECT_EQ("No", idf_outputControlFiles.getString(OutputControl_FilesFields::OutputCSV).get());
EXPECT_EQ("No", idf_outputControlFiles.getString(OutputControl_FilesFields::OutputMTR).get());
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest doing something similar to what I've done for OutputJSON (test all cases where a single one is true, to make absolutely sure we assigned the fields correctly). Using scripting to write the C++ it's not that annoying.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@jmarrec jmarrec force-pushed the output-control-files branch from b17aedb to a60a3ec Compare August 28, 2020 10:53
@jmarrec
Copy link
Collaborator

jmarrec commented Aug 28, 2020

I rebased onto latest v940-IOFreeze and force-pushed, make sure you refresh your index (git fetch --all)

@jmarrec
Copy link
Collaborator

jmarrec commented Aug 28, 2020

If you're comfortable with the tiny changes I've made, go ahead and merge that to v940-IOFreeze!

@joseph-robertson joseph-robertson merged commit 6bde8da into v9.4.0-IOFreeze Aug 28, 2020
@joseph-robertson joseph-robertson deleted the output-control-files branch August 28, 2020 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component - Model Enhancement Request IDDChange Pull Request - Ready for CI This pull request if finalized and is ready for continuous integration verification prior to merge.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants