Skip to content

Repository files navigation

My opinionated python boilerplate.

  • make commands: Self-documenting targets (make help) for initializing, testing, linting, formatting, and building docs.
  • PyO3 & setuptools_rust: A Rust extension module built into the wheel, with a stamp-file rebuild (make rebuild) that only recompiles when crate sources change. Delete crates/ and the three Rust sections in pyproject.toml if you don't need it.
  • Dev container / artifact image: One multi-stage .devcontainer/Dockerfile serves contributors (toolchain image + make init, usable from VS Code, Codespaces, Docker/Podman, or Windows' native wslc) and artifact-evaluation reviewers (a frozen code+environment image whose build runs the test suite).
  • GitHub Actions: CI (lint + test), tag-triggered releases (abi3 wheels + sdist + frozen-dependency list attached to a draft GitHub release with an auto-generated changelog), and dormant-until-enabled deployments: a Sphinx docs site on GitHub Pages (DEPLOY_DOCS repository variable), PyPI via trusted publishing (PYPI_PUBLISH), a GHCR artifact image (PUBLISH_IMAGE), and Zenodo DOI archiving (external webhook). See CONTRIBUTING for the full feature reference.
  • Artifact evaluation ready: template-ARTIFACT.md mirrors the cTuning/ACM artifact-appendix structure used by HPCA/ISCA/MICRO/ASPLOS; CITATION.cff powers GitHub's cite button and Zenodo metadata.

Configuration Choices

  • Ruff: A high-performance Python linter built in Rust. Ruff is utilized in this project for its speed and extensive rule set. It consolidates the functionality of various tools like Flake8, isort, pydocstyle, and more, into a single, fast, and efficient package.
  • pre-commit: A set of pre-commit hooks automatically check and enforce code quality standards, including a commit-msg hook that rejects non-conventional commit messages.
  • pytest: Tests are written and executed using the pytest framework.
  • Sphinx: A docs/ skeleton (furo theme, autosummary API reference, nbsphinx) that builds warning-free from day one; CI keeps it green even before the Pages deploy is turned on.

Some references:

About

My opinionated python boilerplate

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages