Incorporate #306: adapt template for source-only Python repos - #307
Conversation
Template gaps surfaced adapting the template to a source-only, uv-managed Python repo (Financial-Modeling) that never publishes to PyPI. Addresses #306: - .editorconfig: correct the "mirroring .gitattributes" comment - the workflow-YAML LF pins are .editorconfig-only (git passive, CI-enforced), not shared with .gitattributes; distinguish the shared pins from those. - .editorconfig + .gitattributes: pin uv.lock to LF. uv regenerates it with LF on every platform, so a CRLF-default repo reds CI on every uv lock/sync until reconverted - same rationale as the shebang/Dockerfile pins. - catalog: add vscode-tasks-python.json - the Python equivalent of the .NET tasks snippet, all type:process (no && chaining, which Windows PowerShell 5.1 rejects); ruff/type-check/pytest plus the shared Docker Lint group. - CODESTYLE.md: make the Python section adapt-before-propagate. Add an adaptation callout (type checker in CI, deps declaration, versioning/ publishing, disabled markdownlint rules, VS Code config home) and soften the universal pyright-strict / PyPI / _version.py / [dependency-groups] claims so a source-only mypy-in-CI PEP-621 repo is a first-class profile. - CODESTYLE.md: state VS Code config placement explicitly - settings/ extensions may live in .vscode/*.json or the workspace file; tasks/launch/ debug can only be external .vscode/*.json. - registry: Financial-Modeling is a source-release repo (releaseTrigger none -> dispatch-only); refresh the stale driftNotes (PR CI now exists). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR closes template gaps identified in #306 when adapting the template to a source-only, uv-managed Python repo (no PyPI publishing). It updates EOL governance for uv.lock, adds a canonical Python VS Code tasks snippet, and adjusts Python guidance so derived repos adapt template defaults rather than copying mismatched assumptions.
Changes:
- Clarify
.editorconfigEOL-governance commentary and add LF pins foruv.lockin both.editorconfigand.gitattributes. - Add
catalog/snippets/configs/vscode-tasks-python.json(shell-agnostictype: processtasks) and reference it from docs. - Update
CODESTYLE.mdPython guidance to explicitly support source-only / mypy-in-CI / PEP 621 profiles, and refresh the Financial-Modeling registry entry notes.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
registry/repos.json | Reclassifies Financial-Modeling release trigger and refreshes drift notes to reflect its Python/tooling profile. |
CODESTYLE.md | Adds “adapt before propagating” guidance and relaxes Python assumptions to fit source-only repos and alternate type-checkers. |
catalog/snippets/configs/vscode-tasks-python.json | Introduces a canonical Python VS Code task set using uv, ruff, type checking, pytest, plus Docker lint tasks. |
catalog/README.md | Documents the new Python VS Code tasks snippet alongside existing config exemplars. |
.gitattributes | Pins uv.lock to LF so git enforces the tool-owned line ending. |
.editorconfig | Clarifies commentary around LF pins vs CI enforcement and adds an LF rule for uv.lock. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
- .editorconfig: include uv.lock in the git-enforced shared-pins list (it is pinned in .gitattributes too, not editorconfig-only). - registry: reword the Financial-Modeling driftNote so it reads as the target release model pending standup, not an already-working publisher (was inconsistent with the "standup owed" note). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
- CODESTYLE.md: convert the inline (#versioning) anchor to a reference-style link per AGENTS.md (no inline links in prose). - vscode-tasks-python.json: correct the Lint-group comment - --pull=always forces a re-pull of :latest, it does not "pin". Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
…ns in spec (#309) Small forward polish tying off #306 / #307 review feedback, ahead of the #308 promotion. - **`vscode-tasks-python.json`** — rename the `Python Verify` aggregator to **`Python Format`**. It runs `ruff format` (mutates in place), so `Verify` mislabels it; this mirrors the sibling `.NET Format` task naming (Copilot flagged it on #308). - **`spec/files.json`** — the Python `.vscode/tasks.json` reference now points at `vscode-tasks-python.json` (it referenced the .NET `vscode-tasks.json` for both languages). - **`spec/project-types.json`** — add `python.uvlock.pinned`, so the audit now asserts the `uv.lock` LF pin (`.editorconfig` + `.gitattributes`) that #306 introduced. N/A for a non-uv Python repo (e.g. a Home Assistant integration on pip). ## Validation - `spec/validate.py` — OK (21 cataloged, 0 backlog classify cleanly). - `editorconfig-checker` — clean. - `spec/files.json`, `spec/project-types.json` — parse. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
#308) Promotes the #306 incorporation (PR #307) from `develop` to `main`. ## Contents (squashed onto develop as b5c7704) Template-level gaps surfaced adapting the template to a source-only `uv` Python repo (Financial-Modeling): - `.editorconfig` mirroring-comment corrected; `uv.lock` LF pin added to `.editorconfig` + `.gitattributes`. - New `catalog/snippets/configs/vscode-tasks-python.json` (all `type: process`, no `&&` chaining). - CODESTYLE Python section made adapt-before-propagate (type checker in CI, deps declaration, versioning/publishing, VS Code config home); universal pyright-strict/PyPI/`_version.py` claims softened. - Registry: `Financial-Modeling` reclassified as a source-release repo (`releaseTrigger` `none` → `dispatch-only`). Copilot-reviewed on #307 (three passes; two incorrect pyright-config comments declined with rationale, all threads resolved). CI green. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Incorporates the template-level gaps reported in #306 (surfaced adapting the template to Financial-Modeling, a source-only
uv-managed Python repo that never publishes to PyPI). Downstream release standup (WORKFLOW.md, version.json + NBGV, source-only publisher, dependabot, uv.lock pin, README index row) is tracked in a separate Financial-Modeling issue.Changes (mapped to #306)
.editorconfigcomment inaccuracy — the[*]"Defaults" comment claimed the LF exceptions mirror.gitattributes. They don't: the workflow-YAML pins (.github/workflows/*+ catalog snippet workflows) are.editorconfig-only (git passive via* -text, CI-enforced). Reworded to distinguish the git-shared pins from the editorconfig-only ones.uv.lockLF pin — added to both.editorconfig([uv.lock]) and.gitattributes(uv.lock text eol=lf).uvregenerates the lockfile with LF on every platform, so a CRLF-default repo redseditorconfig-checkeron everyuv lock/uv syncuntil reconverted. Same rationale as the existing shebang/Dockerfile pins.catalog/snippets/configs/vscode-tasks-python.json, the Python peer of the .NETvscode-tasks.json. Alltype: process(no&&chaining, which Windows PowerShell 5.1 rejects); ruff format/check, a type-check task, a sequencedPython Verifyaggregator,pytest, and the shared DockerLint:group. Referenced fromcatalog/README.mdand the CODESTYLE Python loop.[dependency-groups],_version.py, PyPI publish,uv build) so a source-only / mypy-in-CI / PEP 621 repo is a first-class profile rather than a deviation that gets a verbatim copy rejected (the Update readme and workspace #10/Update README and workspace setup #11 churn)..vscode/*.jsonor the<Repo>.code-workspace; tasks/launch/debug can only be external.vscode/*.json.WORKFLOW.mdpropagation — the template ships it; propagation to Financial-Modeling (plus a README "Repository files" index row) is in the downstream standup issue.Registry:
Financial-Modelingreclassified as a source-release repo (releaseTriggernone→dispatch-only); refreshed the stale driftNotes (PR CI now exists; the "no workflows yet" note was outdated).Validation
editorconfig-checker:latest— clean (new JSON is CRLF per the[*]default).markdownlint-cli2:latestonCODESTYLE.md+catalog/README.md— 0 errors.registry/repos.json— parses;releaseTrigger=dispatch-only.Closes#306.
🤖 Generated with Claude Code