Skip to content

Commit

Permalink
Fix documentation and make plugins lazy
Browse files Browse the repository at this point in the history
  • Loading branch information
icgood committed May 1, 2020
1 parent fd0e95f commit 53364b6
Show file tree
Hide file tree
Showing 21 changed files with 157 additions and 185 deletions.
9 changes: 5 additions & 4 deletions doc/Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = source
BUILDDIR = build

Expand All @@ -16,4 +17,4 @@ help:
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
2 changes: 1 addition & 1 deletion doc/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
sphinx < 2
sphinx
sphinx-autodoc-typehints
cloud_sptheme
141 changes: 12 additions & 129 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
# -*- coding: utf-8 -*-
#
# Configuration file for the Sphinx documentation builder.
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# http://www.sphinx-doc.org/en/master/config
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# -- Path setup --------------------------------------------------------------

Expand All @@ -18,13 +16,13 @@

import pkg_resources

import cloud_sptheme as csp
import cloud_sptheme as csp # type: ignore


# -- Project information -----------------------------------------------------

project = 'pymap'
copyright = '2019, Ian Good'
copyright = '2020, Ian Good'
author = 'Ian Good'

# The short X.Y version
Expand All @@ -37,10 +35,6 @@

# -- General configuration ---------------------------------------------------

# If your documentation needs a minimal Sphinx version, state it here.
#
# needs_sphinx = '1.0'

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
Expand All @@ -55,29 +49,10 @@
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#
# source_suffix = ['.rst', '.md']
source_suffix = '.rst'

# The master toctree document.
master_doc = 'index'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = []

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = None
exclude_patterns = [] # type: ignore


# -- Options for HTML output -------------------------------------------------
Expand All @@ -90,113 +65,21 @@
# set the theme path to point to cloud's theme data
html_theme_path = [csp.get_theme_dir()]

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#
# html_theme_options = {}

# 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']

# Custom sidebar templates, must be a dictionary that maps document names
# to template names.
#
# The default sidebars (for documents that don't match any pattern) are
# defined by theme itself. Builtin themes are using these templates by
# default: ``['localtoc.html', 'relations.html', 'sourcelink.html',
# 'searchbox.html']``.
#
# html_sidebars = {}


# -- Options for HTMLHelp output ---------------------------------------------

# Output file base name for HTML help builder.
htmlhelp_basename = 'pymapdoc'


# -- Options for LaTeX output ------------------------------------------------

latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#
# 'papersize': 'letterpaper',

# The font size ('10pt', '11pt' or '12pt').
#
# 'pointsize': '10pt',

# Additional stuff for the LaTeX preamble.
#
# 'preamble': '',

# Latex figure (float) alignment
#
# 'figure_align': 'htbp',
}

# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'pymap.tex', 'pymap Documentation',
'Ian Good', 'manual'),
]


# -- Options for manual page output ------------------------------------------

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'pymap', 'pymap Documentation',
[author], 1)
]


# -- Options for Texinfo output ----------------------------------------------

# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'pymap', 'pymap Documentation',
author, 'pymap', 'One line description of project.',
'Miscellaneous'),
]


# -- Options for Epub output -------------------------------------------------

# Bibliographic Dublin Core info.
epub_title = project

# The unique identifier of the text. This can be a ISBN number
# or the project homepage.
#
# epub_identifier = ''

# A unique identification for the text.
#
# epub_uid = ''

# A list of files that should not be packed into the epub file.
epub_exclude_files = ['search.html']


# -- Extension configuration -------------------------------------------------

autodoc_member_order = 'bysource'
autodoc_default_flags = ['show-inheritance']
napoleon_numpy_docstring = False

# -- Options for intersphinx extension ---------------------------------------

# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {'https://docs.python.org/': None,
intersphinx_mapping = {'https://docs.python.org/3/': None,
'https://icgood.github.io/pymap-admin/': None,
'https://icgood.github.io/pysasl/': None,
'https://aioredis.readthedocs.io/en/latest/': None,
'https://grpclib.readthedocs.io/en/latest/': None}

