Conversation
There was a problem hiding this comment.
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()withcompare_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_errorand 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 Report❌ Patch coverage is
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. 🚀 New features to boost your workflow:
|
egull
left a comment
There was a problem hiding this comment.
Consider the codecov comments (add tests for the outdated cases) and the copilot comments (awfully particular today). Then merge once happy.
There was a problem hiding this comment.
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.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Generalize version check utilities so they can be used in other green packages.