Skip to content

psolsfer/uvcopier

Repository files navigation

uvcopier


Documentation Status License - BSD-3-Clause GitHub stars GitHub forks GitHub issues

A Copier template for creating Python packages with uv.

A batteries-included template for Python projects using uv for dependency management. Use it to create new packages, upgrade existing ones, or maintain consistency across your Python projects with modern tooling and best practices.



Features

Project Setup and Management

  • copier: Keep your project templates up-to-date and track template changes
  • uv: Modern, fast dependency management and packaging tool for Python
  • Integrated GitHub Actions workflows for testing, drafting release notes, and publishing to PyPI when a release is created
  • Project structure following best practices

Code Quality Assurance

  • Managing and maintaining multi-language pre-commit hooks using Pre-commit or prek to ensure code quality
  • Ruff: Fast Python linter and formatter, combining multiple linting tools
  • Alternative formatter option with Black
  • Static type checking with Mypy and data validation using Pydantic
  • Automatic dependency updates with Dependabot

Testing

  • Testing setup with unittest and pytest
  • tox configuration for testing against multiple Python versions (3.10+)
  • Test coverage reporting with Coverage.py
  • Optional JupyterLab integration for exploratory testing and analysis

Documentation

Versioning and Release Notes

  • Commitizen integration for standardized commit messages and version management
  • Semantic versioning with automatic changelog generation
  • Automated release notes drafting with Release Drafter
  • History tracking and changelog management

Command Line Interface

Development Tasks

  • Task automation with Invoke for common development workflows
  • Standardized commands for testing, linting, formatting, and documentation
  • Simplified package publication and versioning tools

Usage

For a brief tutorial, refer to the refer to the Tutorial section of the documentation.

The prompts that need to be filled during the creation of the package are described in Prompts.

Updating a project

An existing project can be updated to the latest template using:

copier update

Alternatives

copier-uv is a copier template for Python projects managed by uv.

python-copier-template: Diamond's opinionated copier template for pure Python projects managed by pip.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Credits

The following templates were used as basis and inspiration for the creation of some parts of this template: