Step by Step Basics: Code Autodocumentation

You can build beautiful, standardised and stylised documentation using just the docstrings in a few simple steps.
A Data Scientist holds many responsibilities when working on a project, and one that is usually left until the last minute is Documentation. Perhaps you're diligent with writing docstrings for classes and functions (well done!) – but should that be the resting place of your documentation?
In my opinion, documentation should sit independently from your code. Your team (or you in a few months time) shouldn't have to trawl through hundreds of lines of code in your python modules to understand what's going on. You can build beautiful, standardised and stylised documentation using just the docstrings in a few simple steps and make your project speak for itself.
In this article, I'll focus on using the Sphinx framework for autodocumenting Python modules. I'll also be using the Cookiecutter Data Science project template in Visual Studio Code (VS Code) due to its seamless integration with Sphinx and standardised directory structure. Whilst the official sphinx tutorial documentation is a great resource for those wanting to take a deep dive into this topic, my aim for this article is to be a helpful ‘quick start' guide to take you through the key steps. Enjoy