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
4 changes: 4 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,9 @@ jobs:
- name: Root/template sync policy check
run: uv run python scripts/check_root_template_sync.py

# no-commit-to-branch blocks direct commits to main; SKIP avoids false failures when
# checkout is on main (e.g. post-merge push) while still running the hook on git commit.
- name: Pre-commit (all files)
env:
SKIP: no-commit-to-branch
run: uv run pre-commit run --all-files
10 changes: 5 additions & 5 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ cz-commit:
@uv run cz commit

precommit:
@uv run pre-commit run --all-files
@SKIP=no-commit-to-branch uv run pre-commit run --all-files

# Dependency audit matching .github/workflows/security.yml (pip-audit).
# Uses ``uv run --with pip-audit`` so the tool runs with the project Python (``uv tool run``/``uvx``
Expand Down Expand Up @@ -274,7 +274,7 @@ check:
@just sync-check
@just docs-check
@just test-ci
@uv run pre-commit run --all-files
@SKIP=no-commit-to-branch uv run pre-commit run --all-files
# @just audit

ci:
Expand Down Expand Up @@ -324,9 +324,9 @@ doctor:
# - Push permissions to main branch
#
# Usage:
# just release patch # v0.0.8 → v0.0.9 (bug fixes)
# just release minor # v0.0.8 → v0.1.0 (new features)
# just release major # v0.0.8 → v1.0.0 (breaking changes)
# just release patch # v0.0.9 → v0.0.10 (bug fixes)
# just release minor # v0.0.9 → v0.1.0 (new features)
# just release major # v0.0.9 → v1.0.0 (breaking changes)
release BUMP_TYPE="patch":
@echo "=== Release Workflow ==="
@echo "Release type: {{BUMP_TYPE}}"
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 = "python_project_template"
version = "0.0.8"
version = "0.0.9"
description = "Copier template repository for generating uv-first Python projects."
readme = "README.md"
requires-python = ">=3.11"
Expand Down
4 changes: 4 additions & 0 deletions template/.github/workflows/ci.yml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,11 @@ jobs:
- name: Install dependencies
run: uv sync --frozen --extra dev --extra test{% if include_docs %} --extra docs{% endif %}

# no-commit-to-branch blocks direct commits to main; SKIP avoids false failures when
# checkout is on main (e.g. post-merge push) while still running the hook on git commit.
- name: Pre-commit (all files)
env:
SKIP: no-commit-to-branch
run: uv run pre-commit run --all-files

test:
Expand Down
4 changes: 2 additions & 2 deletions template/justfile.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ cz-commit:
@uv run cz commit

precommit:
@uv run pre-commit run --all-files
@SKIP=no-commit-to-branch uv run pre-commit run --all-files

# Dependency audit matching .github/workflows/security.yml (pip-audit).
# Uses ``uv run --with pip-audit`` so the tool runs with the project Python (``uv tool run``/``uvx``
Expand Down Expand Up @@ -266,7 +266,7 @@ check:
@uv run basedpyright
@just docs-check
@just test-ci
@uv run pre-commit run --all-files
@SKIP=no-commit-to-branch uv run pre-commit run --all-files

ci:
@just fix
Expand Down
2 changes: 2 additions & 0 deletions tests/integration/test_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -1568,6 +1568,7 @@ def test_ci_workflow_aligns_with_just_ci(tmp_path: Path) -> None:
"Aggregate check must gate on pre-commit alongside lint, typecheck, and tests"
)
assert "uv run pre-commit run --all-files" in workflow
assert "SKIP: no-commit-to-branch" in workflow
assert "uv run ruff format --check src tests" in workflow
assert "uv run ruff check src tests" in workflow
assert (
Expand All @@ -1582,6 +1583,7 @@ def test_ci_workflow_aligns_with_just_ci(tmp_path: Path) -> None:
in justfile
)
assert "@just test-ci" in justfile
assert "SKIP=no-commit-to-branch uv run pre-commit run --all-files" in justfile

lint_yml = (test_dir / ".github" / "workflows" / "lint.yml").read_text(encoding="utf-8")
assert "uv run ruff format --check src tests" in lint_yml
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.

Loading