Add pre-commit config and CI check - #167
Open
jeanbez wants to merge 1 commit into
Open
Conversation
Wires up a local + CI pre-commit runner so contributors can catch
formatting drift and basic sanity errors before pushing.
Hooks (h5bench-owned code only; vendored amrex/e3sm/macsio/openpmd
are excluded):
* check-yaml, check-json, check-merge-conflict, check-added-large-files
* clang-format v10 to match the existing clang-format-check workflow's
scope and version
* flake8 scoped to src/*.py to match the existing lint.yml
trailing-whitespace and end-of-file-fixer are intentionally NOT added
in this PR. The tree has ~90 files with trailing whitespace and ~62
without a final newline (workflows, dockerfiles, README, docs); a
separate cleanup sweep can add those hooks after fixing the tree in
one go, so this PR stays focused.
Local usage:
pip install pre-commit
pre-commit install
pre-commit run --all-files
jeanbez
force-pushed
the
precommit-config
branch
from
August 19, 2026 05:44
ab1db0a to
794d3be
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #167 +/- ##
========================================
Coverage 58.85% 58.85%
========================================
Files 14 14
Lines 6062 6062
Branches 1427 1427
========================================
Hits 3568 3568
Misses 1917 1917
Partials 577 577
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
jeanbez
marked this pull request as ready for review
August 22, 2026 00:03
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Wave D item 21. Wires up pre-commit so contributors catch formatting drift and basic sanity errors before pushing, and CI enforces the same set.
Summary
Hooks (h5bench-owned code only; vendored `amrex`/`e3sm`/`macsio`/`openpmd` excluded via top-level `exclude:`):
`trailing-whitespace` and `end-of-file-fixer` are intentionally out of scope for this PR: the tree has ~90 files with trailing whitespace and ~62 missing a final newline that would need a separate cleanup sweep first. Track as a follow-up.
Local usage
```
pip install pre-commit
pre-commit install
pre-commit run --all-files
```
Test plan