Commit c6dc8cf7 authored by Tiago Peixoto's avatar Tiago Peixoto
Browse files

Simple documentation fixes

parent ef2fae83
...@@ -26,7 +26,7 @@ sys.path.append(os.path.abspath('.')) ...@@ -26,7 +26,7 @@ sys.path.append(os.path.abspath('.'))
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones. # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest', extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest',
'sphinx.ext.intersphinx', 'mathjax', 'sphinx.ext.autosummary', 'sphinx.ext.intersphinx', 'mathjax', 'sphinx.ext.autosummary',
'sphinxext.numpydoc', 'numpydoc',
'sphinx.ext.extlinks', 'sphinx.ext.extlinks',
'sphinx.ext.viewcode' 'sphinx.ext.viewcode'
#'sphinx.ext.linkcode' #'sphinx.ext.linkcode'
...@@ -209,15 +209,15 @@ extlinks = {'ticket': ('http://graph-tool.skewed.de/tickets/ticket/%s', ...@@ -209,15 +209,15 @@ extlinks = {'ticket': ('http://graph-tool.skewed.de/tickets/ticket/%s',
'arxiv': ('http://arxiv.org/abs/%s', 'arXiv: ')} 'arxiv': ('http://arxiv.org/abs/%s', 'arXiv: ')}
def process_docstring(app, what, name, obj, options, lines): # def process_docstring(app, what, name, obj, options, lines):
for i, line in enumerate(lines): # for i, line in enumerate(lines):
if "arg1" in line and "->" in line: # if "arg1" in line and "->" in line:
lines[i] = "" # lines[i] = ""
if "C++ signature :" in line or "graph_tool::Python" in line: # if "C++ signature :" in line or "graph_tool::Python" in line:
lines[i] = "" # lines[i] = ""
def setup(app): # def setup(app):
app.connect('autodoc-process-docstring', process_docstring) # app.connect('autodoc-process-docstring', process_docstring)
# plot directive # plot directive
import pyenv import pyenv
...@@ -229,6 +229,7 @@ numpydoc_show_class_members = False ...@@ -229,6 +229,7 @@ numpydoc_show_class_members = False
autodoc_docstring_signature = False autodoc_docstring_signature = False
autodoc_member_order = 'bysource' autodoc_member_order = 'bysource'
autoclass_content = 'both' autoclass_content = 'both'
imported_members = True
def linkcode_resolve(domain, info): def linkcode_resolve(domain, info):
if domain != 'py': if domain != 'py':
......
.. automodule:: graph_tool.draw .. automodule:: graph_tool.draw
:no-members: :no-members:
.. container:: sec_title
Layout algorithms Layout algorithms
=================
.. autofunction:: sfdp_layout .. autofunction:: sfdp_layout
.. autofunction:: fruchterman_reingold_layout .. autofunction:: fruchterman_reingold_layout
...@@ -11,9 +12,9 @@ ...@@ -11,9 +12,9 @@
.. autofunction:: random_layout .. autofunction:: random_layout
Graph drawing .. container:: sec_title
=============
Graph drawing
.. autofunction:: graph_draw .. autofunction:: graph_draw
.. autofunction:: draw_hierarchy .. autofunction:: draw_hierarchy
...@@ -22,8 +23,9 @@ ...@@ -22,8 +23,9 @@
.. autofunction:: get_hierarchy_control_points .. autofunction:: get_hierarchy_control_points
.. container:: sec_title
Low-level graph drawing Low-level graph drawing
^^^^^^^^^^^^^^^^^^^^^^^
.. autofunction:: cairo_draw .. autofunction:: cairo_draw
.. autofunction:: interactive_window .. autofunction:: interactive_window
......
...@@ -182,7 +182,7 @@ ...@@ -182,7 +182,7 @@
.. autofunction:: group_vector_property .. autofunction:: group_vector_property
.. autofunction:: ungroup_vector_property .. autofunction:: ungroup_vector_property
.. autofunction:: infect_vertex_property .. autofunction:: infect_vertex_property
.. autofunction:: edge_difference .. autofunction:: edge_endpoint_property
.. autofunction:: value_types .. autofunction:: value_types
.. autofunction:: show_config .. autofunction:: show_config
......
...@@ -33,8 +33,8 @@ This module contains an assortment of useful networks. ...@@ -33,8 +33,8 @@ This module contains an assortment of useful networks.
or alternatively in the ``"description"`` graph property which accompanies or alternatively in the ``"description"`` graph property which accompanies
each graph object. each graph object.
Examples Examples
-------- ========
>>> g = gt.collection.data["karate"] >>> g = gt.collection.data["karate"]
>>> print(g) >>> print(g)
......
...@@ -1434,7 +1434,7 @@ def minimize_nested_blockmodel_dl(g, Bs=None, bs=None, min_B=None, ...@@ -1434,7 +1434,7 @@ def minimize_nested_blockmodel_dl(g, Bs=None, bs=None, min_B=None,
entropy will be used to compare different partitions. entropy will be used to compare different partitions.
sequential : ``bool`` (optional, default: ``True``) sequential : ``bool`` (optional, default: ``True``)
If ``True``, the move attempts on the vertices are done in sequential If ``True``, the move attempts on the vertices are done in sequential
random order. Otherwise a total of `N` moves attempts are made, where random order. Otherwise a total of ``N`` moves attempts are made, where
`N` is the number of vertices, where each vertex can be selected with `N` is the number of vertices, where each vertex can be selected with
equal probability. equal probability.
checkpoint : function (optional, default: ``None``) checkpoint : function (optional, default: ``None``)
...@@ -1448,8 +1448,8 @@ def minimize_nested_blockmodel_dl(g, Bs=None, bs=None, min_B=None, ...@@ -1448,8 +1448,8 @@ def minimize_nested_blockmodel_dl(g, Bs=None, bs=None, min_B=None,
... ...
where `state` is either a :class:`~graph_tool.community.NestedBlockState` where `state` is either a :class:`~graph_tool.community.NestedBlockState`
instance or ``None``, `L` is the current description length, `delta` is instance or ``None``, `L` is the current description length, ``delta`` is
the entropy difference in the last MCMC sweep, and `nmoves` is the the entropy difference in the last MCMC sweep, and ``nmoves`` is the
number of accepted block membership moves. The ``minimize_state`` number of accepted block membership moves. The ``minimize_state``
argument is a :class:`~graph_tool.community.NestedMinimizeState` argument is a :class:`~graph_tool.community.NestedMinimizeState`
instance which specifies the current state of the algorithm, which can instance which specifies the current state of the algorithm, which can
......
...@@ -171,7 +171,7 @@ class GraphWidget(Gtk.DrawingArea): ...@@ -171,7 +171,7 @@ class GraphWidget(Gtk.DrawingArea):
User-supplied callback to be called whenever the positions of the layout User-supplied callback to be called whenever the positions of the layout
have changed. It needs to have the following signature: have changed. It needs to have the following signature:
.. code-block:: .. code-block:: python
def callback(g, picked, pos, vprops, eprops): def callback(g, picked, pos, vprops, eprops):
... ...
...@@ -185,7 +185,7 @@ class GraphWidget(Gtk.DrawingArea): ...@@ -185,7 +185,7 @@ class GraphWidget(Gtk.DrawingArea):
User-supplied callback to be called whenever a key-press event has User-supplied callback to be called whenever a key-press event has
happened. It needs to have the following signature: happened. It needs to have the following signature:
.. code-block:: .. code-block:: python
def callback(g, keyval, picked, pos, vprops, eprops): def callback(g, keyval, picked, pos, vprops, eprops):
... ...
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment