Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.devcontainer/* -linguist-detectable
.github/** -linguist-detectable
.github/** -linguist-detectable
template/.devcontainer/* -linguist-detectable
template/.github/** -linguist-detectable
30 changes: 11 additions & 19 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
# Dependabot configuration.
# Dependabot configuration for the template repository.
# See https://docs.github.com/en/code-security/dependabot/working-with-dependabot/dependabot-options-reference
#
# Python dependencies are not listed: template/pyproject.toml.jinja is a Copier template that
# Dependabot can't parse. New projects resolve the latest versions with `uv lock`, and generated
# projects get their own uv Dependabot entry from template/.github/dependabot.yml.
version: 2

updates:
# GitHub Actions used in .github/workflows (updates SHA pins and their version comments)
# GitHub Actions used by the template repo and by generated projects
- package-ecosystem: "github-actions"
directory: "/"
directories: ["/", "/template"]
schedule:
interval: "monthly"
cooldown:
Expand All @@ -15,30 +19,18 @@ updates:
github-actions:
patterns: ["*"]

# Python dependencies in pyproject.toml / uv.lock
- package-ecosystem: "uv"
directory: "/"
schedule:
interval: "monthly"
cooldown:
default-days: 7
labels: ["dependencies"]
groups:
python-minor-and-patch:
update-types: ["minor", "patch"]

# Base image in .devcontainer/Dockerfile
# Base image in template/.devcontainer/Dockerfile
- package-ecosystem: "docker"
directory: "/.devcontainer"
directory: "/template/.devcontainer"
schedule:
interval: "monthly"
cooldown:
default-days: 7
labels: ["dependencies"]

# Features in .devcontainer/devcontainer.json
# Features in template/.devcontainer/devcontainer.json
- package-ecosystem: "devcontainers"
directory: "/"
directory: "/template"
schedule:
interval: "monthly"
cooldown:
Expand Down
49 changes: 5 additions & 44 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: Release

# Publishes a template release. Copier reads the resulting vX.Y.Z tags as template versions.

on:
workflow_dispatch:

Expand All @@ -12,62 +14,21 @@ permissions:

jobs:
release:
runs-on: ubuntu-latest
runs-on: ubuntu-slim
permissions:
contents: write
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: main
persist-credentials: false
- name: Install uv
uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
with:
enable-cache: false
version: ">=0.13,<0.14"

- name: Refresh draft release
id: drafter
uses: release-drafter/release-drafter@978bb0b30c5ee8cdd332ced253758157150d43f0 # v7.10.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Bump version
env:
VERSION: ${{ steps.drafter.outputs.resolved_version }}
run: uv version "$VERSION"

- name: Update CHANGELOG.md
uses: stefanzweifel/changelog-updater-action@a938690fad7edf25368f37e43a1ed1b34303eb36 # v1.12.0
with:
latest-version: ${{ steps.drafter.outputs.tag_name }}
release-notes: ${{ steps.drafter.outputs.body }}

- name: Commit and push
id: commit
env:
TAG: ${{ steps.drafter.outputs.tag_name }}
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add pyproject.toml uv.lock CHANGELOG.md
git commit -m "Release $TAG"
git push origin main
echo "sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"

# Publishing the draft creates the vX.Y.Z tag at the commit this workflow ran on
- name: Publish release
env:
GH_TOKEN: ${{ github.token }}
RELEASE_ID: ${{ steps.drafter.outputs.id }}
SHA: ${{ steps.commit.outputs.sha }}
run: |
gh api -X PATCH "repos/${{ github.repository }}/releases/$RELEASE_ID" \
-F draft=false -f target_commitish="$SHA"

- name: Build and upload artifacts
env:
GH_TOKEN: ${{ github.token }}
TAG: ${{ steps.drafter.outputs.tag_name }}
run: |
uv build
gh release upload "$TAG" dist/*
-F draft=false -f target_commitish="$GITHUB_SHA"
21 changes: 0 additions & 21 deletions .github/workflows/security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,27 +24,6 @@ jobs:
uses: zizmorcore/zizmor-action@45d7276c9ca790aabd705e31ca99c6185c3e76dd # v0.8.1
with:
advanced-security: false
pip-audit:
runs-on: ubuntu-slim
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Install uv
uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
with:
enable-cache: false
version: ">=0.13,<0.14"
- name: Setup environment
run: |
uv tool install rust-just
just sync
- name: Audit dependencies
run: |
just audit
gitleaks:
runs-on: ubuntu-slim
steps:
Expand Down
56 changes: 56 additions & 0 deletions .github/workflows/template.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Template Checks

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

permissions: {}

jobs:
actionlint:
runs-on: ubuntu-slim
permissions:
contents: read
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Install uv
uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
with:
enable-cache: false
version: ">=0.13,<0.14"
- name: Install just and actionlint
run: |
uv tool install rust-just
uv tool install actionlint-py
- name: Lint workflows
run: |
just actionlint
render-and-check:
# ubuntu-latest includes Node, which markdownlint-cli2 needs
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Install uv
uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
with:
enable-cache: false
version: ">=0.13,<0.14"
- name: Install just
run: |
uv tool install rust-just
- name: Render a project and run its checks
run: |
just check
# Same markdownlint-cli2 version as the VS Code markdownlint extension
- name: Markdownlint
working-directory: _rendered/demo-project
run: |
npx --yes markdownlint-cli2@0.23.2 "**/*.md"
135 changes: 8 additions & 127 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,131 +1,12 @@
# Byte-compiled / optimized / DLL files
# Projects rendered by `just render` / `just check`
_rendered/

# Local Python and docs artifacts
__pycache__/
*.py[cod]
*$py.class
.cache/
.coverage
.venv/
site/

# OS Stuff
.DS_Store

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# Ruff
.ruff_cache

# Claude
.claude/*.local.*

# Dev Container
.devcontainer/devcontainer-lock.json
3 changes: 3 additions & 0 deletions .prekignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Directories prek skips when discovering nested projects (gitignore syntax).
# template/prek.toml is for generated projects; its hooks can't run on the unrendered template.
template/
2 changes: 2 additions & 0 deletions Brewfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
brew "actionlint"
brew "gitleaks"
brew "just"
brew "markdownlint-cli2"
brew "prek"
brew "uv"
brew "zizmor"
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
Release notes are generated from labeled pull requests by Release Drafter.

## [Unreleased]
Loading
Loading