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 .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ ipython_config.py
# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
Expand Down
1 change: 0 additions & 1 deletion .python-version

This file was deleted.

12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
## v0.3.0 (2025-07-31)

### Feat

- **template**: remove python_version variable from cookiecutter
- **template**: remove version from cookiecutter.json

### Fix

- **pyproject**: manage version file with commitizen
- **readme**: usage command urls

## v0.2.0 (2025-07-31)

### Feat
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ If you want to keep your project in sync with this template, you can use
*cruft*.

```bash
cruft create gh:haztecaso/python-template
cruft create https://github.com/haztecaso/python-template
```

Otherwise you can stick with *cookiecutter*.

```bash
cookiecutter gh:haztecaso/python-template
cookiecutter https://github.com/haztecaso/python-template
```

## Features
Expand Down
7 changes: 0 additions & 7 deletions cookiecutter.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,6 @@
"project_name": "My cool python project",
"project_slug": "{{ cookiecutter.project_name.lower().replace(' ', '_').replace('-', '_') }}",
"project_short_description": "Short description",
"version": "0.1.0",
"python_version": [
"3.13",
"3.12",
"3.11",
"3.10"
],
"use_asyncio": "y",
"command_line_interface": [
"click",
Expand Down
2 changes: 1 addition & 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.2.0"
version = "0.3.0"
description = "My personal cookiecutter template for Python"
readme = "README.md"
requires-python = ">=3.13"
Expand Down
2 changes: 1 addition & 1 deletion uv.lock

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

8 changes: 6 additions & 2 deletions {{cookiecutter.project_slug}}/.github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ jobs:
pytest:
name: Run tests
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.10', '3.11', '3.12', '3.13']

steps:
- uses: actions/checkout@v4
Expand All @@ -23,10 +27,10 @@ jobs:
enable-cache: true
cache-dependency-glob: "uv.lock"

- name: "Set up Python"
- name: "Set up Python {% raw -%}${{ matrix.python-version }}{%- endraw %}"
uses: actions/setup-python@v5
with:
python-version-file: "pyproject.toml"
python-version: {% raw -%}${{ matrix.python-version }}{%- endraw %}

- name: Install the project
run: uv sync --all-extras --dev
Expand Down
2 changes: 1 addition & 1 deletion {{cookiecutter.project_slug}}/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ ipython_config.py
# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
Expand Down
1 change: 0 additions & 1 deletion {{cookiecutter.project_slug}}/.python-version

This file was deleted.

2 changes: 1 addition & 1 deletion {{cookiecutter.project_slug}}/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@

pkgs = nixpkgs.legacyPackages.x86_64-linux;

python = pkgs.python{{ cookiecutter.python_version.replace(".", "") }};
python = pkgs.python3;

pythonSet = (pkgs.callPackage pyproject-nix.build.packages {
inherit python;
Expand Down
8 changes: 6 additions & 2 deletions {{cookiecutter.project_slug}}/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[project]
name = "{{ cookiecutter.project_slug }}"
version = "{{ cookiecutter.version }}"
version = "0.1.0"
description = "{{ cookiecutter.project_short_description }}"
readme = "README.md"
requires-python = ">={{ cookiecutter.python_version }}"
requires-python = ">=3.10"
dependencies = [
{%- if cookiecutter.command_line_interface.lower() == "click" %}
"click",
Expand Down Expand Up @@ -78,6 +78,10 @@ version_provider = "uv"
tag_format = "v${version}"
version_scheme = "semver"
update_changelog_on_bump = true
version_files = [
"pyproject.toml:version",
"src/{{ cookiecutter.project_slug }}/version.py",
]

[tool.black]
line-length = 88
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
"""Utilities to retrieve the information of the program version."""

# Do not edit the version manually, let `make bump` do it.

# Do not edit the version manually, let `cz bump` do it.
__version__ = "0.1.0"


Expand Down