fedejaure / cookiecutter-modern-pypackage

Cookiecutter πŸͺ template for a modern Python package πŸπŸ“¦.

Home Page:https://cookiecutter-modern-pypackage.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cookiecutter Modern PyPackage πŸπŸ“¦

GitHub release (latest SemVer) Python Version Tests Read the Docs License

Black pre-commit Contributor Covenant

Cookiecutter πŸͺ template for a modern Python package πŸπŸ“¦.

πŸš€ Features

  • Dependency tracking: πŸ“¦ Utilizes Poetry for efficient package management.
  • Testing setup: πŸ§ͺ Includes Pytest for comprehensive and reliable testing.
  • Continuous Integration: πŸ”„ Github Actions integration for seamless CI testing.
  • Linting: 🧹 Enhanced code quality with Ruff.
  • Docstring: πŸ“š Follows the Google Python Style Guide for clear and consistent documentation.
  • Static type checking: πŸ” Ensured by Mypy.
  • Formatting: ✨ Consistent code formatting with Black and Isort.
  • Security checks: πŸ” Uses Safety to identify and address known vulnerabilities.
  • Git hooks: 🎣 Managed by pre-commit for streamlined development workflows.
  • Development tasks CLI: πŸ› οΈ All-in-one Python CLI provided by invoke.
  • Multiple Python environments testing: πŸ₯ Supported by Nox.
  • Documentation: πŸ“– Utilizes Sphinx for clear and comprehensive documentation, ready for Read the Docs.
  • Command line interface: πŸ’» Optional integration with Typer.
  • Automated dependency updates: πŸ€– Enabled by Dependabot.
  • Coverage reports: πŸ“Š Integrated with Codecov.
  • Automated releases: 🚒 Push a new tag to trigger releases to PyPI and TestPyPI.
  • GitHub community health files (optional):

⚑️ Quickstart

Get started with your modern Python package in just a few steps:

1. Install Cookiecutter

If you haven't installed Cookiecutter yet, make sure to have version 1.4.0 or higher:

pip install -U cookiecutter

2. Generate your Python Package

Run Cookiecutter using the latest release

cookiecutter gh:fedejaure/cookiecutter-modern-pypackage --checkout v3.0.1

3. Set up Your Project

Follow these steps to complete the setup:

  • Create a new GitHub repository and push your generated project there.

  • Install the development requirements into a virtual environment:

    poetry install
  • Install pre-commit hooks:

    poetry run inv install-hooks
  • Configure Codecov repository settings. (Codecov App, CODECOV_TOKEN)

  • Add your repository to your Read the Docs account and enable the Read the Docs service hook.

  • Configure PyPI and TestPyPI tokens. (PYPI_TOKEN, TEST_PYPI_TOKEN)

  • Release your package by pushing a new tag.

Tip

For more details, see the tutorial.

πŸ“ Credits

This cookiecutter was built for learning purpose and inspired by:

About

Cookiecutter πŸͺ template for a modern Python package πŸπŸ“¦.

https://cookiecutter-modern-pypackage.readthedocs.io

License:MIT License


Languages

Language:Python 100.0%