Skip to content

Fix #11267 - Ensure consistency of IDF file formats for easier diffing#11268

Merged
mitchute merged 13 commits intodevelopfrom
11267_format_idfs
Oct 24, 2025
Merged

Fix #11267 - Ensure consistency of IDF file formats for easier diffing#11268
mitchute merged 13 commits intodevelopfrom
11267_format_idfs

Conversation

@jmarrec
Copy link
Contributor

@jmarrec jmarrec commented Oct 10, 2025

Pull request overview

Description of the purpose of this PR

  • Added a specifically configured Transition tool that only does MakingPretty
  • Applied to the repo, and manually fixed a bunch of problems.

In particular I had about 50 files failures, and after a lot of effort I isolated the issue: the tool removed some coils

{'Coil:Cooling:DX:VariableSpeed',
 'Coil:Cooling:WaterToAirHeatPump:EquationFit',
 'Coil:Cooling:WaterToAirHeatPump:ParameterEstimation',
 'Coil:Cooling:WaterToAirHeatPump:VariableSpeedEquationFit',
 'Coil:Heating:DX:VariableSpeed',
 'Coil:Heating:WaterToAirHeatPump:EquationFit',
 'Coil:Heating:WaterToAirHeatPump:ParameterEstimation',
 'Coil:Heating:WaterToAirHeatPump:VariableSpeedEquationFit',
 'Coil:WaterHeating:AirToWaterHeatPump:Pumped',
 'Coil:WaterHeating:AirToWaterHeatPump:VariableSpeed',
 'Coil:WaterHeating:AirToWaterHeatPump:Wrapped',
 'ThermalStorage:HotWater:Stratified'}

Pull Request Author

  • Title of PR should be user-synopsis style (clearly understandable in a standalone changelog context)
  • Label the PR with at least one of: Defect, Refactoring, NewFeature, Performance, and/or DoNoPublish
  • Pull requests that impact EnergyPlus code must also include unit tests to cover enhancement or defect repair
  • Author should provide a "walkthrough" of relevant code changes using a GitHub code review comment process
  • If any diffs are expected, author must demonstrate they are justified using plots and descriptions
  • If changes fix a defect, the fix should be demonstrated in plots and descriptions
  • If any defect files are updated to a more recent version, upload new versions here or on DevSupport
  • If IDD requires transition, transition source, rules, ExpandObjects, and IDFs must be updated, and add IDDChange label
  • If structural output changes, add to output rules file and add OutputChange label
  • If adding/removing any LaTeX docs or figures, update that document's CMakeLists file dependencies

Reviewer

  • 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

```
git diff -U0 | grepdiff 'Watts per Zone' --output-matching=hunk | git apply --cached --unidiff-zero
git diff -U0 | grepdiff 'Rate per Exterior' --output-matching=hunk | git apply --cached --unidiff-zero
```

more

```
git diff -U0 | grepdiff 'Zone Load Sizing Method' --output-matching=hunk | git apply --cached --unidiff-zero
git diff -U0 | grepdiff 'Coefficient1 Constant' --output-matching=hunk | git apply --cached --unidiff-zero
[etc]
```
Then I manually added the rest of the formatting changes
…ableSpeed and WaterToAir[chore] HeatPump and AirToWaterHeatPump and PCM coils

```
{'Coil:Cooling:DX:VariableSpeed',
 'Coil:Cooling:WaterToAirHeatPump:EquationFit',
 'Coil:Cooling:WaterToAirHeatPump:ParameterEstimation',
 'Coil:Cooling:WaterToAirHeatPump:VariableSpeedEquationFit',
 'Coil:Heating:DX:VariableSpeed',
 'Coil:Heating:WaterToAirHeatPump:EquationFit',
 'Coil:Heating:WaterToAirHeatPump:ParameterEstimation',
 'Coil:Heating:WaterToAirHeatPump:VariableSpeedEquationFit',
 'Coil:WaterHeating:AirToWaterHeatPump:Pumped',
 'Coil:WaterHeating:AirToWaterHeatPump:VariableSpeed',
 'Coil:WaterHeating:AirToWaterHeatPump:Wrapped',
 'ThermalStorage:HotWater:Stratified'}
```
@jmarrec jmarrec self-assigned this Oct 10, 2025
@jmarrec jmarrec added Defect Includes code to repair a defect in EnergyPlus DoNotPublish Includes changes that shouldn't be reported in the changelog NotIDDChange Code does not impact IDD (can be merged after IO freeze) Developer Issue Related to cmake, packaging, installers, or developer tooling (CI, etc) labels Oct 10, 2025
@github-actions
Copy link

