This is a copier template for building Python research software through the uv environment manager.
Projects generated from this template include:
uv-managed environments and dependencies- Testing and coverage defaults via
pytest+coverage.py - Pre-commit automation for formatting, linting, and type checks
- GitHub Actions workflows for linting, tests, docs, and release-related automation
- Starter package + CLI scaffold under
src/ - Documentation scaffold under
docs/ - Poe task entrypoints for common local workflows (including a full local pipeline task)
This template can generate either of two project shapes:
- Pure Python: a standard
src/-layout Python package built with setuptools, with optional notebook scaffolding for research workflows. - Rust-bound Python: a Python package backed by a Rust workspace under
crates/, using PyO3 and maturin to expose a native extension module for performance-sensitive routines.
Copier asks for this choice through the use_rust option.
Choose the pure-Python variant when portability, simple packaging, and a smaller contributor toolchain matter most.
Choose the Rust-bound variant when you expect core routines to benefit from a compiled implementation while keeping a Python API and CLI for users.
Generated projects include agent guidance in .agents/skills/ with common skills for:
- Test-driven development
- Incremental implementation
- Code review and quality checks
- CI/CD and automation workflow alignment
- Debugging and error recovery
- Optional learning exercises for comprehension (
learning-opportunities)
If you do not want to use local agent guidance in your project, remove AGENTS.md and the .agents/ directory.
Follow these steps to use this template:
- Install
copier(e.g.pip install copier). - Reference this repository through the
copier copy <source> <target>command. (e.g.uvx copier copy --vcs-ref=HEAD https://github.com/cu-dbmi/template-uv-python-research-software destination_path) If you still see stale content, clear Copier's cache (rm -rf ~/.cache/copier) and run the command again. - Follow the directions in your new repo's
README.mdand make sure to check each file for alignment with your project. - Enjoy!
Copier already excludes .git from rendered output, so copying this template into an existing repository keeps that repository's history in place instead of importing this template's history. Copier also does not automatically run git init for a fresh destination. That could be done with a post-copy task, but Copier treats tasks as an unsafe feature, so this template leaves repository initialization as an explicit user step.
- Pre-configured
pyproject.tomlfor Python project management - Support for the
uvenvironment manager - Example source code and test structure
- Example docs structure with the option to publish to GitHub Pages
- Ready-to-use GitHub Actions CI workflow (including tests, docs, and deployment)
- Community health files like LICENSE, CODE_OF_CONDUCT, and CONTRIBUTING with boilerplate language
- Support for Jupyter notebook development alongside a local Python package
.pre-commit-config.yamlwhich can help with pre-commit checks for your project- Adds a CLI boilerplate to build from based on
fire. - Optional Rust bindings scaffold with Cargo workspace crates, PyO3 bindings, maturin builds, Rust-aware CI, and release publishing support.
Please reference the README.md checklist for suggested next steps after copying the template.
When using the Jupyter notebook work, consider using uv run jupyter lab (or similar) to run notebooks which are invoked from the context of the virtual environment of the project.
This helps the notebook gain dependencies and access to the packaged work outside the notebooks directory.
This project is a Copier template repository, designed to scaffold new projects using customizable templates. The templates leverage Jinja for flexible variable substitution and logic within template files.
To ensure the template remains functional and testable, pytest is used. Tests are provided to verify that the template can be rendered and instantiated correctly, helping to catch issues early in the development process.
For example, use the following to test the work:
uv run pytest