Skip to content

chore: add .python-version to templates missing it - #154

Closed
dchaudhari7177 wants to merge 1 commit into
Create-Python-App:mainfrom
dchaudhari7177:chore/python-version-files
Closed

chore: add .python-version to templates missing it#154
dchaudhari7177 wants to merge 1 commit into
Create-Python-App:mainfrom
dchaudhari7177:chore/python-version-files

Conversation

@dchaudhari7177

@dchaudhari7177dchaudhari7177 commented Aug 6, 2026

Copy link
Copy Markdown

Closes#153.

Adds .python-version to the five templates that were missing it. Single PR covering all of them, since the change is one identical file each.

Version chosen

3.12, matching each template's own manifest rather than picking a number:

Templaterequires-pythonSource
celery-worker>=3.12pyproject.toml
cli-starter>=3.12pyproject.toml.template
django-api>=3.12pyproject.toml
fastapi-starter>=3.12pyproject.toml
mlops-sklearn-starter>=3.12pyproject.toml

cli-starter was the one worth double-checking — it ships pyproject.toml.template rather than a plain pyproject.toml, so a grep requires-python templates/*/pyproject.toml misses it. It declares >=3.12 too.

uv-workspace-starter already had the file and is untouched.

Matching the reference implementation

The new files are byte-identical to the existing uv-workspace-starter/.python-version3.12 plus a trailing newline, LF. I checked the committed blob rather than the working copy, since git's autocrlf shows CRLF on checkout here:

$ git show HEAD:templates/uv-workspace-starter/.python-version | xxd
00000000: 332e 3132 0a 3.12.

Verified

The audit in the issue matches what's on disk — I re-ran it before writing anything, and all five were genuinely missing.

python scripts/ci/validate-registry.py passes: ✅ registry ok (6 templates, 18 extensions).

Small aside, unrelated to this change and not something I've touched: that script crashes on Windows under a non-UTF-8 locale because it prints to a cp1252 stdout. PYTHONUTF8=1 works around it, and CI is Linux so it's green there. Happy to send a one-line fix separately if it's worth having.

Summary by CodeRabbit

  • Configuration
    • Standardized the Python version for Celery worker, CLI, Django API, FastAPI, and MLOps starter templates to Python 3.12.
    • Improved consistency when setting up and running these templates.

Only uv-workspace-starter shipped one, so entering a scaffolded project from
any of the other five left pyenv and 'uv python pin' with nothing to resolve
against.
Add .python-version containing 3.12 to celery-worker, cli-starter, django-api,
fastapi-starter and mlops-sklearn-starter. Every one of them declares
requires-python = ">=3.12" (cli-starter in pyproject.toml.template), so the pin
matches the manifest rather than guessing, and matches the existing
uv-workspace-starter file byte for byte.
ClosesCreate-Python-App#153
@coderabbitai

coderabbitaiBot commented Aug 6, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 94b042c3-bef7-4a7d-8356-6a38f08343f3

📥 Commits

Reviewing files that changed from the base of the PR and between 6986f9b and df3d45c.

📒 Files selected for processing (5)
  • templates/celery-worker/.python-version
  • templates/cli-starter/.python-version
  • templates/django-api/.python-version
  • templates/fastapi-starter/.python-version
  • templates/mlops-sklearn-starter/.python-version

📝 Walkthrough

Walkthrough

The five templates now include .python-version files that specify Python 3.12.

Changes

Template Python Version Pinning

Layer / File(s)Summary
Add Python version files
templates/*/.python-version
The Celery worker, CLI starter, Django API, FastAPI starter, and MLOps scikit-learn templates specify Python 3.12.

Estimated code review effort: 1 (Trivial) | ~2 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check nameStatusExplanation
Description Check✅ PassedCheck skipped - CodeRabbit’s high-level summary is enabled.
Title check✅ PassedThe title clearly describes adding .python-version files to templates missing them.
Linked Issues check✅ PassedThe changes add 3.12 .python-version files to all five templates required by issue #153.
Out of Scope Changes check✅ PassedAll changes are limited to the five template version files specified by issue #153.
Docstring Coverage✅ PassedNo functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@ulises-jeremias

ulises-jeremias commented Aug 9, 2026

Copy link
Copy Markdown
Member

Thanks @dchaudhari7177 for the contribution — closing as duplicate of #159 which already covers #152 (.python-version) and #153 (.editorconfig) in a single combined PR by @emberb170d. Consolidating there to avoid 5 parallel PRs on the same scope. If your implementation has a distinct detail, please comment on #159. 🙏

Sign up for freeto 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.

chore: add .python-version to templates missing it

2 participants

@dchaudhari7177@ulises-jeremias