Skip to content

Build a practical Python starter template#1

Merged
techhouse-looper merged 8 commits intomainfrom
feature/python-template-bootstrap
Mar 26, 2026
Merged

Build a practical Python starter template#1
techhouse-looper merged 8 commits intomainfrom
feature/python-template-bootstrap

Conversation

@techhouse-looper
Copy link
Copy Markdown
Owner

Summary

  • turn the repo into a small Python starter with uv, Click, strict checks, and a src/ layout
  • add a compact Makefile, GitHub Actions, and a PR template to keep day-to-day workflow consistent
  • tighten the README and include a tiny hello subcommand as an example CLI pattern

Testing

  • make check
  • make build
  • Other:

Checklist

  • Scope is small and reviewable
  • Docs updated if needed
  • No unrelated changes included

Notes

  • Breaking changes: none
  • Follow-ups: none

Start from a small src-layout package with a Click entry point and tests.
Keep setup, formatting, checks, and lockfile management on a small predictable surface.
Run the quality gate in CI and validate release artifacts with small focused workflows.
Explain the default commands and add a compact PR template for review hygiene.
Make the README sound more like a real starter and less like a template pitch.
Keep the README header a little warmer without making the project feel noisy.
Show a minimal subcommand pattern without turning the template into a demo app.
Copilot AI review requested due to automatic review settings March 26, 2026 17:42
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Converts the repository into a small, strict Python starter template using uv, a src/ layout, Click-based CLI scaffolding, and a consistent local/CI workflow baseline.

Changes:

  • Adds a minimal Click CLI (python-template) with a default “tasks” output and an example hello subcommand.
  • Introduces strict tooling defaults (Ruff, Pyright strict, pytest + coverage) plus a Makefile to standardize common workflows.
  • Adds GitHub Actions workflows (CI, build smoke test, release artifacts) and supporting repo hygiene files (PR template, pre-commit config, lockfile).

Reviewed changes

Copilot reviewed 14 out of 16 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
uv.lock Locks runtime/dev dependencies for uv-based installs.
pyproject.toml Defines packaging (Hatchling), dependencies, scripts, and strict tool configuration (Ruff/Pyright/pytest/coverage).
src/python_template/__main__.py Implements the Click CLI entry point and example command.
src/python_template/__init__.py Exposes the public package surface (__version__).
src/python_template/__about__.py Centralizes version metadata for Hatch dynamic versioning.
tests/test_cli.py Adds regression tests for python -m python_template and version export.
Makefile Provides standard local tasks (setup, format/lint/typecheck/test/build, lock/update).
README.md Documents template goals, quickstart, commands, and layout.
.github/workflows/ci.yml Runs the quality gate across Python 3.11–3.13 with frozen uv installs.
.github/workflows/build.yml Builds artifacts and smoke-tests the wheel installation.
.github/workflows/release.yml Builds and uploads artifacts on version tags.
.pre-commit-config.yaml Adds local Ruff format/lint hooks via uv run.
.gitignore Adds standard Python/tooling ignores plus local automation state.
.python-version Pins a default local Python version for tooling/workflows using python-version-file.
LICENSE Adds MIT license text.
.github/pull_request_template.md Adds a lightweight PR template for consistent submissions.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 95c7666879

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 14 out of 16 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

The quickstart now uses uv-managed module execution so the README works from a fresh checkout without requiring manual virtualenv activation. This keeps the documented path aligned with the project's src layout and setup flow.

Constraint: Quickstart steps should work without requiring manual venv activation
Rejected: Add a separate venv activation step | more shell-specific and easier to skip
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Keep README command examples aligned with the uv-managed workflow unless setup semantics change
Tested: uv run python -m python_template --help; uv run python -m python_template hello; python -m python_template --help (fails as expected without uv run)
Not-tested: Full CI suite (docs-only change)
@techhouse-looper techhouse-looper force-pushed the feature/python-template-bootstrap branch from 9909205 to e6a58b9 Compare March 26, 2026 17:56
@techhouse-looper techhouse-looper merged commit 66bb12a into main Mar 26, 2026
4 checks passed
@techhouse-looper techhouse-looper deleted the feature/python-template-bootstrap branch March 26, 2026 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants