Refactoring green-grids version checks#11
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #11 +/- ##
==========================================
+ Coverage 95.65% 96.48% +0.83%
==========================================
Files 10 10
Lines 690 654 -36
==========================================
- Hits 660 631 -29
+ Misses 30 23 -7 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Refactors the self-consistency restart grid-version compatibility checks by delegating the HDF5/version validation logic (and associated exception type) to green-grids, reducing duplication inside green-sc.
Changes:
- Replaced
sc_loop’s local grid-version consistency checker withgreen::grids::check_grids_version_in_hdf5(...). - Moved/removed SC-local version compare utilities and the SC-local
outdated_results_file_error, updating tests to expect the grids-level exception.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
test/sc_test.cpp |
Updates the expected exception type to green::grids::outdated_results_file_error during restart mismatch testing. |
src/green/sc/sc_loop.h |
Replaces internal version-consistency logic with a call into green-grids. |
src/green/sc/except.h |
Removes green::sc::outdated_results_file_error from the SC public exception set. |
src/green/sc/common_defs.h |
Removes the SC-local compare_version_strings utility. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
egull
left a comment
There was a problem hiding this comment.
Just of for it, after considering the optional copilot changes (note that they would also have to be done in ac)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Moved functions to green-grids for easy use in this package and others. Mainly involves refactoring.