Skip to content

Latest commit

 

History

32 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python Project Template

A copier template, containing my preferred initial project setup.

Features

  • A src directory, because you should.
  • uv for Python and dependency management
  • hatchling for builds
  • pytest for tests
  • ruff for linting & formatting
  • Sphinx docs
  • interrogate for pydoc coverage
  • Just for task running
  • Versioning using git tags.
  • prek for Git hooks

To-Do

Documentation

This project template provides my preferred Python layout.

Versioning

hatch-vcs is used for versioning, picking up the version number from the most recent git tag.

There's an issue that in a development environment, the version number is frozen at the version set when the package was installed as editable. A slightly hacky approach has been used in _version.py to provide an accurate "live" version number in all cases. If you don't like it, remove _get_hatch_version() from _version.py and "hatchling" and "hatch-vcs" from the "dev" group in pyproject.toml.

Open Questions

  • Should the CLI be optional? (Leaning towards yes.)

About

A cookiecutter template for a Python project

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages