Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Note: This file applies to the Python project template itself.
# Projects generated from this template will have their own version of this file.

# See https://pre-commit.com for more information
# See https://prek.j178.dev/ for more information
# See https://pre-commit.com/hooks.html for more hooks

repos:
Expand Down Expand Up @@ -37,6 +37,6 @@ repos:
args: [ --show-severity, --ignore-unfixed, --severity=medium ]

- repo: https://github.com/mrtazz/checkmake.git
rev: 0.2.2
rev: v0.3.2
hooks:
- id: checkmake
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ install: check-uv pyproject.toml ## Synchronize dependencies

.PHONY: init
init: check-uv pyproject.toml .pre-commit-config.yaml install ## Initialize project (first installation)
uv run -- pre-commit install
uv run -- prek install

.PHONY: test
test: check-uv tests ## Run tests with coverage
uv run -- pytest

.PHONY: precommit
precommit: check-uv install ## Run pre-commit on all files
uv run -- pre-commit run --all-files
uv run -- prek run --all-files

.PHONY: check
check: check-uv install ## Run all checks (precommit + test)
Expand Down
6 changes: 6 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres
to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.2.0] - 2026-03-30

### Changed

- Replace pre-commit by prek

## [2.1.2] - 2026-03-27

### Changed
Expand Down
4 changes: 2 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
[![ty](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ty/main/assets/badge/v0.json)](https://github.com/astral-sh/ty)
![License](https://img.shields.io/badge/GPL--3.0-red?logo=gnu)
[![EditorConfig](https://img.shields.io/badge/EditorConfig-333333?logo=editorconfig)](https://editorconfig.org/)
[![Pre-commit](https://img.shields.io/badge/pre--commit-40332E?logo=pre-commit)](https://pre-commit.com/)
[![Prek](https://img.shields.io/badge/prek-F54327?logo=prek)](https://prek.j178.dev/)
[![Makefile](https://img.shields.io/badge/Makefile-427819?logo=gnu)](https://www.gnu.org/software/make/manual/make.html)

A modern Copier template for creating standardized Python packages and
Expand All @@ -18,7 +18,7 @@ applications with best practices.
management and virtual environments
- 📦 **Standardized project structure** following best practices for Python
packages
- 💅 **Code quality** with pre-commit, well configured Ruff (formatter & linter) and Ty (type checker)
- 💅 **Code quality** with prek(pre-commit), well configured Ruff (formatter & linter) and Ty (type checker)
- 🧪 **Testing** setup with pytest and coverage reports
- 📝 **Documentation** with MkDocs and Material theme, including well-structured
README and CHANGELOG
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

[project]
name = "python-project-template"
version = "2.1.2"
version = "2.2.0"
description = "A Copier template for modern Python projects"
authors = [
{ name = "Inokufu", email = "contact@inokufu.com" }
Expand All @@ -16,7 +16,7 @@ dependencies = []
[dependency-groups]
dev = [
"copier>=9.14.0,<9.15.0",
"pre-commit>=4.5.1,<4.6.0",
"prek>=0.3.8,<0.3.9",
"pytest>=9.0.2,<9.1.0",
"ruff>=0.15.8,<0.15.9",
]
Expand Down
8 changes: 4 additions & 4 deletions template/.github/workflows/ci.yml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ jobs:
- name: Install dependencies
run: make install

- name: Cache pre-commit
- name: Cache prek
uses: actions/cache@v4
with:
path: ~/.cache/pre-commit
key: pre-commit-{% raw %}${{ hashFiles('.pre-commit-config.yaml') }}{% endraw %}
path: ~/.cache/prek
key: prek-{% raw %}${{ hashFiles('.pre-commit-config.yaml') }}{% endraw %}

- name: Run pre-commit checks
- name: Run prek checks
run: make precommit

- name: Lint GitHub Actions
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# See https://pre-commit.com for more information
# See https://prek.j178.dev/ for more information
# See https://pre-commit.com/hooks.html for more hooks

repos:
Expand Down Expand Up @@ -46,7 +46,7 @@ repos:
args: [ --show-severity, --ignore-unfixed, --severity=medium ]

- repo: https://github.com/mrtazz/checkmake.git
rev: 0.2.2
rev: v0.3.2
hooks:
- id: checkmake

Expand Down
6 changes: 3 additions & 3 deletions template/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ install: check-uv pyproject.toml ## Synchronize dependencies

.PHONY: init
init: check-uv pyproject.toml .pre-commit-config.yaml install ## Initialize project (first installation)
uv run -- pre-commit install
uv run -- prek install
cp .env.example .env || true

.PHONY: format
Expand All @@ -47,8 +47,8 @@ diff-cover: check-uv test coverage.xml ## Show code coverage for recent changes
uv run -- diff-cover coverage.xml

.PHONY: precommit
precommit: check-uv install ## Run pre-commit on all files
uv run -- pre-commit run --all-files
precommit: check-uv install ## Run prek on all files
uv run -- prek run --all-files

.PHONY: check
check: check-uv install ## Run all checks (precommit + test)
Expand Down
4 changes: 2 additions & 2 deletions template/docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ This project uses EditorConfig to maintain consistent coding styles.
Find plugin for your editor at [editorconfig.org](https://editorconfig.org/#download)

### Pre-commit Hooks
This project uses pre-commit to enforce code quality checks before each commit.
This project uses prek to enforce code quality checks before each commit.

### Pre-commit hooks installed
- Code formatting with Ruff
Expand Down Expand Up @@ -121,7 +121,7 @@ make help
| format | Format code |
| lint | Run linting checks |
| test | Run tests with coverage |
| precommit | Run pre-commit on all files |
| precommit | Run prek on all files |
| check | Run all checks (precommit + test) |
| build | Build package |
| docs | Build documentation |
Expand Down
2 changes: 1 addition & 1 deletion template/docs/README.md.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
[![uv](https://img.shields.io/badge/uv-261230?logo=astral)](https://docs.astral.sh/uv/)
[![Ruff](https://img.shields.io/badge/Ruff-3A3A3A?logo=ruff)](https://docs.astral.sh/ruff/)
[![ty](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ty/main/assets/badge/v0.json)](https://github.com/astral-sh/ty)
[![Pre-commit](https://img.shields.io/badge/pre--commit-40332E?logo=pre-commit)](https://pre-commit.com/)
[![Prek](https://img.shields.io/badge/prek-F54327?logo=prek)](https://prek.j178.dev/)
[![Makefile](https://img.shields.io/badge/Makefile-427819?logo=gnu)](https://www.gnu.org/software/make/manual/make.html)
[![MkDocs](https://img.shields.io/badge/MkDocs-526CFE?logo=markdown)](https://www.mkdocs.org/)

Expand Down
2 changes: 1 addition & 1 deletion template/pyproject.toml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ dev = [
"mkdocs>=1.6.1,<1.7.0",
"mkdocs-material>=9.7.6,<9.8.0",
"mkdocstrings-python>=2.0.3,<2.1.0",
"pre-commit>=4.5.1,<4.6.0",
"prek>=0.3.8,<0.3.9",
"pytest>=9.0.2,<9.1.0",
"pytest-cov>=7.1.0,<7.2.0",
"pytest-mock>=3.15.1,<3.16.0",
Expand Down
2 changes: 1 addition & 1 deletion tests/commands_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def test_make_init(self, generated_project: Path) -> None:
"""Test that 'make init' works."""
result = self.run_make_command(generated_project, "init")
assert (
"pre-commit install" in result.stdout
"prek install" in result.stdout
or "Initializing project" in result.stdout
)

Expand Down
Loading