Skip to content

Releases: audreyfeldroy/cookiecutter-pypackage

Cookiecutter PyPackage 0.5.0: Docs, coverage, and one-command releases

Choose a tag to compare

@audreyfeldroy audreyfeldroy released this 17 Mar 23:30
v0.5.0
e71078b

Every project you generate from Cookiecutter PyPackage now ships with a documentation site, cross-version test coverage, and a release workflow that handles tagging, GitHub Releases, and PyPI publishing in a single command.

uv tool upgrade cookiecutter-pypackage

What's new

  • Documentation built in. Generated projects include a Zensical docs site with Material theme, light/dark toggle, API autodoc from docstrings, and a GitHub Actions workflow that deploys to GitHub Pages on push to main. Preview locally with just docs-serve. (#903)

  • Coverage across Python versions. CI now runs tests on Python 3.12, 3.13, and 3.14, collects branch coverage from each, and combines it into a single report posted to the workflow summary. Generated projects ship with sensible [tool.coverage] config in pyproject.toml: branch coverage, parallel mode, fail_under = 50, and exclusions for typing-only code. (#904)

  • One-command releases. just release reads the version from pyproject.toml, pulls notes from CHANGELOG/<version>.md, creates an annotated tag, pushes it, and creates a GitHub Release. Three steps instead of five. (#911)

  • Structured issue forms. Bug reports collect version, Python version, and OS through validated fields. Feature requests require a motivation. Every PR prompts contributors to declare AI tool usage. (#909)

  • CodeQL and zizmor security scanning. Generated projects get CodeQL static analysis with security-extended queries and zizmor GitHub Actions auditing. Cache-poisoning prevention and a 7-day Dependabot cooldown protect the supply chain. (#902)

  • Dependabot reaches into the template. Inner template workflows use per-expression Jinja escaping instead of {% raw %} blocks, so Dependabot can parse them as valid YAML and propose action updates. (#905)

What's better

  • Changelog files named by version, not git tag. CHANGELOG/0.5.0.md instead of CHANGELOG/v0.5.0.md, matching pyproject.toml as the source of truth. (#910)

  • Justfile groups and aliases. just --list shows recipes organized by purpose, and common tasks have short aliases (just t for test, just d for docs). Thanks @npikall! (#906)

  • Dev watcher picks up cookiecutter.json changes. The dev.py file watcher now regenerates the project when you edit cookiecutter.json, not just template files.

  • Default author website set to https://audrey.feldroy.com/ so the generated README shows a real example instead of a blank field.

Contributors

@audreyfeldroy (Audrey M. Roy Greenfeld) designed and built this release: the docs system, coverage setup, security scanning, structured issue forms, one-command releases, and the dev watcher improvements.

Thanks to @pydanny (Daniel Roy Greenfeld) for reviewing and merging the release script, and to @npikall (Niko Pikall) for organizing justfile recipes with groups and aliases.

Cookiecutter PyPackage v0.4.0: Everything a Modern Python Package Needs

Choose a tag to compare

@audreyfeldroy audreyfeldroy released this 16 Feb 17:40
v0.4.0
8298145

I've put out the biggest release since the modern rewrite. Generated projects now ship with a documentation site, type checking, cross-version coverage enforcement, and security-hardened CI, all configured and working out of the box.

What's new

Documentation site with Zensical and API autodoc. Every generated project now includes a Zensical documentation site with the Material theme, light/dark mode, and automatic API reference from your docstrings via mkdocstrings. A GitHub Actions workflow builds the docs and deploys to GitHub Pages. Preview locally with just docs-serve. (#903)

Type checking with ty. Generated packages include a py.typed marker, the "Typing :: Typed" classifier, and type hints on all starter code. CI runs ty as a separate job. Locally, just type-check runs it once, and just type-check-watch re-checks on every save. (#881)

Coverage the coverage.py way. Branch coverage, parallel mode, cross-version combining (3.12, 3.13, 3.14), and a fail_under floor of 50% that users raise as their project grows. CI collects coverage from every Python version, combines the results, and posts a report to the GitHub Actions summary page. Follows the patterns used by coverage.py's own project. (#904)

CLI accepts extra key=value arguments. Override any template variable from the command line, which is especially useful with --no-input:

uvx cookiecutter-pypackage --no-input full_name="Audrey M. Roy Greenfeld" pypi_package_name=my-package

(#877)

Creator attribution in generated READMEs. A bold "Created by" line at the top of the README with links to your GitHub and PyPI profiles. A new author_website prompt lets you link to your personal site too. (#901)

What's better

Security-hardened GitHub Actions. All workflows use SHA-pinned actions, persist-credentials: false on checkouts, minimal permissions, and Dependabot for automated action updates. The publish workflow uses Trusted Publishers with build provenance attestation and concurrency guards to prevent duplicate publishes. CI workflows include workflow_dispatch so you can re-run them manually from the Actions tab.

Dependency groups (PEP 735). Generated projects use [dependency-groups] instead of [project.optional-dependencies] for dev, test, lint, typecheck, and docs. With default-groups = ["dev"], uv sync picks up everything automatically. (#873)

Python 3.12+ across the board. Both the template and the outer repo target Python 3.12, 3.13, and 3.14. The just testall recipe and CI matrix match.

Leaner template. Removed MANIFEST.in, .readthedocs.yaml, empty slug.py, empty tests/__init__.py, __author__/__email__ dunders, and the ReadTheDocs badge. The starter test file is a clean minimal test_import. The .gitignore is focused instead of the 200-line GitHub default. (#901)

Stronger test assertions. Test comparisons that were evaluated but never asserted are now proper assertions. Thanks @AndreMiras! (#875, #878)

Rewritten docs for the template repo itself. The tutorial walks through all nine steps from generation to PyPI release. The prompts page shows a concrete example. A new project structure page covers every file in the generated project, justfile commands, CI workflows, and configuration. Troubleshooting covers real failure modes. (#900)

Template docs modernized. Installation docs use uv sync instead of pip install. CONTRIBUTING.md has full development setup instructions. The changelog URL points to the right file. (#886, #888, #894, #896)

Made by

@audreyfeldroy (Audrey M. Roy Greenfeld) designed and built this release: the Zensical docs system, ty type checking, coverage setup, security-hardened workflows, CLI improvements, creator attribution, dependency groups migration, and the complete docs rewrite.

Thanks to @AndreMiras (Andre Miras) for cleaning up the test file and strengthening test assertions.