Topic

Package and Share Your Python Code Like a Pro
By: Paul Zuradzki
Date: Aug. 8, 2024, 6 p.m.

Have you ever struggled with making your Python scripts reproducible? Do you want another project to be able to use your code without forcing users to copy your files? 

Ever get stumped by these errors:
```
ImportError: No module named MyPackage
ImportError: attempted relative import with no known parent package
```

If yes, then this talk is for you!

We will talk about
- Python module search path basics
- Learn to make a pip-installable package with automated code quality tools. Introducing `pyproject.toml` and `setup.py`.
- Installing a Python package from zip, GitHub, or PyPI
- Introduce a minimal GitHub Actions workflow file and pre-commits. 
- Introduce code quality tools for linting, formatting, type checking, and testing (pytest, black, mypy, ruff). We won't go into the details of each, but we will show how to run these tools in a automated fashion.