Skip to content

feat(scaffold): pin workspace Python via committed .python-version#7

Merged
bjoaquinc merged 1 commit into
develfrom
feat/scaffold-python-version
Jul 1, 2026
Merged

feat(scaffold): pin workspace Python via committed .python-version#7
bjoaquinc merged 1 commit into
develfrom
feat/scaffold-python-version

Conversation

@bjoaquinc

Copy link
Copy Markdown
Collaborator

Summary

Ships a committed .python-version (pinned to 3.13) in the minimal workspace and removes the matching .gitignore entry so the pin is tracked. New workspaces get a self-contained, reproducible venv — uv auto-provisions the interpreter on uv sync if it isn't installed.

This matches uv's own convention: uv init creates a .python-version (default content 3.13) and its generated .gitignore deliberately does not ignore it. Our scaffold previously ignored it only because its .gitignore derives from GitHub's generic Python.gitignore template (the pyenv-era convention).

Version choice (3.13): it's what the scaffold already resolves to today (no first-run regression), matches uv init's default, sits within dlt[hub]'s >=3.10,<3.15 support, and satisfies every scaffold dep (incl. mowidgets, which needs 3.11+).

Changes

  • New src/dlthub_init/scaffolds/minimal_workspace/.python-version3.13.
  • Scaffold .gitignore: removed the # pyenv / .python-version lines.
  • tests/test_scaffold.py: added .python-version to the pinned EXPECTED set.
  • CHANGELOG entry under [Unreleased] → Added.

Non-destructive: an existing .python-version in a target dir is left untouched (classified SKIP), so users can override the pin.

Testing

  • make test ✅ (103 passed)
  • Live scaffold (dlthub-init … --no-sync): generated workspace contains .python-version = 3.13 and its .gitignore no longer ignores it.

🤖 Generated with Claude Code

Ship a .python-version (3.13) in the minimal workspace and drop the matching
.gitignore entry so the pin is tracked — matching uv's own 'uv init' convention.
Gives new workspaces a self-contained, reproducible venv; uv auto-provisions the
interpreter on 'uv sync'. Existing .python-version files are left untouched.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@bjoaquinc
bjoaquinc requested a review from tetelio July 1, 2026 10:40
@bjoaquinc
bjoaquinc merged commit 462607c into devel Jul 1, 2026
4 checks passed
@bjoaquinc
bjoaquinc deleted the feat/scaffold-python-version branch July 1, 2026 10:43
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