Commit c6dc8cf7 authored by Tiago Peixoto's avatar Tiago Peixoto

Simple documentation fixes

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