Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: test

on:
push:
branches: [ "main", "develop" ]
branches: [ "main" ]
pull_request:
branches: [ "main", "develop" ]

Expand Down
18 changes: 18 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-added-large-files
args: ['--maxkb=5000']
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-executables-have-shebangs

- repo: local
hooks:
- id: commitizen
name: commitizen
entry: cz check
args: [--allow-abort, --commit-msg-file]
language: python
stages: [commit-msg]
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
## v0.2.0 (2025-07-31)

### Feat

- add pre-commit and commitizen into template repo
- add commitizen support
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ A modern cookiecutter template for Python projects using `uv` as the package man
### Creating a new project

If you want to keep your project in sync with this template, you can use
*cruft*.
*cruft*.

```bash
cruft create gh:haztecaso/python-template
Expand All @@ -41,6 +41,7 @@ cookiecutter gh:haztecaso/python-template
- flake8 for code quality checks
- pyright for static type checking
- 🪝 **Git Hooks**: Automated quality checks with pre-commit
- 📝 **Conventional Commits**: Standardized commit messages with commitizen
- 🤖 **CI Pipeline**: GitHub Actions workflow for automated testing
- 🧰 **CLI Support**: Optional command-line interface scaffolding with click or argparse
- 📚 **Documentation**: Optional MkDocs setup with automatic API documentation generation and GitHub Pages deployment
Expand All @@ -57,4 +58,3 @@ cookiecutter gh:haztecaso/python-template
- 🐳 **Containerization**: Dockerfile and docker-compose setup
- 🔄 **Enhanced CI**: GitHub Action test matrix for multi-environment testing
- 🐍 **PyPy**: Registry setup and GitHub Action for multi-interpreter testing

17 changes: 16 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "cookiecutter-haztecaso-python"
version = "0.1.0"
version = "0.2.0"
description = "My personal cookiecutter template for Python"
readme = "README.md"
requires-python = ">=3.13"
Expand All @@ -13,7 +13,9 @@ build-backend = "hatchling.build"
[dependency-groups]
dev = [
"black>=25.1.0",
"commitizen>=3.13.0",
"isort>=6.0.1",
"pre-commit>=3.6.0",
"pytest-cookies",
]

Expand All @@ -37,3 +39,16 @@ include = [
testpaths = [ "tests" ]
norecursedirs = [ "{{cookiecutter.project_slug}}" ]

[tool.commitizen]
version_provider = "uv"
tag_format = "v${version}"
version_scheme = "semver"
update_changelog_on_bump = true

[tool.black]
line-length = 88
target-version = ['py310', 'py311', 'py312', 'py313']
include = '\.pyi?$'

[tool.isort]
profile = "black"
193 changes: 192 additions & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.