Skip to content

level12/pre-commit-hooks

Repository files navigation

pre-commit-hooks

CircleCI

Usage

Ruff needs to be specified as a dependency in a Python package's uv.lock or requirements/dev.txt.

Then, in .pre-commit-config.yaml:

---
repos:
  - repo: https://github.com/charliermarsh/ruff-pre-commit
    rev: v0.9.7
    hooks:
      - id: ruff
      - id: ruff-format
        args: [ --check ]
  - repo: https://github.com/level12/pre-commit-hooks
    rev: v0.20250226.1
    hooks:
      - id: check-ruff-versions
      # OPTIONAL: if you have a non-typical repo where the python packages are not in the root
      # and/or you have more than one package.  Most projects will not add these args.
      - args: [--package, foo-pkg, --package, bar-pkg]

Dev

Copier Template

Project structure and tooling mostly derives from the Coppy, see its documentation for context and additional instructions.

This project can be updated from the upstream repo, see Updating a Project.

Project Setup

From zero to hero (passing tests that is):

  1. Ensure host dependencies are installed

  2. Start docker service dependencies (if applicable):

    docker compose up -d

  3. Sync project virtualenv w/ lock file:

    uv sync

  4. Configure pre-commit:

    pre-commit install

  5. Run tests:

    nox

Versions

Versions are date based. A bump action exists to help manage versions:

  # Show current version
  mise bump --show

  # Bump version based on date, tag, and push:
  mise bump

  # See other options
  mise bump -- --help

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published