Skip to content

Update template - #15

Open
NKeleher wants to merge 7 commits into
mainfrom
update-template
Open

NKeleher wants to merge 7 commits into
mainfrom
update-template

Conversation

@NKeleher

@NKeleher NKeleher commented Jul 20, 2026 •

Copy link
Copy Markdown
Contributor

Pull Request Summary 🚀

What does this PR do? 📝

Modernizes the template's tooling, project layout, and CI:

  • Markdown tooling: replaces markdownlint-cli2 with panache (panache.toml, pre-commit hooks, jolars.panache VS Code extension) and applies a one-time panache format to existing markdown files. Removes .markdownlint.yaml.
  • Project layout: adds a src/project_name package built with uv_build, plus tests/ with pytest and pytest-cov.
  • Dependencies: moves dev dependencies to PEP 735 [dependency-groups] and declares sqlfluff. Runs just update-reqs to upgrade uv.lock and the pre-commit hook versions.
  • Justfile: groups the recipes, adds test, test-cov, and check-all, and fixes Windows clean. Drops the broken activate-venv recipe and keeps aliases for the old recipe names.
  • Docs: adds a minimal Quarto site scaffold in docs/.
  • CI: replaces pre-commit.yml with ci.yml, which runs pre-commit and tests as separate jobs.
  • GitHub Actions security: adds the zizmor pre-commit hook and fixes its findings. Actions are pinned to commit SHAs, checkouts set persist-credentials: false, and the workflow token is read-only (contents: read).
  • Dependabot: switches the Python ecosystem from pip to uv so it tracks uv.lock, and adds a 7-day cooldown on all ecosystems.

Why is this change needed? 🤔

  • Resolves all open Dependabot alerts on main (certifi [critical], filelock, pillow, soupsieve, tornado, virtualenv). The lockfile now resolves each package to its patched version or later, so the alerts should close when this PR merges.
  • Brings the template in line with ipa-stata-template, which already uses panache, zizmor, and the same Justfile/CI patterns.
  • zizmor catches unpinned actions and over-broad token permissions before they reach main.

How was this implemented? 🛠️

  • just update-reqs (uv lock --upgrade, uv sync, pre-commit autoupdate).
  • The zizmor changes mirror the chore/zizmor branch of ipa-stata-template.
  • Merged main into this branch. Conflicts were resolved in favour of this branch, since panache supersedes markdownlint. The one exception is main's nbdev-clean hook, which is kept and bumped to 3.3.38.

How to test or reproduce ? 🧪

just venv
just check-all          # lint, format check, tests, all pre-commit hooks
uv run pre-commit run zizmor --all-files

Screenshots (if applicable) 📷

N/A

Checklist ✅

  • I have run and tested my changes locally
  • I have limited this PR to less than 1000 lines of code change (if not, explain why): most of the diff (~2,900 lines) is the regenerated uv.lock; the hand-written changes are well under 1,000 lines
  • I have updated/added tests to cover my changes (if applicable)
  • I have updated/added requirements to cover my changes (if applicable)
  • I have run linting and formatting on any code changes (if applicable)
  • I have updated the documentation (README, etc.) accordingly

Reviewer Emoji Legend

:code: Meaning
😃👍💯 :smiley: :+1: :100: I like this...

...and I want the author to know it! This is a way to highlight positive parts of a code review.
⭐⭐⭐ :star: :star: :star: Important to fix before PR can be approved...

And I am providing reasons why it needs to be addressed as well as suggested improvements.
⭐⭐ :star: :star: Important to fix but non-blocking for PR approval...

And I am providing suggestions where it could be improved either in this PR or later.
⭐ :star: Give this some thought but non-blocking for PR approval...

...and consider this a suggestion, not a requirement.
❓ :question: I have a question.

This should be a fully formed question with sufficient information and context that requires a response.
📝 :memo: This is an explanatory note, fun fact, or relevant commentary that does not require any action.
⛏ :pick: This is a nitpick.

This does not require any changes and is often better left unsaid. This may include stylistic, formatting, or organization suggestions and should likely be prevented/enforced by linting if they really matter
♻️ :recycle: Suggestion for refactoring.

Should include enough context to be actionable and not be considered a nitpick.

NKeleher and others added 4 commits July 20, 2026 13:02
…e QoL

- Swap markdownlint/mdformat for panache (panache-cli dev dep, panache.toml,
  jolars/panache-pre-commit hooks, jolars.panache VS Code extension)
- Add src/project_name package with uv_build build backend
- Add tests/ with pytest + pytest-cov; run tests in CI
- Move dev deps to PEP 735 [dependency-groups]; declare sqlfluff
- Rework Justfile: grouped recipes, default list, test/check-all recipes,
  fix broken activate-venv (uv shell) and Windows clean
- Add minimal Quarto scaffold in docs/
- Rename pre-commit workflow to ci.yml with pre-commit + tests jobs

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
NKeleher and others added 3 commits December 2, 2026 16:50
Resolves open Dependabot alerts for certifi, filelock, pillow,
soupsieve, tornado, and virtualenv.

Co-Authored-By: Claude <noreply@anthropic.com>
Add the zizmor pre-commit hook and fix its findings:
- pin all actions to commit SHAs (Dependabot keeps them current)
- set persist-credentials: false on every checkout
- default workflow permissions to read-only
- add a 7-day Dependabot cooldown on all ecosystems
- switch Dependabot Python ecosystem from pip to uv to track uv.lock

Co-Authored-By: Claude <noreply@anthropic.com>
Resolve conflicts in favour of this branch (panache replaces
markdownlint-cli2, so drop .markdownlint.yaml and its Justfile recipes).
Keep main's nbdev-clean hook, bumped to 3.3.38.

Co-Authored-By: Claude <noreply@anthropic.com>
@NKeleher
NKeleher added this pull request to stack #33 December 3, 2026 03:59
@NKeleher
NKeleher marked this pull request as ready for review December 3, 2026 17:25
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