Skip to content
New issue

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

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

Already on GitHub? # to your account

Convert misc formats from gio #7971

Merged
merged 15 commits into from
May 12, 2020
Merged

Conversation

lefticus
Copy link
Contributor

@lefticus lefticus commented May 6, 2020

Convert many different formatting routines from GIO to {fmt}

Part of the ongoing refactoring process to remove GIO from EnergyPlus

0 changes expected.

Reviewer

This will not be exhaustively relevant to every PR.

  • Perform a Code Review on GitHub
  • If branch is behind develop, merge develop and build locally to check for side effects of the merge
  • 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
  • Check that performance is not impacted (CI Linux results include performance check)
  • Run Unit Test(s) locally
  • Check any new function arguments for performance impacts
  • Verify IDF naming conventions and styles, memos and notes and defaults
  • If new idf included, locally check the err file and other outputs

@lefticus lefticus requested a review from Myoldmopar May 7, 2020 14:00
@lefticus lefticus added the Refactoring Includes code changes that don't change the functionality of the program, just perform refactoring label May 7, 2020
@lefticus lefticus marked this pull request as ready for review May 7, 2020 14:13
@Myoldmopar
Copy link
Member

@lefticus it looks like this one should go in first, then #7971, both because this one is not a draft and also because of the PR number. There are some CI files showing diffs that look meaningful. Can you check those and either resolve the diffs or explain the reasoning? I'll do a review soon to get this going.

@lefticus
Copy link
Contributor Author

lefticus commented May 7, 2020

Yes, this one needs to go first. I'm VERY confused by the diffs, as you can see that there were no diffs at all before my last merge from develop!

@lefticus
Copy link
Contributor Author

lefticus commented May 8, 2020

@Myoldmopar I believe after my most recent merge from Develop we can call this one complete.

Comment on lines 1456 to 1462
const auto cond_temp_error = format("'Cond Temp(C) = ' {:7.2F}", fmt::join(CondTempArray, " "));
std::cout << cond_temp_error << '\n';
ShowContinueError(cond_temp_error);

const auto curve_temp_error = format("'Curve Temp(C) = ' {:7.2F}", fmt::join(CurveValArray, " "));
std::cout << curve_temp_error << '\n';
ShowContinueError(curve_temp_error);
Copy link
Contributor

Choose a reason for hiding this comment

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

@lefticus The attached test files exercise the negative eir error message for both ChillerEIR and ChillerReformulatedEIR.
7971-GIOChillerError.zip

With v9.3.0 release, nothing is written to stdout (error messages like that never should be anyway). That said, the prior error message didn't work before (only one or two values were written to the err file).

The new code fixes it, but the writes to std::cout should be removed here and in the other chiller.
Also, in this one, remove the single quotes around Cond Temp(C) = in line 1456
And line 1460 should be "Curve Output ="
Thanks.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK, I'll remove those again. The old code definitely had something that was trying to write to stdout.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mjwitte does it make sense for GIOChillerError to become a regular test in the regression suite?

Copy link
Contributor

Choose a reason for hiding this comment

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

@lefticus No, we try to keep the regression suite running with minimal errors. We could build a unit test for this. We have some coverage of errors in the unit tests, but it's a rather small percentage throughout the code.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK. It looks like I need to investigate a new failure on Windows and see if it's related to these changes. Hopefully we can get this PR wrapped up soon.

@lefticus
Copy link
Contributor Author

@mjwitte @Myoldmopar I just checked and these failures (mtd file, in Windows) are in an output file I have not yet touched, so I don't think it's related to this changeset.

If either of you can confirm, I believe this PR is ready for merging.

@Myoldmopar
Copy link
Member

@lefticus correct, this error has been popping up randomly on Windows on other branches, not your problem. I am hopeful that once you wrap up all the output file changes then this strange access problem on the MTD file specifically will go away. That's not part of your scope, I'm just hoping it will be a nice side effect.

@lefticus
Copy link
Contributor Author

@lefticus correct, this error has been popping up randomly on Windows on other branches, not your problem. I am hopeful that once you wrap up all the output file changes then this strange access problem on the MTD file specifically will go away. That's not part of your scope, I'm just hoping it will be a nice side effect.

Then I think it's ready for merge and we can get the next one in too shortly.

@Myoldmopar
Copy link
Member

It all looks good to me now, and CI is very happy. No need to dwell on it, merging. Thanks @lefticus.

@Myoldmopar Myoldmopar merged commit 9023d3a into develop May 12, 2020
@Myoldmopar Myoldmopar deleted the convert_misc_formats_from_gio branch May 12, 2020 13:09
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Refactoring Includes code changes that don't change the functionality of the program, just perform refactoring
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants