Docs now auto-generate from docstrings

develop
Jef Roosens 2020-08-27 18:18:27 +02:00
parent e41d9780a4
commit 9c1a56445b
5 changed files with 11 additions and 13 deletions

4
.gitignore vendored
View File

@ -8,8 +8,10 @@ build/
*.egg-info/ *.egg-info/
*.eggs/ *.eggs/
# Docs output # Docs
docs/build docs/build
docs/source/*.rst
!docs/source/index.rst
# Caches # Caches
__pycache__/ __pycache__/

View File

@ -47,8 +47,8 @@ clean-setup:
@ find . -maxdepth 1 -type d -name '*.egg-info' -exec rm -rf "{}" \; @ find . -maxdepth 1 -type d -name '*.egg-info' -exec rm -rf "{}" \;
# =====DOCS===== # =====DOCS=====
docs: build-venv docs: build-venv docs/source/conf.py docs/source/index.rst
@ "$(VENV)/bin/sphinx-apidoc" -o "$(DOCS)/source" "$(SRC)" @ "$(VENV)/bin/sphinx-apidoc" -f -o "$(DOCS)/source" "$(SRC)"
@ "$(VENV)/bin/sphinx-build" "$(DOCS)/source" "$(DOCS)/build" @ "$(VENV)/bin/sphinx-build" "$(DOCS)/source" "$(DOCS)/build"

View File

@ -10,9 +10,9 @@
# add these directories to sys.path here. If the directory is relative to the # add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here. # documentation root, use os.path.abspath to make it absolute, like shown here.
# #
# import os import os
# import sys import sys
# sys.path.insert(0, os.path.abspath('.')) sys.path.insert(0, os.path.abspath('../..'))
# -- Project information ----------------------------------------------------- # -- Project information -----------------------------------------------------
@ -31,6 +31,7 @@ release = '0.1'
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones. # ones.
extensions = [ extensions = [
'sphinx.ext.napoleon',
] ]
# Add any paths that contain templates here, relative to this directory. # Add any paths that contain templates here, relative to this directory.

View File

@ -1,8 +1,3 @@
.. Frank documentation master file, created by
sphinx-quickstart on Thu Aug 27 17:28:57 2020.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to Frank's documentation! Welcome to Frank's documentation!
================================= =================================

View File

@ -37,7 +37,7 @@ class HelpMod(Module):
await channel.send(embed=embed) await channel.send(embed=embed)
@regex_command(cmd='.+', help_str='Show help about a certain module.') @regex_command(pattern='.+', help_str='Show help about a certain module.')
async def show_module_help(self, prefix: str, cmd: List[str], author: User, async def show_module_help(self, prefix: str, cmd: List[str], author: User,
channel: Messageable, mid: int): channel: Messageable, mid: int):
# Yes, this command just ignores cmd at the moment # Yes, this command just ignores cmd at the moment