diff --git a/.gitignore b/.gitignore index a65b273..b4bfba1 100644 --- a/.gitignore +++ b/.gitignore @@ -8,8 +8,10 @@ build/ *.egg-info/ *.eggs/ -# Docs output +# Docs docs/build +docs/source/*.rst +!docs/source/index.rst # Caches __pycache__/ diff --git a/Makefile b/Makefile index 2f30a78..a7e6a75 100644 --- a/Makefile +++ b/Makefile @@ -47,8 +47,8 @@ clean-setup: @ find . -maxdepth 1 -type d -name '*.egg-info' -exec rm -rf "{}" \; # =====DOCS===== -docs: build-venv - @ "$(VENV)/bin/sphinx-apidoc" -o "$(DOCS)/source" "$(SRC)" +docs: build-venv docs/source/conf.py docs/source/index.rst + @ "$(VENV)/bin/sphinx-apidoc" -f -o "$(DOCS)/source" "$(SRC)" @ "$(VENV)/bin/sphinx-build" "$(DOCS)/source" "$(DOCS)/build" diff --git a/docs/source/conf.py b/docs/source/conf.py index ec7ed4e..386c386 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -10,9 +10,9 @@ # 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. # -# import os -# import sys -# sys.path.insert(0, os.path.abspath('.')) +import os +import sys +sys.path.insert(0, os.path.abspath('../..')) # -- Project information ----------------------------------------------------- @@ -31,6 +31,7 @@ release = '0.1' # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ + 'sphinx.ext.napoleon', ] # Add any paths that contain templates here, relative to this directory. @@ -52,4 +53,4 @@ html_theme = 'alabaster' # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['_static'] \ No newline at end of file +html_static_path = ['_static'] diff --git a/docs/source/index.rst b/docs/source/index.rst index 08aa64f..b2bd4a0 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -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! ================================= diff --git a/frank/modules/help.py b/frank/modules/help.py index b8a6c61..fa08f33 100644 --- a/frank/modules/help.py +++ b/frank/modules/help.py @@ -37,7 +37,7 @@ class HelpMod(Module): 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, channel: Messageable, mid: int): # Yes, this command just ignores cmd at the moment