6028: Cleaned up and improved the Gramps API docs, Sphinx - fixed four ERROR: Unexpected indentation, added 'sphinx.ext.viewcode' to allow Sphinx to 'Add links to highlighted source code' http://sphinx-doc.org/latest/ext/viewcode.html , updated the copyright year and instructions to use pip

This commit is contained in:
Sam Manzi 2014-09-29 19:51:38 +02:00 committed by Jérôme Rapinat
parent 453b339775
commit e2e4d3c57a
6 changed files with 15 additions and 13 deletions

View File

@ -3,7 +3,9 @@ Installation and building the docs
You need to install sphinx. Assuming you have installed the python setuptools, just do:
sudo easy_install sphinx
sudo easy_install sphinx
or
sudo pip install sphinx
Once installed, go to the docs directory, and do:
@ -17,7 +19,7 @@ Documentation Guidelines
Doc strings in python files should be written in reStructured text: http://docutils.sourceforge.net/docs/user/rst/quickref.html
The typical docstring for GRAMPS should look like this:
The typical docstring for Gramps should look like this:
"""Brief synopsis
@ -69,4 +71,4 @@ Change in many files something:
perl -pi -w -e "s/L{PersonRef}/:class:\`\~gen.lib.personref.PersonRef\`/g;" *.py
here L{PersonRef} is changed in :class:`~gen.lib.personref.PersonRef
`
`

View File

@ -25,7 +25,7 @@ sys.path.append(os.path.abspath(os.pardir))
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.todo', 'sphinx.ext.coverage']
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.todo', 'sphinx.ext.coverage', 'sphinx.ext.viewcode']
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
@ -41,16 +41,16 @@ master_doc = 'index'
# General information about the project.
project = u'Gramps'
copyright = u'2012, The Gramps Project'
copyright = u'2014, The Gramps Project'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = '4.1'
version = '4.2.0'
# The full version, including alpha/beta/rc tags.
release = '4.0.99-trunk'
release = '4.2.0-master'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.

View File

@ -1,4 +1,4 @@
Developer Guide
===============
Please consult the API documentation, and the development part of `our wiki <http://gramps-project.org>`_\ .
Please consult the API documentation, and the development section of `our wiki <https://gramps-project.org/wiki/index.php?title=Portal:Developers>`_\ .

View File

@ -1,4 +1,4 @@
User Guide
==========
Please consult the manual which you find on `our wiki <http://www.gramps-project.org/wiki/index.php?title=User_manual>`_\ .
Please consult the manual which you find on `our wiki <https://gramps-project.org/wiki/index.php?title=User_manual>`_\ .

View File

@ -385,14 +385,14 @@ class BasePluginManager(object):
def get_reg_reports(self, gui=True):
""" Return list of registered reports
:param gui: bool indicating if GUI reports or CLI reports must be
returned
returned
"""
return self.__pgr.report_plugins(gui)
def get_reg_tools(self, gui=True):
""" Return list of registered tools
:aram gui: bool indicating if GUI reports or CLI reports must be
returned
returned
"""
return self.__pgr.tool_plugins(gui)

View File

@ -247,7 +247,7 @@ class GuiPluginManager(Callback):
def get_reg_reports(self, gui=True):
""" Return list of non hidden registered reports
:Param gui: bool indicating if GUI reports or CLI reports must be
returned
returned
"""
return [plg for plg in self.basemgr.get_reg_reports(gui)
if plg.id not in self.__hidden_plugins]
@ -255,7 +255,7 @@ class GuiPluginManager(Callback):
def get_reg_tools(self, gui=True):
""" Return list of non hidden registered tools
:Param gui: bool indicating if GUI reports or CLI reports must be
returned
returned
"""
return [plg for plg in self.basemgr.get_reg_tools(gui)
if plg.id not in self.__hidden_plugins]