Skip to content
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

Introduce New Pre-Commit Configuration and Documentation #8

Merged
merged 38 commits into from
Jan 4, 2025

Conversation

GatlenCulp
Copy link
Owner

@GatlenCulp GatlenCulp commented Jan 4, 2025

Overview

This pull request introduces a new pre-commit system to enhance code quality and automate checks before committing. Highlights include:

  1. .pre-commit-config.yaml

    • Centralizes hooks for security scanning (GitLeaks), Python linting/formatting (Ruff), JavaScript linting (Biome), notebooks (nbQA), and more.
    • Streamlines standards in a single config file.
  2. Documentation

    • Comprehensive “Pre-commit Hooks Collection” explaining installation, usage, and maintenance.
    • Details each hook, provides alternatives, and clarifies why each tool was selected.
    • Introduces newcomers to pre-commit hooks.
  3. Configurations for Multiple QA Tools

    • Incorporates BiomeJS, MDFormat, and standard commit-message enforcement with Commitizen.
  4. Makefile Integration

    • make pre-commit-test: Tests all hooks.
    • make pre-commit-update: Updates, installs, and tests hooks using the new config.

Commits Summary

Highlights
  • feat: Create new .pre-commit-config.yaml with curated hooks for security, code quality, Git hygiene, commit message standards, etc.
  • docs: Write comprehensive documentation on how to set up and use the new pre-commit system.
  • style: Introduce uniform naming conventions and emojis to label each hook category.
  • chore: Minor housekeeping related to the new pre-commit install scripts.

Testing & Verification

  1. Install or Update Pre-Commit
    pip install pre-commit
    pre-commit install
  2. Validate
    pre-commit run --all-files

Additional Notes

  • No backward compatibility concerns: This is a fresh addition; no existing pre-commit or linting pipeline was replaced.
  • Future Enhancements: Potential to add Pyright for advanced Python type checking once an official hook is available. (More to do 😵‍💫)

@GatlenCulp GatlenCulp marked this pull request as ready for review January 4, 2025 23:11
@GatlenCulp GatlenCulp merged commit 2a69090 into master Jan 4, 2025
3 checks passed
@GatlenCulp GatlenCulp deleted the precommit-hooks branch January 4, 2025 23:11
GatlenCulp added a commit that referenced this pull request Jan 29, 2025
Introduce New Pre-Commit Configuration and Documentation
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.

1 participant