Skip to content

chore(template): fix placeholders, downgrade python-version, drop redundant safety#58

Merged
JacobPEvans merged 4 commits into
mainfrom
chore/template-hygiene
May 24, 2026
Merged

chore(template): fix placeholders, downgrade python-version, drop redundant safety#58
JacobPEvans merged 4 commits into
mainfrom
chore/template-hygiene

Conversation

@JacobPEvans
Copy link
Copy Markdown
Collaborator

@JacobPEvans JacobPEvans commented May 22, 2026

Summary

Three independent template-hygiene fixes surfaced by the 2026-05-22 workspace sweep.

1. python-version desync in ci.yml

The lint, type-check, security, and docs jobs were pinned to Python 3.14 while their step names still said "Set up Python 3.12" — a stale label from a prior bump that never propagated to the version field. The test matrix (tests.yml) tops out at 3.13, so the single-version jobs were running on a Python release ahead of what the tests cover.

Pin to 3.13 (latest stable, top of the test matrix) and drop the version number from the step name so future bumps don't desync the label again.

2. Redundant security tooling

Both safety and pip-audit were installed via [project.optional-dependencies] dev, but the CI workflow only runs pip-audit. safety is the legacy duplicate from Pyup; pip-audit is the PyPA-maintained advisory scanner backed by the same osv.dev database.

Worse: safety carries its own transitive vulns (joblib, nltk) that have been blocking CI on every PR (#56, #57). Dropping safety eliminates the false-positive chain entirely.

3. Placeholder identity in pyproject.toml

name = "hello-world", authors = [{name = "Your Name", email = "your.email@example.com"}], and the ruff known-first-party = ["hello_world"] were committed defaults that looked indistinguishable from real values. Forks could ship without realizing they needed to change them.

Switch to explicit REPLACE_ME-project-name / REPLACE_ME Author tokens, add a TEMPLATE: ... header comment in pyproject.toml, and add TEMPLATE.md with the full fork-and-edit checklist (project rename, package rename, README badges, CI slug updates, removal of the checklist itself).

Closes / refs

Test plan

  • actionlint .github/workflows/*.yml — clean
  • python3 -c "import tomllib; tomllib.load(open('pyproject.toml','rb'))" — parses
  • Pre-commit hooks pass on all three commits (signed, no --no-verify)
  • CI Security Scan job now succeeds without --ignore-vuln workarounds
  • All four ci.yml jobs run on Python 3.13

The lint, type-check, security, and docs jobs in ci.yml were pinned to
Python 3.14 (unreleased at time of original edit, and an outlier vs the
test matrix which covers 3.11/3.12/3.13). The step names also said
'Set up Python 3.12' while the version was actually 3.14, compounding
the confusion.

Pin to 3.13 (latest stable, top of the test matrix) and drop the version
from the step name so future bumps don't desync the label.
pip-audit is the PyPA-maintained advisory scanner pulling from the same
PyPI advisory database (osv.dev). safety is the legacy duplicate from
Pyup and carries its own transitive vulnerabilities (joblib, nltk) that
have been blocking CI on all PRs.

The CI workflow already only invokes pip-audit; safety was installed via
the [dev] extra but never run. Removing it eliminates the false-positive
vuln chain in transitive deps and shrinks the dev install.

Refs #56.
The pyproject.toml placeholders ('hello-world', 'Your Name',
'your.email@example.com') looked like committed defaults rather than
intentional template tokens. Forks could ship without realizing they
needed to change them.

Replace with explicit REPLACE_ME tokens, add a header comment pointing
at TEMPLATE.md, and add the checklist itself covering project rename,
package rename, README badges, and CI slug updates.

Also flag the ruff isort known-first-party list — it still references
hello_world and needs to match the renamed package.
@codecov
Copy link
Copy Markdown

codecov Bot commented May 22, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a template instantiation checklist in TEMPLATE.md and updates pyproject.toml with placeholders to guide users after forking the repository. Additionally, the safety dependency has been removed from the development requirements. Feedback suggests enhancing the checklist to include instructions for updating package-level metadata in the package's init.py file.

Comment thread TEMPLATE.md Outdated
Address gemini-code-assist review: the rename step renamed the package
directory and import paths, but the package-level metadata (__author__,
__email__, __version__) in src/<pkg>/__init__.py was left unmentioned.
Those values are hardcoded to the template author and need to be replaced
by every fork.

Restructure step 2 as a bulleted list so the metadata reminder lives at
the same level as the import update.
@JacobPEvans JacobPEvans merged commit f216b5f into main May 24, 2026
18 checks passed
@JacobPEvans JacobPEvans deleted the chore/template-hygiene branch May 24, 2026 15:59
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.

1 participant