Remove fmt: convert S-Z files to std::format (part 6)#11633
Conversation
|
|
|
|
|
Regression summary (run 27227192033, latest commit), display-only:
One precision refinement: the Humidity Ratio at Peak field in Zone/Space Sizing Information is kept in scientific ( |
0ac80cb to
b63d6f9
Compare
|
I rebased on develop to resolve conflicts (after my fmt filesystem PR #11628) and force pushed, make sure to update your local ref if you do any more work. |
|
I merged #11630 and this PR, remaining R-format specs in |
|
36 S-Z source files: 855 {:.NR}->{:.Nf}, ~1040 EnergyPlus::format/
fmt::format -> std::format. Type-incompatible calls kept on their
original entry point: 11 raw-enum args (no std::formatter) and 1
runtime/string-spec call on EnergyPlus::format; 1 fmt::join on
fmt::format. Fixed one malformed spec {.0R}->{:.0f} (WeatherManager).
Updated 2 unit-test expected strings for {:.NR}->{:.Nf} (sub-0.1
values: scientific -> fixed).
…sion
Humidity Ratio at Peak is always <0.1, so {:.5f} dropped it to ~2 sig
figs (e.g. 0.00061). {:.5E} restores the ~6 sig figs the prior {:.5R}
showed (E-04 vs old E-004, numerically identical). System Sizing has no
humidity field; spanning fields (air flows, schedules) stay {:.Nf}.
- InternalHeatGains: prints the diff of two temps only if greater than AutoVsHardSizingDeltaTempThreshold= 1.5C so .1f is good enough - WindowManager: clearly just a formatting weirdness that explains why it wasn't caught
ref 8383052e3e695a8812d4431ee8e8b0747b72b876
b63d6f9 to
281b8dc
Compare
|
@brianlball I'm hijacking your PR to add the last remaining potentially diff-producing changes that I encountered while I was actually completely removing fmt (PR is pending this one) I ran regressions between your commit (2476378) and the HEAD (281b8dc) and there are some minor EIO diffs in 4 files, so it's fine. All 4 diffs involve AirflowNetwork Wind Pressure Coefficients tables, and all changes are formatting-only — no actual values changed:
Bottom line: These are all cosmetic/formatting differences in how AirflowNetwork wind pressure coefficients are printed to the .eio file (rounding to 2 decimals and avoiding scientific notation for -AirflowNetwork Model:Wind Pressure Coefficients, !WPCTABLE5, -0.73,-0.63,-0.54,-0.59,-0.54,-0.63,-0.73,-0.63,-0.54,-0.59,-0.54,-0.63
+AirflowNetwork Model:Wind Pressure Coefficients, !WPCTABLE5, -0.73,-0.62,-0.54,-0.58,-0.54,-0.62,-0.73,-0.62,-0.54,-0.58,-0.54,-0.62and some minor stuff in tests: all test still pass |
|
|
Thanks @brianlball and @jmarrec. This one is ready to go. We're still waiting on the macOS GHA run, but unfortunately, there's another project at NLR eating up all of the macOS runner quota. I've spot checked the results locally on my Mac. It builds and local regressions are consistent with the other ones posted online. Merging. |
|
Part 6 of the Remove-fmt campaign (drop vendored
third_party/fmtfor C++20std::format). Converts the S-Z source files; sibling to part 4 (#11619, I*, merged) and part 5 (#11630, J-R, open). No file overlap with part 5.Scope
36 files (S-Z basenames): 855
{:.NR}->{:.Nf}, ~1040EnergyPlus::format/fmt::format->std::format. 0 residual{R}in these files.Kept on original entry point (std::format cannot express)
std::formatter) -> keptEnergyPlus::format: SurfaceGeometry x6 (CalculationMethod), WaterToAirHeatPumpSimple x2 (WAHPType), SteamBaseboardRadiator (EquipType), UnitarySystem (.type), ZoneTempPredictorCorrector (TempControlType).{:2.2F}onstd::string, pre-existing) -> keptEnergyPlus::format(ScheduleManager).fmt::join-> keptfmt::format(ZoneTempPredictorCorrector).Notable
{.0R}(missing colon) ->{:.0f}(WeatherManager) as part of the{R}removal.{R}scientific to{:.Nf}fixed (SimAirServingZones, SimulationManager).{:#G}introduced (it is non-portable:0.500000MSVC/libstdc++ vs0.50000macOS libc++). All conversions are portable{:.Nf}/{:.NE}.Label: Refactoring (matches parts 1-5).