Skip to content

Promote develop to main: source-only Python template adaptation (#306) - #308

Merged
ptr727 merged 3 commits into
mainfrom
develop
Jul 16, 2026
Merged

Promote develop to main: source-only Python template adaptation (#306)#308
ptr727 merged 3 commits into
mainfrom
develop

Conversation

@ptr727

@ptr727 ptr727 commented Jul 16, 2026

Copy link
Copy Markdown
Owner

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 nonedispatch-only).

Copilot-reviewed on #307 (three passes; two incorrect pyright-config comments declined with rationale, all threads resolved). CI green.

🤖 Generated with 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)

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 #10/#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` `none` → `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:latest` on `CODESTYLE.md` + `catalog/README.md` — 0
errors.
- `registry/repos.json` — parses; `releaseTrigger` = `dispatch-only`.

Closes #306.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

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:43

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

Promotes the template adaptations for source-only uv-managed Python repos from develop to main, updating governance docs and catalog snippets to reduce downstream friction (line endings, VS Code tasks portability, and Python CODESTYLE guidance).

Changes:

  • Update .editorconfig / .gitattributes to pin uv.lock to LF and clarify which LF pins are git-enforced vs CI-enforced.
  • Add a Python VS Code tasks snippet using type: process (no shell chaining) and document it in the catalog and CODESTYLE.
  • Adjust registry classification/notes for Financial-Modeling and make CODESTYLE's Python section explicitly adapt-before-propagate.

Reviewed changes

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

Show a summary per file
File Description
registry/repos.json Reclassifies Financial-Modeling release trigger and refreshes drift notes to reflect the source-only Python profile.
CODESTYLE.md Makes Python guidance explicitly adaptable to differing repo toolchains (type checker, deps model, publishing, VS Code config location).
catalog/snippets/configs/vscode-tasks-python.json Adds a Python-focused VS Code tasks snippet using type: process for portability (plus shared Docker lint tasks).
catalog/README.md Documents the new Python VS Code tasks snippet in the catalog index.
.gitattributes Pins uv.lock to LF so git enforces the tool-owned line ending.
.editorconfig Clarifies EOL-governance commentary and pins uv.lock to LF to match uv behavior.

Comment thread catalog/snippets/configs/vscode-tasks-python.json Outdated

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 1 comment.

Comment thread CODESTYLE.md
…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>
Copilot AI review requested due to automatic review settings July 16, 2026 05:08

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 8 out of 8 changed files in this pull request and generated 1 comment.

Comment thread CODESTYLE.md Outdated
Places `[versioning-section]` before `[vscode-tasks]` so the `<!-- Repo
-->` reference-definition group stays alphabetized (AGENTS.md doc-style
rule). Copilot flagged it on #308; fixing forward so the promotion lands
clean. Byte-level move - CRLF preserved, 1-line diff.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 16, 2026 05:17

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 8 out of 8 changed files in this pull request and generated 1 comment.

Comment thread CODESTYLE.md
@ptr727
ptr727 merged commit cf752b7 into main Jul 16, 2026
7 checks passed
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