-
Notifications
You must be signed in to change notification settings - Fork 52
chore: configure pre-commit hooks for code formatting #103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
4a2919a to
9a95229
Compare
- Install pre-commit when using make setup. - Add pre-commit hooks for Python and Rust code formatting.
9a95229 to
075a26e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be a devel dependency in pyproject.toml
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add a section in the CONTRIBUTING.md to describe and explain what kind of pre-commit changes will be make once a developer configures this pre-commit hook.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are these hooks fully compatible with what we are already formatting via github actions workflow and make check-python/check-rust commands? if not, we need to make them behave the same. And if possible, reuse the same make commands for reusability
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we remove the checks for YAML, JSON, and file validations compared to GitHub Actions? Alternatively, should we add corresponding configurations in GitHub Actions? And I attempted to utilize make check-python, but encountered an issue where mypy did not recognize the configuration from pyproject.toml, which block me reuse make commands。
Codecov Report
All modified and coverable lines are covered by tests ✅
Project coverage is 87.42%. Comparing base (
5bf117a) to head (576f04e).
Report is 49 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@ ## main #103 +/- ## ======================================= Coverage 87.42% 87.42% ======================================= Files 14 14 Lines 700 700 ======================================= Hits 612 612 Misses 88 88
☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.
Uh oh!
There was an error while loading. Please reload this page.
Description
This PR introduces pre-commit hooks to ensure consistent code formatting for both Python and Rust codebases. The changes include:
Related issues: #73
How are the changes test-covered