LLM-VM
LLM-VM copied to clipboard
Add Pre-commit Support for Code Quality Assurance
Description:
To ensure consistent code quality and style across the repository, I propose adding pre-commit support. Pre-commit hooks can help automate several tasks before commits, such as code formatting, linting, and running basic tests.
Benefits:
-
Consistent Code Style: By using tools like
blackoryapf, we can ensure that the codebase has a consistent style, making it more readable and maintainable. -
Catch Issues Early: Linters like
flake8orpylintcan catch common Python mistakes before they're committed. - Automate Processes: Instead of manually running formatters or linters, developers can rely on these tools to run automatically, ensuring that only quality code gets committed.
- Reduce Review Overhead: With automated checks in place, code reviewers can focus on the logic and structure of the code rather than style or basic issues.
Proposed Steps:
- Add a
.pre-commit-config.yamlfile to the root of the repository. - Define the desired hooks, such as
black,flake8, etc. - Update the
README.mdor contributing guidelines to instruct developers on how to set up pre-commit in their local development environment. - Optionally, integrate with CI/CD to ensure that commits and PRs adhere to the defined hooks.
Additional Resources:
I believe that adding pre-commit support will significantly enhance our development workflow and ensure a higher code quality standard. Looking forward to feedback on this proposal!
We may need CI hooks first
I'd be interested in working on this. I can do both the linting config + CI via Github Actions.