feat(template): document remaining one-time setup, soften Codecov gate, fix freezer spec - #53
Merged
Merged
Conversation
…decov gate PR #51 hardened + documented the Docker Hub publish channel. Auditing the rest of the generated project's external integrations surfaced three more that were inert or undocumented until manually configured, none covered by the CONTRIBUTING repository-setup section: - Codecov: CI passed CODECOV_TOKEN unconditionally with no setup guidance, and a missing token made the upload silently no-op. Now gated on a job-level CODECOV_TOKEN_SET presence flag with an Ubuntu-only ::notice:: visible skip (build still passes); documented as repo-setup step 6 + a README walkthrough. - GitHub Pages: deploy-docs pushes to gh-pages, but Pages must be pointed at that branch or docs build and are never served. Added repo-setup step 7 + README note. - Renovate: .github/renovate.json is inert until the hosted Renovate app is installed. Added repo-setup step 8 + README note. Docker Hub (optional, include_web) renumbers to step 9. CLAUDE.md's now-stale 'Codecov upload runs unconditionally' line is corrected to match the new gate. Verified: renders with defaults (steps 1-8) and include_web (adds step 9); actionlint passes on ci.yml; rendered CONTRIBUTING.md passes markdownlint.
Folded in alongside the repository-setup docs so the template repo's `prek run` is green. All pre-existing on main, none related to the docs change: - docs/adr/*.md: pad table delimiter rows (`| --- |`) to satisfy MD060, newly enforced by the markdownlint-cli2 v0.22.1 bump. - CLAUDE.md: reword "mis-bump" (typos false-positive) to "bump them incorrectly". - template/README.md.jinja: the generated README's table of contents linked a non-existent "Disclaimer" section; point it at the real "Credits" heading (MD051). - _typos.toml: allow the `CPY` ruff rule code (flake8-copyright), which typos misreads as COPY/CPU only in the .jinja source. Repo-root only, so generated projects are unaffected.
Contributor
Reviewer's GuideDocuments all remaining one-time external integrations (Codecov, GitHub Pages, Renovate), softens the Codecov CI gate to be opt‑in with visible skips, renumbers Docker Hub setup accordingly, and folds in small lint/config fixes to keep the template’s own tooling green. Sequence diagram for gated Codecov upload in CI workflowsequenceDiagram
participant Developer
participant GitHubActions as GitHub_Actions_CI
participant CIJob as ci_job_tests
participant Codecov
Developer->>GitHubActions: push_or_pr_event
GitHubActions->>CIJob: start_matrix_job
CIJob->>CIJob: set_env CODECOV_TOKEN_SET
CIJob->>CIJob: run_tests_and_generate_coverage_xml
alt [env.CODECOV_TOKEN_SET == 'true']
CIJob->>Codecov: codecov_action_upload(coverage.xml, CODECOV_TOKEN)
else [env.CODECOV_TOKEN_SET != 'true' && matrix.os == 'ubuntu-latest']
CIJob->>CIJob: echo_notice_skipped_coverage_upload
end
CIJob-->>GitHubActions: job_success
GitHubActions-->>Developer: CI_passes_without_coverage_requirement
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9c1abc43f3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
The `typos` prek hook auto-writes fixes and misreads PyInstaller's `datas`
field (`Analysis(datas=...)` / `a.datas`) as `data`. A generated project with
include_freezer shipped no typos allowlist, so `prek run` silently rewrote its
<pkg>.spec to the invalid `data=`, breaking freezer builds.
- template/pyproject.toml.jinja: add an include_freezer-gated [tool.typos]
section allowing `datas` — per-project config lives in pyproject.toml (which
generated projects have), not a standalone _typos.toml.
- _typos.toml: also allow `datas` so the template repo's own `prek run` does not
rewrite template/{...}.spec.jinja (the repo has no root pyproject.toml — a bare
one breaks `uv run --group prek`, so its config stays in _typos.toml).
Also folds in the yamlfmt reformat of copier.yml surfaced by `prek run
--all-files` (help-text line rejoin) so the repo's prek run is fully green.
…typos block
Gating the Codecov upload solely on CODECOV_TOKEN_SET skipped coverage for
forked PRs on public repos, which never receive secrets — regressing the prior
tokenless fallback. Also run the upload when the run is a forked PR, and keep
the visible skip only for same-repo runs with no token.
Drop the stray blank lines around the include_freezer [tool.typos] block so it
renders a single section separator, per the {%- -%} whitespace convention.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #51. That PR hardened and documented the optional Docker Hub publish channel; auditing the rest of a generated project's external integrations surfaced more that are inert or silently broken until manually configured, none covered by the generated
CONTRIBUTING.md"Repository setup" section. This completes that section, softens the Codecov gate the same way #51 handled GHCR-only runs, and fixes a latent PyInstaller-spec corruption bug found along the way.Codecov (behavior + docs)
CI passed
CODECOV_TOKENunconditionally with no setup guidance, and a missing token made thecodecov-actionupload silently no-op — the inverse of the fail-fast/visible-skip treatment #51 gave Docker Hub.ci.yml.jinja: surfaceCODECOV_TOKENas a job-levelCODECOV_TOKEN_SETpresence flag (thesecretscontext is unavailable inif:), gate the upload step on it, and emit an Ubuntu-only::notice::when unset so the skip is visible instead of a quiet non-upload. The build still passes.GitHub Pages & Renovate (docs)
deploy-docspushes docs to agh-pagesbranch, but GitHub won't serve it until Pages is pointed there, so docs build every release and are never visible. Repository-setup step 7 + README note..github/renovate.jsonis inert until the hosted Renovate app is installed. Repository-setup step 8 + README note.include_web) renumbers to step 9;CLAUDE.md's stale "runs unconditionally" Codecov line is corrected.PyInstaller freezer spec corruption (fix)
The
typosprek hook auto-writes fixes and misreads PyInstaller'sdatasfield (Analysis(datas=...)/a.datas) asdata. A generated project withinclude_freezershipped no typos allowlist, soprek runwould silently rewrite<pkg>.specto the invaliddata=, breaking freezer builds.template/pyproject.toml.jinja: add aninclude_freezer-gated[tool.typos]section allowingdatas— per-project config lives inpyproject.toml, not a standalone file._typos.toml(template repo root): allowCPY(ruff rule code) anddatasso the template's ownprek rundoesn't rewritetemplate/{...}.spec.jinja. The repo has no rootpyproject.toml; adding a bare one breaksuv run --group prek(Group prek is not defined), so its config stays in_typos.toml.Other folded-in lint fixes
Pre-existing on
main, so the template repo'sprek run --all-filesis fully green: pad ADR table delimiters for MD060 (markdownlint-cli2 v0.22.1 bump), reword amis-bumptypos false-positive, fix the generated README's stale TOC link (Disclaimer→ realCreditsheading, MD051), and reformatcopier.ymlhelp text via yamlfmt.Test plan
include_web(Docker Hub → step 9);actionlintpasses onci.ymlci.ymlCodecov upload gated onCODECOV_TOKEN_SETwith an Ubuntu-only visible-skip noticeinclude_freezerproject:[tool.typos]present,datasno longer flagged, spec is not rewritten[tool.typos]section,pyproject.tomlvalid TOMLprek run --all-filesgreen and idempotent on the template repo (second pass makes no changes)