Sphinx
Sphinx
Installation in Ubuntu
via pip (recommended)
pip install -U sphinxvia conda
conda install sphinxQuick Start
mkdir docs
cd docssphinx-quickstart> Separate source and build directories (y/n) [n]:> Project name:> Author name(s):> Project release []:> Project language [en]:build dir, source dir, make.abt file, Makefile created in docs dir
Install extensions
MyST parser
pip install myst-parserMarkdown Checkbox
pip install sphinx-markdown-checkboxCopy button
pip install sphinx-copybuttonCopy button
pip install sphinx-designInline tabs
pip install sphinx_inline_tabsselect themes from here
> pip install furo:autodoc
If it wasn’t commented out, it would indicate that your package is in the same directory as the conf.py file. You’ll need to change it to this:
import os
import sys
sys.path.insert(0, os.path.abspath('..'))The Napoleon extension enables Sphinx to understand docstrings written in two other popular formats: NumPy and Google.
> extensions = [..,
'sphinx.ext.autodoc',
'sphinx.ext.coverage',
'sphinx.ext.napoleon'
]sphinx-apidoc -o <OUTPUT_PATH> <MODULE_PATH>