Skip to content

Latest commit

 

History

History
88 lines (64 loc) · 1.47 KB

File metadata and controls

88 lines (64 loc) · 1.47 KB

Development Guide

This guide covers local development setup and workflow for the Copier template project.

Prerequisites

  • Python 3.10 or newer
  • Git
  • uv (recommended) or pip/pipx

Quick Start

  1. Clone the repository:

    git clone https://github.com/patryk-gpl/copier-python-uv.git
    cd copier-python-uv
  2. Install dependencies:

    make install
  3. Run tests:

    make test

Development Workflow

Running Tests Locally

Execute the full test suite:

make test

Run specific test files:

make test FILE=my_tests/test_core_structure.py

Code Quality

Format code:

make format

Check code style:

make lint

Important Notes

Git Repository Requirement for Testing

Copier requires Git-tracked files when using vcs_ref="HEAD"

When running tests locally:

  • Ensure all template files are committed to Git before running tests
  • Copier uses Git to determine which files to include
  • Uncommitted files in the working directory are ignored by Copier

Before running tests:

git add .
git commit -m "WIP: template changes"

Tools Used

  • uv: Fast Python package installer and resolver
  • ruff: Fast Python linter and formatter
  • pytest: Testing framework
  • copier: Project template tool
  • pre-commit: Git hooks framework

Troubleshooting

UV cache issues

Clear and resync:

uv cache clean
make install