Skip to content

refactor grid version checks#10

Merged
gauravharsha merged 9 commits intomainfrom
version_checks
Feb 26, 2026
Merged

refactor grid version checks#10
gauravharsha merged 9 commits intomainfrom
version_checks

Conversation

@gauravharsha
Copy link
Contributor

Generalize version check utilities so they can be used in other green packages.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Refactors GRIDS version checking by replacing the previous boolean helper with a generalized version-string comparator and adds an HDF5 results-file version consistency check intended for reuse across other green packages.

Changes:

  • Replace CheckVersion() with compare_version_strings() and update existing version assertions to use numeric comparison results.
  • Add check_grids_version_in_hdf5() to validate __grids_version__ consistency between a results HDF5 file and the current run’s grids version.
  • Introduce outdated_results_file_error and extend tests to cover the new HDF5 version-consistency behavior.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
test/grids_test.cpp Updates version checks to use compare_version_strings() and adds a new HDF5 version-consistency test section.
c++/transformer.cpp Switches transformer grid-file minimum-version enforcement to compare_version_strings().
c++/green/grids/except.h Adds a new exception type for “results file too old” cases.
c++/green/grids/common_defs.h Adds compare_version_strings() and declares check_grids_version_in_hdf5(); adds an HDF5 include.
c++/common_defs.cpp Implements check_grids_version_in_hdf5() using HDF5 attributes and version comparison.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov-commenter
Copy link

codecov-commenter commented Feb 25, 2026

Codecov Report

❌ Patch coverage is 97.67442% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 97.16%. Comparing base (a5846c4) to head (a3f6025).

Files with missing lines Patch % Lines
c++/green/grids/common_defs.h 94.44% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #10      +/-   ##
==========================================
- Coverage   99.40%   97.16%   -2.25%     
==========================================
  Files           8       27      +19     
  Lines         337     1658    +1321     
  Branches        0       60      +60     
==========================================
+ Hits          335     1611    +1276     
- Misses          2       28      +26     
- Partials        0       19      +19     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@egull egull left a comment

Choose a reason for hiding this comment

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

Consider the codecov comments (add tests for the outdated cases) and the copilot comments (awfully particular today). Then merge once happy.

@gauravharsha gauravharsha marked this pull request as ready for review February 25, 2026 21:07
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

gauravharsha and others added 4 commits February 25, 2026 17:31
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@gauravharsha gauravharsha merged commit 1675406 into main Feb 26, 2026
4 checks passed
@gauravharsha gauravharsha deleted the version_checks branch February 26, 2026 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants