Automatic Python documentation with Sphinx autodoc and ReadTheDocs

Generating Python documentation for packages/modules can be quite time consuming, but there's a way to generate it automatically from docstrings. This post is mostly a summary of the fantastic guide by Sam Nicholls found here, but with one important addition (see the section on mocking). We'll be using the following: Sphinx - Python package for generating documentation Sphinx autodoc - Sphinx extension to generate documentation from docstrings ReadTheDocs - build and host documentation online Before you start, make sure you've written docstrings for your modules/functions/methods. This is the most time consuming part, but you should be commenting and documenting your…

0 Comments

Configure (base) Spacemacs

I love using Spacemacs. I like how extensible Emacs is, but prefer the modal editing nature of Vi(m), and Spacemacs provides the best of both worlds through the use of Evil. Tinkering with my editor configuration to get the perfect setup is fun, and there are a few ways this can be achieved: Use base Emacs with customizations Use the full Spacemacs distribution Customize the base Spacemacs distribution Using base Emacs (1) and adding our own packages and configurations is doable but it takes a lot of work. Full Spacemacs (2) offers everything the distribution has to offer, but I…

0 Comments