Skip to content

todo-group/pypkg_template

Repository files navigation

📦 pypkg_template

License: MIT CI docs Ruff

Python package template with the modern toml-based style.

☑ Features

  • Modern pyproject.toml-based configuration
    • Dynamic versioning with setuptools_scm
    • Typing support with py.typed
  • Testing with nox/pytest
    • Cross-platform CI integrations
    • Coverage measurement with pytest-cov
  • Various linters
    • ruff for linting, formatting, and import sorting
    • mypy/pyright for static type checking
  • Documentation with sphinx
    • Building with CI

🛠 How to use

🐍 pip development

git clone https://github.com/todo-group/pypkg_template.git
cd pypkg_template
pip install pip -U
pip install -e .[dev]

🗃 pipenv development

git clone https://github.com/todo-group/pypkg_template.git
cd pypkg_template
pip install pip -U
pip install pipenv
pipenv install --dev
pipenv shell

🎨 Format/lint

# Run all linters
pre-commit run -a

🧪 Test

# Run unit tests in an isolated venv
nox

📜 Build docs.

Documentation is automatically deployed on push: see https://todo-group.github.io/pypkg_template/.

# Build docs and output to `docs/build`
sphinx-build docs/source docs/build

📦 Build package

# Build sdist/wheel and output to `dist`
python3 -m build

About

Python package template with the modern toml-based style.

Topics

Resources

License

Stars

Watchers

Forks

Languages