Notes & thoughts on clean Python package design.
Understand the concepts behind this code
A Python Package Developer’s Cheat Sheet @ Better Programming / Medium
setup.py: the package’s descriptor file, consists of a Python script where multiple properties can be set declaratively. Properties declared in this file are recognized by package managers such as
pipand IDEs such as PyCharm, which means this is a must-have for any package.
setup.cfg: used to customize setup scripts, such as setting
pytestas the default runner for
python setup.py testcommand.
pytest.ini: contains parameters for
pytestexecution. For example, presenting coverage results both in the console and HTML files.
.coveragerc: controls the coverage script scope. This is pretty useful when you have folders in your project that don’t need to be monitored by the tool. In the proposed clean structure, only the
srcfolder needs to be covered.