autodoc_member_order = 'bysource'
autodoc_default_flags = ['show-inheritance']
napoleon_numpy_docstring = False
9 changes: 4 additions & 5 deletions doc/source/index.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
.. pymap documentation master file, created by
sphinx-quickstart on Wed Oct 17 12:39:35 2018.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
#######################
``pymap`` Documentation
#######################
Expand Down Expand Up @@ -31,6 +26,10 @@ Table of Contents
pymap.interfaces
pymap.parsing
pymap.mime
pymap.threads
pymap.plugin
pymap.service
pymap.user
pymap.backend
pymap.imap
pymap.admin
Expand Down
9 changes: 9 additions & 0 deletions doc/source/pymap.admin.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,12 @@

.. automodule:: pymap.admin.handlers
:members:

.. automodule:: pymap.admin.handlers.system
:members:

.. automodule:: pymap.admin.handlers.mailbox
:members:

.. automodule:: pymap.admin.handlers.user
:members:
3 changes: 3 additions & 0 deletions doc/source/pymap.backend.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
pymap.backend.maildir
pymap.backend.redis

.. automodule:: pymap.backend
:members:

``pymap.backend.mailbox``
----------------------------

Expand Down
3 changes: 3 additions & 0 deletions doc/source/pymap.bytes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@

.. automodule:: pymap.bytes
:members:

.. automodule:: pymap.bytes.rev
:members:
3 changes: 3 additions & 0 deletions doc/source/pymap.imap.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@

.. automodule:: pymap.imap
:members:

.. automodule:: pymap.imap.state
:members:
7 changes: 7 additions & 0 deletions doc/source/pymap.interfaces.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@
:members:
:special-members: __call__

``pymap.interfaces.users``
--------------------------

.. automodule:: pymap.interfaces.users
:members:
:special-members: __call__

``pymap.interfaces.filter``
---------------------------

Expand Down
27 changes: 24 additions & 3 deletions doc/source/pymap.parsing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@
.. automodule:: pymap.parsing.exceptions
:members:

``pymap.parsing.state``
----------------------------

.. automodule:: pymap.parsing.state
:members:

``pymap.parsing.commands``
----------------------------

Expand Down Expand Up @@ -59,6 +65,12 @@
.. automodule:: pymap.parsing.specials.mailbox
:members:

.. automodule:: pymap.parsing.specials.objectid
:members:

.. automodule:: pymap.parsing.specials.options
:members:

.. automodule:: pymap.parsing.specials.searchkey
:members:

Expand All @@ -68,9 +80,6 @@
.. automodule:: pymap.parsing.specials.statusattr
:members:

.. automodule:: pymap.parsing.specials.options
:members:

.. automodule:: pymap.parsing.specials.tag
:members:

Expand All @@ -88,3 +97,15 @@

.. automodule:: pymap.parsing.response.specials
:members:

``pymap.parsing.modutf7``
----------------------------

.. automodule:: pymap.parsing.modutf7
:members:

``pymap.parsing.message``
----------------------------

.. automodule:: pymap.parsing.message
:members:
6 changes: 6 additions & 0 deletions doc/source/pymap.plugin.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

``pymap.plugin``
====================

.. automodule:: pymap.plugin
:members:
6 changes: 6 additions & 0 deletions doc/source/pymap.service.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

``pymap.service``
====================

.. automodule:: pymap.service
:members:
6 changes: 6 additions & 0 deletions doc/source/pymap.sieve.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
.. automodule:: pymap.sieve
:members:

``pymap.sieve.tests``
---------------------

.. automodule:: pymap.sieve.tests
:members:

``pymap.sieve.manage``
----------------------

Expand Down
6 changes: 6 additions & 0 deletions doc/source/pymap.threads.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

``pymap.threads``
====================

.. automodule:: pymap.threads
:members:
6 changes: 6 additions & 0 deletions doc/source/pymap.user.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

``pymap.user``
====================

.. automodule:: pymap.user
:members:
Loading

0 comments on commit 53364b6

Please sign in to comment.