Skip to content

lambda-science/modern-python-boilerplate

Repository files navigation

Modern Python Boilerplate

This is my modern python boilerplate. The goal is to provide a good starting point to develop new python project with most up-to-date tooling, structure and good practices.
Creator and Maintainer: Corentin Meyer, PhD in Biomedical AI [email protected]

Pre-Requisites

This project use UV and Make, they should be installed.

Features

A global Makefile to run all the commands. You can run make help to see all the available commands.

  • Python Management
    • UV for python version management .python-version
    • UV for dependency management pyproject.toml
    • src/package structure
    • Usage of Project Script to directly call the package like $ modern_python_boilerplate
  • Continuous Integration make allci
    • Ruff for linting make check
    • Ruff for formatting make format
    • Ty for type checking make type
    • Pytest for testing make test
    • Pytest-cov for testing coverage make cov
    • Pre-commit hooks to make some checks and formatting code before commits make commit
  • Documentation
    • Mkdocs for documentation building with Markdown make doc
    • Automatic build of the API Reference page
    • Pre-configured GitHub Action / Gitlab CI for publishing the documentation on Github pages / Gitlab page
  • Running, Publishing and Deploying
    • Build the pacakge with UV make build
    • Publish to PyPi with Twine make publish
    • Dockerfile to run in a container make dockerbuild and make dockerrun
    • DevContainer pre-configured. .devcontainer/devcontainer.json, working with PyCharm

How to use

  1. Delete this README.md to replace by you package one.
  2. Replace all occurrence of modern_python_boilerplate and modern-python-boilerplate and ModernPythonBoilerplate by your pacakge name. Including folder names in src/.
  3. Get familiar with make help, it will show you all the available commands.

Readme Sample for your pacakge

MyPackage

This is my package. It does some cool stuff.

Installation

From PyPi: pip install my_package From source: pip install -e .

Usage

Example 1: my_package --help

Contact

Creator and Maintainer: [Your Name, Your Title](your website) [email protected]

About

My own python boilerplate for package developement

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published