Publishing well formed Python packages
summary
Adopts concrete tooling and practices: use pylint / flake8 / black for style, mypy or pyre for static types, and vulture to find dead code; an example shows mypy catching an int-for-bool bug and coverage rising to 100% after adding one missing test. Recommends pytest plus coverage.py and tox/nox to run tests in isolated virtualenvs, explains that an src layout prevents accidental imports that spoil tox tests, and notes packaging with setuptools/flit/poetry and publishing via twine or built-in flit/poetry commands.
AI-written summary · about
chapters (16)
- 0:00Intro
- 0:28Well formed package
- 1:15Overview
- 4:31Linting and style - Tools: Black
- 6:49Static type checking - Example
- 8:50Dead code
- 9:49Unit testing
- 10:47pytest - Example
- 12:39Test coverage - Example
- 14:38Test automation - Tools
- 16:31Package layout - flat
- 18:21Packaging
- 18:53Publishing
- 19:22Other tools
- 19:59The way ahead
- 20:59Summary
related talks
25mPublishing well-formed Python packages
47mPublishing & Maintaining Opensource Python Packages in PyPI
26mOpen Source on Easy Mode
51mTaking Python beyond scripting
28mModern Python packaging without pain
24mShipping your first Python package and automating future publishing
36mPython Packaging from Init to Deploy
02h 25mModern Python Developer's Toolkit
