Skip to content

Commit

Permalink
Tweak error handling in ConvertInputFormat, bump regression tool vers…
Browse files Browse the repository at this point in the history
…ion for table diff update
  • Loading branch information
Myoldmopar committed Feb 7, 2025
1 parent a402772 commit f5b55ed
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test_pull_requests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ jobs:

- name: Install Regression Tool
if: always() && matrix.run_regressions && steps.branch_build.outcome != 'failure' # always run this step as long as we actually built
run: pip install energyplus-regressions>=2.1.1 # could rely on the requirements.txt file maybe
run: pip install energyplus-regressions>=2.1.2

- name: Run Regressions
if: always() && matrix.run_regressions && steps.branch_build.outcome != 'failure' # always run this step as long as we actually built
Expand Down
2 changes: 0 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# requirements for building an EnergyPlus wheel
wheel

# requirements for the CI regression testing scripts
energyplus-regressions>=2.1.1
12 changes: 9 additions & 3 deletions src/ConvertInputFormat/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -255,12 +255,18 @@ bool processErrors(std::unique_ptr<IdfParser> const &idf_parser, std::unique_ptr
displayMessage(warning);
}
for (auto const &error : validation_errors) {
if (isDDY) {
if ((error.find("Missing required property 'Building'") != std::string::npos) ||
(error.find("Missing required property 'GlobalGeometryRules'") != std::string::npos)) {
bool const missing_building = error.find("Missing required property 'Building'") != std::string::npos;
bool const missing_geometry = error.find("Missing required property 'GlobalGeometryRules'") != std::string::npos;
// if we encountered one of the expected missing building/geometry errors, we should handle them special
if (missing_building || missing_geometry) {
if (isDDY) { // for DDY files just ignore it completely
continue;
}
// for other IDFs, go ahead and emit a message, but don't trigger a failure
displayMessage(error);
continue;
}
// and if it wasn't a missing building or missing geometry error, we will emit that as a proper error and fail
hasValidationErrors = true;
displayMessage(error);
}
Expand Down

3 comments on commit f5b55ed

@nrel-bot-2
Copy link

Choose a reason for hiding this comment

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

CoupleQuickFixes (Myoldmopar) - x86_64-Linux-Ubuntu-24.04-gcc-13.3: OK (2959 of 2959 tests passed, 0 test warnings)

Build Badge Test Badge

@nrel-bot-2
Copy link

Choose a reason for hiding this comment

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

CoupleQuickFixes (Myoldmopar) - x86_64-Linux-Ubuntu-24.04-gcc-13.3-UnitTestsCoverage-RelWithDebInfo: OK (2141 of 2141 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

@nrel-bot-2
Copy link

Choose a reason for hiding this comment

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

CoupleQuickFixes (Myoldmopar) - x86_64-Linux-Ubuntu-24.04-gcc-13.3-IntegrationCoverage-RelWithDebInfo: OK (802 of 802 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

Please sign in to comment.