Skip to content

Incorporate #306: adapt template for source-only Python repos - #307

Merged
ptr727 merged 3 commits into
developfrom
incorporate-306-python-source-only
Jul 16, 2026
Merged

Incorporate #306: adapt template for source-only Python repos#307
ptr727 merged 3 commits into
developfrom
incorporate-306-python-source-only

Conversation

@ptr727

@ptr727 ptr727 commented Jul 16, 2026

Copy link
Copy Markdown
Owner

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)

  1. .editorconfig comment 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.
  2. uv.lock LF pin — added to both .editorconfig ([uv.lock]) and .gitattributes (uv.lock text eol=lf). uv regenerates the lockfile with LF on every platform, so a CRLF-default repo reds editorconfig-checker on every uv lock/uv sync until reconverted. Same rationale as the existing shebang/Dockerfile pins.
  3. Python VS Code tasks snippet — new catalog/snippets/configs/vscode-tasks-python.json, the Python peer of the .NET vscode-tasks.json. All type: process (no && chaining, which Windows PowerShell 5.1 rejects); ruff format/check, a type-check task, a sequenced Python Verify aggregator, pytest, and the shared Docker Lint: group. Referenced from catalog/README.md and the CODESTYLE Python loop.
  4. CODESTYLE Python section adapt-before-propagate — added an adaptation callout enumerating the axes that vary per repo (type checker in CI, deps declaration, versioning/publishing, disabled markdownlint rules, VS Code config home), and softened the universal claims (pyright-strict baseline, [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).
  5. VS Code config placement — stated explicitly (callout + adaptation bullet): settings/extensions may live in .vscode/*.json or the <Repo>.code-workspace; tasks/launch/debug can only be external .vscode/*.json.
  6. WORKFLOW.md propagation — the template ships it; propagation to Financial-Modeling (plus a README "Repository files" index row) is in the downstream standup issue.

Registry: Financial-Modeling reclassified as a source-release repo (releaseTrigger nonedispatch-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:latest on CODESTYLE.md + catalog/README.md — 0 errors.
  • registry/repos.json — parses; releaseTrigger = dispatch-only.

Closes #306.

🤖 Generated with Claude Code

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>
Copilot AI review requested due to automatic review settings July 16, 2026 04:20

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 .editorconfig EOL-governance commentary and add LF pins for uv.lock in both .editorconfig and .gitattributes.
  • Add catalog/snippets/configs/vscode-tasks-python.json (shell-agnostic type: process tasks) and reference it from docs.
  • Update CODESTYLE.md Python 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.

Comment thread .editorconfig
Comment thread registry/repos.json Outdated
- .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>
Copilot AI review requested due to automatic review settings July 16, 2026 04:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 6 out of 6 changed files in this pull request and generated 2 comments.

Comment thread CODESTYLE.md Outdated
Comment thread catalog/snippets/configs/vscode-tasks-python.json Outdated
- 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>
Copilot AI review requested due to automatic review settings July 16, 2026 04:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 6 out of 6 changed files in this pull request and generated 2 comments.

Comment thread CODESTYLE.md
Comment thread CODESTYLE.md
@ptr727
ptr727 merged commit b5c7704 into develop Jul 16, 2026
7 checks passed
@ptr727
ptr727 deleted the incorporate-306-python-source-only branch July 16, 2026 04:40
ptr727 added a commit that referenced this pull request Jul 16, 2026
…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>
ptr727 added a commit that referenced this pull request Jul 16, 2026
#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)
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