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
15 changes: 15 additions & 0 deletions template/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,21 @@ check: ## Run code quality tools.
@echo "🚀 Static type checking: Running ty"
@uv run ty check

.PHONY: release-dry
release-dry: ## Simulate the release process and show the next version
@echo "🚀 Simulating release process..."
@uv run semantic-release --noop version --print

.PHONY: release-stable
release-stable: ## Prepare project for stable 1.0.0 release (disables 0.x.x versions)
@echo "🚀 Preparing for stable release..."
@sed -i 's/allow_zero_version = true/allow_zero_version = false/' pyproject.toml
@echo "Updated pyproject.toml: allow_zero_version = false"
@echo "Next steps:"
@echo " 1. git add pyproject.toml"
@echo " 2. git commit -m 'chore: prepare for stable 1.0.0 release'"
@echo " 3. Push to main - the next feat/fix commit will trigger 1.0.0"

.PHONY: test
test: ## Test the code with pytest
@echo "🚀 Testing code: Running pytest"
Expand Down
15 changes: 14 additions & 1 deletion template/pyproject.toml.jinja
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "{{ project_name }}"
version = "0.0.1"
version = "0.0.0"
description = "{{ project_description }}"
authors = [{name = "{{ author_username }}", email = "{{ author_email }}"}]
requires-python = ">=3.10"
Expand All @@ -24,6 +24,7 @@ dev = [
"ty>=0.0.1a16",
"ruff>=0.11.5",
"pytest>=7.2.0",
"python-semantic-release>=10.5.3",
]

[tool.pytest.ini_options]
Expand Down Expand Up @@ -55,6 +56,18 @@ build_command = """
uv build
"""

# Commit parser - this should be at the top level
commit_parser = "conventional"

# Allow 0.x.x versions (prevents jumping straight to 1.0.0)
allow_zero_version = true

# Don't do major version bumps when in 0.x.x
major_on_zero = false

# Tag format
tag_format = "v{version}"

[tool.semantic_release.changelog]
exclude_commit_patterns = [
'''chore(?:\([^)]*?\))?: .+''',
Expand Down