The Proper Python Developer
KDDlab's PhDs (2022)
Where: University of Pisa
Duration: 2 hours
Who(‘s teaching): Dr. Giulio Rossetti
This short course focuses uses a simple template repository to exemplify: how to structure a python project and leverage GitHub Actions to automatically build and publish it as a python package (to PyPI and Conda).
The discussed project describes a simple Python package containing an object class, an object container ad a few functions to perform object sorting and convert from/to JSON.
The template comes with:
- a few GitHub Actions to automatically build and publish the package to PyPI (and Conda) when a new release is created (or on demand);
- a GitHub Action to check the code quality using CodeQL;
- a GitHub Action to check compliance with Black code style;
- a few tests to exemplify the use of pytest;
- a minimal sphinx documentation to exemplify the use of sphinx and readthedocs;
- a minimal configuration files to exemplify the use of gitignore and coveragerc;
- a minimal setup.py to exemplify the use of setuptools.
Wiki
To learn more about the project (and for a crash course on the listed topics), please check the dedicated wiki.