A checklist to ensure quality, maintainability, and usability of your Python package.
- Clear purpose and use cases defined
- Scoped to a specific problem/domain
- Project name is meaningful and not taken on PyPI
- Uses
src/layout or appropriate flat structure - All package folders contain
__init__.py - Main configuration handled via
pyproject.toml - Includes standard files:
README.md,LICENSE,.gitignore,CHANGELOG.md
- All dependencies declared in
pyproject.tomlorrequirements.txt - Development dependencies separated from runtime dependencies
- Uses minimal, necessary dependencies only
- Follows PEP 8 formatting
- Imports sorted with
isortorruff - No linter warnings (
ruff,flake8, etc.) - Fully typed using
typingmodule - No unresolved TODOs or FIXME comments
- Functions are small, pure, and single-responsibility
- Classes follow clear and simple roles
- Global state is avoided
- Public API defined explicitly (e.g. via
__all__)
-
README.mdincludes overview, install, usage, contributing - All functions/classes include docstrings (Google/NumPy style)
- API reference documentation auto-generated (e.g., Sphinx, MkDocs)
- Optional:
docs/folder for additional documentation or site generator
- Unit and integration tests implemented
- Test coverage > 80% verified by
coverage - Tests are fast and deterministic
- Continuous Integration (CI) configured to run tests
- Uses semantic versioning (MAJOR.MINOR.PATCH)
- Git tags created for releases
-
CHANGELOG.mdupdated with each release - Local build verified (
poetry build,hatch build, or equivalent) - Can be published to PyPI and/or TestPyPI
- CLI entrypoint works correctly (
__main__.pyorentry_points) - CLI provides helpful messages (
--help) and handles errors gracefully
- Usage examples included in
README.mdorexamples/ - Optional: Jupyter notebooks with demonstrations
- Optional: Colab or Binder links for live usage
- LICENSE file included (MIT, Apache 2.0, GPL, etc.)
- Author and contributors credited in
README.md - Optional:
CITATION.cfffile for academic citation
You can duplicate this file for each new package or use it as a GitHub issue template for release checklists.