This tutorial will teach you how to make sure your Python code is reusable, reproducible, and ultimately useful for others. We will cover organization of Python code, packaging with setuptools, unit testing with unittest/pytest, code quality assurance with flake8, documentation with Sphinx, automation with Tox, continuous integration with Travis-CI, documentation hosting with ReadTheDocs, implementation of command line interfaces using Click, versioning with bumpversion, archiving on Zenodo, and ultimately deployment to PyPI. This tutorial will be appropriate for Python programmers of all skill levels and for projects of all sizes.
This isn't really a tutorial about coding in Python, but more about all of the best tools to use while/after you're doing it. This means that anyone, with any level of proficiency in Python can join and learn something - even if you're just at Hello World!. Most of the ideas from this talk can also be brought to other languages, so even if your favorite is another, you might still learn something.
This tutorial will be live-coded, but you can feel free to follow along! Before the talk, I'll post a link to a repository with all the code all ready in case you'd rather copy/paste or read in your favorite text editor. If you want to follow along, you'll need the following free accounts before we begin:
You'll also have to be comfortable using the command line and have the following software installed:
It would be best to work in an IDE like PyCharm, have a nice git GUI set up (you're not a martyr; I use GitHub Desktop), and have the following python packages installed and ready to go:
Finally, you should make a repository on GitHub where you can push your code and we can debug it together.