Skip to content
Snippets Groups Projects
Commit 49e3d44c authored by Vincent Texier's avatar Vincent Texier
Browse files

Update Sphinx documentation

parent 49c22d30
No related branches found
No related tags found
1 merge request!29Update Sphinx documentation
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
import sys import sys
import os import os
import shlex
from unittest.mock import MagicMock from unittest.mock import MagicMock
# If extensions (or modules to document with autodoc) are in another directory, # If extensions (or modules to document with autodoc) are in another directory,
...@@ -23,6 +22,7 @@ from unittest.mock import MagicMock ...@@ -23,6 +22,7 @@ from unittest.mock import MagicMock
# 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.
#sys.path.insert(0, os.path.abspath('.')) #sys.path.insert(0, os.path.abspath('.'))
sys.path.append(os.path.join("..")) sys.path.append(os.path.join(".."))
# -- General configuration ------------------------------------------------ # -- General configuration ------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here. # If your documentation needs a minimal Sphinx version, state it here.
...@@ -43,9 +43,10 @@ class Mock(MagicMock): ...@@ -43,9 +43,10 @@ class Mock(MagicMock):
def __getattr__(cls, name): def __getattr__(cls, name):
return Mock() return Mock()
MOCK_MODULES = ['libnacl', 'libnacl.sign'] # BUG: trigger a recursion error when run with python 3...
sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES) # MOCK_MODULES = ['libnacl', 'libnacl.sign']
# sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES)
#
# Add any paths that contain templates here, relative to this directory. # Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates'] templates_path = ['_templates']
...@@ -71,9 +72,9 @@ author = 'caner & inso' ...@@ -71,9 +72,9 @@ author = 'caner & inso'
# built documents. # built documents.
# #
# The short X.Y version. # The short X.Y version.
version = '0.12' version = '0.30.5'
# The full version, including alpha/beta/rc tags. # The full version, including alpha/beta/rc tags.
release = '0.12' release = '0.30.5'
# The language for content autogenerated by Sphinx. Refer to documentation # The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages. # for a list of supported languages.
...@@ -124,7 +125,7 @@ todo_include_todos = True ...@@ -124,7 +125,7 @@ todo_include_todos = True
# The theme to use for HTML and HTML Help pages. See the documentation for # The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes. # a list of builtin themes.
html_theme = 'alabaster' #html_theme = 'alabaster'
# Theme options are theme-specific and customize the look and feel of a theme # 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 # further. For a list of options available for each theme, see the
...@@ -153,7 +154,7 @@ html_theme = 'alabaster' ...@@ -153,7 +154,7 @@ html_theme = 'alabaster'
# Add any paths that contain custom static files (such as style sheets) here, # 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, # relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css". # so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static'] #html_static_path = ['_static']
# Add any extra paths that contain custom files (such as robots.txt or # Add any extra paths that contain custom files (such as robots.txt or
# .htaccess) here, relative to this directory. These files are copied # .htaccess) here, relative to this directory. These files are copied
......
Documents methods
=================
.. automodule:: duniterpy.documents.block
:members:
:special-members:
:exclude-members: __dict__,__weakref__
.. automodule:: duniterpy.documents.certification
:members:
:special-members:
:exclude-members: __dict__,__weakref__
.. automodule:: duniterpy.documents.document
:members:
:special-members:
:exclude-members: __dict__,__weakref__
.. automodule:: duniterpy.documents.membership
:members:
:special-members:
:exclude-members: __dict__,__weakref__
.. automodule:: duniterpy.documents.peer
:members:
:special-members:
:exclude-members: __dict__,__weakref__
.. automodule:: duniterpy.documents.status
:members:
:special-members:
:exclude-members: __dict__,__weakref__
.. automodule:: duniterpy.documents.transaction
:members:
:special-members:
:exclude-members: __dict__,__weakref__
\ No newline at end of file
duniterpy.api.bma.network package
=================================
Submodules
----------
duniterpy.api.bma.network.peering module
----------------------------------------
.. automodule:: duniterpy.api.bma.network.peering
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: duniterpy.api.bma.network
:members:
:undoc-members:
:show-inheritance:
duniterpy.api.bma package
=========================
Subpackages
-----------
.. toctree::
duniterpy.api.bma.network
duniterpy.api.bma.tx
Submodules
----------
duniterpy.api.bma.api module
----------------------------
.. automodule:: duniterpy.api.bma.api
:members:
:undoc-members:
:show-inheritance:
duniterpy.api.bma.blockchain module
-----------------------------------
.. automodule:: duniterpy.api.bma.blockchain
:members:
:undoc-members:
:show-inheritance:
duniterpy.api.bma.node module
-----------------------------
.. automodule:: duniterpy.api.bma.node
:members:
:undoc-members:
:show-inheritance:
duniterpy.api.bma.ud module
---------------------------
.. automodule:: duniterpy.api.bma.ud
:members:
:undoc-members:
:show-inheritance:
duniterpy.api.bma.wot module
----------------------------
.. automodule:: duniterpy.api.bma.wot
:members:
:undoc-members:
:show-inheritance:
duniterpy.api.bma.ws module
---------------------------
.. automodule:: duniterpy.api.bma.ws
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: duniterpy.api.bma
:members:
:undoc-members:
:show-inheritance:
duniterpy.api.bma.tx package
============================
Submodules
----------
duniterpy.api.bma.tx.history module
-----------------------------------
.. automodule:: duniterpy.api.bma.tx.history
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: duniterpy.api.bma.tx
:members:
:undoc-members:
:show-inheritance:
duniterpy.api package
=====================
Subpackages
-----------
.. toctree::
duniterpy.api.bma
Submodules
----------
duniterpy.api.errors module
---------------------------
.. automodule:: duniterpy.api.errors
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: duniterpy.api
:members:
:undoc-members:
:show-inheritance:
duniterpy.documents package
===========================
Submodules
----------
duniterpy.documents.block module
--------------------------------
.. automodule:: duniterpy.documents.block
:members:
:undoc-members:
:show-inheritance:
duniterpy.documents.certification module
----------------------------------------
.. automodule:: duniterpy.documents.certification
:members:
:undoc-members:
:show-inheritance:
duniterpy.documents.constants module
------------------------------------
.. automodule:: duniterpy.documents.constants
:members:
:undoc-members:
:show-inheritance:
duniterpy.documents.document module
-----------------------------------
.. automodule:: duniterpy.documents.document
:members:
:undoc-members:
:show-inheritance:
duniterpy.documents.membership module
-------------------------------------
.. automodule:: duniterpy.documents.membership
:members:
:undoc-members:
:show-inheritance:
duniterpy.documents.peer module
-------------------------------
.. automodule:: duniterpy.documents.peer
:members:
:undoc-members:
:show-inheritance:
duniterpy.documents.transaction module
--------------------------------------
.. automodule:: duniterpy.documents.transaction
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: duniterpy.documents
:members:
:undoc-members:
:show-inheritance:
duniterpy.grammars package
==========================
Submodules
----------
duniterpy.grammars.output module
--------------------------------
.. automodule:: duniterpy.grammars.output
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: duniterpy.grammars
:members:
:undoc-members:
:show-inheritance:
duniterpy.key package
=====================
Submodules
----------
duniterpy.key.base58 module
---------------------------
.. automodule:: duniterpy.key.base58
:members:
:undoc-members:
:show-inheritance:
duniterpy.key.encryption_key module
-----------------------------------
.. automodule:: duniterpy.key.encryption_key
:members:
:undoc-members:
:show-inheritance:
duniterpy.key.signing_key module
--------------------------------
.. automodule:: duniterpy.key.signing_key
:members:
:undoc-members:
:show-inheritance:
duniterpy.key.verifying_key module
----------------------------------
.. automodule:: duniterpy.key.verifying_key
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: duniterpy.key
:members:
:undoc-members:
:show-inheritance:
duniterpy package
=================
Subpackages
-----------
.. toctree::
duniterpy.api
duniterpy.documents
duniterpy.grammars
duniterpy.key
Module contents
---------------
.. automodule:: duniterpy
:members:
:undoc-members:
:show-inheritance:
#!/usr/bin/env bash
# Infos how-to generate automatically all rst documents for a python package :
# http://stackoverflow.com/questions/4616693/automatically-generating-documentation-for-all-python-package-contents
# generate rst files of all the package
sphinx-apidoc -o . ../duniterpy
# generate HTML
make html
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
contain the root `toctree` directive. contain the root `toctree` directive.
duniterpy : A python implementation of duniter API duniterpy : A python implementation of duniter API
============================================== ==================================================
duniterpy is a library to develop an application for duniter. duniterpy is a library to develop an application for duniter.
duniterpy helps to handle the following problem : duniterpy helps to handle the following problem :
...@@ -28,13 +28,12 @@ Contributions are welcome. ...@@ -28,13 +28,12 @@ Contributions are welcome.
Contents: Contents:
======== =========
.. toctree:: .. toctree::
:maxdepth: 2 :glob:
documents
modules
Indices and tables Indices and tables
================== ==================
......
duniterpy
=========
.. toctree::
:maxdepth: 4
duniterpy
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment