Skip to content

A modern take on my python projects using ruff, uv, pytest, hatch, hatchling with Github Actions and pre-commits

License

Notifications You must be signed in to change notification settings

rasand-arb/cookiecutter-pypackage

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cookiecutter Hatch PyPackage

Details License - MIT GitHub Sponsors
Features Hatch project Pip - uv linting - Ruff types - mypy test - pytest Github Actions linting - precommit docs - mkdocs

✨ Features

  • Lightweight starter
  • Hatch package management
  • uv package lock, install and resolving
  • Linting and formatting with ruff
  • Type checking with mypy
  • Unit tests with pytest with optional asyncio setup.
  • Automate and standardize testing with Hatch-env-matrices
  • Documentation with Material for MkDocs and docstring reference support with mkdocstrings.
  • Ready-to-use GitHub Actions pipelines with dependabot, release-drafter, labeler, publish to PYPI workflows, publish to test PYPI workflows & more.
  • hatch-pip-compile: experimental support for lock-files,
  • pyproject.toml: all package, build and tool configuration in one file,
  • coverage: tool for measuring code coverage of Python programs with pytest integration,
  • pre-commit: pre-commit git hooks that make your life easier,
  • Markdown: instead of reStructuredText, Markdown is used consistently for all text files,
  • src-layout: the actual Python package is kept under a src folder avoiding many common errors.

💫 Quickstart

Generate the project:

cookiecutter https://github.com/KingMichaelPark/cookiecutter-pypackage

The generator will automatically call hatch env create & git init at the end.

Then, for the GitHub Actions pipelines to work correctly, you should:

  • Enable the GitHub repository in Codecov.
  • Set CODECOV_TOKEN in your GitHub repository secrets. You can find in the Codecov settings of the corresponding project.
  • Enable GitHub Pages using the GitHub Actions source.
  • Option to publish to Test PyPI for testing.
  • Configure the Trusted Publisher method on PyPI: it's a modern and secure method to push your package to PyPI.

License

This project is licensed under the terms of the MIT license.

About

A modern take on my python projects using ruff, uv, pytest, hatch, hatchling with Github Actions and pre-commits

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%