⚠️ Regressions detected on ubuntu-24.04 for commit ab54ac8

Regression Summary
  • IDF: 5

@github-actions
Copy link

⚠️ Regressions detected on macos-14 for commit ab54ac8

Regression Summary
  • IDF: 5

Copy link
Collaborator

@mitchute mitchute left a comment

Choose a reason for hiding this comment

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

I like adding some consistency to these.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I guess we would just run this on our own occasionally, or it is going to be part of a more formal check? Would it be fast enough to run as part of our ./scripts/dev/apply_formatting.sh cleanup?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No. It takes way too long. Like 1.5 hours. And that's why 16 processes running in parallel in a temp folder. It's horrendous. The Transition utilities are really really bad in terms of performance.

Eventually we'll write up a python script to do at least the formatting part.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Now that I've already pushed, I'm realizing that I didn't actually run this script. I just ran the new transition exe directly.

Comment on lines -18 to -20
! Version,
! 9.0; !- Version Identifier

Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm debating whether it would be useful to keep the version identifiers here and in other files that are just IDF object holders, and not really simulation input files.

Copy link
Collaborator

Choose a reason for hiding this comment

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

If the version object and number was in those files, wouldn't the transition program work on them?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If the version objects are not in there, the transition still happens. It'll just add the Transition's version as a comment.

So you'd end up with

!  Version,
!    9.0;                    !- Version Identifier

!  Version,
!    25.2;                    !- Version Identifier

@mitchute
Copy link
Collaborator

Now the next can of 🪱 🪱 🪱 ... what about the IDF objects in the unit tests and docs??

@jmarrec
Copy link
Contributor Author

jmarrec commented Oct 16, 2025

Now the next can of 🪱 🪱 🪱 ... what about the IDF objects in the unit tests and docs??

Yeah that's a much harder problem to solve.
The docs would be outdated, and probably already are in a lot of places
The tests would at least fail if the fields aren't in line, regardless the the comments.

Copy link
Collaborator

@mitchute mitchute left a comment

Choose a reason for hiding this comment

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

I ran the new transition exe locally, and it all looks OK. Unless I hear otherwise, I think we can merge this if CI passes.

@@ -301,8 +298,8 @@
0.03, !- Sandia Database Parameter c5 {dimensionless}
33.8, !- Sandia Database Parameter Ix0
Copy link
Collaborator

Choose a reason for hiding this comment

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

These should probably be tagged with \unit A at some point.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Now that I've already pushed, I'm realizing that I didn't actually run this script. I just ran the new transition exe directly.

@github-actions
Copy link

⚠️ Regressions detected on macos-14 for commit dc8b312

Regression Summary
  • IDF: 5

@github-actions
Copy link

⚠️ Regressions detected on ubuntu-24.04 for commit dc8b312

Regression Summary
  • IDF: 5

@mitchute mitchute added this to the EnergyPlus 25.2 milestone Oct 22, 2025
@mitchute mitchute merged commit 4f5c971 into develop Oct 24, 2025
11 checks passed
@mitchute mitchute deleted the 11267_format_idfs branch October 24, 2025 03:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Defect Includes code to repair a defect in EnergyPlus Developer Issue Related to cmake, packaging, installers, or developer tooling (CI, etc) DoNotPublish Includes changes that shouldn't be reported in the changelog NotIDDChange Code does not impact IDD (can be merged after IO freeze)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ensure consistency of IDF file formats for easier diffing

5 participants