Skip to content

Refactoring green-grids version checks#11

Merged
gauravharsha merged 3 commits intomainfrom
grids-update
Feb 26, 2026
Merged

Refactoring green-grids version checks#11
gauravharsha merged 3 commits intomainfrom
grids-update

Conversation

@gauravharsha
Copy link
Contributor

Moved functions to green-grids for easy use in this package and others. Mainly involves refactoring.

@codecov-commenter
Copy link

codecov-commenter commented Feb 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.48%. Comparing base (1082f3d) to head (90ab4a8).

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.
📢 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

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 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 with green::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.

@gauravharsha gauravharsha requested a review from egull February 26, 2026 15:13
@gauravharsha gauravharsha marked this pull request as ready for review February 26, 2026 15:13
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.

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>
@gauravharsha gauravharsha merged commit c5925f5 into main Feb 26, 2026
1 check passed
@gauravharsha gauravharsha deleted the grids-update branch February 26, 2026 20:10
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